Datasets:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +9 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908248_m.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908260_m.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908290_m.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908312_m.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908320_m.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908258/1908259.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908264/1908264.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908290/1908290.tif +3 -0
- material/dataset/Datasets/Electron Microscopy Images/TSEM/1908315.tif +3 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/application.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/autocall.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/events.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/guarded_eval.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/history.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/prefilter.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/shellapp.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/completerlib.py +382 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/extensions.py +135 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/history.py +989 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/hooks.py +173 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/latex_symbols.py +1301 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/logger.py +231 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/__init__.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/bad_all.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/print_argv.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/simpleerr.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/tclass.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_alias.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_application.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_async_helpers.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_autocall.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_completer.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_display.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_displayhook.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_events.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_exceptiongroup_tb.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_extension.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_formatters.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_hooks.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_imports.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_inputtransformer2.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_interactiveshell.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_iplib.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_logger.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_magic.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_magic_terminal.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_page.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_paths.cpython-310.pyc +0 -0
- material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_pylabtools.cpython-310.pyc +0 -0
.gitattributes
CHANGED
|
@@ -381,3 +381,12 @@ material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:
|
|
| 381 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908276/1908277.tif filter=lfs diff=lfs merge=lfs -text
|
| 382 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908282/1908283.tif filter=lfs diff=lfs merge=lfs -text
|
| 383 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908310/1908311.tif filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908276/1908277.tif filter=lfs diff=lfs merge=lfs -text
|
| 382 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908282/1908283.tif filter=lfs diff=lfs merge=lfs -text
|
| 383 |
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908310/1908311.tif filter=lfs diff=lfs merge=lfs -text
|
| 384 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Images/TSEM/1908315.tif filter=lfs diff=lfs merge=lfs -text
|
| 385 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908258/1908259.tif filter=lfs diff=lfs merge=lfs -text
|
| 386 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908290/1908290.tif filter=lfs diff=lfs merge=lfs -text
|
| 387 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_Manual_4connected/1908312_m.tif filter=lfs diff=lfs merge=lfs -text
|
| 388 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_Manual_4connected/1908248_m.tif filter=lfs diff=lfs merge=lfs -text
|
| 389 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_Manual_4connected/1908290_m.tif filter=lfs diff=lfs merge=lfs -text
|
| 390 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_Manual_4connected/1908320_m.tif filter=lfs diff=lfs merge=lfs -text
|
| 391 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_Manual_4connected/1908260_m.tif filter=lfs diff=lfs merge=lfs -text
|
| 392 |
+
material/dataset/Datasets/Electron[[:space:]]Microscopy[[:space:]]Image[[:space:]]Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908264/1908264.tif filter=lfs diff=lfs merge=lfs -text
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908248_m.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908260_m.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908290_m.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908312_m.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_Manual_4connected/1908320_m.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908258/1908259.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908264/1908264.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Image Masks/TiO2_Masks_TSEM/Image_Registration/Input/1908290/1908290.tif
ADDED
|
|
Git LFS Details
|
material/dataset/Datasets/Electron Microscopy Images/TSEM/1908315.tif
ADDED
|
|
Git LFS Details
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/application.cpython-310.pyc
ADDED
|
Binary file (14.3 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/autocall.cpython-310.pyc
ADDED
|
Binary file (2.16 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/events.cpython-310.pyc
ADDED
|
Binary file (5.59 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/guarded_eval.cpython-310.pyc
ADDED
|
Binary file (22.2 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/history.cpython-310.pyc
ADDED
|
Binary file (29.7 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/__pycache__/prefilter.cpython-310.pyc
ADDED
|
Binary file (19.7 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IP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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# encoding: utf-8
|
| 2 |
+
"""Implementations for various useful completers.
|
| 3 |
+
|
| 4 |
+
These are all loaded by default by IPython.
|
| 5 |
+
"""
|
| 6 |
+
#-----------------------------------------------------------------------------
|
| 7 |
+
# Copyright (C) 2010-2011 The IPython Development Team.
|
| 8 |
+
#
|
| 9 |
+
# Distributed under the terms of the BSD License.
|
| 10 |
+
#
|
| 11 |
+
# The full license is in the file COPYING.txt, distributed with this software.
|
| 12 |
+
#-----------------------------------------------------------------------------
|
| 13 |
+
|
| 14 |
+
#-----------------------------------------------------------------------------
|
| 15 |
+
# Imports
|
| 16 |
+
#-----------------------------------------------------------------------------
|
| 17 |
+
|
| 18 |
+
# Stdlib imports
|
| 19 |
+
import glob
|
| 20 |
+
import inspect
|
| 21 |
+
import os
|
| 22 |
+
import re
|
| 23 |
+
import sys
|
| 24 |
+
from importlib import import_module
|
| 25 |
+
from importlib.machinery import all_suffixes
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
# Third-party imports
|
| 29 |
+
from time import time
|
| 30 |
+
from zipimport import zipimporter
|
| 31 |
+
|
| 32 |
+
# Our own imports
|
| 33 |
+
from .completer import expand_user, compress_user
|
| 34 |
+
from .error import TryNext
|
| 35 |
+
from ..utils._process_common import arg_split
|
| 36 |
+
|
| 37 |
+
# FIXME: this should be pulled in with the right call via the component system
|
| 38 |
+
from IPython import get_ipython
|
| 39 |
+
|
| 40 |
+
from typing import List
|
| 41 |
+
|
| 42 |
+
#-----------------------------------------------------------------------------
|
| 43 |
+
# Globals and constants
|
| 44 |
+
#-----------------------------------------------------------------------------
|
| 45 |
+
_suffixes = all_suffixes()
|
| 46 |
+
|
| 47 |
+
# Time in seconds after which the rootmodules will be stored permanently in the
|
| 48 |
+
# ipython ip.db database (kept in the user's .ipython dir).
|
| 49 |
+
TIMEOUT_STORAGE = 2
|
| 50 |
+
|
| 51 |
+
# Time in seconds after which we give up
|
| 52 |
+
TIMEOUT_GIVEUP = 20
|
| 53 |
+
|
| 54 |
+
# Regular expression for the python import statement
|
| 55 |
+
import_re = re.compile(r'(?P<name>[^\W\d]\w*?)'
|
| 56 |
+
r'(?P<package>[/\\]__init__)?'
|
| 57 |
+
r'(?P<suffix>%s)$' %
|
| 58 |
+
r'|'.join(re.escape(s) for s in _suffixes))
|
| 59 |
+
|
| 60 |
+
# RE for the ipython %run command (python + ipython scripts)
|
| 61 |
+
magic_run_re = re.compile(r'.*(\.ipy|\.ipynb|\.py[w]?)$')
|
| 62 |
+
|
| 63 |
+
#-----------------------------------------------------------------------------
|
| 64 |
+
# Local utilities
|
| 65 |
+
#-----------------------------------------------------------------------------
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def module_list(path: str) -> List[str]:
|
| 69 |
+
"""
|
| 70 |
+
Return the list containing the names of the modules available in the given
|
| 71 |
+
folder.
|
| 72 |
+
"""
|
| 73 |
+
# sys.path has the cwd as an empty string, but isdir/listdir need it as '.'
|
| 74 |
+
if path == '':
|
| 75 |
+
path = '.'
|
| 76 |
+
|
| 77 |
+
# A few local constants to be used in loops below
|
| 78 |
+
pjoin = os.path.join
|
| 79 |
+
|
| 80 |
+
if os.path.isdir(path):
|
| 81 |
+
# Build a list of all files in the directory and all files
|
| 82 |
+
# in its subdirectories. For performance reasons, do not
|
| 83 |
+
# recurse more than one level into subdirectories.
|
| 84 |
+
files: List[str] = []
|
| 85 |
+
for root, dirs, nondirs in os.walk(path, followlinks=True):
|
| 86 |
+
subdir = root[len(path)+1:]
|
| 87 |
+
if subdir:
|
| 88 |
+
files.extend(pjoin(subdir, f) for f in nondirs)
|
| 89 |
+
dirs[:] = [] # Do not recurse into additional subdirectories.
|
| 90 |
+
else:
|
| 91 |
+
files.extend(nondirs)
|
| 92 |
+
|
| 93 |
+
else:
|
| 94 |
+
try:
|
| 95 |
+
files = list(zipimporter(path)._files.keys()) # type: ignore
|
| 96 |
+
except Exception:
|
| 97 |
+
files = []
|
| 98 |
+
|
| 99 |
+
# Build a list of modules which match the import_re regex.
|
| 100 |
+
modules = []
|
| 101 |
+
for f in files:
|
| 102 |
+
m = import_re.match(f)
|
| 103 |
+
if m:
|
| 104 |
+
modules.append(m.group('name'))
|
| 105 |
+
return list(set(modules))
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
def get_root_modules():
|
| 109 |
+
"""
|
| 110 |
+
Returns a list containing the names of all the modules available in the
|
| 111 |
+
folders of the pythonpath.
|
| 112 |
+
|
| 113 |
+
ip.db['rootmodules_cache'] maps sys.path entries to list of modules.
|
| 114 |
+
"""
|
| 115 |
+
ip = get_ipython()
|
| 116 |
+
if ip is None:
|
| 117 |
+
# No global shell instance to store cached list of modules.
|
| 118 |
+
# Don't try to scan for modules every time.
|
| 119 |
+
return list(sys.builtin_module_names)
|
| 120 |
+
|
| 121 |
+
if getattr(ip.db, "_mock", False):
|
| 122 |
+
rootmodules_cache = {}
|
| 123 |
+
else:
|
| 124 |
+
rootmodules_cache = ip.db.get("rootmodules_cache", {})
|
| 125 |
+
rootmodules = list(sys.builtin_module_names)
|
| 126 |
+
start_time = time()
|
| 127 |
+
store = False
|
| 128 |
+
for path in sys.path:
|
| 129 |
+
try:
|
| 130 |
+
modules = rootmodules_cache[path]
|
| 131 |
+
except KeyError:
|
| 132 |
+
modules = module_list(path)
|
| 133 |
+
try:
|
| 134 |
+
modules.remove('__init__')
|
| 135 |
+
except ValueError:
|
| 136 |
+
pass
|
| 137 |
+
if path not in ('', '.'): # cwd modules should not be cached
|
| 138 |
+
rootmodules_cache[path] = modules
|
| 139 |
+
if time() - start_time > TIMEOUT_STORAGE and not store:
|
| 140 |
+
store = True
|
| 141 |
+
print("\nCaching the list of root modules, please wait!")
|
| 142 |
+
print("(This will only be done once - type '%rehashx' to "
|
| 143 |
+
"reset cache!)\n")
|
| 144 |
+
sys.stdout.flush()
|
| 145 |
+
if time() - start_time > TIMEOUT_GIVEUP:
|
| 146 |
+
print("This is taking too long, we give up.\n")
|
| 147 |
+
return []
|
| 148 |
+
rootmodules.extend(modules)
|
| 149 |
+
if store:
|
| 150 |
+
ip.db['rootmodules_cache'] = rootmodules_cache
|
| 151 |
+
rootmodules = list(set(rootmodules))
|
| 152 |
+
return rootmodules
|
| 153 |
+
|
| 154 |
+
|
| 155 |
+
def is_importable(module, attr: str, only_modules) -> bool:
|
| 156 |
+
if only_modules:
|
| 157 |
+
try:
|
| 158 |
+
mod = getattr(module, attr)
|
| 159 |
+
except ModuleNotFoundError:
|
| 160 |
+
# See gh-14434
|
| 161 |
+
return False
|
| 162 |
+
return inspect.ismodule(mod)
|
| 163 |
+
else:
|
| 164 |
+
return not(attr[:2] == '__' and attr[-2:] == '__')
|
| 165 |
+
|
| 166 |
+
def is_possible_submodule(module, attr):
|
| 167 |
+
try:
|
| 168 |
+
obj = getattr(module, attr)
|
| 169 |
+
except AttributeError:
|
| 170 |
+
# Is possibly an unimported submodule
|
| 171 |
+
return True
|
| 172 |
+
except TypeError:
|
| 173 |
+
# https://github.com/ipython/ipython/issues/9678
|
| 174 |
+
return False
|
| 175 |
+
return inspect.ismodule(obj)
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
def try_import(mod: str, only_modules=False) -> List[str]:
|
| 179 |
+
"""
|
| 180 |
+
Try to import given module and return list of potential completions.
|
| 181 |
+
"""
|
| 182 |
+
mod = mod.rstrip('.')
|
| 183 |
+
try:
|
| 184 |
+
m = import_module(mod)
|
| 185 |
+
except:
|
| 186 |
+
return []
|
| 187 |
+
|
| 188 |
+
m_is_init = '__init__' in (getattr(m, '__file__', '') or '')
|
| 189 |
+
|
| 190 |
+
completions = []
|
| 191 |
+
if (not hasattr(m, '__file__')) or (not only_modules) or m_is_init:
|
| 192 |
+
completions.extend( [attr for attr in dir(m) if
|
| 193 |
+
is_importable(m, attr, only_modules)])
|
| 194 |
+
|
| 195 |
+
m_all = getattr(m, "__all__", [])
|
| 196 |
+
if only_modules:
|
| 197 |
+
completions.extend(attr for attr in m_all if is_possible_submodule(m, attr))
|
| 198 |
+
else:
|
| 199 |
+
completions.extend(m_all)
|
| 200 |
+
|
| 201 |
+
if m_is_init:
|
| 202 |
+
file_ = m.__file__
|
| 203 |
+
file_path = os.path.dirname(file_) # type: ignore
|
| 204 |
+
if file_path is not None:
|
| 205 |
+
completions.extend(module_list(file_path))
|
| 206 |
+
completions_set = {c for c in completions if isinstance(c, str)}
|
| 207 |
+
completions_set.discard('__init__')
|
| 208 |
+
return list(completions_set)
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
#-----------------------------------------------------------------------------
|
| 212 |
+
# Completion-related functions.
|
| 213 |
+
#-----------------------------------------------------------------------------
|
| 214 |
+
|
| 215 |
+
def quick_completer(cmd, completions):
|
| 216 |
+
r""" Easily create a trivial completer for a command.
|
| 217 |
+
|
| 218 |
+
Takes either a list of completions, or all completions in string (that will
|
| 219 |
+
be split on whitespace).
|
| 220 |
+
|
| 221 |
+
Example::
|
| 222 |
+
|
| 223 |
+
[d:\ipython]|1> import ipy_completers
|
| 224 |
+
[d:\ipython]|2> ipy_completers.quick_completer('foo', ['bar','baz'])
|
| 225 |
+
[d:\ipython]|3> foo b<TAB>
|
| 226 |
+
bar baz
|
| 227 |
+
[d:\ipython]|3> foo ba
|
| 228 |
+
"""
|
| 229 |
+
|
| 230 |
+
if isinstance(completions, str):
|
| 231 |
+
completions = completions.split()
|
| 232 |
+
|
| 233 |
+
def do_complete(self, event):
|
| 234 |
+
return completions
|
| 235 |
+
|
| 236 |
+
get_ipython().set_hook('complete_command',do_complete, str_key = cmd)
|
| 237 |
+
|
| 238 |
+
def module_completion(line):
|
| 239 |
+
"""
|
| 240 |
+
Returns a list containing the completion possibilities for an import line.
|
| 241 |
+
|
| 242 |
+
The line looks like this :
|
| 243 |
+
'import xml.d'
|
| 244 |
+
'from xml.dom import'
|
| 245 |
+
"""
|
| 246 |
+
|
| 247 |
+
words = line.split(' ')
|
| 248 |
+
nwords = len(words)
|
| 249 |
+
|
| 250 |
+
# from whatever <tab> -> 'import '
|
| 251 |
+
if nwords == 3 and words[0] == 'from':
|
| 252 |
+
return ['import ']
|
| 253 |
+
|
| 254 |
+
# 'from xy<tab>' or 'import xy<tab>'
|
| 255 |
+
if nwords < 3 and (words[0] in {'%aimport', 'import', 'from'}) :
|
| 256 |
+
if nwords == 1:
|
| 257 |
+
return get_root_modules()
|
| 258 |
+
mod = words[1].split('.')
|
| 259 |
+
if len(mod) < 2:
|
| 260 |
+
return get_root_modules()
|
| 261 |
+
completion_list = try_import('.'.join(mod[:-1]), True)
|
| 262 |
+
return ['.'.join(mod[:-1] + [el]) for el in completion_list]
|
| 263 |
+
|
| 264 |
+
# 'from xyz import abc<tab>'
|
| 265 |
+
if nwords >= 3 and words[0] == 'from':
|
| 266 |
+
mod = words[1]
|
| 267 |
+
return try_import(mod)
|
| 268 |
+
|
| 269 |
+
#-----------------------------------------------------------------------------
|
| 270 |
+
# Completers
|
| 271 |
+
#-----------------------------------------------------------------------------
|
| 272 |
+
# These all have the func(self, event) signature to be used as custom
|
| 273 |
+
# completers
|
| 274 |
+
|
| 275 |
+
def module_completer(self,event):
|
| 276 |
+
"""Give completions after user has typed 'import ...' or 'from ...'"""
|
| 277 |
+
|
| 278 |
+
# This works in all versions of python. While 2.5 has
|
| 279 |
+
# pkgutil.walk_packages(), that particular routine is fairly dangerous,
|
| 280 |
+
# since it imports *EVERYTHING* on sys.path. That is: a) very slow b) full
|
| 281 |
+
# of possibly problematic side effects.
|
| 282 |
+
# This search the folders in the sys.path for available modules.
|
| 283 |
+
|
| 284 |
+
return module_completion(event.line)
|
| 285 |
+
|
| 286 |
+
# FIXME: there's a lot of logic common to the run, cd and builtin file
|
| 287 |
+
# completers, that is currently reimplemented in each.
|
| 288 |
+
|
| 289 |
+
def magic_run_completer(self, event):
|
| 290 |
+
"""Complete files that end in .py or .ipy or .ipynb for the %run command.
|
| 291 |
+
"""
|
| 292 |
+
comps = arg_split(event.line, strict=False)
|
| 293 |
+
# relpath should be the current token that we need to complete.
|
| 294 |
+
if (len(comps) > 1) and (not event.line.endswith(' ')):
|
| 295 |
+
relpath = comps[-1].strip("'\"")
|
| 296 |
+
else:
|
| 297 |
+
relpath = ''
|
| 298 |
+
|
| 299 |
+
#print("\nev=", event) # dbg
|
| 300 |
+
#print("rp=", relpath) # dbg
|
| 301 |
+
#print('comps=', comps) # dbg
|
| 302 |
+
|
| 303 |
+
lglob = glob.glob
|
| 304 |
+
isdir = os.path.isdir
|
| 305 |
+
relpath, tilde_expand, tilde_val = expand_user(relpath)
|
| 306 |
+
|
| 307 |
+
# Find if the user has already typed the first filename, after which we
|
| 308 |
+
# should complete on all files, since after the first one other files may
|
| 309 |
+
# be arguments to the input script.
|
| 310 |
+
|
| 311 |
+
if any(magic_run_re.match(c) for c in comps):
|
| 312 |
+
matches = [f.replace('\\','/') + ('/' if isdir(f) else '')
|
| 313 |
+
for f in lglob(relpath+'*')]
|
| 314 |
+
else:
|
| 315 |
+
dirs = [f.replace('\\','/') + "/" for f in lglob(relpath+'*') if isdir(f)]
|
| 316 |
+
pys = [f.replace('\\','/')
|
| 317 |
+
for f in lglob(relpath+'*.py') + lglob(relpath+'*.ipy') +
|
| 318 |
+
lglob(relpath+'*.ipynb') + lglob(relpath + '*.pyw')]
|
| 319 |
+
|
| 320 |
+
matches = dirs + pys
|
| 321 |
+
|
| 322 |
+
#print('run comp:', dirs+pys) # dbg
|
| 323 |
+
return [compress_user(p, tilde_expand, tilde_val) for p in matches]
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
def cd_completer(self, event):
|
| 327 |
+
"""Completer function for cd, which only returns directories."""
|
| 328 |
+
ip = get_ipython()
|
| 329 |
+
relpath = event.symbol
|
| 330 |
+
|
| 331 |
+
#print(event) # dbg
|
| 332 |
+
if event.line.endswith('-b') or ' -b ' in event.line:
|
| 333 |
+
# return only bookmark completions
|
| 334 |
+
bkms = self.db.get('bookmarks', None)
|
| 335 |
+
if bkms:
|
| 336 |
+
return bkms.keys()
|
| 337 |
+
else:
|
| 338 |
+
return []
|
| 339 |
+
|
| 340 |
+
if event.symbol == '-':
|
| 341 |
+
width_dh = str(len(str(len(ip.user_ns['_dh']) + 1)))
|
| 342 |
+
# jump in directory history by number
|
| 343 |
+
fmt = '-%0' + width_dh +'d [%s]'
|
| 344 |
+
ents = [ fmt % (i,s) for i,s in enumerate(ip.user_ns['_dh'])]
|
| 345 |
+
if len(ents) > 1:
|
| 346 |
+
return ents
|
| 347 |
+
return []
|
| 348 |
+
|
| 349 |
+
if event.symbol.startswith('--'):
|
| 350 |
+
return ["--" + os.path.basename(d) for d in ip.user_ns['_dh']]
|
| 351 |
+
|
| 352 |
+
# Expand ~ in path and normalize directory separators.
|
| 353 |
+
relpath, tilde_expand, tilde_val = expand_user(relpath)
|
| 354 |
+
relpath = relpath.replace('\\','/')
|
| 355 |
+
|
| 356 |
+
found = []
|
| 357 |
+
for d in [f.replace('\\','/') + '/' for f in glob.glob(relpath+'*')
|
| 358 |
+
if os.path.isdir(f)]:
|
| 359 |
+
if ' ' in d:
|
| 360 |
+
# we don't want to deal with any of that, complex code
|
| 361 |
+
# for this is elsewhere
|
| 362 |
+
raise TryNext
|
| 363 |
+
|
| 364 |
+
found.append(d)
|
| 365 |
+
|
| 366 |
+
if not found:
|
| 367 |
+
if os.path.isdir(relpath):
|
| 368 |
+
return [compress_user(relpath, tilde_expand, tilde_val)]
|
| 369 |
+
|
| 370 |
+
# if no completions so far, try bookmarks
|
| 371 |
+
bks = self.db.get('bookmarks',{})
|
| 372 |
+
bkmatches = [s for s in bks if s.startswith(event.symbol)]
|
| 373 |
+
if bkmatches:
|
| 374 |
+
return bkmatches
|
| 375 |
+
|
| 376 |
+
raise TryNext
|
| 377 |
+
|
| 378 |
+
return [compress_user(p, tilde_expand, tilde_val) for p in found]
|
| 379 |
+
|
| 380 |
+
def reset_completer(self, event):
|
| 381 |
+
"A completer for %reset magic"
|
| 382 |
+
return '-f -s in out array dhist'.split()
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/extensions.py
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# encoding: utf-8
|
| 2 |
+
"""A class for managing IPython extensions."""
|
| 3 |
+
|
| 4 |
+
# Copyright (c) IPython Development Team.
|
| 5 |
+
# Distributed under the terms of the Modified BSD License.
|
| 6 |
+
|
| 7 |
+
import os
|
| 8 |
+
import os.path
|
| 9 |
+
import sys
|
| 10 |
+
from importlib import import_module, reload
|
| 11 |
+
|
| 12 |
+
from traitlets.config.configurable import Configurable
|
| 13 |
+
from IPython.utils.path import ensure_dir_exists
|
| 14 |
+
from traitlets import Instance
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
#-----------------------------------------------------------------------------
|
| 18 |
+
# Main class
|
| 19 |
+
#-----------------------------------------------------------------------------
|
| 20 |
+
|
| 21 |
+
BUILTINS_EXTS = {"storemagic": False, "autoreload": False}
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
class ExtensionManager(Configurable):
|
| 25 |
+
"""A class to manage IPython extensions.
|
| 26 |
+
|
| 27 |
+
An IPython extension is an importable Python module that has
|
| 28 |
+
a function with the signature::
|
| 29 |
+
|
| 30 |
+
def load_ipython_extension(ipython):
|
| 31 |
+
# Do things with ipython
|
| 32 |
+
|
| 33 |
+
This function is called after your extension is imported and the
|
| 34 |
+
currently active :class:`InteractiveShell` instance is passed as
|
| 35 |
+
the only argument. You can do anything you want with IPython at
|
| 36 |
+
that point, including defining new magic and aliases, adding new
|
| 37 |
+
components, etc.
|
| 38 |
+
|
| 39 |
+
You can also optionally define an :func:`unload_ipython_extension(ipython)`
|
| 40 |
+
function, which will be called if the user unloads or reloads the extension.
|
| 41 |
+
The extension manager will only call :func:`load_ipython_extension` again
|
| 42 |
+
if the extension is reloaded.
|
| 43 |
+
|
| 44 |
+
You can put your extension modules anywhere you want, as long as
|
| 45 |
+
they can be imported by Python's standard import mechanism.
|
| 46 |
+
"""
|
| 47 |
+
|
| 48 |
+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC', allow_none=True)
|
| 49 |
+
|
| 50 |
+
def __init__(self, shell=None, **kwargs):
|
| 51 |
+
super(ExtensionManager, self).__init__(shell=shell, **kwargs)
|
| 52 |
+
self.loaded = set()
|
| 53 |
+
|
| 54 |
+
def load_extension(self, module_str: str):
|
| 55 |
+
"""Load an IPython extension by its module name.
|
| 56 |
+
|
| 57 |
+
Returns the string "already loaded" if the extension is already loaded,
|
| 58 |
+
"no load function" if the module doesn't have a load_ipython_extension
|
| 59 |
+
function, or None if it succeeded.
|
| 60 |
+
"""
|
| 61 |
+
try:
|
| 62 |
+
return self._load_extension(module_str)
|
| 63 |
+
except ModuleNotFoundError:
|
| 64 |
+
if module_str in BUILTINS_EXTS:
|
| 65 |
+
BUILTINS_EXTS[module_str] = True
|
| 66 |
+
return self._load_extension("IPython.extensions." + module_str)
|
| 67 |
+
raise
|
| 68 |
+
|
| 69 |
+
def _load_extension(self, module_str: str):
|
| 70 |
+
if module_str in self.loaded:
|
| 71 |
+
return "already loaded"
|
| 72 |
+
|
| 73 |
+
assert self.shell is not None
|
| 74 |
+
|
| 75 |
+
with self.shell.builtin_trap:
|
| 76 |
+
if module_str not in sys.modules:
|
| 77 |
+
mod = import_module(module_str)
|
| 78 |
+
mod = sys.modules[module_str]
|
| 79 |
+
if self._call_load_ipython_extension(mod):
|
| 80 |
+
self.loaded.add(module_str)
|
| 81 |
+
else:
|
| 82 |
+
return "no load function"
|
| 83 |
+
|
| 84 |
+
def unload_extension(self, module_str: str):
|
| 85 |
+
"""Unload an IPython extension by its module name.
|
| 86 |
+
|
| 87 |
+
This function looks up the extension's name in ``sys.modules`` and
|
| 88 |
+
simply calls ``mod.unload_ipython_extension(self)``.
|
| 89 |
+
|
| 90 |
+
Returns the string "no unload function" if the extension doesn't define
|
| 91 |
+
a function to unload itself, "not loaded" if the extension isn't loaded,
|
| 92 |
+
otherwise None.
|
| 93 |
+
"""
|
| 94 |
+
if BUILTINS_EXTS.get(module_str, False) is True:
|
| 95 |
+
module_str = "IPython.extensions." + module_str
|
| 96 |
+
if module_str not in self.loaded:
|
| 97 |
+
return "not loaded"
|
| 98 |
+
|
| 99 |
+
if module_str in sys.modules:
|
| 100 |
+
mod = sys.modules[module_str]
|
| 101 |
+
if self._call_unload_ipython_extension(mod):
|
| 102 |
+
self.loaded.discard(module_str)
|
| 103 |
+
else:
|
| 104 |
+
return "no unload function"
|
| 105 |
+
|
| 106 |
+
def reload_extension(self, module_str: str):
|
| 107 |
+
"""Reload an IPython extension by calling reload.
|
| 108 |
+
|
| 109 |
+
If the module has not been loaded before,
|
| 110 |
+
:meth:`InteractiveShell.load_extension` is called. Otherwise
|
| 111 |
+
:func:`reload` is called and then the :func:`load_ipython_extension`
|
| 112 |
+
function of the module, if it exists is called.
|
| 113 |
+
"""
|
| 114 |
+
|
| 115 |
+
if BUILTINS_EXTS.get(module_str, False) is True:
|
| 116 |
+
module_str = "IPython.extensions." + module_str
|
| 117 |
+
|
| 118 |
+
if (module_str in self.loaded) and (module_str in sys.modules):
|
| 119 |
+
self.unload_extension(module_str)
|
| 120 |
+
mod = sys.modules[module_str]
|
| 121 |
+
reload(mod)
|
| 122 |
+
if self._call_load_ipython_extension(mod):
|
| 123 |
+
self.loaded.add(module_str)
|
| 124 |
+
else:
|
| 125 |
+
self.load_extension(module_str)
|
| 126 |
+
|
| 127 |
+
def _call_load_ipython_extension(self, mod):
|
| 128 |
+
if hasattr(mod, 'load_ipython_extension'):
|
| 129 |
+
mod.load_ipython_extension(self.shell)
|
| 130 |
+
return True
|
| 131 |
+
|
| 132 |
+
def _call_unload_ipython_extension(self, mod):
|
| 133 |
+
if hasattr(mod, 'unload_ipython_extension'):
|
| 134 |
+
mod.unload_ipython_extension(self.shell)
|
| 135 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
""" History related magics and functionality """
|
| 2 |
+
|
| 3 |
+
# Copyright (c) IPython Development Team.
|
| 4 |
+
# Distributed under the terms of the Modified BSD License.
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
import atexit
|
| 8 |
+
import datetime
|
| 9 |
+
import re
|
| 10 |
+
import sqlite3
|
| 11 |
+
import threading
|
| 12 |
+
from pathlib import Path
|
| 13 |
+
|
| 14 |
+
from decorator import decorator
|
| 15 |
+
from traitlets import (
|
| 16 |
+
Any,
|
| 17 |
+
Bool,
|
| 18 |
+
Dict,
|
| 19 |
+
Instance,
|
| 20 |
+
Integer,
|
| 21 |
+
List,
|
| 22 |
+
TraitError,
|
| 23 |
+
Unicode,
|
| 24 |
+
Union,
|
| 25 |
+
default,
|
| 26 |
+
observe,
|
| 27 |
+
)
|
| 28 |
+
from traitlets.config.configurable import LoggingConfigurable
|
| 29 |
+
|
| 30 |
+
from IPython.paths import locate_profile
|
| 31 |
+
from IPython.utils.decorators import undoc
|
| 32 |
+
|
| 33 |
+
#-----------------------------------------------------------------------------
|
| 34 |
+
# Classes and functions
|
| 35 |
+
#-----------------------------------------------------------------------------
|
| 36 |
+
|
| 37 |
+
@undoc
|
| 38 |
+
class DummyDB(object):
|
| 39 |
+
"""Dummy DB that will act as a black hole for history.
|
| 40 |
+
|
| 41 |
+
Only used in the absence of sqlite"""
|
| 42 |
+
def execute(*args, **kwargs):
|
| 43 |
+
return []
|
| 44 |
+
|
| 45 |
+
def commit(self, *args, **kwargs):
|
| 46 |
+
pass
|
| 47 |
+
|
| 48 |
+
def __enter__(self, *args, **kwargs):
|
| 49 |
+
pass
|
| 50 |
+
|
| 51 |
+
def __exit__(self, *args, **kwargs):
|
| 52 |
+
pass
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
@decorator
|
| 56 |
+
def only_when_enabled(f, self, *a, **kw):
|
| 57 |
+
"""Decorator: return an empty list in the absence of sqlite."""
|
| 58 |
+
if not self.enabled:
|
| 59 |
+
return []
|
| 60 |
+
else:
|
| 61 |
+
return f(self, *a, **kw)
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
# use 16kB as threshold for whether a corrupt history db should be saved
|
| 65 |
+
# that should be at least 100 entries or so
|
| 66 |
+
_SAVE_DB_SIZE = 16384
|
| 67 |
+
|
| 68 |
+
@decorator
|
| 69 |
+
def catch_corrupt_db(f, self, *a, **kw):
|
| 70 |
+
"""A decorator which wraps HistoryAccessor method calls to catch errors from
|
| 71 |
+
a corrupt SQLite database, move the old database out of the way, and create
|
| 72 |
+
a new one.
|
| 73 |
+
|
| 74 |
+
We avoid clobbering larger databases because this may be triggered due to filesystem issues,
|
| 75 |
+
not just a corrupt file.
|
| 76 |
+
"""
|
| 77 |
+
try:
|
| 78 |
+
return f(self, *a, **kw)
|
| 79 |
+
except (sqlite3.DatabaseError, sqlite3.OperationalError) as e:
|
| 80 |
+
self._corrupt_db_counter += 1
|
| 81 |
+
self.log.error("Failed to open SQLite history %s (%s).", self.hist_file, e)
|
| 82 |
+
if self.hist_file != ':memory:':
|
| 83 |
+
if self._corrupt_db_counter > self._corrupt_db_limit:
|
| 84 |
+
self.hist_file = ':memory:'
|
| 85 |
+
self.log.error("Failed to load history too many times, history will not be saved.")
|
| 86 |
+
elif self.hist_file.is_file():
|
| 87 |
+
# move the file out of the way
|
| 88 |
+
base = str(self.hist_file.parent / self.hist_file.stem)
|
| 89 |
+
ext = self.hist_file.suffix
|
| 90 |
+
size = self.hist_file.stat().st_size
|
| 91 |
+
if size >= _SAVE_DB_SIZE:
|
| 92 |
+
# if there's significant content, avoid clobbering
|
| 93 |
+
now = datetime.datetime.now().isoformat().replace(':', '.')
|
| 94 |
+
newpath = base + '-corrupt-' + now + ext
|
| 95 |
+
# don't clobber previous corrupt backups
|
| 96 |
+
for i in range(100):
|
| 97 |
+
if not Path(newpath).exists():
|
| 98 |
+
break
|
| 99 |
+
else:
|
| 100 |
+
newpath = base + '-corrupt-' + now + (u'-%i' % i) + ext
|
| 101 |
+
else:
|
| 102 |
+
# not much content, possibly empty; don't worry about clobbering
|
| 103 |
+
# maybe we should just delete it?
|
| 104 |
+
newpath = base + '-corrupt' + ext
|
| 105 |
+
self.hist_file.rename(newpath)
|
| 106 |
+
self.log.error("History file was moved to %s and a new file created.", newpath)
|
| 107 |
+
self.init_db()
|
| 108 |
+
return []
|
| 109 |
+
else:
|
| 110 |
+
# Failed with :memory:, something serious is wrong
|
| 111 |
+
raise
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
class HistoryAccessorBase(LoggingConfigurable):
|
| 115 |
+
"""An abstract class for History Accessors """
|
| 116 |
+
|
| 117 |
+
def get_tail(self, n=10, raw=True, output=False, include_latest=False):
|
| 118 |
+
raise NotImplementedError
|
| 119 |
+
|
| 120 |
+
def search(self, pattern="*", raw=True, search_raw=True,
|
| 121 |
+
output=False, n=None, unique=False):
|
| 122 |
+
raise NotImplementedError
|
| 123 |
+
|
| 124 |
+
def get_range(self, session, start=1, stop=None, raw=True,output=False):
|
| 125 |
+
raise NotImplementedError
|
| 126 |
+
|
| 127 |
+
def get_range_by_str(self, rangestr, raw=True, output=False):
|
| 128 |
+
raise NotImplementedError
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
class HistoryAccessor(HistoryAccessorBase):
|
| 132 |
+
"""Access the history database without adding to it.
|
| 133 |
+
|
| 134 |
+
This is intended for use by standalone history tools. IPython shells use
|
| 135 |
+
HistoryManager, below, which is a subclass of this."""
|
| 136 |
+
|
| 137 |
+
# counter for init_db retries, so we don't keep trying over and over
|
| 138 |
+
_corrupt_db_counter = 0
|
| 139 |
+
# after two failures, fallback on :memory:
|
| 140 |
+
_corrupt_db_limit = 2
|
| 141 |
+
|
| 142 |
+
# String holding the path to the history file
|
| 143 |
+
hist_file = Union(
|
| 144 |
+
[Instance(Path), Unicode()],
|
| 145 |
+
help="""Path to file to use for SQLite history database.
|
| 146 |
+
|
| 147 |
+
By default, IPython will put the history database in the IPython
|
| 148 |
+
profile directory. If you would rather share one history among
|
| 149 |
+
profiles, you can set this value in each, so that they are consistent.
|
| 150 |
+
|
| 151 |
+
Due to an issue with fcntl, SQLite is known to misbehave on some NFS
|
| 152 |
+
mounts. If you see IPython hanging, try setting this to something on a
|
| 153 |
+
local disk, e.g::
|
| 154 |
+
|
| 155 |
+
ipython --HistoryManager.hist_file=/tmp/ipython_hist.sqlite
|
| 156 |
+
|
| 157 |
+
you can also use the specific value `:memory:` (including the colon
|
| 158 |
+
at both end but not the back ticks), to avoid creating an history file.
|
| 159 |
+
|
| 160 |
+
""",
|
| 161 |
+
).tag(config=True)
|
| 162 |
+
|
| 163 |
+
enabled = Bool(True,
|
| 164 |
+
help="""enable the SQLite history
|
| 165 |
+
|
| 166 |
+
set enabled=False to disable the SQLite history,
|
| 167 |
+
in which case there will be no stored history, no SQLite connection,
|
| 168 |
+
and no background saving thread. This may be necessary in some
|
| 169 |
+
threaded environments where IPython is embedded.
|
| 170 |
+
""",
|
| 171 |
+
).tag(config=True)
|
| 172 |
+
|
| 173 |
+
connection_options = Dict(
|
| 174 |
+
help="""Options for configuring the SQLite connection
|
| 175 |
+
|
| 176 |
+
These options are passed as keyword args to sqlite3.connect
|
| 177 |
+
when establishing database connections.
|
| 178 |
+
"""
|
| 179 |
+
).tag(config=True)
|
| 180 |
+
|
| 181 |
+
@default("connection_options")
|
| 182 |
+
def _default_connection_options(self):
|
| 183 |
+
return dict(check_same_thread=False)
|
| 184 |
+
|
| 185 |
+
# The SQLite database
|
| 186 |
+
db = Any()
|
| 187 |
+
@observe('db')
|
| 188 |
+
def _db_changed(self, change):
|
| 189 |
+
"""validate the db, since it can be an Instance of two different types"""
|
| 190 |
+
new = change['new']
|
| 191 |
+
connection_types = (DummyDB, sqlite3.Connection)
|
| 192 |
+
if not isinstance(new, connection_types):
|
| 193 |
+
msg = "%s.db must be sqlite3 Connection or DummyDB, not %r" % \
|
| 194 |
+
(self.__class__.__name__, new)
|
| 195 |
+
raise TraitError(msg)
|
| 196 |
+
|
| 197 |
+
def __init__(self, profile="default", hist_file="", **traits):
|
| 198 |
+
"""Create a new history accessor.
|
| 199 |
+
|
| 200 |
+
Parameters
|
| 201 |
+
----------
|
| 202 |
+
profile : str
|
| 203 |
+
The name of the profile from which to open history.
|
| 204 |
+
hist_file : str
|
| 205 |
+
Path to an SQLite history database stored by IPython. If specified,
|
| 206 |
+
hist_file overrides profile.
|
| 207 |
+
config : :class:`~traitlets.config.loader.Config`
|
| 208 |
+
Config object. hist_file can also be set through this.
|
| 209 |
+
"""
|
| 210 |
+
super(HistoryAccessor, self).__init__(**traits)
|
| 211 |
+
# defer setting hist_file from kwarg until after init,
|
| 212 |
+
# otherwise the default kwarg value would clobber any value
|
| 213 |
+
# set by config
|
| 214 |
+
if hist_file:
|
| 215 |
+
self.hist_file = hist_file
|
| 216 |
+
|
| 217 |
+
try:
|
| 218 |
+
self.hist_file
|
| 219 |
+
except TraitError:
|
| 220 |
+
# No one has set the hist_file, yet.
|
| 221 |
+
self.hist_file = self._get_hist_file_name(profile)
|
| 222 |
+
|
| 223 |
+
self.init_db()
|
| 224 |
+
|
| 225 |
+
def _get_hist_file_name(self, profile='default'):
|
| 226 |
+
"""Find the history file for the given profile name.
|
| 227 |
+
|
| 228 |
+
This is overridden by the HistoryManager subclass, to use the shell's
|
| 229 |
+
active profile.
|
| 230 |
+
|
| 231 |
+
Parameters
|
| 232 |
+
----------
|
| 233 |
+
profile : str
|
| 234 |
+
The name of a profile which has a history file.
|
| 235 |
+
"""
|
| 236 |
+
return Path(locate_profile(profile)) / "history.sqlite"
|
| 237 |
+
|
| 238 |
+
@catch_corrupt_db
|
| 239 |
+
def init_db(self):
|
| 240 |
+
"""Connect to the database, and create tables if necessary."""
|
| 241 |
+
if not self.enabled:
|
| 242 |
+
self.db = DummyDB()
|
| 243 |
+
return
|
| 244 |
+
|
| 245 |
+
# use detect_types so that timestamps return datetime objects
|
| 246 |
+
kwargs = dict(detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
|
| 247 |
+
kwargs.update(self.connection_options)
|
| 248 |
+
self.db = sqlite3.connect(str(self.hist_file), **kwargs)
|
| 249 |
+
with self.db:
|
| 250 |
+
self.db.execute(
|
| 251 |
+
"""CREATE TABLE IF NOT EXISTS sessions (session integer
|
| 252 |
+
primary key autoincrement, start timestamp,
|
| 253 |
+
end timestamp, num_cmds integer, remark text)"""
|
| 254 |
+
)
|
| 255 |
+
self.db.execute(
|
| 256 |
+
"""CREATE TABLE IF NOT EXISTS history
|
| 257 |
+
(session integer, line integer, source text, source_raw text,
|
| 258 |
+
PRIMARY KEY (session, line))"""
|
| 259 |
+
)
|
| 260 |
+
# Output history is optional, but ensure the table's there so it can be
|
| 261 |
+
# enabled later.
|
| 262 |
+
self.db.execute(
|
| 263 |
+
"""CREATE TABLE IF NOT EXISTS output_history
|
| 264 |
+
(session integer, line integer, output text,
|
| 265 |
+
PRIMARY KEY (session, line))"""
|
| 266 |
+
)
|
| 267 |
+
# success! reset corrupt db count
|
| 268 |
+
self._corrupt_db_counter = 0
|
| 269 |
+
|
| 270 |
+
def writeout_cache(self):
|
| 271 |
+
"""Overridden by HistoryManager to dump the cache before certain
|
| 272 |
+
database lookups."""
|
| 273 |
+
pass
|
| 274 |
+
|
| 275 |
+
## -------------------------------
|
| 276 |
+
## Methods for retrieving history:
|
| 277 |
+
## -------------------------------
|
| 278 |
+
def _run_sql(self, sql, params, raw=True, output=False, latest=False):
|
| 279 |
+
"""Prepares and runs an SQL query for the history database.
|
| 280 |
+
|
| 281 |
+
Parameters
|
| 282 |
+
----------
|
| 283 |
+
sql : str
|
| 284 |
+
Any filtering expressions to go after SELECT ... FROM ...
|
| 285 |
+
params : tuple
|
| 286 |
+
Parameters passed to the SQL query (to replace "?")
|
| 287 |
+
raw, output : bool
|
| 288 |
+
See :meth:`get_range`
|
| 289 |
+
latest : bool
|
| 290 |
+
Select rows with max (session, line)
|
| 291 |
+
|
| 292 |
+
Returns
|
| 293 |
+
-------
|
| 294 |
+
Tuples as :meth:`get_range`
|
| 295 |
+
"""
|
| 296 |
+
toget = 'source_raw' if raw else 'source'
|
| 297 |
+
sqlfrom = "history"
|
| 298 |
+
if output:
|
| 299 |
+
sqlfrom = "history LEFT JOIN output_history USING (session, line)"
|
| 300 |
+
toget = "history.%s, output_history.output" % toget
|
| 301 |
+
if latest:
|
| 302 |
+
toget += ", MAX(session * 128 * 1024 + line)"
|
| 303 |
+
this_querry = "SELECT session, line, %s FROM %s " % (toget, sqlfrom) + sql
|
| 304 |
+
cur = self.db.execute(this_querry, params)
|
| 305 |
+
if latest:
|
| 306 |
+
cur = (row[:-1] for row in cur)
|
| 307 |
+
if output: # Regroup into 3-tuples, and parse JSON
|
| 308 |
+
return ((ses, lin, (inp, out)) for ses, lin, inp, out in cur)
|
| 309 |
+
return cur
|
| 310 |
+
|
| 311 |
+
@only_when_enabled
|
| 312 |
+
@catch_corrupt_db
|
| 313 |
+
def get_session_info(self, session):
|
| 314 |
+
"""Get info about a session.
|
| 315 |
+
|
| 316 |
+
Parameters
|
| 317 |
+
----------
|
| 318 |
+
session : int
|
| 319 |
+
Session number to retrieve.
|
| 320 |
+
|
| 321 |
+
Returns
|
| 322 |
+
-------
|
| 323 |
+
session_id : int
|
| 324 |
+
Session ID number
|
| 325 |
+
start : datetime
|
| 326 |
+
Timestamp for the start of the session.
|
| 327 |
+
end : datetime
|
| 328 |
+
Timestamp for the end of the session, or None if IPython crashed.
|
| 329 |
+
num_cmds : int
|
| 330 |
+
Number of commands run, or None if IPython crashed.
|
| 331 |
+
remark : unicode
|
| 332 |
+
A manually set description.
|
| 333 |
+
"""
|
| 334 |
+
query = "SELECT * from sessions where session == ?"
|
| 335 |
+
return self.db.execute(query, (session,)).fetchone()
|
| 336 |
+
|
| 337 |
+
@catch_corrupt_db
|
| 338 |
+
def get_last_session_id(self):
|
| 339 |
+
"""Get the last session ID currently in the database.
|
| 340 |
+
|
| 341 |
+
Within IPython, this should be the same as the value stored in
|
| 342 |
+
:attr:`HistoryManager.session_number`.
|
| 343 |
+
"""
|
| 344 |
+
for record in self.get_tail(n=1, include_latest=True):
|
| 345 |
+
return record[0]
|
| 346 |
+
|
| 347 |
+
@catch_corrupt_db
|
| 348 |
+
def get_tail(self, n=10, raw=True, output=False, include_latest=False):
|
| 349 |
+
"""Get the last n lines from the history database.
|
| 350 |
+
|
| 351 |
+
Parameters
|
| 352 |
+
----------
|
| 353 |
+
n : int
|
| 354 |
+
The number of lines to get
|
| 355 |
+
raw, output : bool
|
| 356 |
+
See :meth:`get_range`
|
| 357 |
+
include_latest : bool
|
| 358 |
+
If False (default), n+1 lines are fetched, and the latest one
|
| 359 |
+
is discarded. This is intended to be used where the function
|
| 360 |
+
is called by a user command, which it should not return.
|
| 361 |
+
|
| 362 |
+
Returns
|
| 363 |
+
-------
|
| 364 |
+
Tuples as :meth:`get_range`
|
| 365 |
+
"""
|
| 366 |
+
self.writeout_cache()
|
| 367 |
+
if not include_latest:
|
| 368 |
+
n += 1
|
| 369 |
+
cur = self._run_sql(
|
| 370 |
+
"ORDER BY session DESC, line DESC LIMIT ?", (n,), raw=raw, output=output
|
| 371 |
+
)
|
| 372 |
+
if not include_latest:
|
| 373 |
+
return reversed(list(cur)[1:])
|
| 374 |
+
return reversed(list(cur))
|
| 375 |
+
|
| 376 |
+
@catch_corrupt_db
|
| 377 |
+
def search(self, pattern="*", raw=True, search_raw=True,
|
| 378 |
+
output=False, n=None, unique=False):
|
| 379 |
+
"""Search the database using unix glob-style matching (wildcards
|
| 380 |
+
* and ?).
|
| 381 |
+
|
| 382 |
+
Parameters
|
| 383 |
+
----------
|
| 384 |
+
pattern : str
|
| 385 |
+
The wildcarded pattern to match when searching
|
| 386 |
+
search_raw : bool
|
| 387 |
+
If True, search the raw input, otherwise, the parsed input
|
| 388 |
+
raw, output : bool
|
| 389 |
+
See :meth:`get_range`
|
| 390 |
+
n : None or int
|
| 391 |
+
If an integer is given, it defines the limit of
|
| 392 |
+
returned entries.
|
| 393 |
+
unique : bool
|
| 394 |
+
When it is true, return only unique entries.
|
| 395 |
+
|
| 396 |
+
Returns
|
| 397 |
+
-------
|
| 398 |
+
Tuples as :meth:`get_range`
|
| 399 |
+
"""
|
| 400 |
+
tosearch = "source_raw" if search_raw else "source"
|
| 401 |
+
if output:
|
| 402 |
+
tosearch = "history." + tosearch
|
| 403 |
+
self.writeout_cache()
|
| 404 |
+
sqlform = "WHERE %s GLOB ?" % tosearch
|
| 405 |
+
params = (pattern,)
|
| 406 |
+
if unique:
|
| 407 |
+
sqlform += ' GROUP BY {0}'.format(tosearch)
|
| 408 |
+
if n is not None:
|
| 409 |
+
sqlform += " ORDER BY session DESC, line DESC LIMIT ?"
|
| 410 |
+
params += (n,)
|
| 411 |
+
elif unique:
|
| 412 |
+
sqlform += " ORDER BY session, line"
|
| 413 |
+
cur = self._run_sql(sqlform, params, raw=raw, output=output, latest=unique)
|
| 414 |
+
if n is not None:
|
| 415 |
+
return reversed(list(cur))
|
| 416 |
+
return cur
|
| 417 |
+
|
| 418 |
+
@catch_corrupt_db
|
| 419 |
+
def get_range(self, session, start=1, stop=None, raw=True,output=False):
|
| 420 |
+
"""Retrieve input by session.
|
| 421 |
+
|
| 422 |
+
Parameters
|
| 423 |
+
----------
|
| 424 |
+
session : int
|
| 425 |
+
Session number to retrieve.
|
| 426 |
+
start : int
|
| 427 |
+
First line to retrieve.
|
| 428 |
+
stop : int
|
| 429 |
+
End of line range (excluded from output itself). If None, retrieve
|
| 430 |
+
to the end of the session.
|
| 431 |
+
raw : bool
|
| 432 |
+
If True, return untranslated input
|
| 433 |
+
output : bool
|
| 434 |
+
If True, attempt to include output. This will be 'real' Python
|
| 435 |
+
objects for the current session, or text reprs from previous
|
| 436 |
+
sessions if db_log_output was enabled at the time. Where no output
|
| 437 |
+
is found, None is used.
|
| 438 |
+
|
| 439 |
+
Returns
|
| 440 |
+
-------
|
| 441 |
+
entries
|
| 442 |
+
An iterator over the desired lines. Each line is a 3-tuple, either
|
| 443 |
+
(session, line, input) if output is False, or
|
| 444 |
+
(session, line, (input, output)) if output is True.
|
| 445 |
+
"""
|
| 446 |
+
if stop:
|
| 447 |
+
lineclause = "line >= ? AND line < ?"
|
| 448 |
+
params = (session, start, stop)
|
| 449 |
+
else:
|
| 450 |
+
lineclause = "line>=?"
|
| 451 |
+
params = (session, start)
|
| 452 |
+
|
| 453 |
+
return self._run_sql("WHERE session==? AND %s" % lineclause,
|
| 454 |
+
params, raw=raw, output=output)
|
| 455 |
+
|
| 456 |
+
def get_range_by_str(self, rangestr, raw=True, output=False):
|
| 457 |
+
"""Get lines of history from a string of ranges, as used by magic
|
| 458 |
+
commands %hist, %save, %macro, etc.
|
| 459 |
+
|
| 460 |
+
Parameters
|
| 461 |
+
----------
|
| 462 |
+
rangestr : str
|
| 463 |
+
A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used,
|
| 464 |
+
this will return everything from current session's history.
|
| 465 |
+
|
| 466 |
+
See the documentation of :func:`%history` for the full details.
|
| 467 |
+
|
| 468 |
+
raw, output : bool
|
| 469 |
+
As :meth:`get_range`
|
| 470 |
+
|
| 471 |
+
Returns
|
| 472 |
+
-------
|
| 473 |
+
Tuples as :meth:`get_range`
|
| 474 |
+
"""
|
| 475 |
+
for sess, s, e in extract_hist_ranges(rangestr):
|
| 476 |
+
for line in self.get_range(sess, s, e, raw=raw, output=output):
|
| 477 |
+
yield line
|
| 478 |
+
|
| 479 |
+
|
| 480 |
+
class HistoryManager(HistoryAccessor):
|
| 481 |
+
"""A class to organize all history-related functionality in one place.
|
| 482 |
+
"""
|
| 483 |
+
# Public interface
|
| 484 |
+
|
| 485 |
+
# An instance of the IPython shell we are attached to
|
| 486 |
+
shell = Instance('IPython.core.interactiveshell.InteractiveShellABC',
|
| 487 |
+
allow_none=True)
|
| 488 |
+
# Lists to hold processed and raw history. These start with a blank entry
|
| 489 |
+
# so that we can index them starting from 1
|
| 490 |
+
input_hist_parsed = List([""])
|
| 491 |
+
input_hist_raw = List([""])
|
| 492 |
+
# A list of directories visited during session
|
| 493 |
+
dir_hist: List = List()
|
| 494 |
+
|
| 495 |
+
@default("dir_hist")
|
| 496 |
+
def _dir_hist_default(self):
|
| 497 |
+
try:
|
| 498 |
+
return [Path.cwd()]
|
| 499 |
+
except OSError:
|
| 500 |
+
return []
|
| 501 |
+
|
| 502 |
+
# A dict of output history, keyed with ints from the shell's
|
| 503 |
+
# execution count.
|
| 504 |
+
output_hist = Dict()
|
| 505 |
+
# The text/plain repr of outputs.
|
| 506 |
+
output_hist_reprs = Dict()
|
| 507 |
+
|
| 508 |
+
# The number of the current session in the history database
|
| 509 |
+
session_number = Integer()
|
| 510 |
+
|
| 511 |
+
db_log_output = Bool(False,
|
| 512 |
+
help="Should the history database include output? (default: no)"
|
| 513 |
+
).tag(config=True)
|
| 514 |
+
db_cache_size = Integer(0,
|
| 515 |
+
help="Write to database every x commands (higher values save disk access & power).\n"
|
| 516 |
+
"Values of 1 or less effectively disable caching."
|
| 517 |
+
).tag(config=True)
|
| 518 |
+
# The input and output caches
|
| 519 |
+
db_input_cache: List = List()
|
| 520 |
+
db_output_cache: List = List()
|
| 521 |
+
|
| 522 |
+
# History saving in separate thread
|
| 523 |
+
save_thread = Instance('IPython.core.history.HistorySavingThread',
|
| 524 |
+
allow_none=True)
|
| 525 |
+
save_flag = Instance(threading.Event, allow_none=True)
|
| 526 |
+
|
| 527 |
+
# Private interface
|
| 528 |
+
# Variables used to store the three last inputs from the user. On each new
|
| 529 |
+
# history update, we populate the user's namespace with these, shifted as
|
| 530 |
+
# necessary.
|
| 531 |
+
_i00 = Unicode("")
|
| 532 |
+
_i = Unicode("")
|
| 533 |
+
_ii = Unicode("")
|
| 534 |
+
_iii = Unicode("")
|
| 535 |
+
|
| 536 |
+
# A regex matching all forms of the exit command, so that we don't store
|
| 537 |
+
# them in the history (it's annoying to rewind the first entry and land on
|
| 538 |
+
# an exit call).
|
| 539 |
+
_exit_re = re.compile(r"(exit|quit)(\s*\(.*\))?$")
|
| 540 |
+
|
| 541 |
+
def __init__(self, shell=None, config=None, **traits):
|
| 542 |
+
"""Create a new history manager associated with a shell instance.
|
| 543 |
+
"""
|
| 544 |
+
super(HistoryManager, self).__init__(shell=shell, config=config,
|
| 545 |
+
**traits)
|
| 546 |
+
self.save_flag = threading.Event()
|
| 547 |
+
self.db_input_cache_lock = threading.Lock()
|
| 548 |
+
self.db_output_cache_lock = threading.Lock()
|
| 549 |
+
|
| 550 |
+
try:
|
| 551 |
+
self.new_session()
|
| 552 |
+
except sqlite3.OperationalError:
|
| 553 |
+
self.log.error("Failed to create history session in %s. History will not be saved.",
|
| 554 |
+
self.hist_file, exc_info=True)
|
| 555 |
+
self.hist_file = ':memory:'
|
| 556 |
+
|
| 557 |
+
if self.enabled and self.hist_file != ':memory:':
|
| 558 |
+
self.save_thread = HistorySavingThread(self)
|
| 559 |
+
try:
|
| 560 |
+
self.save_thread.start()
|
| 561 |
+
except RuntimeError:
|
| 562 |
+
self.log.error(
|
| 563 |
+
"Failed to start history saving thread. History will not be saved.",
|
| 564 |
+
exc_info=True,
|
| 565 |
+
)
|
| 566 |
+
self.hist_file = ":memory:"
|
| 567 |
+
|
| 568 |
+
def _get_hist_file_name(self, profile=None):
|
| 569 |
+
"""Get default history file name based on the Shell's profile.
|
| 570 |
+
|
| 571 |
+
The profile parameter is ignored, but must exist for compatibility with
|
| 572 |
+
the parent class."""
|
| 573 |
+
profile_dir = self.shell.profile_dir.location
|
| 574 |
+
return Path(profile_dir) / "history.sqlite"
|
| 575 |
+
|
| 576 |
+
@only_when_enabled
|
| 577 |
+
def new_session(self, conn=None):
|
| 578 |
+
"""Get a new session number."""
|
| 579 |
+
if conn is None:
|
| 580 |
+
conn = self.db
|
| 581 |
+
|
| 582 |
+
with conn:
|
| 583 |
+
cur = conn.execute(
|
| 584 |
+
"""INSERT INTO sessions VALUES (NULL, ?, NULL,
|
| 585 |
+
NULL, '') """,
|
| 586 |
+
(datetime.datetime.now().isoformat(" "),),
|
| 587 |
+
)
|
| 588 |
+
self.session_number = cur.lastrowid
|
| 589 |
+
|
| 590 |
+
def end_session(self):
|
| 591 |
+
"""Close the database session, filling in the end time and line count."""
|
| 592 |
+
self.writeout_cache()
|
| 593 |
+
with self.db:
|
| 594 |
+
self.db.execute(
|
| 595 |
+
"""UPDATE sessions SET end=?, num_cmds=? WHERE
|
| 596 |
+
session==?""",
|
| 597 |
+
(
|
| 598 |
+
datetime.datetime.now().isoformat(" "),
|
| 599 |
+
len(self.input_hist_parsed) - 1,
|
| 600 |
+
self.session_number,
|
| 601 |
+
),
|
| 602 |
+
)
|
| 603 |
+
self.session_number = 0
|
| 604 |
+
|
| 605 |
+
def name_session(self, name):
|
| 606 |
+
"""Give the current session a name in the history database."""
|
| 607 |
+
with self.db:
|
| 608 |
+
self.db.execute("UPDATE sessions SET remark=? WHERE session==?",
|
| 609 |
+
(name, self.session_number))
|
| 610 |
+
|
| 611 |
+
def reset(self, new_session=True):
|
| 612 |
+
"""Clear the session history, releasing all object references, and
|
| 613 |
+
optionally open a new session."""
|
| 614 |
+
self.output_hist.clear()
|
| 615 |
+
# The directory history can't be completely empty
|
| 616 |
+
self.dir_hist[:] = [Path.cwd()]
|
| 617 |
+
|
| 618 |
+
if new_session:
|
| 619 |
+
if self.session_number:
|
| 620 |
+
self.end_session()
|
| 621 |
+
self.input_hist_parsed[:] = [""]
|
| 622 |
+
self.input_hist_raw[:] = [""]
|
| 623 |
+
self.new_session()
|
| 624 |
+
|
| 625 |
+
# ------------------------------
|
| 626 |
+
# Methods for retrieving history
|
| 627 |
+
# ------------------------------
|
| 628 |
+
def get_session_info(self, session=0):
|
| 629 |
+
"""Get info about a session.
|
| 630 |
+
|
| 631 |
+
Parameters
|
| 632 |
+
----------
|
| 633 |
+
session : int
|
| 634 |
+
Session number to retrieve. The current session is 0, and negative
|
| 635 |
+
numbers count back from current session, so -1 is the previous session.
|
| 636 |
+
|
| 637 |
+
Returns
|
| 638 |
+
-------
|
| 639 |
+
session_id : int
|
| 640 |
+
Session ID number
|
| 641 |
+
start : datetime
|
| 642 |
+
Timestamp for the start of the session.
|
| 643 |
+
end : datetime
|
| 644 |
+
Timestamp for the end of the session, or None if IPython crashed.
|
| 645 |
+
num_cmds : int
|
| 646 |
+
Number of commands run, or None if IPython crashed.
|
| 647 |
+
remark : unicode
|
| 648 |
+
A manually set description.
|
| 649 |
+
"""
|
| 650 |
+
if session <= 0:
|
| 651 |
+
session += self.session_number
|
| 652 |
+
|
| 653 |
+
return super(HistoryManager, self).get_session_info(session=session)
|
| 654 |
+
|
| 655 |
+
@catch_corrupt_db
|
| 656 |
+
def get_tail(self, n=10, raw=True, output=False, include_latest=False):
|
| 657 |
+
"""Get the last n lines from the history database.
|
| 658 |
+
|
| 659 |
+
Most recent entry last.
|
| 660 |
+
|
| 661 |
+
Completion will be reordered so that that the last ones are when
|
| 662 |
+
possible from current session.
|
| 663 |
+
|
| 664 |
+
Parameters
|
| 665 |
+
----------
|
| 666 |
+
n : int
|
| 667 |
+
The number of lines to get
|
| 668 |
+
raw, output : bool
|
| 669 |
+
See :meth:`get_range`
|
| 670 |
+
include_latest : bool
|
| 671 |
+
If False (default), n+1 lines are fetched, and the latest one
|
| 672 |
+
is discarded. This is intended to be used where the function
|
| 673 |
+
is called by a user command, which it should not return.
|
| 674 |
+
|
| 675 |
+
Returns
|
| 676 |
+
-------
|
| 677 |
+
Tuples as :meth:`get_range`
|
| 678 |
+
"""
|
| 679 |
+
self.writeout_cache()
|
| 680 |
+
if not include_latest:
|
| 681 |
+
n += 1
|
| 682 |
+
# cursor/line/entry
|
| 683 |
+
this_cur = list(
|
| 684 |
+
self._run_sql(
|
| 685 |
+
"WHERE session == ? ORDER BY line DESC LIMIT ? ",
|
| 686 |
+
(self.session_number, n),
|
| 687 |
+
raw=raw,
|
| 688 |
+
output=output,
|
| 689 |
+
)
|
| 690 |
+
)
|
| 691 |
+
other_cur = list(
|
| 692 |
+
self._run_sql(
|
| 693 |
+
"WHERE session != ? ORDER BY session DESC, line DESC LIMIT ?",
|
| 694 |
+
(self.session_number, n),
|
| 695 |
+
raw=raw,
|
| 696 |
+
output=output,
|
| 697 |
+
)
|
| 698 |
+
)
|
| 699 |
+
|
| 700 |
+
everything = this_cur + other_cur
|
| 701 |
+
|
| 702 |
+
everything = everything[:n]
|
| 703 |
+
|
| 704 |
+
if not include_latest:
|
| 705 |
+
return list(everything)[:0:-1]
|
| 706 |
+
return list(everything)[::-1]
|
| 707 |
+
|
| 708 |
+
def _get_range_session(self, start=1, stop=None, raw=True, output=False):
|
| 709 |
+
"""Get input and output history from the current session. Called by
|
| 710 |
+
get_range, and takes similar parameters."""
|
| 711 |
+
input_hist = self.input_hist_raw if raw else self.input_hist_parsed
|
| 712 |
+
|
| 713 |
+
n = len(input_hist)
|
| 714 |
+
if start < 0:
|
| 715 |
+
start += n
|
| 716 |
+
if not stop or (stop > n):
|
| 717 |
+
stop = n
|
| 718 |
+
elif stop < 0:
|
| 719 |
+
stop += n
|
| 720 |
+
|
| 721 |
+
for i in range(start, stop):
|
| 722 |
+
if output:
|
| 723 |
+
line = (input_hist[i], self.output_hist_reprs.get(i))
|
| 724 |
+
else:
|
| 725 |
+
line = input_hist[i]
|
| 726 |
+
yield (0, i, line)
|
| 727 |
+
|
| 728 |
+
def get_range(self, session=0, start=1, stop=None, raw=True,output=False):
|
| 729 |
+
"""Retrieve input by session.
|
| 730 |
+
|
| 731 |
+
Parameters
|
| 732 |
+
----------
|
| 733 |
+
session : int
|
| 734 |
+
Session number to retrieve. The current session is 0, and negative
|
| 735 |
+
numbers count back from current session, so -1 is previous session.
|
| 736 |
+
start : int
|
| 737 |
+
First line to retrieve.
|
| 738 |
+
stop : int
|
| 739 |
+
End of line range (excluded from output itself). If None, retrieve
|
| 740 |
+
to the end of the session.
|
| 741 |
+
raw : bool
|
| 742 |
+
If True, return untranslated input
|
| 743 |
+
output : bool
|
| 744 |
+
If True, attempt to include output. This will be 'real' Python
|
| 745 |
+
objects for the current session, or text reprs from previous
|
| 746 |
+
sessions if db_log_output was enabled at the time. Where no output
|
| 747 |
+
is found, None is used.
|
| 748 |
+
|
| 749 |
+
Returns
|
| 750 |
+
-------
|
| 751 |
+
entries
|
| 752 |
+
An iterator over the desired lines. Each line is a 3-tuple, either
|
| 753 |
+
(session, line, input) if output is False, or
|
| 754 |
+
(session, line, (input, output)) if output is True.
|
| 755 |
+
"""
|
| 756 |
+
if session <= 0:
|
| 757 |
+
session += self.session_number
|
| 758 |
+
if session==self.session_number: # Current session
|
| 759 |
+
return self._get_range_session(start, stop, raw, output)
|
| 760 |
+
return super(HistoryManager, self).get_range(session, start, stop, raw,
|
| 761 |
+
output)
|
| 762 |
+
|
| 763 |
+
## ----------------------------
|
| 764 |
+
## Methods for storing history:
|
| 765 |
+
## ----------------------------
|
| 766 |
+
def store_inputs(self, line_num, source, source_raw=None):
|
| 767 |
+
"""Store source and raw input in history and create input cache
|
| 768 |
+
variables ``_i*``.
|
| 769 |
+
|
| 770 |
+
Parameters
|
| 771 |
+
----------
|
| 772 |
+
line_num : int
|
| 773 |
+
The prompt number of this input.
|
| 774 |
+
source : str
|
| 775 |
+
Python input.
|
| 776 |
+
source_raw : str, optional
|
| 777 |
+
If given, this is the raw input without any IPython transformations
|
| 778 |
+
applied to it. If not given, ``source`` is used.
|
| 779 |
+
"""
|
| 780 |
+
if source_raw is None:
|
| 781 |
+
source_raw = source
|
| 782 |
+
source = source.rstrip('\n')
|
| 783 |
+
source_raw = source_raw.rstrip('\n')
|
| 784 |
+
|
| 785 |
+
# do not store exit/quit commands
|
| 786 |
+
if self._exit_re.match(source_raw.strip()):
|
| 787 |
+
return
|
| 788 |
+
|
| 789 |
+
self.input_hist_parsed.append(source)
|
| 790 |
+
self.input_hist_raw.append(source_raw)
|
| 791 |
+
|
| 792 |
+
with self.db_input_cache_lock:
|
| 793 |
+
self.db_input_cache.append((line_num, source, source_raw))
|
| 794 |
+
# Trigger to flush cache and write to DB.
|
| 795 |
+
if len(self.db_input_cache) >= self.db_cache_size:
|
| 796 |
+
self.save_flag.set()
|
| 797 |
+
|
| 798 |
+
# update the auto _i variables
|
| 799 |
+
self._iii = self._ii
|
| 800 |
+
self._ii = self._i
|
| 801 |
+
self._i = self._i00
|
| 802 |
+
self._i00 = source_raw
|
| 803 |
+
|
| 804 |
+
# hackish access to user namespace to create _i1,_i2... dynamically
|
| 805 |
+
new_i = '_i%s' % line_num
|
| 806 |
+
to_main = {'_i': self._i,
|
| 807 |
+
'_ii': self._ii,
|
| 808 |
+
'_iii': self._iii,
|
| 809 |
+
new_i : self._i00 }
|
| 810 |
+
|
| 811 |
+
if self.shell is not None:
|
| 812 |
+
self.shell.push(to_main, interactive=False)
|
| 813 |
+
|
| 814 |
+
def store_output(self, line_num):
|
| 815 |
+
"""If database output logging is enabled, this saves all the
|
| 816 |
+
outputs from the indicated prompt number to the database. It's
|
| 817 |
+
called by run_cell after code has been executed.
|
| 818 |
+
|
| 819 |
+
Parameters
|
| 820 |
+
----------
|
| 821 |
+
line_num : int
|
| 822 |
+
The line number from which to save outputs
|
| 823 |
+
"""
|
| 824 |
+
if (not self.db_log_output) or (line_num not in self.output_hist_reprs):
|
| 825 |
+
return
|
| 826 |
+
output = self.output_hist_reprs[line_num]
|
| 827 |
+
|
| 828 |
+
with self.db_output_cache_lock:
|
| 829 |
+
self.db_output_cache.append((line_num, output))
|
| 830 |
+
if self.db_cache_size <= 1:
|
| 831 |
+
self.save_flag.set()
|
| 832 |
+
|
| 833 |
+
def _writeout_input_cache(self, conn):
|
| 834 |
+
with conn:
|
| 835 |
+
for line in self.db_input_cache:
|
| 836 |
+
conn.execute("INSERT INTO history VALUES (?, ?, ?, ?)",
|
| 837 |
+
(self.session_number,)+line)
|
| 838 |
+
|
| 839 |
+
def _writeout_output_cache(self, conn):
|
| 840 |
+
with conn:
|
| 841 |
+
for line in self.db_output_cache:
|
| 842 |
+
conn.execute("INSERT INTO output_history VALUES (?, ?, ?)",
|
| 843 |
+
(self.session_number,)+line)
|
| 844 |
+
|
| 845 |
+
@only_when_enabled
|
| 846 |
+
def writeout_cache(self, conn=None):
|
| 847 |
+
"""Write any entries in the cache to the database."""
|
| 848 |
+
if conn is None:
|
| 849 |
+
conn = self.db
|
| 850 |
+
|
| 851 |
+
with self.db_input_cache_lock:
|
| 852 |
+
try:
|
| 853 |
+
self._writeout_input_cache(conn)
|
| 854 |
+
except sqlite3.IntegrityError:
|
| 855 |
+
self.new_session(conn)
|
| 856 |
+
print("ERROR! Session/line number was not unique in",
|
| 857 |
+
"database. History logging moved to new session",
|
| 858 |
+
self.session_number)
|
| 859 |
+
try:
|
| 860 |
+
# Try writing to the new session. If this fails, don't
|
| 861 |
+
# recurse
|
| 862 |
+
self._writeout_input_cache(conn)
|
| 863 |
+
except sqlite3.IntegrityError:
|
| 864 |
+
pass
|
| 865 |
+
finally:
|
| 866 |
+
self.db_input_cache = []
|
| 867 |
+
|
| 868 |
+
with self.db_output_cache_lock:
|
| 869 |
+
try:
|
| 870 |
+
self._writeout_output_cache(conn)
|
| 871 |
+
except sqlite3.IntegrityError:
|
| 872 |
+
print("!! Session/line number for output was not unique",
|
| 873 |
+
"in database. Output will not be stored.")
|
| 874 |
+
finally:
|
| 875 |
+
self.db_output_cache = []
|
| 876 |
+
|
| 877 |
+
|
| 878 |
+
class HistorySavingThread(threading.Thread):
|
| 879 |
+
"""This thread takes care of writing history to the database, so that
|
| 880 |
+
the UI isn't held up while that happens.
|
| 881 |
+
|
| 882 |
+
It waits for the HistoryManager's save_flag to be set, then writes out
|
| 883 |
+
the history cache. The main thread is responsible for setting the flag when
|
| 884 |
+
the cache size reaches a defined threshold."""
|
| 885 |
+
daemon = True
|
| 886 |
+
stop_now = False
|
| 887 |
+
enabled = True
|
| 888 |
+
def __init__(self, history_manager):
|
| 889 |
+
super(HistorySavingThread, self).__init__(name="IPythonHistorySavingThread")
|
| 890 |
+
self.history_manager = history_manager
|
| 891 |
+
self.enabled = history_manager.enabled
|
| 892 |
+
|
| 893 |
+
@only_when_enabled
|
| 894 |
+
def run(self):
|
| 895 |
+
atexit.register(self.stop)
|
| 896 |
+
# We need a separate db connection per thread:
|
| 897 |
+
try:
|
| 898 |
+
self.db = sqlite3.connect(
|
| 899 |
+
str(self.history_manager.hist_file),
|
| 900 |
+
**self.history_manager.connection_options,
|
| 901 |
+
)
|
| 902 |
+
while True:
|
| 903 |
+
self.history_manager.save_flag.wait()
|
| 904 |
+
if self.stop_now:
|
| 905 |
+
self.db.close()
|
| 906 |
+
return
|
| 907 |
+
self.history_manager.save_flag.clear()
|
| 908 |
+
self.history_manager.writeout_cache(self.db)
|
| 909 |
+
except Exception as e:
|
| 910 |
+
print(("The history saving thread hit an unexpected error (%s)."
|
| 911 |
+
"History will not be written to the database.") % repr(e))
|
| 912 |
+
finally:
|
| 913 |
+
atexit.unregister(self.stop)
|
| 914 |
+
|
| 915 |
+
def stop(self):
|
| 916 |
+
"""This can be called from the main thread to safely stop this thread.
|
| 917 |
+
|
| 918 |
+
Note that it does not attempt to write out remaining history before
|
| 919 |
+
exiting. That should be done by calling the HistoryManager's
|
| 920 |
+
end_session method."""
|
| 921 |
+
self.stop_now = True
|
| 922 |
+
self.history_manager.save_flag.set()
|
| 923 |
+
self.join()
|
| 924 |
+
|
| 925 |
+
|
| 926 |
+
# To match, e.g. ~5/8-~2/3
|
| 927 |
+
range_re = re.compile(r"""
|
| 928 |
+
((?P<startsess>~?\d+)/)?
|
| 929 |
+
(?P<start>\d+)?
|
| 930 |
+
((?P<sep>[\-:])
|
| 931 |
+
((?P<endsess>~?\d+)/)?
|
| 932 |
+
(?P<end>\d+))?
|
| 933 |
+
$""", re.VERBOSE)
|
| 934 |
+
|
| 935 |
+
|
| 936 |
+
def extract_hist_ranges(ranges_str):
|
| 937 |
+
"""Turn a string of history ranges into 3-tuples of (session, start, stop).
|
| 938 |
+
|
| 939 |
+
Empty string results in a `[(0, 1, None)]`, i.e. "everything from current
|
| 940 |
+
session".
|
| 941 |
+
|
| 942 |
+
Examples
|
| 943 |
+
--------
|
| 944 |
+
>>> list(extract_hist_ranges("~8/5-~7/4 2"))
|
| 945 |
+
[(-8, 5, None), (-7, 1, 5), (0, 2, 3)]
|
| 946 |
+
"""
|
| 947 |
+
if ranges_str == "":
|
| 948 |
+
yield (0, 1, None) # Everything from current session
|
| 949 |
+
return
|
| 950 |
+
|
| 951 |
+
for range_str in ranges_str.split():
|
| 952 |
+
rmatch = range_re.match(range_str)
|
| 953 |
+
if not rmatch:
|
| 954 |
+
continue
|
| 955 |
+
start = rmatch.group("start")
|
| 956 |
+
if start:
|
| 957 |
+
start = int(start)
|
| 958 |
+
end = rmatch.group("end")
|
| 959 |
+
# If no end specified, get (a, a + 1)
|
| 960 |
+
end = int(end) if end else start + 1
|
| 961 |
+
else: # start not specified
|
| 962 |
+
if not rmatch.group('startsess'): # no startsess
|
| 963 |
+
continue
|
| 964 |
+
start = 1
|
| 965 |
+
end = None # provide the entire session hist
|
| 966 |
+
|
| 967 |
+
if rmatch.group("sep") == "-": # 1-3 == 1:4 --> [1, 2, 3]
|
| 968 |
+
end += 1
|
| 969 |
+
startsess = rmatch.group("startsess") or "0"
|
| 970 |
+
endsess = rmatch.group("endsess") or startsess
|
| 971 |
+
startsess = int(startsess.replace("~","-"))
|
| 972 |
+
endsess = int(endsess.replace("~","-"))
|
| 973 |
+
assert endsess >= startsess, "start session must be earlier than end session"
|
| 974 |
+
|
| 975 |
+
if endsess == startsess:
|
| 976 |
+
yield (startsess, start, end)
|
| 977 |
+
continue
|
| 978 |
+
# Multiple sessions in one range:
|
| 979 |
+
yield (startsess, start, None)
|
| 980 |
+
for sess in range(startsess+1, endsess):
|
| 981 |
+
yield (sess, 1, None)
|
| 982 |
+
yield (endsess, 1, end)
|
| 983 |
+
|
| 984 |
+
|
| 985 |
+
def _format_lineno(session, line):
|
| 986 |
+
"""Helper function to format line numbers properly."""
|
| 987 |
+
if session == 0:
|
| 988 |
+
return str(line)
|
| 989 |
+
return "%s#%s" % (session, line)
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/hooks.py
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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want to. But IPython exposes a few 'hooks', methods which are *designed* to
|
| 5 |
+
be overwritten by users for customization purposes. This module defines the
|
| 6 |
+
default versions of all such hooks, which get used by IPython if not
|
| 7 |
+
overridden by the user.
|
| 8 |
+
|
| 9 |
+
Hooks are simple functions, but they should be declared with ``self`` as their
|
| 10 |
+
first argument, because when activated they are registered into IPython as
|
| 11 |
+
instance methods. The self argument will be the IPython running instance
|
| 12 |
+
itself, so hooks have full access to the entire IPython object.
|
| 13 |
+
|
| 14 |
+
If you wish to define a new hook and activate it, you can make an :doc:`extension
|
| 15 |
+
</config/extensions/index>` or a :ref:`startup script <startup_files>`. For
|
| 16 |
+
example, you could use a startup file like this::
|
| 17 |
+
|
| 18 |
+
import os
|
| 19 |
+
|
| 20 |
+
def calljed(self,filename, linenum):
|
| 21 |
+
"My editor hook calls the jed editor directly."
|
| 22 |
+
print("Calling my own editor, jed ...")
|
| 23 |
+
if os.system('jed +%d %s' % (linenum,filename)) != 0:
|
| 24 |
+
raise TryNext()
|
| 25 |
+
|
| 26 |
+
def load_ipython_extension(ip):
|
| 27 |
+
ip.set_hook('editor', calljed)
|
| 28 |
+
|
| 29 |
+
"""
|
| 30 |
+
|
| 31 |
+
#*****************************************************************************
|
| 32 |
+
# Copyright (C) 2005 Fernando Perez. <fperez@colorado.edu>
|
| 33 |
+
#
|
| 34 |
+
# Distributed under the terms of the BSD License. The full license is in
|
| 35 |
+
# the file COPYING, distributed as part of this software.
|
| 36 |
+
#*****************************************************************************
|
| 37 |
+
|
| 38 |
+
import os
|
| 39 |
+
import subprocess
|
| 40 |
+
import sys
|
| 41 |
+
|
| 42 |
+
from .error import TryNext
|
| 43 |
+
|
| 44 |
+
# List here all the default hooks. For now it's just the editor functions
|
| 45 |
+
# but over time we'll move here all the public API for user-accessible things.
|
| 46 |
+
|
| 47 |
+
__all__ = [
|
| 48 |
+
"editor",
|
| 49 |
+
"synchronize_with_editor",
|
| 50 |
+
"show_in_pager",
|
| 51 |
+
"pre_prompt_hook",
|
| 52 |
+
"clipboard_get",
|
| 53 |
+
]
|
| 54 |
+
|
| 55 |
+
deprecated = {'pre_run_code_hook': "a callback for the 'pre_execute' or 'pre_run_cell' event",
|
| 56 |
+
'late_startup_hook': "a callback for the 'shell_initialized' event",
|
| 57 |
+
'shutdown_hook': "the atexit module",
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
def editor(self, filename, linenum=None, wait=True):
|
| 61 |
+
"""Open the default editor at the given filename and linenumber.
|
| 62 |
+
|
| 63 |
+
This is IPython's default editor hook, you can use it as an example to
|
| 64 |
+
write your own modified one. To set your own editor function as the
|
| 65 |
+
new editor hook, call ip.set_hook('editor',yourfunc)."""
|
| 66 |
+
|
| 67 |
+
# IPython configures a default editor at startup by reading $EDITOR from
|
| 68 |
+
# the environment, and falling back on vi (unix) or notepad (win32).
|
| 69 |
+
editor = self.editor
|
| 70 |
+
|
| 71 |
+
# marker for at which line to open the file (for existing objects)
|
| 72 |
+
if linenum is None or editor=='notepad':
|
| 73 |
+
linemark = ''
|
| 74 |
+
else:
|
| 75 |
+
linemark = '+%d' % int(linenum)
|
| 76 |
+
|
| 77 |
+
# Enclose in quotes if necessary and legal
|
| 78 |
+
if ' ' in editor and os.path.isfile(editor) and editor[0] != '"':
|
| 79 |
+
editor = '"%s"' % editor
|
| 80 |
+
|
| 81 |
+
# Call the actual editor
|
| 82 |
+
proc = subprocess.Popen('%s %s %s' % (editor, linemark, filename),
|
| 83 |
+
shell=True)
|
| 84 |
+
if wait and proc.wait() != 0:
|
| 85 |
+
raise TryNext()
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
def synchronize_with_editor(self, filename, linenum, column):
|
| 89 |
+
pass
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
class CommandChainDispatcher:
|
| 93 |
+
""" Dispatch calls to a chain of commands until some func can handle it
|
| 94 |
+
|
| 95 |
+
Usage: instantiate, execute "add" to add commands (with optional
|
| 96 |
+
priority), execute normally via f() calling mechanism.
|
| 97 |
+
|
| 98 |
+
"""
|
| 99 |
+
def __init__(self,commands=None):
|
| 100 |
+
if commands is None:
|
| 101 |
+
self.chain = []
|
| 102 |
+
else:
|
| 103 |
+
self.chain = commands
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
def __call__(self,*args, **kw):
|
| 107 |
+
""" Command chain is called just like normal func.
|
| 108 |
+
|
| 109 |
+
This will call all funcs in chain with the same args as were given to
|
| 110 |
+
this function, and return the result of first func that didn't raise
|
| 111 |
+
TryNext"""
|
| 112 |
+
last_exc = TryNext()
|
| 113 |
+
for prio,cmd in self.chain:
|
| 114 |
+
# print("prio",prio,"cmd",cmd) # dbg
|
| 115 |
+
try:
|
| 116 |
+
return cmd(*args, **kw)
|
| 117 |
+
except TryNext as exc:
|
| 118 |
+
last_exc = exc
|
| 119 |
+
# if no function will accept it, raise TryNext up to the caller
|
| 120 |
+
raise last_exc
|
| 121 |
+
|
| 122 |
+
def __str__(self):
|
| 123 |
+
return str(self.chain)
|
| 124 |
+
|
| 125 |
+
def add(self, func, priority=0):
|
| 126 |
+
""" Add a func to the cmd chain with given priority """
|
| 127 |
+
self.chain.append((priority, func))
|
| 128 |
+
self.chain.sort(key=lambda x: x[0])
|
| 129 |
+
|
| 130 |
+
def __iter__(self):
|
| 131 |
+
""" Return all objects in chain.
|
| 132 |
+
|
| 133 |
+
Handy if the objects are not callable.
|
| 134 |
+
"""
|
| 135 |
+
return iter(self.chain)
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
def show_in_pager(self, data, start, screen_lines):
|
| 139 |
+
""" Run a string through pager """
|
| 140 |
+
# raising TryNext here will use the default paging functionality
|
| 141 |
+
raise TryNext
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
def pre_prompt_hook(self):
|
| 145 |
+
""" Run before displaying the next prompt
|
| 146 |
+
|
| 147 |
+
Use this e.g. to display output from asynchronous operations (in order
|
| 148 |
+
to not mess up text entry)
|
| 149 |
+
"""
|
| 150 |
+
|
| 151 |
+
return None
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
def clipboard_get(self):
|
| 155 |
+
""" Get text from the clipboard.
|
| 156 |
+
"""
|
| 157 |
+
from ..lib.clipboard import (
|
| 158 |
+
osx_clipboard_get,
|
| 159 |
+
tkinter_clipboard_get,
|
| 160 |
+
win32_clipboard_get,
|
| 161 |
+
wayland_clipboard_get,
|
| 162 |
+
)
|
| 163 |
+
if sys.platform == 'win32':
|
| 164 |
+
chain = [win32_clipboard_get, tkinter_clipboard_get]
|
| 165 |
+
elif sys.platform == 'darwin':
|
| 166 |
+
chain = [osx_clipboard_get, tkinter_clipboard_get]
|
| 167 |
+
else:
|
| 168 |
+
chain = [wayland_clipboard_get, tkinter_clipboard_get]
|
| 169 |
+
dispatcher = CommandChainDispatcher()
|
| 170 |
+
for func in chain:
|
| 171 |
+
dispatcher.add(func)
|
| 172 |
+
text = dispatcher()
|
| 173 |
+
return text
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/latex_symbols.py
ADDED
|
@@ -0,0 +1,1301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# encoding: utf-8
|
| 2 |
+
|
| 3 |
+
# DO NOT EDIT THIS FILE BY HAND.
|
| 4 |
+
|
| 5 |
+
# To update this file, run the script /tools/gen_latex_symbols.py using Python 3
|
| 6 |
+
|
| 7 |
+
# This file is autogenerated from the file:
|
| 8 |
+
# https://raw.githubusercontent.com/JuliaLang/julia/master/base/latex_symbols.jl
|
| 9 |
+
# This original list is filtered to remove any unicode characters that are not valid
|
| 10 |
+
# Python identifiers.
|
| 11 |
+
|
| 12 |
+
latex_symbols = {
|
| 13 |
+
|
| 14 |
+
"\\euler" : "ℯ",
|
| 15 |
+
"\\^a" : "ᵃ",
|
| 16 |
+
"\\^b" : "ᵇ",
|
| 17 |
+
"\\^c" : "ᶜ",
|
| 18 |
+
"\\^d" : "ᵈ",
|
| 19 |
+
"\\^e" : "ᵉ",
|
| 20 |
+
"\\^f" : "ᶠ",
|
| 21 |
+
"\\^g" : "ᵍ",
|
| 22 |
+
"\\^h" : "ʰ",
|
| 23 |
+
"\\^i" : "ⁱ",
|
| 24 |
+
"\\^j" : "ʲ",
|
| 25 |
+
"\\^k" : "ᵏ",
|
| 26 |
+
"\\^l" : "ˡ",
|
| 27 |
+
"\\^m" : "ᵐ",
|
| 28 |
+
"\\^n" : "ⁿ",
|
| 29 |
+
"\\^o" : "ᵒ",
|
| 30 |
+
"\\^p" : "ᵖ",
|
| 31 |
+
"\\^r" : "ʳ",
|
| 32 |
+
"\\^s" : "ˢ",
|
| 33 |
+
"\\^t" : "ᵗ",
|
| 34 |
+
"\\^u" : "ᵘ",
|
| 35 |
+
"\\^v" : "ᵛ",
|
| 36 |
+
"\\^w" : "ʷ",
|
| 37 |
+
"\\^x" : "ˣ",
|
| 38 |
+
"\\^y" : "ʸ",
|
| 39 |
+
"\\^z" : "ᶻ",
|
| 40 |
+
"\\^A" : "ᴬ",
|
| 41 |
+
"\\^B" : "ᴮ",
|
| 42 |
+
"\\^D" : "ᴰ",
|
| 43 |
+
"\\^E" : "ᴱ",
|
| 44 |
+
"\\^G" : "ᴳ",
|
| 45 |
+
"\\^H" : "ᴴ",
|
| 46 |
+
"\\^I" : "ᴵ",
|
| 47 |
+
"\\^J" : "ᴶ",
|
| 48 |
+
"\\^K" : "ᴷ",
|
| 49 |
+
"\\^L" : "ᴸ",
|
| 50 |
+
"\\^M" : "ᴹ",
|
| 51 |
+
"\\^N" : "ᴺ",
|
| 52 |
+
"\\^O" : "ᴼ",
|
| 53 |
+
"\\^P" : "ᴾ",
|
| 54 |
+
"\\^R" : "ᴿ",
|
| 55 |
+
"\\^T" : "ᵀ",
|
| 56 |
+
"\\^U" : "ᵁ",
|
| 57 |
+
"\\^V" : "ⱽ",
|
| 58 |
+
"\\^W" : "ᵂ",
|
| 59 |
+
"\\^alpha" : "ᵅ",
|
| 60 |
+
"\\^beta" : "ᵝ",
|
| 61 |
+
"\\^gamma" : "ᵞ",
|
| 62 |
+
"\\^delta" : "ᵟ",
|
| 63 |
+
"\\^epsilon" : "ᵋ",
|
| 64 |
+
"\\^theta" : "ᶿ",
|
| 65 |
+
"\\^iota" : "ᶥ",
|
| 66 |
+
"\\^phi" : "ᵠ",
|
| 67 |
+
"\\^chi" : "ᵡ",
|
| 68 |
+
"\\^Phi" : "ᶲ",
|
| 69 |
+
"\\_a" : "ₐ",
|
| 70 |
+
"\\_e" : "ₑ",
|
| 71 |
+
"\\_h" : "ₕ",
|
| 72 |
+
"\\_i" : "ᵢ",
|
| 73 |
+
"\\_j" : "ⱼ",
|
| 74 |
+
"\\_k" : "ₖ",
|
| 75 |
+
"\\_l" : "ₗ",
|
| 76 |
+
"\\_m" : "ₘ",
|
| 77 |
+
"\\_n" : "ₙ",
|
| 78 |
+
"\\_o" : "ₒ",
|
| 79 |
+
"\\_p" : "ₚ",
|
| 80 |
+
"\\_r" : "ᵣ",
|
| 81 |
+
"\\_s" : "ₛ",
|
| 82 |
+
"\\_t" : "ₜ",
|
| 83 |
+
"\\_u" : "ᵤ",
|
| 84 |
+
"\\_v" : "ᵥ",
|
| 85 |
+
"\\_x" : "ₓ",
|
| 86 |
+
"\\_schwa" : "ₔ",
|
| 87 |
+
"\\_beta" : "ᵦ",
|
| 88 |
+
"\\_gamma" : "ᵧ",
|
| 89 |
+
"\\_rho" : "ᵨ",
|
| 90 |
+
"\\_phi" : "ᵩ",
|
| 91 |
+
"\\_chi" : "ᵪ",
|
| 92 |
+
"\\hbar" : "ħ",
|
| 93 |
+
"\\sout" : "̶",
|
| 94 |
+
"\\ordfeminine" : "ª",
|
| 95 |
+
"\\cdotp" : "·",
|
| 96 |
+
"\\ordmasculine" : "º",
|
| 97 |
+
"\\AA" : "Å",
|
| 98 |
+
"\\AE" : "Æ",
|
| 99 |
+
"\\DH" : "Ð",
|
| 100 |
+
"\\O" : "Ø",
|
| 101 |
+
"\\TH" : "Þ",
|
| 102 |
+
"\\ss" : "ß",
|
| 103 |
+
"\\aa" : "å",
|
| 104 |
+
"\\ae" : "æ",
|
| 105 |
+
"\\eth" : "ð",
|
| 106 |
+
"\\dh" : "ð",
|
| 107 |
+
"\\o" : "ø",
|
| 108 |
+
"\\th" : "þ",
|
| 109 |
+
"\\DJ" : "Đ",
|
| 110 |
+
"\\dj" : "đ",
|
| 111 |
+
"\\imath" : "ı",
|
| 112 |
+
"\\jmath" : "ȷ",
|
| 113 |
+
"\\L" : "Ł",
|
| 114 |
+
"\\l" : "ł",
|
| 115 |
+
"\\NG" : "Ŋ",
|
| 116 |
+
"\\ng" : "ŋ",
|
| 117 |
+
"\\OE" : "Œ",
|
| 118 |
+
"\\oe" : "œ",
|
| 119 |
+
"\\hvlig" : "ƕ",
|
| 120 |
+
"\\nrleg" : "ƞ",
|
| 121 |
+
"\\doublepipe" : "ǂ",
|
| 122 |
+
"\\trna" : "ɐ",
|
| 123 |
+
"\\trnsa" : "ɒ",
|
| 124 |
+
"\\openo" : "ɔ",
|
| 125 |
+
"\\rtld" : "ɖ",
|
| 126 |
+
"\\schwa" : "ə",
|
| 127 |
+
"\\varepsilon" : "ε",
|
| 128 |
+
"\\pgamma" : "ɣ",
|
| 129 |
+
"\\pbgam" : "ɤ",
|
| 130 |
+
"\\trnh" : "ɥ",
|
| 131 |
+
"\\btdl" : "ɬ",
|
| 132 |
+
"\\rtll" : "ɭ",
|
| 133 |
+
"\\trnm" : "ɯ",
|
| 134 |
+
"\\trnmlr" : "ɰ",
|
| 135 |
+
"\\ltlmr" : "ɱ",
|
| 136 |
+
"\\ltln" : "ɲ",
|
| 137 |
+
"\\rtln" : "ɳ",
|
| 138 |
+
"\\clomeg" : "ɷ",
|
| 139 |
+
"\\ltphi" : "ɸ",
|
| 140 |
+
"\\trnr" : "ɹ",
|
| 141 |
+
"\\trnrl" : "ɺ",
|
| 142 |
+
"\\rttrnr" : "ɻ",
|
| 143 |
+
"\\rl" : "ɼ",
|
| 144 |
+
"\\rtlr" : "ɽ",
|
| 145 |
+
"\\fhr" : "ɾ",
|
| 146 |
+
"\\rtls" : "ʂ",
|
| 147 |
+
"\\esh" : "ʃ",
|
| 148 |
+
"\\trnt" : "ʇ",
|
| 149 |
+
"\\rtlt" : "ʈ",
|
| 150 |
+
"\\pupsil" : "ʊ",
|
| 151 |
+
"\\pscrv" : "ʋ",
|
| 152 |
+
"\\invv" : "ʌ",
|
| 153 |
+
"\\invw" : "ʍ",
|
| 154 |
+
"\\trny" : "ʎ",
|
| 155 |
+
"\\rtlz" : "ʐ",
|
| 156 |
+
"\\yogh" : "ʒ",
|
| 157 |
+
"\\glst" : "ʔ",
|
| 158 |
+
"\\reglst" : "ʕ",
|
| 159 |
+
"\\inglst" : "ʖ",
|
| 160 |
+
"\\turnk" : "ʞ",
|
| 161 |
+
"\\dyogh" : "ʤ",
|
| 162 |
+
"\\tesh" : "ʧ",
|
| 163 |
+
"\\rasp" : "ʼ",
|
| 164 |
+
"\\verts" : "ˈ",
|
| 165 |
+
"\\verti" : "ˌ",
|
| 166 |
+
"\\lmrk" : "ː",
|
| 167 |
+
"\\hlmrk" : "ˑ",
|
| 168 |
+
"\\grave" : "̀",
|
| 169 |
+
"\\acute" : "́",
|
| 170 |
+
"\\hat" : "̂",
|
| 171 |
+
"\\tilde" : "̃",
|
| 172 |
+
"\\bar" : "̄",
|
| 173 |
+
"\\breve" : "̆",
|
| 174 |
+
"\\dot" : "̇",
|
| 175 |
+
"\\ddot" : "̈",
|
| 176 |
+
"\\ocirc" : "̊",
|
| 177 |
+
"\\H" : "̋",
|
| 178 |
+
"\\check" : "̌",
|
| 179 |
+
"\\palh" : "̡",
|
| 180 |
+
"\\rh" : "̢",
|
| 181 |
+
"\\c" : "̧",
|
| 182 |
+
"\\k" : "̨",
|
| 183 |
+
"\\sbbrg" : "̪",
|
| 184 |
+
"\\strike" : "̶",
|
| 185 |
+
"\\Alpha" : "Α",
|
| 186 |
+
"\\Beta" : "Β",
|
| 187 |
+
"\\Gamma" : "Γ",
|
| 188 |
+
"\\Delta" : "Δ",
|
| 189 |
+
"\\Epsilon" : "Ε",
|
| 190 |
+
"\\Zeta" : "Ζ",
|
| 191 |
+
"\\Eta" : "Η",
|
| 192 |
+
"\\Theta" : "Θ",
|
| 193 |
+
"\\Iota" : "Ι",
|
| 194 |
+
"\\Kappa" : "Κ",
|
| 195 |
+
"\\Lambda" : "Λ",
|
| 196 |
+
"\\Xi" : "Ξ",
|
| 197 |
+
"\\Pi" : "Π",
|
| 198 |
+
"\\Rho" : "Ρ",
|
| 199 |
+
"\\Sigma" : "Σ",
|
| 200 |
+
"\\Tau" : "Τ",
|
| 201 |
+
"\\Upsilon" : "Υ",
|
| 202 |
+
"\\Phi" : "Φ",
|
| 203 |
+
"\\Chi" : "Χ",
|
| 204 |
+
"\\Psi" : "Ψ",
|
| 205 |
+
"\\Omega" : "Ω",
|
| 206 |
+
"\\alpha" : "α",
|
| 207 |
+
"\\beta" : "β",
|
| 208 |
+
"\\gamma" : "γ",
|
| 209 |
+
"\\delta" : "δ",
|
| 210 |
+
"\\zeta" : "ζ",
|
| 211 |
+
"\\eta" : "η",
|
| 212 |
+
"\\theta" : "θ",
|
| 213 |
+
"\\iota" : "ι",
|
| 214 |
+
"\\kappa" : "κ",
|
| 215 |
+
"\\lambda" : "λ",
|
| 216 |
+
"\\mu" : "μ",
|
| 217 |
+
"\\nu" : "ν",
|
| 218 |
+
"\\xi" : "ξ",
|
| 219 |
+
"\\pi" : "π",
|
| 220 |
+
"\\rho" : "ρ",
|
| 221 |
+
"\\varsigma" : "ς",
|
| 222 |
+
"\\sigma" : "σ",
|
| 223 |
+
"\\tau" : "τ",
|
| 224 |
+
"\\upsilon" : "υ",
|
| 225 |
+
"\\varphi" : "φ",
|
| 226 |
+
"\\chi" : "χ",
|
| 227 |
+
"\\psi" : "ψ",
|
| 228 |
+
"\\omega" : "ω",
|
| 229 |
+
"\\vartheta" : "ϑ",
|
| 230 |
+
"\\phi" : "ϕ",
|
| 231 |
+
"\\varpi" : "ϖ",
|
| 232 |
+
"\\Stigma" : "Ϛ",
|
| 233 |
+
"\\Digamma" : "Ϝ",
|
| 234 |
+
"\\digamma" : "ϝ",
|
| 235 |
+
"\\Koppa" : "Ϟ",
|
| 236 |
+
"\\Sampi" : "Ϡ",
|
| 237 |
+
"\\varkappa" : "ϰ",
|
| 238 |
+
"\\varrho" : "ϱ",
|
| 239 |
+
"\\varTheta" : "ϴ",
|
| 240 |
+
"\\epsilon" : "ϵ",
|
| 241 |
+
"\\dddot" : "⃛",
|
| 242 |
+
"\\ddddot" : "⃜",
|
| 243 |
+
"\\hslash" : "ℏ",
|
| 244 |
+
"\\Im" : "ℑ",
|
| 245 |
+
"\\ell" : "ℓ",
|
| 246 |
+
"\\wp" : "℘",
|
| 247 |
+
"\\Re" : "ℜ",
|
| 248 |
+
"\\aleph" : "ℵ",
|
| 249 |
+
"\\beth" : "ℶ",
|
| 250 |
+
"\\gimel" : "ℷ",
|
| 251 |
+
"\\daleth" : "ℸ",
|
| 252 |
+
"\\bbPi" : "ℿ",
|
| 253 |
+
"\\Zbar" : "Ƶ",
|
| 254 |
+
"\\overbar" : "̅",
|
| 255 |
+
"\\ovhook" : "̉",
|
| 256 |
+
"\\candra" : "̐",
|
| 257 |
+
"\\oturnedcomma" : "̒",
|
| 258 |
+
"\\ocommatopright" : "̕",
|
| 259 |
+
"\\droang" : "̚",
|
| 260 |
+
"\\wideutilde" : "̰",
|
| 261 |
+
"\\not" : "̸",
|
| 262 |
+
"\\upMu" : "Μ",
|
| 263 |
+
"\\upNu" : "Ν",
|
| 264 |
+
"\\upOmicron" : "Ο",
|
| 265 |
+
"\\upepsilon" : "ε",
|
| 266 |
+
"\\upomicron" : "ο",
|
| 267 |
+
"\\upvarbeta" : "ϐ",
|
| 268 |
+
"\\upoldKoppa" : "Ϙ",
|
| 269 |
+
"\\upoldkoppa" : "ϙ",
|
| 270 |
+
"\\upstigma" : "ϛ",
|
| 271 |
+
"\\upkoppa" : "ϟ",
|
| 272 |
+
"\\upsampi" : "ϡ",
|
| 273 |
+
"\\tieconcat" : "⁀",
|
| 274 |
+
"\\leftharpoonaccent" : "⃐",
|
| 275 |
+
"\\rightharpoonaccent" : "⃑",
|
| 276 |
+
"\\vertoverlay" : "⃒",
|
| 277 |
+
"\\overleftarrow" : "⃖",
|
| 278 |
+
"\\vec" : "⃗",
|
| 279 |
+
"\\overleftrightarrow" : "⃡",
|
| 280 |
+
"\\annuity" : "⃧",
|
| 281 |
+
"\\threeunderdot" : "⃨",
|
| 282 |
+
"\\widebridgeabove" : "⃩",
|
| 283 |
+
"\\bbC" : "ℂ",
|
| 284 |
+
"\\eulermascheroni" : "ℇ",
|
| 285 |
+
"\\scrg" : "ℊ",
|
| 286 |
+
"\\scrH" : "ℋ",
|
| 287 |
+
"\\frakH" : "ℌ",
|
| 288 |
+
"\\bbH" : "ℍ",
|
| 289 |
+
"\\planck" : "ℎ",
|
| 290 |
+
"\\scrI" : "ℐ",
|
| 291 |
+
"\\scrL" : "ℒ",
|
| 292 |
+
"\\bbN" : "ℕ",
|
| 293 |
+
"\\bbP" : "ℙ",
|
| 294 |
+
"\\bbQ" : "ℚ",
|
| 295 |
+
"\\scrR" : "ℛ",
|
| 296 |
+
"\\bbR" : "ℝ",
|
| 297 |
+
"\\bbZ" : "ℤ",
|
| 298 |
+
"\\frakZ" : "ℨ",
|
| 299 |
+
"\\Angstrom" : "Å",
|
| 300 |
+
"\\scrB" : "ℬ",
|
| 301 |
+
"\\frakC" : "ℭ",
|
| 302 |
+
"\\scre" : "ℯ",
|
| 303 |
+
"\\scrE" : "ℰ",
|
| 304 |
+
"\\scrF" : "ℱ",
|
| 305 |
+
"\\Finv" : "Ⅎ",
|
| 306 |
+
"\\scrM" : "ℳ",
|
| 307 |
+
"\\scro" : "ℴ",
|
| 308 |
+
"\\bbgamma" : "ℽ",
|
| 309 |
+
"\\bbGamma" : "ℾ",
|
| 310 |
+
"\\bbiD" : "ⅅ",
|
| 311 |
+
"\\bbid" : "ⅆ",
|
| 312 |
+
"\\bbie" : "ⅇ",
|
| 313 |
+
"\\bbii" : "ⅈ",
|
| 314 |
+
"\\bbij" : "ⅉ",
|
| 315 |
+
"\\bfA" : "𝐀",
|
| 316 |
+
"\\bfB" : "𝐁",
|
| 317 |
+
"\\bfC" : "𝐂",
|
| 318 |
+
"\\bfD" : "𝐃",
|
| 319 |
+
"\\bfE" : "𝐄",
|
| 320 |
+
"\\bfF" : "𝐅",
|
| 321 |
+
"\\bfG" : "𝐆",
|
| 322 |
+
"\\bfH" : "𝐇",
|
| 323 |
+
"\\bfI" : "𝐈",
|
| 324 |
+
"\\bfJ" : "𝐉",
|
| 325 |
+
"\\bfK" : "𝐊",
|
| 326 |
+
"\\bfL" : "𝐋",
|
| 327 |
+
"\\bfM" : "𝐌",
|
| 328 |
+
"\\bfN" : "𝐍",
|
| 329 |
+
"\\bfO" : "𝐎",
|
| 330 |
+
"\\bfP" : "𝐏",
|
| 331 |
+
"\\bfQ" : "𝐐",
|
| 332 |
+
"\\bfR" : "𝐑",
|
| 333 |
+
"\\bfS" : "𝐒",
|
| 334 |
+
"\\bfT" : "𝐓",
|
| 335 |
+
"\\bfU" : "𝐔",
|
| 336 |
+
"\\bfV" : "𝐕",
|
| 337 |
+
"\\bfW" : "𝐖",
|
| 338 |
+
"\\bfX" : "𝐗",
|
| 339 |
+
"\\bfY" : "𝐘",
|
| 340 |
+
"\\bfZ" : "𝐙",
|
| 341 |
+
"\\bfa" : "𝐚",
|
| 342 |
+
"\\bfb" : "𝐛",
|
| 343 |
+
"\\bfc" : "𝐜",
|
| 344 |
+
"\\bfd" : "𝐝",
|
| 345 |
+
"\\bfe" : "𝐞",
|
| 346 |
+
"\\bff" : "𝐟",
|
| 347 |
+
"\\bfg" : "𝐠",
|
| 348 |
+
"\\bfh" : "𝐡",
|
| 349 |
+
"\\bfi" : "𝐢",
|
| 350 |
+
"\\bfj" : "𝐣",
|
| 351 |
+
"\\bfk" : "𝐤",
|
| 352 |
+
"\\bfl" : "𝐥",
|
| 353 |
+
"\\bfm" : "𝐦",
|
| 354 |
+
"\\bfn" : "𝐧",
|
| 355 |
+
"\\bfo" : "𝐨",
|
| 356 |
+
"\\bfp" : "𝐩",
|
| 357 |
+
"\\bfq" : "𝐪",
|
| 358 |
+
"\\bfr" : "𝐫",
|
| 359 |
+
"\\bfs" : "𝐬",
|
| 360 |
+
"\\bft" : "𝐭",
|
| 361 |
+
"\\bfu" : "𝐮",
|
| 362 |
+
"\\bfv" : "𝐯",
|
| 363 |
+
"\\bfw" : "𝐰",
|
| 364 |
+
"\\bfx" : "𝐱",
|
| 365 |
+
"\\bfy" : "𝐲",
|
| 366 |
+
"\\bfz" : "𝐳",
|
| 367 |
+
"\\itA" : "𝐴",
|
| 368 |
+
"\\itB" : "𝐵",
|
| 369 |
+
"\\itC" : "𝐶",
|
| 370 |
+
"\\itD" : "𝐷",
|
| 371 |
+
"\\itE" : "𝐸",
|
| 372 |
+
"\\itF" : "𝐹",
|
| 373 |
+
"\\itG" : "𝐺",
|
| 374 |
+
"\\itH" : "𝐻",
|
| 375 |
+
"\\itI" : "𝐼",
|
| 376 |
+
"\\itJ" : "𝐽",
|
| 377 |
+
"\\itK" : "𝐾",
|
| 378 |
+
"\\itL" : "𝐿",
|
| 379 |
+
"\\itM" : "𝑀",
|
| 380 |
+
"\\itN" : "𝑁",
|
| 381 |
+
"\\itO" : "𝑂",
|
| 382 |
+
"\\itP" : "𝑃",
|
| 383 |
+
"\\itQ" : "𝑄",
|
| 384 |
+
"\\itR" : "𝑅",
|
| 385 |
+
"\\itS" : "𝑆",
|
| 386 |
+
"\\itT" : "𝑇",
|
| 387 |
+
"\\itU" : "𝑈",
|
| 388 |
+
"\\itV" : "𝑉",
|
| 389 |
+
"\\itW" : "𝑊",
|
| 390 |
+
"\\itX" : "𝑋",
|
| 391 |
+
"\\itY" : "𝑌",
|
| 392 |
+
"\\itZ" : "𝑍",
|
| 393 |
+
"\\ita" : "𝑎",
|
| 394 |
+
"\\itb" : "𝑏",
|
| 395 |
+
"\\itc" : "𝑐",
|
| 396 |
+
"\\itd" : "𝑑",
|
| 397 |
+
"\\ite" : "𝑒",
|
| 398 |
+
"\\itf" : "𝑓",
|
| 399 |
+
"\\itg" : "𝑔",
|
| 400 |
+
"\\iti" : "𝑖",
|
| 401 |
+
"\\itj" : "𝑗",
|
| 402 |
+
"\\itk" : "𝑘",
|
| 403 |
+
"\\itl" : "𝑙",
|
| 404 |
+
"\\itm" : "𝑚",
|
| 405 |
+
"\\itn" : "𝑛",
|
| 406 |
+
"\\ito" : "𝑜",
|
| 407 |
+
"\\itp" : "𝑝",
|
| 408 |
+
"\\itq" : "𝑞",
|
| 409 |
+
"\\itr" : "𝑟",
|
| 410 |
+
"\\its" : "𝑠",
|
| 411 |
+
"\\itt" : "𝑡",
|
| 412 |
+
"\\itu" : "𝑢",
|
| 413 |
+
"\\itv" : "𝑣",
|
| 414 |
+
"\\itw" : "𝑤",
|
| 415 |
+
"\\itx" : "𝑥",
|
| 416 |
+
"\\ity" : "𝑦",
|
| 417 |
+
"\\itz" : "𝑧",
|
| 418 |
+
"\\biA" : "𝑨",
|
| 419 |
+
"\\biB" : "𝑩",
|
| 420 |
+
"\\biC" : "𝑪",
|
| 421 |
+
"\\biD" : "𝑫",
|
| 422 |
+
"\\biE" : "𝑬",
|
| 423 |
+
"\\biF" : "𝑭",
|
| 424 |
+
"\\biG" : "𝑮",
|
| 425 |
+
"\\biH" : "𝑯",
|
| 426 |
+
"\\biI" : "𝑰",
|
| 427 |
+
"\\biJ" : "𝑱",
|
| 428 |
+
"\\biK" : "𝑲",
|
| 429 |
+
"\\biL" : "𝑳",
|
| 430 |
+
"\\biM" : "𝑴",
|
| 431 |
+
"\\biN" : "𝑵",
|
| 432 |
+
"\\biO" : "𝑶",
|
| 433 |
+
"\\biP" : "𝑷",
|
| 434 |
+
"\\biQ" : "𝑸",
|
| 435 |
+
"\\biR" : "𝑹",
|
| 436 |
+
"\\biS" : "𝑺",
|
| 437 |
+
"\\biT" : "𝑻",
|
| 438 |
+
"\\biU" : "𝑼",
|
| 439 |
+
"\\biV" : "𝑽",
|
| 440 |
+
"\\biW" : "𝑾",
|
| 441 |
+
"\\biX" : "𝑿",
|
| 442 |
+
"\\biY" : "𝒀",
|
| 443 |
+
"\\biZ" : "𝒁",
|
| 444 |
+
"\\bia" : "𝒂",
|
| 445 |
+
"\\bib" : "𝒃",
|
| 446 |
+
"\\bic" : "𝒄",
|
| 447 |
+
"\\bid" : "𝒅",
|
| 448 |
+
"\\bie" : "𝒆",
|
| 449 |
+
"\\bif" : "𝒇",
|
| 450 |
+
"\\big" : "𝒈",
|
| 451 |
+
"\\bih" : "𝒉",
|
| 452 |
+
"\\bii" : "𝒊",
|
| 453 |
+
"\\bij" : "𝒋",
|
| 454 |
+
"\\bik" : "𝒌",
|
| 455 |
+
"\\bil" : "𝒍",
|
| 456 |
+
"\\bim" : "𝒎",
|
| 457 |
+
"\\bin" : "𝒏",
|
| 458 |
+
"\\bio" : "𝒐",
|
| 459 |
+
"\\bip" : "𝒑",
|
| 460 |
+
"\\biq" : "𝒒",
|
| 461 |
+
"\\bir" : "𝒓",
|
| 462 |
+
"\\bis" : "𝒔",
|
| 463 |
+
"\\bit" : "𝒕",
|
| 464 |
+
"\\biu" : "𝒖",
|
| 465 |
+
"\\biv" : "𝒗",
|
| 466 |
+
"\\biw" : "𝒘",
|
| 467 |
+
"\\bix" : "𝒙",
|
| 468 |
+
"\\biy" : "𝒚",
|
| 469 |
+
"\\biz" : "𝒛",
|
| 470 |
+
"\\scrA" : "𝒜",
|
| 471 |
+
"\\scrC" : "𝒞",
|
| 472 |
+
"\\scrD" : "𝒟",
|
| 473 |
+
"\\scrG" : "𝒢",
|
| 474 |
+
"\\scrJ" : "𝒥",
|
| 475 |
+
"\\scrK" : "𝒦",
|
| 476 |
+
"\\scrN" : "𝒩",
|
| 477 |
+
"\\scrO" : "𝒪",
|
| 478 |
+
"\\scrP" : "𝒫",
|
| 479 |
+
"\\scrQ" : "𝒬",
|
| 480 |
+
"\\scrS" : "𝒮",
|
| 481 |
+
"\\scrT" : "𝒯",
|
| 482 |
+
"\\scrU" : "𝒰",
|
| 483 |
+
"\\scrV" : "𝒱",
|
| 484 |
+
"\\scrW" : "𝒲",
|
| 485 |
+
"\\scrX" : "𝒳",
|
| 486 |
+
"\\scrY" : "𝒴",
|
| 487 |
+
"\\scrZ" : "𝒵",
|
| 488 |
+
"\\scra" : "𝒶",
|
| 489 |
+
"\\scrb" : "𝒷",
|
| 490 |
+
"\\scrc" : "𝒸",
|
| 491 |
+
"\\scrd" : "𝒹",
|
| 492 |
+
"\\scrf" : "𝒻",
|
| 493 |
+
"\\scrh" : "𝒽",
|
| 494 |
+
"\\scri" : "𝒾",
|
| 495 |
+
"\\scrj" : "𝒿",
|
| 496 |
+
"\\scrk" : "𝓀",
|
| 497 |
+
"\\scrm" : "𝓂",
|
| 498 |
+
"\\scrn" : "𝓃",
|
| 499 |
+
"\\scrp" : "𝓅",
|
| 500 |
+
"\\scrq" : "𝓆",
|
| 501 |
+
"\\scrr" : "𝓇",
|
| 502 |
+
"\\scrs" : "𝓈",
|
| 503 |
+
"\\scrt" : "𝓉",
|
| 504 |
+
"\\scru" : "𝓊",
|
| 505 |
+
"\\scrv" : "𝓋",
|
| 506 |
+
"\\scrw" : "𝓌",
|
| 507 |
+
"\\scrx" : "𝓍",
|
| 508 |
+
"\\scry" : "𝓎",
|
| 509 |
+
"\\scrz" : "𝓏",
|
| 510 |
+
"\\bscrA" : "𝓐",
|
| 511 |
+
"\\bscrB" : "𝓑",
|
| 512 |
+
"\\bscrC" : "𝓒",
|
| 513 |
+
"\\bscrD" : "𝓓",
|
| 514 |
+
"\\bscrE" : "𝓔",
|
| 515 |
+
"\\bscrF" : "𝓕",
|
| 516 |
+
"\\bscrG" : "𝓖",
|
| 517 |
+
"\\bscrH" : "𝓗",
|
| 518 |
+
"\\bscrI" : "𝓘",
|
| 519 |
+
"\\bscrJ" : "𝓙",
|
| 520 |
+
"\\bscrK" : "𝓚",
|
| 521 |
+
"\\bscrL" : "𝓛",
|
| 522 |
+
"\\bscrM" : "𝓜",
|
| 523 |
+
"\\bscrN" : "𝓝",
|
| 524 |
+
"\\bscrO" : "𝓞",
|
| 525 |
+
"\\bscrP" : "𝓟",
|
| 526 |
+
"\\bscrQ" : "𝓠",
|
| 527 |
+
"\\bscrR" : "𝓡",
|
| 528 |
+
"\\bscrS" : "𝓢",
|
| 529 |
+
"\\bscrT" : "𝓣",
|
| 530 |
+
"\\bscrU" : "𝓤",
|
| 531 |
+
"\\bscrV" : "𝓥",
|
| 532 |
+
"\\bscrW" : "𝓦",
|
| 533 |
+
"\\bscrX" : "𝓧",
|
| 534 |
+
"\\bscrY" : "𝓨",
|
| 535 |
+
"\\bscrZ" : "𝓩",
|
| 536 |
+
"\\bscra" : "𝓪",
|
| 537 |
+
"\\bscrb" : "𝓫",
|
| 538 |
+
"\\bscrc" : "𝓬",
|
| 539 |
+
"\\bscrd" : "𝓭",
|
| 540 |
+
"\\bscre" : "𝓮",
|
| 541 |
+
"\\bscrf" : "𝓯",
|
| 542 |
+
"\\bscrg" : "𝓰",
|
| 543 |
+
"\\bscrh" : "𝓱",
|
| 544 |
+
"\\bscri" : "𝓲",
|
| 545 |
+
"\\bscrj" : "𝓳",
|
| 546 |
+
"\\bscrk" : "𝓴",
|
| 547 |
+
"\\bscrl" : "𝓵",
|
| 548 |
+
"\\bscrm" : "𝓶",
|
| 549 |
+
"\\bscrn" : "𝓷",
|
| 550 |
+
"\\bscro" : "𝓸",
|
| 551 |
+
"\\bscrp" : "𝓹",
|
| 552 |
+
"\\bscrq" : "𝓺",
|
| 553 |
+
"\\bscrr" : "𝓻",
|
| 554 |
+
"\\bscrs" : "𝓼",
|
| 555 |
+
"\\bscrt" : "𝓽",
|
| 556 |
+
"\\bscru" : "𝓾",
|
| 557 |
+
"\\bscrv" : "𝓿",
|
| 558 |
+
"\\bscrw" : "𝔀",
|
| 559 |
+
"\\bscrx" : "𝔁",
|
| 560 |
+
"\\bscry" : "𝔂",
|
| 561 |
+
"\\bscrz" : "𝔃",
|
| 562 |
+
"\\frakA" : "𝔄",
|
| 563 |
+
"\\frakB" : "𝔅",
|
| 564 |
+
"\\frakD" : "𝔇",
|
| 565 |
+
"\\frakE" : "𝔈",
|
| 566 |
+
"\\frakF" : "𝔉",
|
| 567 |
+
"\\frakG" : "𝔊",
|
| 568 |
+
"\\frakJ" : "𝔍",
|
| 569 |
+
"\\frakK" : "𝔎",
|
| 570 |
+
"\\frakL" : "𝔏",
|
| 571 |
+
"\\frakM" : "𝔐",
|
| 572 |
+
"\\frakN" : "𝔑",
|
| 573 |
+
"\\frakO" : "𝔒",
|
| 574 |
+
"\\frakP" : "𝔓",
|
| 575 |
+
"\\frakQ" : "𝔔",
|
| 576 |
+
"\\frakS" : "𝔖",
|
| 577 |
+
"\\frakT" : "𝔗",
|
| 578 |
+
"\\frakU" : "𝔘",
|
| 579 |
+
"\\frakV" : "𝔙",
|
| 580 |
+
"\\frakW" : "𝔚",
|
| 581 |
+
"\\frakX" : "𝔛",
|
| 582 |
+
"\\frakY" : "𝔜",
|
| 583 |
+
"\\fraka" : "𝔞",
|
| 584 |
+
"\\frakb" : "𝔟",
|
| 585 |
+
"\\frakc" : "𝔠",
|
| 586 |
+
"\\frakd" : "𝔡",
|
| 587 |
+
"\\frake" : "𝔢",
|
| 588 |
+
"\\frakf" : "𝔣",
|
| 589 |
+
"\\frakg" : "𝔤",
|
| 590 |
+
"\\frakh" : "𝔥",
|
| 591 |
+
"\\fraki" : "𝔦",
|
| 592 |
+
"\\frakj" : "𝔧",
|
| 593 |
+
"\\frakk" : "𝔨",
|
| 594 |
+
"\\frakl" : "𝔩",
|
| 595 |
+
"\\frakm" : "𝔪",
|
| 596 |
+
"\\frakn" : "𝔫",
|
| 597 |
+
"\\frako" : "𝔬",
|
| 598 |
+
"\\frakp" : "𝔭",
|
| 599 |
+
"\\frakq" : "𝔮",
|
| 600 |
+
"\\frakr" : "𝔯",
|
| 601 |
+
"\\fraks" : "𝔰",
|
| 602 |
+
"\\frakt" : "𝔱",
|
| 603 |
+
"\\fraku" : "𝔲",
|
| 604 |
+
"\\frakv" : "𝔳",
|
| 605 |
+
"\\frakw" : "𝔴",
|
| 606 |
+
"\\frakx" : "𝔵",
|
| 607 |
+
"\\fraky" : "𝔶",
|
| 608 |
+
"\\frakz" : "𝔷",
|
| 609 |
+
"\\bbA" : "𝔸",
|
| 610 |
+
"\\bbB" : "𝔹",
|
| 611 |
+
"\\bbD" : "𝔻",
|
| 612 |
+
"\\bbE" : "𝔼",
|
| 613 |
+
"\\bbF" : "𝔽",
|
| 614 |
+
"\\bbG" : "𝔾",
|
| 615 |
+
"\\bbI" : "𝕀",
|
| 616 |
+
"\\bbJ" : "𝕁",
|
| 617 |
+
"\\bbK" : "𝕂",
|
| 618 |
+
"\\bbL" : "𝕃",
|
| 619 |
+
"\\bbM" : "𝕄",
|
| 620 |
+
"\\bbO" : "𝕆",
|
| 621 |
+
"\\bbS" : "𝕊",
|
| 622 |
+
"\\bbT" : "𝕋",
|
| 623 |
+
"\\bbU" : "𝕌",
|
| 624 |
+
"\\bbV" : "𝕍",
|
| 625 |
+
"\\bbW" : "𝕎",
|
| 626 |
+
"\\bbX" : "𝕏",
|
| 627 |
+
"\\bbY" : "𝕐",
|
| 628 |
+
"\\bba" : "𝕒",
|
| 629 |
+
"\\bbb" : "𝕓",
|
| 630 |
+
"\\bbc" : "𝕔",
|
| 631 |
+
"\\bbd" : "𝕕",
|
| 632 |
+
"\\bbe" : "𝕖",
|
| 633 |
+
"\\bbf" : "𝕗",
|
| 634 |
+
"\\bbg" : "𝕘",
|
| 635 |
+
"\\bbh" : "𝕙",
|
| 636 |
+
"\\bbi" : "𝕚",
|
| 637 |
+
"\\bbj" : "𝕛",
|
| 638 |
+
"\\bbk" : "𝕜",
|
| 639 |
+
"\\bbl" : "𝕝",
|
| 640 |
+
"\\bbm" : "𝕞",
|
| 641 |
+
"\\bbn" : "𝕟",
|
| 642 |
+
"\\bbo" : "𝕠",
|
| 643 |
+
"\\bbp" : "𝕡",
|
| 644 |
+
"\\bbq" : "𝕢",
|
| 645 |
+
"\\bbr" : "𝕣",
|
| 646 |
+
"\\bbs" : "𝕤",
|
| 647 |
+
"\\bbt" : "𝕥",
|
| 648 |
+
"\\bbu" : "𝕦",
|
| 649 |
+
"\\bbv" : "𝕧",
|
| 650 |
+
"\\bbw" : "𝕨",
|
| 651 |
+
"\\bbx" : "𝕩",
|
| 652 |
+
"\\bby" : "𝕪",
|
| 653 |
+
"\\bbz" : "𝕫",
|
| 654 |
+
"\\bfrakA" : "𝕬",
|
| 655 |
+
"\\bfrakB" : "𝕭",
|
| 656 |
+
"\\bfrakC" : "𝕮",
|
| 657 |
+
"\\bfrakD" : "𝕯",
|
| 658 |
+
"\\bfrakE" : "𝕰",
|
| 659 |
+
"\\bfrakF" : "𝕱",
|
| 660 |
+
"\\bfrakG" : "𝕲",
|
| 661 |
+
"\\bfrakH" : "𝕳",
|
| 662 |
+
"\\bfrakI" : "𝕴",
|
| 663 |
+
"\\bfrakJ" : "𝕵",
|
| 664 |
+
"\\bfrakK" : "𝕶",
|
| 665 |
+
"\\bfrakL" : "𝕷",
|
| 666 |
+
"\\bfrakM" : "𝕸",
|
| 667 |
+
"\\bfrakN" : "𝕹",
|
| 668 |
+
"\\bfrakO" : "𝕺",
|
| 669 |
+
"\\bfrakP" : "𝕻",
|
| 670 |
+
"\\bfrakQ" : "𝕼",
|
| 671 |
+
"\\bfrakR" : "𝕽",
|
| 672 |
+
"\\bfrakS" : "𝕾",
|
| 673 |
+
"\\bfrakT" : "𝕿",
|
| 674 |
+
"\\bfrakU" : "𝖀",
|
| 675 |
+
"\\bfrakV" : "𝖁",
|
| 676 |
+
"\\bfrakW" : "𝖂",
|
| 677 |
+
"\\bfrakX" : "𝖃",
|
| 678 |
+
"\\bfrakY" : "𝖄",
|
| 679 |
+
"\\bfrakZ" : "𝖅",
|
| 680 |
+
"\\bfraka" : "𝖆",
|
| 681 |
+
"\\bfrakb" : "𝖇",
|
| 682 |
+
"\\bfrakc" : "𝖈",
|
| 683 |
+
"\\bfrakd" : "𝖉",
|
| 684 |
+
"\\bfrake" : "𝖊",
|
| 685 |
+
"\\bfrakf" : "𝖋",
|
| 686 |
+
"\\bfrakg" : "𝖌",
|
| 687 |
+
"\\bfrakh" : "𝖍",
|
| 688 |
+
"\\bfraki" : "𝖎",
|
| 689 |
+
"\\bfrakj" : "𝖏",
|
| 690 |
+
"\\bfrakk" : "𝖐",
|
| 691 |
+
"\\bfrakl" : "𝖑",
|
| 692 |
+
"\\bfrakm" : "𝖒",
|
| 693 |
+
"\\bfrakn" : "𝖓",
|
| 694 |
+
"\\bfrako" : "𝖔",
|
| 695 |
+
"\\bfrakp" : "𝖕",
|
| 696 |
+
"\\bfrakq" : "𝖖",
|
| 697 |
+
"\\bfrakr" : "𝖗",
|
| 698 |
+
"\\bfraks" : "𝖘",
|
| 699 |
+
"\\bfrakt" : "𝖙",
|
| 700 |
+
"\\bfraku" : "𝖚",
|
| 701 |
+
"\\bfrakv" : "𝖛",
|
| 702 |
+
"\\bfrakw" : "𝖜",
|
| 703 |
+
"\\bfrakx" : "𝖝",
|
| 704 |
+
"\\bfraky" : "𝖞",
|
| 705 |
+
"\\bfrakz" : "𝖟",
|
| 706 |
+
"\\sansA" : "𝖠",
|
| 707 |
+
"\\sansB" : "𝖡",
|
| 708 |
+
"\\sansC" : "𝖢",
|
| 709 |
+
"\\sansD" : "𝖣",
|
| 710 |
+
"\\sansE" : "𝖤",
|
| 711 |
+
"\\sansF" : "𝖥",
|
| 712 |
+
"\\sansG" : "𝖦",
|
| 713 |
+
"\\sansH" : "𝖧",
|
| 714 |
+
"\\sansI" : "𝖨",
|
| 715 |
+
"\\sansJ" : "𝖩",
|
| 716 |
+
"\\sansK" : "𝖪",
|
| 717 |
+
"\\sansL" : "𝖫",
|
| 718 |
+
"\\sansM" : "𝖬",
|
| 719 |
+
"\\sansN" : "𝖭",
|
| 720 |
+
"\\sansO" : "𝖮",
|
| 721 |
+
"\\sansP" : "𝖯",
|
| 722 |
+
"\\sansQ" : "𝖰",
|
| 723 |
+
"\\sansR" : "𝖱",
|
| 724 |
+
"\\sansS" : "𝖲",
|
| 725 |
+
"\\sansT" : "𝖳",
|
| 726 |
+
"\\sansU" : "𝖴",
|
| 727 |
+
"\\sansV" : "𝖵",
|
| 728 |
+
"\\sansW" : "𝖶",
|
| 729 |
+
"\\sansX" : "𝖷",
|
| 730 |
+
"\\sansY" : "𝖸",
|
| 731 |
+
"\\sansZ" : "𝖹",
|
| 732 |
+
"\\sansa" : "𝖺",
|
| 733 |
+
"\\sansb" : "𝖻",
|
| 734 |
+
"\\sansc" : "𝖼",
|
| 735 |
+
"\\sansd" : "𝖽",
|
| 736 |
+
"\\sanse" : "𝖾",
|
| 737 |
+
"\\sansf" : "𝖿",
|
| 738 |
+
"\\sansg" : "𝗀",
|
| 739 |
+
"\\sansh" : "𝗁",
|
| 740 |
+
"\\sansi" : "𝗂",
|
| 741 |
+
"\\sansj" : "𝗃",
|
| 742 |
+
"\\sansk" : "𝗄",
|
| 743 |
+
"\\sansl" : "𝗅",
|
| 744 |
+
"\\sansm" : "𝗆",
|
| 745 |
+
"\\sansn" : "𝗇",
|
| 746 |
+
"\\sanso" : "𝗈",
|
| 747 |
+
"\\sansp" : "𝗉",
|
| 748 |
+
"\\sansq" : "𝗊",
|
| 749 |
+
"\\sansr" : "𝗋",
|
| 750 |
+
"\\sanss" : "𝗌",
|
| 751 |
+
"\\sanst" : "𝗍",
|
| 752 |
+
"\\sansu" : "𝗎",
|
| 753 |
+
"\\sansv" : "𝗏",
|
| 754 |
+
"\\sansw" : "𝗐",
|
| 755 |
+
"\\sansx" : "𝗑",
|
| 756 |
+
"\\sansy" : "𝗒",
|
| 757 |
+
"\\sansz" : "𝗓",
|
| 758 |
+
"\\bsansA" : "𝗔",
|
| 759 |
+
"\\bsansB" : "𝗕",
|
| 760 |
+
"\\bsansC" : "𝗖",
|
| 761 |
+
"\\bsansD" : "𝗗",
|
| 762 |
+
"\\bsansE" : "𝗘",
|
| 763 |
+
"\\bsansF" : "𝗙",
|
| 764 |
+
"\\bsansG" : "𝗚",
|
| 765 |
+
"\\bsansH" : "𝗛",
|
| 766 |
+
"\\bsansI" : "𝗜",
|
| 767 |
+
"\\bsansJ" : "𝗝",
|
| 768 |
+
"\\bsansK" : "𝗞",
|
| 769 |
+
"\\bsansL" : "𝗟",
|
| 770 |
+
"\\bsansM" : "𝗠",
|
| 771 |
+
"\\bsansN" : "𝗡",
|
| 772 |
+
"\\bsansO" : "𝗢",
|
| 773 |
+
"\\bsansP" : "𝗣",
|
| 774 |
+
"\\bsansQ" : "𝗤",
|
| 775 |
+
"\\bsansR" : "𝗥",
|
| 776 |
+
"\\bsansS" : "𝗦",
|
| 777 |
+
"\\bsansT" : "𝗧",
|
| 778 |
+
"\\bsansU" : "𝗨",
|
| 779 |
+
"\\bsansV" : "𝗩",
|
| 780 |
+
"\\bsansW" : "𝗪",
|
| 781 |
+
"\\bsansX" : "𝗫",
|
| 782 |
+
"\\bsansY" : "𝗬",
|
| 783 |
+
"\\bsansZ" : "𝗭",
|
| 784 |
+
"\\bsansa" : "𝗮",
|
| 785 |
+
"\\bsansb" : "𝗯",
|
| 786 |
+
"\\bsansc" : "𝗰",
|
| 787 |
+
"\\bsansd" : "𝗱",
|
| 788 |
+
"\\bsanse" : "𝗲",
|
| 789 |
+
"\\bsansf" : "𝗳",
|
| 790 |
+
"\\bsansg" : "𝗴",
|
| 791 |
+
"\\bsansh" : "𝗵",
|
| 792 |
+
"\\bsansi" : "𝗶",
|
| 793 |
+
"\\bsansj" : "𝗷",
|
| 794 |
+
"\\bsansk" : "𝗸",
|
| 795 |
+
"\\bsansl" : "𝗹",
|
| 796 |
+
"\\bsansm" : "𝗺",
|
| 797 |
+
"\\bsansn" : "𝗻",
|
| 798 |
+
"\\bsanso" : "𝗼",
|
| 799 |
+
"\\bsansp" : "𝗽",
|
| 800 |
+
"\\bsansq" : "𝗾",
|
| 801 |
+
"\\bsansr" : "𝗿",
|
| 802 |
+
"\\bsanss" : "𝘀",
|
| 803 |
+
"\\bsanst" : "𝘁",
|
| 804 |
+
"\\bsansu" : "𝘂",
|
| 805 |
+
"\\bsansv" : "𝘃",
|
| 806 |
+
"\\bsansw" : "𝘄",
|
| 807 |
+
"\\bsansx" : "𝘅",
|
| 808 |
+
"\\bsansy" : "𝘆",
|
| 809 |
+
"\\bsansz" : "𝘇",
|
| 810 |
+
"\\isansA" : "𝘈",
|
| 811 |
+
"\\isansB" : "𝘉",
|
| 812 |
+
"\\isansC" : "𝘊",
|
| 813 |
+
"\\isansD" : "𝘋",
|
| 814 |
+
"\\isansE" : "𝘌",
|
| 815 |
+
"\\isansF" : "𝘍",
|
| 816 |
+
"\\isansG" : "𝘎",
|
| 817 |
+
"\\isansH" : "𝘏",
|
| 818 |
+
"\\isansI" : "𝘐",
|
| 819 |
+
"\\isansJ" : "𝘑",
|
| 820 |
+
"\\isansK" : "𝘒",
|
| 821 |
+
"\\isansL" : "𝘓",
|
| 822 |
+
"\\isansM" : "𝘔",
|
| 823 |
+
"\\isansN" : "𝘕",
|
| 824 |
+
"\\isansO" : "𝘖",
|
| 825 |
+
"\\isansP" : "𝘗",
|
| 826 |
+
"\\isansQ" : "𝘘",
|
| 827 |
+
"\\isansR" : "𝘙",
|
| 828 |
+
"\\isansS" : "𝘚",
|
| 829 |
+
"\\isansT" : "𝘛",
|
| 830 |
+
"\\isansU" : "𝘜",
|
| 831 |
+
"\\isansV" : "𝘝",
|
| 832 |
+
"\\isansW" : "𝘞",
|
| 833 |
+
"\\isansX" : "𝘟",
|
| 834 |
+
"\\isansY" : "𝘠",
|
| 835 |
+
"\\isansZ" : "𝘡",
|
| 836 |
+
"\\isansa" : "𝘢",
|
| 837 |
+
"\\isansb" : "𝘣",
|
| 838 |
+
"\\isansc" : "𝘤",
|
| 839 |
+
"\\isansd" : "𝘥",
|
| 840 |
+
"\\isanse" : "𝘦",
|
| 841 |
+
"\\isansf" : "𝘧",
|
| 842 |
+
"\\isansg" : "𝘨",
|
| 843 |
+
"\\isansh" : "𝘩",
|
| 844 |
+
"\\isansi" : "𝘪",
|
| 845 |
+
"\\isansj" : "𝘫",
|
| 846 |
+
"\\isansk" : "𝘬",
|
| 847 |
+
"\\isansl" : "𝘭",
|
| 848 |
+
"\\isansm" : "𝘮",
|
| 849 |
+
"\\isansn" : "𝘯",
|
| 850 |
+
"\\isanso" : "𝘰",
|
| 851 |
+
"\\isansp" : "𝘱",
|
| 852 |
+
"\\isansq" : "𝘲",
|
| 853 |
+
"\\isansr" : "𝘳",
|
| 854 |
+
"\\isanss" : "𝘴",
|
| 855 |
+
"\\isanst" : "𝘵",
|
| 856 |
+
"\\isansu" : "𝘶",
|
| 857 |
+
"\\isansv" : "𝘷",
|
| 858 |
+
"\\isansw" : "𝘸",
|
| 859 |
+
"\\isansx" : "𝘹",
|
| 860 |
+
"\\isansy" : "𝘺",
|
| 861 |
+
"\\isansz" : "𝘻",
|
| 862 |
+
"\\bisansA" : "𝘼",
|
| 863 |
+
"\\bisansB" : "𝘽",
|
| 864 |
+
"\\bisansC" : "𝘾",
|
| 865 |
+
"\\bisansD" : "𝘿",
|
| 866 |
+
"\\bisansE" : "𝙀",
|
| 867 |
+
"\\bisansF" : "𝙁",
|
| 868 |
+
"\\bisansG" : "𝙂",
|
| 869 |
+
"\\bisansH" : "𝙃",
|
| 870 |
+
"\\bisansI" : "𝙄",
|
| 871 |
+
"\\bisansJ" : "𝙅",
|
| 872 |
+
"\\bisansK" : "𝙆",
|
| 873 |
+
"\\bisansL" : "𝙇",
|
| 874 |
+
"\\bisansM" : "𝙈",
|
| 875 |
+
"\\bisansN" : "𝙉",
|
| 876 |
+
"\\bisansO" : "𝙊",
|
| 877 |
+
"\\bisansP" : "𝙋",
|
| 878 |
+
"\\bisansQ" : "𝙌",
|
| 879 |
+
"\\bisansR" : "𝙍",
|
| 880 |
+
"\\bisansS" : "𝙎",
|
| 881 |
+
"\\bisansT" : "𝙏",
|
| 882 |
+
"\\bisansU" : "𝙐",
|
| 883 |
+
"\\bisansV" : "𝙑",
|
| 884 |
+
"\\bisansW" : "𝙒",
|
| 885 |
+
"\\bisansX" : "𝙓",
|
| 886 |
+
"\\bisansY" : "𝙔",
|
| 887 |
+
"\\bisansZ" : "𝙕",
|
| 888 |
+
"\\bisansa" : "𝙖",
|
| 889 |
+
"\\bisansb" : "𝙗",
|
| 890 |
+
"\\bisansc" : "𝙘",
|
| 891 |
+
"\\bisansd" : "𝙙",
|
| 892 |
+
"\\bisanse" : "𝙚",
|
| 893 |
+
"\\bisansf" : "𝙛",
|
| 894 |
+
"\\bisansg" : "𝙜",
|
| 895 |
+
"\\bisansh" : "𝙝",
|
| 896 |
+
"\\bisansi" : "𝙞",
|
| 897 |
+
"\\bisansj" : "𝙟",
|
| 898 |
+
"\\bisansk" : "𝙠",
|
| 899 |
+
"\\bisansl" : "𝙡",
|
| 900 |
+
"\\bisansm" : "𝙢",
|
| 901 |
+
"\\bisansn" : "𝙣",
|
| 902 |
+
"\\bisanso" : "𝙤",
|
| 903 |
+
"\\bisansp" : "𝙥",
|
| 904 |
+
"\\bisansq" : "𝙦",
|
| 905 |
+
"\\bisansr" : "𝙧",
|
| 906 |
+
"\\bisanss" : "𝙨",
|
| 907 |
+
"\\bisanst" : "𝙩",
|
| 908 |
+
"\\bisansu" : "𝙪",
|
| 909 |
+
"\\bisansv" : "𝙫",
|
| 910 |
+
"\\bisansw" : "𝙬",
|
| 911 |
+
"\\bisansx" : "𝙭",
|
| 912 |
+
"\\bisansy" : "𝙮",
|
| 913 |
+
"\\bisansz" : "𝙯",
|
| 914 |
+
"\\ttA" : "𝙰",
|
| 915 |
+
"\\ttB" : "𝙱",
|
| 916 |
+
"\\ttC" : "𝙲",
|
| 917 |
+
"\\ttD" : "𝙳",
|
| 918 |
+
"\\ttE" : "𝙴",
|
| 919 |
+
"\\ttF" : "𝙵",
|
| 920 |
+
"\\ttG" : "𝙶",
|
| 921 |
+
"\\ttH" : "𝙷",
|
| 922 |
+
"\\ttI" : "𝙸",
|
| 923 |
+
"\\ttJ" : "𝙹",
|
| 924 |
+
"\\ttK" : "𝙺",
|
| 925 |
+
"\\ttL" : "𝙻",
|
| 926 |
+
"\\ttM" : "𝙼",
|
| 927 |
+
"\\ttN" : "𝙽",
|
| 928 |
+
"\\ttO" : "𝙾",
|
| 929 |
+
"\\ttP" : "𝙿",
|
| 930 |
+
"\\ttQ" : "𝚀",
|
| 931 |
+
"\\ttR" : "𝚁",
|
| 932 |
+
"\\ttS" : "𝚂",
|
| 933 |
+
"\\ttT" : "𝚃",
|
| 934 |
+
"\\ttU" : "𝚄",
|
| 935 |
+
"\\ttV" : "𝚅",
|
| 936 |
+
"\\ttW" : "𝚆",
|
| 937 |
+
"\\ttX" : "𝚇",
|
| 938 |
+
"\\ttY" : "𝚈",
|
| 939 |
+
"\\ttZ" : "𝚉",
|
| 940 |
+
"\\tta" : "𝚊",
|
| 941 |
+
"\\ttb" : "𝚋",
|
| 942 |
+
"\\ttc" : "𝚌",
|
| 943 |
+
"\\ttd" : "𝚍",
|
| 944 |
+
"\\tte" : "𝚎",
|
| 945 |
+
"\\ttf" : "𝚏",
|
| 946 |
+
"\\ttg" : "𝚐",
|
| 947 |
+
"\\tth" : "𝚑",
|
| 948 |
+
"\\tti" : "𝚒",
|
| 949 |
+
"\\ttj" : "𝚓",
|
| 950 |
+
"\\ttk" : "𝚔",
|
| 951 |
+
"\\ttl" : "𝚕",
|
| 952 |
+
"\\ttm" : "𝚖",
|
| 953 |
+
"\\ttn" : "𝚗",
|
| 954 |
+
"\\tto" : "𝚘",
|
| 955 |
+
"\\ttp" : "𝚙",
|
| 956 |
+
"\\ttq" : "𝚚",
|
| 957 |
+
"\\ttr" : "𝚛",
|
| 958 |
+
"\\tts" : "𝚜",
|
| 959 |
+
"\\ttt" : "𝚝",
|
| 960 |
+
"\\ttu" : "𝚞",
|
| 961 |
+
"\\ttv" : "𝚟",
|
| 962 |
+
"\\ttw" : "𝚠",
|
| 963 |
+
"\\ttx" : "𝚡",
|
| 964 |
+
"\\tty" : "𝚢",
|
| 965 |
+
"\\ttz" : "𝚣",
|
| 966 |
+
"\\bfAlpha" : "𝚨",
|
| 967 |
+
"\\bfBeta" : "𝚩",
|
| 968 |
+
"\\bfGamma" : "𝚪",
|
| 969 |
+
"\\bfDelta" : "𝚫",
|
| 970 |
+
"\\bfEpsilon" : "𝚬",
|
| 971 |
+
"\\bfZeta" : "𝚭",
|
| 972 |
+
"\\bfEta" : "𝚮",
|
| 973 |
+
"\\bfTheta" : "𝚯",
|
| 974 |
+
"\\bfIota" : "𝚰",
|
| 975 |
+
"\\bfKappa" : "𝚱",
|
| 976 |
+
"\\bfLambda" : "𝚲",
|
| 977 |
+
"\\bfMu" : "𝚳",
|
| 978 |
+
"\\bfNu" : "𝚴",
|
| 979 |
+
"\\bfXi" : "𝚵",
|
| 980 |
+
"\\bfOmicron" : "𝚶",
|
| 981 |
+
"\\bfPi" : "𝚷",
|
| 982 |
+
"\\bfRho" : "𝚸",
|
| 983 |
+
"\\bfvarTheta" : "𝚹",
|
| 984 |
+
"\\bfSigma" : "𝚺",
|
| 985 |
+
"\\bfTau" : "𝚻",
|
| 986 |
+
"\\bfUpsilon" : "𝚼",
|
| 987 |
+
"\\bfPhi" : "𝚽",
|
| 988 |
+
"\\bfChi" : "𝚾",
|
| 989 |
+
"\\bfPsi" : "𝚿",
|
| 990 |
+
"\\bfOmega" : "𝛀",
|
| 991 |
+
"\\bfalpha" : "𝛂",
|
| 992 |
+
"\\bfbeta" : "𝛃",
|
| 993 |
+
"\\bfgamma" : "𝛄",
|
| 994 |
+
"\\bfdelta" : "𝛅",
|
| 995 |
+
"\\bfepsilon" : "𝛆",
|
| 996 |
+
"\\bfzeta" : "𝛇",
|
| 997 |
+
"\\bfeta" : "𝛈",
|
| 998 |
+
"\\bftheta" : "𝛉",
|
| 999 |
+
"\\bfiota" : "𝛊",
|
| 1000 |
+
"\\bfkappa" : "𝛋",
|
| 1001 |
+
"\\bflambda" : "𝛌",
|
| 1002 |
+
"\\bfmu" : "𝛍",
|
| 1003 |
+
"\\bfnu" : "𝛎",
|
| 1004 |
+
"\\bfxi" : "𝛏",
|
| 1005 |
+
"\\bfomicron" : "𝛐",
|
| 1006 |
+
"\\bfpi" : "𝛑",
|
| 1007 |
+
"\\bfrho" : "𝛒",
|
| 1008 |
+
"\\bfvarsigma" : "𝛓",
|
| 1009 |
+
"\\bfsigma" : "𝛔",
|
| 1010 |
+
"\\bftau" : "𝛕",
|
| 1011 |
+
"\\bfupsilon" : "𝛖",
|
| 1012 |
+
"\\bfvarphi" : "𝛗",
|
| 1013 |
+
"\\bfchi" : "𝛘",
|
| 1014 |
+
"\\bfpsi" : "𝛙",
|
| 1015 |
+
"\\bfomega" : "𝛚",
|
| 1016 |
+
"\\bfvarepsilon" : "𝛜",
|
| 1017 |
+
"\\bfvartheta" : "𝛝",
|
| 1018 |
+
"\\bfvarkappa" : "𝛞",
|
| 1019 |
+
"\\bfphi" : "𝛟",
|
| 1020 |
+
"\\bfvarrho" : "𝛠",
|
| 1021 |
+
"\\bfvarpi" : "𝛡",
|
| 1022 |
+
"\\itAlpha" : "𝛢",
|
| 1023 |
+
"\\itBeta" : "𝛣",
|
| 1024 |
+
"\\itGamma" : "𝛤",
|
| 1025 |
+
"\\itDelta" : "𝛥",
|
| 1026 |
+
"\\itEpsilon" : "𝛦",
|
| 1027 |
+
"\\itZeta" : "𝛧",
|
| 1028 |
+
"\\itEta" : "𝛨",
|
| 1029 |
+
"\\itTheta" : "𝛩",
|
| 1030 |
+
"\\itIota" : "𝛪",
|
| 1031 |
+
"\\itKappa" : "𝛫",
|
| 1032 |
+
"\\itLambda" : "𝛬",
|
| 1033 |
+
"\\itMu" : "𝛭",
|
| 1034 |
+
"\\itNu" : "𝛮",
|
| 1035 |
+
"\\itXi" : "𝛯",
|
| 1036 |
+
"\\itOmicron" : "𝛰",
|
| 1037 |
+
"\\itPi" : "𝛱",
|
| 1038 |
+
"\\itRho" : "𝛲",
|
| 1039 |
+
"\\itvarTheta" : "𝛳",
|
| 1040 |
+
"\\itSigma" : "𝛴",
|
| 1041 |
+
"\\itTau" : "𝛵",
|
| 1042 |
+
"\\itUpsilon" : "𝛶",
|
| 1043 |
+
"\\itPhi" : "𝛷",
|
| 1044 |
+
"\\itChi" : "𝛸",
|
| 1045 |
+
"\\itPsi" : "𝛹",
|
| 1046 |
+
"\\itOmega" : "𝛺",
|
| 1047 |
+
"\\italpha" : "𝛼",
|
| 1048 |
+
"\\itbeta" : "𝛽",
|
| 1049 |
+
"\\itgamma" : "𝛾",
|
| 1050 |
+
"\\itdelta" : "𝛿",
|
| 1051 |
+
"\\itepsilon" : "𝜀",
|
| 1052 |
+
"\\itzeta" : "𝜁",
|
| 1053 |
+
"\\iteta" : "𝜂",
|
| 1054 |
+
"\\ittheta" : "𝜃",
|
| 1055 |
+
"\\itiota" : "𝜄",
|
| 1056 |
+
"\\itkappa" : "𝜅",
|
| 1057 |
+
"\\itlambda" : "𝜆",
|
| 1058 |
+
"\\itmu" : "𝜇",
|
| 1059 |
+
"\\itnu" : "𝜈",
|
| 1060 |
+
"\\itxi" : "𝜉",
|
| 1061 |
+
"\\itomicron" : "𝜊",
|
| 1062 |
+
"\\itpi" : "𝜋",
|
| 1063 |
+
"\\itrho" : "𝜌",
|
| 1064 |
+
"\\itvarsigma" : "𝜍",
|
| 1065 |
+
"\\itsigma" : "𝜎",
|
| 1066 |
+
"\\ittau" : "𝜏",
|
| 1067 |
+
"\\itupsilon" : "𝜐",
|
| 1068 |
+
"\\itphi" : "𝜑",
|
| 1069 |
+
"\\itchi" : "𝜒",
|
| 1070 |
+
"\\itpsi" : "𝜓",
|
| 1071 |
+
"\\itomega" : "𝜔",
|
| 1072 |
+
"\\itvarepsilon" : "𝜖",
|
| 1073 |
+
"\\itvartheta" : "𝜗",
|
| 1074 |
+
"\\itvarkappa" : "𝜘",
|
| 1075 |
+
"\\itvarphi" : "𝜙",
|
| 1076 |
+
"\\itvarrho" : "𝜚",
|
| 1077 |
+
"\\itvarpi" : "𝜛",
|
| 1078 |
+
"\\biAlpha" : "𝜜",
|
| 1079 |
+
"\\biBeta" : "𝜝",
|
| 1080 |
+
"\\biGamma" : "𝜞",
|
| 1081 |
+
"\\biDelta" : "𝜟",
|
| 1082 |
+
"\\biEpsilon" : "𝜠",
|
| 1083 |
+
"\\biZeta" : "𝜡",
|
| 1084 |
+
"\\biEta" : "𝜢",
|
| 1085 |
+
"\\biTheta" : "𝜣",
|
| 1086 |
+
"\\biIota" : "𝜤",
|
| 1087 |
+
"\\biKappa" : "𝜥",
|
| 1088 |
+
"\\biLambda" : "𝜦",
|
| 1089 |
+
"\\biMu" : "𝜧",
|
| 1090 |
+
"\\biNu" : "𝜨",
|
| 1091 |
+
"\\biXi" : "𝜩",
|
| 1092 |
+
"\\biOmicron" : "𝜪",
|
| 1093 |
+
"\\biPi" : "𝜫",
|
| 1094 |
+
"\\biRho" : "𝜬",
|
| 1095 |
+
"\\bivarTheta" : "𝜭",
|
| 1096 |
+
"\\biSigma" : "𝜮",
|
| 1097 |
+
"\\biTau" : "𝜯",
|
| 1098 |
+
"\\biUpsilon" : "𝜰",
|
| 1099 |
+
"\\biPhi" : "𝜱",
|
| 1100 |
+
"\\biChi" : "𝜲",
|
| 1101 |
+
"\\biPsi" : "𝜳",
|
| 1102 |
+
"\\biOmega" : "𝜴",
|
| 1103 |
+
"\\bialpha" : "𝜶",
|
| 1104 |
+
"\\bibeta" : "𝜷",
|
| 1105 |
+
"\\bigamma" : "𝜸",
|
| 1106 |
+
"\\bidelta" : "𝜹",
|
| 1107 |
+
"\\biepsilon" : "𝜺",
|
| 1108 |
+
"\\bizeta" : "𝜻",
|
| 1109 |
+
"\\bieta" : "𝜼",
|
| 1110 |
+
"\\bitheta" : "𝜽",
|
| 1111 |
+
"\\biiota" : "𝜾",
|
| 1112 |
+
"\\bikappa" : "𝜿",
|
| 1113 |
+
"\\bilambda" : "𝝀",
|
| 1114 |
+
"\\bimu" : "𝝁",
|
| 1115 |
+
"\\binu" : "𝝂",
|
| 1116 |
+
"\\bixi" : "𝝃",
|
| 1117 |
+
"\\biomicron" : "𝝄",
|
| 1118 |
+
"\\bipi" : "𝝅",
|
| 1119 |
+
"\\birho" : "𝝆",
|
| 1120 |
+
"\\bivarsigma" : "𝝇",
|
| 1121 |
+
"\\bisigma" : "𝝈",
|
| 1122 |
+
"\\bitau" : "𝝉",
|
| 1123 |
+
"\\biupsilon" : "𝝊",
|
| 1124 |
+
"\\biphi" : "𝝋",
|
| 1125 |
+
"\\bichi" : "𝝌",
|
| 1126 |
+
"\\bipsi" : "𝝍",
|
| 1127 |
+
"\\biomega" : "𝝎",
|
| 1128 |
+
"\\bivarepsilon" : "𝝐",
|
| 1129 |
+
"\\bivartheta" : "𝝑",
|
| 1130 |
+
"\\bivarkappa" : "𝝒",
|
| 1131 |
+
"\\bivarphi" : "𝝓",
|
| 1132 |
+
"\\bivarrho" : "𝝔",
|
| 1133 |
+
"\\bivarpi" : "𝝕",
|
| 1134 |
+
"\\bsansAlpha" : "𝝖",
|
| 1135 |
+
"\\bsansBeta" : "𝝗",
|
| 1136 |
+
"\\bsansGamma" : "𝝘",
|
| 1137 |
+
"\\bsansDelta" : "𝝙",
|
| 1138 |
+
"\\bsansEpsilon" : "𝝚",
|
| 1139 |
+
"\\bsansZeta" : "𝝛",
|
| 1140 |
+
"\\bsansEta" : "𝝜",
|
| 1141 |
+
"\\bsansTheta" : "𝝝",
|
| 1142 |
+
"\\bsansIota" : "𝝞",
|
| 1143 |
+
"\\bsansKappa" : "𝝟",
|
| 1144 |
+
"\\bsansLambda" : "𝝠",
|
| 1145 |
+
"\\bsansMu" : "𝝡",
|
| 1146 |
+
"\\bsansNu" : "𝝢",
|
| 1147 |
+
"\\bsansXi" : "𝝣",
|
| 1148 |
+
"\\bsansOmicron" : "𝝤",
|
| 1149 |
+
"\\bsansPi" : "𝝥",
|
| 1150 |
+
"\\bsansRho" : "𝝦",
|
| 1151 |
+
"\\bsansvarTheta" : "𝝧",
|
| 1152 |
+
"\\bsansSigma" : "𝝨",
|
| 1153 |
+
"\\bsansTau" : "𝝩",
|
| 1154 |
+
"\\bsansUpsilon" : "𝝪",
|
| 1155 |
+
"\\bsansPhi" : "𝝫",
|
| 1156 |
+
"\\bsansChi" : "𝝬",
|
| 1157 |
+
"\\bsansPsi" : "𝝭",
|
| 1158 |
+
"\\bsansOmega" : "𝝮",
|
| 1159 |
+
"\\bsansalpha" : "𝝰",
|
| 1160 |
+
"\\bsansbeta" : "𝝱",
|
| 1161 |
+
"\\bsansgamma" : "𝝲",
|
| 1162 |
+
"\\bsansdelta" : "𝝳",
|
| 1163 |
+
"\\bsansepsilon" : "𝝴",
|
| 1164 |
+
"\\bsanszeta" : "𝝵",
|
| 1165 |
+
"\\bsanseta" : "𝝶",
|
| 1166 |
+
"\\bsanstheta" : "𝝷",
|
| 1167 |
+
"\\bsansiota" : "𝝸",
|
| 1168 |
+
"\\bsanskappa" : "𝝹",
|
| 1169 |
+
"\\bsanslambda" : "𝝺",
|
| 1170 |
+
"\\bsansmu" : "𝝻",
|
| 1171 |
+
"\\bsansnu" : "𝝼",
|
| 1172 |
+
"\\bsansxi" : "𝝽",
|
| 1173 |
+
"\\bsansomicron" : "𝝾",
|
| 1174 |
+
"\\bsanspi" : "𝝿",
|
| 1175 |
+
"\\bsansrho" : "𝞀",
|
| 1176 |
+
"\\bsansvarsigma" : "𝞁",
|
| 1177 |
+
"\\bsanssigma" : "𝞂",
|
| 1178 |
+
"\\bsanstau" : "𝞃",
|
| 1179 |
+
"\\bsansupsilon" : "𝞄",
|
| 1180 |
+
"\\bsansphi" : "𝞅",
|
| 1181 |
+
"\\bsanschi" : "𝞆",
|
| 1182 |
+
"\\bsanspsi" : "𝞇",
|
| 1183 |
+
"\\bsansomega" : "𝞈",
|
| 1184 |
+
"\\bsansvarepsilon" : "𝞊",
|
| 1185 |
+
"\\bsansvartheta" : "𝞋",
|
| 1186 |
+
"\\bsansvarkappa" : "𝞌",
|
| 1187 |
+
"\\bsansvarphi" : "𝞍",
|
| 1188 |
+
"\\bsansvarrho" : "𝞎",
|
| 1189 |
+
"\\bsansvarpi" : "𝞏",
|
| 1190 |
+
"\\bisansAlpha" : "𝞐",
|
| 1191 |
+
"\\bisansBeta" : "𝞑",
|
| 1192 |
+
"\\bisansGamma" : "𝞒",
|
| 1193 |
+
"\\bisansDelta" : "𝞓",
|
| 1194 |
+
"\\bisansEpsilon" : "𝞔",
|
| 1195 |
+
"\\bisansZeta" : "𝞕",
|
| 1196 |
+
"\\bisansEta" : "𝞖",
|
| 1197 |
+
"\\bisansTheta" : "𝞗",
|
| 1198 |
+
"\\bisansIota" : "𝞘",
|
| 1199 |
+
"\\bisansKappa" : "𝞙",
|
| 1200 |
+
"\\bisansLambda" : "𝞚",
|
| 1201 |
+
"\\bisansMu" : "𝞛",
|
| 1202 |
+
"\\bisansNu" : "𝞜",
|
| 1203 |
+
"\\bisansXi" : "𝞝",
|
| 1204 |
+
"\\bisansOmicron" : "𝞞",
|
| 1205 |
+
"\\bisansPi" : "𝞟",
|
| 1206 |
+
"\\bisansRho" : "𝞠",
|
| 1207 |
+
"\\bisansvarTheta" : "𝞡",
|
| 1208 |
+
"\\bisansSigma" : "𝞢",
|
| 1209 |
+
"\\bisansTau" : "𝞣",
|
| 1210 |
+
"\\bisansUpsilon" : "𝞤",
|
| 1211 |
+
"\\bisansPhi" : "𝞥",
|
| 1212 |
+
"\\bisansChi" : "𝞦",
|
| 1213 |
+
"\\bisansPsi" : "𝞧",
|
| 1214 |
+
"\\bisansOmega" : "𝞨",
|
| 1215 |
+
"\\bisansalpha" : "𝞪",
|
| 1216 |
+
"\\bisansbeta" : "𝞫",
|
| 1217 |
+
"\\bisansgamma" : "𝞬",
|
| 1218 |
+
"\\bisansdelta" : "𝞭",
|
| 1219 |
+
"\\bisansepsilon" : "𝞮",
|
| 1220 |
+
"\\bisanszeta" : "𝞯",
|
| 1221 |
+
"\\bisanseta" : "𝞰",
|
| 1222 |
+
"\\bisanstheta" : "𝞱",
|
| 1223 |
+
"\\bisansiota" : "𝞲",
|
| 1224 |
+
"\\bisanskappa" : "𝞳",
|
| 1225 |
+
"\\bisanslambda" : "𝞴",
|
| 1226 |
+
"\\bisansmu" : "𝞵",
|
| 1227 |
+
"\\bisansnu" : "𝞶",
|
| 1228 |
+
"\\bisansxi" : "𝞷",
|
| 1229 |
+
"\\bisansomicron" : "𝞸",
|
| 1230 |
+
"\\bisanspi" : "𝞹",
|
| 1231 |
+
"\\bisansrho" : "𝞺",
|
| 1232 |
+
"\\bisansvarsigma" : "𝞻",
|
| 1233 |
+
"\\bisanssigma" : "𝞼",
|
| 1234 |
+
"\\bisanstau" : "𝞽",
|
| 1235 |
+
"\\bisansupsilon" : "𝞾",
|
| 1236 |
+
"\\bisansphi" : "𝞿",
|
| 1237 |
+
"\\bisanschi" : "𝟀",
|
| 1238 |
+
"\\bisanspsi" : "𝟁",
|
| 1239 |
+
"\\bisansomega" : "𝟂",
|
| 1240 |
+
"\\bisansvarepsilon" : "𝟄",
|
| 1241 |
+
"\\bisansvartheta" : "𝟅",
|
| 1242 |
+
"\\bisansvarkappa" : "𝟆",
|
| 1243 |
+
"\\bisansvarphi" : "𝟇",
|
| 1244 |
+
"\\bisansvarrho" : "𝟈",
|
| 1245 |
+
"\\bisansvarpi" : "𝟉",
|
| 1246 |
+
"\\bfzero" : "𝟎",
|
| 1247 |
+
"\\bfone" : "𝟏",
|
| 1248 |
+
"\\bftwo" : "𝟐",
|
| 1249 |
+
"\\bfthree" : "𝟑",
|
| 1250 |
+
"\\bffour" : "𝟒",
|
| 1251 |
+
"\\bffive" : "𝟓",
|
| 1252 |
+
"\\bfsix" : "𝟔",
|
| 1253 |
+
"\\bfseven" : "𝟕",
|
| 1254 |
+
"\\bfeight" : "𝟖",
|
| 1255 |
+
"\\bfnine" : "𝟗",
|
| 1256 |
+
"\\bbzero" : "𝟘",
|
| 1257 |
+
"\\bbone" : "𝟙",
|
| 1258 |
+
"\\bbtwo" : "𝟚",
|
| 1259 |
+
"\\bbthree" : "𝟛",
|
| 1260 |
+
"\\bbfour" : "𝟜",
|
| 1261 |
+
"\\bbfive" : "𝟝",
|
| 1262 |
+
"\\bbsix" : "𝟞",
|
| 1263 |
+
"\\bbseven" : "𝟟",
|
| 1264 |
+
"\\bbeight" : "𝟠",
|
| 1265 |
+
"\\bbnine" : "𝟡",
|
| 1266 |
+
"\\sanszero" : "𝟢",
|
| 1267 |
+
"\\sansone" : "𝟣",
|
| 1268 |
+
"\\sanstwo" : "𝟤",
|
| 1269 |
+
"\\sansthree" : "𝟥",
|
| 1270 |
+
"\\sansfour" : "𝟦",
|
| 1271 |
+
"\\sansfive" : "𝟧",
|
| 1272 |
+
"\\sanssix" : "𝟨",
|
| 1273 |
+
"\\sansseven" : "𝟩",
|
| 1274 |
+
"\\sanseight" : "𝟪",
|
| 1275 |
+
"\\sansnine" : "𝟫",
|
| 1276 |
+
"\\bsanszero" : "𝟬",
|
| 1277 |
+
"\\bsansone" : "𝟭",
|
| 1278 |
+
"\\bsanstwo" : "𝟮",
|
| 1279 |
+
"\\bsansthree" : "𝟯",
|
| 1280 |
+
"\\bsansfour" : "𝟰",
|
| 1281 |
+
"\\bsansfive" : "𝟱",
|
| 1282 |
+
"\\bsanssix" : "𝟲",
|
| 1283 |
+
"\\bsansseven" : "𝟳",
|
| 1284 |
+
"\\bsanseight" : "𝟴",
|
| 1285 |
+
"\\bsansnine" : "𝟵",
|
| 1286 |
+
"\\ttzero" : "𝟶",
|
| 1287 |
+
"\\ttone" : "𝟷",
|
| 1288 |
+
"\\tttwo" : "𝟸",
|
| 1289 |
+
"\\ttthree" : "𝟹",
|
| 1290 |
+
"\\ttfour" : "𝟺",
|
| 1291 |
+
"\\ttfive" : "𝟻",
|
| 1292 |
+
"\\ttsix" : "𝟼",
|
| 1293 |
+
"\\ttseven" : "𝟽",
|
| 1294 |
+
"\\tteight" : "𝟾",
|
| 1295 |
+
"\\ttnine" : "𝟿",
|
| 1296 |
+
"\\underbar" : "̲",
|
| 1297 |
+
"\\underleftrightarrow" : "͍",
|
| 1298 |
+
}
|
| 1299 |
+
|
| 1300 |
+
|
| 1301 |
+
reverse_latex_symbol = { v:k for k,v in latex_symbols.items()}
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/logger.py
ADDED
|
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Logger class for IPython's logging facilities.
|
| 2 |
+
"""
|
| 3 |
+
|
| 4 |
+
#*****************************************************************************
|
| 5 |
+
# Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
|
| 6 |
+
# Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu>
|
| 7 |
+
#
|
| 8 |
+
# Distributed under the terms of the BSD License. The full license is in
|
| 9 |
+
# the file COPYING, distributed as part of this software.
|
| 10 |
+
#*****************************************************************************
|
| 11 |
+
|
| 12 |
+
#****************************************************************************
|
| 13 |
+
# Modules and globals
|
| 14 |
+
|
| 15 |
+
# Python standard modules
|
| 16 |
+
import glob
|
| 17 |
+
import io
|
| 18 |
+
import logging
|
| 19 |
+
import os
|
| 20 |
+
import time
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# prevent jedi/parso's debug messages pipe into interactiveshell
|
| 24 |
+
logging.getLogger("parso").setLevel(logging.WARNING)
|
| 25 |
+
|
| 26 |
+
#****************************************************************************
|
| 27 |
+
# FIXME: This class isn't a mixin anymore, but it still needs attributes from
|
| 28 |
+
# ipython and does input cache management. Finish cleanup later...
|
| 29 |
+
|
| 30 |
+
class Logger(object):
|
| 31 |
+
"""A Logfile class with different policies for file creation"""
|
| 32 |
+
|
| 33 |
+
def __init__(self, home_dir, logfname='Logger.log', loghead=u'',
|
| 34 |
+
logmode='over'):
|
| 35 |
+
|
| 36 |
+
# this is the full ipython instance, we need some attributes from it
|
| 37 |
+
# which won't exist until later. What a mess, clean up later...
|
| 38 |
+
self.home_dir = home_dir
|
| 39 |
+
|
| 40 |
+
self.logfname = logfname
|
| 41 |
+
self.loghead = loghead
|
| 42 |
+
self.logmode = logmode
|
| 43 |
+
self.logfile = None
|
| 44 |
+
|
| 45 |
+
# Whether to log raw or processed input
|
| 46 |
+
self.log_raw_input = False
|
| 47 |
+
|
| 48 |
+
# whether to also log output
|
| 49 |
+
self.log_output = False
|
| 50 |
+
|
| 51 |
+
# whether to put timestamps before each log entry
|
| 52 |
+
self.timestamp = False
|
| 53 |
+
|
| 54 |
+
# activity control flags
|
| 55 |
+
self.log_active = False
|
| 56 |
+
|
| 57 |
+
# logmode is a validated property
|
| 58 |
+
def _set_mode(self,mode):
|
| 59 |
+
if mode not in ['append','backup','global','over','rotate']:
|
| 60 |
+
raise ValueError('invalid log mode %s given' % mode)
|
| 61 |
+
self._logmode = mode
|
| 62 |
+
|
| 63 |
+
def _get_mode(self):
|
| 64 |
+
return self._logmode
|
| 65 |
+
|
| 66 |
+
logmode = property(_get_mode,_set_mode)
|
| 67 |
+
|
| 68 |
+
def logstart(self, logfname=None, loghead=None, logmode=None,
|
| 69 |
+
log_output=False, timestamp=False, log_raw_input=False):
|
| 70 |
+
"""Generate a new log-file with a default header.
|
| 71 |
+
|
| 72 |
+
Raises RuntimeError if the log has already been started"""
|
| 73 |
+
|
| 74 |
+
if self.logfile is not None:
|
| 75 |
+
raise RuntimeError('Log file is already active: %s' %
|
| 76 |
+
self.logfname)
|
| 77 |
+
|
| 78 |
+
# The parameters can override constructor defaults
|
| 79 |
+
if logfname is not None: self.logfname = logfname
|
| 80 |
+
if loghead is not None: self.loghead = loghead
|
| 81 |
+
if logmode is not None: self.logmode = logmode
|
| 82 |
+
|
| 83 |
+
# Parameters not part of the constructor
|
| 84 |
+
self.timestamp = timestamp
|
| 85 |
+
self.log_output = log_output
|
| 86 |
+
self.log_raw_input = log_raw_input
|
| 87 |
+
|
| 88 |
+
# init depending on the log mode requested
|
| 89 |
+
isfile = os.path.isfile
|
| 90 |
+
logmode = self.logmode
|
| 91 |
+
|
| 92 |
+
if logmode == 'append':
|
| 93 |
+
self.logfile = io.open(self.logfname, 'a', encoding='utf-8')
|
| 94 |
+
|
| 95 |
+
elif logmode == 'backup':
|
| 96 |
+
if isfile(self.logfname):
|
| 97 |
+
backup_logname = self.logfname+'~'
|
| 98 |
+
# Manually remove any old backup, since os.rename may fail
|
| 99 |
+
# under Windows.
|
| 100 |
+
if isfile(backup_logname):
|
| 101 |
+
os.remove(backup_logname)
|
| 102 |
+
os.rename(self.logfname,backup_logname)
|
| 103 |
+
self.logfile = io.open(self.logfname, 'w', encoding='utf-8')
|
| 104 |
+
|
| 105 |
+
elif logmode == 'global':
|
| 106 |
+
self.logfname = os.path.join(self.home_dir,self.logfname)
|
| 107 |
+
self.logfile = io.open(self.logfname, 'a', encoding='utf-8')
|
| 108 |
+
|
| 109 |
+
elif logmode == 'over':
|
| 110 |
+
if isfile(self.logfname):
|
| 111 |
+
os.remove(self.logfname)
|
| 112 |
+
self.logfile = io.open(self.logfname,'w', encoding='utf-8')
|
| 113 |
+
|
| 114 |
+
elif logmode == 'rotate':
|
| 115 |
+
if isfile(self.logfname):
|
| 116 |
+
if isfile(self.logfname+'.001~'):
|
| 117 |
+
old = glob.glob(self.logfname+'.*~')
|
| 118 |
+
old.sort()
|
| 119 |
+
old.reverse()
|
| 120 |
+
for f in old:
|
| 121 |
+
root, ext = os.path.splitext(f)
|
| 122 |
+
num = int(ext[1:-1])+1
|
| 123 |
+
os.rename(f, root+'.'+repr(num).zfill(3)+'~')
|
| 124 |
+
os.rename(self.logfname, self.logfname+'.001~')
|
| 125 |
+
self.logfile = io.open(self.logfname, 'w', encoding='utf-8')
|
| 126 |
+
|
| 127 |
+
if logmode != 'append':
|
| 128 |
+
self.logfile.write(self.loghead)
|
| 129 |
+
|
| 130 |
+
self.logfile.flush()
|
| 131 |
+
self.log_active = True
|
| 132 |
+
|
| 133 |
+
def switch_log(self,val):
|
| 134 |
+
"""Switch logging on/off. val should be ONLY a boolean."""
|
| 135 |
+
|
| 136 |
+
if val not in [False,True,0,1]:
|
| 137 |
+
raise ValueError('Call switch_log ONLY with a boolean argument, '
|
| 138 |
+
'not with: %s' % val)
|
| 139 |
+
|
| 140 |
+
label = {0:'OFF',1:'ON',False:'OFF',True:'ON'}
|
| 141 |
+
|
| 142 |
+
if self.logfile is None:
|
| 143 |
+
print("""
|
| 144 |
+
Logging hasn't been started yet (use logstart for that).
|
| 145 |
+
|
| 146 |
+
%logon/%logoff are for temporarily starting and stopping logging for a logfile
|
| 147 |
+
which already exists. But you must first start the logging process with
|
| 148 |
+
%logstart (optionally giving a logfile name).""")
|
| 149 |
+
|
| 150 |
+
else:
|
| 151 |
+
if self.log_active == val:
|
| 152 |
+
print('Logging is already',label[val])
|
| 153 |
+
else:
|
| 154 |
+
print('Switching logging',label[val])
|
| 155 |
+
self.log_active = not self.log_active
|
| 156 |
+
self.log_active_out = self.log_active
|
| 157 |
+
|
| 158 |
+
def logstate(self):
|
| 159 |
+
"""Print a status message about the logger."""
|
| 160 |
+
if self.logfile is None:
|
| 161 |
+
print('Logging has not been activated.')
|
| 162 |
+
else:
|
| 163 |
+
state = self.log_active and 'active' or 'temporarily suspended'
|
| 164 |
+
print('Filename :', self.logfname)
|
| 165 |
+
print('Mode :', self.logmode)
|
| 166 |
+
print('Output logging :', self.log_output)
|
| 167 |
+
print('Raw input log :', self.log_raw_input)
|
| 168 |
+
print('Timestamping :', self.timestamp)
|
| 169 |
+
print('State :', state)
|
| 170 |
+
|
| 171 |
+
def log(self, line_mod, line_ori):
|
| 172 |
+
"""Write the sources to a log.
|
| 173 |
+
|
| 174 |
+
Inputs:
|
| 175 |
+
|
| 176 |
+
- line_mod: possibly modified input, such as the transformations made
|
| 177 |
+
by input prefilters or input handlers of various kinds. This should
|
| 178 |
+
always be valid Python.
|
| 179 |
+
|
| 180 |
+
- line_ori: unmodified input line from the user. This is not
|
| 181 |
+
necessarily valid Python.
|
| 182 |
+
"""
|
| 183 |
+
|
| 184 |
+
# Write the log line, but decide which one according to the
|
| 185 |
+
# log_raw_input flag, set when the log is started.
|
| 186 |
+
if self.log_raw_input:
|
| 187 |
+
self.log_write(line_ori)
|
| 188 |
+
else:
|
| 189 |
+
self.log_write(line_mod)
|
| 190 |
+
|
| 191 |
+
def log_write(self, data, kind='input'):
|
| 192 |
+
"""Write data to the log file, if active"""
|
| 193 |
+
|
| 194 |
+
# print('data: %r' % data) # dbg
|
| 195 |
+
if self.log_active and data:
|
| 196 |
+
write = self.logfile.write
|
| 197 |
+
if kind=='input':
|
| 198 |
+
if self.timestamp:
|
| 199 |
+
write(time.strftime('# %a, %d %b %Y %H:%M:%S\n', time.localtime()))
|
| 200 |
+
write(data)
|
| 201 |
+
elif kind=='output' and self.log_output:
|
| 202 |
+
odata = u'\n'.join([u'#[Out]# %s' % s
|
| 203 |
+
for s in data.splitlines()])
|
| 204 |
+
write(u'%s\n' % odata)
|
| 205 |
+
try:
|
| 206 |
+
self.logfile.flush()
|
| 207 |
+
except OSError:
|
| 208 |
+
print("Failed to flush the log file.")
|
| 209 |
+
print(
|
| 210 |
+
f"Please check that {self.logfname} exists and have the right permissions."
|
| 211 |
+
)
|
| 212 |
+
print(
|
| 213 |
+
"Also consider turning off the log with `%logstop` to avoid this warning."
|
| 214 |
+
)
|
| 215 |
+
|
| 216 |
+
def logstop(self):
|
| 217 |
+
"""Fully stop logging and close log file.
|
| 218 |
+
|
| 219 |
+
In order to start logging again, a new logstart() call needs to be
|
| 220 |
+
made, possibly (though not necessarily) with a new filename, mode and
|
| 221 |
+
other options."""
|
| 222 |
+
|
| 223 |
+
if self.logfile is not None:
|
| 224 |
+
self.logfile.close()
|
| 225 |
+
self.logfile = None
|
| 226 |
+
else:
|
| 227 |
+
print("Logging hadn't been started.")
|
| 228 |
+
self.log_active = False
|
| 229 |
+
|
| 230 |
+
# For backwards compatibility, in case anyone was using this.
|
| 231 |
+
close_log = logstop
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/__init__.cpython-310.pyc
ADDED
|
Binary file (241 Bytes). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/bad_all.cpython-310.pyc
ADDED
|
Binary file (552 Bytes). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/print_argv.cpython-310.pyc
ADDED
|
Binary file (296 Bytes). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/simpleerr.cpython-310.pyc
ADDED
|
Binary file (1.02 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/tclass.cpython-310.pyc
ADDED
|
Binary file (1.06 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_alias.cpython-310.pyc
ADDED
|
Binary file (2.29 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_application.cpython-310.pyc
ADDED
|
Binary file (2.32 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_async_helpers.cpython-310.pyc
ADDED
|
Binary file (8.42 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_autocall.cpython-310.pyc
ADDED
|
Binary file (1.83 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_completer.cpython-310.pyc
ADDED
|
Binary file (55.4 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_display.cpython-310.pyc
ADDED
|
Binary file (14.5 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_displayhook.cpython-310.pyc
ADDED
|
Binary file (3.67 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_events.cpython-310.pyc
ADDED
|
Binary file (3.43 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_exceptiongroup_tb.cpython-310.pyc
ADDED
|
Binary file (3.33 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_extension.cpython-310.pyc
ADDED
|
Binary file (2.87 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_formatters.cpython-310.pyc
ADDED
|
Binary file (18.5 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_hooks.cpython-310.pyc
ADDED
|
Binary file (2.22 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_imports.cpython-310.pyc
ADDED
|
Binary file (2.52 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_inputtransformer2.cpython-310.pyc
ADDED
|
Binary file (10.4 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_interactiveshell.cpython-310.pyc
ADDED
|
Binary file (44.4 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_iplib.cpython-310.pyc
ADDED
|
Binary file (6.89 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_logger.cpython-310.pyc
ADDED
|
Binary file (1.05 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_magic.cpython-310.pyc
ADDED
|
Binary file (48.2 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_magic_terminal.cpython-310.pyc
ADDED
|
Binary file (6.37 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_page.cpython-310.pyc
ADDED
|
Binary file (580 Bytes). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_paths.cpython-310.pyc
ADDED
|
Binary file (7.28 kB). View file
|
|
|
material/dataset/xpsdeeplearning/.venv/lib/python3.10/site-packages/IPython/core/tests/__pycache__/test_pylabtools.cpython-310.pyc
ADDED
|
Binary file (10.7 kB). View file
|
|
|