-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from LL08-MathematicalModelling-dowell/DOCKERI…
…ZED_V2 Dockerized v2
- Loading branch information
Showing
91 changed files
with
4,329 additions
and
3,188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,4 +55,6 @@ venv/ | |
.idea/ | ||
.vscode/ | ||
.env | ||
.env* | ||
.env* | ||
|
||
.venv |
546 changes: 546 additions & 0 deletions
546
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/Activate.ps1
Large diffs are not rendered by default.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/activate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# 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 locations. Without forgetting | ||
# past locations the $PATH changes we made may not be respected. | ||
# See "man bash" for more details. hash is usually a builtin of your shell | ||
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 'C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv') | ||
else | ||
# use the path as-is | ||
export VIRTUAL_ENV='C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv' | ||
fi | ||
|
||
_OLD_VIRTUAL_PATH="$PATH" | ||
PATH="$VIRTUAL_ENV/"Scripts":$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 |
34 changes: 34 additions & 0 deletions
34
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/activate.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@echo off | ||
|
||
rem This file is UTF-8 encoded, so we need to update the current code page while executing it | ||
for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( | ||
set _OLD_CODEPAGE=%%a | ||
) | ||
if defined _OLD_CODEPAGE ( | ||
"%SystemRoot%\System32\chcp.com" 65001 > nul | ||
) | ||
|
||
set "VIRTUAL_ENV=C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv" | ||
|
||
if not defined PROMPT set PROMPT=$P$G | ||
|
||
if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% | ||
if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% | ||
|
||
set _OLD_VIRTUAL_PROMPT=%PROMPT% | ||
set PROMPT=(.venv) %PROMPT% | ||
|
||
if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% | ||
set PYTHONHOME= | ||
|
||
if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% | ||
if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% | ||
|
||
set "PATH=%VIRTUAL_ENV%\Scripts;%PATH%" | ||
set "VIRTUAL_ENV_PROMPT=(.venv) " | ||
|
||
:END | ||
if defined _OLD_CODEPAGE ( | ||
"%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul | ||
set _OLD_CODEPAGE= | ||
) |
22 changes: 22 additions & 0 deletions
22
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/deactivate.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@echo off | ||
|
||
if defined _OLD_VIRTUAL_PROMPT ( | ||
set "PROMPT=%_OLD_VIRTUAL_PROMPT%" | ||
) | ||
set _OLD_VIRTUAL_PROMPT= | ||
|
||
if defined _OLD_VIRTUAL_PYTHONHOME ( | ||
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" | ||
set _OLD_VIRTUAL_PYTHONHOME= | ||
) | ||
|
||
if defined _OLD_VIRTUAL_PATH ( | ||
set "PATH=%_OLD_VIRTUAL_PATH%" | ||
) | ||
|
||
set _OLD_VIRTUAL_PATH= | ||
|
||
set VIRTUAL_ENV= | ||
set VIRTUAL_ENV_PROMPT= | ||
|
||
:END |
75 changes: 75 additions & 0 deletions
75
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/get_gprof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv\Scripts\python.exe | ||
# | ||
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) | ||
# Copyright (c) 2008-2016 California Institute of Technology. | ||
# Copyright (c) 2016-2024 The Uncertainty Quantification Foundation. | ||
# License: 3-clause BSD. The full license text is available at: | ||
# - https://github.com/uqfoundation/dill/blob/master/LICENSE | ||
''' | ||
build profile graph for the given instance | ||
|
||
running: | ||
$ get_gprof <args> <instance> | ||
|
||
executes: | ||
gprof2dot -f pstats <args> <type>.prof | dot -Tpng -o <type>.call.png | ||
|
||
where: | ||
<args> are arguments for gprof2dot, such as "-n 5 -e 5" | ||
<instance> is code to create the instance to profile | ||
<type> is the class of the instance (i.e. type(instance)) | ||
|
||
For example: | ||
$ get_gprof -n 5 -e 1 "import numpy; numpy.array([1,2])" | ||
|
||
will create 'ndarray.call.png' with the profile graph for numpy.array([1,2]), | ||
where '-n 5' eliminates nodes below 5% threshold, similarly '-e 1' eliminates | ||
edges below 1% threshold | ||
''' | ||
|
||
if __name__ == "__main__": | ||
import sys | ||
if len(sys.argv) < 2: | ||
print ("Please provide an object instance (e.g. 'import math; math.pi')") | ||
sys.exit() | ||
# grab args for gprof2dot | ||
args = sys.argv[1:-1] | ||
args = ' '.join(args) | ||
# last arg builds the object | ||
obj = sys.argv[-1] | ||
obj = obj.split(';') | ||
# multi-line prep for generating an instance | ||
for line in obj[:-1]: | ||
exec(line) | ||
# one-line generation of an instance | ||
try: | ||
obj = eval(obj[-1]) | ||
except Exception: | ||
print ("Error processing object instance") | ||
sys.exit() | ||
|
||
# get object 'name' | ||
objtype = type(obj) | ||
name = getattr(objtype, '__name__', getattr(objtype, '__class__', objtype)) | ||
|
||
# profile dumping an object | ||
import dill | ||
import os | ||
import cProfile | ||
#name = os.path.splitext(os.path.basename(__file__))[0] | ||
cProfile.run("dill.dumps(obj)", filename="%s.prof" % name) | ||
msg = "gprof2dot -f pstats %s %s.prof | dot -Tpng -o %s.call.png" % (args, name, name) | ||
try: | ||
res = os.system(msg) | ||
except Exception: | ||
print ("Please verify install of 'gprof2dot' to view profile graphs") | ||
if res: | ||
print ("Please verify install of 'gprof2dot' to view profile graphs") | ||
|
||
# get stats | ||
f_prof = "%s.prof" % name | ||
import pstats | ||
stats = pstats.Stats(f_prof, stream=sys.stdout) | ||
stats.strip_dirs().sort_stats('cumtime') | ||
stats.print_stats(20) #XXX: save to file instead of print top 20? | ||
os.remove(f_prof) |
54 changes: 54 additions & 0 deletions
54
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/get_objgraph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv\Scripts\python.exe | ||
# | ||
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) | ||
# Copyright (c) 2008-2016 California Institute of Technology. | ||
# Copyright (c) 2016-2024 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 ArrayType | ||
Image generated as ArrayType.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 |
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/isort-identify-imports.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/isort.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/normalizer.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pip.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pip3.12.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pip3.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/py.test.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pylint-config.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pylint.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pyreverse.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pytest.exe
Binary file not shown.
Binary file added
BIN
+268 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/python.exe
Binary file not shown.
Binary file added
BIN
+257 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/pythonw.exe
Binary file not shown.
Binary file added
BIN
+106 KB
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/symilar.exe
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
Datacube_api_liberaries/python_library/datacubepp/.venv/Scripts/undill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv\Scripts\python.exe | ||
# | ||
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation) | ||
# Copyright (c) 2008-2016 California Institute of Technology. | ||
# Copyright (c) 2016-2024 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'))) | ||
|
5 changes: 5 additions & 0 deletions
5
Datacube_api_liberaries/python_library/datacubepp/.venv/pyvenv.cfg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
home = C:\Users\Muhammad-Ib\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0 | ||
include-system-site-packages = false | ||
version = 3.12.8 | ||
executable = C:\Users\Muhammad-Ib\.virtualenvs\project_storefront--TctQYPv\Scripts\python.exe | ||
command = C:\Users\Muhammad-Ib\.virtualenvs\project_storefront--TctQYPv\Scripts\python.exe -m venv C:\Users\Muhammad-Ib\Documents\Work\Datacube_V2\datacubepp\.venv |
Empty file.
5 changes: 5 additions & 0 deletions
5
Datacube_api_liberaries/python_library/datacubepp/MANIFEST.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include README.md | ||
include requirements.txt | ||
include LICENSE | ||
recursive-include docs *.md | ||
recursive-include tests *.py |
Oops, something went wrong.