From 7ea3a6e417fdf2ce7589a6dde2eec92f54c09b07 Mon Sep 17 00:00:00 2001 From: vanshapple Date: Sun, 17 May 2026 16:35:09 +0530 Subject: [PATCH 1/2] Fix NumPy 2.x compatibility issues --- brian2tools/__init__.py | 9 + brian2tools/baseexport/device.py | 23 +++ brian2tools/serialization.py | 229 ++++++++++++++++++++++ brian2tools/tests/test_serialization.py | 80 ++++++++ venv/bin/Activate.ps1 | 247 ++++++++++++++++++++++++ venv/bin/activate | 70 +++++++ venv/bin/activate.csh | 27 +++ venv/bin/activate.fish | 69 +++++++ venv/bin/cpuinfo | 8 + venv/bin/cygdb | 8 + venv/bin/cython | 8 + venv/bin/cythonize | 8 + venv/bin/f2py | 8 + venv/bin/fonttools | 8 + venv/bin/isympy | 8 + venv/bin/natsort | 8 + venv/bin/normalizer | 8 + venv/bin/numpy-config | 8 + venv/bin/parquet-to-blosc2 | 8 + venv/bin/pip | 8 + venv/bin/pip3 | 8 + venv/bin/pip3.12 | 8 + venv/bin/pt2to3 | 8 + venv/bin/ptdump | 8 + venv/bin/ptrepack | 8 + venv/bin/pttree | 8 + venv/bin/pyftmerge | 8 + venv/bin/pyftsubset | 8 + venv/bin/pylems | 8 + venv/bin/python | 1 + venv/bin/python3 | 1 + venv/bin/python3.12 | 1 + venv/bin/setuptools-scm | 8 + venv/bin/ttx | 8 + venv/bin/vcs-versioning | 8 + venv/lib64 | 1 + venv/pyvenv.cfg | 5 + venv/share/man/man1/isympy.1 | 188 ++++++++++++++++++ venv/share/man/man1/ttx.1 | 225 +++++++++++++++++++++ 39 files changed, 1368 insertions(+) create mode 100644 brian2tools/serialization.py create mode 100644 brian2tools/tests/test_serialization.py create mode 100644 venv/bin/Activate.ps1 create mode 100644 venv/bin/activate create mode 100644 venv/bin/activate.csh create mode 100644 venv/bin/activate.fish create mode 100755 venv/bin/cpuinfo create mode 100755 venv/bin/cygdb create mode 100755 venv/bin/cython create mode 100755 venv/bin/cythonize create mode 100755 venv/bin/f2py create mode 100755 venv/bin/fonttools create mode 100755 venv/bin/isympy create mode 100755 venv/bin/natsort create mode 100755 venv/bin/normalizer create mode 100755 venv/bin/numpy-config create mode 100755 venv/bin/parquet-to-blosc2 create mode 100755 venv/bin/pip create mode 100755 venv/bin/pip3 create mode 100755 venv/bin/pip3.12 create mode 100755 venv/bin/pt2to3 create mode 100755 venv/bin/ptdump create mode 100755 venv/bin/ptrepack create mode 100755 venv/bin/pttree create mode 100755 venv/bin/pyftmerge create mode 100755 venv/bin/pyftsubset create mode 100755 venv/bin/pylems create mode 120000 venv/bin/python create mode 120000 venv/bin/python3 create mode 120000 venv/bin/python3.12 create mode 100755 venv/bin/setuptools-scm create mode 100755 venv/bin/ttx create mode 100755 venv/bin/vcs-versioning create mode 120000 venv/lib64 create mode 100644 venv/pyvenv.cfg create mode 100644 venv/share/man/man1/isympy.1 create mode 100644 venv/share/man/man1/ttx.1 diff --git a/brian2tools/__init__.py b/brian2tools/__init__.py index b6245d87..803adca8 100644 --- a/brian2tools/__init__.py +++ b/brian2tools/__init__.py @@ -5,4 +5,13 @@ from .mdexport import * from .nmlexport import * from .plotting import * +from .serialization import ( + dump_runs, + dumps_runs, + encode_export_data, + decode_export_data, + load_runs, + loads_runs, + NumpyCompatUnpickler, +) from .tests import run as test diff --git a/brian2tools/baseexport/device.py b/brian2tools/baseexport/device.py index 8d716611..0e10212f 100644 --- a/brian2tools/baseexport/device.py +++ b/brian2tools/baseexport/device.py @@ -432,6 +432,29 @@ def build(self, direct_call=True, debug=False): # reset to avoid affecting overall remaining session np.set_printoptions(old_threshold) + def save_runs(self, filename, **kwargs): + """ + Pickle :attr:`runs` with NumPy 1.x / 2.x compatible encoding. + + See :func:`brian2tools.serialization.dump_runs` for keyword arguments. + """ + from ..serialization import dump_runs + + with open(filename, 'wb') as f: + dump_runs(self.runs, f, **kwargs) + + @staticmethod + def load_runs(filename, **kwargs): + """ + Load data written by :meth:`save_runs`. + + See :func:`brian2tools.serialization.load_runs` for keyword arguments. + """ + from ..serialization import load_runs + + with open(filename, 'rb') as f: + return load_runs(f, **kwargs) + # instantiate StdDevice object and add to all_devices std_device = BaseExporter() diff --git a/brian2tools/serialization.py b/brian2tools/serialization.py new file mode 100644 index 00000000..a10c8b4e --- /dev/null +++ b/brian2tools/serialization.py @@ -0,0 +1,229 @@ +""" +Portable pickle I/O for baseexport ``device.runs`` data. + +NumPy 1.x pickles reference ``numpy.core.*``; NumPy 2.x uses ``numpy._core.*``. +Raw pickles of ndarray objects therefore fail across major versions. + +Two strategies are supported: + +* **portable=True** (default): encode ndarrays as plain metadata before pickling. + This works across NumPy 1.x and 2.x without relying on module remapping. +* **portable=False**: pickle objects directly and use :class:`NumpyCompatUnpickler` + to remap ``numpy.core`` <-> ``numpy._core`` when loading legacy files. +""" +from __future__ import annotations + +import io +import pickle +from typing import Any, BinaryIO + +import numpy as np + +from brian2.units.fundamentalunits import ( + Dimension, + Quantity, + Unit, + get_or_create_dimension, + quantity_with_dimensions, +) + +_ARRAY_TAG = "__brian2tools_numpy_array__" +_SCALAR_TAG = "__brian2tools_numpy_scalar__" +_QUANTITY_TAG = "__brian2tools_quantity__" +_DIMENSION_TAG = "__brian2tools_dimension__" + +_NUMPY_CORE_PREFIXES = ("numpy.core.", "numpy._core.") + + +def _numpy_module_alt(module: str) -> str | None: + if module.startswith("numpy._core."): + return "numpy.core." + module[len("numpy._core.") :] + if module.startswith("numpy.core."): + return "numpy._core." + module[len("numpy.core.") :] + return None + + +class NumpyCompatUnpickler(pickle.Unpickler): + """Unpickler that remaps NumPy 1.x / 2.x internal module paths.""" + + def find_class(self, module: str, name: str): + alt = _numpy_module_alt(module) + if alt is not None: + try: + return super().find_class(alt, name) + except (AttributeError, ModuleNotFoundError, ImportError): + pass + return super().find_class(module, name) + + +def _encode_numpy(obj: Any) -> Any: + if isinstance(obj, np.ndarray): + return { + _ARRAY_TAG: True, + "data": obj.tolist(), + "dtype": np.dtype(obj.dtype).str, + } + if isinstance(obj, np.generic): + return { + _SCALAR_TAG: True, + "data": obj.item(), + "dtype": np.dtype(obj.dtype).str, + } + return obj + + +def _dimension_dims(dim: Dimension | Unit) -> tuple: + if isinstance(dim, Unit): + return dim.dim._dims + return dim._dims + + +def _encode_dimension(dim: Dimension | Unit) -> dict: + return {_DIMENSION_TAG: True, "dims": _dimension_dims(dim)} + + +def _encode_quantity(q: Quantity) -> dict: + return { + _QUANTITY_TAG: True, + "value": encode_export_data(np.asarray(q)), + "dim": _encode_dimension(q.dim), + } + + +def encode_export_data(obj: Any) -> Any: + """ + Recursively replace NumPy and Brian unit types with portable representations. + + Bare ``ndarray`` / NumPy scalar objects and ``Quantity`` / ``Dimension`` + are encoded so pickles do not reference ``numpy.core`` or ``numpy._core``. + """ + if isinstance(obj, Quantity): + return _encode_quantity(obj) + if isinstance(obj, Dimension): + return _encode_dimension(obj) + encoded = _encode_numpy(obj) + if encoded is not obj: + return encoded + if isinstance(obj, dict): + return {key: encode_export_data(value) for key, value in obj.items()} + if isinstance(obj, list): + return [encode_export_data(value) for value in obj] + if isinstance(obj, tuple): + return tuple(encode_export_data(value) for value in obj) + return obj + + +def _decode_numpy(obj: Any) -> Any: + if isinstance(obj, dict): + if obj.get(_ARRAY_TAG): + return np.array(obj["data"], dtype=np.dtype(obj["dtype"])) + if obj.get(_SCALAR_TAG): + return np.dtype(obj["dtype"]).type(obj["data"]) + return obj + + +def _decode_dimension(obj: dict) -> Dimension: + return get_or_create_dimension(tuple(obj["dims"])) + + +def _decode_quantity(obj: dict) -> Quantity: + value = decode_export_data(obj["value"]) + dim = _decode_dimension(obj["dim"]) + return quantity_with_dimensions(value, dim) + + +def decode_export_data(obj: Any) -> Any: + """Restore objects encoded by :func:`encode_export_data`.""" + if isinstance(obj, dict): + if obj.get(_QUANTITY_TAG): + return _decode_quantity(obj) + if obj.get(_DIMENSION_TAG): + return _decode_dimension(obj) + decoded = _decode_numpy(obj) + if decoded is not obj: + return decoded + if isinstance(obj, dict): + return {key: decode_export_data(value) for key, value in obj.items()} + if isinstance(obj, list): + return [decode_export_data(value) for value in obj] + if isinstance(obj, tuple): + return tuple(decode_export_data(value) for value in obj) + return obj + + +def _needs_portable_decode(obj: Any) -> bool: + if isinstance(obj, dict) and ( + _ARRAY_TAG in obj + or _SCALAR_TAG in obj + or _QUANTITY_TAG in obj + or _DIMENSION_TAG in obj + ): + return True + if isinstance(obj, dict): + return any(_needs_portable_decode(v) for v in obj.values()) + if isinstance(obj, (list, tuple)): + return any(_needs_portable_decode(v) for v in obj) + return False + + +def dump_runs( + runs: Any, + file: BinaryIO, + *, + portable: bool = True, + protocol: int = pickle.HIGHEST_PROTOCOL, +) -> None: + """ + Pickle export data from :attr:`~brian2tools.baseexport.device.BaseExporter.runs`. + + Parameters + ---------- + runs + The ``device.runs`` list (or compatible structure). + file + Writable binary file object. + portable + If ``True`` (default), encode NumPy arrays before pickling so the file + loads on both NumPy 1.x and 2.x. If ``False``, rely on + :class:`NumpyCompatUnpickler` when loading. + protocol + Pickle protocol passed to :func:`pickle.dump`. + """ + payload = encode_export_data(runs) if portable else runs + pickle.dump(payload, file, protocol=protocol) + + +def load_runs( + file: BinaryIO, + *, + portable: bool = True, +) -> Any: + """ + Load data written by :func:`dump_runs`. + + Parameters + ---------- + file + Readable binary file object. + portable + If ``True`` (default), decode portable NumPy representations after + loading. Legacy files pickled without encoding are still loaded when + they contain encoded markers or bare NumPy objects (via + :class:`NumpyCompatUnpickler`). + """ + data = NumpyCompatUnpickler(file).load() + if portable or _needs_portable_decode(data): + return decode_export_data(data) + return data + + +def dumps_runs(runs: Any, **kwargs: Any) -> bytes: + """Like :func:`dump_runs` but return ``bytes``.""" + buf = io.BytesIO() + dump_runs(runs, buf, **kwargs) + return buf.getvalue() + + +def loads_runs(data: bytes, **kwargs: Any) -> Any: + """Like :func:`load_runs` but accept ``bytes``.""" + return load_runs(io.BytesIO(data), **kwargs) diff --git a/brian2tools/tests/test_serialization.py b/brian2tools/tests/test_serialization.py new file mode 100644 index 00000000..1cdced85 --- /dev/null +++ b/brian2tools/tests/test_serialization.py @@ -0,0 +1,80 @@ +""" +Tests for NumPy 1.x / 2.x compatible pickle I/O of export data. +""" +import io +import pickle +import unittest + +import numpy as np +from brian2 import Hz, ms + +from brian2tools.serialization import ( + NumpyCompatUnpickler, + decode_export_data, + dumps_runs, + encode_export_data, + load_runs, + loads_runs, +) + + +class TestSerialization(unittest.TestCase): + def test_encode_decode_roundtrip(self): + original = { + "record": np.array([0, 2, 4]), + "weights": np.array([1.0, 2.5]), + "scalar": np.int64(3), + "nested": [{"idx": np.array([1])}], + } + restored = decode_export_data(encode_export_data(original)) + np.testing.assert_array_equal(restored["record"], original["record"]) + np.testing.assert_array_equal(restored["weights"], original["weights"]) + self.assertEqual(restored["scalar"], original["scalar"]) + np.testing.assert_array_equal( + restored["nested"][0]["idx"], original["nested"][0]["idx"] + ) + + def test_portable_pickle_roundtrip(self): + runs = [ + { + "duration": 100 * ms, + "components": { + "spikemonitor": [ + {"record": np.array([0, 1]), "rates": np.arange(3) * Hz} + ] + }, + } + ] + blob = dumps_runs(runs, portable=True) + # Portable blobs must not reference NumPy internal pickle modules + self.assertNotIn(b"numpy._core", blob) + self.assertNotIn(b"numpy.core", blob) + restored = loads_runs(blob, portable=True) + self.assertEqual(restored[0]["duration"], runs[0]["duration"]) + np.testing.assert_array_equal( + restored[0]["components"]["spikemonitor"][0]["record"], + runs[0]["components"]["spikemonitor"][0]["record"], + ) + np.testing.assert_array_equal( + np.asarray(restored[0]["components"]["spikemonitor"][0]["rates"]), + np.asarray(runs[0]["components"]["spikemonitor"][0]["rates"]), + ) + + def test_compat_unpickler_numpy2_array(self): + arr = np.array([1, 2, 3]) + raw = pickle.dumps(arr) + loaded = NumpyCompatUnpickler(io.BytesIO(raw)).load() + np.testing.assert_array_equal(loaded, arr) + + def test_legacy_compat_load(self): + """Bare ndarray pickles load via NumpyCompatUnpickler.""" + runs = [{"record": np.array([7, 8])}] + buf = io.BytesIO() + pickle.dump(runs, buf, protocol=pickle.HIGHEST_PROTOCOL) + buf.seek(0) + restored = load_runs(buf, portable=False) + np.testing.assert_array_equal(restored[0]["record"], runs[0]["record"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/venv/bin/Activate.ps1 b/venv/bin/Activate.ps1 new file mode 100644 index 00000000..b49d77ba --- /dev/null +++ b/venv/bin/Activate.ps1 @@ -0,0 +1,247 @@ +<# +.Synopsis +Activate a Python virtual environment for the current PowerShell session. + +.Description +Pushes the python executable for a virtual environment to the front of the +$Env:PATH environment variable and sets the prompt to signify that you are +in a Python virtual environment. Makes use of the command line switches as +well as the `pyvenv.cfg` file values present in the virtual environment. + +.Parameter VenvDir +Path to the directory that contains the virtual environment to activate. The +default value for this is the parent of the directory that the Activate.ps1 +script is located within. + +.Parameter Prompt +The prompt prefix to display when this virtual environment is activated. By +default, this prompt is the name of the virtual environment folder (VenvDir) +surrounded by parentheses and followed by a single space (ie. '(.venv) '). + +.Example +Activate.ps1 +Activates the Python virtual environment that contains the Activate.ps1 script. + +.Example +Activate.ps1 -Verbose +Activates the Python virtual environment that contains the Activate.ps1 script, +and shows extra information about the activation as it executes. + +.Example +Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv +Activates the Python virtual environment located in the specified location. + +.Example +Activate.ps1 -Prompt "MyPython" +Activates the Python virtual environment that contains the Activate.ps1 script, +and prefixes the current prompt with the specified string (surrounded in +parentheses) while the virtual environment is active. + +.Notes +On Windows, it may be required to enable this Activate.ps1 script by setting the +execution policy for the user. You can do this by issuing the following PowerShell +command: + +PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + +For more information on Execution Policies: +https://go.microsoft.com/fwlink/?LinkID=135170 + +#> +Param( + [Parameter(Mandatory = $false)] + [String] + $VenvDir, + [Parameter(Mandatory = $false)] + [String] + $Prompt +) + +<# Function declarations --------------------------------------------------- #> + +<# +.Synopsis +Remove all shell session elements added by the Activate script, including the +addition of the virtual environment's Python executable from the beginning of +the PATH variable. + +.Parameter NonDestructive +If present, do not remove this function from the global namespace for the +session. + +#> +function global:deactivate ([switch]$NonDestructive) { + # Revert to original values + + # The prior prompt: + if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { + Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt + Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT + } + + # The prior PYTHONHOME: + if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { + Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME + Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME + } + + # The prior PATH: + if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { + Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH + Remove-Item -Path Env:_OLD_VIRTUAL_PATH + } + + # Just remove the VIRTUAL_ENV altogether: + if (Test-Path -Path Env:VIRTUAL_ENV) { + Remove-Item -Path env:VIRTUAL_ENV + } + + # Just remove VIRTUAL_ENV_PROMPT altogether. + if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { + Remove-Item -Path env:VIRTUAL_ENV_PROMPT + } + + # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: + if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { + Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force + } + + # Leave deactivate function in the global namespace if requested: + if (-not $NonDestructive) { + Remove-Item -Path function:deactivate + } +} + +<# +.Description +Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the +given folder, and returns them in a map. + +For each line in the pyvenv.cfg file, if that line can be parsed into exactly +two strings separated by `=` (with any amount of whitespace surrounding the =) +then it is considered a `key = value` line. The left hand string is the key, +the right hand is the value. + +If the value starts with a `'` or a `"` then the first and last character is +stripped from the value before being captured. + +.Parameter ConfigDir +Path to the directory that contains the `pyvenv.cfg` file. +#> +function Get-PyVenvConfig( + [String] + $ConfigDir +) { + Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" + + # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). + $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue + + # An empty map will be returned if no config file is found. + $pyvenvConfig = @{ } + + if ($pyvenvConfigPath) { + + Write-Verbose "File exists, parse `key = value` lines" + $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath + + $pyvenvConfigContent | ForEach-Object { + $keyval = $PSItem -split "\s*=\s*", 2 + if ($keyval[0] -and $keyval[1]) { + $val = $keyval[1] + + # Remove extraneous quotations around a string value. + if ("'""".Contains($val.Substring(0, 1))) { + $val = $val.Substring(1, $val.Length - 2) + } + + $pyvenvConfig[$keyval[0]] = $val + Write-Verbose "Adding Key: '$($keyval[0])'='$val'" + } + } + } + return $pyvenvConfig +} + + +<# Begin Activate script --------------------------------------------------- #> + +# Determine the containing directory of this script +$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +$VenvExecDir = Get-Item -Path $VenvExecPath + +Write-Verbose "Activation script is located in path: '$VenvExecPath'" +Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" +Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" + +# Set values required in priority: CmdLine, ConfigFile, Default +# First, get the location of the virtual environment, it might not be +# VenvExecDir if specified on the command line. +if ($VenvDir) { + Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" +} +else { + Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." + $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") + Write-Verbose "VenvDir=$VenvDir" +} + +# Next, read the `pyvenv.cfg` file to determine any required value such +# as `prompt`. +$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir + +# Next, set the prompt from the command line, or the config file, or +# just use the name of the virtual environment folder. +if ($Prompt) { + Write-Verbose "Prompt specified as argument, using '$Prompt'" +} +else { + Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" + if ($pyvenvCfg -and $pyvenvCfg['prompt']) { + Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" + $Prompt = $pyvenvCfg['prompt']; + } + else { + Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" + Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" + $Prompt = Split-Path -Path $venvDir -Leaf + } +} + +Write-Verbose "Prompt = '$Prompt'" +Write-Verbose "VenvDir='$VenvDir'" + +# Deactivate any currently active virtual environment, but leave the +# deactivate function in place. +deactivate -nondestructive + +# Now set the environment variable VIRTUAL_ENV, used by many tools to determine +# that there is an activated venv. +$env:VIRTUAL_ENV = $VenvDir + +if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { + + Write-Verbose "Setting prompt to '$Prompt'" + + # Set the prompt to include the env name + # Make sure _OLD_VIRTUAL_PROMPT is global + function global:_OLD_VIRTUAL_PROMPT { "" } + Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT + New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt + + function global:prompt { + Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " + _OLD_VIRTUAL_PROMPT + } + $env:VIRTUAL_ENV_PROMPT = $Prompt +} + +# Clear PYTHONHOME +if (Test-Path -Path Env:PYTHONHOME) { + Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME + Remove-Item -Path Env:PYTHONHOME +} + +# Add the venv to the PATH +Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH +$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/venv/bin/activate b/venv/bin/activate new file mode 100644 index 00000000..8f23a465 --- /dev/null +++ b/venv/bin/activate @@ -0,0 +1,70 @@ +# This file must be used with "source bin/activate" *from bash* +# You cannot run it directly + +deactivate () { + # reset old environment variables + if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then + PATH="${_OLD_VIRTUAL_PATH:-}" + export PATH + unset _OLD_VIRTUAL_PATH + fi + if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then + PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" + export PYTHONHOME + unset _OLD_VIRTUAL_PYTHONHOME + fi + + # Call hash to forget past commands. Without forgetting + # past commands the $PATH changes we made may not be respected + hash -r 2> /dev/null + + if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then + PS1="${_OLD_VIRTUAL_PS1:-}" + export PS1 + unset _OLD_VIRTUAL_PS1 + fi + + unset VIRTUAL_ENV + unset VIRTUAL_ENV_PROMPT + if [ ! "${1:-}" = "nondestructive" ] ; then + # Self destruct! + unset -f deactivate + fi +} + +# unset irrelevant variables +deactivate nondestructive + +# on Windows, a path can contain colons and backslashes and has to be converted: +if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then + # transform D:\path\to\venv to /d/path/to/venv on MSYS + # and to /cygdrive/d/path/to/venv on Cygwin + export VIRTUAL_ENV=$(cygpath /home/vansh/Desktop/brainnumpyfix/brian2tools/venv) +else + # use the path as-is + export VIRTUAL_ENV=/home/vansh/Desktop/brainnumpyfix/brian2tools/venv +fi + +_OLD_VIRTUAL_PATH="$PATH" +PATH="$VIRTUAL_ENV/"bin":$PATH" +export PATH + +# unset PYTHONHOME if set +# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) +# could use `if (set -u; : $PYTHONHOME) ;` in bash +if [ -n "${PYTHONHOME:-}" ] ; then + _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" + unset PYTHONHOME +fi + +if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then + _OLD_VIRTUAL_PS1="${PS1:-}" + PS1='(venv) '"${PS1:-}" + export PS1 + VIRTUAL_ENV_PROMPT='(venv) ' + export VIRTUAL_ENV_PROMPT +fi + +# Call hash to forget past commands. Without forgetting +# past commands the $PATH changes we made may not be respected +hash -r 2> /dev/null diff --git a/venv/bin/activate.csh b/venv/bin/activate.csh new file mode 100644 index 00000000..f8d17bac --- /dev/null +++ b/venv/bin/activate.csh @@ -0,0 +1,27 @@ +# This file must be used with "source bin/activate.csh" *from csh*. +# You cannot run it directly. + +# Created by Davide Di Blasi . +# Ported to Python 3.3 venv by Andrew Svetlov + +alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' + +# Unset irrelevant variables. +deactivate nondestructive + +setenv VIRTUAL_ENV /home/vansh/Desktop/brainnumpyfix/brian2tools/venv + +set _OLD_VIRTUAL_PATH="$PATH" +setenv PATH "$VIRTUAL_ENV/"bin":$PATH" + + +set _OLD_VIRTUAL_PROMPT="$prompt" + +if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then + set prompt = '(venv) '"$prompt" + setenv VIRTUAL_ENV_PROMPT '(venv) ' +endif + +alias pydoc python -m pydoc + +rehash diff --git a/venv/bin/activate.fish b/venv/bin/activate.fish new file mode 100644 index 00000000..7b887566 --- /dev/null +++ b/venv/bin/activate.fish @@ -0,0 +1,69 @@ +# This file must be used with "source /bin/activate.fish" *from fish* +# (https://fishshell.com/). You cannot run it directly. + +function deactivate -d "Exit virtual environment and return to normal shell environment" + # reset old environment variables + if test -n "$_OLD_VIRTUAL_PATH" + set -gx PATH $_OLD_VIRTUAL_PATH + set -e _OLD_VIRTUAL_PATH + end + if test -n "$_OLD_VIRTUAL_PYTHONHOME" + set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME + set -e _OLD_VIRTUAL_PYTHONHOME + end + + if test -n "$_OLD_FISH_PROMPT_OVERRIDE" + set -e _OLD_FISH_PROMPT_OVERRIDE + # prevents error when using nested fish instances (Issue #93858) + if functions -q _old_fish_prompt + functions -e fish_prompt + functions -c _old_fish_prompt fish_prompt + functions -e _old_fish_prompt + end + end + + set -e VIRTUAL_ENV + set -e VIRTUAL_ENV_PROMPT + if test "$argv[1]" != "nondestructive" + # Self-destruct! + functions -e deactivate + end +end + +# Unset irrelevant variables. +deactivate nondestructive + +set -gx VIRTUAL_ENV /home/vansh/Desktop/brainnumpyfix/brian2tools/venv + +set -gx _OLD_VIRTUAL_PATH $PATH +set -gx PATH "$VIRTUAL_ENV/"bin $PATH + +# Unset PYTHONHOME if set. +if set -q PYTHONHOME + set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME + set -e PYTHONHOME +end + +if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" + # fish uses a function instead of an env var to generate the prompt. + + # Save the current fish_prompt function as the function _old_fish_prompt. + functions -c fish_prompt _old_fish_prompt + + # With the original prompt function renamed, we can override with our own. + function fish_prompt + # Save the return status of the last command. + set -l old_status $status + + # Output the venv prompt; color taken from the blue of the Python logo. + printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal) + + # Restore the return status of the previous command. + echo "exit $old_status" | . + # Output the original/"old" prompt. + _old_fish_prompt + end + + set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" + set -gx VIRTUAL_ENV_PROMPT '(venv) ' +end diff --git a/venv/bin/cpuinfo b/venv/bin/cpuinfo new file mode 100755 index 00000000..48fd5e5b --- /dev/null +++ b/venv/bin/cpuinfo @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from cpuinfo import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/cygdb b/venv/bin/cygdb new file mode 100755 index 00000000..be9dad09 --- /dev/null +++ b/venv/bin/cygdb @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from Cython.Debugger.Cygdb import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/cython b/venv/bin/cython new file mode 100755 index 00000000..0436aa22 --- /dev/null +++ b/venv/bin/cython @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from Cython.Compiler.Main import setuptools_main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(setuptools_main()) diff --git a/venv/bin/cythonize b/venv/bin/cythonize new file mode 100755 index 00000000..3a354036 --- /dev/null +++ b/venv/bin/cythonize @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from Cython.Build.Cythonize import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/f2py b/venv/bin/f2py new file mode 100755 index 00000000..c3ce3383 --- /dev/null +++ b/venv/bin/f2py @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from numpy.f2py.f2py2e import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/fonttools b/venv/bin/fonttools new file mode 100755 index 00000000..68c12f39 --- /dev/null +++ b/venv/bin/fonttools @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/isympy b/venv/bin/isympy new file mode 100755 index 00000000..7f8fbbc0 --- /dev/null +++ b/venv/bin/isympy @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from isympy import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/natsort b/venv/bin/natsort new file mode 100755 index 00000000..b2567748 --- /dev/null +++ b/venv/bin/natsort @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from natsort.__main__ import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/normalizer b/venv/bin/normalizer new file mode 100755 index 00000000..0cc3ef25 --- /dev/null +++ b/venv/bin/normalizer @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from charset_normalizer.cli import cli_detect +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(cli_detect()) diff --git a/venv/bin/numpy-config b/venv/bin/numpy-config new file mode 100755 index 00000000..66eaabe1 --- /dev/null +++ b/venv/bin/numpy-config @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from numpy._configtool import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/parquet-to-blosc2 b/venv/bin/parquet-to-blosc2 new file mode 100755 index 00000000..4f0aa0e3 --- /dev/null +++ b/venv/bin/parquet-to-blosc2 @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from blosc2.cli.parquet_to_blosc2 import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip b/venv/bin/pip new file mode 100755 index 00000000..857f7842 --- /dev/null +++ b/venv/bin/pip @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip3 b/venv/bin/pip3 new file mode 100755 index 00000000..857f7842 --- /dev/null +++ b/venv/bin/pip3 @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pip3.12 b/venv/bin/pip3.12 new file mode 100755 index 00000000..857f7842 --- /dev/null +++ b/venv/bin/pip3.12 @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from pip._internal.cli.main import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pt2to3 b/venv/bin/pt2to3 new file mode 100755 index 00000000..cecae1cd --- /dev/null +++ b/venv/bin/pt2to3 @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tables.scripts.pt2to3 import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/ptdump b/venv/bin/ptdump new file mode 100755 index 00000000..a6de5dcd --- /dev/null +++ b/venv/bin/ptdump @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tables.scripts.ptdump import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/ptrepack b/venv/bin/ptrepack new file mode 100755 index 00000000..e5ed1cb2 --- /dev/null +++ b/venv/bin/ptrepack @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tables.scripts.ptrepack import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pttree b/venv/bin/pttree new file mode 100755 index 00000000..d2e91ef4 --- /dev/null +++ b/venv/bin/pttree @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from tables.scripts.pttree import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pyftmerge b/venv/bin/pyftmerge new file mode 100755 index 00000000..39ff4e20 --- /dev/null +++ b/venv/bin/pyftmerge @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.merge import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pyftsubset b/venv/bin/pyftsubset new file mode 100755 index 00000000..829e28c4 --- /dev/null +++ b/venv/bin/pyftsubset @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.subset import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/pylems b/venv/bin/pylems new file mode 100755 index 00000000..d64d506b --- /dev/null +++ b/venv/bin/pylems @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from lems.run import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/python b/venv/bin/python new file mode 120000 index 00000000..b8a0adbb --- /dev/null +++ b/venv/bin/python @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/venv/bin/python3 b/venv/bin/python3 new file mode 120000 index 00000000..ae65fdaa --- /dev/null +++ b/venv/bin/python3 @@ -0,0 +1 @@ +/usr/bin/python3 \ No newline at end of file diff --git a/venv/bin/python3.12 b/venv/bin/python3.12 new file mode 120000 index 00000000..b8a0adbb --- /dev/null +++ b/venv/bin/python3.12 @@ -0,0 +1 @@ +python3 \ No newline at end of file diff --git a/venv/bin/setuptools-scm b/venv/bin/setuptools-scm new file mode 100755 index 00000000..92950d22 --- /dev/null +++ b/venv/bin/setuptools-scm @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from vcs_versioning._cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/ttx b/venv/bin/ttx new file mode 100755 index 00000000..cee0ce8b --- /dev/null +++ b/venv/bin/ttx @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from fontTools.ttx import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/bin/vcs-versioning b/venv/bin/vcs-versioning new file mode 100755 index 00000000..92950d22 --- /dev/null +++ b/venv/bin/vcs-versioning @@ -0,0 +1,8 @@ +#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 +# -*- coding: utf-8 -*- +import re +import sys +from vcs_versioning._cli import main +if __name__ == '__main__': + sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) + sys.exit(main()) diff --git a/venv/lib64 b/venv/lib64 new file mode 120000 index 00000000..7951405f --- /dev/null +++ b/venv/lib64 @@ -0,0 +1 @@ +lib \ No newline at end of file diff --git a/venv/pyvenv.cfg b/venv/pyvenv.cfg new file mode 100644 index 00000000..5d43c939 --- /dev/null +++ b/venv/pyvenv.cfg @@ -0,0 +1,5 @@ +home = /usr/bin +include-system-site-packages = false +version = 3.12.3 +executable = /usr/bin/python3.12 +command = /usr/bin/python3 -m venv /home/vansh/Desktop/brainnumpyfix/brian2tools/venv diff --git a/venv/share/man/man1/isympy.1 b/venv/share/man/man1/isympy.1 new file mode 100644 index 00000000..0ff96615 --- /dev/null +++ b/venv/share/man/man1/isympy.1 @@ -0,0 +1,188 @@ +'\" -*- coding: us-ascii -*- +.if \n(.g .ds T< \\FC +.if \n(.g .ds T> \\F[\n[.fam]] +.de URL +\\$2 \(la\\$1\(ra\\$3 +.. +.if \n(.g .mso www.tmac +.TH isympy 1 2007-10-8 "" "" +.SH NAME +isympy \- interactive shell for SymPy +.SH SYNOPSIS +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ +-- | PYTHONOPTIONS] +'in \n(.iu-\nxu +.ad b +'hy +'nh +.fi +.ad l +\fBisympy\fR \kx +.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) +'in \n(.iu+\nxu +[ +{\fB-h\fR | \fB--help\fR} +| +{\fB-v\fR | \fB--version\fR} +] +'in \n(.iu-\nxu +.ad b +'hy +.SH DESCRIPTION +isympy is a Python shell for SymPy. It is just a normal python shell +(ipython shell if you have the ipython package installed) that executes +the following commands so that you don't have to: +.PP +.nf +\*(T< +>>> from __future__ import division +>>> from sympy import * +>>> x, y, z = symbols("x,y,z") +>>> k, m, n = symbols("k,m,n", integer=True) + \*(T> +.fi +.PP +So starting isympy is equivalent to starting python (or ipython) and +executing the above commands by hand. It is intended for easy and quick +experimentation with SymPy. For more complicated programs, it is recommended +to write a script and import things explicitly (using the "from sympy +import sin, log, Symbol, ..." idiom). +.SH OPTIONS +.TP +\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR +Use the specified shell (python or ipython) as +console backend instead of the default one (ipython +if present or python otherwise). + +Example: isympy -c python + +\fISHELL\fR could be either +\&'ipython' or 'python' +.TP +\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR +Setup pretty printing in SymPy. By default, the most pretty, unicode +printing is enabled (if the terminal supports it). You can use less +pretty ASCII printing instead or no pretty printing at all. + +Example: isympy -p no + +\fIENCODING\fR must be one of 'unicode', +\&'ascii' or 'no'. +.TP +\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR +Setup the ground types for the polys. By default, gmpy ground types +are used if gmpy2 or gmpy is installed, otherwise it falls back to python +ground types, which are a little bit slower. You can manually +choose python ground types even if gmpy is installed (e.g., for testing purposes). + +Note that sympy ground types are not supported, and should be used +only for experimental purposes. + +Note that the gmpy1 ground type is primarily intended for testing; it the +use of gmpy even if gmpy2 is available. + +This is the same as setting the environment variable +SYMPY_GROUND_TYPES to the given ground type (e.g., +SYMPY_GROUND_TYPES='gmpy') + +The ground types can be determined interactively from the variable +sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. + +Example: isympy -t python + +\fITYPE\fR must be one of 'gmpy', +\&'gmpy1' or 'python'. +.TP +\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR +Setup the ordering of terms for printing. The default is lex, which +orders terms lexicographically (e.g., x**2 + x + 1). You can choose +other orderings, such as rev-lex, which will use reverse +lexicographic ordering (e.g., 1 + x + x**2). + +Note that for very large expressions, ORDER='none' may speed up +printing considerably, with the tradeoff that the order of the terms +in the printed expression will have no canonical order + +Example: isympy -o rev-lax + +\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', +\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. +.TP +\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> +Print only Python's and SymPy's versions to stdout at startup, and nothing else. +.TP +\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> +Use the same format that should be used for doctests. This is +equivalent to '\fIisympy -c python -p no\fR'. +.TP +\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> +Disable the caching mechanism. Disabling the cache may slow certain +operations down considerably. This is useful for testing the cache, +or for benchmarking, as the cache can result in deceptive benchmark timings. + +This is the same as setting the environment variable SYMPY_USE_CACHE +to 'no'. +.TP +\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> +Automatically create missing symbols. Normally, typing a name of a +Symbol that has not been instantiated first would raise NameError, +but with this option enabled, any undefined name will be +automatically created as a Symbol. This only works in IPython 0.11. + +Note that this is intended only for interactive, calculator style +usage. In a script that uses SymPy, Symbols should be instantiated +at the top, so that it's clear what they are. + +This will not override any names that are already defined, which +includes the single character letters represented by the mnemonic +QCOSINE (see the "Gotchas and Pitfalls" document in the +documentation). You can delete existing names by executing "del +name" in the shell itself. You can see if a name is defined by typing +"'name' in globals()". + +The Symbols that are created using this have default assumptions. +If you want to place assumptions on symbols, you should create them +using symbols() or var(). + +Finally, this only works in the top level namespace. So, for +example, if you define a function in isympy with an undefined +Symbol, it will not work. +.TP +\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> +Enable debugging output. This is the same as setting the +environment variable SYMPY_DEBUG to 'True'. The debug status is set +in the variable SYMPY_DEBUG within isympy. +.TP +-- \fIPYTHONOPTIONS\fR +These options will be passed on to \fIipython (1)\fR shell. +Only supported when ipython is being used (standard python shell not supported). + +Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR +from the other isympy options. + +For example, to run iSymPy without startup banner and colors: + +isympy -q -c ipython -- --colors=NoColor +.TP +\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> +Print help output and exit. +.TP +\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> +Print isympy version information and exit. +.SH FILES +.TP +\*(T<\fI${HOME}/.sympy\-history\fR\*(T> +Saves the history of commands when using the python +shell as backend. +.SH BUGS +The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra +Please report all bugs that you find in there, this will help improve +the overall quality of SymPy. +.SH "SEE ALSO" +\fBipython\fR(1), \fBpython\fR(1) diff --git a/venv/share/man/man1/ttx.1 b/venv/share/man/man1/ttx.1 new file mode 100644 index 00000000..bba23b5e --- /dev/null +++ b/venv/share/man/man1/ttx.1 @@ -0,0 +1,225 @@ +.Dd May 18, 2004 +.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) +.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to +.\" be used, so I give a zero-width space as its argument. +.Os \& +.\" The "FontTools Manual" argument apparently has no effect in +.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. +.Dt TTX 1 "FontTools Manual" +.Sh NAME +.Nm ttx +.Nd tool for manipulating TrueType and OpenType fonts +.Sh SYNOPSIS +.Nm +.Bk +.Op Ar option ... +.Ek +.Bk +.Ar file ... +.Ek +.Sh DESCRIPTION +.Nm +is a tool for manipulating TrueType and OpenType fonts. It can convert +TrueType and OpenType fonts to and from an +.Tn XML Ns -based format called +.Tn TTX . +.Tn TTX +files have a +.Ql .ttx +extension. +.Pp +For each +.Ar file +argument it is given, +.Nm +detects whether it is a +.Ql .ttf , +.Ql .otf +or +.Ql .ttx +file and acts accordingly: if it is a +.Ql .ttf +or +.Ql .otf +file, it generates a +.Ql .ttx +file; if it is a +.Ql .ttx +file, it generates a +.Ql .ttf +or +.Ql .otf +file. +.Pp +By default, every output file is created in the same directory as the +corresponding input file and with the same name except for the +extension, which is substituted appropriately. +.Nm +never overwrites existing files; if necessary, it appends a suffix to +the output file name before the extension, as in +.Pa Arial#1.ttf . +.Ss "General options" +.Bl -tag -width ".Fl t Ar table" +.It Fl h +Display usage information. +.It Fl d Ar dir +Write the output files to directory +.Ar dir +instead of writing every output file to the same directory as the +corresponding input file. +.It Fl o Ar file +Write the output to +.Ar file +instead of writing it to the same directory as the +corresponding input file. +.It Fl v +Be verbose. Write more messages to the standard output describing what +is being done. +.It Fl a +Allow virtual glyphs ID's on compile or decompile. +.El +.Ss "Dump options" +The following options control the process of dumping font files +(TrueType or OpenType) to +.Tn TTX +files. +.Bl -tag -width ".Fl t Ar table" +.It Fl l +List table information. Instead of dumping the font to a +.Tn TTX +file, display minimal information about each table. +.It Fl t Ar table +Dump table +.Ar table . +This option may be given multiple times to dump several tables at +once. When not specified, all tables are dumped. +.It Fl x Ar table +Exclude table +.Ar table +from the list of tables to dump. This option may be given multiple +times to exclude several tables from the dump. The +.Fl t +and +.Fl x +options are mutually exclusive. +.It Fl s +Split tables. Dump each table to a separate +.Tn TTX +file and write (under the name that would have been used for the output +file if the +.Fl s +option had not been given) one small +.Tn TTX +file containing references to the individual table dump files. This +file can be used as input to +.Nm +as long as the referenced files can be found in the same directory. +.It Fl i +.\" XXX: I suppose OpenType programs (exist and) are also affected. +Don't disassemble TrueType instructions. When this option is specified, +all TrueType programs (glyph programs, the font program and the +pre-program) are written to the +.Tn TTX +file as hexadecimal data instead of +assembly. This saves some time and results in smaller +.Tn TTX +files. +.It Fl y Ar n +When decompiling a TrueType Collection (TTC) file, +decompile font number +.Ar n , +starting from 0. +.El +.Ss "Compilation options" +The following options control the process of compiling +.Tn TTX +files into font files (TrueType or OpenType): +.Bl -tag -width ".Fl t Ar table" +.It Fl m Ar fontfile +Merge the input +.Tn TTX +file +.Ar file +with +.Ar fontfile . +No more than one +.Ar file +argument can be specified when this option is used. +.It Fl b +Don't recalculate glyph bounding boxes. Use the values in the +.Tn TTX +file as is. +.El +.Sh "THE TTX FILE FORMAT" +You can find some information about the +.Tn TTX +file format in +.Pa documentation.html . +In particular, you will find in that file the list of tables understood by +.Nm +and the relations between TrueType GlyphIDs and the glyph names used in +.Tn TTX +files. +.Sh EXAMPLES +In the following examples, all files are read from and written to the +current directory. Additionally, the name given for the output file +assumes in every case that it did not exist before +.Nm +was invoked. +.Pp +Dump the TrueType font contained in +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx FreeSans.ttf +.Pp +Compile +.Pa MyFont.ttx +into a TrueType or OpenType font file: +.Pp +.Dl ttx MyFont.ttx +.Pp +List the tables in +.Pa FreeSans.ttf +along with some information: +.Pp +.Dl ttx -l FreeSans.ttf +.Pp +Dump the +.Sq cmap +table from +.Pa FreeSans.ttf +to +.Pa FreeSans.ttx : +.Pp +.Dl ttx -t cmap FreeSans.ttf +.Sh NOTES +On MS\-Windows and MacOS, +.Nm +is available as a graphical application to which files can be dropped. +.Sh SEE ALSO +.Pa documentation.html +.Pp +.Xr fontforge 1 , +.Xr ftinfo 1 , +.Xr gfontview 1 , +.Xr xmbdfed 1 , +.Xr Font::TTF 3pm +.Sh AUTHORS +.Nm +was written by +.An -nosplit +.An "Just van Rossum" Aq just@letterror.com . +.Pp +This manual page was written by +.An "Florent Rougon" Aq f.rougon@free.fr +for the Debian GNU/Linux system based on the existing FontTools +documentation. It may be freely used, modified and distributed without +restrictions. +.\" For Emacs: +.\" Local Variables: +.\" fill-column: 72 +.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" +.\" sentence-end-double-space: t +.\" End: \ No newline at end of file From 17a897e38ac641c2d8f135d1738dfc37e216a0ae Mon Sep 17 00:00:00 2001 From: vanshapple Date: Sun, 17 May 2026 16:39:07 +0530 Subject: [PATCH 2/2] Remove virtual environment from repository --- venv/bin/Activate.ps1 | 247 ----------------------------------- venv/bin/activate | 70 ---------- venv/bin/activate.csh | 27 ---- venv/bin/activate.fish | 69 ---------- venv/bin/cpuinfo | 8 -- venv/bin/cygdb | 8 -- venv/bin/cython | 8 -- venv/bin/cythonize | 8 -- venv/bin/f2py | 8 -- venv/bin/fonttools | 8 -- venv/bin/isympy | 8 -- venv/bin/natsort | 8 -- venv/bin/normalizer | 8 -- venv/bin/numpy-config | 8 -- venv/bin/parquet-to-blosc2 | 8 -- venv/bin/pip | 8 -- venv/bin/pip3 | 8 -- venv/bin/pip3.12 | 8 -- venv/bin/pt2to3 | 8 -- venv/bin/ptdump | 8 -- venv/bin/ptrepack | 8 -- venv/bin/pttree | 8 -- venv/bin/pyftmerge | 8 -- venv/bin/pyftsubset | 8 -- venv/bin/pylems | 8 -- venv/bin/python | 1 - venv/bin/python3 | 1 - venv/bin/python3.12 | 1 - venv/bin/setuptools-scm | 8 -- venv/bin/ttx | 8 -- venv/bin/vcs-versioning | 8 -- venv/lib64 | 1 - venv/pyvenv.cfg | 5 - venv/share/man/man1/isympy.1 | 188 -------------------------- venv/share/man/man1/ttx.1 | 225 ------------------------------- 35 files changed, 1027 deletions(-) delete mode 100644 venv/bin/Activate.ps1 delete mode 100644 venv/bin/activate delete mode 100644 venv/bin/activate.csh delete mode 100644 venv/bin/activate.fish delete mode 100755 venv/bin/cpuinfo delete mode 100755 venv/bin/cygdb delete mode 100755 venv/bin/cython delete mode 100755 venv/bin/cythonize delete mode 100755 venv/bin/f2py delete mode 100755 venv/bin/fonttools delete mode 100755 venv/bin/isympy delete mode 100755 venv/bin/natsort delete mode 100755 venv/bin/normalizer delete mode 100755 venv/bin/numpy-config delete mode 100755 venv/bin/parquet-to-blosc2 delete mode 100755 venv/bin/pip delete mode 100755 venv/bin/pip3 delete mode 100755 venv/bin/pip3.12 delete mode 100755 venv/bin/pt2to3 delete mode 100755 venv/bin/ptdump delete mode 100755 venv/bin/ptrepack delete mode 100755 venv/bin/pttree delete mode 100755 venv/bin/pyftmerge delete mode 100755 venv/bin/pyftsubset delete mode 100755 venv/bin/pylems delete mode 120000 venv/bin/python delete mode 120000 venv/bin/python3 delete mode 120000 venv/bin/python3.12 delete mode 100755 venv/bin/setuptools-scm delete mode 100755 venv/bin/ttx delete mode 100755 venv/bin/vcs-versioning delete mode 120000 venv/lib64 delete mode 100644 venv/pyvenv.cfg delete mode 100644 venv/share/man/man1/isympy.1 delete mode 100644 venv/share/man/man1/ttx.1 diff --git a/venv/bin/Activate.ps1 b/venv/bin/Activate.ps1 deleted file mode 100644 index b49d77ba..00000000 --- a/venv/bin/Activate.ps1 +++ /dev/null @@ -1,247 +0,0 @@ -<# -.Synopsis -Activate a Python virtual environment for the current PowerShell session. - -.Description -Pushes the python executable for a virtual environment to the front of the -$Env:PATH environment variable and sets the prompt to signify that you are -in a Python virtual environment. Makes use of the command line switches as -well as the `pyvenv.cfg` file values present in the virtual environment. - -.Parameter VenvDir -Path to the directory that contains the virtual environment to activate. The -default value for this is the parent of the directory that the Activate.ps1 -script is located within. - -.Parameter Prompt -The prompt prefix to display when this virtual environment is activated. By -default, this prompt is the name of the virtual environment folder (VenvDir) -surrounded by parentheses and followed by a single space (ie. '(.venv) '). - -.Example -Activate.ps1 -Activates the Python virtual environment that contains the Activate.ps1 script. - -.Example -Activate.ps1 -Verbose -Activates the Python virtual environment that contains the Activate.ps1 script, -and shows extra information about the activation as it executes. - -.Example -Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv -Activates the Python virtual environment located in the specified location. - -.Example -Activate.ps1 -Prompt "MyPython" -Activates the Python virtual environment that contains the Activate.ps1 script, -and prefixes the current prompt with the specified string (surrounded in -parentheses) while the virtual environment is active. - -.Notes -On Windows, it may be required to enable this Activate.ps1 script by setting the -execution policy for the user. You can do this by issuing the following PowerShell -command: - -PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - -For more information on Execution Policies: -https://go.microsoft.com/fwlink/?LinkID=135170 - -#> -Param( - [Parameter(Mandatory = $false)] - [String] - $VenvDir, - [Parameter(Mandatory = $false)] - [String] - $Prompt -) - -<# Function declarations --------------------------------------------------- #> - -<# -.Synopsis -Remove all shell session elements added by the Activate script, including the -addition of the virtual environment's Python executable from the beginning of -the PATH variable. - -.Parameter NonDestructive -If present, do not remove this function from the global namespace for the -session. - -#> -function global:deactivate ([switch]$NonDestructive) { - # Revert to original values - - # The prior prompt: - if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) { - Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt - Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT - } - - # The prior PYTHONHOME: - if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) { - Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME - Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME - } - - # The prior PATH: - if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) { - Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH - Remove-Item -Path Env:_OLD_VIRTUAL_PATH - } - - # Just remove the VIRTUAL_ENV altogether: - if (Test-Path -Path Env:VIRTUAL_ENV) { - Remove-Item -Path env:VIRTUAL_ENV - } - - # Just remove VIRTUAL_ENV_PROMPT altogether. - if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) { - Remove-Item -Path env:VIRTUAL_ENV_PROMPT - } - - # Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether: - if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) { - Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force - } - - # Leave deactivate function in the global namespace if requested: - if (-not $NonDestructive) { - Remove-Item -Path function:deactivate - } -} - -<# -.Description -Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the -given folder, and returns them in a map. - -For each line in the pyvenv.cfg file, if that line can be parsed into exactly -two strings separated by `=` (with any amount of whitespace surrounding the =) -then it is considered a `key = value` line. The left hand string is the key, -the right hand is the value. - -If the value starts with a `'` or a `"` then the first and last character is -stripped from the value before being captured. - -.Parameter ConfigDir -Path to the directory that contains the `pyvenv.cfg` file. -#> -function Get-PyVenvConfig( - [String] - $ConfigDir -) { - Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg" - - # Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue). - $pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue - - # An empty map will be returned if no config file is found. - $pyvenvConfig = @{ } - - if ($pyvenvConfigPath) { - - Write-Verbose "File exists, parse `key = value` lines" - $pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath - - $pyvenvConfigContent | ForEach-Object { - $keyval = $PSItem -split "\s*=\s*", 2 - if ($keyval[0] -and $keyval[1]) { - $val = $keyval[1] - - # Remove extraneous quotations around a string value. - if ("'""".Contains($val.Substring(0, 1))) { - $val = $val.Substring(1, $val.Length - 2) - } - - $pyvenvConfig[$keyval[0]] = $val - Write-Verbose "Adding Key: '$($keyval[0])'='$val'" - } - } - } - return $pyvenvConfig -} - - -<# Begin Activate script --------------------------------------------------- #> - -# Determine the containing directory of this script -$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition -$VenvExecDir = Get-Item -Path $VenvExecPath - -Write-Verbose "Activation script is located in path: '$VenvExecPath'" -Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)" -Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)" - -# Set values required in priority: CmdLine, ConfigFile, Default -# First, get the location of the virtual environment, it might not be -# VenvExecDir if specified on the command line. -if ($VenvDir) { - Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values" -} -else { - Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir." - $VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/") - Write-Verbose "VenvDir=$VenvDir" -} - -# Next, read the `pyvenv.cfg` file to determine any required value such -# as `prompt`. -$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir - -# Next, set the prompt from the command line, or the config file, or -# just use the name of the virtual environment folder. -if ($Prompt) { - Write-Verbose "Prompt specified as argument, using '$Prompt'" -} -else { - Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value" - if ($pyvenvCfg -and $pyvenvCfg['prompt']) { - Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'" - $Prompt = $pyvenvCfg['prompt']; - } - else { - Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)" - Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'" - $Prompt = Split-Path -Path $venvDir -Leaf - } -} - -Write-Verbose "Prompt = '$Prompt'" -Write-Verbose "VenvDir='$VenvDir'" - -# Deactivate any currently active virtual environment, but leave the -# deactivate function in place. -deactivate -nondestructive - -# Now set the environment variable VIRTUAL_ENV, used by many tools to determine -# that there is an activated venv. -$env:VIRTUAL_ENV = $VenvDir - -if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) { - - Write-Verbose "Setting prompt to '$Prompt'" - - # Set the prompt to include the env name - # Make sure _OLD_VIRTUAL_PROMPT is global - function global:_OLD_VIRTUAL_PROMPT { "" } - Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT - New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt - - function global:prompt { - Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) " - _OLD_VIRTUAL_PROMPT - } - $env:VIRTUAL_ENV_PROMPT = $Prompt -} - -# Clear PYTHONHOME -if (Test-Path -Path Env:PYTHONHOME) { - Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME - Remove-Item -Path Env:PYTHONHOME -} - -# Add the venv to the PATH -Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH -$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH" diff --git a/venv/bin/activate b/venv/bin/activate deleted file mode 100644 index 8f23a465..00000000 --- a/venv/bin/activate +++ /dev/null @@ -1,70 +0,0 @@ -# This file must be used with "source bin/activate" *from bash* -# You cannot run it directly - -deactivate () { - # reset old environment variables - if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then - PATH="${_OLD_VIRTUAL_PATH:-}" - export PATH - unset _OLD_VIRTUAL_PATH - fi - if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then - PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" - export PYTHONHOME - unset _OLD_VIRTUAL_PYTHONHOME - fi - - # Call hash to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - hash -r 2> /dev/null - - if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then - PS1="${_OLD_VIRTUAL_PS1:-}" - export PS1 - unset _OLD_VIRTUAL_PS1 - fi - - unset VIRTUAL_ENV - unset VIRTUAL_ENV_PROMPT - if [ ! "${1:-}" = "nondestructive" ] ; then - # Self destruct! - unset -f deactivate - fi -} - -# unset irrelevant variables -deactivate nondestructive - -# on Windows, a path can contain colons and backslashes and has to be converted: -if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then - # transform D:\path\to\venv to /d/path/to/venv on MSYS - # and to /cygdrive/d/path/to/venv on Cygwin - export VIRTUAL_ENV=$(cygpath /home/vansh/Desktop/brainnumpyfix/brian2tools/venv) -else - # use the path as-is - export VIRTUAL_ENV=/home/vansh/Desktop/brainnumpyfix/brian2tools/venv -fi - -_OLD_VIRTUAL_PATH="$PATH" -PATH="$VIRTUAL_ENV/"bin":$PATH" -export PATH - -# unset PYTHONHOME if set -# this will fail if PYTHONHOME is set to the empty string (which is bad anyway) -# could use `if (set -u; : $PYTHONHOME) ;` in bash -if [ -n "${PYTHONHOME:-}" ] ; then - _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" - unset PYTHONHOME -fi - -if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then - _OLD_VIRTUAL_PS1="${PS1:-}" - PS1='(venv) '"${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT='(venv) ' - export VIRTUAL_ENV_PROMPT -fi - -# Call hash to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -hash -r 2> /dev/null diff --git a/venv/bin/activate.csh b/venv/bin/activate.csh deleted file mode 100644 index f8d17bac..00000000 --- a/venv/bin/activate.csh +++ /dev/null @@ -1,27 +0,0 @@ -# This file must be used with "source bin/activate.csh" *from csh*. -# You cannot run it directly. - -# Created by Davide Di Blasi . -# Ported to Python 3.3 venv by Andrew Svetlov - -alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate' - -# Unset irrelevant variables. -deactivate nondestructive - -setenv VIRTUAL_ENV /home/vansh/Desktop/brainnumpyfix/brian2tools/venv - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/"bin":$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = '(venv) '"$prompt" - setenv VIRTUAL_ENV_PROMPT '(venv) ' -endif - -alias pydoc python -m pydoc - -rehash diff --git a/venv/bin/activate.fish b/venv/bin/activate.fish deleted file mode 100644 index 7b887566..00000000 --- a/venv/bin/activate.fish +++ /dev/null @@ -1,69 +0,0 @@ -# This file must be used with "source /bin/activate.fish" *from fish* -# (https://fishshell.com/). You cannot run it directly. - -function deactivate -d "Exit virtual environment and return to normal shell environment" - # reset old environment variables - if test -n "$_OLD_VIRTUAL_PATH" - set -gx PATH $_OLD_VIRTUAL_PATH - set -e _OLD_VIRTUAL_PATH - end - if test -n "$_OLD_VIRTUAL_PYTHONHOME" - set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME - set -e _OLD_VIRTUAL_PYTHONHOME - end - - if test -n "$_OLD_FISH_PROMPT_OVERRIDE" - set -e _OLD_FISH_PROMPT_OVERRIDE - # prevents error when using nested fish instances (Issue #93858) - if functions -q _old_fish_prompt - functions -e fish_prompt - functions -c _old_fish_prompt fish_prompt - functions -e _old_fish_prompt - end - end - - set -e VIRTUAL_ENV - set -e VIRTUAL_ENV_PROMPT - if test "$argv[1]" != "nondestructive" - # Self-destruct! - functions -e deactivate - end -end - -# Unset irrelevant variables. -deactivate nondestructive - -set -gx VIRTUAL_ENV /home/vansh/Desktop/brainnumpyfix/brian2tools/venv - -set -gx _OLD_VIRTUAL_PATH $PATH -set -gx PATH "$VIRTUAL_ENV/"bin $PATH - -# Unset PYTHONHOME if set. -if set -q PYTHONHOME - set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME - set -e PYTHONHOME -end - -if test -z "$VIRTUAL_ENV_DISABLE_PROMPT" - # fish uses a function instead of an env var to generate the prompt. - - # Save the current fish_prompt function as the function _old_fish_prompt. - functions -c fish_prompt _old_fish_prompt - - # With the original prompt function renamed, we can override with our own. - function fish_prompt - # Save the return status of the last command. - set -l old_status $status - - # Output the venv prompt; color taken from the blue of the Python logo. - printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal) - - # Restore the return status of the previous command. - echo "exit $old_status" | . - # Output the original/"old" prompt. - _old_fish_prompt - end - - set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV" - set -gx VIRTUAL_ENV_PROMPT '(venv) ' -end diff --git a/venv/bin/cpuinfo b/venv/bin/cpuinfo deleted file mode 100755 index 48fd5e5b..00000000 --- a/venv/bin/cpuinfo +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from cpuinfo import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/cygdb b/venv/bin/cygdb deleted file mode 100755 index be9dad09..00000000 --- a/venv/bin/cygdb +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from Cython.Debugger.Cygdb import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/cython b/venv/bin/cython deleted file mode 100755 index 0436aa22..00000000 --- a/venv/bin/cython +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from Cython.Compiler.Main import setuptools_main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(setuptools_main()) diff --git a/venv/bin/cythonize b/venv/bin/cythonize deleted file mode 100755 index 3a354036..00000000 --- a/venv/bin/cythonize +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from Cython.Build.Cythonize import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/f2py b/venv/bin/f2py deleted file mode 100755 index c3ce3383..00000000 --- a/venv/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from numpy.f2py.f2py2e import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/fonttools b/venv/bin/fonttools deleted file mode 100755 index 68c12f39..00000000 --- a/venv/bin/fonttools +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/isympy b/venv/bin/isympy deleted file mode 100755 index 7f8fbbc0..00000000 --- a/venv/bin/isympy +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from isympy import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/natsort b/venv/bin/natsort deleted file mode 100755 index b2567748..00000000 --- a/venv/bin/natsort +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from natsort.__main__ import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/normalizer b/venv/bin/normalizer deleted file mode 100755 index 0cc3ef25..00000000 --- a/venv/bin/normalizer +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from charset_normalizer.cli import cli_detect -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(cli_detect()) diff --git a/venv/bin/numpy-config b/venv/bin/numpy-config deleted file mode 100755 index 66eaabe1..00000000 --- a/venv/bin/numpy-config +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from numpy._configtool import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/parquet-to-blosc2 b/venv/bin/parquet-to-blosc2 deleted file mode 100755 index 4f0aa0e3..00000000 --- a/venv/bin/parquet-to-blosc2 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from blosc2.cli.parquet_to_blosc2 import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pip b/venv/bin/pip deleted file mode 100755 index 857f7842..00000000 --- a/venv/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pip3 b/venv/bin/pip3 deleted file mode 100755 index 857f7842..00000000 --- a/venv/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pip3.12 b/venv/bin/pip3.12 deleted file mode 100755 index 857f7842..00000000 --- a/venv/bin/pip3.12 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from pip._internal.cli.main import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pt2to3 b/venv/bin/pt2to3 deleted file mode 100755 index cecae1cd..00000000 --- a/venv/bin/pt2to3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from tables.scripts.pt2to3 import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/ptdump b/venv/bin/ptdump deleted file mode 100755 index a6de5dcd..00000000 --- a/venv/bin/ptdump +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from tables.scripts.ptdump import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/ptrepack b/venv/bin/ptrepack deleted file mode 100755 index e5ed1cb2..00000000 --- a/venv/bin/ptrepack +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from tables.scripts.ptrepack import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pttree b/venv/bin/pttree deleted file mode 100755 index d2e91ef4..00000000 --- a/venv/bin/pttree +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from tables.scripts.pttree import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pyftmerge b/venv/bin/pyftmerge deleted file mode 100755 index 39ff4e20..00000000 --- a/venv/bin/pyftmerge +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.merge import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pyftsubset b/venv/bin/pyftsubset deleted file mode 100755 index 829e28c4..00000000 --- a/venv/bin/pyftsubset +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.subset import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/pylems b/venv/bin/pylems deleted file mode 100755 index d64d506b..00000000 --- a/venv/bin/pylems +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from lems.run import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/python b/venv/bin/python deleted file mode 120000 index b8a0adbb..00000000 --- a/venv/bin/python +++ /dev/null @@ -1 +0,0 @@ -python3 \ No newline at end of file diff --git a/venv/bin/python3 b/venv/bin/python3 deleted file mode 120000 index ae65fdaa..00000000 --- a/venv/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -/usr/bin/python3 \ No newline at end of file diff --git a/venv/bin/python3.12 b/venv/bin/python3.12 deleted file mode 120000 index b8a0adbb..00000000 --- a/venv/bin/python3.12 +++ /dev/null @@ -1 +0,0 @@ -python3 \ No newline at end of file diff --git a/venv/bin/setuptools-scm b/venv/bin/setuptools-scm deleted file mode 100755 index 92950d22..00000000 --- a/venv/bin/setuptools-scm +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from vcs_versioning._cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/ttx b/venv/bin/ttx deleted file mode 100755 index cee0ce8b..00000000 --- a/venv/bin/ttx +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from fontTools.ttx import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/bin/vcs-versioning b/venv/bin/vcs-versioning deleted file mode 100755 index 92950d22..00000000 --- a/venv/bin/vcs-versioning +++ /dev/null @@ -1,8 +0,0 @@ -#!/home/vansh/Desktop/brainnumpyfix/brian2tools/venv/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from vcs_versioning._cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/venv/lib64 b/venv/lib64 deleted file mode 120000 index 7951405f..00000000 --- a/venv/lib64 +++ /dev/null @@ -1 +0,0 @@ -lib \ No newline at end of file diff --git a/venv/pyvenv.cfg b/venv/pyvenv.cfg deleted file mode 100644 index 5d43c939..00000000 --- a/venv/pyvenv.cfg +++ /dev/null @@ -1,5 +0,0 @@ -home = /usr/bin -include-system-site-packages = false -version = 3.12.3 -executable = /usr/bin/python3.12 -command = /usr/bin/python3 -m venv /home/vansh/Desktop/brainnumpyfix/brian2tools/venv diff --git a/venv/share/man/man1/isympy.1 b/venv/share/man/man1/isympy.1 deleted file mode 100644 index 0ff96615..00000000 --- a/venv/share/man/man1/isympy.1 +++ /dev/null @@ -1,188 +0,0 @@ -'\" -*- coding: us-ascii -*- -.if \n(.g .ds T< \\FC -.if \n(.g .ds T> \\F[\n[.fam]] -.de URL -\\$2 \(la\\$1\(ra\\$3 -.. -.if \n(.g .mso www.tmac -.TH isympy 1 2007-10-8 "" "" -.SH NAME -isympy \- interactive shell for SymPy -.SH SYNOPSIS -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[\fB-c\fR | \fB--console\fR] [\fB-p\fR ENCODING | \fB--pretty\fR ENCODING] [\fB-t\fR TYPE | \fB--types\fR TYPE] [\fB-o\fR ORDER | \fB--order\fR ORDER] [\fB-q\fR | \fB--quiet\fR] [\fB-d\fR | \fB--doctest\fR] [\fB-C\fR | \fB--no-cache\fR] [\fB-a\fR | \fB--auto\fR] [\fB-D\fR | \fB--debug\fR] [ --- | PYTHONOPTIONS] -'in \n(.iu-\nxu -.ad b -'hy -'nh -.fi -.ad l -\fBisympy\fR \kx -.if (\nx>(\n(.l/2)) .nr x (\n(.l/5) -'in \n(.iu+\nxu -[ -{\fB-h\fR | \fB--help\fR} -| -{\fB-v\fR | \fB--version\fR} -] -'in \n(.iu-\nxu -.ad b -'hy -.SH DESCRIPTION -isympy is a Python shell for SymPy. It is just a normal python shell -(ipython shell if you have the ipython package installed) that executes -the following commands so that you don't have to: -.PP -.nf -\*(T< ->>> from __future__ import division ->>> from sympy import * ->>> x, y, z = symbols("x,y,z") ->>> k, m, n = symbols("k,m,n", integer=True) - \*(T> -.fi -.PP -So starting isympy is equivalent to starting python (or ipython) and -executing the above commands by hand. It is intended for easy and quick -experimentation with SymPy. For more complicated programs, it is recommended -to write a script and import things explicitly (using the "from sympy -import sin, log, Symbol, ..." idiom). -.SH OPTIONS -.TP -\*(T<\fB\-c \fR\*(T>\fISHELL\fR, \*(T<\fB\-\-console=\fR\*(T>\fISHELL\fR -Use the specified shell (python or ipython) as -console backend instead of the default one (ipython -if present or python otherwise). - -Example: isympy -c python - -\fISHELL\fR could be either -\&'ipython' or 'python' -.TP -\*(T<\fB\-p \fR\*(T>\fIENCODING\fR, \*(T<\fB\-\-pretty=\fR\*(T>\fIENCODING\fR -Setup pretty printing in SymPy. By default, the most pretty, unicode -printing is enabled (if the terminal supports it). You can use less -pretty ASCII printing instead or no pretty printing at all. - -Example: isympy -p no - -\fIENCODING\fR must be one of 'unicode', -\&'ascii' or 'no'. -.TP -\*(T<\fB\-t \fR\*(T>\fITYPE\fR, \*(T<\fB\-\-types=\fR\*(T>\fITYPE\fR -Setup the ground types for the polys. By default, gmpy ground types -are used if gmpy2 or gmpy is installed, otherwise it falls back to python -ground types, which are a little bit slower. You can manually -choose python ground types even if gmpy is installed (e.g., for testing purposes). - -Note that sympy ground types are not supported, and should be used -only for experimental purposes. - -Note that the gmpy1 ground type is primarily intended for testing; it the -use of gmpy even if gmpy2 is available. - -This is the same as setting the environment variable -SYMPY_GROUND_TYPES to the given ground type (e.g., -SYMPY_GROUND_TYPES='gmpy') - -The ground types can be determined interactively from the variable -sympy.polys.domains.GROUND_TYPES inside the isympy shell itself. - -Example: isympy -t python - -\fITYPE\fR must be one of 'gmpy', -\&'gmpy1' or 'python'. -.TP -\*(T<\fB\-o \fR\*(T>\fIORDER\fR, \*(T<\fB\-\-order=\fR\*(T>\fIORDER\fR -Setup the ordering of terms for printing. The default is lex, which -orders terms lexicographically (e.g., x**2 + x + 1). You can choose -other orderings, such as rev-lex, which will use reverse -lexicographic ordering (e.g., 1 + x + x**2). - -Note that for very large expressions, ORDER='none' may speed up -printing considerably, with the tradeoff that the order of the terms -in the printed expression will have no canonical order - -Example: isympy -o rev-lax - -\fIORDER\fR must be one of 'lex', 'rev-lex', 'grlex', -\&'rev-grlex', 'grevlex', 'rev-grevlex', 'old', or 'none'. -.TP -\*(T<\fB\-q\fR\*(T>, \*(T<\fB\-\-quiet\fR\*(T> -Print only Python's and SymPy's versions to stdout at startup, and nothing else. -.TP -\*(T<\fB\-d\fR\*(T>, \*(T<\fB\-\-doctest\fR\*(T> -Use the same format that should be used for doctests. This is -equivalent to '\fIisympy -c python -p no\fR'. -.TP -\*(T<\fB\-C\fR\*(T>, \*(T<\fB\-\-no\-cache\fR\*(T> -Disable the caching mechanism. Disabling the cache may slow certain -operations down considerably. This is useful for testing the cache, -or for benchmarking, as the cache can result in deceptive benchmark timings. - -This is the same as setting the environment variable SYMPY_USE_CACHE -to 'no'. -.TP -\*(T<\fB\-a\fR\*(T>, \*(T<\fB\-\-auto\fR\*(T> -Automatically create missing symbols. Normally, typing a name of a -Symbol that has not been instantiated first would raise NameError, -but with this option enabled, any undefined name will be -automatically created as a Symbol. This only works in IPython 0.11. - -Note that this is intended only for interactive, calculator style -usage. In a script that uses SymPy, Symbols should be instantiated -at the top, so that it's clear what they are. - -This will not override any names that are already defined, which -includes the single character letters represented by the mnemonic -QCOSINE (see the "Gotchas and Pitfalls" document in the -documentation). You can delete existing names by executing "del -name" in the shell itself. You can see if a name is defined by typing -"'name' in globals()". - -The Symbols that are created using this have default assumptions. -If you want to place assumptions on symbols, you should create them -using symbols() or var(). - -Finally, this only works in the top level namespace. So, for -example, if you define a function in isympy with an undefined -Symbol, it will not work. -.TP -\*(T<\fB\-D\fR\*(T>, \*(T<\fB\-\-debug\fR\*(T> -Enable debugging output. This is the same as setting the -environment variable SYMPY_DEBUG to 'True'. The debug status is set -in the variable SYMPY_DEBUG within isympy. -.TP --- \fIPYTHONOPTIONS\fR -These options will be passed on to \fIipython (1)\fR shell. -Only supported when ipython is being used (standard python shell not supported). - -Two dashes (--) are required to separate \fIPYTHONOPTIONS\fR -from the other isympy options. - -For example, to run iSymPy without startup banner and colors: - -isympy -q -c ipython -- --colors=NoColor -.TP -\*(T<\fB\-h\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> -Print help output and exit. -.TP -\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T> -Print isympy version information and exit. -.SH FILES -.TP -\*(T<\fI${HOME}/.sympy\-history\fR\*(T> -Saves the history of commands when using the python -shell as backend. -.SH BUGS -The upstreams BTS can be found at \(lahttps://github.com/sympy/sympy/issues\(ra -Please report all bugs that you find in there, this will help improve -the overall quality of SymPy. -.SH "SEE ALSO" -\fBipython\fR(1), \fBpython\fR(1) diff --git a/venv/share/man/man1/ttx.1 b/venv/share/man/man1/ttx.1 deleted file mode 100644 index bba23b5e..00000000 --- a/venv/share/man/man1/ttx.1 +++ /dev/null @@ -1,225 +0,0 @@ -.Dd May 18, 2004 -.\" ttx is not specific to any OS, but contrary to what groff_mdoc(7) -.\" seems to imply, entirely omitting the .Os macro causes 'BSD' to -.\" be used, so I give a zero-width space as its argument. -.Os \& -.\" The "FontTools Manual" argument apparently has no effect in -.\" groff 1.18.1. I think it is a bug in the -mdoc groff package. -.Dt TTX 1 "FontTools Manual" -.Sh NAME -.Nm ttx -.Nd tool for manipulating TrueType and OpenType fonts -.Sh SYNOPSIS -.Nm -.Bk -.Op Ar option ... -.Ek -.Bk -.Ar file ... -.Ek -.Sh DESCRIPTION -.Nm -is a tool for manipulating TrueType and OpenType fonts. It can convert -TrueType and OpenType fonts to and from an -.Tn XML Ns -based format called -.Tn TTX . -.Tn TTX -files have a -.Ql .ttx -extension. -.Pp -For each -.Ar file -argument it is given, -.Nm -detects whether it is a -.Ql .ttf , -.Ql .otf -or -.Ql .ttx -file and acts accordingly: if it is a -.Ql .ttf -or -.Ql .otf -file, it generates a -.Ql .ttx -file; if it is a -.Ql .ttx -file, it generates a -.Ql .ttf -or -.Ql .otf -file. -.Pp -By default, every output file is created in the same directory as the -corresponding input file and with the same name except for the -extension, which is substituted appropriately. -.Nm -never overwrites existing files; if necessary, it appends a suffix to -the output file name before the extension, as in -.Pa Arial#1.ttf . -.Ss "General options" -.Bl -tag -width ".Fl t Ar table" -.It Fl h -Display usage information. -.It Fl d Ar dir -Write the output files to directory -.Ar dir -instead of writing every output file to the same directory as the -corresponding input file. -.It Fl o Ar file -Write the output to -.Ar file -instead of writing it to the same directory as the -corresponding input file. -.It Fl v -Be verbose. Write more messages to the standard output describing what -is being done. -.It Fl a -Allow virtual glyphs ID's on compile or decompile. -.El -.Ss "Dump options" -The following options control the process of dumping font files -(TrueType or OpenType) to -.Tn TTX -files. -.Bl -tag -width ".Fl t Ar table" -.It Fl l -List table information. Instead of dumping the font to a -.Tn TTX -file, display minimal information about each table. -.It Fl t Ar table -Dump table -.Ar table . -This option may be given multiple times to dump several tables at -once. When not specified, all tables are dumped. -.It Fl x Ar table -Exclude table -.Ar table -from the list of tables to dump. This option may be given multiple -times to exclude several tables from the dump. The -.Fl t -and -.Fl x -options are mutually exclusive. -.It Fl s -Split tables. Dump each table to a separate -.Tn TTX -file and write (under the name that would have been used for the output -file if the -.Fl s -option had not been given) one small -.Tn TTX -file containing references to the individual table dump files. This -file can be used as input to -.Nm -as long as the referenced files can be found in the same directory. -.It Fl i -.\" XXX: I suppose OpenType programs (exist and) are also affected. -Don't disassemble TrueType instructions. When this option is specified, -all TrueType programs (glyph programs, the font program and the -pre-program) are written to the -.Tn TTX -file as hexadecimal data instead of -assembly. This saves some time and results in smaller -.Tn TTX -files. -.It Fl y Ar n -When decompiling a TrueType Collection (TTC) file, -decompile font number -.Ar n , -starting from 0. -.El -.Ss "Compilation options" -The following options control the process of compiling -.Tn TTX -files into font files (TrueType or OpenType): -.Bl -tag -width ".Fl t Ar table" -.It Fl m Ar fontfile -Merge the input -.Tn TTX -file -.Ar file -with -.Ar fontfile . -No more than one -.Ar file -argument can be specified when this option is used. -.It Fl b -Don't recalculate glyph bounding boxes. Use the values in the -.Tn TTX -file as is. -.El -.Sh "THE TTX FILE FORMAT" -You can find some information about the -.Tn TTX -file format in -.Pa documentation.html . -In particular, you will find in that file the list of tables understood by -.Nm -and the relations between TrueType GlyphIDs and the glyph names used in -.Tn TTX -files. -.Sh EXAMPLES -In the following examples, all files are read from and written to the -current directory. Additionally, the name given for the output file -assumes in every case that it did not exist before -.Nm -was invoked. -.Pp -Dump the TrueType font contained in -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx FreeSans.ttf -.Pp -Compile -.Pa MyFont.ttx -into a TrueType or OpenType font file: -.Pp -.Dl ttx MyFont.ttx -.Pp -List the tables in -.Pa FreeSans.ttf -along with some information: -.Pp -.Dl ttx -l FreeSans.ttf -.Pp -Dump the -.Sq cmap -table from -.Pa FreeSans.ttf -to -.Pa FreeSans.ttx : -.Pp -.Dl ttx -t cmap FreeSans.ttf -.Sh NOTES -On MS\-Windows and MacOS, -.Nm -is available as a graphical application to which files can be dropped. -.Sh SEE ALSO -.Pa documentation.html -.Pp -.Xr fontforge 1 , -.Xr ftinfo 1 , -.Xr gfontview 1 , -.Xr xmbdfed 1 , -.Xr Font::TTF 3pm -.Sh AUTHORS -.Nm -was written by -.An -nosplit -.An "Just van Rossum" Aq just@letterror.com . -.Pp -This manual page was written by -.An "Florent Rougon" Aq f.rougon@free.fr -for the Debian GNU/Linux system based on the existing FontTools -documentation. It may be freely used, modified and distributed without -restrictions. -.\" For Emacs: -.\" Local Variables: -.\" fill-column: 72 -.\" sentence-end: "[.?!][]\"')}]*\\($\\| $\\| \\| \\)[ \n]*" -.\" sentence-end-double-space: t -.\" End: \ No newline at end of file