diff --git a/docs-chat/bin/Activate.ps1 b/docs-chat/bin/Activate.ps1 deleted file mode 100644 index eeea358..0000000 --- a/docs-chat/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/docs-chat/bin/activate b/docs-chat/bin/activate deleted file mode 100644 index 6ae01cb..0000000 --- a/docs-chat/bin/activate +++ /dev/null @@ -1,69 +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 - - # This should detect bash and zsh, which have a hash command that must - # be called to get it to forget past commands. Without forgetting - # past commands the $PATH changes we made may not be respected - if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null - fi - - 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 - -VIRTUAL_ENV="/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat" -export VIRTUAL_ENV - -_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="(docs-chat) ${PS1:-}" - export PS1 - VIRTUAL_ENV_PROMPT="(docs-chat) " - export VIRTUAL_ENV_PROMPT -fi - -# This should detect bash and zsh, which have a hash command that must -# be called to get it to forget past commands. Without forgetting -# past commands the $PATH changes we made may not be respected -if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then - hash -r 2> /dev/null -fi diff --git a/docs-chat/bin/activate.csh b/docs-chat/bin/activate.csh deleted file mode 100644 index a03e46b..0000000 --- a/docs-chat/bin/activate.csh +++ /dev/null @@ -1,26 +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 "/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat" - -set _OLD_VIRTUAL_PATH="$PATH" -setenv PATH "$VIRTUAL_ENV/bin:$PATH" - - -set _OLD_VIRTUAL_PROMPT="$prompt" - -if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then - set prompt = "(docs-chat) $prompt" - setenv VIRTUAL_ENV_PROMPT "(docs-chat) " -endif - -alias pydoc python -m pydoc - -rehash diff --git a/docs-chat/bin/activate.fish b/docs-chat/bin/activate.fish deleted file mode 100644 index 4862c22..0000000 --- a/docs-chat/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 "/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat" - -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) "(docs-chat) " (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 "(docs-chat) " -end diff --git a/docs-chat/bin/activeloop b/docs-chat/bin/activeloop deleted file mode 100755 index bddc042..0000000 --- a/docs-chat/bin/activeloop +++ /dev/null @@ -1,33 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# EASY-INSTALL-ENTRY-SCRIPT: 'deeplake==3.5.4','console_scripts','activeloop' -import re -import sys - -# for compatibility with easy_install; see #2198 -__requires__ = 'deeplake==3.5.4' - -try: - from importlib.metadata import distribution -except ImportError: - try: - from importlib_metadata import distribution - except ImportError: - from pkg_resources import load_entry_point - - -def importlib_load_entry_point(spec, group, name): - dist_name, _, _ = spec.partition('==') - matches = ( - entry_point - for entry_point in distribution(dist_name).entry_points - if entry_point.group == group and entry_point.name == name - ) - return next(matches).load() - - -globals().setdefault('load_entry_point', importlib_load_entry_point) - - -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) - sys.exit(load_entry_point('deeplake==3.5.4', 'console_scripts', 'activeloop')()) diff --git a/docs-chat/bin/f2py b/docs-chat/bin/f2py deleted file mode 100755 index aa42f59..0000000 --- a/docs-chat/bin/f2py +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/f2py3 b/docs-chat/bin/f2py3 deleted file mode 100755 index aa42f59..0000000 --- a/docs-chat/bin/f2py3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/f2py3.10 b/docs-chat/bin/f2py3.10 deleted file mode 100755 index aa42f59..0000000 --- a/docs-chat/bin/f2py3.10 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/get_objgraph b/docs-chat/bin/get_objgraph deleted file mode 100755 index f935e81..0000000 --- a/docs-chat/bin/get_objgraph +++ /dev/null @@ -1,54 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2022 The Uncertainty Quantification Foundation. -# License: 3-clause BSD. The full license text is available at: -# - https://github.com/uqfoundation/dill/blob/master/LICENSE -""" -display the reference paths for objects in ``dill.types`` or a .pkl file - -Notes: - the generated image is useful in showing the pointer references in - objects that are or can be pickled. Any object in ``dill.objects`` - listed in ``dill.load_types(picklable=True, unpicklable=True)`` works. - -Examples:: - - $ get_objgraph FrameType - Image generated as FrameType.png -""" - -import dill as pickle -#pickle.debug.trace(True) -#import pickle - -# get all objects for testing -from dill import load_types -load_types(pickleable=True,unpickleable=True) -from dill import objects - -if __name__ == "__main__": - import sys - if len(sys.argv) != 2: - print ("Please provide exactly one file or type name (e.g. 'IntType')") - msg = "\n" - for objtype in list(objects.keys())[:40]: - msg += objtype + ', ' - print (msg + "...") - else: - objtype = str(sys.argv[-1]) - try: - obj = objects[objtype] - except KeyError: - obj = pickle.load(open(objtype,'rb')) - import os - objtype = os.path.splitext(objtype)[0] - try: - import objgraph - objgraph.show_refs(obj, filename=objtype+'.png') - except ImportError: - print ("Please install 'objgraph' to view object graphs") - - -# EOF diff --git a/docs-chat/bin/jp.py b/docs-chat/bin/jp.py deleted file mode 100755 index 99c9fb4..0000000 --- a/docs-chat/bin/jp.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 - -import sys -import json -import argparse -from pprint import pformat - -import jmespath -from jmespath import exceptions - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument('expression') - parser.add_argument('-f', '--filename', - help=('The filename containing the input data. ' - 'If a filename is not given then data is ' - 'read from stdin.')) - parser.add_argument('--ast', action='store_true', - help=('Pretty print the AST, do not search the data.')) - args = parser.parse_args() - expression = args.expression - if args.ast: - # Only print the AST - expression = jmespath.compile(args.expression) - sys.stdout.write(pformat(expression.parsed)) - sys.stdout.write('\n') - return 0 - if args.filename: - with open(args.filename, 'r') as f: - data = json.load(f) - else: - data = sys.stdin.read() - data = json.loads(data) - try: - sys.stdout.write(json.dumps( - jmespath.search(expression, data), indent=4, ensure_ascii=False)) - sys.stdout.write('\n') - except exceptions.ArityError as e: - sys.stderr.write("invalid-arity: %s\n" % e) - return 1 - except exceptions.JMESPathTypeError as e: - sys.stderr.write("invalid-type: %s\n" % e) - return 1 - except exceptions.UnknownFunctionError as e: - sys.stderr.write("unknown-function: %s\n" % e) - return 1 - except exceptions.ParseError as e: - sys.stderr.write("syntax-error: %s\n" % e) - return 1 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/docs-chat/bin/langchain b/docs-chat/bin/langchain deleted file mode 100755 index fd2c9de..0000000 --- a/docs-chat/bin/langchain +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from langchain.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/docs-chat/bin/langchain-server b/docs-chat/bin/langchain-server deleted file mode 100755 index b9f2a75..0000000 --- a/docs-chat/bin/langchain-server +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from langchain.server import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/docs-chat/bin/normalizer b/docs-chat/bin/normalizer deleted file mode 100755 index a767a3a..0000000 --- a/docs-chat/bin/normalizer +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from charset_normalizer.cli.normalizer 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/docs-chat/bin/openai b/docs-chat/bin/openai deleted file mode 100755 index aec918a..0000000 --- a/docs-chat/bin/openai +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from openai._openai_scripts import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/docs-chat/bin/pathos_connect b/docs-chat/bin/pathos_connect deleted file mode 100755 index 5c65628..0000000 --- a/docs-chat/bin/pathos_connect +++ /dev/null @@ -1,184 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 1997-2016 California Institute of Technology. -# Copyright (c) 2016-2022 The Uncertainty Quantification Foundation. -# License: 3-clause BSD. The full license text is available at: -# - https://github.com/uqfoundation/pathos/blob/master/LICENSE -""" -connect to the specified machine and start a 'server', 'tunnel', or both - -Notes: - Usage: pathos_connect [hostname] [server] [remoteport] [profile] - [hostname] - name of the host to connect to - [server] - name of RPC server (assumes is installed on host) or 'tunnel' - [remoteport] - remote port to use for communication or 'tunnel' - [profile] -- name of shell profile to source on remote environment - -Examples:: - - $ pathos_connect computer.college.edu ppserver tunnel - Usage: pathos_connect [hostname] [server] [remoteport] [profile] - [hostname] - name of the host to connect to - [server] - name of RPC server (assumes is installed on host) or 'tunnel' - [remoteport] - remote port to use for communication or 'tunnel' - [profile] -- name of shell profile to source on remote environment - defaults are: "localhost" "tunnel" "" "" - executing {ssh -N -L 22921:computer.college.edu:15058}' - - Server running at port=15058 with pid=4110 - Connected to localhost at port=22921 - Press to kill server -""" -## tunnel: pathos_connect college.edu tunnel -## server: pathos_connect college.edu ppserver 12345 .profile -## both: pathos_connect college.edu ppserver tunnel .profile - -from pathos.core import * -from pathos.hosts import get_profile, register_profiles - - -if __name__ == '__main__': - -##### CONFIGURATION & INPUT ######################## - # set the default remote host - rhost = 'localhost' - #rhost = 'foobar.internet.org' - #rhost = 'computer.college.edu' - - # set any 'special' profiles (those which don't use default_profie) - profiles = {} - #profiles = {'foobar.internet.org':'.profile', - # 'computer.college.edu':'.cshrc'} - - # set the default port - rport = '' - _rport = '98909' - - # set the default server command - server = 'tunnel' - #server = 'ppserver' #XXX: "ppserver -p %s" % rport - #server = 'classic_server' #XXX: "classic_server -p %s" % rport - #server = 'registry_server' #XXX: "registry_server -p %s" % rport - - print("""Usage: pathos_connect [hostname] [remoteport] [server] [profile] - Usage: pathos_connect [hostname] [server] [remoteport] [profile] - [hostname] - name of the host to connect to - [server] - name of RPC server (assumes is installed on host) or 'tunnel' - [remoteport] - remote port to use for communication or 'tunnel' - [profile] -- name of shell profile to source on remote environment - defaults are: "%s" "%s" "%s" "%s".""" % (rhost, server, rport, '')) - - # get remote hostname from user - import sys - if '--help' in sys.argv: - sys.exit(0) - try: - myinp = sys.argv[1] - except: myinp = None - if myinp: - rhost = myinp #XXX: should test rhost validity here... (how ?) - else: pass # use default - del myinp - - # get server to run from user - try: - myinp = sys.argv[2] - except: myinp = None - if myinp: - server = myinp #XXX: should test validity here... (filename) - else: pass # use default - del myinp - - # set the default 'port' - if server == 'tunnel': - tunnel = True - server = None - else: - tunnel = False - rport = rport if tunnel else _rport - - # get remote port to run server on from user - try: - myinp = sys.argv[3] - except: myinp = None - if myinp: - if tunnel: # tunnel doesn't take more inputs - msg = "port '%s' not valid for 'tunnel'" % myinp - raise ValueError(msg) - rport = myinp #XXX: should test validity here... (filename) - else: pass # use default - del myinp - - # is it a tunneled server? - tunnel = True if (tunnel or rport == 'tunnel') else False - rport = '' if rport == 'tunnel' else rport - - # get remote profile (this should go away soon) - try: - myinp = sys.argv[4] - except: myinp = None - if myinp: - rprof = myinp #XXX: should test validity here... (filename) - profiles = {rhost:rprof} - else: pass # use default - del myinp - - # my remote environment (should be auto-detected) - register_profiles(profiles) - profile = get_profile(rhost) - -##### CONFIGURATION & INPUT ######################## -## tunnel: pathos_connect foo.college.edu tunnel -## server: pathos_connect foo.college.edu ppserver 12345 .profile -## both: pathos_connect foo.college.edu ppserver tunnel .profile - - if tunnel: - # establish ssh tunnel - tunnel = connect(rhost) - lport = tunnel._lport - rport = tunnel._rport - print('executing {ssh -N -L %d:%s:%d}' % (lport, rhost, rport)) - else: - lport = '' - - if server: - # run server - rserver = serve(server, rhost, rport, profile=profile) - response = rserver.response() - if response: - if tunnel: tunnel.disconnect() - print(response) - raise OSError('Failure to start server') - - # get server pid #FIXME: launcher.pid is not pid(server) - target = '[P,p]ython[^#]*'+server # filter w/ regex for python-based server - try: - pid = getpid(target, rhost) - except OSError: - print("Cleanup on host may be required...") - if tunnel: tunnel.disconnect() - raise - - # test server - # XXX: add a simple one-liner... - print("\nServer running at port=%s with pid=%s" % (rport, pid)) - if tunnel: print("Connected to localhost at port=%s" % (lport)) - print('Press to kill server') - else: - print('Press to disconnect') - sys.stdin.readline() - - if server: - # stop server - print(kill(pid,rhost)) -# del rserver #XXX: delete should run self.kill (?) - - if tunnel: - # disconnect tunnel - tunnel.disconnect() - # FIXME: just kills 'ssh', not the tunnel - # get local pid: ps u | grep "ssh -N -L%s:%s$s" % (lport,rhost,rport) - # kill -15 int(tunnelpid) - -# EOF diff --git a/docs-chat/bin/pip b/docs-chat/bin/pip deleted file mode 100755 index ecd1ea1..0000000 --- a/docs-chat/bin/pip +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/pip3 b/docs-chat/bin/pip3 deleted file mode 100755 index ecd1ea1..0000000 --- a/docs-chat/bin/pip3 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/pip3.10 b/docs-chat/bin/pip3.10 deleted file mode 100755 index ecd1ea1..0000000 --- a/docs-chat/bin/pip3.10 +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/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/docs-chat/bin/portpicker b/docs-chat/bin/portpicker deleted file mode 100755 index 5423ebe..0000000 --- a/docs-chat/bin/portpicker +++ /dev/null @@ -1,15 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2018-2022 The Uncertainty Quantification Foundation. -# License: 3-clause BSD. The full license text is available at: -# - https://github.com/uqfoundation/pathos/blob/master/LICENSE - -from pathos.portpicker import portnumber, __doc__ - - -if __name__ == '__main__': - - pick = portnumber(min=1024,max=65535) - print( pick() ) - diff --git a/docs-chat/bin/pox b/docs-chat/bin/pox deleted file mode 100755 index c62836c..0000000 --- a/docs-chat/bin/pox +++ /dev/null @@ -1,27 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2018-2022 The Uncertainty Quantification Foundation. -# License: 3-clause BSD. The full license text is available at: -# - https://github.com/uqfoundation/pox/blob/master/LICENSE - -import pox.__main__ -from pox.__main__ import * -__doc__ = pox.__main__.__doc__ - - -if __name__=='__main__': - import sys - try: - func = sys.argv[1] - except: func = None - if func: - try: - exec('print(%s)' % func) - except: - print("Error: incorrect syntax '%s'\n" % func) - exec('print(%s.__doc__)' % func.split('(')[0]) - else: help() - - -# End of file diff --git a/docs-chat/bin/ppserver b/docs-chat/bin/ppserver deleted file mode 100755 index 9f50811..0000000 --- a/docs-chat/bin/ppserver +++ /dev/null @@ -1,421 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# Parallel Python Software: http://www.parallelpython.com -# Copyright (c) 2005-2012 Vitalii Vanovschi. -# Copyright (c) 2015-2016 California Institute of Technology. -# Copyright (c) 2016-2022 The Uncertainty Quantification Foundation. -# All rights reserved. -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the author nor the names of its contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -# THE POSSIBILITY OF SUCH DAMAGE. -""" -ppft server: the parallel python network server -""" -import atexit -import logging -import errno -import getopt -import sys -import socket -import threading -import random -import string -import signal -import time -import os - -import ppft as pp -import ppft.auto as ppauto -import ppft.common as ppc -import ppft.transport as pptransport - -copyright = ppc.copyright -__version__ = version = ppc.__version__ - -LISTEN_SOCKET_TIMEOUT = 20 - -# compatibility with Jython -STAT_SIGNAL = 'SIGUSR1' if 'java' not in sys.platform else 'SIGUSR2' - -import hashlib -sha_new = hashlib.sha1 - - -class _NetworkServer(pp.Server): - """Network Server Class - """ - - def __init__(self, ncpus="autodetect", interface="0.0.0.0", - broadcast="255.255.255.255", port=None, secret=None, - timeout=None, restart=False, proto=2, socket_timeout=3600, pid_file=None): - pp.Server.__init__(self, ncpus, (), secret, restart, - proto, socket_timeout) - if pid_file: - with open(pid_file, 'w') as pfile: - print(os.getpid(), file=pfile) - atexit.register(os.remove, pid_file) - self.host = interface - self.bcast = broadcast - if port is not None: - self.port = port - else: - self.port = ppc.randomport() - self.timeout = timeout - self.ncon = 0 - self.last_con_time = time.time() - self.ncon_lock = threading.Lock() - - self.logger.debug("Starting network server interface=%s port=%i" - % (self.host, self.port)) - if self.timeout is not None: - self.logger.debug("ppserver will exit in %i seconds if no "\ - "connections with clients exist" % (self.timeout)) - ppc.start_thread("timeout_check", self.check_timeout) - - def ncon_add(self, val): - """Keeps track of the number of connections and time of the last one""" - self.ncon_lock.acquire() - self.ncon += val - self.last_con_time = time.time() - self.ncon_lock.release() - - def check_timeout(self): - """Checks if timeout happened and shutdowns server if it did""" - while True: - if self.ncon == 0: - idle_time = time.time() - self.last_con_time - if idle_time < self.timeout: - time.sleep(self.timeout - idle_time) - else: - self.logger.debug("exiting ppserver due to timeout (no client"\ - " connections in last %i sec)", self.timeout) - os._exit(0) - else: - time.sleep(self.timeout) - - def listen(self): - """Initiates listenting to incoming connections""" - try: - self.ssocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - # following allows ppserver to restart faster on the same port - self.ssocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.ssocket.settimeout(LISTEN_SOCKET_TIMEOUT) - self.ssocket.bind((self.host, self.port)) - self.ssocket.listen(5) - except socket.error: - e = sys.exc_info()[1] - self.logger.error("Cannot create socket for %s:%s, %s", self.host, self.port, e) - - try: - while 1: - csocket = None - # accept connections from outside - try: - (csocket, address) = self.ssocket.accept() - except socket.timeout: - pass - # don't exit on an interupt due to a signal - except socket.error: - e = sys.exc_info()[1] - if e.errno == errno.EINTR: - pass - if self._exiting: - return - # now do something with the clientsocket - # in this case, we'll pretend this is a threaded server - if csocket: - ppc.start_thread("client_socket", self.crun, (csocket, )) - except KeyboardInterrupt: - pass - except: - self.logger.debug("Exception in listen method (possibly expected)", exc_info=True) - finally: - self.logger.debug("Closing server socket") - self.ssocket.close() - - def crun(self, csocket): - """Authenticates client and handles its jobs""" - mysocket = pptransport.CSocketTransport(csocket, self.socket_timeout) - #send PP version - mysocket.send(version) - #generate a random string - srandom = "".join([random.choice(string.ascii_letters) - for i in range(16)]) - mysocket.send(srandom) - answer = sha_new(ppc.b_(srandom+self.secret)).hexdigest() - clientanswer = ppc.str_(mysocket.receive()) - if answer != clientanswer: - self.logger.warning("Authentication failed, client host=%s, port=%i" - % csocket.getpeername()) - mysocket.send("FAILED") - csocket.close() - return - else: - mysocket.send("OK") - - ctype = ppc.str_(mysocket.receive()) - self.logger.debug("Control message received: " + ctype) - self.ncon_add(1) - try: - if ctype == "STAT": - #reset time at each new connection - self.get_stats()["local"].time = 0.0 - #open('/tmp/pp.debug', 'a+').write('STAT: \n') - mysocket.send(str(self.get_ncpus())) - #open('/tmp/pp.debug', 'a+').write('STAT: get_ncpus\n') - while 1: - mysocket.receive() - #open('/tmp/pp.debug', 'a+').write('STAT: recvd\n') - mysocket.send(str(self.get_stats()["local"].time)) - #open('/tmp/pp.debug', 'a+').write('STAT: _\n') - elif ctype=="EXEC": - while 1: - #open('/tmp/pp.debug', 'a+').write('EXEC: \n') - sfunc = mysocket.creceive() - #open('/tmp/pp.debug', 'a+').write('EXEC: '+repr((sfunc,))+'\n') - sargs = mysocket.receive() - #open('/tmp/pp.debug', 'a+').write('EXEC: '+repr((sargs,))+'\n') - fun = self.insert(sfunc, sargs) - sresult = fun(True) - #open('/tmp/pp.debug', 'a+').write('EXEC: '+repr((sresult,))+'\n') - mysocket.send(sresult) - #open('/tmp/pp.debug', 'a+').write('EXEC: _\n') - except: - if self._exiting: - return - if pp.SHOW_EXPECTED_EXCEPTIONS: - self.logger.debug("Exception in crun method (possibly expected)", exc_info=True) - self.logger.debug("Closing client socket") - csocket.close() - self.ncon_add(-1) - - def broadcast(self): - """Initiaates auto-discovery mechanism""" - discover = ppauto.Discover(self) - ppc.start_thread("server_broadcast", discover.run, - ((self.host, self.port), (self.bcast, self.port))) - - -def parse_config(file_loc): - """ - Parses a config file in a very forgiving way. - """ - # If we don't have configobj installed then let the user know and exit - try: - from configobj import ConfigObj - except ImportError: - ie = sys.exc_info()[1] - #sysstderr = getattr(sys.stderr, 'buffer', sys.stderr) - print(("ERROR: You must have config obj installed to use" - "configuration files. You can still use command line switches."), file=sys.stderr) - sys.exit(1) - - if not os.access(file_loc, os.F_OK): - print("ERROR: Can not access %s." % arg, file=sys.stderr) - sys.exit(1) - - args = {} - autodiscovery = False - debug = False - - # Load the configuration file - config = ConfigObj(file_loc) - # try each config item and use the result if it exists. If it doesn't - # then simply pass and move along - try: - args['secret'] = config['general'].get('secret') - except: - pass - - try: - autodiscovery = config['network'].as_bool('autodiscovery') - except: - pass - - try: - args['interface'] = config['network'].get('interface', - default="0.0.0.0") - except: - pass - - try: - args['broadcast'] = config['network'].get('broadcast') - except: - pass - - try: - args['port'] = config['network'].as_int('port') - except: - pass - - try: - debug = config['general'].as_bool('debug') - except: - pass - - try: - args['ncpus'] = config['general'].as_int('workers') - except: - pass - - try: - args['proto'] = config['general'].as_int('proto') - except: - pass - - try: - args['restart'] = config['general'].as_bool('restart') - except: - pass - - try: - args['timeout'] = config['network'].as_int('timeout') - except: - pass - - try: - args['socket_timeout'] = config['network'].as_int('socket_timeout') - except: - pass - - try: - args['pid_file'] = config['general'].get('pid_file') - except: - pass - # Return a tuple of the args dict and autodiscovery variable - return args, autodiscovery, debug - - -def print_usage(): - """Prints help""" - print("Parallel Python Network Server (pp-" + version + ")") - print("Usage: ppserver [-hdar] [-f format] [-n proto]"\ - " [-c config_path] [-i interface] [-b broadcast]"\ - " [-p port] [-w nworkers] [-s secret] [-t seconds]"\ - " [-k seconds] [-P pid_file]") - print("") - print("Options: ") - print("-h : this help message") - print("-d : set log level to debug") - print("-f format : log format") - print("-a : enable auto-discovery service") - print("-r : restart worker process after each"\ - " task completion") - print("-n proto : protocol number for pickle module") - print("-c path : path to config file") - print("-i interface : interface to listen") - print("-b broadcast : broadcast address for auto-discovery service") - print("-p port : port to listen") - print("-w nworkers : number of workers to start") - print("-s secret : secret for authentication") - print("-t seconds : timeout to exit if no connections with "\ - "clients exist") - print("-k seconds : socket timeout in seconds") - print("-P pid_file : file to write PID to") - print("") - print("To print server stats send %s to its main process (unix only). " % STAT_SIGNAL) - print("") - print("Due to the security concerns always use a non-trivial secret key.") - print("Secret key set by -s switch will override secret key assigned by") - print("pp_secret variable in .pythonrc.py") - print("") - print("Please visit http://www.parallelpython.com for extended up-to-date") - print("documentation, examples and support forums") - - -def create_network_server(argv): - try: - opts, args = getopt.getopt(argv, "hdarn:c:b:i:p:w:s:t:f:k:P:", ["help"]) - except getopt.GetoptError: - print_usage() - raise - - args = {} - autodiscovery = False - debug = False - - log_level = logging.WARNING - log_format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s" - - for opt, arg in opts: - if opt in ("-h", "--help"): - print_usage() - sys.exit() - elif opt == "-c": - args, autodiscovery, debug = parse_config(arg) - elif opt == "-d": - debug = True - elif opt == "-f": - log_format = arg - elif opt == "-i": - args["interface"] = arg - elif opt == "-s": - args["secret"] = arg - elif opt == "-p": - args["port"] = int(arg) - elif opt == "-w": - args["ncpus"] = int(arg) - elif opt == "-a": - autodiscovery = True - elif opt == "-r": - args["restart"] = True - elif opt == "-b": - args["broadcast"] = arg - elif opt == "-n": - args["proto"] = int(arg) - elif opt == "-t": - args["timeout"] = int(arg) - elif opt == "-k": - args["socket_timeout"] = int(arg) - elif opt == "-P": - args["pid_file"] = arg - - if debug: - log_level = logging.DEBUG - pp.SHOW_EXPECTED_EXCEPTIONS = True - - log_handler = logging.StreamHandler() - log_handler.setFormatter(logging.Formatter(log_format)) - logging.getLogger("pp").setLevel(log_level) - logging.getLogger("pp").addHandler(log_handler) - - server = _NetworkServer(**args) - if autodiscovery: - server.broadcast() - return server - -def signal_handler(signum, stack): - """Prints server stats when %s is received (unix only). """ % STAT_SIGNAL - server.print_stats() - - -if __name__ == "__main__": - server = create_network_server(sys.argv[1:]) - statsignal = getattr(signal, STAT_SIGNAL, None) - if statsignal: - signal.signal(statsignal, signal_handler) - server.listen() - #have to destroy it here explicitly otherwise an exception - #comes out in Python 2.4 - del server - - -# Parallel Python Software: http://www.parallelpython.com diff --git a/docs-chat/bin/publish.py b/docs-chat/bin/publish.py deleted file mode 100755 index 72e0a29..0000000 --- a/docs-chat/bin/publish.py +++ /dev/null @@ -1,19 +0,0 @@ -import argparse -import re -import subprocess - -version_pattern = r'\d\.\d\.\d' -parser = argparse.ArgumentParser() -parser.add_argument('version', help='a SEMVER string X.Y.Z') -args = parser.parse_args() -if not re.match(version_pattern, args.version): - print('argument must be SEMVER string in format X.Y.Z') -else: - with open('setup.py') as fp: - old_setupfile = fp.read() - new_setupfile = re.sub(f"version='{version_pattern}'", - f"version='{args.version}'", old_setupfile) - with open('setup.py', 'w') as fp: - print(new_setupfile, file=fp) - - subprocess.run(['./publish.sh', 'v' + args.version]) diff --git a/docs-chat/bin/python b/docs-chat/bin/python deleted file mode 120000 index b8a0adb..0000000 --- a/docs-chat/bin/python +++ /dev/null @@ -1 +0,0 @@ -python3 \ No newline at end of file diff --git a/docs-chat/bin/python3 b/docs-chat/bin/python3 deleted file mode 120000 index cb3db8c..0000000 --- a/docs-chat/bin/python3 +++ /dev/null @@ -1 +0,0 @@ -/Users/davide/.pyenv/versions/3.10.10/bin/python3 \ No newline at end of file diff --git a/docs-chat/bin/python3.10 b/docs-chat/bin/python3.10 deleted file mode 120000 index b8a0adb..0000000 --- a/docs-chat/bin/python3.10 +++ /dev/null @@ -1 +0,0 @@ -python3 \ No newline at end of file diff --git a/docs-chat/bin/tqdm b/docs-chat/bin/tqdm deleted file mode 100755 index fc610ec..0000000 --- a/docs-chat/bin/tqdm +++ /dev/null @@ -1,8 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -*- coding: utf-8 -*- -import re -import sys -from tqdm.cli import main -if __name__ == '__main__': - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - sys.exit(main()) diff --git a/docs-chat/bin/undill b/docs-chat/bin/undill deleted file mode 100755 index 25d703a..0000000 --- a/docs-chat/bin/undill +++ /dev/null @@ -1,22 +0,0 @@ -#!/Users/davide/Documents/coding/chainstack-docs-chat/docs-chat/bin/python3 -# -# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) -# Copyright (c) 2008-2016 California Institute of Technology. -# Copyright (c) 2016-2022 The Uncertainty Quantification Foundation. -# License: 3-clause BSD. The full license text is available at: -# - https://github.com/uqfoundation/dill/blob/master/LICENSE -""" -unpickle the contents of a pickled object file - -Examples:: - - $ undill hello.pkl - ['hello', 'world'] -""" - -if __name__ == '__main__': - import sys - import dill - for file in sys.argv[1:]: - print (dill.load(open(file,'rb'))) - diff --git a/docs-chat/pyvenv.cfg b/docs-chat/pyvenv.cfg deleted file mode 100644 index ec827e0..0000000 --- a/docs-chat/pyvenv.cfg +++ /dev/null @@ -1,3 +0,0 @@ -home = /Users/davide/.pyenv/versions/3.10.10/bin -include-system-site-packages = false -version = 3.10.10