From 574ad4a0f67e67860fca6bccc2b128f9e69e896b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B8=98=E0=B8=99=E0=B8=B2=E0=B8=81=E0=B8=A3=20=E0=B8=AB?= =?UTF-8?q?=E0=B8=B2=E0=B8=8D=E0=B8=A7=E0=B8=87=E0=B8=84=E0=B9=8C?= Date: Mon, 10 Jun 2024 11:53:58 +0700 Subject: [PATCH 1/4] Main --- .pythonlibs/bin/f2py | 8 ++ .pythonlibs/bin/isympy | 8 ++ .pythonlibs/bin/normalizer | 8 ++ .pythonlibs/share/man/man1/isympy.1 | 188 ++++++++++++++++++++++++++++ .replit | 4 + .upm/store.json | 1 + .vscode/extensions.json | 8 ++ download.sh | 0 replit.nix | 7 ++ replit_zip_error_log.txt | 3 + 10 files changed, 235 insertions(+) create mode 100644 .pythonlibs/bin/f2py create mode 100644 .pythonlibs/bin/isympy create mode 100644 .pythonlibs/bin/normalizer create mode 100644 .pythonlibs/share/man/man1/isympy.1 create mode 100644 .replit create mode 100644 .upm/store.json create mode 100644 .vscode/extensions.json mode change 100755 => 100644 download.sh create mode 100644 replit.nix create mode 100644 replit_zip_error_log.txt diff --git a/.pythonlibs/bin/f2py b/.pythonlibs/bin/f2py new file mode 100644 index 0000000..3b487ee --- /dev/null +++ b/.pythonlibs/bin/f2py @@ -0,0 +1,8 @@ +#!/usr/bin/env 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/.pythonlibs/bin/isympy b/.pythonlibs/bin/isympy new file mode 100644 index 0000000..8b97351 --- /dev/null +++ b/.pythonlibs/bin/isympy @@ -0,0 +1,8 @@ +#!/usr/bin/env 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/.pythonlibs/bin/normalizer b/.pythonlibs/bin/normalizer new file mode 100644 index 0000000..c6950a6 --- /dev/null +++ b/.pythonlibs/bin/normalizer @@ -0,0 +1,8 @@ +#!/usr/bin/env 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/.pythonlibs/share/man/man1/isympy.1 b/.pythonlibs/share/man/man1/isympy.1 new file mode 100644 index 0000000..0ff9661 --- /dev/null +++ b/.pythonlibs/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/.replit b/.replit new file mode 100644 index 0000000..c71b0f6 --- /dev/null +++ b/.replit @@ -0,0 +1,4 @@ +modules = ["python-3.12", "bash"] + +[nix] +channel = "stable-23_11" diff --git a/.upm/store.json b/.upm/store.json new file mode 100644 index 0000000..b94b43e --- /dev/null +++ b/.upm/store.json @@ -0,0 +1 @@ +{"version":2,"languages":{"python3-pip":{"guessedImports":["setuptools","fire"],"guessedImportsHash":"b2c40f7acaed99414fa21286ff1906b1"}}} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..c4dc087 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,8 @@ +{ + "recommendations": [ + "oracle.oracle-java", + "kodezi.kodezi", + "formulahendry.code-runner", + "amazonwebservices.amazon-q-vscode" + ] +} \ No newline at end of file diff --git a/download.sh b/download.sh old mode 100755 new mode 100644 diff --git a/replit.nix b/replit.nix new file mode 100644 index 0000000..b730a7c --- /dev/null +++ b/replit.nix @@ -0,0 +1,7 @@ +{pkgs}: { + deps = [ + pkgs.rustc + pkgs.libiconv + pkgs.cargo + ]; +} diff --git a/replit_zip_error_log.txt b/replit_zip_error_log.txt new file mode 100644 index 0000000..a82a11c --- /dev/null +++ b/replit_zip_error_log.txt @@ -0,0 +1,3 @@ +{"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/replit/modules/bash","time":"2024-06-10T02:55:15Z"} +{"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/replit/modules/python-3.12","time":"2024-06-10T02:55:15Z"} +{"error":".zip archives do not support non-regular files","level":"error","msg":"unable to write file .cache/replit/modules/replit","time":"2024-06-10T02:55:15Z"} From 8f5e159654318f47dca3f2d7ab529c3af8a6a5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=B8=98=E0=B8=99=E0=B8=B2=E0=B8=81=E0=B8=A3=20=E0=B8=AB?= =?UTF-8?q?=E0=B8=B2=E0=B8=8D=E0=B8=A7=E0=B8=87=E0=B8=84=E0=B9=8C?= Date: Mon, 10 Jun 2024 12:45:43 +0700 Subject: [PATCH 2/4] Revert "add newline at end of file" This reverts commit f2bb4c5b1d1a11152740267e0827eb087d7fef64. --- example_chat_completion.py | 2 +- example_text_completion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example_chat_completion.py b/example_chat_completion.py index 712dbac..0b5148f 100644 --- a/example_chat_completion.py +++ b/example_chat_completion.py @@ -81,4 +81,4 @@ def main( if __name__ == "__main__": - fire.Fire(main) + fire.Fire(main) \ No newline at end of file diff --git a/example_text_completion.py b/example_text_completion.py index 7b5daa3..d11ad6c 100644 --- a/example_text_completion.py +++ b/example_text_completion.py @@ -61,4 +61,4 @@ def main( if __name__ == "__main__": - fire.Fire(main) + fire.Fire(main) \ No newline at end of file From f745fba921fa4be3434c4b60a5344831a0c14e6c Mon Sep 17 00:00:00 2001 From: bang78945 <145711788+bang78945@users.noreply.github.com> Date: Mon, 10 Jun 2024 12:54:34 +0700 Subject: [PATCH 3/4] main --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index c4dc087..e9254cd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -3,6 +3,7 @@ "oracle.oracle-java", "kodezi.kodezi", "formulahendry.code-runner", - "amazonwebservices.amazon-q-vscode" + "amazonwebservices.amazon-q-vscode", + "visualstudioexptteam.vscodeintellicode" ] } \ No newline at end of file From 774b998ac4f81727a01b2fc678c24c4bb4a388b3 Mon Sep 17 00:00:00 2001 From: bang78945 <145711788+bang78945@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:49:20 +0700 Subject: [PATCH 4/4] Create devcontainer.json --- .devcontainer/devcontainer.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ad93c14 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,5 @@ +{ + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + } +}