Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +3 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/__init__.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/abc.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/base_protocol.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/client.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/compression_utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/cookiejar.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/formdata.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/hdrs.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/helpers.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/http.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_exceptions.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_parser.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_writer.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/log.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/payload.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/pytest_plugin.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/resolver.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/streams.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/test_utils.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/tracing.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/typedefs.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_exceptions.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_middlewares.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_protocol.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_request.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_routedef.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_server.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_ws.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/aiohttp/_websocket/mask.cpython-311-x86_64-linux-gnu.so +3 -0
- .venv/lib/python3.11/site-packages/aiohttp/_websocket/reader_c.cpython-311-x86_64-linux-gnu.so +3 -0
- .venv/lib/python3.11/site-packages/cachetools/__init__.py +859 -0
- .venv/lib/python3.11/site-packages/cachetools/__pycache__/__init__.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/cachetools/__pycache__/func.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/cachetools/__pycache__/keys.cpython-311.pyc +0 -0
- .venv/lib/python3.11/site-packages/cachetools/func.py +121 -0
- .venv/lib/python3.11/site-packages/cachetools/keys.py +62 -0
- .venv/lib/python3.11/site-packages/httplib2/error.py +48 -0
- .venv/lib/python3.11/site-packages/httplib2/iri2uri.py +124 -0
- .venv/lib/python3.11/site-packages/httplib2/socks.py +518 -0
- .venv/lib/python3.11/site-packages/mpmath/tests/__pycache__/test_fp.cpython-311.pyc +3 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER +1 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/License.txt +1568 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA +35 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD +16 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL +5 -0
- .venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt +1 -0
- .venv/lib/python3.11/site-packages/ray-2.42.0.dist-info/INSTALLER +1 -0
- .venv/lib/python3.11/site-packages/ray-2.42.0.dist-info/RECORD +0 -0
.gitattributes
CHANGED
|
@@ -404,3 +404,6 @@ tuning-competition-baseline/.venv/lib/python3.11/site-packages/nvidia/cudnn/lib/
|
|
| 404 |
.venv/lib/python3.11/site-packages/aiohttp/_http_writer.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 405 |
.venv/lib/python3.11/site-packages/aiohttp/_http_parser.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 406 |
.venv/lib/python3.11/site-packages/mpmath/tests/__pycache__/test_functions2.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
.venv/lib/python3.11/site-packages/aiohttp/_http_writer.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 405 |
.venv/lib/python3.11/site-packages/aiohttp/_http_parser.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 406 |
.venv/lib/python3.11/site-packages/mpmath/tests/__pycache__/test_functions2.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
|
| 407 |
+
.venv/lib/python3.11/site-packages/aiohttp/_websocket/mask.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
| 408 |
+
.venv/lib/python3.11/site-packages/mpmath/tests/__pycache__/test_fp.cpython-311.pyc filter=lfs diff=lfs merge=lfs -text
|
| 409 |
+
.venv/lib/python3.11/site-packages/aiohttp/_websocket/reader_c.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (6.19 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/abc.cpython-311.pyc
ADDED
|
Binary file (13.2 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/base_protocol.cpython-311.pyc
ADDED
|
Binary file (4.9 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/client.cpython-311.pyc
ADDED
|
Binary file (57.8 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/compression_utils.cpython-311.pyc
ADDED
|
Binary file (9.75 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/cookiejar.cpython-311.pyc
ADDED
|
Binary file (23.4 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/formdata.cpython-311.pyc
ADDED
|
Binary file (8.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/hdrs.cpython-311.pyc
ADDED
|
Binary file (10.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/helpers.cpython-311.pyc
ADDED
|
Binary file (46.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/http.cpython-311.pyc
ADDED
|
Binary file (2.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_exceptions.cpython-311.pyc
ADDED
|
Binary file (7.45 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_parser.cpython-311.pyc
ADDED
|
Binary file (39.4 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/http_writer.cpython-311.pyc
ADDED
|
Binary file (11.9 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/log.cpython-311.pyc
ADDED
|
Binary file (696 Bytes). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/payload.cpython-311.pyc
ADDED
|
Binary file (27.9 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/pytest_plugin.cpython-311.pyc
ADDED
|
Binary file (21 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/resolver.cpython-311.pyc
ADDED
|
Binary file (7.89 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/streams.cpython-311.pyc
ADDED
|
Binary file (32.6 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/test_utils.cpython-311.pyc
ADDED
|
Binary file (37.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/tracing.cpython-311.pyc
ADDED
|
Binary file (24.3 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/typedefs.cpython-311.pyc
ADDED
|
Binary file (2.68 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web.cpython-311.pyc
ADDED
|
Binary file (19.5 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_exceptions.cpython-311.pyc
ADDED
|
Binary file (18.2 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_middlewares.cpython-311.pyc
ADDED
|
Binary file (6 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_protocol.cpython-311.pyc
ADDED
|
Binary file (32.8 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_request.cpython-311.pyc
ADDED
|
Binary file (41.3 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_routedef.cpython-311.pyc
ADDED
|
Binary file (12.8 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_server.cpython-311.pyc
ADDED
|
Binary file (5.41 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/__pycache__/web_ws.cpython-311.pyc
ADDED
|
Binary file (33.2 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/aiohttp/_websocket/mask.cpython-311-x86_64-linux-gnu.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:86adda1dee59565e4434546d6978d9712adb4be213070a868049de195a61635c
|
| 3 |
+
size 245952
|
.venv/lib/python3.11/site-packages/aiohttp/_websocket/reader_c.cpython-311-x86_64-linux-gnu.so
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e71133a69b8812c4a91aaccebcb0012106349dfdb42dd068030f65bb57c7144
|
| 3 |
+
size 1906008
|
.venv/lib/python3.11/site-packages/cachetools/__init__.py
ADDED
|
@@ -0,0 +1,859 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Extensible memoizing collections and decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = (
|
| 4 |
+
"Cache",
|
| 5 |
+
"FIFOCache",
|
| 6 |
+
"LFUCache",
|
| 7 |
+
"LRUCache",
|
| 8 |
+
"MRUCache",
|
| 9 |
+
"RRCache",
|
| 10 |
+
"TLRUCache",
|
| 11 |
+
"TTLCache",
|
| 12 |
+
"cached",
|
| 13 |
+
"cachedmethod",
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
__version__ = "5.5.1"
|
| 17 |
+
|
| 18 |
+
import collections
|
| 19 |
+
import collections.abc
|
| 20 |
+
import functools
|
| 21 |
+
import heapq
|
| 22 |
+
import random
|
| 23 |
+
import time
|
| 24 |
+
|
| 25 |
+
from . import keys
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class _DefaultSize:
|
| 29 |
+
__slots__ = ()
|
| 30 |
+
|
| 31 |
+
def __getitem__(self, _):
|
| 32 |
+
return 1
|
| 33 |
+
|
| 34 |
+
def __setitem__(self, _, value):
|
| 35 |
+
assert value == 1
|
| 36 |
+
|
| 37 |
+
def pop(self, _):
|
| 38 |
+
return 1
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
class Cache(collections.abc.MutableMapping):
|
| 42 |
+
"""Mutable mapping to serve as a simple cache or cache base class."""
|
| 43 |
+
|
| 44 |
+
__marker = object()
|
| 45 |
+
|
| 46 |
+
__size = _DefaultSize()
|
| 47 |
+
|
| 48 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 49 |
+
if getsizeof:
|
| 50 |
+
self.getsizeof = getsizeof
|
| 51 |
+
if self.getsizeof is not Cache.getsizeof:
|
| 52 |
+
self.__size = dict()
|
| 53 |
+
self.__data = dict()
|
| 54 |
+
self.__currsize = 0
|
| 55 |
+
self.__maxsize = maxsize
|
| 56 |
+
|
| 57 |
+
def __repr__(self):
|
| 58 |
+
return "%s(%s, maxsize=%r, currsize=%r)" % (
|
| 59 |
+
self.__class__.__name__,
|
| 60 |
+
repr(self.__data),
|
| 61 |
+
self.__maxsize,
|
| 62 |
+
self.__currsize,
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
+
def __getitem__(self, key):
|
| 66 |
+
try:
|
| 67 |
+
return self.__data[key]
|
| 68 |
+
except KeyError:
|
| 69 |
+
return self.__missing__(key)
|
| 70 |
+
|
| 71 |
+
def __setitem__(self, key, value):
|
| 72 |
+
maxsize = self.__maxsize
|
| 73 |
+
size = self.getsizeof(value)
|
| 74 |
+
if size > maxsize:
|
| 75 |
+
raise ValueError("value too large")
|
| 76 |
+
if key not in self.__data or self.__size[key] < size:
|
| 77 |
+
while self.__currsize + size > maxsize:
|
| 78 |
+
self.popitem()
|
| 79 |
+
if key in self.__data:
|
| 80 |
+
diffsize = size - self.__size[key]
|
| 81 |
+
else:
|
| 82 |
+
diffsize = size
|
| 83 |
+
self.__data[key] = value
|
| 84 |
+
self.__size[key] = size
|
| 85 |
+
self.__currsize += diffsize
|
| 86 |
+
|
| 87 |
+
def __delitem__(self, key):
|
| 88 |
+
size = self.__size.pop(key)
|
| 89 |
+
del self.__data[key]
|
| 90 |
+
self.__currsize -= size
|
| 91 |
+
|
| 92 |
+
def __contains__(self, key):
|
| 93 |
+
return key in self.__data
|
| 94 |
+
|
| 95 |
+
def __missing__(self, key):
|
| 96 |
+
raise KeyError(key)
|
| 97 |
+
|
| 98 |
+
def __iter__(self):
|
| 99 |
+
return iter(self.__data)
|
| 100 |
+
|
| 101 |
+
def __len__(self):
|
| 102 |
+
return len(self.__data)
|
| 103 |
+
|
| 104 |
+
def get(self, key, default=None):
|
| 105 |
+
if key in self:
|
| 106 |
+
return self[key]
|
| 107 |
+
else:
|
| 108 |
+
return default
|
| 109 |
+
|
| 110 |
+
def pop(self, key, default=__marker):
|
| 111 |
+
if key in self:
|
| 112 |
+
value = self[key]
|
| 113 |
+
del self[key]
|
| 114 |
+
elif default is self.__marker:
|
| 115 |
+
raise KeyError(key)
|
| 116 |
+
else:
|
| 117 |
+
value = default
|
| 118 |
+
return value
|
| 119 |
+
|
| 120 |
+
def setdefault(self, key, default=None):
|
| 121 |
+
if key in self:
|
| 122 |
+
value = self[key]
|
| 123 |
+
else:
|
| 124 |
+
self[key] = value = default
|
| 125 |
+
return value
|
| 126 |
+
|
| 127 |
+
@property
|
| 128 |
+
def maxsize(self):
|
| 129 |
+
"""The maximum size of the cache."""
|
| 130 |
+
return self.__maxsize
|
| 131 |
+
|
| 132 |
+
@property
|
| 133 |
+
def currsize(self):
|
| 134 |
+
"""The current size of the cache."""
|
| 135 |
+
return self.__currsize
|
| 136 |
+
|
| 137 |
+
@staticmethod
|
| 138 |
+
def getsizeof(value):
|
| 139 |
+
"""Return the size of a cache element's value."""
|
| 140 |
+
return 1
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
class FIFOCache(Cache):
|
| 144 |
+
"""First In First Out (FIFO) cache implementation."""
|
| 145 |
+
|
| 146 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 147 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 148 |
+
self.__order = collections.OrderedDict()
|
| 149 |
+
|
| 150 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 151 |
+
cache_setitem(self, key, value)
|
| 152 |
+
try:
|
| 153 |
+
self.__order.move_to_end(key)
|
| 154 |
+
except KeyError:
|
| 155 |
+
self.__order[key] = None
|
| 156 |
+
|
| 157 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 158 |
+
cache_delitem(self, key)
|
| 159 |
+
del self.__order[key]
|
| 160 |
+
|
| 161 |
+
def popitem(self):
|
| 162 |
+
"""Remove and return the `(key, value)` pair first inserted."""
|
| 163 |
+
try:
|
| 164 |
+
key = next(iter(self.__order))
|
| 165 |
+
except StopIteration:
|
| 166 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 167 |
+
else:
|
| 168 |
+
return (key, self.pop(key))
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
class LFUCache(Cache):
|
| 172 |
+
"""Least Frequently Used (LFU) cache implementation."""
|
| 173 |
+
|
| 174 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 175 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 176 |
+
self.__counter = collections.Counter()
|
| 177 |
+
|
| 178 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 179 |
+
value = cache_getitem(self, key)
|
| 180 |
+
if key in self: # __missing__ may not store item
|
| 181 |
+
self.__counter[key] -= 1
|
| 182 |
+
return value
|
| 183 |
+
|
| 184 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 185 |
+
cache_setitem(self, key, value)
|
| 186 |
+
self.__counter[key] -= 1
|
| 187 |
+
|
| 188 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 189 |
+
cache_delitem(self, key)
|
| 190 |
+
del self.__counter[key]
|
| 191 |
+
|
| 192 |
+
def popitem(self):
|
| 193 |
+
"""Remove and return the `(key, value)` pair least frequently used."""
|
| 194 |
+
try:
|
| 195 |
+
((key, _),) = self.__counter.most_common(1)
|
| 196 |
+
except ValueError:
|
| 197 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 198 |
+
else:
|
| 199 |
+
return (key, self.pop(key))
|
| 200 |
+
|
| 201 |
+
|
| 202 |
+
class LRUCache(Cache):
|
| 203 |
+
"""Least Recently Used (LRU) cache implementation."""
|
| 204 |
+
|
| 205 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 206 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 207 |
+
self.__order = collections.OrderedDict()
|
| 208 |
+
|
| 209 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 210 |
+
value = cache_getitem(self, key)
|
| 211 |
+
if key in self: # __missing__ may not store item
|
| 212 |
+
self.__update(key)
|
| 213 |
+
return value
|
| 214 |
+
|
| 215 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 216 |
+
cache_setitem(self, key, value)
|
| 217 |
+
self.__update(key)
|
| 218 |
+
|
| 219 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 220 |
+
cache_delitem(self, key)
|
| 221 |
+
del self.__order[key]
|
| 222 |
+
|
| 223 |
+
def popitem(self):
|
| 224 |
+
"""Remove and return the `(key, value)` pair least recently used."""
|
| 225 |
+
try:
|
| 226 |
+
key = next(iter(self.__order))
|
| 227 |
+
except StopIteration:
|
| 228 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 229 |
+
else:
|
| 230 |
+
return (key, self.pop(key))
|
| 231 |
+
|
| 232 |
+
def __update(self, key):
|
| 233 |
+
try:
|
| 234 |
+
self.__order.move_to_end(key)
|
| 235 |
+
except KeyError:
|
| 236 |
+
self.__order[key] = None
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
class MRUCache(Cache):
|
| 240 |
+
"""Most Recently Used (MRU) cache implementation."""
|
| 241 |
+
|
| 242 |
+
def __init__(self, maxsize, getsizeof=None):
|
| 243 |
+
from warnings import warn
|
| 244 |
+
|
| 245 |
+
warn("MRUCache is deprecated", DeprecationWarning, stacklevel=2)
|
| 246 |
+
|
| 247 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 248 |
+
self.__order = collections.OrderedDict()
|
| 249 |
+
|
| 250 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 251 |
+
value = cache_getitem(self, key)
|
| 252 |
+
if key in self: # __missing__ may not store item
|
| 253 |
+
self.__update(key)
|
| 254 |
+
return value
|
| 255 |
+
|
| 256 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 257 |
+
cache_setitem(self, key, value)
|
| 258 |
+
self.__update(key)
|
| 259 |
+
|
| 260 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 261 |
+
cache_delitem(self, key)
|
| 262 |
+
del self.__order[key]
|
| 263 |
+
|
| 264 |
+
def popitem(self):
|
| 265 |
+
"""Remove and return the `(key, value)` pair most recently used."""
|
| 266 |
+
try:
|
| 267 |
+
key = next(iter(self.__order))
|
| 268 |
+
except StopIteration:
|
| 269 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 270 |
+
else:
|
| 271 |
+
return (key, self.pop(key))
|
| 272 |
+
|
| 273 |
+
def __update(self, key):
|
| 274 |
+
try:
|
| 275 |
+
self.__order.move_to_end(key, last=False)
|
| 276 |
+
except KeyError:
|
| 277 |
+
self.__order[key] = None
|
| 278 |
+
|
| 279 |
+
|
| 280 |
+
class RRCache(Cache):
|
| 281 |
+
"""Random Replacement (RR) cache implementation."""
|
| 282 |
+
|
| 283 |
+
def __init__(self, maxsize, choice=random.choice, getsizeof=None):
|
| 284 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 285 |
+
self.__choice = choice
|
| 286 |
+
|
| 287 |
+
@property
|
| 288 |
+
def choice(self):
|
| 289 |
+
"""The `choice` function used by the cache."""
|
| 290 |
+
return self.__choice
|
| 291 |
+
|
| 292 |
+
def popitem(self):
|
| 293 |
+
"""Remove and return a random `(key, value)` pair."""
|
| 294 |
+
try:
|
| 295 |
+
key = self.__choice(list(self))
|
| 296 |
+
except IndexError:
|
| 297 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 298 |
+
else:
|
| 299 |
+
return (key, self.pop(key))
|
| 300 |
+
|
| 301 |
+
|
| 302 |
+
class _TimedCache(Cache):
|
| 303 |
+
"""Base class for time aware cache implementations."""
|
| 304 |
+
|
| 305 |
+
class _Timer:
|
| 306 |
+
def __init__(self, timer):
|
| 307 |
+
self.__timer = timer
|
| 308 |
+
self.__nesting = 0
|
| 309 |
+
|
| 310 |
+
def __call__(self):
|
| 311 |
+
if self.__nesting == 0:
|
| 312 |
+
return self.__timer()
|
| 313 |
+
else:
|
| 314 |
+
return self.__time
|
| 315 |
+
|
| 316 |
+
def __enter__(self):
|
| 317 |
+
if self.__nesting == 0:
|
| 318 |
+
self.__time = time = self.__timer()
|
| 319 |
+
else:
|
| 320 |
+
time = self.__time
|
| 321 |
+
self.__nesting += 1
|
| 322 |
+
return time
|
| 323 |
+
|
| 324 |
+
def __exit__(self, *exc):
|
| 325 |
+
self.__nesting -= 1
|
| 326 |
+
|
| 327 |
+
def __reduce__(self):
|
| 328 |
+
return _TimedCache._Timer, (self.__timer,)
|
| 329 |
+
|
| 330 |
+
def __getattr__(self, name):
|
| 331 |
+
return getattr(self.__timer, name)
|
| 332 |
+
|
| 333 |
+
def __init__(self, maxsize, timer=time.monotonic, getsizeof=None):
|
| 334 |
+
Cache.__init__(self, maxsize, getsizeof)
|
| 335 |
+
self.__timer = _TimedCache._Timer(timer)
|
| 336 |
+
|
| 337 |
+
def __repr__(self, cache_repr=Cache.__repr__):
|
| 338 |
+
with self.__timer as time:
|
| 339 |
+
self.expire(time)
|
| 340 |
+
return cache_repr(self)
|
| 341 |
+
|
| 342 |
+
def __len__(self, cache_len=Cache.__len__):
|
| 343 |
+
with self.__timer as time:
|
| 344 |
+
self.expire(time)
|
| 345 |
+
return cache_len(self)
|
| 346 |
+
|
| 347 |
+
@property
|
| 348 |
+
def currsize(self):
|
| 349 |
+
with self.__timer as time:
|
| 350 |
+
self.expire(time)
|
| 351 |
+
return super().currsize
|
| 352 |
+
|
| 353 |
+
@property
|
| 354 |
+
def timer(self):
|
| 355 |
+
"""The timer function used by the cache."""
|
| 356 |
+
return self.__timer
|
| 357 |
+
|
| 358 |
+
def clear(self):
|
| 359 |
+
with self.__timer as time:
|
| 360 |
+
self.expire(time)
|
| 361 |
+
Cache.clear(self)
|
| 362 |
+
|
| 363 |
+
def get(self, *args, **kwargs):
|
| 364 |
+
with self.__timer:
|
| 365 |
+
return Cache.get(self, *args, **kwargs)
|
| 366 |
+
|
| 367 |
+
def pop(self, *args, **kwargs):
|
| 368 |
+
with self.__timer:
|
| 369 |
+
return Cache.pop(self, *args, **kwargs)
|
| 370 |
+
|
| 371 |
+
def setdefault(self, *args, **kwargs):
|
| 372 |
+
with self.__timer:
|
| 373 |
+
return Cache.setdefault(self, *args, **kwargs)
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
class TTLCache(_TimedCache):
|
| 377 |
+
"""LRU Cache implementation with per-item time-to-live (TTL) value."""
|
| 378 |
+
|
| 379 |
+
class _Link:
|
| 380 |
+
__slots__ = ("key", "expires", "next", "prev")
|
| 381 |
+
|
| 382 |
+
def __init__(self, key=None, expires=None):
|
| 383 |
+
self.key = key
|
| 384 |
+
self.expires = expires
|
| 385 |
+
|
| 386 |
+
def __reduce__(self):
|
| 387 |
+
return TTLCache._Link, (self.key, self.expires)
|
| 388 |
+
|
| 389 |
+
def unlink(self):
|
| 390 |
+
next = self.next
|
| 391 |
+
prev = self.prev
|
| 392 |
+
prev.next = next
|
| 393 |
+
next.prev = prev
|
| 394 |
+
|
| 395 |
+
def __init__(self, maxsize, ttl, timer=time.monotonic, getsizeof=None):
|
| 396 |
+
_TimedCache.__init__(self, maxsize, timer, getsizeof)
|
| 397 |
+
self.__root = root = TTLCache._Link()
|
| 398 |
+
root.prev = root.next = root
|
| 399 |
+
self.__links = collections.OrderedDict()
|
| 400 |
+
self.__ttl = ttl
|
| 401 |
+
|
| 402 |
+
def __contains__(self, key):
|
| 403 |
+
try:
|
| 404 |
+
link = self.__links[key] # no reordering
|
| 405 |
+
except KeyError:
|
| 406 |
+
return False
|
| 407 |
+
else:
|
| 408 |
+
return self.timer() < link.expires
|
| 409 |
+
|
| 410 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 411 |
+
try:
|
| 412 |
+
link = self.__getlink(key)
|
| 413 |
+
except KeyError:
|
| 414 |
+
expired = False
|
| 415 |
+
else:
|
| 416 |
+
expired = not (self.timer() < link.expires)
|
| 417 |
+
if expired:
|
| 418 |
+
return self.__missing__(key)
|
| 419 |
+
else:
|
| 420 |
+
return cache_getitem(self, key)
|
| 421 |
+
|
| 422 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 423 |
+
with self.timer as time:
|
| 424 |
+
self.expire(time)
|
| 425 |
+
cache_setitem(self, key, value)
|
| 426 |
+
try:
|
| 427 |
+
link = self.__getlink(key)
|
| 428 |
+
except KeyError:
|
| 429 |
+
self.__links[key] = link = TTLCache._Link(key)
|
| 430 |
+
else:
|
| 431 |
+
link.unlink()
|
| 432 |
+
link.expires = time + self.__ttl
|
| 433 |
+
link.next = root = self.__root
|
| 434 |
+
link.prev = prev = root.prev
|
| 435 |
+
prev.next = root.prev = link
|
| 436 |
+
|
| 437 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 438 |
+
cache_delitem(self, key)
|
| 439 |
+
link = self.__links.pop(key)
|
| 440 |
+
link.unlink()
|
| 441 |
+
if not (self.timer() < link.expires):
|
| 442 |
+
raise KeyError(key)
|
| 443 |
+
|
| 444 |
+
def __iter__(self):
|
| 445 |
+
root = self.__root
|
| 446 |
+
curr = root.next
|
| 447 |
+
while curr is not root:
|
| 448 |
+
# "freeze" time for iterator access
|
| 449 |
+
with self.timer as time:
|
| 450 |
+
if time < curr.expires:
|
| 451 |
+
yield curr.key
|
| 452 |
+
curr = curr.next
|
| 453 |
+
|
| 454 |
+
def __setstate__(self, state):
|
| 455 |
+
self.__dict__.update(state)
|
| 456 |
+
root = self.__root
|
| 457 |
+
root.prev = root.next = root
|
| 458 |
+
for link in sorted(self.__links.values(), key=lambda obj: obj.expires):
|
| 459 |
+
link.next = root
|
| 460 |
+
link.prev = prev = root.prev
|
| 461 |
+
prev.next = root.prev = link
|
| 462 |
+
self.expire(self.timer())
|
| 463 |
+
|
| 464 |
+
@property
|
| 465 |
+
def ttl(self):
|
| 466 |
+
"""The time-to-live value of the cache's items."""
|
| 467 |
+
return self.__ttl
|
| 468 |
+
|
| 469 |
+
def expire(self, time=None):
|
| 470 |
+
"""Remove expired items from the cache and return an iterable of the
|
| 471 |
+
expired `(key, value)` pairs.
|
| 472 |
+
|
| 473 |
+
"""
|
| 474 |
+
if time is None:
|
| 475 |
+
time = self.timer()
|
| 476 |
+
root = self.__root
|
| 477 |
+
curr = root.next
|
| 478 |
+
links = self.__links
|
| 479 |
+
expired = []
|
| 480 |
+
cache_delitem = Cache.__delitem__
|
| 481 |
+
cache_getitem = Cache.__getitem__
|
| 482 |
+
while curr is not root and not (time < curr.expires):
|
| 483 |
+
expired.append((curr.key, cache_getitem(self, curr.key)))
|
| 484 |
+
cache_delitem(self, curr.key)
|
| 485 |
+
del links[curr.key]
|
| 486 |
+
next = curr.next
|
| 487 |
+
curr.unlink()
|
| 488 |
+
curr = next
|
| 489 |
+
return expired
|
| 490 |
+
|
| 491 |
+
def popitem(self):
|
| 492 |
+
"""Remove and return the `(key, value)` pair least recently used that
|
| 493 |
+
has not already expired.
|
| 494 |
+
|
| 495 |
+
"""
|
| 496 |
+
with self.timer as time:
|
| 497 |
+
self.expire(time)
|
| 498 |
+
try:
|
| 499 |
+
key = next(iter(self.__links))
|
| 500 |
+
except StopIteration:
|
| 501 |
+
raise KeyError("%s is empty" % type(self).__name__) from None
|
| 502 |
+
else:
|
| 503 |
+
return (key, self.pop(key))
|
| 504 |
+
|
| 505 |
+
def __getlink(self, key):
|
| 506 |
+
value = self.__links[key]
|
| 507 |
+
self.__links.move_to_end(key)
|
| 508 |
+
return value
|
| 509 |
+
|
| 510 |
+
|
| 511 |
+
class TLRUCache(_TimedCache):
|
| 512 |
+
"""Time aware Least Recently Used (TLRU) cache implementation."""
|
| 513 |
+
|
| 514 |
+
@functools.total_ordering
|
| 515 |
+
class _Item:
|
| 516 |
+
__slots__ = ("key", "expires", "removed")
|
| 517 |
+
|
| 518 |
+
def __init__(self, key=None, expires=None):
|
| 519 |
+
self.key = key
|
| 520 |
+
self.expires = expires
|
| 521 |
+
self.removed = False
|
| 522 |
+
|
| 523 |
+
def __lt__(self, other):
|
| 524 |
+
return self.expires < other.expires
|
| 525 |
+
|
| 526 |
+
def __init__(self, maxsize, ttu, timer=time.monotonic, getsizeof=None):
|
| 527 |
+
_TimedCache.__init__(self, maxsize, timer, getsizeof)
|
| 528 |
+
self.__items = collections.OrderedDict()
|
| 529 |
+
self.__order = []
|
| 530 |
+
self.__ttu = ttu
|
| 531 |
+
|
| 532 |
+
def __contains__(self, key):
|
| 533 |
+
try:
|
| 534 |
+
item = self.__items[key] # no reordering
|
| 535 |
+
except KeyError:
|
| 536 |
+
return False
|
| 537 |
+
else:
|
| 538 |
+
return self.timer() < item.expires
|
| 539 |
+
|
| 540 |
+
def __getitem__(self, key, cache_getitem=Cache.__getitem__):
|
| 541 |
+
try:
|
| 542 |
+
item = self.__getitem(key)
|
| 543 |
+
except KeyError:
|
| 544 |
+
expired = False
|
| 545 |
+
else:
|
| 546 |
+
expired = not (self.timer() < item.expires)
|
| 547 |
+
if expired:
|
| 548 |
+
return self.__missing__(key)
|
| 549 |
+
else:
|
| 550 |
+
return cache_getitem(self, key)
|
| 551 |
+
|
| 552 |
+
def __setitem__(self, key, value, cache_setitem=Cache.__setitem__):
|
| 553 |
+
with self.timer as time:
|
| 554 |
+
expires = self.__ttu(key, value, time)
|
| 555 |
+
if not (time < expires):
|
| 556 |
+
return # skip expired items
|
| 557 |
+
self.expire(time)
|
| 558 |
+
cache_setitem(self, key, value)
|
| 559 |
+
# removing an existing item would break the heap structure, so
|
| 560 |
+
# only mark it as removed for now
|
| 561 |
+
try:
|
| 562 |
+
self.__getitem(key).removed = True
|
| 563 |
+
except KeyError:
|
| 564 |
+
pass
|
| 565 |
+
self.__items[key] = item = TLRUCache._Item(key, expires)
|
| 566 |
+
heapq.heappush(self.__order, item)
|
| 567 |
+
|
| 568 |
+
def __delitem__(self, key, cache_delitem=Cache.__delitem__):
|
| 569 |
+
with self.timer as time:
|
| 570 |
+
# no self.expire() for performance reasons, e.g. self.clear() [#67]
|
| 571 |
+
cache_delitem(self, key)
|
| 572 |
+
item = self.__items.pop(key)
|
| 573 |
+
item.removed = True
|
| 574 |
+
if not (time < item.expires):
|
| 575 |
+
raise KeyError(key)
|
| 576 |
+
|
| 577 |
+
def __iter__(self):
|
| 578 |
+
for curr in self.__order:
|
| 579 |
+
# "freeze" time for iterator access
|
| 580 |
+
with self.timer as time:
|
| 581 |
+
if time < curr.expires and not curr.removed:
|
| 582 |
+
yield curr.key
|
| 583 |
+
|
| 584 |
+
@property
|
| 585 |
+
def ttu(self):
|
| 586 |
+
"""The local time-to-use function used by the cache."""
|
| 587 |
+
return self.__ttu
|
| 588 |
+
|
| 589 |
+
def expire(self, time=None):
|
| 590 |
+
"""Remove expired items from the cache and return an iterable of the
|
| 591 |
+
expired `(key, value)` pairs.
|
| 592 |
+
|
| 593 |
+
"""
|
| 594 |
+
if time is None:
|
| 595 |
+
time = self.timer()
|
| 596 |
+
items = self.__items
|
| 597 |
+
order = self.__order
|
| 598 |
+
# clean up the heap if too many items are marked as removed
|
| 599 |
+
if len(order) > len(items) * 2:
|
| 600 |
+
self.__order = order = [item for item in order if not item.removed]
|
| 601 |
+
heapq.heapify(order)
|
| 602 |
+
expired = []
|
| 603 |
+
cache_delitem = Cache.__delitem__
|
| 604 |
+
cache_getitem = Cache.__getitem__
|
| 605 |
+
while order and (order[0].removed or not (time < order[0].expires)):
|
| 606 |
+
item = heapq.heappop(order)
|
| 607 |
+
if not item.removed:
|
| 608 |
+
expired.append((item.key, cache_getitem(self, item.key)))
|
| 609 |
+
cache_delitem(self, item.key)
|
| 610 |
+
del items[item.key]
|
| 611 |
+
return expired
|
| 612 |
+
|
| 613 |
+
def popitem(self):
|
| 614 |
+
"""Remove and return the `(key, value)` pair least recently used that
|
| 615 |
+
has not already expired.
|
| 616 |
+
|
| 617 |
+
"""
|
| 618 |
+
with self.timer as time:
|
| 619 |
+
self.expire(time)
|
| 620 |
+
try:
|
| 621 |
+
key = next(iter(self.__items))
|
| 622 |
+
except StopIteration:
|
| 623 |
+
raise KeyError("%s is empty" % self.__class__.__name__) from None
|
| 624 |
+
else:
|
| 625 |
+
return (key, self.pop(key))
|
| 626 |
+
|
| 627 |
+
def __getitem(self, key):
|
| 628 |
+
value = self.__items[key]
|
| 629 |
+
self.__items.move_to_end(key)
|
| 630 |
+
return value
|
| 631 |
+
|
| 632 |
+
|
| 633 |
+
_CacheInfo = collections.namedtuple(
|
| 634 |
+
"CacheInfo", ["hits", "misses", "maxsize", "currsize"]
|
| 635 |
+
)
|
| 636 |
+
|
| 637 |
+
|
| 638 |
+
def cached(cache, key=keys.hashkey, lock=None, info=False):
|
| 639 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 640 |
+
results in a cache.
|
| 641 |
+
|
| 642 |
+
"""
|
| 643 |
+
|
| 644 |
+
def decorator(func):
|
| 645 |
+
if info:
|
| 646 |
+
hits = misses = 0
|
| 647 |
+
|
| 648 |
+
if isinstance(cache, Cache):
|
| 649 |
+
|
| 650 |
+
def getinfo():
|
| 651 |
+
nonlocal hits, misses
|
| 652 |
+
return _CacheInfo(hits, misses, cache.maxsize, cache.currsize)
|
| 653 |
+
|
| 654 |
+
elif isinstance(cache, collections.abc.Mapping):
|
| 655 |
+
|
| 656 |
+
def getinfo():
|
| 657 |
+
nonlocal hits, misses
|
| 658 |
+
return _CacheInfo(hits, misses, None, len(cache))
|
| 659 |
+
|
| 660 |
+
else:
|
| 661 |
+
|
| 662 |
+
def getinfo():
|
| 663 |
+
nonlocal hits, misses
|
| 664 |
+
return _CacheInfo(hits, misses, 0, 0)
|
| 665 |
+
|
| 666 |
+
if cache is None:
|
| 667 |
+
|
| 668 |
+
def wrapper(*args, **kwargs):
|
| 669 |
+
nonlocal misses
|
| 670 |
+
misses += 1
|
| 671 |
+
return func(*args, **kwargs)
|
| 672 |
+
|
| 673 |
+
def cache_clear():
|
| 674 |
+
nonlocal hits, misses
|
| 675 |
+
hits = misses = 0
|
| 676 |
+
|
| 677 |
+
cache_info = getinfo
|
| 678 |
+
|
| 679 |
+
elif lock is None:
|
| 680 |
+
|
| 681 |
+
def wrapper(*args, **kwargs):
|
| 682 |
+
nonlocal hits, misses
|
| 683 |
+
k = key(*args, **kwargs)
|
| 684 |
+
try:
|
| 685 |
+
result = cache[k]
|
| 686 |
+
hits += 1
|
| 687 |
+
return result
|
| 688 |
+
except KeyError:
|
| 689 |
+
misses += 1
|
| 690 |
+
v = func(*args, **kwargs)
|
| 691 |
+
try:
|
| 692 |
+
cache[k] = v
|
| 693 |
+
except ValueError:
|
| 694 |
+
pass # value too large
|
| 695 |
+
return v
|
| 696 |
+
|
| 697 |
+
def cache_clear():
|
| 698 |
+
nonlocal hits, misses
|
| 699 |
+
cache.clear()
|
| 700 |
+
hits = misses = 0
|
| 701 |
+
|
| 702 |
+
cache_info = getinfo
|
| 703 |
+
|
| 704 |
+
else:
|
| 705 |
+
|
| 706 |
+
def wrapper(*args, **kwargs):
|
| 707 |
+
nonlocal hits, misses
|
| 708 |
+
k = key(*args, **kwargs)
|
| 709 |
+
try:
|
| 710 |
+
with lock:
|
| 711 |
+
result = cache[k]
|
| 712 |
+
hits += 1
|
| 713 |
+
return result
|
| 714 |
+
except KeyError:
|
| 715 |
+
with lock:
|
| 716 |
+
misses += 1
|
| 717 |
+
v = func(*args, **kwargs)
|
| 718 |
+
# in case of a race, prefer the item already in the cache
|
| 719 |
+
try:
|
| 720 |
+
with lock:
|
| 721 |
+
return cache.setdefault(k, v)
|
| 722 |
+
except ValueError:
|
| 723 |
+
return v # value too large
|
| 724 |
+
|
| 725 |
+
def cache_clear():
|
| 726 |
+
nonlocal hits, misses
|
| 727 |
+
with lock:
|
| 728 |
+
cache.clear()
|
| 729 |
+
hits = misses = 0
|
| 730 |
+
|
| 731 |
+
def cache_info():
|
| 732 |
+
with lock:
|
| 733 |
+
return getinfo()
|
| 734 |
+
|
| 735 |
+
else:
|
| 736 |
+
if cache is None:
|
| 737 |
+
|
| 738 |
+
def wrapper(*args, **kwargs):
|
| 739 |
+
return func(*args, **kwargs)
|
| 740 |
+
|
| 741 |
+
def cache_clear():
|
| 742 |
+
pass
|
| 743 |
+
|
| 744 |
+
elif lock is None:
|
| 745 |
+
|
| 746 |
+
def wrapper(*args, **kwargs):
|
| 747 |
+
k = key(*args, **kwargs)
|
| 748 |
+
try:
|
| 749 |
+
return cache[k]
|
| 750 |
+
except KeyError:
|
| 751 |
+
pass # key not found
|
| 752 |
+
v = func(*args, **kwargs)
|
| 753 |
+
try:
|
| 754 |
+
cache[k] = v
|
| 755 |
+
except ValueError:
|
| 756 |
+
pass # value too large
|
| 757 |
+
return v
|
| 758 |
+
|
| 759 |
+
def cache_clear():
|
| 760 |
+
cache.clear()
|
| 761 |
+
|
| 762 |
+
else:
|
| 763 |
+
|
| 764 |
+
def wrapper(*args, **kwargs):
|
| 765 |
+
k = key(*args, **kwargs)
|
| 766 |
+
try:
|
| 767 |
+
with lock:
|
| 768 |
+
return cache[k]
|
| 769 |
+
except KeyError:
|
| 770 |
+
pass # key not found
|
| 771 |
+
v = func(*args, **kwargs)
|
| 772 |
+
# in case of a race, prefer the item already in the cache
|
| 773 |
+
try:
|
| 774 |
+
with lock:
|
| 775 |
+
return cache.setdefault(k, v)
|
| 776 |
+
except ValueError:
|
| 777 |
+
return v # value too large
|
| 778 |
+
|
| 779 |
+
def cache_clear():
|
| 780 |
+
with lock:
|
| 781 |
+
cache.clear()
|
| 782 |
+
|
| 783 |
+
cache_info = None
|
| 784 |
+
|
| 785 |
+
wrapper.cache = cache
|
| 786 |
+
wrapper.cache_key = key
|
| 787 |
+
wrapper.cache_lock = lock
|
| 788 |
+
wrapper.cache_clear = cache_clear
|
| 789 |
+
wrapper.cache_info = cache_info
|
| 790 |
+
|
| 791 |
+
return functools.update_wrapper(wrapper, func)
|
| 792 |
+
|
| 793 |
+
return decorator
|
| 794 |
+
|
| 795 |
+
|
| 796 |
+
def cachedmethod(cache, key=keys.methodkey, lock=None):
|
| 797 |
+
"""Decorator to wrap a class or instance method with a memoizing
|
| 798 |
+
callable that saves results in a cache.
|
| 799 |
+
|
| 800 |
+
"""
|
| 801 |
+
|
| 802 |
+
def decorator(method):
|
| 803 |
+
if lock is None:
|
| 804 |
+
|
| 805 |
+
def wrapper(self, *args, **kwargs):
|
| 806 |
+
c = cache(self)
|
| 807 |
+
if c is None:
|
| 808 |
+
return method(self, *args, **kwargs)
|
| 809 |
+
k = key(self, *args, **kwargs)
|
| 810 |
+
try:
|
| 811 |
+
return c[k]
|
| 812 |
+
except KeyError:
|
| 813 |
+
pass # key not found
|
| 814 |
+
v = method(self, *args, **kwargs)
|
| 815 |
+
try:
|
| 816 |
+
c[k] = v
|
| 817 |
+
except ValueError:
|
| 818 |
+
pass # value too large
|
| 819 |
+
return v
|
| 820 |
+
|
| 821 |
+
def clear(self):
|
| 822 |
+
c = cache(self)
|
| 823 |
+
if c is not None:
|
| 824 |
+
c.clear()
|
| 825 |
+
|
| 826 |
+
else:
|
| 827 |
+
|
| 828 |
+
def wrapper(self, *args, **kwargs):
|
| 829 |
+
c = cache(self)
|
| 830 |
+
if c is None:
|
| 831 |
+
return method(self, *args, **kwargs)
|
| 832 |
+
k = key(self, *args, **kwargs)
|
| 833 |
+
try:
|
| 834 |
+
with lock(self):
|
| 835 |
+
return c[k]
|
| 836 |
+
except KeyError:
|
| 837 |
+
pass # key not found
|
| 838 |
+
v = method(self, *args, **kwargs)
|
| 839 |
+
# in case of a race, prefer the item already in the cache
|
| 840 |
+
try:
|
| 841 |
+
with lock(self):
|
| 842 |
+
return c.setdefault(k, v)
|
| 843 |
+
except ValueError:
|
| 844 |
+
return v # value too large
|
| 845 |
+
|
| 846 |
+
def clear(self):
|
| 847 |
+
c = cache(self)
|
| 848 |
+
if c is not None:
|
| 849 |
+
with lock(self):
|
| 850 |
+
c.clear()
|
| 851 |
+
|
| 852 |
+
wrapper.cache = cache
|
| 853 |
+
wrapper.cache_key = key
|
| 854 |
+
wrapper.cache_lock = lock
|
| 855 |
+
wrapper.cache_clear = clear
|
| 856 |
+
|
| 857 |
+
return functools.update_wrapper(wrapper, method)
|
| 858 |
+
|
| 859 |
+
return decorator
|
.venv/lib/python3.11/site-packages/cachetools/__pycache__/__init__.cpython-311.pyc
ADDED
|
Binary file (47.1 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/cachetools/__pycache__/func.cpython-311.pyc
ADDED
|
Binary file (6.27 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/cachetools/__pycache__/keys.cpython-311.pyc
ADDED
|
Binary file (3.55 kB). View file
|
|
|
.venv/lib/python3.11/site-packages/cachetools/func.py
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""`functools.lru_cache` compatible memoizing function decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = ("fifo_cache", "lfu_cache", "lru_cache", "mru_cache", "rr_cache", "ttl_cache")
|
| 4 |
+
|
| 5 |
+
import math
|
| 6 |
+
import random
|
| 7 |
+
import time
|
| 8 |
+
|
| 9 |
+
try:
|
| 10 |
+
from threading import RLock
|
| 11 |
+
except ImportError: # pragma: no cover
|
| 12 |
+
from dummy_threading import RLock
|
| 13 |
+
|
| 14 |
+
from . import FIFOCache, LFUCache, LRUCache, MRUCache, RRCache, TTLCache
|
| 15 |
+
from . import cached
|
| 16 |
+
from . import keys
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class _UnboundTTLCache(TTLCache):
|
| 20 |
+
def __init__(self, ttl, timer):
|
| 21 |
+
TTLCache.__init__(self, math.inf, ttl, timer)
|
| 22 |
+
|
| 23 |
+
@property
|
| 24 |
+
def maxsize(self):
|
| 25 |
+
return None
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def _cache(cache, maxsize, typed):
|
| 29 |
+
def decorator(func):
|
| 30 |
+
key = keys.typedkey if typed else keys.hashkey
|
| 31 |
+
wrapper = cached(cache=cache, key=key, lock=RLock(), info=True)(func)
|
| 32 |
+
wrapper.cache_parameters = lambda: {"maxsize": maxsize, "typed": typed}
|
| 33 |
+
return wrapper
|
| 34 |
+
|
| 35 |
+
return decorator
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def fifo_cache(maxsize=128, typed=False):
|
| 39 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 40 |
+
up to `maxsize` results based on a First In First Out (FIFO)
|
| 41 |
+
algorithm.
|
| 42 |
+
|
| 43 |
+
"""
|
| 44 |
+
if maxsize is None:
|
| 45 |
+
return _cache({}, None, typed)
|
| 46 |
+
elif callable(maxsize):
|
| 47 |
+
return _cache(FIFOCache(128), 128, typed)(maxsize)
|
| 48 |
+
else:
|
| 49 |
+
return _cache(FIFOCache(maxsize), maxsize, typed)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
def lfu_cache(maxsize=128, typed=False):
|
| 53 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 54 |
+
up to `maxsize` results based on a Least Frequently Used (LFU)
|
| 55 |
+
algorithm.
|
| 56 |
+
|
| 57 |
+
"""
|
| 58 |
+
if maxsize is None:
|
| 59 |
+
return _cache({}, None, typed)
|
| 60 |
+
elif callable(maxsize):
|
| 61 |
+
return _cache(LFUCache(128), 128, typed)(maxsize)
|
| 62 |
+
else:
|
| 63 |
+
return _cache(LFUCache(maxsize), maxsize, typed)
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def lru_cache(maxsize=128, typed=False):
|
| 67 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 68 |
+
up to `maxsize` results based on a Least Recently Used (LRU)
|
| 69 |
+
algorithm.
|
| 70 |
+
|
| 71 |
+
"""
|
| 72 |
+
if maxsize is None:
|
| 73 |
+
return _cache({}, None, typed)
|
| 74 |
+
elif callable(maxsize):
|
| 75 |
+
return _cache(LRUCache(128), 128, typed)(maxsize)
|
| 76 |
+
else:
|
| 77 |
+
return _cache(LRUCache(maxsize), maxsize, typed)
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
def mru_cache(maxsize=128, typed=False):
|
| 81 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 82 |
+
up to `maxsize` results based on a Most Recently Used (MRU)
|
| 83 |
+
algorithm.
|
| 84 |
+
"""
|
| 85 |
+
from warnings import warn
|
| 86 |
+
|
| 87 |
+
warn("@mru_cache is deprecated", DeprecationWarning, stacklevel=2)
|
| 88 |
+
|
| 89 |
+
if maxsize is None:
|
| 90 |
+
return _cache({}, None, typed)
|
| 91 |
+
elif callable(maxsize):
|
| 92 |
+
return _cache(MRUCache(128), 128, typed)(maxsize)
|
| 93 |
+
else:
|
| 94 |
+
return _cache(MRUCache(maxsize), maxsize, typed)
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
def rr_cache(maxsize=128, choice=random.choice, typed=False):
|
| 98 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 99 |
+
up to `maxsize` results based on a Random Replacement (RR)
|
| 100 |
+
algorithm.
|
| 101 |
+
|
| 102 |
+
"""
|
| 103 |
+
if maxsize is None:
|
| 104 |
+
return _cache({}, None, typed)
|
| 105 |
+
elif callable(maxsize):
|
| 106 |
+
return _cache(RRCache(128, choice), 128, typed)(maxsize)
|
| 107 |
+
else:
|
| 108 |
+
return _cache(RRCache(maxsize, choice), maxsize, typed)
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
def ttl_cache(maxsize=128, ttl=600, timer=time.monotonic, typed=False):
|
| 112 |
+
"""Decorator to wrap a function with a memoizing callable that saves
|
| 113 |
+
up to `maxsize` results based on a Least Recently Used (LRU)
|
| 114 |
+
algorithm with a per-item time-to-live (TTL) value.
|
| 115 |
+
"""
|
| 116 |
+
if maxsize is None:
|
| 117 |
+
return _cache(_UnboundTTLCache(ttl, timer), None, typed)
|
| 118 |
+
elif callable(maxsize):
|
| 119 |
+
return _cache(TTLCache(128, ttl, timer), 128, typed)(maxsize)
|
| 120 |
+
else:
|
| 121 |
+
return _cache(TTLCache(maxsize, ttl, timer), maxsize, typed)
|
.venv/lib/python3.11/site-packages/cachetools/keys.py
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Key functions for memoizing decorators."""
|
| 2 |
+
|
| 3 |
+
__all__ = ("hashkey", "methodkey", "typedkey", "typedmethodkey")
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
class _HashedTuple(tuple):
|
| 7 |
+
"""A tuple that ensures that hash() will be called no more than once
|
| 8 |
+
per element, since cache decorators will hash the key multiple
|
| 9 |
+
times on a cache miss. See also _HashedSeq in the standard
|
| 10 |
+
library functools implementation.
|
| 11 |
+
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
__hashvalue = None
|
| 15 |
+
|
| 16 |
+
def __hash__(self, hash=tuple.__hash__):
|
| 17 |
+
hashvalue = self.__hashvalue
|
| 18 |
+
if hashvalue is None:
|
| 19 |
+
self.__hashvalue = hashvalue = hash(self)
|
| 20 |
+
return hashvalue
|
| 21 |
+
|
| 22 |
+
def __add__(self, other, add=tuple.__add__):
|
| 23 |
+
return _HashedTuple(add(self, other))
|
| 24 |
+
|
| 25 |
+
def __radd__(self, other, add=tuple.__add__):
|
| 26 |
+
return _HashedTuple(add(other, self))
|
| 27 |
+
|
| 28 |
+
def __getstate__(self):
|
| 29 |
+
return {}
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
# used for separating keyword arguments; we do not use an object
|
| 33 |
+
# instance here so identity is preserved when pickling/unpickling
|
| 34 |
+
_kwmark = (_HashedTuple,)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
def hashkey(*args, **kwargs):
|
| 38 |
+
"""Return a cache key for the specified hashable arguments."""
|
| 39 |
+
|
| 40 |
+
if kwargs:
|
| 41 |
+
return _HashedTuple(args + sum(sorted(kwargs.items()), _kwmark))
|
| 42 |
+
else:
|
| 43 |
+
return _HashedTuple(args)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def methodkey(self, *args, **kwargs):
|
| 47 |
+
"""Return a cache key for use with cached methods."""
|
| 48 |
+
return hashkey(*args, **kwargs)
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def typedkey(*args, **kwargs):
|
| 52 |
+
"""Return a typed cache key for the specified hashable arguments."""
|
| 53 |
+
|
| 54 |
+
key = hashkey(*args, **kwargs)
|
| 55 |
+
key += tuple(type(v) for v in args)
|
| 56 |
+
key += tuple(type(v) for _, v in sorted(kwargs.items()))
|
| 57 |
+
return key
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def typedmethodkey(self, *args, **kwargs):
|
| 61 |
+
"""Return a typed cache key for use with cached methods."""
|
| 62 |
+
return typedkey(*args, **kwargs)
|
.venv/lib/python3.11/site-packages/httplib2/error.py
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# All exceptions raised here derive from HttpLib2Error
|
| 2 |
+
class HttpLib2Error(Exception):
|
| 3 |
+
pass
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
# Some exceptions can be caught and optionally
|
| 7 |
+
# be turned back into responses.
|
| 8 |
+
class HttpLib2ErrorWithResponse(HttpLib2Error):
|
| 9 |
+
def __init__(self, desc, response, content):
|
| 10 |
+
self.response = response
|
| 11 |
+
self.content = content
|
| 12 |
+
HttpLib2Error.__init__(self, desc)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class RedirectMissingLocation(HttpLib2ErrorWithResponse):
|
| 16 |
+
pass
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class RedirectLimit(HttpLib2ErrorWithResponse):
|
| 20 |
+
pass
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
class FailedToDecompressContent(HttpLib2ErrorWithResponse):
|
| 24 |
+
pass
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
class UnimplementedDigestAuthOptionError(HttpLib2ErrorWithResponse):
|
| 28 |
+
pass
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
class UnimplementedHmacDigestAuthOptionError(HttpLib2ErrorWithResponse):
|
| 32 |
+
pass
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
class MalformedHeader(HttpLib2Error):
|
| 36 |
+
pass
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
class RelativeURIError(HttpLib2Error):
|
| 40 |
+
pass
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
class ServerNotFoundError(HttpLib2Error):
|
| 44 |
+
pass
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
class ProxiesUnavailableError(HttpLib2Error):
|
| 48 |
+
pass
|
.venv/lib/python3.11/site-packages/httplib2/iri2uri.py
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# -*- coding: utf-8 -*-
|
| 2 |
+
"""Converts an IRI to a URI."""
|
| 3 |
+
|
| 4 |
+
__author__ = "Joe Gregorio (joe@bitworking.org)"
|
| 5 |
+
__copyright__ = "Copyright 2006, Joe Gregorio"
|
| 6 |
+
__contributors__ = []
|
| 7 |
+
__version__ = "1.0.0"
|
| 8 |
+
__license__ = "MIT"
|
| 9 |
+
|
| 10 |
+
import urllib.parse
|
| 11 |
+
|
| 12 |
+
# Convert an IRI to a URI following the rules in RFC 3987
|
| 13 |
+
#
|
| 14 |
+
# The characters we need to enocde and escape are defined in the spec:
|
| 15 |
+
#
|
| 16 |
+
# iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD
|
| 17 |
+
# ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF
|
| 18 |
+
# / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD
|
| 19 |
+
# / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD
|
| 20 |
+
# / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD
|
| 21 |
+
# / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD
|
| 22 |
+
# / %xD0000-DFFFD / %xE1000-EFFFD
|
| 23 |
+
|
| 24 |
+
escape_range = [
|
| 25 |
+
(0xA0, 0xD7FF),
|
| 26 |
+
(0xE000, 0xF8FF),
|
| 27 |
+
(0xF900, 0xFDCF),
|
| 28 |
+
(0xFDF0, 0xFFEF),
|
| 29 |
+
(0x10000, 0x1FFFD),
|
| 30 |
+
(0x20000, 0x2FFFD),
|
| 31 |
+
(0x30000, 0x3FFFD),
|
| 32 |
+
(0x40000, 0x4FFFD),
|
| 33 |
+
(0x50000, 0x5FFFD),
|
| 34 |
+
(0x60000, 0x6FFFD),
|
| 35 |
+
(0x70000, 0x7FFFD),
|
| 36 |
+
(0x80000, 0x8FFFD),
|
| 37 |
+
(0x90000, 0x9FFFD),
|
| 38 |
+
(0xA0000, 0xAFFFD),
|
| 39 |
+
(0xB0000, 0xBFFFD),
|
| 40 |
+
(0xC0000, 0xCFFFD),
|
| 41 |
+
(0xD0000, 0xDFFFD),
|
| 42 |
+
(0xE1000, 0xEFFFD),
|
| 43 |
+
(0xF0000, 0xFFFFD),
|
| 44 |
+
(0x100000, 0x10FFFD),
|
| 45 |
+
]
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
def encode(c):
|
| 49 |
+
retval = c
|
| 50 |
+
i = ord(c)
|
| 51 |
+
for low, high in escape_range:
|
| 52 |
+
if i < low:
|
| 53 |
+
break
|
| 54 |
+
if i >= low and i <= high:
|
| 55 |
+
retval = "".join(["%%%2X" % o for o in c.encode("utf-8")])
|
| 56 |
+
break
|
| 57 |
+
return retval
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def iri2uri(uri):
|
| 61 |
+
"""Convert an IRI to a URI. Note that IRIs must be
|
| 62 |
+
passed in a unicode strings. That is, do not utf-8 encode
|
| 63 |
+
the IRI before passing it into the function."""
|
| 64 |
+
if isinstance(uri, str):
|
| 65 |
+
(scheme, authority, path, query, fragment) = urllib.parse.urlsplit(uri)
|
| 66 |
+
authority = authority.encode("idna").decode("utf-8")
|
| 67 |
+
# For each character in 'ucschar' or 'iprivate'
|
| 68 |
+
# 1. encode as utf-8
|
| 69 |
+
# 2. then %-encode each octet of that utf-8
|
| 70 |
+
uri = urllib.parse.urlunsplit((scheme, authority, path, query, fragment))
|
| 71 |
+
uri = "".join([encode(c) for c in uri])
|
| 72 |
+
return uri
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
if __name__ == "__main__":
|
| 76 |
+
import unittest
|
| 77 |
+
|
| 78 |
+
class Test(unittest.TestCase):
|
| 79 |
+
def test_uris(self):
|
| 80 |
+
"""Test that URIs are invariant under the transformation."""
|
| 81 |
+
invariant = [
|
| 82 |
+
"ftp://ftp.is.co.za/rfc/rfc1808.txt",
|
| 83 |
+
"http://www.ietf.org/rfc/rfc2396.txt",
|
| 84 |
+
"ldap://[2001:db8::7]/c=GB?objectClass?one",
|
| 85 |
+
"mailto:John.Doe@example.com",
|
| 86 |
+
"news:comp.infosystems.www.servers.unix",
|
| 87 |
+
"tel:+1-816-555-1212",
|
| 88 |
+
"telnet://192.0.2.16:80/",
|
| 89 |
+
"urn:oasis:names:specification:docbook:dtd:xml:4.1.2",
|
| 90 |
+
]
|
| 91 |
+
for uri in invariant:
|
| 92 |
+
self.assertEqual(uri, iri2uri(uri))
|
| 93 |
+
|
| 94 |
+
def test_iri(self):
|
| 95 |
+
"""Test that the right type of escaping is done for each part of the URI."""
|
| 96 |
+
self.assertEqual(
|
| 97 |
+
"http://xn--o3h.com/%E2%98%84",
|
| 98 |
+
iri2uri("http://\N{COMET}.com/\N{COMET}"),
|
| 99 |
+
)
|
| 100 |
+
self.assertEqual(
|
| 101 |
+
"http://bitworking.org/?fred=%E2%98%84",
|
| 102 |
+
iri2uri("http://bitworking.org/?fred=\N{COMET}"),
|
| 103 |
+
)
|
| 104 |
+
self.assertEqual(
|
| 105 |
+
"http://bitworking.org/#%E2%98%84",
|
| 106 |
+
iri2uri("http://bitworking.org/#\N{COMET}"),
|
| 107 |
+
)
|
| 108 |
+
self.assertEqual("#%E2%98%84", iri2uri("#\N{COMET}"))
|
| 109 |
+
self.assertEqual(
|
| 110 |
+
"/fred?bar=%E2%98%9A#%E2%98%84",
|
| 111 |
+
iri2uri("/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}"),
|
| 112 |
+
)
|
| 113 |
+
self.assertEqual(
|
| 114 |
+
"/fred?bar=%E2%98%9A#%E2%98%84",
|
| 115 |
+
iri2uri(iri2uri("/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}")),
|
| 116 |
+
)
|
| 117 |
+
self.assertNotEqual(
|
| 118 |
+
"/fred?bar=%E2%98%9A#%E2%98%84",
|
| 119 |
+
iri2uri(
|
| 120 |
+
"/fred?bar=\N{BLACK LEFT POINTING INDEX}#\N{COMET}".encode("utf-8")
|
| 121 |
+
),
|
| 122 |
+
)
|
| 123 |
+
|
| 124 |
+
unittest.main()
|
.venv/lib/python3.11/site-packages/httplib2/socks.py
ADDED
|
@@ -0,0 +1,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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Py - Python SOCKS module.
|
| 2 |
+
|
| 3 |
+
Version 1.00
|
| 4 |
+
|
| 5 |
+
Copyright 2006 Dan-Haim. All rights reserved.
|
| 6 |
+
|
| 7 |
+
Redistribution and use in source and binary forms, with or without modification,
|
| 8 |
+
are permitted provided that the following conditions are met:
|
| 9 |
+
1. Redistributions of source code must retain the above copyright notice, this
|
| 10 |
+
list of conditions and the following disclaimer.
|
| 11 |
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
| 12 |
+
this list of conditions and the following disclaimer in the documentation
|
| 13 |
+
and/or other materials provided with the distribution.
|
| 14 |
+
3. Neither the name of Dan Haim nor the names of his contributors may be used
|
| 15 |
+
to endorse or promote products derived from this software without specific
|
| 16 |
+
prior written permission.
|
| 17 |
+
|
| 18 |
+
THIS SOFTWARE IS PROVIDED BY DAN HAIM "AS IS" AND ANY EXPRESS OR IMPLIED
|
| 19 |
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
| 20 |
+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
| 21 |
+
EVENT SHALL DAN HAIM OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
| 22 |
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 23 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA
|
| 24 |
+
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
| 25 |
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
| 26 |
+
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMANGE.
|
| 27 |
+
|
| 28 |
+
This module provides a standard socket-like interface for Python
|
| 29 |
+
for tunneling connections through SOCKS proxies.
|
| 30 |
+
|
| 31 |
+
Minor modifications made by Christopher Gilbert (http://motomastyle.com/) for
|
| 32 |
+
use in PyLoris (http://pyloris.sourceforge.net/).
|
| 33 |
+
|
| 34 |
+
Minor modifications made by Mario Vilas (http://breakingcode.wordpress.com/)
|
| 35 |
+
mainly to merge bug fixes found in Sourceforge.
|
| 36 |
+
"""
|
| 37 |
+
|
| 38 |
+
import base64
|
| 39 |
+
import socket
|
| 40 |
+
import struct
|
| 41 |
+
import sys
|
| 42 |
+
|
| 43 |
+
if getattr(socket, "socket", None) is None:
|
| 44 |
+
raise ImportError("socket.socket missing, proxy support unusable")
|
| 45 |
+
|
| 46 |
+
PROXY_TYPE_SOCKS4 = 1
|
| 47 |
+
PROXY_TYPE_SOCKS5 = 2
|
| 48 |
+
PROXY_TYPE_HTTP = 3
|
| 49 |
+
PROXY_TYPE_HTTP_NO_TUNNEL = 4
|
| 50 |
+
|
| 51 |
+
_defaultproxy = None
|
| 52 |
+
_orgsocket = socket.socket
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
class ProxyError(Exception):
|
| 56 |
+
pass
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
class GeneralProxyError(ProxyError):
|
| 60 |
+
pass
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
class Socks5AuthError(ProxyError):
|
| 64 |
+
pass
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
class Socks5Error(ProxyError):
|
| 68 |
+
pass
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
class Socks4Error(ProxyError):
|
| 72 |
+
pass
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
class HTTPError(ProxyError):
|
| 76 |
+
pass
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
_generalerrors = (
|
| 80 |
+
"success",
|
| 81 |
+
"invalid data",
|
| 82 |
+
"not connected",
|
| 83 |
+
"not available",
|
| 84 |
+
"bad proxy type",
|
| 85 |
+
"bad input",
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
_socks5errors = (
|
| 89 |
+
"succeeded",
|
| 90 |
+
"general SOCKS server failure",
|
| 91 |
+
"connection not allowed by ruleset",
|
| 92 |
+
"Network unreachable",
|
| 93 |
+
"Host unreachable",
|
| 94 |
+
"Connection refused",
|
| 95 |
+
"TTL expired",
|
| 96 |
+
"Command not supported",
|
| 97 |
+
"Address type not supported",
|
| 98 |
+
"Unknown error",
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
_socks5autherrors = (
|
| 102 |
+
"succeeded",
|
| 103 |
+
"authentication is required",
|
| 104 |
+
"all offered authentication methods were rejected",
|
| 105 |
+
"unknown username or invalid password",
|
| 106 |
+
"unknown error",
|
| 107 |
+
)
|
| 108 |
+
|
| 109 |
+
_socks4errors = (
|
| 110 |
+
"request granted",
|
| 111 |
+
"request rejected or failed",
|
| 112 |
+
"request rejected because SOCKS server cannot connect to identd on the client",
|
| 113 |
+
"request rejected because the client program and identd report different "
|
| 114 |
+
"user-ids",
|
| 115 |
+
"unknown error",
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
def setdefaultproxy(
|
| 120 |
+
proxytype=None, addr=None, port=None, rdns=True, username=None, password=None
|
| 121 |
+
):
|
| 122 |
+
"""setdefaultproxy(proxytype, addr[, port[, rdns[, username[, password]]]])
|
| 123 |
+
Sets a default proxy which all further socksocket objects will use,
|
| 124 |
+
unless explicitly changed.
|
| 125 |
+
"""
|
| 126 |
+
global _defaultproxy
|
| 127 |
+
_defaultproxy = (proxytype, addr, port, rdns, username, password)
|
| 128 |
+
|
| 129 |
+
|
| 130 |
+
def wrapmodule(module):
|
| 131 |
+
"""wrapmodule(module)
|
| 132 |
+
|
| 133 |
+
Attempts to replace a module's socket library with a SOCKS socket. Must set
|
| 134 |
+
a default proxy using setdefaultproxy(...) first.
|
| 135 |
+
This will only work on modules that import socket directly into the
|
| 136 |
+
namespace;
|
| 137 |
+
most of the Python Standard Library falls into this category.
|
| 138 |
+
"""
|
| 139 |
+
if _defaultproxy != None:
|
| 140 |
+
module.socket.socket = socksocket
|
| 141 |
+
else:
|
| 142 |
+
raise GeneralProxyError((4, "no proxy specified"))
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
class socksocket(socket.socket):
|
| 146 |
+
"""socksocket([family[, type[, proto]]]) -> socket object
|
| 147 |
+
Open a SOCKS enabled socket. The parameters are the same as
|
| 148 |
+
those of the standard socket init. In order for SOCKS to work,
|
| 149 |
+
you must specify family=AF_INET, type=SOCK_STREAM and proto=0.
|
| 150 |
+
"""
|
| 151 |
+
|
| 152 |
+
def __init__(
|
| 153 |
+
self, family=socket.AF_INET, type=socket.SOCK_STREAM, proto=0, _sock=None
|
| 154 |
+
):
|
| 155 |
+
_orgsocket.__init__(self, family, type, proto, _sock)
|
| 156 |
+
if _defaultproxy != None:
|
| 157 |
+
self.__proxy = _defaultproxy
|
| 158 |
+
else:
|
| 159 |
+
self.__proxy = (None, None, None, None, None, None)
|
| 160 |
+
self.__proxysockname = None
|
| 161 |
+
self.__proxypeername = None
|
| 162 |
+
self.__httptunnel = True
|
| 163 |
+
|
| 164 |
+
def __recvall(self, count):
|
| 165 |
+
"""__recvall(count) -> data
|
| 166 |
+
Receive EXACTLY the number of bytes requested from the socket.
|
| 167 |
+
Blocks until the required number of bytes have been received.
|
| 168 |
+
"""
|
| 169 |
+
data = self.recv(count)
|
| 170 |
+
while len(data) < count:
|
| 171 |
+
d = self.recv(count - len(data))
|
| 172 |
+
if not d:
|
| 173 |
+
raise GeneralProxyError((0, "connection closed unexpectedly"))
|
| 174 |
+
data = data + d
|
| 175 |
+
return data
|
| 176 |
+
|
| 177 |
+
def sendall(self, content, *args):
|
| 178 |
+
""" override socket.socket.sendall method to rewrite the header
|
| 179 |
+
for non-tunneling proxies if needed
|
| 180 |
+
"""
|
| 181 |
+
if not self.__httptunnel:
|
| 182 |
+
content = self.__rewriteproxy(content)
|
| 183 |
+
return super(socksocket, self).sendall(content, *args)
|
| 184 |
+
|
| 185 |
+
def __rewriteproxy(self, header):
|
| 186 |
+
""" rewrite HTTP request headers to support non-tunneling proxies
|
| 187 |
+
(i.e. those which do not support the CONNECT method).
|
| 188 |
+
This only works for HTTP (not HTTPS) since HTTPS requires tunneling.
|
| 189 |
+
"""
|
| 190 |
+
host, endpt = None, None
|
| 191 |
+
hdrs = header.split("\r\n")
|
| 192 |
+
for hdr in hdrs:
|
| 193 |
+
if hdr.lower().startswith("host:"):
|
| 194 |
+
host = hdr
|
| 195 |
+
elif hdr.lower().startswith("get") or hdr.lower().startswith("post"):
|
| 196 |
+
endpt = hdr
|
| 197 |
+
if host and endpt:
|
| 198 |
+
hdrs.remove(host)
|
| 199 |
+
hdrs.remove(endpt)
|
| 200 |
+
host = host.split(" ")[1]
|
| 201 |
+
endpt = endpt.split(" ")
|
| 202 |
+
if self.__proxy[4] != None and self.__proxy[5] != None:
|
| 203 |
+
hdrs.insert(0, self.__getauthheader())
|
| 204 |
+
hdrs.insert(0, "Host: %s" % host)
|
| 205 |
+
hdrs.insert(0, "%s http://%s%s %s" % (endpt[0], host, endpt[1], endpt[2]))
|
| 206 |
+
return "\r\n".join(hdrs)
|
| 207 |
+
|
| 208 |
+
def __getauthheader(self):
|
| 209 |
+
auth = self.__proxy[4] + b":" + self.__proxy[5]
|
| 210 |
+
return "Proxy-Authorization: Basic " + base64.b64encode(auth).decode()
|
| 211 |
+
|
| 212 |
+
def setproxy(
|
| 213 |
+
self,
|
| 214 |
+
proxytype=None,
|
| 215 |
+
addr=None,
|
| 216 |
+
port=None,
|
| 217 |
+
rdns=True,
|
| 218 |
+
username=None,
|
| 219 |
+
password=None,
|
| 220 |
+
headers=None,
|
| 221 |
+
):
|
| 222 |
+
"""setproxy(proxytype, addr[, port[, rdns[, username[, password]]]])
|
| 223 |
+
|
| 224 |
+
Sets the proxy to be used.
|
| 225 |
+
proxytype - The type of the proxy to be used. Three types
|
| 226 |
+
are supported: PROXY_TYPE_SOCKS4 (including socks4a),
|
| 227 |
+
PROXY_TYPE_SOCKS5 and PROXY_TYPE_HTTP
|
| 228 |
+
addr - The address of the server (IP or DNS).
|
| 229 |
+
port - The port of the server. Defaults to 1080 for SOCKS
|
| 230 |
+
servers and 8080 for HTTP proxy servers.
|
| 231 |
+
rdns - Should DNS queries be preformed on the remote side
|
| 232 |
+
(rather than the local side). The default is True.
|
| 233 |
+
Note: This has no effect with SOCKS4 servers.
|
| 234 |
+
username - Username to authenticate with to the server.
|
| 235 |
+
The default is no authentication.
|
| 236 |
+
password - Password to authenticate with to the server.
|
| 237 |
+
Only relevant when username is also provided.
|
| 238 |
+
headers - Additional or modified headers for the proxy connect
|
| 239 |
+
request.
|
| 240 |
+
"""
|
| 241 |
+
self.__proxy = (
|
| 242 |
+
proxytype,
|
| 243 |
+
addr,
|
| 244 |
+
port,
|
| 245 |
+
rdns,
|
| 246 |
+
username.encode() if username else None,
|
| 247 |
+
password.encode() if password else None,
|
| 248 |
+
headers,
|
| 249 |
+
)
|
| 250 |
+
|
| 251 |
+
def __negotiatesocks5(self, destaddr, destport):
|
| 252 |
+
"""__negotiatesocks5(self,destaddr,destport)
|
| 253 |
+
Negotiates a connection through a SOCKS5 server.
|
| 254 |
+
"""
|
| 255 |
+
# First we'll send the authentication packages we support.
|
| 256 |
+
if (self.__proxy[4] != None) and (self.__proxy[5] != None):
|
| 257 |
+
# The username/password details were supplied to the
|
| 258 |
+
# setproxy method so we support the USERNAME/PASSWORD
|
| 259 |
+
# authentication (in addition to the standard none).
|
| 260 |
+
self.sendall(struct.pack("BBBB", 0x05, 0x02, 0x00, 0x02))
|
| 261 |
+
else:
|
| 262 |
+
# No username/password were entered, therefore we
|
| 263 |
+
# only support connections with no authentication.
|
| 264 |
+
self.sendall(struct.pack("BBB", 0x05, 0x01, 0x00))
|
| 265 |
+
# We'll receive the server's response to determine which
|
| 266 |
+
# method was selected
|
| 267 |
+
chosenauth = self.__recvall(2)
|
| 268 |
+
if chosenauth[0:1] != chr(0x05).encode():
|
| 269 |
+
self.close()
|
| 270 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 271 |
+
# Check the chosen authentication method
|
| 272 |
+
if chosenauth[1:2] == chr(0x00).encode():
|
| 273 |
+
# No authentication is required
|
| 274 |
+
pass
|
| 275 |
+
elif chosenauth[1:2] == chr(0x02).encode():
|
| 276 |
+
# Okay, we need to perform a basic username/password
|
| 277 |
+
# authentication.
|
| 278 |
+
packet = bytearray()
|
| 279 |
+
packet.append(0x01)
|
| 280 |
+
packet.append(len(self.__proxy[4]))
|
| 281 |
+
packet.extend(self.__proxy[4])
|
| 282 |
+
packet.append(len(self.__proxy[5]))
|
| 283 |
+
packet.extend(self.__proxy[5])
|
| 284 |
+
self.sendall(packet)
|
| 285 |
+
authstat = self.__recvall(2)
|
| 286 |
+
if authstat[0:1] != chr(0x01).encode():
|
| 287 |
+
# Bad response
|
| 288 |
+
self.close()
|
| 289 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 290 |
+
if authstat[1:2] != chr(0x00).encode():
|
| 291 |
+
# Authentication failed
|
| 292 |
+
self.close()
|
| 293 |
+
raise Socks5AuthError((3, _socks5autherrors[3]))
|
| 294 |
+
# Authentication succeeded
|
| 295 |
+
else:
|
| 296 |
+
# Reaching here is always bad
|
| 297 |
+
self.close()
|
| 298 |
+
if chosenauth[1] == chr(0xFF).encode():
|
| 299 |
+
raise Socks5AuthError((2, _socks5autherrors[2]))
|
| 300 |
+
else:
|
| 301 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 302 |
+
# Now we can request the actual connection
|
| 303 |
+
req = struct.pack("BBB", 0x05, 0x01, 0x00)
|
| 304 |
+
# If the given destination address is an IP address, we'll
|
| 305 |
+
# use the IPv4 address request even if remote resolving was specified.
|
| 306 |
+
try:
|
| 307 |
+
ipaddr = socket.inet_aton(destaddr)
|
| 308 |
+
req = req + chr(0x01).encode() + ipaddr
|
| 309 |
+
except socket.error:
|
| 310 |
+
# Well it's not an IP number, so it's probably a DNS name.
|
| 311 |
+
if self.__proxy[3]:
|
| 312 |
+
# Resolve remotely
|
| 313 |
+
ipaddr = None
|
| 314 |
+
req = (
|
| 315 |
+
req
|
| 316 |
+
+ chr(0x03).encode()
|
| 317 |
+
+ chr(len(destaddr)).encode()
|
| 318 |
+
+ destaddr.encode()
|
| 319 |
+
)
|
| 320 |
+
else:
|
| 321 |
+
# Resolve locally
|
| 322 |
+
ipaddr = socket.inet_aton(socket.gethostbyname(destaddr))
|
| 323 |
+
req = req + chr(0x01).encode() + ipaddr
|
| 324 |
+
req = req + struct.pack(">H", destport)
|
| 325 |
+
self.sendall(req)
|
| 326 |
+
# Get the response
|
| 327 |
+
resp = self.__recvall(4)
|
| 328 |
+
if resp[0:1] != chr(0x05).encode():
|
| 329 |
+
self.close()
|
| 330 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 331 |
+
elif resp[1:2] != chr(0x00).encode():
|
| 332 |
+
# Connection failed
|
| 333 |
+
self.close()
|
| 334 |
+
if ord(resp[1:2]) <= 8:
|
| 335 |
+
raise Socks5Error((ord(resp[1:2]), _socks5errors[ord(resp[1:2])]))
|
| 336 |
+
else:
|
| 337 |
+
raise Socks5Error((9, _socks5errors[9]))
|
| 338 |
+
# Get the bound address/port
|
| 339 |
+
elif resp[3:4] == chr(0x01).encode():
|
| 340 |
+
boundaddr = self.__recvall(4)
|
| 341 |
+
elif resp[3:4] == chr(0x03).encode():
|
| 342 |
+
resp = resp + self.recv(1)
|
| 343 |
+
boundaddr = self.__recvall(ord(resp[4:5]))
|
| 344 |
+
else:
|
| 345 |
+
self.close()
|
| 346 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 347 |
+
boundport = struct.unpack(">H", self.__recvall(2))[0]
|
| 348 |
+
self.__proxysockname = (boundaddr, boundport)
|
| 349 |
+
if ipaddr != None:
|
| 350 |
+
self.__proxypeername = (socket.inet_ntoa(ipaddr), destport)
|
| 351 |
+
else:
|
| 352 |
+
self.__proxypeername = (destaddr, destport)
|
| 353 |
+
|
| 354 |
+
def getproxysockname(self):
|
| 355 |
+
"""getsockname() -> address info
|
| 356 |
+
Returns the bound IP address and port number at the proxy.
|
| 357 |
+
"""
|
| 358 |
+
return self.__proxysockname
|
| 359 |
+
|
| 360 |
+
def getproxypeername(self):
|
| 361 |
+
"""getproxypeername() -> address info
|
| 362 |
+
Returns the IP and port number of the proxy.
|
| 363 |
+
"""
|
| 364 |
+
return _orgsocket.getpeername(self)
|
| 365 |
+
|
| 366 |
+
def getpeername(self):
|
| 367 |
+
"""getpeername() -> address info
|
| 368 |
+
Returns the IP address and port number of the destination
|
| 369 |
+
machine (note: getproxypeername returns the proxy)
|
| 370 |
+
"""
|
| 371 |
+
return self.__proxypeername
|
| 372 |
+
|
| 373 |
+
def __negotiatesocks4(self, destaddr, destport):
|
| 374 |
+
"""__negotiatesocks4(self,destaddr,destport)
|
| 375 |
+
Negotiates a connection through a SOCKS4 server.
|
| 376 |
+
"""
|
| 377 |
+
# Check if the destination address provided is an IP address
|
| 378 |
+
rmtrslv = False
|
| 379 |
+
try:
|
| 380 |
+
ipaddr = socket.inet_aton(destaddr)
|
| 381 |
+
except socket.error:
|
| 382 |
+
# It's a DNS name. Check where it should be resolved.
|
| 383 |
+
if self.__proxy[3]:
|
| 384 |
+
ipaddr = struct.pack("BBBB", 0x00, 0x00, 0x00, 0x01)
|
| 385 |
+
rmtrslv = True
|
| 386 |
+
else:
|
| 387 |
+
ipaddr = socket.inet_aton(socket.gethostbyname(destaddr))
|
| 388 |
+
# Construct the request packet
|
| 389 |
+
req = struct.pack(">BBH", 0x04, 0x01, destport) + ipaddr
|
| 390 |
+
# The username parameter is considered userid for SOCKS4
|
| 391 |
+
if self.__proxy[4] != None:
|
| 392 |
+
req = req + self.__proxy[4]
|
| 393 |
+
req = req + chr(0x00).encode()
|
| 394 |
+
# DNS name if remote resolving is required
|
| 395 |
+
# NOTE: This is actually an extension to the SOCKS4 protocol
|
| 396 |
+
# called SOCKS4A and may not be supported in all cases.
|
| 397 |
+
if rmtrslv:
|
| 398 |
+
req = req + destaddr + chr(0x00).encode()
|
| 399 |
+
self.sendall(req)
|
| 400 |
+
# Get the response from the server
|
| 401 |
+
resp = self.__recvall(8)
|
| 402 |
+
if resp[0:1] != chr(0x00).encode():
|
| 403 |
+
# Bad data
|
| 404 |
+
self.close()
|
| 405 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 406 |
+
if resp[1:2] != chr(0x5A).encode():
|
| 407 |
+
# Server returned an error
|
| 408 |
+
self.close()
|
| 409 |
+
if ord(resp[1:2]) in (91, 92, 93):
|
| 410 |
+
self.close()
|
| 411 |
+
raise Socks4Error((ord(resp[1:2]), _socks4errors[ord(resp[1:2]) - 90]))
|
| 412 |
+
else:
|
| 413 |
+
raise Socks4Error((94, _socks4errors[4]))
|
| 414 |
+
# Get the bound address/port
|
| 415 |
+
self.__proxysockname = (
|
| 416 |
+
socket.inet_ntoa(resp[4:]),
|
| 417 |
+
struct.unpack(">H", resp[2:4])[0],
|
| 418 |
+
)
|
| 419 |
+
if rmtrslv != None:
|
| 420 |
+
self.__proxypeername = (socket.inet_ntoa(ipaddr), destport)
|
| 421 |
+
else:
|
| 422 |
+
self.__proxypeername = (destaddr, destport)
|
| 423 |
+
|
| 424 |
+
def __negotiatehttp(self, destaddr, destport):
|
| 425 |
+
"""__negotiatehttp(self,destaddr,destport)
|
| 426 |
+
Negotiates a connection through an HTTP server.
|
| 427 |
+
"""
|
| 428 |
+
# If we need to resolve locally, we do this now
|
| 429 |
+
if not self.__proxy[3]:
|
| 430 |
+
addr = socket.gethostbyname(destaddr)
|
| 431 |
+
else:
|
| 432 |
+
addr = destaddr
|
| 433 |
+
headers = ["CONNECT ", addr, ":", str(destport), " HTTP/1.1\r\n"]
|
| 434 |
+
wrote_host_header = False
|
| 435 |
+
wrote_auth_header = False
|
| 436 |
+
if self.__proxy[6] != None:
|
| 437 |
+
for key, val in self.__proxy[6].iteritems():
|
| 438 |
+
headers += [key, ": ", val, "\r\n"]
|
| 439 |
+
wrote_host_header = key.lower() == "host"
|
| 440 |
+
wrote_auth_header = key.lower() == "proxy-authorization"
|
| 441 |
+
if not wrote_host_header:
|
| 442 |
+
headers += ["Host: ", destaddr, "\r\n"]
|
| 443 |
+
if not wrote_auth_header:
|
| 444 |
+
if self.__proxy[4] != None and self.__proxy[5] != None:
|
| 445 |
+
headers += [self.__getauthheader(), "\r\n"]
|
| 446 |
+
headers.append("\r\n")
|
| 447 |
+
self.sendall("".join(headers).encode())
|
| 448 |
+
# We read the response until we get the string "\r\n\r\n"
|
| 449 |
+
resp = self.recv(1)
|
| 450 |
+
while resp.find("\r\n\r\n".encode()) == -1:
|
| 451 |
+
resp = resp + self.recv(1)
|
| 452 |
+
# We just need the first line to check if the connection
|
| 453 |
+
# was successful
|
| 454 |
+
statusline = resp.splitlines()[0].split(" ".encode(), 2)
|
| 455 |
+
if statusline[0] not in ("HTTP/1.0".encode(), "HTTP/1.1".encode()):
|
| 456 |
+
self.close()
|
| 457 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 458 |
+
try:
|
| 459 |
+
statuscode = int(statusline[1])
|
| 460 |
+
except ValueError:
|
| 461 |
+
self.close()
|
| 462 |
+
raise GeneralProxyError((1, _generalerrors[1]))
|
| 463 |
+
if statuscode != 200:
|
| 464 |
+
self.close()
|
| 465 |
+
raise HTTPError((statuscode, statusline[2]))
|
| 466 |
+
self.__proxysockname = ("0.0.0.0", 0)
|
| 467 |
+
self.__proxypeername = (addr, destport)
|
| 468 |
+
|
| 469 |
+
def connect(self, destpair):
|
| 470 |
+
"""connect(self, despair)
|
| 471 |
+
Connects to the specified destination through a proxy.
|
| 472 |
+
destpar - A tuple of the IP/DNS address and the port number.
|
| 473 |
+
(identical to socket's connect).
|
| 474 |
+
To select the proxy server use setproxy().
|
| 475 |
+
"""
|
| 476 |
+
# Do a minimal input check first
|
| 477 |
+
if (
|
| 478 |
+
(not type(destpair) in (list, tuple))
|
| 479 |
+
or (len(destpair) < 2)
|
| 480 |
+
or (not isinstance(destpair[0], (str, bytes)))
|
| 481 |
+
or (type(destpair[1]) != int)
|
| 482 |
+
):
|
| 483 |
+
raise GeneralProxyError((5, _generalerrors[5]))
|
| 484 |
+
if self.__proxy[0] == PROXY_TYPE_SOCKS5:
|
| 485 |
+
if self.__proxy[2] != None:
|
| 486 |
+
portnum = self.__proxy[2]
|
| 487 |
+
else:
|
| 488 |
+
portnum = 1080
|
| 489 |
+
_orgsocket.connect(self, (self.__proxy[1], portnum))
|
| 490 |
+
self.__negotiatesocks5(destpair[0], destpair[1])
|
| 491 |
+
elif self.__proxy[0] == PROXY_TYPE_SOCKS4:
|
| 492 |
+
if self.__proxy[2] != None:
|
| 493 |
+
portnum = self.__proxy[2]
|
| 494 |
+
else:
|
| 495 |
+
portnum = 1080
|
| 496 |
+
_orgsocket.connect(self, (self.__proxy[1], portnum))
|
| 497 |
+
self.__negotiatesocks4(destpair[0], destpair[1])
|
| 498 |
+
elif self.__proxy[0] == PROXY_TYPE_HTTP:
|
| 499 |
+
if self.__proxy[2] != None:
|
| 500 |
+
portnum = self.__proxy[2]
|
| 501 |
+
else:
|
| 502 |
+
portnum = 8080
|
| 503 |
+
_orgsocket.connect(self, (self.__proxy[1], portnum))
|
| 504 |
+
self.__negotiatehttp(destpair[0], destpair[1])
|
| 505 |
+
elif self.__proxy[0] == PROXY_TYPE_HTTP_NO_TUNNEL:
|
| 506 |
+
if self.__proxy[2] != None:
|
| 507 |
+
portnum = self.__proxy[2]
|
| 508 |
+
else:
|
| 509 |
+
portnum = 8080
|
| 510 |
+
_orgsocket.connect(self, (self.__proxy[1], portnum))
|
| 511 |
+
if destpair[1] == 443:
|
| 512 |
+
self.__negotiatehttp(destpair[0], destpair[1])
|
| 513 |
+
else:
|
| 514 |
+
self.__httptunnel = False
|
| 515 |
+
elif self.__proxy[0] == None:
|
| 516 |
+
_orgsocket.connect(self, (destpair[0], destpair[1]))
|
| 517 |
+
else:
|
| 518 |
+
raise GeneralProxyError((4, _generalerrors[4]))
|
.venv/lib/python3.11/site-packages/mpmath/tests/__pycache__/test_fp.cpython-311.pyc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5f6b76f33b790aadce04c15aa44a83a4a865757f2e425cdb8e5aa751631a87b4
|
| 3 |
+
size 142531
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/License.txt
ADDED
|
@@ -0,0 +1,1568 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
End User License Agreement
|
| 2 |
+
--------------------------
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
Preface
|
| 6 |
+
-------
|
| 7 |
+
|
| 8 |
+
The Software License Agreement in Chapter 1 and the Supplement
|
| 9 |
+
in Chapter 2 contain license terms and conditions that govern
|
| 10 |
+
the use of NVIDIA software. By accepting this agreement, you
|
| 11 |
+
agree to comply with all the terms and conditions applicable
|
| 12 |
+
to the product(s) included herein.
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
NVIDIA Driver
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
Description
|
| 19 |
+
|
| 20 |
+
This package contains the operating system driver and
|
| 21 |
+
fundamental system software components for NVIDIA GPUs.
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
NVIDIA CUDA Toolkit
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
Description
|
| 28 |
+
|
| 29 |
+
The NVIDIA CUDA Toolkit provides command-line and graphical
|
| 30 |
+
tools for building, debugging and optimizing the performance
|
| 31 |
+
of applications accelerated by NVIDIA GPUs, runtime and math
|
| 32 |
+
libraries, and documentation including programming guides,
|
| 33 |
+
user manuals, and API references.
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
Default Install Location of CUDA Toolkit
|
| 37 |
+
|
| 38 |
+
Windows platform:
|
| 39 |
+
|
| 40 |
+
%ProgramFiles%\NVIDIA GPU Computing Toolkit\CUDA\v#.#
|
| 41 |
+
|
| 42 |
+
Linux platform:
|
| 43 |
+
|
| 44 |
+
/usr/local/cuda-#.#
|
| 45 |
+
|
| 46 |
+
Mac platform:
|
| 47 |
+
|
| 48 |
+
/Developer/NVIDIA/CUDA-#.#
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
NVIDIA CUDA Samples
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
Description
|
| 55 |
+
|
| 56 |
+
This package includes over 100+ CUDA examples that demonstrate
|
| 57 |
+
various CUDA programming principles, and efficient CUDA
|
| 58 |
+
implementation of algorithms in specific application domains.
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
Default Install Location of CUDA Samples
|
| 62 |
+
|
| 63 |
+
Windows platform:
|
| 64 |
+
|
| 65 |
+
%ProgramData%\NVIDIA Corporation\CUDA Samples\v#.#
|
| 66 |
+
|
| 67 |
+
Linux platform:
|
| 68 |
+
|
| 69 |
+
/usr/local/cuda-#.#/samples
|
| 70 |
+
|
| 71 |
+
and
|
| 72 |
+
|
| 73 |
+
$HOME/NVIDIA_CUDA-#.#_Samples
|
| 74 |
+
|
| 75 |
+
Mac platform:
|
| 76 |
+
|
| 77 |
+
/Developer/NVIDIA/CUDA-#.#/samples
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
NVIDIA Nsight Visual Studio Edition (Windows only)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
Description
|
| 84 |
+
|
| 85 |
+
NVIDIA Nsight Development Platform, Visual Studio Edition is a
|
| 86 |
+
development environment integrated into Microsoft Visual
|
| 87 |
+
Studio that provides tools for debugging, profiling, analyzing
|
| 88 |
+
and optimizing your GPU computing and graphics applications.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
Default Install Location of Nsight Visual Studio Edition
|
| 92 |
+
|
| 93 |
+
Windows platform:
|
| 94 |
+
|
| 95 |
+
%ProgramFiles(x86)%\NVIDIA Corporation\Nsight Visual Studio Edition #.#
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
1. License Agreement for NVIDIA Software Development Kits
|
| 99 |
+
---------------------------------------------------------
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
Release Date: July 26, 2018
|
| 103 |
+
---------------------------
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
Important NoticeRead before downloading, installing,
|
| 107 |
+
copying or using the licensed software:
|
| 108 |
+
-------------------------------------------------------
|
| 109 |
+
|
| 110 |
+
This license agreement, including exhibits attached
|
| 111 |
+
("Agreement”) is a legal agreement between you and NVIDIA
|
| 112 |
+
Corporation ("NVIDIA") and governs your use of a NVIDIA
|
| 113 |
+
software development kit (“SDK”).
|
| 114 |
+
|
| 115 |
+
Each SDK has its own set of software and materials, but here
|
| 116 |
+
is a description of the types of items that may be included in
|
| 117 |
+
a SDK: source code, header files, APIs, data sets and assets
|
| 118 |
+
(examples include images, textures, models, scenes, videos,
|
| 119 |
+
native API input/output files), binary software, sample code,
|
| 120 |
+
libraries, utility programs, programming code and
|
| 121 |
+
documentation.
|
| 122 |
+
|
| 123 |
+
This Agreement can be accepted only by an adult of legal age
|
| 124 |
+
of majority in the country in which the SDK is used.
|
| 125 |
+
|
| 126 |
+
If you are entering into this Agreement on behalf of a company
|
| 127 |
+
or other legal entity, you represent that you have the legal
|
| 128 |
+
authority to bind the entity to this Agreement, in which case
|
| 129 |
+
“you” will mean the entity you represent.
|
| 130 |
+
|
| 131 |
+
If you don’t have the required age or authority to accept
|
| 132 |
+
this Agreement, or if you don’t accept all the terms and
|
| 133 |
+
conditions of this Agreement, do not download, install or use
|
| 134 |
+
the SDK.
|
| 135 |
+
|
| 136 |
+
You agree to use the SDK only for purposes that are permitted
|
| 137 |
+
by (a) this Agreement, and (b) any applicable law, regulation
|
| 138 |
+
or generally accepted practices or guidelines in the relevant
|
| 139 |
+
jurisdictions.
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
1.1. License
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
1.1.1. License Grant
|
| 146 |
+
|
| 147 |
+
Subject to the terms of this Agreement, NVIDIA hereby grants
|
| 148 |
+
you a non-exclusive, non-transferable license, without the
|
| 149 |
+
right to sublicense (except as expressly provided in this
|
| 150 |
+
Agreement) to:
|
| 151 |
+
|
| 152 |
+
1. Install and use the SDK,
|
| 153 |
+
|
| 154 |
+
2. Modify and create derivative works of sample source code
|
| 155 |
+
delivered in the SDK, and
|
| 156 |
+
|
| 157 |
+
3. Distribute those portions of the SDK that are identified
|
| 158 |
+
in this Agreement as distributable, as incorporated in
|
| 159 |
+
object code format into a software application that meets
|
| 160 |
+
the distribution requirements indicated in this Agreement.
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
1.1.2. Distribution Requirements
|
| 164 |
+
|
| 165 |
+
These are the distribution requirements for you to exercise
|
| 166 |
+
the distribution grant:
|
| 167 |
+
|
| 168 |
+
1. Your application must have material additional
|
| 169 |
+
functionality, beyond the included portions of the SDK.
|
| 170 |
+
|
| 171 |
+
2. The distributable portions of the SDK shall only be
|
| 172 |
+
accessed by your application.
|
| 173 |
+
|
| 174 |
+
3. The following notice shall be included in modifications
|
| 175 |
+
and derivative works of sample source code distributed:
|
| 176 |
+
“This software contains source code provided by NVIDIA
|
| 177 |
+
Corporation.”
|
| 178 |
+
|
| 179 |
+
4. Unless a developer tool is identified in this Agreement
|
| 180 |
+
as distributable, it is delivered for your internal use
|
| 181 |
+
only.
|
| 182 |
+
|
| 183 |
+
5. The terms under which you distribute your application
|
| 184 |
+
must be consistent with the terms of this Agreement,
|
| 185 |
+
including (without limitation) terms relating to the
|
| 186 |
+
license grant and license restrictions and protection of
|
| 187 |
+
NVIDIA’s intellectual property rights. Additionally, you
|
| 188 |
+
agree that you will protect the privacy, security and
|
| 189 |
+
legal rights of your application users.
|
| 190 |
+
|
| 191 |
+
6. You agree to notify NVIDIA in writing of any known or
|
| 192 |
+
suspected distribution or use of the SDK not in compliance
|
| 193 |
+
with the requirements of this Agreement, and to enforce
|
| 194 |
+
the terms of your agreements with respect to distributed
|
| 195 |
+
SDK.
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
1.1.3. Authorized Users
|
| 199 |
+
|
| 200 |
+
You may allow employees and contractors of your entity or of
|
| 201 |
+
your subsidiary(ies) to access and use the SDK from your
|
| 202 |
+
secure network to perform work on your behalf.
|
| 203 |
+
|
| 204 |
+
If you are an academic institution you may allow users
|
| 205 |
+
enrolled or employed by the academic institution to access and
|
| 206 |
+
use the SDK from your secure network.
|
| 207 |
+
|
| 208 |
+
You are responsible for the compliance with the terms of this
|
| 209 |
+
Agreement by your authorized users. If you become aware that
|
| 210 |
+
your authorized users didn’t follow the terms of this
|
| 211 |
+
Agreement, you agree to take reasonable steps to resolve the
|
| 212 |
+
non-compliance and prevent new occurrences.
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
1.1.4. Pre-Release SDK
|
| 216 |
+
|
| 217 |
+
The SDK versions identified as alpha, beta, preview or
|
| 218 |
+
otherwise as pre-release, may not be fully functional, may
|
| 219 |
+
contain errors or design flaws, and may have reduced or
|
| 220 |
+
different security, privacy, accessibility, availability, and
|
| 221 |
+
reliability standards relative to commercial versions of
|
| 222 |
+
NVIDIA software and materials. Use of a pre-release SDK may
|
| 223 |
+
result in unexpected results, loss of data, project delays or
|
| 224 |
+
other unpredictable damage or loss.
|
| 225 |
+
|
| 226 |
+
You may use a pre-release SDK at your own risk, understanding
|
| 227 |
+
that pre-release SDKs are not intended for use in production
|
| 228 |
+
or business-critical systems.
|
| 229 |
+
|
| 230 |
+
NVIDIA may choose not to make available a commercial version
|
| 231 |
+
of any pre-release SDK. NVIDIA may also choose to abandon
|
| 232 |
+
development and terminate the availability of a pre-release
|
| 233 |
+
SDK at any time without liability.
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
1.1.5. Updates
|
| 237 |
+
|
| 238 |
+
NVIDIA may, at its option, make available patches, workarounds
|
| 239 |
+
or other updates to this SDK. Unless the updates are provided
|
| 240 |
+
with their separate governing terms, they are deemed part of
|
| 241 |
+
the SDK licensed to you as provided in this Agreement. You
|
| 242 |
+
agree that the form and content of the SDK that NVIDIA
|
| 243 |
+
provides may change without prior notice to you. While NVIDIA
|
| 244 |
+
generally maintains compatibility between versions, NVIDIA may
|
| 245 |
+
in some cases make changes that introduce incompatibilities in
|
| 246 |
+
future versions of the SDK.
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
1.1.6. Third Party Licenses
|
| 250 |
+
|
| 251 |
+
The SDK may come bundled with, or otherwise include or be
|
| 252 |
+
distributed with, third party software licensed by a NVIDIA
|
| 253 |
+
supplier and/or open source software provided under an open
|
| 254 |
+
source license. Use of third party software is subject to the
|
| 255 |
+
third-party license terms, or in the absence of third party
|
| 256 |
+
terms, the terms of this Agreement. Copyright to third party
|
| 257 |
+
software is held by the copyright holders indicated in the
|
| 258 |
+
third-party software or license.
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
1.1.7. Reservation of Rights
|
| 262 |
+
|
| 263 |
+
NVIDIA reserves all rights, title, and interest in and to the
|
| 264 |
+
SDK, not expressly granted to you under this Agreement.
|
| 265 |
+
|
| 266 |
+
|
| 267 |
+
1.2. Limitations
|
| 268 |
+
|
| 269 |
+
The following license limitations apply to your use of the
|
| 270 |
+
SDK:
|
| 271 |
+
|
| 272 |
+
1. You may not reverse engineer, decompile or disassemble,
|
| 273 |
+
or remove copyright or other proprietary notices from any
|
| 274 |
+
portion of the SDK or copies of the SDK.
|
| 275 |
+
|
| 276 |
+
2. Except as expressly provided in this Agreement, you may
|
| 277 |
+
not copy, sell, rent, sublicense, transfer, distribute,
|
| 278 |
+
modify, or create derivative works of any portion of the
|
| 279 |
+
SDK. For clarity, you may not distribute or sublicense the
|
| 280 |
+
SDK as a stand-alone product.
|
| 281 |
+
|
| 282 |
+
3. Unless you have an agreement with NVIDIA for this
|
| 283 |
+
purpose, you may not indicate that an application created
|
| 284 |
+
with the SDK is sponsored or endorsed by NVIDIA.
|
| 285 |
+
|
| 286 |
+
4. You may not bypass, disable, or circumvent any
|
| 287 |
+
encryption, security, digital rights management or
|
| 288 |
+
authentication mechanism in the SDK.
|
| 289 |
+
|
| 290 |
+
5. You may not use the SDK in any manner that would cause it
|
| 291 |
+
to become subject to an open source software license. As
|
| 292 |
+
examples, licenses that require as a condition of use,
|
| 293 |
+
modification, and/or distribution that the SDK be:
|
| 294 |
+
|
| 295 |
+
a. Disclosed or distributed in source code form;
|
| 296 |
+
|
| 297 |
+
b. Licensed for the purpose of making derivative works;
|
| 298 |
+
or
|
| 299 |
+
|
| 300 |
+
c. Redistributable at no charge.
|
| 301 |
+
|
| 302 |
+
6. Unless you have an agreement with NVIDIA for this
|
| 303 |
+
purpose, you may not use the SDK with any system or
|
| 304 |
+
application where the use or failure of the system or
|
| 305 |
+
application can reasonably be expected to threaten or
|
| 306 |
+
result in personal injury, death, or catastrophic loss.
|
| 307 |
+
Examples include use in avionics, navigation, military,
|
| 308 |
+
medical, life support or other life critical applications.
|
| 309 |
+
NVIDIA does not design, test or manufacture the SDK for
|
| 310 |
+
these critical uses and NVIDIA shall not be liable to you
|
| 311 |
+
or any third party, in whole or in part, for any claims or
|
| 312 |
+
damages arising from such uses.
|
| 313 |
+
|
| 314 |
+
7. You agree to defend, indemnify and hold harmless NVIDIA
|
| 315 |
+
and its affiliates, and their respective employees,
|
| 316 |
+
contractors, agents, officers and directors, from and
|
| 317 |
+
against any and all claims, damages, obligations, losses,
|
| 318 |
+
liabilities, costs or debt, fines, restitutions and
|
| 319 |
+
expenses (including but not limited to attorney’s fees
|
| 320 |
+
and costs incident to establishing the right of
|
| 321 |
+
indemnification) arising out of or related to your use of
|
| 322 |
+
the SDK outside of the scope of this Agreement, or not in
|
| 323 |
+
compliance with its terms.
|
| 324 |
+
|
| 325 |
+
|
| 326 |
+
1.3. Ownership
|
| 327 |
+
|
| 328 |
+
1. NVIDIA or its licensors hold all rights, title and
|
| 329 |
+
interest in and to the SDK and its modifications and
|
| 330 |
+
derivative works, including their respective intellectual
|
| 331 |
+
property rights, subject to your rights described in this
|
| 332 |
+
section. This SDK may include software and materials from
|
| 333 |
+
NVIDIA’s licensors, and these licensors are intended
|
| 334 |
+
third party beneficiaries that may enforce this Agreement
|
| 335 |
+
with respect to their intellectual property rights.
|
| 336 |
+
|
| 337 |
+
2. You hold all rights, title and interest in and to your
|
| 338 |
+
applications and your derivative works of the sample
|
| 339 |
+
source code delivered in the SDK, including their
|
| 340 |
+
respective intellectual property rights, subject to
|
| 341 |
+
NVIDIA’s rights described in this section.
|
| 342 |
+
|
| 343 |
+
3. You may, but don’t have to, provide to NVIDIA
|
| 344 |
+
suggestions, feature requests or other feedback regarding
|
| 345 |
+
the SDK, including possible enhancements or modifications
|
| 346 |
+
to the SDK. For any feedback that you voluntarily provide,
|
| 347 |
+
you hereby grant NVIDIA and its affiliates a perpetual,
|
| 348 |
+
non-exclusive, worldwide, irrevocable license to use,
|
| 349 |
+
reproduce, modify, license, sublicense (through multiple
|
| 350 |
+
tiers of sublicensees), and distribute (through multiple
|
| 351 |
+
tiers of distributors) it without the payment of any
|
| 352 |
+
royalties or fees to you. NVIDIA will use feedback at its
|
| 353 |
+
choice. NVIDIA is constantly looking for ways to improve
|
| 354 |
+
its products, so you may send feedback to NVIDIA through
|
| 355 |
+
the developer portal at https://developer.nvidia.com.
|
| 356 |
+
|
| 357 |
+
|
| 358 |
+
1.4. No Warranties
|
| 359 |
+
|
| 360 |
+
THE SDK IS PROVIDED BY NVIDIA “AS IS” AND “WITH ALL
|
| 361 |
+
FAULTS.” TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND
|
| 362 |
+
ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND
|
| 363 |
+
OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING,
|
| 364 |
+
BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
|
| 365 |
+
FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR THE
|
| 366 |
+
ABSENCE OF ANY DEFECTS THEREIN, WHETHER LATENT OR PATENT. NO
|
| 367 |
+
WARRANTY IS MADE ON THE BASIS OF TRADE USAGE, COURSE OF
|
| 368 |
+
DEALING OR COURSE OF TRADE.
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
1.5. Limitation of Liability
|
| 372 |
+
|
| 373 |
+
TO THE MAXIMUM EXTENT PERMITTED BY LAW, NVIDIA AND ITS
|
| 374 |
+
AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
|
| 375 |
+
PUNITIVE OR CONSEQUENTIAL DAMAGES, OR ANY LOST PROFITS, LOSS
|
| 376 |
+
OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF
|
| 377 |
+
PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION
|
| 378 |
+
WITH THIS AGREEMENT OR THE USE OR PERFORMANCE OF THE SDK,
|
| 379 |
+
WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH
|
| 380 |
+
OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE),
|
| 381 |
+
PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF
|
| 382 |
+
LIABILITY. IN NO EVENT WILL NVIDIA’S AND ITS AFFILIATES
|
| 383 |
+
TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS
|
| 384 |
+
AGREEMENT EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE
|
| 385 |
+
NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS
|
| 386 |
+
LIMIT.
|
| 387 |
+
|
| 388 |
+
These exclusions and limitations of liability shall apply
|
| 389 |
+
regardless if NVIDIA or its affiliates have been advised of
|
| 390 |
+
the possibility of such damages, and regardless of whether a
|
| 391 |
+
remedy fails its essential purpose. These exclusions and
|
| 392 |
+
limitations of liability form an essential basis of the
|
| 393 |
+
bargain between the parties, and, absent any of these
|
| 394 |
+
exclusions or limitations of liability, the provisions of this
|
| 395 |
+
Agreement, including, without limitation, the economic terms,
|
| 396 |
+
would be substantially different.
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
1.6. Termination
|
| 400 |
+
|
| 401 |
+
1. This Agreement will continue to apply until terminated by
|
| 402 |
+
either you or NVIDIA as described below.
|
| 403 |
+
|
| 404 |
+
2. If you want to terminate this Agreement, you may do so by
|
| 405 |
+
stopping to use the SDK.
|
| 406 |
+
|
| 407 |
+
3. NVIDIA may, at any time, terminate this Agreement if:
|
| 408 |
+
|
| 409 |
+
a. (i) you fail to comply with any term of this
|
| 410 |
+
Agreement and the non-compliance is not fixed within
|
| 411 |
+
thirty (30) days following notice from NVIDIA (or
|
| 412 |
+
immediately if you violate NVIDIA’s intellectual
|
| 413 |
+
property rights);
|
| 414 |
+
|
| 415 |
+
b. (ii) you commence or participate in any legal
|
| 416 |
+
proceeding against NVIDIA with respect to the SDK; or
|
| 417 |
+
|
| 418 |
+
c. (iii) NVIDIA decides to no longer provide the SDK in
|
| 419 |
+
a country or, in NVIDIA’s sole discretion, the
|
| 420 |
+
continued use of it is no longer commercially viable.
|
| 421 |
+
|
| 422 |
+
4. Upon any termination of this Agreement, you agree to
|
| 423 |
+
promptly discontinue use of the SDK and destroy all copies
|
| 424 |
+
in your possession or control. Your prior distributions in
|
| 425 |
+
accordance with this Agreement are not affected by the
|
| 426 |
+
termination of this Agreement. Upon written request, you
|
| 427 |
+
will certify in writing that you have complied with your
|
| 428 |
+
commitments under this section. Upon any termination of
|
| 429 |
+
this Agreement all provisions survive except for the
|
| 430 |
+
license grant provisions.
|
| 431 |
+
|
| 432 |
+
|
| 433 |
+
1.7. General
|
| 434 |
+
|
| 435 |
+
If you wish to assign this Agreement or your rights and
|
| 436 |
+
obligations, including by merger, consolidation, dissolution
|
| 437 |
+
or operation of law, contact NVIDIA to ask for permission. Any
|
| 438 |
+
attempted assignment not approved by NVIDIA in writing shall
|
| 439 |
+
be void and of no effect. NVIDIA may assign, delegate or
|
| 440 |
+
transfer this Agreement and its rights and obligations, and if
|
| 441 |
+
to a non-affiliate you will be notified.
|
| 442 |
+
|
| 443 |
+
You agree to cooperate with NVIDIA and provide reasonably
|
| 444 |
+
requested information to verify your compliance with this
|
| 445 |
+
Agreement.
|
| 446 |
+
|
| 447 |
+
This Agreement will be governed in all respects by the laws of
|
| 448 |
+
the United States and of the State of Delaware as those laws
|
| 449 |
+
are applied to contracts entered into and performed entirely
|
| 450 |
+
within Delaware by Delaware residents, without regard to the
|
| 451 |
+
conflicts of laws principles. The United Nations Convention on
|
| 452 |
+
Contracts for the International Sale of Goods is specifically
|
| 453 |
+
disclaimed. You agree to all terms of this Agreement in the
|
| 454 |
+
English language.
|
| 455 |
+
|
| 456 |
+
The state or federal courts residing in Santa Clara County,
|
| 457 |
+
California shall have exclusive jurisdiction over any dispute
|
| 458 |
+
or claim arising out of this Agreement. Notwithstanding this,
|
| 459 |
+
you agree that NVIDIA shall still be allowed to apply for
|
| 460 |
+
injunctive remedies or an equivalent type of urgent legal
|
| 461 |
+
relief in any jurisdiction.
|
| 462 |
+
|
| 463 |
+
If any court of competent jurisdiction determines that any
|
| 464 |
+
provision of this Agreement is illegal, invalid or
|
| 465 |
+
unenforceable, such provision will be construed as limited to
|
| 466 |
+
the extent necessary to be consistent with and fully
|
| 467 |
+
enforceable under the law and the remaining provisions will
|
| 468 |
+
remain in full force and effect. Unless otherwise specified,
|
| 469 |
+
remedies are cumulative.
|
| 470 |
+
|
| 471 |
+
Each party acknowledges and agrees that the other is an
|
| 472 |
+
independent contractor in the performance of this Agreement.
|
| 473 |
+
|
| 474 |
+
The SDK has been developed entirely at private expense and is
|
| 475 |
+
“commercial items” consisting of “commercial computer
|
| 476 |
+
software” and “commercial computer software
|
| 477 |
+
documentation” provided with RESTRICTED RIGHTS. Use,
|
| 478 |
+
duplication or disclosure by the U.S. Government or a U.S.
|
| 479 |
+
Government subcontractor is subject to the restrictions in
|
| 480 |
+
this Agreement pursuant to DFARS 227.7202-3(a) or as set forth
|
| 481 |
+
in subparagraphs (c)(1) and (2) of the Commercial Computer
|
| 482 |
+
Software - Restricted Rights clause at FAR 52.227-19, as
|
| 483 |
+
applicable. Contractor/manufacturer is NVIDIA, 2788 San Tomas
|
| 484 |
+
Expressway, Santa Clara, CA 95051.
|
| 485 |
+
|
| 486 |
+
The SDK is subject to United States export laws and
|
| 487 |
+
regulations. You agree that you will not ship, transfer or
|
| 488 |
+
export the SDK into any country, or use the SDK in any manner,
|
| 489 |
+
prohibited by the United States Bureau of Industry and
|
| 490 |
+
Security or economic sanctions regulations administered by the
|
| 491 |
+
U.S. Department of Treasury’s Office of Foreign Assets
|
| 492 |
+
Control (OFAC), or any applicable export laws, restrictions or
|
| 493 |
+
regulations. These laws include restrictions on destinations,
|
| 494 |
+
end users and end use. By accepting this Agreement, you
|
| 495 |
+
confirm that you are not a resident or citizen of any country
|
| 496 |
+
currently embargoed by the U.S. and that you are not otherwise
|
| 497 |
+
prohibited from receiving the SDK.
|
| 498 |
+
|
| 499 |
+
Any notice delivered by NVIDIA to you under this Agreement
|
| 500 |
+
will be delivered via mail, email or fax. You agree that any
|
| 501 |
+
notices that NVIDIA sends you electronically will satisfy any
|
| 502 |
+
legal communication requirements. Please direct your legal
|
| 503 |
+
notices or other correspondence to NVIDIA Corporation, 2788
|
| 504 |
+
San Tomas Expressway, Santa Clara, California 95051, United
|
| 505 |
+
States of America, Attention: Legal Department.
|
| 506 |
+
|
| 507 |
+
This Agreement and any exhibits incorporated into this
|
| 508 |
+
Agreement constitute the entire agreement of the parties with
|
| 509 |
+
respect to the subject matter of this Agreement and supersede
|
| 510 |
+
all prior negotiations or documentation exchanged between the
|
| 511 |
+
parties relating to this SDK license. Any additional and/or
|
| 512 |
+
conflicting terms on documents issued by you are null, void,
|
| 513 |
+
and invalid. Any amendment or waiver under this Agreement
|
| 514 |
+
shall be in writing and signed by representatives of both
|
| 515 |
+
parties.
|
| 516 |
+
|
| 517 |
+
|
| 518 |
+
2. CUDA Toolkit Supplement to Software License Agreement for
|
| 519 |
+
NVIDIA Software Development Kits
|
| 520 |
+
------------------------------------------------------------
|
| 521 |
+
|
| 522 |
+
|
| 523 |
+
Release date: August 16, 2018
|
| 524 |
+
-----------------------------
|
| 525 |
+
|
| 526 |
+
The terms in this supplement govern your use of the NVIDIA
|
| 527 |
+
CUDA Toolkit SDK under the terms of your license agreement
|
| 528 |
+
(“Agreement”) as modified by this supplement. Capitalized
|
| 529 |
+
terms used but not defined below have the meaning assigned to
|
| 530 |
+
them in the Agreement.
|
| 531 |
+
|
| 532 |
+
This supplement is an exhibit to the Agreement and is
|
| 533 |
+
incorporated as an integral part of the Agreement. In the
|
| 534 |
+
event of conflict between the terms in this supplement and the
|
| 535 |
+
terms in the Agreement, the terms in this supplement govern.
|
| 536 |
+
|
| 537 |
+
|
| 538 |
+
2.1. License Scope
|
| 539 |
+
|
| 540 |
+
The SDK is licensed for you to develop applications only for
|
| 541 |
+
use in systems with NVIDIA GPUs.
|
| 542 |
+
|
| 543 |
+
|
| 544 |
+
2.2. Distribution
|
| 545 |
+
|
| 546 |
+
The portions of the SDK that are distributable under the
|
| 547 |
+
Agreement are listed in Attachment A.
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
2.3. Operating Systems
|
| 551 |
+
|
| 552 |
+
Those portions of the SDK designed exclusively for use on the
|
| 553 |
+
Linux or FreeBSD operating systems, or other operating systems
|
| 554 |
+
derived from the source code to these operating systems, may
|
| 555 |
+
be copied and redistributed for use in accordance with this
|
| 556 |
+
Agreement, provided that the object code files are not
|
| 557 |
+
modified in any way (except for unzipping of compressed
|
| 558 |
+
files).
|
| 559 |
+
|
| 560 |
+
|
| 561 |
+
2.4. Audio and Video Encoders and Decoders
|
| 562 |
+
|
| 563 |
+
You acknowledge and agree that it is your sole responsibility
|
| 564 |
+
to obtain any additional third-party licenses required to
|
| 565 |
+
make, have made, use, have used, sell, import, and offer for
|
| 566 |
+
sale your products or services that include or incorporate any
|
| 567 |
+
third-party software and content relating to audio and/or
|
| 568 |
+
video encoders and decoders from, including but not limited
|
| 569 |
+
to, Microsoft, Thomson, Fraunhofer IIS, Sisvel S.p.A.,
|
| 570 |
+
MPEG-LA, and Coding Technologies. NVIDIA does not grant to you
|
| 571 |
+
under this Agreement any necessary patent or other rights with
|
| 572 |
+
respect to any audio and/or video encoders and decoders.
|
| 573 |
+
|
| 574 |
+
|
| 575 |
+
2.5. Licensing
|
| 576 |
+
|
| 577 |
+
If the distribution terms in this Agreement are not suitable
|
| 578 |
+
for your organization, or for any questions regarding this
|
| 579 |
+
Agreement, please contact NVIDIA at
|
| 580 |
+
nvidia-compute-license-questions@nvidia.com.
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
2.6. Attachment A
|
| 584 |
+
|
| 585 |
+
The following portions of the SDK are distributable under the
|
| 586 |
+
Agreement:
|
| 587 |
+
|
| 588 |
+
Component
|
| 589 |
+
|
| 590 |
+
CUDA Runtime
|
| 591 |
+
|
| 592 |
+
Windows
|
| 593 |
+
|
| 594 |
+
cudart.dll, cudart_static.lib, cudadevrt.lib
|
| 595 |
+
|
| 596 |
+
Mac OSX
|
| 597 |
+
|
| 598 |
+
libcudart.dylib, libcudart_static.a, libcudadevrt.a
|
| 599 |
+
|
| 600 |
+
Linux
|
| 601 |
+
|
| 602 |
+
libcudart.so, libcudart_static.a, libcudadevrt.a
|
| 603 |
+
|
| 604 |
+
Android
|
| 605 |
+
|
| 606 |
+
libcudart.so, libcudart_static.a, libcudadevrt.a
|
| 607 |
+
|
| 608 |
+
Component
|
| 609 |
+
|
| 610 |
+
CUDA FFT Library
|
| 611 |
+
|
| 612 |
+
Windows
|
| 613 |
+
|
| 614 |
+
cufft.dll, cufftw.dll, cufft.lib, cufftw.lib
|
| 615 |
+
|
| 616 |
+
Mac OSX
|
| 617 |
+
|
| 618 |
+
libcufft.dylib, libcufft_static.a, libcufftw.dylib,
|
| 619 |
+
libcufftw_static.a
|
| 620 |
+
|
| 621 |
+
Linux
|
| 622 |
+
|
| 623 |
+
libcufft.so, libcufft_static.a, libcufftw.so,
|
| 624 |
+
libcufftw_static.a
|
| 625 |
+
|
| 626 |
+
Android
|
| 627 |
+
|
| 628 |
+
libcufft.so, libcufft_static.a, libcufftw.so,
|
| 629 |
+
libcufftw_static.a
|
| 630 |
+
|
| 631 |
+
Component
|
| 632 |
+
|
| 633 |
+
CUDA BLAS Library
|
| 634 |
+
|
| 635 |
+
Windows
|
| 636 |
+
|
| 637 |
+
cublas.dll, cublasLt.dll
|
| 638 |
+
|
| 639 |
+
Mac OSX
|
| 640 |
+
|
| 641 |
+
libcublas.dylib, libcublasLt.dylib, libcublas_static.a,
|
| 642 |
+
libcublasLt_static.a
|
| 643 |
+
|
| 644 |
+
Linux
|
| 645 |
+
|
| 646 |
+
libcublas.so, libcublasLt.so, libcublas_static.a,
|
| 647 |
+
libcublasLt_static.a
|
| 648 |
+
|
| 649 |
+
Android
|
| 650 |
+
|
| 651 |
+
libcublas.so, libcublasLt.so, libcublas_static.a,
|
| 652 |
+
libcublasLt_static.a
|
| 653 |
+
|
| 654 |
+
Component
|
| 655 |
+
|
| 656 |
+
NVIDIA "Drop-in" BLAS Library
|
| 657 |
+
|
| 658 |
+
Windows
|
| 659 |
+
|
| 660 |
+
nvblas.dll
|
| 661 |
+
|
| 662 |
+
Mac OSX
|
| 663 |
+
|
| 664 |
+
libnvblas.dylib
|
| 665 |
+
|
| 666 |
+
Linux
|
| 667 |
+
|
| 668 |
+
libnvblas.so
|
| 669 |
+
|
| 670 |
+
Component
|
| 671 |
+
|
| 672 |
+
CUDA Sparse Matrix Library
|
| 673 |
+
|
| 674 |
+
Windows
|
| 675 |
+
|
| 676 |
+
cusparse.dll, cusparse.lib
|
| 677 |
+
|
| 678 |
+
Mac OSX
|
| 679 |
+
|
| 680 |
+
libcusparse.dylib, libcusparse_static.a
|
| 681 |
+
|
| 682 |
+
Linux
|
| 683 |
+
|
| 684 |
+
libcusparse.so, libcusparse_static.a
|
| 685 |
+
|
| 686 |
+
Android
|
| 687 |
+
|
| 688 |
+
libcusparse.so, libcusparse_static.a
|
| 689 |
+
|
| 690 |
+
Component
|
| 691 |
+
|
| 692 |
+
CUDA Linear Solver Library
|
| 693 |
+
|
| 694 |
+
Windows
|
| 695 |
+
|
| 696 |
+
cusolver.dll, cusolver.lib
|
| 697 |
+
|
| 698 |
+
Mac OSX
|
| 699 |
+
|
| 700 |
+
libcusolver.dylib, libcusolver_static.a
|
| 701 |
+
|
| 702 |
+
Linux
|
| 703 |
+
|
| 704 |
+
libcusolver.so, libcusolver_static.a
|
| 705 |
+
|
| 706 |
+
Android
|
| 707 |
+
|
| 708 |
+
libcusolver.so, libcusolver_static.a
|
| 709 |
+
|
| 710 |
+
Component
|
| 711 |
+
|
| 712 |
+
CUDA Random Number Generation Library
|
| 713 |
+
|
| 714 |
+
Windows
|
| 715 |
+
|
| 716 |
+
curand.dll, curand.lib
|
| 717 |
+
|
| 718 |
+
Mac OSX
|
| 719 |
+
|
| 720 |
+
libcurand.dylib, libcurand_static.a
|
| 721 |
+
|
| 722 |
+
Linux
|
| 723 |
+
|
| 724 |
+
libcurand.so, libcurand_static.a
|
| 725 |
+
|
| 726 |
+
Android
|
| 727 |
+
|
| 728 |
+
libcurand.so, libcurand_static.a
|
| 729 |
+
|
| 730 |
+
Component
|
| 731 |
+
|
| 732 |
+
CUDA Accelerated Graph Library
|
| 733 |
+
|
| 734 |
+
Component
|
| 735 |
+
|
| 736 |
+
NVIDIA Performance Primitives Library
|
| 737 |
+
|
| 738 |
+
Windows
|
| 739 |
+
|
| 740 |
+
nppc.dll, nppc.lib, nppial.dll, nppial.lib, nppicc.dll,
|
| 741 |
+
nppicc.lib, nppicom.dll, nppicom.lib, nppidei.dll,
|
| 742 |
+
nppidei.lib, nppif.dll, nppif.lib, nppig.dll, nppig.lib,
|
| 743 |
+
nppim.dll, nppim.lib, nppist.dll, nppist.lib, nppisu.dll,
|
| 744 |
+
nppisu.lib, nppitc.dll, nppitc.lib, npps.dll, npps.lib
|
| 745 |
+
|
| 746 |
+
Mac OSX
|
| 747 |
+
|
| 748 |
+
libnppc.dylib, libnppc_static.a, libnppial.dylib,
|
| 749 |
+
libnppial_static.a, libnppicc.dylib, libnppicc_static.a,
|
| 750 |
+
libnppicom.dylib, libnppicom_static.a, libnppidei.dylib,
|
| 751 |
+
libnppidei_static.a, libnppif.dylib, libnppif_static.a,
|
| 752 |
+
libnppig.dylib, libnppig_static.a, libnppim.dylib,
|
| 753 |
+
libnppisu_static.a, libnppitc.dylib, libnppitc_static.a,
|
| 754 |
+
libnpps.dylib, libnpps_static.a
|
| 755 |
+
|
| 756 |
+
Linux
|
| 757 |
+
|
| 758 |
+
libnppc.so, libnppc_static.a, libnppial.so,
|
| 759 |
+
libnppial_static.a, libnppicc.so, libnppicc_static.a,
|
| 760 |
+
libnppicom.so, libnppicom_static.a, libnppidei.so,
|
| 761 |
+
libnppidei_static.a, libnppif.so, libnppif_static.a
|
| 762 |
+
libnppig.so, libnppig_static.a, libnppim.so,
|
| 763 |
+
libnppim_static.a, libnppist.so, libnppist_static.a,
|
| 764 |
+
libnppisu.so, libnppisu_static.a, libnppitc.so
|
| 765 |
+
libnppitc_static.a, libnpps.so, libnpps_static.a
|
| 766 |
+
|
| 767 |
+
Android
|
| 768 |
+
|
| 769 |
+
libnppc.so, libnppc_static.a, libnppial.so,
|
| 770 |
+
libnppial_static.a, libnppicc.so, libnppicc_static.a,
|
| 771 |
+
libnppicom.so, libnppicom_static.a, libnppidei.so,
|
| 772 |
+
libnppidei_static.a, libnppif.so, libnppif_static.a
|
| 773 |
+
libnppig.so, libnppig_static.a, libnppim.so,
|
| 774 |
+
libnppim_static.a, libnppist.so, libnppist_static.a,
|
| 775 |
+
libnppisu.so, libnppisu_static.a, libnppitc.so
|
| 776 |
+
libnppitc_static.a, libnpps.so, libnpps_static.a
|
| 777 |
+
|
| 778 |
+
Component
|
| 779 |
+
|
| 780 |
+
NVIDIA JPEG Library
|
| 781 |
+
|
| 782 |
+
Linux
|
| 783 |
+
|
| 784 |
+
libnvjpeg.so, libnvjpeg_static.a
|
| 785 |
+
|
| 786 |
+
Component
|
| 787 |
+
|
| 788 |
+
Internal common library required for statically linking to
|
| 789 |
+
cuBLAS, cuSPARSE, cuFFT, cuRAND, nvJPEG and NPP
|
| 790 |
+
|
| 791 |
+
Mac OSX
|
| 792 |
+
|
| 793 |
+
libculibos.a
|
| 794 |
+
|
| 795 |
+
Linux
|
| 796 |
+
|
| 797 |
+
libculibos.a
|
| 798 |
+
|
| 799 |
+
Component
|
| 800 |
+
|
| 801 |
+
NVIDIA Runtime Compilation Library and Header
|
| 802 |
+
|
| 803 |
+
All
|
| 804 |
+
|
| 805 |
+
nvrtc.h
|
| 806 |
+
|
| 807 |
+
Windows
|
| 808 |
+
|
| 809 |
+
nvrtc.dll, nvrtc-builtins.dll
|
| 810 |
+
|
| 811 |
+
Mac OSX
|
| 812 |
+
|
| 813 |
+
libnvrtc.dylib, libnvrtc-builtins.dylib
|
| 814 |
+
|
| 815 |
+
Linux
|
| 816 |
+
|
| 817 |
+
libnvrtc.so, libnvrtc-builtins.so
|
| 818 |
+
|
| 819 |
+
Component
|
| 820 |
+
|
| 821 |
+
NVIDIA Optimizing Compiler Library
|
| 822 |
+
|
| 823 |
+
Windows
|
| 824 |
+
|
| 825 |
+
nvvm.dll
|
| 826 |
+
|
| 827 |
+
Mac OSX
|
| 828 |
+
|
| 829 |
+
libnvvm.dylib
|
| 830 |
+
|
| 831 |
+
Linux
|
| 832 |
+
|
| 833 |
+
libnvvm.so
|
| 834 |
+
|
| 835 |
+
Component
|
| 836 |
+
|
| 837 |
+
NVIDIA Common Device Math Functions Library
|
| 838 |
+
|
| 839 |
+
Windows
|
| 840 |
+
|
| 841 |
+
libdevice.10.bc
|
| 842 |
+
|
| 843 |
+
Mac OSX
|
| 844 |
+
|
| 845 |
+
libdevice.10.bc
|
| 846 |
+
|
| 847 |
+
Linux
|
| 848 |
+
|
| 849 |
+
libdevice.10.bc
|
| 850 |
+
|
| 851 |
+
Component
|
| 852 |
+
|
| 853 |
+
CUDA Occupancy Calculation Header Library
|
| 854 |
+
|
| 855 |
+
All
|
| 856 |
+
|
| 857 |
+
cuda_occupancy.h
|
| 858 |
+
|
| 859 |
+
Component
|
| 860 |
+
|
| 861 |
+
CUDA Half Precision Headers
|
| 862 |
+
|
| 863 |
+
All
|
| 864 |
+
|
| 865 |
+
cuda_fp16.h, cuda_fp16.hpp
|
| 866 |
+
|
| 867 |
+
Component
|
| 868 |
+
|
| 869 |
+
CUDA Profiling Tools Interface (CUPTI) Library
|
| 870 |
+
|
| 871 |
+
Windows
|
| 872 |
+
|
| 873 |
+
cupti.dll
|
| 874 |
+
|
| 875 |
+
Mac OSX
|
| 876 |
+
|
| 877 |
+
libcupti.dylib
|
| 878 |
+
|
| 879 |
+
Linux
|
| 880 |
+
|
| 881 |
+
libcupti.so
|
| 882 |
+
|
| 883 |
+
Component
|
| 884 |
+
|
| 885 |
+
NVIDIA Tools Extension Library
|
| 886 |
+
|
| 887 |
+
Windows
|
| 888 |
+
|
| 889 |
+
nvToolsExt.dll, nvToolsExt.lib
|
| 890 |
+
|
| 891 |
+
Mac OSX
|
| 892 |
+
|
| 893 |
+
libnvToolsExt.dylib
|
| 894 |
+
|
| 895 |
+
Linux
|
| 896 |
+
|
| 897 |
+
libnvToolsExt.so
|
| 898 |
+
|
| 899 |
+
Component
|
| 900 |
+
|
| 901 |
+
NVIDIA CUDA Driver Libraries
|
| 902 |
+
|
| 903 |
+
Linux
|
| 904 |
+
|
| 905 |
+
libcuda.so, libnvidia-fatbinaryloader.so,
|
| 906 |
+
libnvidia-ptxjitcompiler.so
|
| 907 |
+
|
| 908 |
+
The NVIDIA CUDA Driver Libraries are only distributable in
|
| 909 |
+
applications that meet this criteria:
|
| 910 |
+
|
| 911 |
+
1. The application was developed starting from a NVIDIA CUDA
|
| 912 |
+
container obtained from Docker Hub or the NVIDIA GPU
|
| 913 |
+
Cloud, and
|
| 914 |
+
|
| 915 |
+
2. The resulting application is packaged as a Docker
|
| 916 |
+
container and distributed to users on Docker Hub or the
|
| 917 |
+
NVIDIA GPU Cloud only.
|
| 918 |
+
|
| 919 |
+
|
| 920 |
+
2.7. Attachment B
|
| 921 |
+
|
| 922 |
+
|
| 923 |
+
Additional Licensing Obligations
|
| 924 |
+
|
| 925 |
+
The following third party components included in the SOFTWARE
|
| 926 |
+
are licensed to Licensee pursuant to the following terms and
|
| 927 |
+
conditions:
|
| 928 |
+
|
| 929 |
+
1. Licensee's use of the GDB third party component is
|
| 930 |
+
subject to the terms and conditions of GNU GPL v3:
|
| 931 |
+
|
| 932 |
+
This product includes copyrighted third-party software licensed
|
| 933 |
+
under the terms of the GNU General Public License v3 ("GPL v3").
|
| 934 |
+
All third-party software packages are copyright by their respective
|
| 935 |
+
authors. GPL v3 terms and conditions are hereby incorporated into
|
| 936 |
+
the Agreement by this reference: http://www.gnu.org/licenses/gpl.txt
|
| 937 |
+
|
| 938 |
+
Consistent with these licensing requirements, the software
|
| 939 |
+
listed below is provided under the terms of the specified
|
| 940 |
+
open source software licenses. To obtain source code for
|
| 941 |
+
software provided under licenses that require
|
| 942 |
+
redistribution of source code, including the GNU General
|
| 943 |
+
Public License (GPL) and GNU Lesser General Public License
|
| 944 |
+
(LGPL), contact oss-requests@nvidia.com. This offer is
|
| 945 |
+
valid for a period of three (3) years from the date of the
|
| 946 |
+
distribution of this product by NVIDIA CORPORATION.
|
| 947 |
+
|
| 948 |
+
Component License
|
| 949 |
+
CUDA-GDB GPL v3
|
| 950 |
+
|
| 951 |
+
2. Licensee represents and warrants that any and all third
|
| 952 |
+
party licensing and/or royalty payment obligations in
|
| 953 |
+
connection with Licensee's use of the H.264 video codecs
|
| 954 |
+
are solely the responsibility of Licensee.
|
| 955 |
+
|
| 956 |
+
3. Licensee's use of the Thrust library is subject to the
|
| 957 |
+
terms and conditions of the Apache License Version 2.0.
|
| 958 |
+
All third-party software packages are copyright by their
|
| 959 |
+
respective authors. Apache License Version 2.0 terms and
|
| 960 |
+
conditions are hereby incorporated into the Agreement by
|
| 961 |
+
this reference.
|
| 962 |
+
http://www.apache.org/licenses/LICENSE-2.0.html
|
| 963 |
+
|
| 964 |
+
In addition, Licensee acknowledges the following notice:
|
| 965 |
+
Thrust includes source code from the Boost Iterator,
|
| 966 |
+
Tuple, System, and Random Number libraries.
|
| 967 |
+
|
| 968 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 969 |
+
. . . .
|
| 970 |
+
|
| 971 |
+
Permission is hereby granted, free of charge, to any person or
|
| 972 |
+
organization obtaining a copy of the software and accompanying
|
| 973 |
+
documentation covered by this license (the "Software") to use,
|
| 974 |
+
reproduce, display, distribute, execute, and transmit the Software,
|
| 975 |
+
and to prepare derivative works of the Software, and to permit
|
| 976 |
+
third-parties to whom the Software is furnished to do so, all
|
| 977 |
+
subject to the following:
|
| 978 |
+
|
| 979 |
+
The copyright notices in the Software and this entire statement,
|
| 980 |
+
including the above license grant, this restriction and the following
|
| 981 |
+
disclaimer, must be included in all copies of the Software, in whole
|
| 982 |
+
or in part, and all derivative works of the Software, unless such
|
| 983 |
+
copies or derivative works are solely in the form of machine-executable
|
| 984 |
+
object code generated by a source language processor.
|
| 985 |
+
|
| 986 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 987 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 988 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
| 989 |
+
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
| 990 |
+
ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
|
| 991 |
+
OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
|
| 992 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 993 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
| 994 |
+
|
| 995 |
+
4. Licensee's use of the LLVM third party component is
|
| 996 |
+
subject to the following terms and conditions:
|
| 997 |
+
|
| 998 |
+
======================================================
|
| 999 |
+
LLVM Release License
|
| 1000 |
+
======================================================
|
| 1001 |
+
University of Illinois/NCSA
|
| 1002 |
+
Open Source License
|
| 1003 |
+
|
| 1004 |
+
Copyright (c) 2003-2010 University of Illinois at Urbana-Champaign.
|
| 1005 |
+
All rights reserved.
|
| 1006 |
+
|
| 1007 |
+
Developed by:
|
| 1008 |
+
|
| 1009 |
+
LLVM Team
|
| 1010 |
+
|
| 1011 |
+
University of Illinois at Urbana-Champaign
|
| 1012 |
+
|
| 1013 |
+
http://llvm.org
|
| 1014 |
+
|
| 1015 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 1016 |
+
of this software and associated documentation files (the "Software"), to
|
| 1017 |
+
deal with the Software without restriction, including without limitation the
|
| 1018 |
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
| 1019 |
+
sell copies of the Software, and to permit persons to whom the Software is
|
| 1020 |
+
furnished to do so, subject to the following conditions:
|
| 1021 |
+
|
| 1022 |
+
* Redistributions of source code must retain the above copyright notice,
|
| 1023 |
+
this list of conditions and the following disclaimers.
|
| 1024 |
+
|
| 1025 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1026 |
+
notice, this list of conditions and the following disclaimers in the
|
| 1027 |
+
documentation and/or other materials provided with the distribution.
|
| 1028 |
+
|
| 1029 |
+
* Neither the names of the LLVM Team, University of Illinois at Urbana-
|
| 1030 |
+
Champaign, nor the names of its contributors may be used to endorse or
|
| 1031 |
+
promote products derived from this Software without specific prior
|
| 1032 |
+
written permission.
|
| 1033 |
+
|
| 1034 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 1035 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1036 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
| 1037 |
+
THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
| 1038 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
| 1039 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 1040 |
+
DEALINGS WITH THE SOFTWARE.
|
| 1041 |
+
|
| 1042 |
+
5. Licensee's use (e.g. nvprof) of the PCRE third party
|
| 1043 |
+
component is subject to the following terms and
|
| 1044 |
+
conditions:
|
| 1045 |
+
|
| 1046 |
+
------------
|
| 1047 |
+
PCRE LICENCE
|
| 1048 |
+
------------
|
| 1049 |
+
PCRE is a library of functions to support regular expressions whose syntax
|
| 1050 |
+
and semantics are as close as possible to those of the Perl 5 language.
|
| 1051 |
+
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
|
| 1052 |
+
specified below. The documentation for PCRE, supplied in the "doc"
|
| 1053 |
+
directory, is distributed under the same terms as the software itself. The
|
| 1054 |
+
basic library functions are written in C and are freestanding. Also
|
| 1055 |
+
included in the distribution is a set of C++ wrapper functions, and a just-
|
| 1056 |
+
in-time compiler that can be used to optimize pattern matching. These are
|
| 1057 |
+
both optional features that can be omitted when the library is built.
|
| 1058 |
+
|
| 1059 |
+
THE BASIC LIBRARY FUNCTIONS
|
| 1060 |
+
---------------------------
|
| 1061 |
+
Written by: Philip Hazel
|
| 1062 |
+
Email local part: ph10
|
| 1063 |
+
Email domain: cam.ac.uk
|
| 1064 |
+
University of Cambridge Computing Service,
|
| 1065 |
+
Cambridge, England.
|
| 1066 |
+
Copyright (c) 1997-2012 University of Cambridge
|
| 1067 |
+
All rights reserved.
|
| 1068 |
+
|
| 1069 |
+
PCRE JUST-IN-TIME COMPILATION SUPPORT
|
| 1070 |
+
-------------------------------------
|
| 1071 |
+
Written by: Zoltan Herczeg
|
| 1072 |
+
Email local part: hzmester
|
| 1073 |
+
Emain domain: freemail.hu
|
| 1074 |
+
Copyright(c) 2010-2012 Zoltan Herczeg
|
| 1075 |
+
All rights reserved.
|
| 1076 |
+
|
| 1077 |
+
STACK-LESS JUST-IN-TIME COMPILER
|
| 1078 |
+
--------------------------------
|
| 1079 |
+
Written by: Zoltan Herczeg
|
| 1080 |
+
Email local part: hzmester
|
| 1081 |
+
Emain domain: freemail.hu
|
| 1082 |
+
Copyright(c) 2009-2012 Zoltan Herczeg
|
| 1083 |
+
All rights reserved.
|
| 1084 |
+
|
| 1085 |
+
THE C++ WRAPPER FUNCTIONS
|
| 1086 |
+
-------------------------
|
| 1087 |
+
Contributed by: Google Inc.
|
| 1088 |
+
Copyright (c) 2007-2012, Google Inc.
|
| 1089 |
+
All rights reserved.
|
| 1090 |
+
|
| 1091 |
+
THE "BSD" LICENCE
|
| 1092 |
+
-----------------
|
| 1093 |
+
Redistribution and use in source and binary forms, with or without
|
| 1094 |
+
modification, are permitted provided that the following conditions are met:
|
| 1095 |
+
|
| 1096 |
+
* Redistributions of source code must retain the above copyright notice,
|
| 1097 |
+
this list of conditions and the following disclaimer.
|
| 1098 |
+
|
| 1099 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1100 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1101 |
+
documentation and/or other materials provided with the distribution.
|
| 1102 |
+
|
| 1103 |
+
* Neither the name of the University of Cambridge nor the name of Google
|
| 1104 |
+
Inc. nor the names of their contributors may be used to endorse or
|
| 1105 |
+
promote products derived from this software without specific prior
|
| 1106 |
+
written permission.
|
| 1107 |
+
|
| 1108 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
| 1109 |
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
| 1110 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
| 1111 |
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
| 1112 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
| 1113 |
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
| 1114 |
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
| 1115 |
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
| 1116 |
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
| 1117 |
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1118 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1119 |
+
|
| 1120 |
+
6. Some of the cuBLAS library routines were written by or
|
| 1121 |
+
derived from code written by Vasily Volkov and are subject
|
| 1122 |
+
to the Modified Berkeley Software Distribution License as
|
| 1123 |
+
follows:
|
| 1124 |
+
|
| 1125 |
+
Copyright (c) 2007-2009, Regents of the University of California
|
| 1126 |
+
|
| 1127 |
+
All rights reserved.
|
| 1128 |
+
|
| 1129 |
+
Redistribution and use in source and binary forms, with or without
|
| 1130 |
+
modification, are permitted provided that the following conditions are
|
| 1131 |
+
met:
|
| 1132 |
+
* Redistributions of source code must retain the above copyright
|
| 1133 |
+
notice, this list of conditions and the following disclaimer.
|
| 1134 |
+
* Redistributions in binary form must reproduce the above
|
| 1135 |
+
copyright notice, this list of conditions and the following
|
| 1136 |
+
disclaimer in the documentation and/or other materials provided
|
| 1137 |
+
with the distribution.
|
| 1138 |
+
* Neither the name of the University of California, Berkeley nor
|
| 1139 |
+
the names of its contributors may be used to endorse or promote
|
| 1140 |
+
products derived from this software without specific prior
|
| 1141 |
+
written permission.
|
| 1142 |
+
|
| 1143 |
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
| 1144 |
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 1145 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 1146 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
| 1147 |
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 1148 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 1149 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
| 1150 |
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
| 1151 |
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
| 1152 |
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1153 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1154 |
+
|
| 1155 |
+
7. Some of the cuBLAS library routines were written by or
|
| 1156 |
+
derived from code written by Davide Barbieri and are
|
| 1157 |
+
subject to the Modified Berkeley Software Distribution
|
| 1158 |
+
License as follows:
|
| 1159 |
+
|
| 1160 |
+
Copyright (c) 2008-2009 Davide Barbieri @ University of Rome Tor Vergata.
|
| 1161 |
+
|
| 1162 |
+
All rights reserved.
|
| 1163 |
+
|
| 1164 |
+
Redistribution and use in source and binary forms, with or without
|
| 1165 |
+
modification, are permitted provided that the following conditions are
|
| 1166 |
+
met:
|
| 1167 |
+
* Redistributions of source code must retain the above copyright
|
| 1168 |
+
notice, this list of conditions and the following disclaimer.
|
| 1169 |
+
* Redistributions in binary form must reproduce the above
|
| 1170 |
+
copyright notice, this list of conditions and the following
|
| 1171 |
+
disclaimer in the documentation and/or other materials provided
|
| 1172 |
+
with the distribution.
|
| 1173 |
+
* The name of the author may not be used to endorse or promote
|
| 1174 |
+
products derived from this software without specific prior
|
| 1175 |
+
written permission.
|
| 1176 |
+
|
| 1177 |
+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
| 1178 |
+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 1179 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 1180 |
+
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
| 1181 |
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 1182 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
| 1183 |
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
| 1184 |
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
| 1185 |
+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
| 1186 |
+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
| 1187 |
+
POSSIBILITY OF SUCH DAMAGE.
|
| 1188 |
+
|
| 1189 |
+
8. Some of the cuBLAS library routines were derived from
|
| 1190 |
+
code developed by the University of Tennessee and are
|
| 1191 |
+
subject to the Modified Berkeley Software Distribution
|
| 1192 |
+
License as follows:
|
| 1193 |
+
|
| 1194 |
+
Copyright (c) 2010 The University of Tennessee.
|
| 1195 |
+
|
| 1196 |
+
All rights reserved.
|
| 1197 |
+
|
| 1198 |
+
Redistribution and use in source and binary forms, with or without
|
| 1199 |
+
modification, are permitted provided that the following conditions are
|
| 1200 |
+
met:
|
| 1201 |
+
* Redistributions of source code must retain the above copyright
|
| 1202 |
+
notice, this list of conditions and the following disclaimer.
|
| 1203 |
+
* Redistributions in binary form must reproduce the above
|
| 1204 |
+
copyright notice, this list of conditions and the following
|
| 1205 |
+
disclaimer listed in this license in the documentation and/or
|
| 1206 |
+
other materials provided with the distribution.
|
| 1207 |
+
* Neither the name of the copyright holders nor the names of its
|
| 1208 |
+
contributors may be used to endorse or promote products derived
|
| 1209 |
+
from this software without specific prior written permission.
|
| 1210 |
+
|
| 1211 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1212 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1213 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1214 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1215 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1216 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1217 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1218 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1219 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1220 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1221 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1222 |
+
|
| 1223 |
+
9. Some of the cuBLAS library routines were written by or
|
| 1224 |
+
derived from code written by Jonathan Hogg and are subject
|
| 1225 |
+
to the Modified Berkeley Software Distribution License as
|
| 1226 |
+
follows:
|
| 1227 |
+
|
| 1228 |
+
Copyright (c) 2012, The Science and Technology Facilities Council (STFC).
|
| 1229 |
+
|
| 1230 |
+
All rights reserved.
|
| 1231 |
+
|
| 1232 |
+
Redistribution and use in source and binary forms, with or without
|
| 1233 |
+
modification, are permitted provided that the following conditions are
|
| 1234 |
+
met:
|
| 1235 |
+
* Redistributions of source code must retain the above copyright
|
| 1236 |
+
notice, this list of conditions and the following disclaimer.
|
| 1237 |
+
* Redistributions in binary form must reproduce the above
|
| 1238 |
+
copyright notice, this list of conditions and the following
|
| 1239 |
+
disclaimer in the documentation and/or other materials provided
|
| 1240 |
+
with the distribution.
|
| 1241 |
+
* Neither the name of the STFC nor the names of its contributors
|
| 1242 |
+
may be used to endorse or promote products derived from this
|
| 1243 |
+
software without specific prior written permission.
|
| 1244 |
+
|
| 1245 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1246 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1247 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1248 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE STFC BE
|
| 1249 |
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
| 1250 |
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
| 1251 |
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
| 1252 |
+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
| 1253 |
+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
| 1254 |
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
| 1255 |
+
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1256 |
+
|
| 1257 |
+
10. Some of the cuBLAS library routines were written by or
|
| 1258 |
+
derived from code written by Ahmad M. Abdelfattah, David
|
| 1259 |
+
Keyes, and Hatem Ltaief, and are subject to the Apache
|
| 1260 |
+
License, Version 2.0, as follows:
|
| 1261 |
+
|
| 1262 |
+
-- (C) Copyright 2013 King Abdullah University of Science and Technology
|
| 1263 |
+
Authors:
|
| 1264 |
+
Ahmad Abdelfattah (ahmad.ahmad@kaust.edu.sa)
|
| 1265 |
+
David Keyes (david.keyes@kaust.edu.sa)
|
| 1266 |
+
Hatem Ltaief (hatem.ltaief@kaust.edu.sa)
|
| 1267 |
+
|
| 1268 |
+
Redistribution and use in source and binary forms, with or without
|
| 1269 |
+
modification, are permitted provided that the following conditions
|
| 1270 |
+
are met:
|
| 1271 |
+
|
| 1272 |
+
* Redistributions of source code must retain the above copyright
|
| 1273 |
+
notice, this list of conditions and the following disclaimer.
|
| 1274 |
+
* Redistributions in binary form must reproduce the above copyright
|
| 1275 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1276 |
+
documentation and/or other materials provided with the distribution.
|
| 1277 |
+
* Neither the name of the King Abdullah University of Science and
|
| 1278 |
+
Technology nor the names of its contributors may be used to endorse
|
| 1279 |
+
or promote products derived from this software without specific prior
|
| 1280 |
+
written permission.
|
| 1281 |
+
|
| 1282 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1283 |
+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1284 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1285 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1286 |
+
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1287 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1288 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1289 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1290 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1291 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1292 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
| 1293 |
+
|
| 1294 |
+
11. Some of the cuSPARSE library routines were written by or
|
| 1295 |
+
derived from code written by Li-Wen Chang and are subject
|
| 1296 |
+
to the NCSA Open Source License as follows:
|
| 1297 |
+
|
| 1298 |
+
Copyright (c) 2012, University of Illinois.
|
| 1299 |
+
|
| 1300 |
+
All rights reserved.
|
| 1301 |
+
|
| 1302 |
+
Developed by: IMPACT Group, University of Illinois, http://impact.crhc.illinois.edu
|
| 1303 |
+
|
| 1304 |
+
Permission is hereby granted, free of charge, to any person obtaining
|
| 1305 |
+
a copy of this software and associated documentation files (the
|
| 1306 |
+
"Software"), to deal with the Software without restriction, including
|
| 1307 |
+
without limitation the rights to use, copy, modify, merge, publish,
|
| 1308 |
+
distribute, sublicense, and/or sell copies of the Software, and to
|
| 1309 |
+
permit persons to whom the Software is furnished to do so, subject to
|
| 1310 |
+
the following conditions:
|
| 1311 |
+
* Redistributions of source code must retain the above copyright
|
| 1312 |
+
notice, this list of conditions and the following disclaimer.
|
| 1313 |
+
* Redistributions in binary form must reproduce the above
|
| 1314 |
+
copyright notice, this list of conditions and the following
|
| 1315 |
+
disclaimers in the documentation and/or other materials provided
|
| 1316 |
+
with the distribution.
|
| 1317 |
+
* Neither the names of IMPACT Group, University of Illinois, nor
|
| 1318 |
+
the names of its contributors may be used to endorse or promote
|
| 1319 |
+
products derived from this Software without specific prior
|
| 1320 |
+
written permission.
|
| 1321 |
+
|
| 1322 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 1323 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 1324 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
| 1325 |
+
NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT
|
| 1326 |
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
| 1327 |
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
| 1328 |
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
|
| 1329 |
+
SOFTWARE.
|
| 1330 |
+
|
| 1331 |
+
12. Some of the cuRAND library routines were written by or
|
| 1332 |
+
derived from code written by Mutsuo Saito and Makoto
|
| 1333 |
+
Matsumoto and are subject to the following license:
|
| 1334 |
+
|
| 1335 |
+
Copyright (c) 2009, 2010 Mutsuo Saito, Makoto Matsumoto and Hiroshima
|
| 1336 |
+
University. All rights reserved.
|
| 1337 |
+
|
| 1338 |
+
Copyright (c) 2011 Mutsuo Saito, Makoto Matsumoto, Hiroshima
|
| 1339 |
+
University and University of Tokyo. All rights reserved.
|
| 1340 |
+
|
| 1341 |
+
Redistribution and use in source and binary forms, with or without
|
| 1342 |
+
modification, are permitted provided that the following conditions are
|
| 1343 |
+
met:
|
| 1344 |
+
* Redistributions of source code must retain the above copyright
|
| 1345 |
+
notice, this list of conditions and the following disclaimer.
|
| 1346 |
+
* Redistributions in binary form must reproduce the above
|
| 1347 |
+
copyright notice, this list of conditions and the following
|
| 1348 |
+
disclaimer in the documentation and/or other materials provided
|
| 1349 |
+
with the distribution.
|
| 1350 |
+
* Neither the name of the Hiroshima University nor the names of
|
| 1351 |
+
its contributors may be used to endorse or promote products
|
| 1352 |
+
derived from this software without specific prior written
|
| 1353 |
+
permission.
|
| 1354 |
+
|
| 1355 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1356 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1357 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1358 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1359 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1360 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1361 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1362 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1363 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1364 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1365 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1366 |
+
|
| 1367 |
+
13. Some of the cuRAND library routines were derived from
|
| 1368 |
+
code developed by D. E. Shaw Research and are subject to
|
| 1369 |
+
the following license:
|
| 1370 |
+
|
| 1371 |
+
Copyright 2010-2011, D. E. Shaw Research.
|
| 1372 |
+
|
| 1373 |
+
All rights reserved.
|
| 1374 |
+
|
| 1375 |
+
Redistribution and use in source and binary forms, with or without
|
| 1376 |
+
modification, are permitted provided that the following conditions are
|
| 1377 |
+
met:
|
| 1378 |
+
* Redistributions of source code must retain the above copyright
|
| 1379 |
+
notice, this list of conditions, and the following disclaimer.
|
| 1380 |
+
* Redistributions in binary form must reproduce the above
|
| 1381 |
+
copyright notice, this list of conditions, and the following
|
| 1382 |
+
disclaimer in the documentation and/or other materials provided
|
| 1383 |
+
with the distribution.
|
| 1384 |
+
* Neither the name of D. E. Shaw Research nor the names of its
|
| 1385 |
+
contributors may be used to endorse or promote products derived
|
| 1386 |
+
from this software without specific prior written permission.
|
| 1387 |
+
|
| 1388 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1389 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1390 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1391 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1392 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1393 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1394 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1395 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1396 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1397 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1398 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1399 |
+
|
| 1400 |
+
14. Some of the Math library routines were written by or
|
| 1401 |
+
derived from code developed by Norbert Juffa and are
|
| 1402 |
+
subject to the following license:
|
| 1403 |
+
|
| 1404 |
+
Copyright (c) 2015-2017, Norbert Juffa
|
| 1405 |
+
All rights reserved.
|
| 1406 |
+
|
| 1407 |
+
Redistribution and use in source and binary forms, with or without
|
| 1408 |
+
modification, are permitted provided that the following conditions
|
| 1409 |
+
are met:
|
| 1410 |
+
|
| 1411 |
+
1. Redistributions of source code must retain the above copyright
|
| 1412 |
+
notice, this list of conditions and the following disclaimer.
|
| 1413 |
+
|
| 1414 |
+
2. Redistributions in binary form must reproduce the above copyright
|
| 1415 |
+
notice, this list of conditions and the following disclaimer in the
|
| 1416 |
+
documentation and/or other materials provided with the distribution.
|
| 1417 |
+
|
| 1418 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1419 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1420 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1421 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1422 |
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1423 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1424 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1425 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1426 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1427 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1428 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1429 |
+
|
| 1430 |
+
15. Licensee's use of the lz4 third party component is
|
| 1431 |
+
subject to the following terms and conditions:
|
| 1432 |
+
|
| 1433 |
+
Copyright (C) 2011-2013, Yann Collet.
|
| 1434 |
+
BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
|
| 1435 |
+
|
| 1436 |
+
Redistribution and use in source and binary forms, with or without
|
| 1437 |
+
modification, are permitted provided that the following conditions are
|
| 1438 |
+
met:
|
| 1439 |
+
|
| 1440 |
+
* Redistributions of source code must retain the above copyright
|
| 1441 |
+
notice, this list of conditions and the following disclaimer.
|
| 1442 |
+
* Redistributions in binary form must reproduce the above
|
| 1443 |
+
copyright notice, this list of conditions and the following disclaimer
|
| 1444 |
+
in the documentation and/or other materials provided with the
|
| 1445 |
+
distribution.
|
| 1446 |
+
|
| 1447 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| 1448 |
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| 1449 |
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| 1450 |
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| 1451 |
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| 1452 |
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| 1453 |
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| 1454 |
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| 1455 |
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 1456 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| 1457 |
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 1458 |
+
|
| 1459 |
+
16. The NPP library uses code from the Boost Math Toolkit,
|
| 1460 |
+
and is subject to the following license:
|
| 1461 |
+
|
| 1462 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 1463 |
+
. . . .
|
| 1464 |
+
|
| 1465 |
+
Permission is hereby granted, free of charge, to any person or
|
| 1466 |
+
organization obtaining a copy of the software and accompanying
|
| 1467 |
+
documentation covered by this license (the "Software") to use,
|
| 1468 |
+
reproduce, display, distribute, execute, and transmit the Software,
|
| 1469 |
+
and to prepare derivative works of the Software, and to permit
|
| 1470 |
+
third-parties to whom the Software is furnished to do so, all
|
| 1471 |
+
subject to the following:
|
| 1472 |
+
|
| 1473 |
+
The copyright notices in the Software and this entire statement,
|
| 1474 |
+
including the above license grant, this restriction and the following
|
| 1475 |
+
disclaimer, must be included in all copies of the Software, in whole
|
| 1476 |
+
or in part, and all derivative works of the Software, unless such
|
| 1477 |
+
copies or derivative works are solely in the form of machine-executable
|
| 1478 |
+
object code generated by a source language processor.
|
| 1479 |
+
|
| 1480 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 1481 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 1482 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
|
| 1483 |
+
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
|
| 1484 |
+
ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR
|
| 1485 |
+
OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING
|
| 1486 |
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 1487 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
| 1488 |
+
|
| 1489 |
+
17. Portions of the Nsight Eclipse Edition is subject to the
|
| 1490 |
+
following license:
|
| 1491 |
+
|
| 1492 |
+
The Eclipse Foundation makes available all content in this plug-in
|
| 1493 |
+
("Content"). Unless otherwise indicated below, the Content is provided
|
| 1494 |
+
to you under the terms and conditions of the Eclipse Public License
|
| 1495 |
+
Version 1.0 ("EPL"). A copy of the EPL is available at http://
|
| 1496 |
+
www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program"
|
| 1497 |
+
will mean the Content.
|
| 1498 |
+
|
| 1499 |
+
If you did not receive this Content directly from the Eclipse
|
| 1500 |
+
Foundation, the Content is being redistributed by another party
|
| 1501 |
+
("Redistributor") and different terms and conditions may apply to your
|
| 1502 |
+
use of any object code in the Content. Check the Redistributor's
|
| 1503 |
+
license that was provided with the Content. If no such license exists,
|
| 1504 |
+
contact the Redistributor. Unless otherwise indicated below, the terms
|
| 1505 |
+
and conditions of the EPL still apply to any source code in the
|
| 1506 |
+
Content and such source code may be obtained at http://www.eclipse.org.
|
| 1507 |
+
|
| 1508 |
+
18. Some of the cuBLAS library routines uses code from
|
| 1509 |
+
OpenAI, which is subject to the following license:
|
| 1510 |
+
|
| 1511 |
+
License URL
|
| 1512 |
+
https://github.com/openai/openai-gemm/blob/master/LICENSE
|
| 1513 |
+
|
| 1514 |
+
License Text
|
| 1515 |
+
The MIT License
|
| 1516 |
+
|
| 1517 |
+
Copyright (c) 2016 OpenAI (http://openai.com), 2016 Google Inc.
|
| 1518 |
+
|
| 1519 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 1520 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 1521 |
+
in the Software without restriction, including without limitation the rights
|
| 1522 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 1523 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 1524 |
+
furnished to do so, subject to the following conditions:
|
| 1525 |
+
|
| 1526 |
+
The above copyright notice and this permission notice shall be included in
|
| 1527 |
+
all copies or substantial portions of the Software.
|
| 1528 |
+
|
| 1529 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 1530 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1531 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 1532 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 1533 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 1534 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 1535 |
+
THE SOFTWARE.
|
| 1536 |
+
|
| 1537 |
+
19. Licensee's use of the Visual Studio Setup Configuration
|
| 1538 |
+
Samples is subject to the following license:
|
| 1539 |
+
|
| 1540 |
+
The MIT License (MIT)
|
| 1541 |
+
Copyright (C) Microsoft Corporation. All rights reserved.
|
| 1542 |
+
|
| 1543 |
+
Permission is hereby granted, free of charge, to any person
|
| 1544 |
+
obtaining a copy of this software and associated documentation
|
| 1545 |
+
files (the "Software"), to deal in the Software without restriction,
|
| 1546 |
+
including without limitation the rights to use, copy, modify, merge,
|
| 1547 |
+
publish, distribute, sublicense, and/or sell copies of the Software,
|
| 1548 |
+
and to permit persons to whom the Software is furnished to do so,
|
| 1549 |
+
subject to the following conditions:
|
| 1550 |
+
|
| 1551 |
+
The above copyright notice and this permission notice shall be included
|
| 1552 |
+
in all copies or substantial portions of the Software.
|
| 1553 |
+
|
| 1554 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 1555 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 1556 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 1557 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 1558 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 1559 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
| 1560 |
+
|
| 1561 |
+
20. Licensee's use of linmath.h header for CPU functions for
|
| 1562 |
+
GL vector/matrix operations from lunarG is subject to the
|
| 1563 |
+
Apache License Version 2.0.
|
| 1564 |
+
|
| 1565 |
+
21. The DX12-CUDA sample uses the d3dx12.h header, which is
|
| 1566 |
+
subject to the MIT license .
|
| 1567 |
+
|
| 1568 |
+
-----------------
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Metadata-Version: 2.1
|
| 2 |
+
Name: nvidia-nvjitlink-cu12
|
| 3 |
+
Version: 12.4.127
|
| 4 |
+
Summary: Nvidia JIT LTO Library
|
| 5 |
+
Home-page: https://developer.nvidia.com/cuda-zone
|
| 6 |
+
Author: Nvidia CUDA Installer Team
|
| 7 |
+
Author-email: cuda_installer@nvidia.com
|
| 8 |
+
License: NVIDIA Proprietary Software
|
| 9 |
+
Keywords: cuda,nvidia,runtime,machine learning,deep learning
|
| 10 |
+
Classifier: Development Status :: 4 - Beta
|
| 11 |
+
Classifier: Intended Audience :: Developers
|
| 12 |
+
Classifier: Intended Audience :: Education
|
| 13 |
+
Classifier: Intended Audience :: Science/Research
|
| 14 |
+
Classifier: License :: Other/Proprietary License
|
| 15 |
+
Classifier: Natural Language :: English
|
| 16 |
+
Classifier: Programming Language :: Python :: 3
|
| 17 |
+
Classifier: Programming Language :: Python :: 3.5
|
| 18 |
+
Classifier: Programming Language :: Python :: 3.6
|
| 19 |
+
Classifier: Programming Language :: Python :: 3.7
|
| 20 |
+
Classifier: Programming Language :: Python :: 3.8
|
| 21 |
+
Classifier: Programming Language :: Python :: 3.9
|
| 22 |
+
Classifier: Programming Language :: Python :: 3.10
|
| 23 |
+
Classifier: Programming Language :: Python :: 3.11
|
| 24 |
+
Classifier: Programming Language :: Python :: 3 :: Only
|
| 25 |
+
Classifier: Topic :: Scientific/Engineering
|
| 26 |
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
| 27 |
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
| 28 |
+
Classifier: Topic :: Software Development
|
| 29 |
+
Classifier: Topic :: Software Development :: Libraries
|
| 30 |
+
Classifier: Operating System :: Microsoft :: Windows
|
| 31 |
+
Classifier: Operating System :: POSIX :: Linux
|
| 32 |
+
Requires-Python: >=3
|
| 33 |
+
License-File: License.txt
|
| 34 |
+
|
| 35 |
+
NVIDIA compiler library for JIT LTO functionality.
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
nvidia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 2 |
+
nvidia/__pycache__/__init__.cpython-311.pyc,,
|
| 3 |
+
nvidia/nvjitlink/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 4 |
+
nvidia/nvjitlink/__pycache__/__init__.cpython-311.pyc,,
|
| 5 |
+
nvidia/nvjitlink/include/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 6 |
+
nvidia/nvjitlink/include/__pycache__/__init__.cpython-311.pyc,,
|
| 7 |
+
nvidia/nvjitlink/include/nvJitLink.h,sha256=6P2KtTBXDDOsbxIi0Nr9Ot8_fh9XvsSAaDhaElJwLQU,16496
|
| 8 |
+
nvidia/nvjitlink/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
| 9 |
+
nvidia/nvjitlink/lib/__pycache__/__init__.cpython-311.pyc,,
|
| 10 |
+
nvidia/nvjitlink/lib/libnvJitLink.so.12,sha256=y9FIi774K41kwt1Rqbau8_awvDp6gKmCG-SNHAf3AOc,53594512
|
| 11 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
| 12 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/License.txt,sha256=rW9YU_ugyg0VnQ9Y1JrkmDDC-Mk_epJki5zpCttMbM0,59262
|
| 13 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/METADATA,sha256=Tkm9zx69iT4wHTNBYxiPi30271awlBpcUiAg1itXbn0,1518
|
| 14 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/RECORD,,
|
| 15 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL,sha256=XDTs3wIbcE-BcRO08VJlZpA6z9OaC1mOKPCGGGwuM2g,109
|
| 16 |
+
nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt,sha256=fTkAtiFuL16nUrB9ytDDtpytz2t0B4NvYTnRzwAhO14,7
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/WHEEL
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Wheel-Version: 1.0
|
| 2 |
+
Generator: bdist_wheel (0.42.0)
|
| 3 |
+
Root-Is-Purelib: true
|
| 4 |
+
Tag: py3-none-manylinux2014_x86_64
|
| 5 |
+
|
.venv/lib/python3.11/site-packages/nvidia_nvjitlink_cu12-12.4.127.dist-info/top_level.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
nvidia
|
.venv/lib/python3.11/site-packages/ray-2.42.0.dist-info/INSTALLER
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
pip
|
.venv/lib/python3.11/site-packages/ray-2.42.0.dist-info/RECORD
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|