talkpipe 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. talkpipe-0.4.1/.github/ISSUE_TEMPLATE/release-checklist.md +19 -0
  2. talkpipe-0.4.1/.gitignore +174 -0
  3. talkpipe-0.4.1/.vscode/settings.json +29 -0
  4. talkpipe-0.4.1/.vscode/tasks.json +14 -0
  5. talkpipe-0.4.1/CHANGELOG.md +42 -0
  6. talkpipe-0.4.1/COPYRIGHT +3 -0
  7. talkpipe-0.4.1/Dockerfile +26 -0
  8. talkpipe-0.4.1/LICENSE +179 -0
  9. talkpipe-0.4.1/PKG-INFO +411 -0
  10. talkpipe-0.4.1/README.md +371 -0
  11. talkpipe-0.4.1/bin/config-analyzer.py +158 -0
  12. talkpipe-0.4.1/bin/config_bash +11 -0
  13. talkpipe-0.4.1/docs/LLMChat.png +0 -0
  14. talkpipe-0.4.1/docs/LLMEvaluateWebPage.png +0 -0
  15. talkpipe-0.4.1/docs/TalkPipe.png +0 -0
  16. talkpipe-0.4.1/docs/TalkPipe.xcf +0 -0
  17. talkpipe-0.4.1/pyproject.toml +69 -0
  18. talkpipe-0.4.1/pytest.ini +5 -0
  19. talkpipe-0.4.1/setup.cfg +4 -0
  20. talkpipe-0.4.1/setup.py +27 -0
  21. talkpipe-0.4.1/src/talkpipe/__init__.py +15 -0
  22. talkpipe-0.4.1/src/talkpipe/app/chatcli.py +53 -0
  23. talkpipe-0.4.1/src/talkpipe/app/runscript.py +66 -0
  24. talkpipe-0.4.1/src/talkpipe/app/scriptendpoint.py +1021 -0
  25. talkpipe-0.4.1/src/talkpipe/app/static/.gitignore +2 -0
  26. talkpipe-0.4.1/src/talkpipe/app/static/favicon.ico +0 -0
  27. talkpipe-0.4.1/src/talkpipe/app/static/unit-docs.html +1427 -0
  28. talkpipe-0.4.1/src/talkpipe/app/static/unit-docs.txt +977 -0
  29. talkpipe-0.4.1/src/talkpipe/app/unit_documentation_analyzer.py +687 -0
  30. talkpipe-0.4.1/src/talkpipe/chatterlang/__init__.py +2 -0
  31. talkpipe-0.4.1/src/talkpipe/chatterlang/compiler.py +218 -0
  32. talkpipe-0.4.1/src/talkpipe/chatterlang/parsers.py +316 -0
  33. talkpipe-0.4.1/src/talkpipe/chatterlang/registry.py +47 -0
  34. talkpipe-0.4.1/src/talkpipe/data/__init__.py +1 -0
  35. talkpipe-0.4.1/src/talkpipe/data/email.py +184 -0
  36. talkpipe-0.4.1/src/talkpipe/data/extraction.py +113 -0
  37. talkpipe-0.4.1/src/talkpipe/data/html.py +226 -0
  38. talkpipe-0.4.1/src/talkpipe/data/mongo.py +316 -0
  39. talkpipe-0.4.1/src/talkpipe/data/rss.py +159 -0
  40. talkpipe-0.4.1/src/talkpipe/jupyter/basic.py +137 -0
  41. talkpipe-0.4.1/src/talkpipe/jupyter/examples.py +248 -0
  42. talkpipe-0.4.1/src/talkpipe/jupyter/interactive.py +311 -0
  43. talkpipe-0.4.1/src/talkpipe/llm/__init__.py +4 -0
  44. talkpipe-0.4.1/src/talkpipe/llm/chat.py +191 -0
  45. talkpipe-0.4.1/src/talkpipe/llm/config.py +37 -0
  46. talkpipe-0.4.1/src/talkpipe/llm/embedding.py +84 -0
  47. talkpipe-0.4.1/src/talkpipe/llm/embedding_adapters.py +57 -0
  48. talkpipe-0.4.1/src/talkpipe/llm/prompt_adapters.py +133 -0
  49. talkpipe-0.4.1/src/talkpipe/operations/__init__.py +46 -0
  50. talkpipe-0.4.1/src/talkpipe/operations/filtering.py +111 -0
  51. talkpipe-0.4.1/src/talkpipe/operations/matrices.py +117 -0
  52. talkpipe-0.4.1/src/talkpipe/operations/threading.py +192 -0
  53. talkpipe-0.4.1/src/talkpipe/operations/transforms.py +135 -0
  54. talkpipe-0.4.1/src/talkpipe/pipe/__init__.py +1 -0
  55. talkpipe-0.4.1/src/talkpipe/pipe/basic.py +426 -0
  56. talkpipe-0.4.1/src/talkpipe/pipe/core.py +400 -0
  57. talkpipe-0.4.1/src/talkpipe/pipe/fork.py +113 -0
  58. talkpipe-0.4.1/src/talkpipe/pipe/io.py +155 -0
  59. talkpipe-0.4.1/src/talkpipe/pipe/math.py +81 -0
  60. talkpipe-0.4.1/src/talkpipe/util/__init__.py +1 -0
  61. talkpipe-0.4.1/src/talkpipe/util/collections.py +122 -0
  62. talkpipe-0.4.1/src/talkpipe/util/config.py +215 -0
  63. talkpipe-0.4.1/src/talkpipe/util/data_manipulation.py +248 -0
  64. talkpipe-0.4.1/src/talkpipe/util/os.py +28 -0
  65. talkpipe-0.4.1/src/talkpipe.egg-info/PKG-INFO +411 -0
  66. talkpipe-0.4.1/src/talkpipe.egg-info/SOURCES.txt +102 -0
  67. talkpipe-0.4.1/src/talkpipe.egg-info/dependency_links.txt +1 -0
  68. talkpipe-0.4.1/src/talkpipe.egg-info/entry_points.txt +3 -0
  69. talkpipe-0.4.1/src/talkpipe.egg-info/requires.txt +24 -0
  70. talkpipe-0.4.1/src/talkpipe.egg-info/top_level.txt +1 -0
  71. talkpipe-0.4.1/tests/conftest.py +78 -0
  72. talkpipe-0.4.1/tests/talkpipe/app/test_chatcli.py +37 -0
  73. talkpipe-0.4.1/tests/talkpipe/app/test_runscript.py +233 -0
  74. talkpipe-0.4.1/tests/talkpipe/chatterlang/test_compiler.py +235 -0
  75. talkpipe-0.4.1/tests/talkpipe/chatterlang/test_parsers.py +182 -0
  76. talkpipe-0.4.1/tests/talkpipe/chatterlang/test_scriptendpoint.py +120 -0
  77. talkpipe-0.4.1/tests/talkpipe/data/sample_feed.pkl +0 -0
  78. talkpipe-0.4.1/tests/talkpipe/data/test.docx +0 -0
  79. talkpipe-0.4.1/tests/talkpipe/data/test_email.py +110 -0
  80. talkpipe-0.4.1/tests/talkpipe/data/test_extraction.py +34 -0
  81. talkpipe-0.4.1/tests/talkpipe/data/test_html.py +229 -0
  82. talkpipe-0.4.1/tests/talkpipe/data/test_html_exceptions.py +182 -0
  83. talkpipe-0.4.1/tests/talkpipe/data/test_mogomock.py +549 -0
  84. talkpipe-0.4.1/tests/talkpipe/data/test_mongo.py +388 -0
  85. talkpipe-0.4.1/tests/talkpipe/data/test_mongo_integration.py +319 -0
  86. talkpipe-0.4.1/tests/talkpipe/data/test_rss.py +43 -0
  87. talkpipe-0.4.1/tests/talkpipe/jupyter/test_basic_jupyter.py +74 -0
  88. talkpipe-0.4.1/tests/talkpipe/jupyter/test_examples.py +69 -0
  89. talkpipe-0.4.1/tests/talkpipe/jupyter/test_interactive.py +123 -0
  90. talkpipe-0.4.1/tests/talkpipe/llm/test_chat.py +161 -0
  91. talkpipe-0.4.1/tests/talkpipe/llm/test_embedding.py +20 -0
  92. talkpipe-0.4.1/tests/talkpipe/operations/test_filtering.py +44 -0
  93. talkpipe-0.4.1/tests/talkpipe/operations/test_matrices.py +413 -0
  94. talkpipe-0.4.1/tests/talkpipe/operations/test_threading.py +230 -0
  95. talkpipe-0.4.1/tests/talkpipe/operations/test_transforms.py +168 -0
  96. talkpipe-0.4.1/tests/talkpipe/pipe/test_basic.py +274 -0
  97. talkpipe-0.4.1/tests/talkpipe/pipe/test_core.py +148 -0
  98. talkpipe-0.4.1/tests/talkpipe/pipe/test_fork.py +67 -0
  99. talkpipe-0.4.1/tests/talkpipe/pipe/test_io.py +123 -0
  100. talkpipe-0.4.1/tests/talkpipe/pipe/test_math.py +15 -0
  101. talkpipe-0.4.1/tests/talkpipe/test_documentation_examples.py +187 -0
  102. talkpipe-0.4.1/tests/talkpipe/util/test_collections.py +300 -0
  103. talkpipe-0.4.1/tests/talkpipe/util/test_util.py +393 -0
  104. talkpipe-0.4.1/tests/testutils.py +98 -0
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Release Checklist
3
+ about: Steps for doing a new release
4
+ title: Release vX.Y.Z
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ - [ ] Update CHANGELOG
11
+ - [ ] Commit all changes
12
+ - [ ] Ensure unit tests pass in live environment
13
+ - [ ] Merge into master
14
+ - [ ] Build docker image
15
+ - [ ] Tag repository
16
+ - [ ] Build whl files
17
+ - [ ] Push to pypi
18
+ - [ ] Push code to repo
19
+ - [ ] Push tags to repo
@@ -0,0 +1,174 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+
110
+ # pdm
111
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112
+ #pdm.lock
113
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114
+ # in version control.
115
+ # https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116
+ .pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121
+ __pypackages__/
122
+
123
+ # Celery stuff
124
+ celerybeat-schedule
125
+ celerybeat.pid
126
+
127
+ # SageMath parsed files
128
+ *.sage.py
129
+
130
+ # Environments
131
+ .env
132
+ .venv
133
+ env/
134
+ venv/
135
+ ENV/
136
+ env.bak/
137
+ venv.bak/
138
+
139
+ # Spyder project settings
140
+ .spyderproject
141
+ .spyproject
142
+
143
+ # Rope project settings
144
+ .ropeproject
145
+
146
+ # mkdocs documentation
147
+ /site
148
+
149
+ # mypy
150
+ .mypy_cache/
151
+ .dmypy.json
152
+ dmypy.json
153
+
154
+ # Pyre type checker
155
+ .pyre/
156
+
157
+ # pytype static type analyzer
158
+ .pytype/
159
+
160
+ # Cython debug symbols
161
+ cython_debug/
162
+
163
+ # PyCharm
164
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
167
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
168
+ #.idea/
169
+
170
+ # Ruff stuff:
171
+ .ruff_cache/
172
+
173
+ # PyPI configuration file
174
+ .pypirc
@@ -0,0 +1,29 @@
1
+ {
2
+ "python.testing.pytestArgs": [
3
+ "tests",
4
+ "-m",
5
+ "not ddg"
6
+ ],
7
+ "python.testing.unittestEnabled": false,
8
+ "python.testing.pytestEnabled": true,
9
+ "terminal.integrated.env.osx": {
10
+ "PYTHONPATH": "${workspaceFolder}/src",
11
+ },
12
+ "terminal.integrated.env.linux": {
13
+ "PYTHONPATH": "${workspaceFolder}/src",
14
+ },
15
+ "terminal.integrated.env.windows": {
16
+ "PYTHONPATH": "${workspaceFolder}/src",
17
+ },
18
+ "python.envFile": "${workspaceFolder}/.env",
19
+ "cSpell.words": [
20
+ "chatterlang",
21
+ "checkpointer",
22
+ "embedder",
23
+ "langchain",
24
+ "langgraph",
25
+ "OLLAMA",
26
+ "pydantic",
27
+ "talkpipe"
28
+ ]
29
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "label": "Run tests with coverage",
6
+ "type": "shell",
7
+ "command": "pytest --cov=talkpipe --cov-report=html",
8
+ "group": {
9
+ "kind": "test",
10
+ "isDefault": true
11
+ }
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,42 @@
1
+ # Changelog
2
+
3
+ ## 0.4.0
4
+ - Updated syntax so that pipelines in forks can contain more than one segment. This was an oversight in the original design.
5
+ - Added the mongoInsert and mongoSearch segments
6
+ - Generalized LLM source so that new ones can be registered and used without modifying TalkPipe
7
+ - Updated the Embedding API to match the chat api (with sources, etc)
8
+ - Added ability to create and reduce matrices using UMAP and t-SNE
9
+ - Added template segment for populating a string template
10
+ - Update chatterlang so that a double-double quote ("") gets resolved to one double quote
11
+ - Fixed bug in extract_property that would cause it to fail seeing some properties
12
+ - Improved unit testing and coverage
13
+ - Updated the guided generation classes to make it easier to do guided generations problems in talkpipe
14
+ - Split the talkpipe.util module into a talkpipe.util subpackage with different modules for different types of utilities.
15
+ - Updated the logo
16
+ - Improved and refined the wording in the README
17
+ - Move the documentation script into apps and added a script so you can generate documentation files when talkpipe is installed
18
+
19
+ ## 0.3.1
20
+ - jupyter notebook widgets
21
+ - a hash segment
22
+
23
+ ## 0.3.0
24
+ - Basic web app for writing and executing ChatterLang scripts, along with endpoints for the underlying functionality. Includes the ability to:
25
+ - write scripts in a text area and compile/execute them.
26
+ - interactive provide text input to the script if the script requires it.
27
+ - the ability to see logging statements emitted.
28
+ - run the server using a command "chatterlang_server" that is included in the whl file.
29
+ - view documentation for the include sources and segments. Note that the documentation is rebuilt
30
+ everytime a whl file is generated.
31
+ - view and load various example scripts.
32
+ installed. This works on at least windows and linux
33
+ - Added comment support for ChatterLang, anything from a hash mark (#) until the end of the line.
34
+ - Added configureLogging segment for configuring logging levels and files from within a script. This is probably temporary and will be removed before 0.3.0 as a better solution is written.
35
+ - Consolidated the logic around configuring logging, migrating the various ways of specifying the configuration strings from runscript into the configure_logging method itself.
36
+
37
+ ## 0.2.2 (2025-02-21)
38
+ - The rss segment can get the url to download from the rss_url configuration setting.
39
+ - Updated OpenAI source so that it can support guided generation (and thus the llmScore segment)
40
+
41
+ ## 0.2.1 (2025-02-21)
42
+ - Catch all ConnectionErrors when downloading the robots.txt file.
@@ -0,0 +1,3 @@
1
+ Copyright 2025 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
2
+ Under the terms of Contract DE-NA0003525 with NTESS,
3
+ the U.S. Government retains certain rights in this software.
@@ -0,0 +1,26 @@
1
+ FROM python:3.11
2
+
3
+ WORKDIR /app
4
+
5
+ COPY . .
6
+
7
+ # Create a data directory under the app directory
8
+ RUN mkdir -p /app/data
9
+
10
+ # Declare /usr/src/app/data as a volume
11
+ VOLUME /app/data
12
+
13
+ COPY pyproject.toml README.md LICENSE ./
14
+ COPY src/ src/
15
+ COPY tests/ tests/
16
+ COPY .git/ .git/
17
+
18
+ RUN pip install --upgrade pip
19
+ RUN pip install -e .[dev]
20
+ RUN pytest -m "not online" --log-cli-level=DEBUG
21
+ # RUN pip install -e .
22
+
23
+ # Install the basics of the scientific computing stack for analytics
24
+ RUN pip install numpy pandas matplotlib scikit-learn scipy
25
+
26
+ CMD ["python", "-m", "talkpipe.app.runscript", "--load_module", "data/custom_module.py", "--env", "TALKPIPE_SCRIPT"]
talkpipe-0.4.1/LICENSE ADDED
@@ -0,0 +1,179 @@
1
+
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ http://www.apache.org/licenses/
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works that You distribute, alongside
121
+ or as an addendum to the NOTICE text from the Work, provided
122
+ that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and
126
+ may provide additional or different license terms and conditions
127
+ for use, reproduction, or distribution of Your modifications, or
128
+ for any such Derivative Works as a whole, provided Your use,
129
+ reproduction, and distribution of the Work otherwise complies with
130
+ the conditions stated in this License.
131
+
132
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
133
+ any Contribution intentionally submitted for inclusion in the Work
134
+ by You to the Licensor shall be under the terms and conditions of
135
+ this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify
137
+ the terms of any separate license agreement you may have executed
138
+ with Licensor regarding such Contributions.
139
+
140
+ 6. Trademarks. This License does not grant permission to use the trade
141
+ names, trademarks, service marks, or product names of the Licensor,
142
+ except as required for reasonable and customary use in describing the
143
+ origin of the Work and reproducing the content of the NOTICE file.
144
+
145
+ 7. Disclaimer of Warranty. Unless required by applicable law or
146
+ agreed to in writing, Licensor provides the Work (and each
147
+ Contributor provides its Contributions) on an "AS IS" BASIS,
148
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
149
+ implied, including, without limitation, any warranties or conditions
150
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
151
+ PARTICULAR PURPOSE. You are solely responsible for determining the
152
+ appropriateness of using or redistributing the Work and assume any
153
+ risks associated with Your exercise of permissions under this License.
154
+
155
+ 8. Limitation of Liability. In no event and under no legal theory,
156
+ whether in tort (including negligence), contract, or otherwise,
157
+ unless required by applicable law (such as deliberate and grossly
158
+ negligent acts) or agreed to in writing, shall any Contributor be
159
+ liable to You for damages, including any direct, indirect, special,
160
+ incidental, or consequential damages of any character arising as a
161
+ result of this License or out of the use or inability to use the
162
+ Work (including but not limited to damages for loss of goodwill,
163
+ work stoppage, computer failure or malfunction, or any and all
164
+ other commercial damages or losses), even if such Contributor
165
+ has been advised of the possibility of such damages.
166
+
167
+ 9. Accepting Warranty or Additional Liability. While redistributing
168
+ the Work or Derivative Works thereof, You may choose to offer,
169
+ and charge a fee for, acceptance of support, warranty, indemnity,
170
+ or other liability obligations and/or rights consistent with this
171
+ License. However, in accepting such obligations, You may act only
172
+ on Your own behalf and on Your sole responsibility, not on behalf
173
+ of any other Contributor, and only if You agree to indemnify,
174
+ defend, and hold each Contributor harmless for any liability
175
+ incurred by, or claims asserted against, such Contributor by reason
176
+ of your accepting any such warranty or additional liability.
177
+
178
+ END OF TERMS AND CONDITIONS
179
+