SaiLochana commited on
Commit
4a701b5
·
1 Parent(s): 95b7d2a

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +13 -0
  2. .vscode/settings.json +6 -0
  3. README.md +23 -8
  4. STfile.py +55 -0
  5. add.py +6 -0
  6. app.py +111 -0
  7. app2.py +79 -0
  8. appgpt.py +102 -0
  9. google-cloud-cli-444.0.0-linux-x86_64.tar.gz +3 -0
  10. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli-linux-x86_64.manifest +3 -0
  11. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli-linux-x86_64.snapshot.json +42 -0
  12. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli.manifest +0 -0
  13. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli.snapshot.json +48 -0
  14. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq-nix.manifest +1 -0
  15. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq-nix.snapshot.json +43 -0
  16. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq.manifest +443 -0
  17. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq.snapshot.json +37 -0
  18. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix-linux-x86_64.manifest +0 -0
  19. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix-linux-x86_64.snapshot.json +43 -0
  20. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix.manifest +0 -0
  21. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix.snapshot.json +38 -0
  22. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core-nix.manifest +2 -0
  23. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core-nix.snapshot.json +45 -0
  24. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core.manifest +0 -0
  25. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core.snapshot.json +39 -0
  26. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c-linux-x86_64.manifest +2 -0
  27. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c-linux-x86_64.snapshot.json +42 -0
  28. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c.manifest +0 -0
  29. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c.snapshot.json +47 -0
  30. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps-linux-x86_64.manifest +0 -0
  31. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps-linux-x86_64.snapshot.json +43 -0
  32. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps.manifest +0 -0
  33. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps.snapshot.json +41 -0
  34. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud.manifest +0 -0
  35. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud.snapshot.json +30 -0
  36. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil-nix.manifest +1 -0
  37. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil-nix.snapshot.json +43 -0
  38. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil.manifest +0 -0
  39. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil.snapshot.json +37 -0
  40. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/LICENSE +20 -0
  41. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/README +16 -0
  42. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/RELEASE_NOTES +0 -0
  43. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/VERSION +1 -0
  44. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/anthoscli +3 -0
  45. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/.default_components +1 -0
  46. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__init__.py +0 -0
  47. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__pycache__/bootstrapping.cpython-39.pyc +0 -0
  48. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__pycache__/setup.cpython-39.pyc +0 -0
  49. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/bootstrapping.py +340 -0
  50. google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/bq.py +103 -0
.gitattributes CHANGED
@@ -33,3 +33,16 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/anthoscli filter=lfs diff=lfs merge=lfs -text
37
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/gcloud-crc32c filter=lfs diff=lfs merge=lfs -text
38
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/data/cli/gcloud.json filter=lfs diff=lfs merge=lfs -text
39
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/lib/googlecloudsdk/generated_clients/apis/compute/v1/__pycache__/compute_v1_messages.cpython-39.pyc filter=lfs diff=lfs merge=lfs -text
40
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/libpython3.9.a filter=lfs diff=lfs merge=lfs -text
41
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/libpython3.9.so filter=lfs diff=lfs merge=lfs -text
42
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/libpython3.9.so.1.0 filter=lfs diff=lfs merge=lfs -text
43
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a filter=lfs diff=lfs merge=lfs -text
44
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.9/ensurepip/_bundled/pip-22.0.4-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
45
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.9/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so filter=lfs diff=lfs merge=lfs -text
46
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.9/site-packages/cryptography/hazmat/bindings/_rust.abi3.so filter=lfs diff=lfs merge=lfs -text
47
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/bundledpythonunix/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
48
+ google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/platform/gsutil/third_party/requests/ext/requests-logo.ai filter=lfs diff=lfs merge=lfs -text
.vscode/settings.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "[python]": {
3
+ "editor.defaultFormatter": "ms-python.autopep8"
4
+ },
5
+ "python.formatting.provider": "none"
6
+ }
README.md CHANGED
@@ -1,12 +1,27 @@
1
  ---
2
- title: Product Description Generator Main
3
- emoji: 📈
4
- colorFrom: gray
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 3.41.2
8
  app_file: app.py
9
- pinned: false
 
10
  ---
 
 
 
 
 
 
 
 
 
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: product-description-generator-main
 
 
 
 
 
3
  app_file: app.py
4
+ sdk: gradio
5
+ sdk_version: 3.40.1
6
  ---
7
+ # Product Description Generator
8
+ Generate SEO-compliant product descriptions using product titles and meta-keywords provided by the user.
9
+ Implemented custom LLMChain function from the Langchain and few-shot prompting technique to generate multi-paragraph rich text product description for each product name and its corresponding keywords. Built a gradio app as a frontend demo to showcase the process.
10
+
11
+ This project is hosted on HuggingFace Spaces: [Live Demo of Product Description Generator](https://huggingface.co/spaces/heliosbrahma/product-description-generator).
12
+
13
+ ## Steps:-
14
+ - Provide the product name and keywords separated by commas
15
+ - Using the custom prompt template and ChatOpenAI model, call the custom LLM chain to generate a product description
16
 
17
+ ## How to run it locally:-
18
+ To run this app locally, first clone this repo using `git clone`.<br><br>
19
+ Now, install all libraries by running the following command in the terminal:<br>
20
+ ```python
21
+ pip install -r requirements.txt
22
+ ```
23
+ <br><br>
24
+ Now, run the app from the terminal:<br>
25
+ ```python
26
+ gradio app.py
27
+ ```
STfile.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import os
3
+ from langchain.prompts import PromptTemplate
4
+ from langchain.chat_models import ChatOpenAI
5
+ from typing import Any
6
+ from langchain.base_language import BaseLanguageModel
7
+ from langchain.chains.llm import LLMChain
8
+ import streamlit as st
9
+ import vertexai
10
+ from vertexai.language_models import TextGenerationModel, TextEmbeddingModel
11
+
12
+ PROJECT_ID = "agileai-poc"
13
+
14
+ vertexai.init(project=PROJECT_ID, location="us-central1")
15
+ parameters = {
16
+ "max_output_tokens": 256,
17
+ "temperature": 0.2,
18
+ "top_p": 0.8,
19
+ }
20
+
21
+ generation_model = TextGenerationModel.from_pretrained("text-bison@001")
22
+ print("model called")
23
+ response = generation_model.predict(
24
+ "Generate a product description that is creative and SEO compliant. Emojis should be added to make product description look appealing. Begin!", **parameters)
25
+ print(response)
26
+ embedding_model = TextEmbeddingModel.from_pretrained("textembedding-gecko@001")
27
+ print("model2 called")
28
+ prompt_file = "prompt_template.txt"
29
+ print(prompt_file)
30
+ print(generation_model.predict("describe", **parameters))
31
+ print(embedding_model.predict("describe", **parameters))
32
+ tuned_model = generation_model.list_tuned_model_names()
33
+ print("******", tuned_model)
34
+ # prod_nm = st.text_input("Product Name")
35
+ # keywords = st.text_input("Filters")
36
+ # style = st.selectbox("Select the response style", [
37
+ # "Funny", "Sarcastic", "Casual"])
38
+ # generate = st.button("Generate Product Description")
39
+ # params = {
40
+ # prod_nm = st.text_input("Product Name"),
41
+ # keywords = st.text_input("Filters"),
42
+ # style = st.selectbox("Select the response style", [
43
+ # "Funny", "Sarcastic", "Casual"])
44
+ # }
45
+ # if generate:
46
+ # message = st.empty()
47
+ # message.text("Describing...")
48
+ # content = (generation_model.predict(
49
+ # "Generate a product description that is creative and SEO compliant. Emojis should be added to make product description look appealing. Begin!", **params)
50
+ # )
51
+ # message.text("")
52
+ # st.write(content)
53
+ # params={
54
+ # prod_num
55
+ # }
add.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import langchain
2
+ """ // translate from python to C
3
+ i=int(input())
4
+ j=int(input())
5
+ m=i+j """
6
+
app.py ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import os
3
+ # import openai
4
+ from langchain.prompts import PromptTemplate
5
+ from langchain.chat_models import ChatOpenAI
6
+ from typing import Any
7
+ from langchain.base_language import BaseLanguageModel
8
+ from langchain.chains.llm import LLMChain
9
+ import gradio as gr
10
+ # import streamlit as st
11
+
12
+ # from google.cloud import aiplatform
13
+ import vertexai
14
+ from vertexai.language_models import TextGenerationModel, TextEmbeddingModel
15
+
16
+ # import vertexai
17
+
18
+ # PROJECT_ID = "[your-project-id]" # @param {type:"string"}
19
+ # vertexai.init(project=PROJECT_ID, location="us-central1")
20
+ # from vertexai.language_models import TextGenerationModel
21
+
22
+ # OPENAI_API_KEY = os.environ["OPENAI_API_KEY"]
23
+ # OPENAI_API_KEY='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'
24
+
25
+ PROJECT_ID = "agileai-poc"
26
+
27
+ vertexai.init(project=PROJECT_ID, location="us-central1")
28
+ parameters = {
29
+ "max_output_tokens": 256,
30
+ "temperature": 0.2,
31
+ "top_p": 0.8,
32
+ }
33
+
34
+ generation_model = TextGenerationModel.from_pretrained("text-bison@001")
35
+ print("model called")
36
+ response = generation_model.predict(
37
+ "Generate a product description that is creative and SEO compliant. Emojis should be added to make product description look appealing. Begin!", **parameters)
38
+ print(response)
39
+ embedding_model = TextEmbeddingModel.from_pretrained("textembedding-gecko@001")
40
+ print("model2 called")
41
+ prompt_file = "prompt_template.txt"
42
+ print(generation_model.predict("describe", **parameters))
43
+
44
+
45
+ class ProductDescGen(LLMChain):
46
+ """LLM Chain specifically for generating multi paragraph rich text product description using emojis."""
47
+
48
+ @classmethod
49
+ def from_llm(
50
+ cls, llm: BaseLanguageModel, prompt: str, **kwargs: Any
51
+ ) -> ProductDescGen:
52
+ """Load ProductDescGen Chain from LLM."""
53
+ return cls(llm=llm, prompt=prompt, **kwargs)
54
+
55
+
56
+ def product_desc_generator(product_name, keywords):
57
+ with open(prompt_file, "r") as file:
58
+ prompt_template = file.read()
59
+ # # llm = ChatOpenAI(
60
+ # # model_name="gpt-3.5-turbo",
61
+ # # temperature=0.7,
62
+ # # openai_api_key=OPENAI_API_KEY,
63
+ # # )
64
+ llm = vertexai(max_output_tokens=256, temperature=0.2, top_p=0.8)
65
+ print("runned")
66
+ PROMPT = PromptTemplate(
67
+ input_variables=["product_name", "keywords"], template=prompt_template
68
+ )
69
+ # # llm = ChatOpenAI(
70
+ # # model_name="gpt-3.5-turbo",
71
+ # # temperature=0.7,
72
+ # # openai_api_key=OPENAI_API_KEY,
73
+ # # )
74
+
75
+ # llm2 = vertexai(max_output_tokens=256, temperature=0.2, top_p=0.8)
76
+
77
+ ProductDescGen_chain = ProductDescGen.from_llm(llm=llm, prompt=PROMPT)
78
+ ProductDescGen_query = ProductDescGen_chain.apply_and_parse(
79
+ [{"product_name": product_name, "keywords": keywords}]
80
+ )
81
+ # response = generation_model.predict(
82
+ # "Generate a product description that is creative and SEO compliant. Emojis should be added to make product description look appealing. Begin!", **llm)
83
+
84
+ return ProductDescGen_query[0]["text"] # , {response.text}
85
+
86
+
87
+ with gr.Blocks() as demo:
88
+ gr.HTML("""<h1>Welcome to Product Description Generator</h1>""")
89
+ gr.Markdown(
90
+ "Generate Product Description for your products instantly!<br>"
91
+ "Provide product name and keywords related to that product. Click on 'Generate Description' button and multi-paragraph rich text product description will be genrated instantly.<br>"
92
+ "Note: Generated product description is SEO compliant and can be used to populate product information."
93
+ )
94
+
95
+ with gr.Tab("Generate Product Description!"):
96
+ product_name = gr.Textbox(
97
+ label="Product Name",
98
+ placeholder="Nike Shoes",
99
+ )
100
+ keywords = gr.Textbox(
101
+ label="Keywords (separated by commas)",
102
+ placeholder="black shoes, leather shoes for men, water resistant",
103
+ )
104
+ product_description = gr.Textbox(label="Product Description")
105
+ click_button = gr.Button(value="Generate Description!")
106
+ click_button.click(
107
+ product_desc_generator, [
108
+ product_name, keywords], product_description
109
+ )
110
+
111
+ demo.launch(share=True)
app2.py ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+ import os
3
+ import vertexai
4
+ from langchain.llms import VertexAI
5
+ from langchain.prompts import PromptTemplate
6
+ from langchain.chat_models import ChatOpenAI
7
+ from typing import Any
8
+ from langchain.base_language import BaseLanguageModel
9
+ from langchain.chains.llm import LLMChain
10
+ from langchain.embeddings import VertexAIEmbeddings
11
+ import streamlit as st
12
+ import gradio as gr
13
+ from vertexai.language_models import TextGenerationModel
14
+
15
+ vertexai.init(project="agileai-poc", location="us-central1")
16
+ llm = VertexAI(
17
+ model_name="text-bison@001",
18
+ max_output_tokens=256,
19
+ temperature=0.1,
20
+ top_p=0.8,
21
+ top_k=40,
22
+ verbose=True,
23
+ )
24
+ prompt_file = "prompt_template.txt"
25
+
26
+ print(prompt_file)
27
+
28
+
29
+ class ProductDescGen(LLMChain):
30
+ """LLM Chain specifically for generating multi paragraph rich text product description using emojis."""
31
+
32
+ @classmethod
33
+ def from_llm(
34
+ cls, llm: BaseLanguageModel, prompt: str, **kwargs: Any
35
+ ) -> ProductDescGen:
36
+ """Load ProductDescGen Chain from LLM."""
37
+ return cls(llm=llm, prompt=prompt, **kwargs)
38
+
39
+
40
+ def product_desc_generator(product_name, keywords):
41
+ with open(prompt_file, "r") as file:
42
+ prompt_template = file.read()
43
+
44
+ PROMPT = PromptTemplate(
45
+ input_variables=["product_name", "keywords"], template=prompt_template
46
+ )
47
+
48
+ ProductDescGen_chain = ProductDescGen.from_llm(llm=llm, prompt=PROMPT)
49
+ ProductDescGen_query = ProductDescGen_chain.apply_and_parse(
50
+ [{"product_name": product_name, "keywords": keywords}]
51
+ )
52
+ return ProductDescGen_query[0]["text"]
53
+
54
+
55
+ with gr.Blocks() as demo:
56
+ gr.HTML("""<h1>Welcome to Product Description Generator</h1>""")
57
+ gr.Markdown(
58
+ "Generate Product Description for your products instantly!<br>"
59
+ "Provide product name and keywords related to that product. Click on 'Generate Description' button and multi-paragraph rich text product description will be genrated instantly.<br>"
60
+ "Note: Generated product description is SEO compliant and can be used to populate product information."
61
+ )
62
+
63
+ with gr.Tab("Generate Product Description!"):
64
+ product_name = gr.Textbox(
65
+ label="Product Name",
66
+ placeholder="Nike Shoes",
67
+ )
68
+ keywords = gr.Textbox(
69
+ label="Keywords (separated by commas)",
70
+ placeholder="black shoes, leather shoes for men, water resistant",
71
+ )
72
+ product_description = gr.Textbox(label="Product Description")
73
+ click_button = gr.Button(value="Generate Description!")
74
+ click_button.click(
75
+ product_desc_generator, [
76
+ product_name, keywords], product_description
77
+ )
78
+
79
+ demo.launch(share=True)
appgpt.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import libraries
2
+ import vertexai
3
+ from langchain.llms import VertexAI
4
+ from langchain.embeddings import VertexAIEmbeddings
5
+
6
+ import streamlit as st
7
+ import requests
8
+ from bs4 import BeautifulSoup
9
+
10
+ from langchain.document_loaders import TextLoader
11
+ from langchain.indexes import VectorstoreIndexCreator
12
+ from langchain.vectorstores import DocArrayInMemorySearch
13
+
14
+ vertexai.init(project="agileai-poc", location="us-central1")
15
+
16
+ llm = VertexAI(
17
+ model_name="text-bison@001",
18
+ max_output_tokens=256,
19
+ temperature=0.1,
20
+ top_p=0.8,
21
+ top_k=40,
22
+ verbose=True,)
23
+
24
+ embeddings = VertexAIEmbeddings()
25
+
26
+
27
+ def get_text(url):
28
+ # Send a GET request to the URL
29
+ response = requests.get(url)
30
+
31
+ # Create a BeautifulSoup object with the HTML content
32
+ soup = BeautifulSoup(response.content, "html.parser")
33
+
34
+ # Find the specific element or elements containing the text you want to scrape
35
+ # Here, we'll find all <p> tags and extract their text
36
+ paragraphs = soup.find_all("p")
37
+
38
+ # Loop through the paragraphs and print their text
39
+ with open("text\\temp.txt", "w", encoding='utf-8') as file:
40
+ # Loop through the paragraphs and write their text to the file
41
+ for paragraph in paragraphs:
42
+ file.write(paragraph.get_text() + "\n")
43
+
44
+
45
+ @st.cache_resource
46
+ def create_langchain_index(input_text):
47
+ print("--indexing---")
48
+ get_text(input_text)
49
+ loader = TextLoader("text\\temp.txt", encoding='utf-8')
50
+ # data = loader.load()
51
+
52
+ index = VectorstoreIndexCreator(vectorstore_cls=DocArrayInMemorySearch,
53
+ embedding=embeddings).from_loaders([loader])
54
+ # using vertex ai embeddings initialized above
55
+ return index
56
+
57
+
58
+ @st.cache_data
59
+ def get_response(input_text, query):
60
+ print(f"--querying---{query}")
61
+ response = index.query(query, llm=llm)
62
+ return response
63
+
64
+
65
+ st.title('Webpage Question and Answering')
66
+
67
+
68
+ input_text = st.text_input("Provide the link to the webpage...")
69
+
70
+ summary_response = ""
71
+ tweet_response = ""
72
+ ln_response = ""
73
+
74
+ if input_text:
75
+ index = create_langchain_index(input_text)
76
+ summary_query = "Write a 100 words summary of the document"
77
+ summary_response = get_response(input_text, summary_query)
78
+
79
+ tweet_query = "Write a twitter tweet and add hashtags"
80
+ tweet_response = get_response(input_text, tweet_query)
81
+
82
+ ln_query = "Write a linkedin post for the document"
83
+ ln_response = get_response(input_text, ln_query)
84
+
85
+ with st.expander('Page Summary'):
86
+ st.info(summary_response)
87
+
88
+ with st.expander('Tweet'):
89
+ st.info(tweet_response)
90
+
91
+ with st.expander('LinkedIn Post'):
92
+ st.info(ln_response)
93
+
94
+ st.session_state.input_text = ''
95
+ question = st.text_input("Ask a question from the link you shared...")
96
+ if st.button("Ask"):
97
+ if question:
98
+ index = create_langchain_index(input_text)
99
+ response = get_response(input_text, question)
100
+ st.write(response)
101
+ else:
102
+ st.warning("Please enter a question.")
google-cloud-cli-444.0.0-linux-x86_64.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc76b9b40508253f812af5e52d4630e90230312969eece04ccfb5328c557acac
3
+ size 187507451
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli-linux-x86_64.manifest ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ bin/anthoscli
2
+ platform/anthoscli_licenses/LICENSES.txt
3
+ platform/anthoscli_licenses/lib.zip
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli-linux-x86_64.snapshot.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "fd772027ab6f5b8a6ef8c4e1490cd815a040c7bb1a4b5934daa2283b6c65326b",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "anthoscli"
11
+ ],
12
+ "details": {
13
+ "description": "The cli for Anthos infrastructure.",
14
+ "display_name": "anthoscli"
15
+ },
16
+ "id": "anthoscli-linux-x86_64",
17
+ "is_configuration": false,
18
+ "is_hidden": true,
19
+ "is_required": false,
20
+ "platform": {
21
+ "architectures": [
22
+ "x86_64"
23
+ ],
24
+ "operating_systems": [
25
+ "LINUX"
26
+ ]
27
+ },
28
+ "platform_required": false,
29
+ "version": {
30
+ "build_number": 20230822145232,
31
+ "version_string": "0.2.39"
32
+ }
33
+ }
34
+ ],
35
+ "revision": 20230822145232,
36
+ "schema_version": {
37
+ "no_update": false,
38
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
39
+ "version": 3
40
+ },
41
+ "version": "444.0.0"
42
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli.manifest ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/anthoscli.snapshot.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "dependencies": [
5
+ "anthoscli-darwin-arm",
6
+ "anthoscli-darwin-x86",
7
+ "anthoscli-darwin-x86_64",
8
+ "anthoscli-linux-arm",
9
+ "anthoscli-linux-x86",
10
+ "anthoscli-linux-x86_64",
11
+ "anthoscli-windows-x86",
12
+ "anthoscli-windows-x86_64"
13
+ ],
14
+ "details": {
15
+ "description": "The cli for Anthos infrastructure.",
16
+ "display_name": "anthoscli"
17
+ },
18
+ "id": "anthoscli",
19
+ "is_configuration": false,
20
+ "is_hidden": true,
21
+ "is_required": false,
22
+ "platform": {
23
+ "architectures": [
24
+ "arm",
25
+ "x86",
26
+ "x86_64"
27
+ ],
28
+ "operating_systems": [
29
+ "LINUX",
30
+ "MACOSX",
31
+ "WINDOWS"
32
+ ]
33
+ },
34
+ "platform_required": false,
35
+ "version": {
36
+ "build_number": 0,
37
+ "version_string": "0.2.39"
38
+ }
39
+ }
40
+ ],
41
+ "revision": 20230822145232,
42
+ "schema_version": {
43
+ "no_update": false,
44
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
45
+ "version": 3
46
+ },
47
+ "version": "444.0.0"
48
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq-nix.manifest ADDED
@@ -0,0 +1 @@
 
 
1
+ bin/bq
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq-nix.snapshot.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "c27a1e54bd9a2e2a7005fc771294fadd88850b3f7f69ee9bc239a1468eb0f79b",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "bq",
11
+ "core"
12
+ ],
13
+ "details": {
14
+ "description": "Provides the bq tool for interacting with the BigQuery service.",
15
+ "display_name": "BigQuery Command Line Tool (Platform Specific)"
16
+ },
17
+ "id": "bq-nix",
18
+ "is_configuration": false,
19
+ "is_hidden": true,
20
+ "is_required": false,
21
+ "platform": {
22
+ "operating_systems": [
23
+ "CYGWIN",
24
+ "LINUX",
25
+ "MACOSX",
26
+ "MSYS"
27
+ ]
28
+ },
29
+ "platform_required": false,
30
+ "version": {
31
+ "build_number": 20230822145232,
32
+ "version_string": "2.0.97"
33
+ }
34
+ }
35
+ ],
36
+ "revision": 20230822145232,
37
+ "schema_version": {
38
+ "no_update": false,
39
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
40
+ "version": 3
41
+ },
42
+ "version": "444.0.0"
43
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq.manifest ADDED
@@ -0,0 +1,443 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ bin/bootstrapping/bq.py
2
+ data/cli/bq.json
3
+ platform/bq/LICENSE.txt
4
+ platform/bq/MANIFEST.in
5
+ platform/bq/README.txt
6
+ platform/bq/VERSION
7
+ platform/bq/bigquery_client.py
8
+ platform/bq/bq.py
9
+ platform/bq/bq_auth_flags.py
10
+ platform/bq/bq_flags.py
11
+ platform/bq/bq_utils.py
12
+ platform/bq/credential_loader.py
13
+ platform/bq/discovery_documents/discovery_document_cache.py
14
+ platform/bq/discovery_documents/discovery_document_loader.py
15
+ platform/bq/discovery_next/bigquery.json
16
+ platform/bq/discovery_next/iam-policy.json
17
+ platform/bq/remove_pyreadline.py
18
+ platform/bq/table_formatter.py
19
+ platform/bq/third_party/absl/LICENSE
20
+ platform/bq/third_party/absl/__init__.py
21
+ platform/bq/third_party/absl/_collections_abc.py
22
+ platform/bq/third_party/absl/app.py
23
+ platform/bq/third_party/absl/app.pyi
24
+ platform/bq/third_party/absl/command_name.py
25
+ platform/bq/third_party/absl/flags/__init__.py
26
+ platform/bq/third_party/absl/flags/__init__.pyi
27
+ platform/bq/third_party/absl/flags/_argument_parser.py
28
+ platform/bq/third_party/absl/flags/_argument_parser.pyi
29
+ platform/bq/third_party/absl/flags/_defines.py
30
+ platform/bq/third_party/absl/flags/_defines.pyi
31
+ platform/bq/third_party/absl/flags/_exceptions.py
32
+ platform/bq/third_party/absl/flags/_flag.py
33
+ platform/bq/third_party/absl/flags/_flag.pyi
34
+ platform/bq/third_party/absl/flags/_flagvalues.py
35
+ platform/bq/third_party/absl/flags/_flagvalues.pyi
36
+ platform/bq/third_party/absl/flags/_helpers.py
37
+ platform/bq/third_party/absl/flags/_validators.py
38
+ platform/bq/third_party/absl/flags/_validators_classes.py
39
+ platform/bq/third_party/absl/flags/argparse_flags.py
40
+ platform/bq/third_party/absl/logging/__init__.py
41
+ platform/bq/third_party/absl/logging/converter.py
42
+ platform/bq/third_party/appdirs/LICENSE
43
+ platform/bq/third_party/bazel_platforms/LICENSE
44
+ platform/bq/third_party/cachetools/__init__.py
45
+ platform/bq/third_party/cachetools/abc.py
46
+ platform/bq/third_party/cachetools/cache.py
47
+ platform/bq/third_party/cachetools/func.py
48
+ platform/bq/third_party/cachetools/keys.py
49
+ platform/bq/third_party/cachetools/lfu.py
50
+ platform/bq/third_party/cachetools/lru.py
51
+ platform/bq/third_party/cachetools/rr.py
52
+ platform/bq/third_party/cachetools/ttl.py
53
+ platform/bq/third_party/certifi/LICENSE
54
+ platform/bq/third_party/certifi/__init__.py
55
+ platform/bq/third_party/certifi/cacert.pem
56
+ platform/bq/third_party/certifi/core.py
57
+ platform/bq/third_party/cffi/LICENSE
58
+ platform/bq/third_party/charset_normalizer/LICENSE
59
+ platform/bq/third_party/charset_normalizer/__init__.py
60
+ platform/bq/third_party/charset_normalizer/api.py
61
+ platform/bq/third_party/charset_normalizer/assets/__init__.py
62
+ platform/bq/third_party/charset_normalizer/cd.py
63
+ platform/bq/third_party/charset_normalizer/constant.py
64
+ platform/bq/third_party/charset_normalizer/legacy.py
65
+ platform/bq/third_party/charset_normalizer/md.py
66
+ platform/bq/third_party/charset_normalizer/models.py
67
+ platform/bq/third_party/charset_normalizer/utils.py
68
+ platform/bq/third_party/charset_normalizer/version.py
69
+ platform/bq/third_party/fasteners/LICENSE
70
+ platform/bq/third_party/fasteners/__init__.py
71
+ platform/bq/third_party/fasteners/_utils.py
72
+ platform/bq/third_party/fasteners/lock.py
73
+ platform/bq/third_party/fasteners/process_lock.py
74
+ platform/bq/third_party/fasteners/version.py
75
+ platform/bq/third_party/gflags/AUTHORS
76
+ platform/bq/third_party/gflags/COPYING
77
+ platform/bq/third_party/gflags/ChangeLog
78
+ platform/bq/third_party/gflags/LICENSE
79
+ platform/bq/third_party/gflags/MANIFEST.in
80
+ platform/bq/third_party/gflags/Makefile
81
+ platform/bq/third_party/gflags/NEWS
82
+ platform/bq/third_party/gflags/PKG-INFO
83
+ platform/bq/third_party/gflags/README
84
+ platform/bq/third_party/gflags/__init__.py
85
+ platform/bq/third_party/gflags/gflags2man.py
86
+ platform/bq/third_party/gflags/gflags_validators.py
87
+ platform/bq/third_party/gflags/setup.cfg
88
+ platform/bq/third_party/gflags/setup.py
89
+ platform/bq/third_party/google/__init__.py
90
+ platform/bq/third_party/google/api_core/LICENSE
91
+ platform/bq/third_party/google/api_core/__init__.py
92
+ platform/bq/third_party/google/api_core/client_options.py
93
+ platform/bq/third_party/google/apputils/LICENSE
94
+ platform/bq/third_party/google/apputils/__init__.py
95
+ platform/bq/third_party/google/apputils/app.py
96
+ platform/bq/third_party/google/apputils/appcommands.py
97
+ platform/bq/third_party/google/apputils/basetest.py
98
+ platform/bq/third_party/google/apputils/datelib.py
99
+ platform/bq/third_party/google/apputils/debug.py
100
+ platform/bq/third_party/google/apputils/file_util.py
101
+ platform/bq/third_party/google/apputils/resources.py
102
+ platform/bq/third_party/google/apputils/run_script_module.py
103
+ platform/bq/third_party/google/apputils/setup_command.py
104
+ platform/bq/third_party/google/apputils/shellutil.py
105
+ platform/bq/third_party/google/apputils/stopwatch.py
106
+ platform/bq/third_party/google/auth/LICENSE
107
+ platform/bq/third_party/google/auth/__init__.py
108
+ platform/bq/third_party/google/auth/_cloud_sdk.py
109
+ platform/bq/third_party/google/auth/_default.py
110
+ platform/bq/third_party/google/auth/_exponential_backoff.py
111
+ platform/bq/third_party/google/auth/_helpers.py
112
+ platform/bq/third_party/google/auth/_service_account_info.py
113
+ platform/bq/third_party/google/auth/aws.py
114
+ platform/bq/third_party/google/auth/compute_engine/__init__.py
115
+ platform/bq/third_party/google/auth/compute_engine/_metadata.py
116
+ platform/bq/third_party/google/auth/credentials.py
117
+ platform/bq/third_party/google/auth/crypt/__init__.py
118
+ platform/bq/third_party/google/auth/crypt/_python_rsa.py
119
+ platform/bq/third_party/google/auth/crypt/base.py
120
+ platform/bq/third_party/google/auth/crypt/rsa.py
121
+ platform/bq/third_party/google/auth/environment_vars.py
122
+ platform/bq/third_party/google/auth/exceptions.py
123
+ platform/bq/third_party/google/auth/external_account.py
124
+ platform/bq/third_party/google/auth/external_account_authorized_user.py
125
+ platform/bq/third_party/google/auth/identity_pool.py
126
+ platform/bq/third_party/google/auth/impersonated_credentials.py
127
+ platform/bq/third_party/google/auth/jwt.py
128
+ platform/bq/third_party/google/auth/pluggable.py
129
+ platform/bq/third_party/google/auth/transport/__init__.py
130
+ platform/bq/third_party/google/auth/transport/_http_client.py
131
+ platform/bq/third_party/google/auth/transport/_mtls_helper.py
132
+ platform/bq/third_party/google/auth/transport/mtls.py
133
+ platform/bq/third_party/google/auth/transport/requests.py
134
+ platform/bq/third_party/google/auth/version.py
135
+ platform/bq/third_party/google/oauth2/LICENSE
136
+ platform/bq/third_party/google/oauth2/__init__.py
137
+ platform/bq/third_party/google/oauth2/_client.py
138
+ platform/bq/third_party/google/oauth2/credentials.py
139
+ platform/bq/third_party/google/oauth2/service_account.py
140
+ platform/bq/third_party/google/oauth2/sts.py
141
+ platform/bq/third_party/google/oauth2/utils.py
142
+ platform/bq/third_party/google_auth_httplib2/LICENSE
143
+ platform/bq/third_party/google_reauth/LICENSE
144
+ platform/bq/third_party/google_reauth/__init__.py
145
+ platform/bq/third_party/google_reauth/_helpers.py
146
+ platform/bq/third_party/google_reauth/_reauth_client.py
147
+ platform/bq/third_party/google_reauth/all_tests.py
148
+ platform/bq/third_party/google_reauth/challenges.py
149
+ platform/bq/third_party/google_reauth/errors.py
150
+ platform/bq/third_party/google_reauth/reauth.py
151
+ platform/bq/third_party/google_reauth/reauth_creds.py
152
+ platform/bq/third_party/googleapiclient/LICENSE
153
+ platform/bq/third_party/googleapiclient/__init__.py
154
+ platform/bq/third_party/googleapiclient/_auth.py
155
+ platform/bq/third_party/googleapiclient/_helpers.py
156
+ platform/bq/third_party/googleapiclient/channel.py
157
+ platform/bq/third_party/googleapiclient/discovery.py
158
+ platform/bq/third_party/googleapiclient/discovery_cache/__init__.py
159
+ platform/bq/third_party/googleapiclient/discovery_cache/appengine_memcache.py
160
+ platform/bq/third_party/googleapiclient/discovery_cache/base.py
161
+ platform/bq/third_party/googleapiclient/discovery_cache/file_cache.py
162
+ platform/bq/third_party/googleapiclient/errors.py
163
+ platform/bq/third_party/googleapiclient/http.py
164
+ platform/bq/third_party/googleapiclient/mimeparse.py
165
+ platform/bq/third_party/googleapiclient/model.py
166
+ platform/bq/third_party/googleapiclient/schema.py
167
+ platform/bq/third_party/httplib2/LICENSE
168
+ platform/bq/third_party/httplib2/__init__.py
169
+ platform/bq/third_party/httplib2/python2/__init__.py
170
+ platform/bq/third_party/httplib2/python2/auth.py
171
+ platform/bq/third_party/httplib2/python2/ca_certs_locater.py
172
+ platform/bq/third_party/httplib2/python2/cacerts.txt
173
+ platform/bq/third_party/httplib2/python2/certs.py
174
+ platform/bq/third_party/httplib2/python2/error.py
175
+ platform/bq/third_party/httplib2/python2/iri2uri.py
176
+ platform/bq/third_party/httplib2/python2/socks.py
177
+ platform/bq/third_party/httplib2/python3/__init__.py
178
+ platform/bq/third_party/httplib2/python3/auth.py
179
+ platform/bq/third_party/httplib2/python3/ca_certs_locater.py
180
+ platform/bq/third_party/httplib2/python3/cacerts.txt
181
+ platform/bq/third_party/httplib2/python3/certs.py
182
+ platform/bq/third_party/httplib2/python3/error.py
183
+ platform/bq/third_party/httplib2/python3/iri2uri.py
184
+ platform/bq/third_party/httplib2/python3/socks.py
185
+ platform/bq/third_party/idna/LICENSE
186
+ platform/bq/third_party/idna/__init__.py
187
+ platform/bq/third_party/idna/codec.py
188
+ platform/bq/third_party/idna/compat.py
189
+ platform/bq/third_party/idna/core.py
190
+ platform/bq/third_party/idna/idnadata.py
191
+ platform/bq/third_party/idna/intranges.py
192
+ platform/bq/third_party/idna/package_data.py
193
+ platform/bq/third_party/idna/uts46data.py
194
+ platform/bq/third_party/inflection/LICENSE
195
+ platform/bq/third_party/inflection/__init__.py
196
+ platform/bq/third_party/inflection/inflection.py
197
+ platform/bq/third_party/ipaddr/LICENSE
198
+ platform/bq/third_party/libffi/LICENSE
199
+ platform/bq/third_party/libunwind/LICENSE
200
+ platform/bq/third_party/monotonic/LICENSE
201
+ platform/bq/third_party/monotonic/__init__.py
202
+ platform/bq/third_party/oauth2client_4_0/LICENSE
203
+ platform/bq/third_party/oauth2client_4_0/__init__.py
204
+ platform/bq/third_party/oauth2client_4_0/_helpers.py
205
+ platform/bq/third_party/oauth2client_4_0/_openssl_crypt.py
206
+ platform/bq/third_party/oauth2client_4_0/_pkce.py
207
+ platform/bq/third_party/oauth2client_4_0/_pure_python_crypt.py
208
+ platform/bq/third_party/oauth2client_4_0/_pycrypto_crypt.py
209
+ platform/bq/third_party/oauth2client_4_0/client.py
210
+ platform/bq/third_party/oauth2client_4_0/clientsecrets.py
211
+ platform/bq/third_party/oauth2client_4_0/contrib/__init__.py
212
+ platform/bq/third_party/oauth2client_4_0/contrib/_metadata.py
213
+ platform/bq/third_party/oauth2client_4_0/contrib/devshell.py
214
+ platform/bq/third_party/oauth2client_4_0/contrib/gce.py
215
+ platform/bq/third_party/oauth2client_4_0/contrib/multiprocess_file_storage.py
216
+ platform/bq/third_party/oauth2client_4_0/crypt.py
217
+ platform/bq/third_party/oauth2client_4_0/file.py
218
+ platform/bq/third_party/oauth2client_4_0/service_account.py
219
+ platform/bq/third_party/oauth2client_4_0/tools.py
220
+ platform/bq/third_party/oauth2client_4_0/transport.py
221
+ platform/bq/third_party/openssl/LICENSE
222
+ platform/bq/third_party/packaging/LICENSE
223
+ platform/bq/third_party/pkg_resources/LICENSE
224
+ platform/bq/third_party/ply/LICENSE
225
+ platform/bq/third_party/program_image_remapper/LICENSE
226
+ platform/bq/third_party/protobuf/LICENSE
227
+ platform/bq/third_party/pyasn1/LICENSE
228
+ platform/bq/third_party/pyasn1/__init__.py
229
+ platform/bq/third_party/pyasn1/codec/__init__.py
230
+ platform/bq/third_party/pyasn1/codec/ber/__init__.py
231
+ platform/bq/third_party/pyasn1/codec/ber/decoder.py
232
+ platform/bq/third_party/pyasn1/codec/ber/encoder.py
233
+ platform/bq/third_party/pyasn1/codec/ber/eoo.py
234
+ platform/bq/third_party/pyasn1/codec/cer/__init__.py
235
+ platform/bq/third_party/pyasn1/codec/cer/decoder.py
236
+ platform/bq/third_party/pyasn1/codec/cer/encoder.py
237
+ platform/bq/third_party/pyasn1/codec/der/__init__.py
238
+ platform/bq/third_party/pyasn1/codec/der/decoder.py
239
+ platform/bq/third_party/pyasn1/codec/der/encoder.py
240
+ platform/bq/third_party/pyasn1/codec/native/__init__.py
241
+ platform/bq/third_party/pyasn1/codec/native/decoder.py
242
+ platform/bq/third_party/pyasn1/codec/native/encoder.py
243
+ platform/bq/third_party/pyasn1/compat/__init__.py
244
+ platform/bq/third_party/pyasn1/compat/binary.py
245
+ platform/bq/third_party/pyasn1/compat/calling.py
246
+ platform/bq/third_party/pyasn1/compat/dateandtime.py
247
+ platform/bq/third_party/pyasn1/compat/integer.py
248
+ platform/bq/third_party/pyasn1/compat/octets.py
249
+ platform/bq/third_party/pyasn1/compat/string.py
250
+ platform/bq/third_party/pyasn1/debug.py
251
+ platform/bq/third_party/pyasn1/error.py
252
+ platform/bq/third_party/pyasn1/type/__init__.py
253
+ platform/bq/third_party/pyasn1/type/base.py
254
+ platform/bq/third_party/pyasn1/type/char.py
255
+ platform/bq/third_party/pyasn1/type/constraint.py
256
+ platform/bq/third_party/pyasn1/type/error.py
257
+ platform/bq/third_party/pyasn1/type/namedtype.py
258
+ platform/bq/third_party/pyasn1/type/namedval.py
259
+ platform/bq/third_party/pyasn1/type/opentype.py
260
+ platform/bq/third_party/pyasn1/type/tag.py
261
+ platform/bq/third_party/pyasn1/type/tagmap.py
262
+ platform/bq/third_party/pyasn1/type/univ.py
263
+ platform/bq/third_party/pyasn1/type/useful.py
264
+ platform/bq/third_party/pyasn1_modules/LICENSE
265
+ platform/bq/third_party/pyasn1_modules/__init__.py
266
+ platform/bq/third_party/pyasn1_modules/pem.py
267
+ platform/bq/third_party/pyasn1_modules/rfc1155.py
268
+ platform/bq/third_party/pyasn1_modules/rfc1157.py
269
+ platform/bq/third_party/pyasn1_modules/rfc1901.py
270
+ platform/bq/third_party/pyasn1_modules/rfc1902.py
271
+ platform/bq/third_party/pyasn1_modules/rfc1905.py
272
+ platform/bq/third_party/pyasn1_modules/rfc2251.py
273
+ platform/bq/third_party/pyasn1_modules/rfc2314.py
274
+ platform/bq/third_party/pyasn1_modules/rfc2315.py
275
+ platform/bq/third_party/pyasn1_modules/rfc2437.py
276
+ platform/bq/third_party/pyasn1_modules/rfc2459.py
277
+ platform/bq/third_party/pyasn1_modules/rfc2511.py
278
+ platform/bq/third_party/pyasn1_modules/rfc2560.py
279
+ platform/bq/third_party/pyasn1_modules/rfc2986.py
280
+ platform/bq/third_party/pyasn1_modules/rfc3279.py
281
+ platform/bq/third_party/pyasn1_modules/rfc3280.py
282
+ platform/bq/third_party/pyasn1_modules/rfc3281.py
283
+ platform/bq/third_party/pyasn1_modules/rfc3412.py
284
+ platform/bq/third_party/pyasn1_modules/rfc3414.py
285
+ platform/bq/third_party/pyasn1_modules/rfc3447.py
286
+ platform/bq/third_party/pyasn1_modules/rfc3852.py
287
+ platform/bq/third_party/pyasn1_modules/rfc4210.py
288
+ platform/bq/third_party/pyasn1_modules/rfc4211.py
289
+ platform/bq/third_party/pyasn1_modules/rfc5208.py
290
+ platform/bq/third_party/pyasn1_modules/rfc5280.py
291
+ platform/bq/third_party/pyasn1_modules/rfc5652.py
292
+ platform/bq/third_party/pyasn1_modules/rfc6402.py
293
+ platform/bq/third_party/pycparser/LICENSE
294
+ platform/bq/third_party/pyglib/__init__.py
295
+ platform/bq/third_party/pyglib/appcommands.py
296
+ platform/bq/third_party/pyglib/stringutil.py
297
+ platform/bq/third_party/pyparsing/LICENSE
298
+ platform/bq/third_party/pyparsing/__init__.py
299
+ platform/bq/third_party/python_runtime/LICENSE
300
+ platform/bq/third_party/pyu2f/LICENSE
301
+ platform/bq/third_party/pyu2f/__init__.py
302
+ platform/bq/third_party/pyu2f/apdu.py
303
+ platform/bq/third_party/pyu2f/convenience/__init__.py
304
+ platform/bq/third_party/pyu2f/convenience/authenticator.py
305
+ platform/bq/third_party/pyu2f/convenience/baseauthenticator.py
306
+ platform/bq/third_party/pyu2f/convenience/customauthenticator.py
307
+ platform/bq/third_party/pyu2f/convenience/localauthenticator.py
308
+ platform/bq/third_party/pyu2f/errors.py
309
+ platform/bq/third_party/pyu2f/hardware.py
310
+ platform/bq/third_party/pyu2f/hid/__init__.py
311
+ platform/bq/third_party/pyu2f/hid/base.py
312
+ platform/bq/third_party/pyu2f/hid/linux.py
313
+ platform/bq/third_party/pyu2f/hid/macos.py
314
+ platform/bq/third_party/pyu2f/hid/windows.py
315
+ platform/bq/third_party/pyu2f/hidtransport.py
316
+ platform/bq/third_party/pyu2f/model.py
317
+ platform/bq/third_party/pyu2f/u2f.py
318
+ platform/bq/third_party/requests/LICENSE
319
+ platform/bq/third_party/requests/__init__.py
320
+ platform/bq/third_party/requests/__version__.py
321
+ platform/bq/third_party/requests/_internal_utils.py
322
+ platform/bq/third_party/requests/adapters.py
323
+ platform/bq/third_party/requests/api.py
324
+ platform/bq/third_party/requests/auth.py
325
+ platform/bq/third_party/requests/certs.py
326
+ platform/bq/third_party/requests/compat.py
327
+ platform/bq/third_party/requests/cookies.py
328
+ platform/bq/third_party/requests/exceptions.py
329
+ platform/bq/third_party/requests/help.py
330
+ platform/bq/third_party/requests/hooks.py
331
+ platform/bq/third_party/requests/models.py
332
+ platform/bq/third_party/requests/packages.py
333
+ platform/bq/third_party/requests/sessions.py
334
+ platform/bq/third_party/requests/status_codes.py
335
+ platform/bq/third_party/requests/structures.py
336
+ platform/bq/third_party/requests/utils.py
337
+ platform/bq/third_party/rsa/LICENSE
338
+ platform/bq/third_party/rsa/__init__.py
339
+ platform/bq/third_party/rsa/asn1.py
340
+ platform/bq/third_party/rsa/common.py
341
+ platform/bq/third_party/rsa/core.py
342
+ platform/bq/third_party/rsa/key.py
343
+ platform/bq/third_party/rsa/pem.py
344
+ platform/bq/third_party/rsa/pkcs1.py
345
+ platform/bq/third_party/rsa/pkcs1_v2.py
346
+ platform/bq/third_party/rsa/prime.py
347
+ platform/bq/third_party/rsa/randnum.py
348
+ platform/bq/third_party/rsa/transform.py
349
+ platform/bq/third_party/six/LICENSE
350
+ platform/bq/third_party/six/__init__.py
351
+ platform/bq/third_party/socks/LICENSE
352
+ platform/bq/third_party/socks/__init__.py
353
+ platform/bq/third_party/socks/sockshandler.py
354
+ platform/bq/third_party/tcmalloc/LICENSE
355
+ platform/bq/third_party/tz/LICENSE
356
+ platform/bq/third_party/uritemplate/LICENSE
357
+ platform/bq/third_party/uritemplate/__init__.py
358
+ platform/bq/third_party/uritemplate/api.py
359
+ platform/bq/third_party/uritemplate/orderedset.py
360
+ platform/bq/third_party/uritemplate/template.py
361
+ platform/bq/third_party/uritemplate/variable.py
362
+ platform/bq/third_party/urllib3/LICENSE
363
+ platform/bq/third_party/urllib3/__init__.py
364
+ platform/bq/third_party/urllib3/_collections.py
365
+ platform/bq/third_party/urllib3/_version.py
366
+ platform/bq/third_party/urllib3/connection.py
367
+ platform/bq/third_party/urllib3/connectionpool.py
368
+ platform/bq/third_party/urllib3/contrib/__init__.py
369
+ platform/bq/third_party/urllib3/contrib/_appengine_environ.py
370
+ platform/bq/third_party/urllib3/contrib/_securetransport/__init__.py
371
+ platform/bq/third_party/urllib3/contrib/_securetransport/bindings.py
372
+ platform/bq/third_party/urllib3/contrib/_securetransport/low_level.py
373
+ platform/bq/third_party/urllib3/contrib/appengine.py
374
+ platform/bq/third_party/urllib3/contrib/ntlmpool.py
375
+ platform/bq/third_party/urllib3/contrib/securetransport.py
376
+ platform/bq/third_party/urllib3/contrib/socks.py
377
+ platform/bq/third_party/urllib3/exceptions.py
378
+ platform/bq/third_party/urllib3/fields.py
379
+ platform/bq/third_party/urllib3/filepost.py
380
+ platform/bq/third_party/urllib3/packages/__init__.py
381
+ platform/bq/third_party/urllib3/packages/backports/__init__.py
382
+ platform/bq/third_party/urllib3/packages/backports/finalize.py
383
+ platform/bq/third_party/urllib3/packages/backports/makefile.py
384
+ platform/bq/third_party/urllib3/packages/six.py
385
+ platform/bq/third_party/urllib3/poolmanager.py
386
+ platform/bq/third_party/urllib3/request.py
387
+ platform/bq/third_party/urllib3/response.py
388
+ platform/bq/third_party/urllib3/util/__init__.py
389
+ platform/bq/third_party/urllib3/util/connection.py
390
+ platform/bq/third_party/urllib3/util/proxy.py
391
+ platform/bq/third_party/urllib3/util/queue.py
392
+ platform/bq/third_party/urllib3/util/request.py
393
+ platform/bq/third_party/urllib3/util/response.py
394
+ platform/bq/third_party/urllib3/util/retry.py
395
+ platform/bq/third_party/urllib3/util/ssl_.py
396
+ platform/bq/third_party/urllib3/util/ssl_match_hostname.py
397
+ platform/bq/third_party/urllib3/util/ssltransport.py
398
+ platform/bq/third_party/urllib3/util/timeout.py
399
+ platform/bq/third_party/urllib3/util/url.py
400
+ platform/bq/third_party/urllib3/util/wait.py
401
+ platform/bq/third_party/wcwidth/LICENSE
402
+ platform/bq/third_party/wcwidth/__init__.py
403
+ platform/bq/third_party/wcwidth/table_wide.py
404
+ platform/bq/third_party/wcwidth/table_zero.py
405
+ platform/bq/third_party/wcwidth/unicode_versions.py
406
+ platform/bq/third_party/wcwidth/wcwidth.py
407
+ platform/bq/third_party/yaml/LICENSE
408
+ platform/bq/third_party/yaml/__init__.py
409
+ platform/bq/third_party/yaml/lib2/__init__.py
410
+ platform/bq/third_party/yaml/lib2/composer.py
411
+ platform/bq/third_party/yaml/lib2/constructor.py
412
+ platform/bq/third_party/yaml/lib2/cyaml.py
413
+ platform/bq/third_party/yaml/lib2/dumper.py
414
+ platform/bq/third_party/yaml/lib2/emitter.py
415
+ platform/bq/third_party/yaml/lib2/error.py
416
+ platform/bq/third_party/yaml/lib2/events.py
417
+ platform/bq/third_party/yaml/lib2/loader.py
418
+ platform/bq/third_party/yaml/lib2/nodes.py
419
+ platform/bq/third_party/yaml/lib2/parser.py
420
+ platform/bq/third_party/yaml/lib2/reader.py
421
+ platform/bq/third_party/yaml/lib2/representer.py
422
+ platform/bq/third_party/yaml/lib2/resolver.py
423
+ platform/bq/third_party/yaml/lib2/scanner.py
424
+ platform/bq/third_party/yaml/lib2/serializer.py
425
+ platform/bq/third_party/yaml/lib2/tokens.py
426
+ platform/bq/third_party/yaml/lib3/__init__.py
427
+ platform/bq/third_party/yaml/lib3/composer.py
428
+ platform/bq/third_party/yaml/lib3/constructor.py
429
+ platform/bq/third_party/yaml/lib3/cyaml.py
430
+ platform/bq/third_party/yaml/lib3/dumper.py
431
+ platform/bq/third_party/yaml/lib3/emitter.py
432
+ platform/bq/third_party/yaml/lib3/error.py
433
+ platform/bq/third_party/yaml/lib3/events.py
434
+ platform/bq/third_party/yaml/lib3/loader.py
435
+ platform/bq/third_party/yaml/lib3/nodes.py
436
+ platform/bq/third_party/yaml/lib3/parser.py
437
+ platform/bq/third_party/yaml/lib3/reader.py
438
+ platform/bq/third_party/yaml/lib3/representer.py
439
+ platform/bq/third_party/yaml/lib3/resolver.py
440
+ platform/bq/third_party/yaml/lib3/scanner.py
441
+ platform/bq/third_party/yaml/lib3/serializer.py
442
+ platform/bq/third_party/yaml/lib3/tokens.py
443
+ platform/bq/wrapped_credentials.py
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bq.snapshot.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "5a5b3ce51213ff3d6dcd1e6da2fe11c211f2ce1d1b7c3f22607eb45c9f53eaa7",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "bq-nix",
11
+ "bq-win",
12
+ "core"
13
+ ],
14
+ "details": {
15
+ "description": "Provides the bq tool for interacting with the BigQuery service.",
16
+ "display_name": "BigQuery Command Line Tool"
17
+ },
18
+ "id": "bq",
19
+ "is_configuration": false,
20
+ "is_hidden": false,
21
+ "is_required": false,
22
+ "platform": {},
23
+ "platform_required": false,
24
+ "version": {
25
+ "build_number": 20230822145232,
26
+ "version_string": "2.0.97"
27
+ }
28
+ }
29
+ ],
30
+ "revision": 20230822145232,
31
+ "schema_version": {
32
+ "no_update": false,
33
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
34
+ "version": 3
35
+ },
36
+ "version": "444.0.0"
37
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix-linux-x86_64.manifest ADDED
The diff for this file is too large to render. See raw diff
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix-linux-x86_64.snapshot.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "d180face4e75defdab3f52ee344af5dc842b09df39680f43d558a5670ca770db",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "bundled-python3-unix",
11
+ "core"
12
+ ],
13
+ "details": {
14
+ "description": "Provides stand-alone Python 3.9.16 installation for UNIX.",
15
+ "display_name": "Bundled Python 3.9"
16
+ },
17
+ "id": "bundled-python3-unix-linux-x86_64",
18
+ "is_configuration": false,
19
+ "is_hidden": true,
20
+ "is_required": false,
21
+ "platform": {
22
+ "architectures": [
23
+ "x86_64"
24
+ ],
25
+ "operating_systems": [
26
+ "LINUX"
27
+ ]
28
+ },
29
+ "platform_required": false,
30
+ "version": {
31
+ "build_number": 20230822145232,
32
+ "version_string": "3.9.16"
33
+ }
34
+ }
35
+ ],
36
+ "revision": 20230822145232,
37
+ "schema_version": {
38
+ "no_update": false,
39
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
40
+ "version": 3
41
+ },
42
+ "version": "444.0.0"
43
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix.manifest ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/bundled-python3-unix.snapshot.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "dependencies": [
5
+ "bundled-python3-unix-linux-x86_64",
6
+ "core"
7
+ ],
8
+ "details": {
9
+ "description": "Provides stand-alone Python 3.9.16 installation for UNIX.",
10
+ "display_name": "Bundled Python 3.9"
11
+ },
12
+ "id": "bundled-python3-unix",
13
+ "is_configuration": false,
14
+ "is_hidden": false,
15
+ "is_required": false,
16
+ "platform": {
17
+ "architectures": [
18
+ "x86_64"
19
+ ],
20
+ "operating_systems": [
21
+ "LINUX"
22
+ ]
23
+ },
24
+ "platform_required": false,
25
+ "version": {
26
+ "build_number": 0,
27
+ "version_string": "3.9.16"
28
+ }
29
+ }
30
+ ],
31
+ "revision": 20230822145232,
32
+ "schema_version": {
33
+ "no_update": false,
34
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
35
+ "version": 3
36
+ },
37
+ "version": "444.0.0"
38
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core-nix.manifest ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ bin/docker-credential-gcloud
2
+ bin/git-credential-gcloud.sh
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core-nix.snapshot.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "5ab83e0028ef523ae3eab59b05b6f2f3d340be750385dc66bd1127c75d7a6d4b",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "bundled-python3-unix",
11
+ "core",
12
+ "gcloud-deps",
13
+ "ssh-tools"
14
+ ],
15
+ "details": {
16
+ "description": "Handles all core functionality for the Google Cloud CLI.",
17
+ "display_name": "Google Cloud CLI Core Libraries (Platform Specific)"
18
+ },
19
+ "id": "core-nix",
20
+ "is_configuration": false,
21
+ "is_hidden": true,
22
+ "is_required": true,
23
+ "platform": {
24
+ "operating_systems": [
25
+ "CYGWIN",
26
+ "LINUX",
27
+ "MACOSX",
28
+ "MSYS"
29
+ ]
30
+ },
31
+ "platform_required": false,
32
+ "version": {
33
+ "build_number": 20230822145232,
34
+ "version_string": "2023.08.22"
35
+ }
36
+ }
37
+ ],
38
+ "revision": 20230822145232,
39
+ "schema_version": {
40
+ "no_update": false,
41
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
42
+ "version": 3
43
+ },
44
+ "version": "444.0.0"
45
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core.manifest ADDED
The diff for this file is too large to render. See raw diff
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/core.snapshot.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "968206e118587033d22227440e2eeb94a8654bf97847d0229c6c46f31ec8a2a7",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "bundled-python3-unix",
11
+ "core-nix",
12
+ "core-win",
13
+ "gcloud-deps",
14
+ "ssh-tools"
15
+ ],
16
+ "details": {
17
+ "description": "Handles all core functionality for the Google Cloud CLI.",
18
+ "display_name": "Google Cloud CLI Core Libraries"
19
+ },
20
+ "id": "core",
21
+ "is_configuration": false,
22
+ "is_hidden": false,
23
+ "is_required": true,
24
+ "platform": {},
25
+ "platform_required": false,
26
+ "version": {
27
+ "build_number": 20230822145232,
28
+ "version_string": "2023.08.22"
29
+ }
30
+ }
31
+ ],
32
+ "revision": 20230822145232,
33
+ "schema_version": {
34
+ "no_update": false,
35
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
36
+ "version": 3
37
+ },
38
+ "version": "444.0.0"
39
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c-linux-x86_64.manifest ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ bin/gcloud-crc32c
2
+ platform/gcloud-crc32c_licenses/LICENSES.txt
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c-linux-x86_64.snapshot.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "4c800215e986d728d7c40812ea2a13535dfa3f260e0c82a7e1b68b7269fcfe80",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "gcloud-crc32c"
11
+ ],
12
+ "details": {
13
+ "description": "Command line tool that calculates CRC32C hashes on local files.",
14
+ "display_name": "Google Cloud CRC32C Hash Tool"
15
+ },
16
+ "id": "gcloud-crc32c-linux-x86_64",
17
+ "is_configuration": false,
18
+ "is_hidden": true,
19
+ "is_required": false,
20
+ "platform": {
21
+ "architectures": [
22
+ "x86_64"
23
+ ],
24
+ "operating_systems": [
25
+ "LINUX"
26
+ ]
27
+ },
28
+ "platform_required": false,
29
+ "version": {
30
+ "build_number": 20230822145232,
31
+ "version_string": "1.0.0"
32
+ }
33
+ }
34
+ ],
35
+ "revision": 20230822145232,
36
+ "schema_version": {
37
+ "no_update": false,
38
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
39
+ "version": 3
40
+ },
41
+ "version": "444.0.0"
42
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c.manifest ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-crc32c.snapshot.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "dependencies": [
5
+ "gcloud-crc32c-darwin-arm",
6
+ "gcloud-crc32c-darwin-x86_64",
7
+ "gcloud-crc32c-linux-arm",
8
+ "gcloud-crc32c-linux-x86",
9
+ "gcloud-crc32c-linux-x86_64",
10
+ "gcloud-crc32c-windows-x86",
11
+ "gcloud-crc32c-windows-x86_64"
12
+ ],
13
+ "details": {
14
+ "description": "Command line tool that calculates CRC32C hashes on local files.",
15
+ "display_name": "Google Cloud CRC32C Hash Tool"
16
+ },
17
+ "id": "gcloud-crc32c",
18
+ "is_configuration": false,
19
+ "is_hidden": false,
20
+ "is_required": false,
21
+ "platform": {
22
+ "architectures": [
23
+ "arm",
24
+ "x86",
25
+ "x86_64"
26
+ ],
27
+ "operating_systems": [
28
+ "LINUX",
29
+ "MACOSX",
30
+ "WINDOWS"
31
+ ]
32
+ },
33
+ "platform_required": false,
34
+ "version": {
35
+ "build_number": 0,
36
+ "version_string": "1.0.0"
37
+ }
38
+ }
39
+ ],
40
+ "revision": 20230822145232,
41
+ "schema_version": {
42
+ "no_update": false,
43
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
44
+ "version": 3
45
+ },
46
+ "version": "444.0.0"
47
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps-linux-x86_64.manifest ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps-linux-x86_64.snapshot.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "core",
11
+ "gcloud-deps"
12
+ ],
13
+ "details": {
14
+ "description": "Set of third_party gcloud cli dependencies.",
15
+ "display_name": "gcloud cli dependencies"
16
+ },
17
+ "id": "gcloud-deps-linux-x86_64",
18
+ "is_configuration": false,
19
+ "is_hidden": true,
20
+ "is_required": false,
21
+ "platform": {
22
+ "architectures": [
23
+ "x86_64"
24
+ ],
25
+ "operating_systems": [
26
+ "LINUX"
27
+ ]
28
+ },
29
+ "platform_required": false,
30
+ "version": {
31
+ "build_number": 20230822145232,
32
+ "version_string": "2023.08.22"
33
+ }
34
+ }
35
+ ],
36
+ "revision": 20230822145232,
37
+ "schema_version": {
38
+ "no_update": false,
39
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
40
+ "version": 3
41
+ },
42
+ "version": "444.0.0"
43
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps.manifest ADDED
The diff for this file is too large to render. See raw diff
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud-deps.snapshot.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "b783ea64726b9b2746d89ff89bfaf098dc3cf272d3b0b6687444f2c3e7a839cf",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "core",
11
+ "gcloud-deps-darwin-x86",
12
+ "gcloud-deps-darwin-x86_64",
13
+ "gcloud-deps-linux-x86",
14
+ "gcloud-deps-linux-x86_64",
15
+ "gcloud-deps-windows-x86",
16
+ "gcloud-deps-windows-x86_64"
17
+ ],
18
+ "details": {
19
+ "description": "Set of third_party gcloud cli dependencies.",
20
+ "display_name": "gcloud cli dependencies"
21
+ },
22
+ "id": "gcloud-deps",
23
+ "is_configuration": false,
24
+ "is_hidden": true,
25
+ "is_required": false,
26
+ "platform": {},
27
+ "platform_required": false,
28
+ "version": {
29
+ "build_number": 20230822145232,
30
+ "version_string": "2023.08.22"
31
+ }
32
+ }
33
+ ],
34
+ "revision": 20230822145232,
35
+ "schema_version": {
36
+ "no_update": false,
37
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
38
+ "version": 3
39
+ },
40
+ "version": "444.0.0"
41
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud.manifest ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gcloud.snapshot.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "dependencies": [
5
+ "core"
6
+ ],
7
+ "details": {
8
+ "description": "Default set of gcloud commands.",
9
+ "display_name": "Default set of gcloud commands"
10
+ },
11
+ "id": "gcloud",
12
+ "is_configuration": false,
13
+ "is_hidden": true,
14
+ "is_required": false,
15
+ "platform": {},
16
+ "platform_required": false,
17
+ "version": {
18
+ "build_number": 0,
19
+ "version_string": ""
20
+ }
21
+ }
22
+ ],
23
+ "revision": 20230822145232,
24
+ "schema_version": {
25
+ "no_update": false,
26
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
27
+ "version": 3
28
+ },
29
+ "version": "444.0.0"
30
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil-nix.manifest ADDED
@@ -0,0 +1 @@
 
 
1
+ bin/gsutil
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil-nix.snapshot.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "5368c71d19578ae4e3b2c2e44ef794040d45cfefcaad8137454ee1fcc75069ea",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "core",
11
+ "gsutil"
12
+ ],
13
+ "details": {
14
+ "description": "Provides the gsutil tool for interacting with Google Cloud Storage.",
15
+ "display_name": "Cloud Storage Command Line Tool (Platform Specific)"
16
+ },
17
+ "id": "gsutil-nix",
18
+ "is_configuration": false,
19
+ "is_hidden": true,
20
+ "is_required": false,
21
+ "platform": {
22
+ "operating_systems": [
23
+ "CYGWIN",
24
+ "LINUX",
25
+ "MACOSX",
26
+ "MSYS"
27
+ ]
28
+ },
29
+ "platform_required": false,
30
+ "version": {
31
+ "build_number": 20230822145232,
32
+ "version_string": "5.25"
33
+ }
34
+ }
35
+ ],
36
+ "revision": 20230822145232,
37
+ "schema_version": {
38
+ "no_update": false,
39
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
40
+ "version": 3
41
+ },
42
+ "version": "444.0.0"
43
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil.manifest ADDED
The diff for this file is too large to render. See raw diff
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/.install/gsutil.snapshot.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "components": [
3
+ {
4
+ "data": {
5
+ "contents_checksum": "687332f3ffdbc2982cdf650f78d172646c2048f63a909715ddf7f907c2a83581",
6
+ "source": "",
7
+ "type": "tar"
8
+ },
9
+ "dependencies": [
10
+ "core",
11
+ "gsutil-nix",
12
+ "gsutil-win"
13
+ ],
14
+ "details": {
15
+ "description": "Provides the gsutil tool for interacting with Google Cloud Storage.",
16
+ "display_name": "Cloud Storage Command Line Tool"
17
+ },
18
+ "id": "gsutil",
19
+ "is_configuration": false,
20
+ "is_hidden": false,
21
+ "is_required": false,
22
+ "platform": {},
23
+ "platform_required": false,
24
+ "version": {
25
+ "build_number": 20230822145232,
26
+ "version_string": "5.25"
27
+ }
28
+ }
29
+ ],
30
+ "revision": 20230822145232,
31
+ "schema_version": {
32
+ "no_update": false,
33
+ "url": "https://dl.google.com/dl/cloudsdk/channels/rapid/google-cloud-sdk.tar.gz",
34
+ "version": 3
35
+ },
36
+ "version": "444.0.0"
37
+ }
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/LICENSE ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The Google Cloud CLI and its source code are licensed under Apache
2
+ License v. 2.0 (the "License"), unless otherwise specified by an alternate
3
+ license file.
4
+
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Note that if you use the Google Cloud CLI with any Google Cloud Platform
10
+ products, your use is additionally going to be governed by the license agreement
11
+ or terms of service, as applicable, of the underlying Google Cloud Platform
12
+ product with which you are using the Google Cloud CLI. For example, if you are
13
+ using the Google Cloud CLI with Google App Engine, your use would additionally
14
+ be governed by the Google App Engine Terms of Service.
15
+
16
+ This also means that if you were to create works that call Google APIs, you
17
+ would still need to agree to the terms of service (usually, Google's
18
+ Developer Terms of Service at https://developers.google.com/terms) for those
19
+ APIs separately, as this code does not grant you any special rights to use
20
+ the services.
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/README ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Google Cloud SDK
2
+ Copyright 2013 Google Inc. All Rights Reserved.
3
+
4
+ The Google Cloud SDK contains tools and libraries that allow you to create and
5
+ manage resources on Google's Cloud Platform, including App Engine, Compute
6
+ Engine, Cloud Storage, Cloud SQL, and BigQuery.
7
+
8
+ For more information on how to set up and use the Cloud SDK, please see:
9
+ https://cloud.google.com/sdk
10
+
11
+
12
+ System Requirements:
13
+ - The Cloud SDK for Python and for Go requires Python 2.7.x.
14
+ - The Cloud SDK for Java requires Java 1.7+ and Python 2.7.x.
15
+ - The SDK runs on Windows, Mac OS X, and Linux. Some of the individual tools
16
+ bundled with the Cloud SDK might have more stringent requirements.
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/RELEASE_NOTES ADDED
The diff for this file is too large to render. See raw diff
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/VERSION ADDED
@@ -0,0 +1 @@
 
 
1
+ 444.0.0
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/anthoscli ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac7c38db331e054fe1936f5f6ece6dc4ee98fd660ad4ac29342e15a0385e47c6
3
+ size 174851479
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/.default_components ADDED
@@ -0,0 +1 @@
 
 
1
+ []
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__init__.py ADDED
File without changes
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__pycache__/bootstrapping.cpython-39.pyc ADDED
Binary file (9.51 kB). View file
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/__pycache__/setup.cpython-39.pyc ADDED
Binary file (1.27 kB). View file
 
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/bootstrapping.py ADDED
@@ -0,0 +1,340 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright 2013 Google Inc. All Rights Reserved.
2
+
3
+ """Common bootstrapping functionality used by the wrapper scripts."""
4
+
5
+ # Disables import order warning and unused import. Setup changes the python
6
+ # path so cloud sdk imports will actually work, so it must come first.
7
+ # pylint: disable=C6203
8
+ # pylint: disable=W0611
9
+ from __future__ import absolute_import
10
+ from __future__ import unicode_literals
11
+
12
+ # Python 3 is strict about imports and we use this file in different ways, which
13
+ # makes sub-imports difficult. In general, when a script is executed, that
14
+ # directory is put on the PYTHONPATH. The issue is that some of the wrapper
15
+ # scripts are executed from within the bootstrapping/ directory and some are
16
+ # executed from within the bin/ directory.
17
+ # pylint: disable=g-statement-before-imports
18
+ if '.' in __name__:
19
+ # Here, __name__ will be bootstrapping.bootstrapping. This indicates that this
20
+ # file was loaded as a member of package bootstrapping. This in turn indicates
21
+ # that the main file that was executed was not in the bootstrapping directory,
22
+ # so bin/ is on the path and bootstrapping is considered a python package.
23
+ # Do an import of setup from this current package.
24
+ from . import setup # pylint:disable=g-import-not-at-top
25
+ else:
26
+ # In this case, __name__ is bootstrapping, which indicates that the main
27
+ # script was executed from within this directory meaning that Python doesn't
28
+ # consider this a package but rather the root of the PYTHONPATH. We can't do
29
+ # the above import because since we are not in a package, the '.' doesn't
30
+ # refer to anything. Just do a direct import which will find setup on the
31
+ # PYTHONPATH (which is just this directory).
32
+ import setup # pylint:disable=g-import-not-at-top
33
+
34
+ import gcloud
35
+ import sys
36
+ # Reorder sys.path if needed right now before more modules loaded and cached
37
+ sys.path = gcloud.reorder_sys_path(sys.path)
38
+
39
+ # pylint: disable=g-import-not-at-top
40
+ import json
41
+ # pylint: enable=g-import-not-at-top
42
+ import os
43
+ import platform
44
+
45
+ from googlecloudsdk.core import config
46
+ from googlecloudsdk.core import execution_utils
47
+ from googlecloudsdk.core import metrics
48
+ from googlecloudsdk.core import properties
49
+ from googlecloudsdk.core.console import console_attr
50
+ from googlecloudsdk.core.credentials import store as c_store
51
+ from googlecloudsdk.core.updater import local_state
52
+ from googlecloudsdk.core.updater import update_manager
53
+ from googlecloudsdk.core.util import encoding
54
+ from googlecloudsdk.core.util import files
55
+ from googlecloudsdk.core.util import platforms
56
+ from six.moves import input
57
+
58
+
59
+ BOOTSTRAPPING_DIR = os.path.dirname(os.path.realpath(__file__))
60
+ BIN_DIR = os.path.dirname(BOOTSTRAPPING_DIR)
61
+ SDK_ROOT = os.path.dirname(BIN_DIR)
62
+
63
+
64
+ def DisallowIncompatiblePythonVersions():
65
+ if not platforms.PythonVersion().IsCompatible():
66
+ sys.exit(1)
67
+
68
+
69
+ def GetDecodedArgv():
70
+ return [console_attr.Decode(arg) for arg in sys.argv]
71
+
72
+
73
+ def _FullPath(tool_dir, exec_name):
74
+ return os.path.join(SDK_ROOT, tool_dir, exec_name)
75
+
76
+
77
+ def ExecutePythonTool(tool_dir, exec_name, *args):
78
+ """Execute the given python script with the given args and command line.
79
+
80
+ Args:
81
+ tool_dir: the directory the tool is located in
82
+ exec_name: additional path to the executable under the tool_dir
83
+ *args: args for the command
84
+ """
85
+ py_path = None # Let execution_utils resolve the path.
86
+ # Gsutil allows users to set the desired Python interpreter using a separate
87
+ # environment variable, so as to allow users to run gsutil using Python 3
88
+ # without forcing the rest of the Cloud SDK to use Python 3 (as it would
89
+ # likely break at the time this comment was written).
90
+ extra_popen_kwargs = {}
91
+ if exec_name == 'gsutil':
92
+ gsutil_py = encoding.GetEncodedValue(os.environ, 'CLOUDSDK_GSUTIL_PYTHON')
93
+ # Since PY3, Python closes open FDs in child processes, since we need them
94
+ # open for completions to work we set the close_fds kwarg to Popen.
95
+ extra_popen_kwargs['close_fds'] = False
96
+ if gsutil_py:
97
+ py_path = gsutil_py
98
+
99
+ if exec_name == 'bq.py':
100
+ bq_py = encoding.GetEncodedValue(os.environ, 'CLOUDSDK_BQ_PYTHON')
101
+ if bq_py:
102
+ py_path = bq_py
103
+
104
+ if exec_name == 'dev_appserver.py':
105
+ if platforms.OperatingSystem.Current() != platforms.OperatingSystem.WINDOWS:
106
+ # Hard code the python to 'python2' which should exist on most Unix based
107
+ # systems.
108
+ py_path = 'python2'
109
+ else:
110
+ # On windows attempt to use the bundled PY2 component.
111
+ bundled_py2 = os.path.join(
112
+ SDK_ROOT, 'platform', 'bundledpython2', 'python.exe')
113
+ if os.path.exists(bundled_py2):
114
+ py_path = bundled_py2
115
+
116
+ # Set this ENV var to explicitly select the python binary to use for
117
+ # dev_appserver.py
118
+ devapp_env_py = encoding.GetEncodedValue(os.environ,
119
+ 'CLOUDSDK_DEVAPPSERVER_PYTHON')
120
+ if devapp_env_py:
121
+ py_path = devapp_env_py
122
+
123
+ _ExecuteTool(
124
+ execution_utils.ArgsForPythonTool(
125
+ _FullPath(tool_dir, exec_name), *args, python=py_path),
126
+ **extra_popen_kwargs)
127
+
128
+
129
+ def ExecuteJarTool(java_bin, jar_dir, jar_name, classname, flags=None, *args):
130
+ """Execute a given jar with the given args and command line.
131
+
132
+ Args:
133
+ java_bin: str, path to the system Java binary
134
+ jar_dir: str, the directory the jar is located in
135
+ jar_name: str, file name of the jar under tool_dir
136
+ classname: str, name of the main class in the jar
137
+ flags: [str], flags for the java binary
138
+ *args: args for the command
139
+ """
140
+ flags = flags or []
141
+ jar_path = _FullPath(jar_dir, jar_name)
142
+ classname_arg = [classname] if classname else []
143
+ java_args = ['-cp', jar_path] + flags + classname_arg + list(args)
144
+ _ExecuteTool(
145
+ execution_utils.ArgsForExecutableTool(java_bin, *java_args))
146
+
147
+
148
+ def ExecuteJavaClass(java_bin,
149
+ jar_dir,
150
+ main_jar,
151
+ main_class,
152
+ java_flags=None,
153
+ main_args=None):
154
+ """Execute a given java class within a directory of jars.
155
+
156
+ Args:
157
+ java_bin: str, path to the system Java binary
158
+ jar_dir: str, directory of jars to put on class path
159
+ main_jar: str, main jar (placed first on class path)
160
+ main_class: str, name of the main class in the jar
161
+ java_flags: [str], flags for the java binary
162
+ main_args: args for the command
163
+ """
164
+ java_flags = java_flags or []
165
+ main_args = main_args or []
166
+ jar_dir_path = os.path.join(SDK_ROOT, jar_dir, '*')
167
+ main_jar_path = os.path.join(SDK_ROOT, jar_dir, main_jar)
168
+ classpath = main_jar_path + os.pathsep + jar_dir_path
169
+ java_args = (['-cp', classpath]
170
+ + list(java_flags)
171
+ + [main_class]
172
+ + list(main_args))
173
+ _ExecuteTool(execution_utils.ArgsForExecutableTool(java_bin, *java_args))
174
+
175
+
176
+ def ExecuteShellTool(tool_dir, exec_name, *args):
177
+ """Execute the given bash script with the given args.
178
+
179
+ Args:
180
+ tool_dir: the directory the tool is located in
181
+ exec_name: additional path to the executable under the tool_dir
182
+ *args: args for the command
183
+ """
184
+ _ExecuteTool(
185
+ execution_utils.ArgsForExecutableTool(_FullPath(tool_dir, exec_name),
186
+ *args))
187
+
188
+
189
+ def ExecuteCMDTool(tool_dir, exec_name, *args):
190
+ """Execute the given batch file with the given args.
191
+
192
+ Args:
193
+ tool_dir: the directory the tool is located in
194
+ exec_name: additional path to the executable under the tool_dir
195
+ *args: args for the command
196
+ """
197
+ _ExecuteTool(
198
+ execution_utils.ArgsForCMDTool(_FullPath(tool_dir, exec_name), *args))
199
+
200
+
201
+ def _GetToolEnv():
202
+ env = dict(os.environ)
203
+ encoding.SetEncodedValue(env, 'CLOUDSDK_WRAPPER', '1')
204
+ encoding.SetEncodedValue(env, 'CLOUDSDK_VERSION', config.CLOUD_SDK_VERSION)
205
+ encoding.SetEncodedValue(env, 'CLOUDSDK_PYTHON',
206
+ execution_utils.GetPythonExecutable())
207
+ return env
208
+
209
+
210
+ def _ExecuteTool(args, **extra_popen_kwargs):
211
+ """Executes a new tool with the given args, plus the args from the cmdline.
212
+
213
+ Args:
214
+ args: [str], The args of the command to execute.
215
+ **extra_popen_kwargs: [dict], kwargs to be unpacked in Popen call for tool.
216
+ """
217
+ execution_utils.Exec(
218
+ args + sys.argv[1:], env=_GetToolEnv(), **extra_popen_kwargs)
219
+
220
+
221
+ def GetDefaultInstalledComponents():
222
+ """Gets the list of components to install by default.
223
+
224
+ Returns:
225
+ list(str), The component ids that should be installed. It will return []
226
+ if there are no default components, or if there is any error in reading
227
+ the file with the defaults.
228
+ """
229
+ default_components_file = os.path.join(BOOTSTRAPPING_DIR,
230
+ '.default_components')
231
+ try:
232
+ with open(default_components_file) as f:
233
+ return json.load(f)
234
+ # pylint:disable=bare-except, If the file does not exist or is malformed,
235
+ # we don't want to expose this as an error. Setup will just continue
236
+ # without installing any components by default and will tell the user how
237
+ # to install the components they want manually.
238
+ except:
239
+ pass
240
+ return []
241
+
242
+
243
+ def WarnAndExitOnBlockedCommand(args, blocked_commands):
244
+ """Block certain subcommands, warn the user, and exit.
245
+
246
+ Args:
247
+ args: the command line arguments, including the 0th argument which is
248
+ the program name.
249
+ blocked_commands: a map of blocked commands to the messages that should be
250
+ printed when they're run.
251
+ """
252
+ bad_arg = None
253
+ for arg in args[1:]:
254
+ # Flags are skipped and --flag=value are skipped. It is possible for
255
+ # '--flag value' to result in a false positive if value happens to be a
256
+ # blocked command.
257
+ if arg and arg[0] == '-':
258
+ continue
259
+ if arg in blocked_commands:
260
+ bad_arg = arg
261
+ break
262
+
263
+ blocked = bad_arg is not None
264
+
265
+ if blocked:
266
+ sys.stderr.write('It looks like you are trying to run "%s %s".\n'
267
+ % (args[0], bad_arg))
268
+ sys.stderr.write('The "%s" command is no longer needed with the '
269
+ 'Cloud SDK.\n' % bad_arg)
270
+ sys.stderr.write(blocked_commands[bad_arg] + '\n')
271
+ answer = input('Really run this command? (y/N) ')
272
+ if answer not in ['y', 'Y']:
273
+ sys.exit(1)
274
+
275
+
276
+ def CheckUpdates(command_path):
277
+ """Check for updates and inform the user.
278
+
279
+ Args:
280
+ command_path: str, The '.' separated path of the command that is currently
281
+ being run (i.e. gcloud.foo.bar).
282
+ """
283
+ try:
284
+ update_manager.UpdateManager.PerformUpdateCheck(command_path=command_path)
285
+ # pylint:disable=broad-except, We never want this to escape, ever. Only
286
+ # messages printed should reach the user.
287
+ except Exception:
288
+ pass
289
+
290
+
291
+ def CommandStart(command_name, component_id=None, version=None):
292
+ """Logs that the given command is being executed.
293
+
294
+ Args:
295
+ command_name: str, The name of the command being executed.
296
+ component_id: str, The component id that this command belongs to. Used for
297
+ version information if version was not specified.
298
+ version: str, Directly use this version instead of deriving it from
299
+ component.
300
+ """
301
+ if version is None and component_id:
302
+ version = local_state.InstallationState.VersionForInstalledComponent(
303
+ component_id)
304
+ metrics.Executions(command_name, version)
305
+
306
+
307
+ def GetActiveProjectAndAccount():
308
+ """Get the active project name and account for the active credentials.
309
+
310
+ For use with wrapping legacy tools that take projects and credentials on
311
+ the command line.
312
+
313
+ Returns:
314
+ (str, str), A tuple whose first element is the project, and whose second
315
+ element is the account.
316
+ """
317
+ project_name = properties.VALUES.core.project.Get(validate=False)
318
+ account = properties.VALUES.core.account.Get(validate=False)
319
+ return (project_name, account)
320
+
321
+
322
+ def GetActiveImpersonateServiceAccount():
323
+ """Get the active impersonate_service_account property.
324
+
325
+ For use with wrapping legacy tools that take impersonate_service_account on
326
+ the command line.
327
+
328
+ Returns:
329
+ str, The name of the service account to impersonate.
330
+ """
331
+ return properties.VALUES.auth.impersonate_service_account.Get(validate=False)
332
+
333
+
334
+ def ReadFileContents(*path_parts):
335
+ """Returns file content at specified relative path wrt SDK root path."""
336
+ return files.ReadFileContents(os.path.join(SDK_ROOT, *path_parts)).strip()
337
+
338
+
339
+ # Register some other sources for credentials and project.
340
+ c_store.GceCredentialProvider().Register()
google-cloud-cli-444.0.0-linux-x86_64/google-cloud-sdk/bin/bootstrapping/bq.py ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2013 Google Inc. All Rights Reserved.
4
+ #
5
+ """A convenience wrapper for starting bq."""
6
+
7
+ from __future__ import absolute_import
8
+ from __future__ import unicode_literals
9
+ import os
10
+
11
+ import bootstrapping
12
+
13
+ from googlecloudsdk.api_lib.iamcredentials import util as iamcred_util
14
+ from googlecloudsdk.calliope import exceptions
15
+ from googlecloudsdk.core import config
16
+ from googlecloudsdk.core import properties
17
+ from googlecloudsdk.core.credentials import gce
18
+ from googlecloudsdk.core.credentials import store
19
+
20
+
21
+ def _MaybeAddOption(args, name, value):
22
+ if value is None:
23
+ return
24
+ args.append('--{name}={value}'.format(name=name, value=value))
25
+
26
+
27
+ def main():
28
+ """Launches bq."""
29
+ version = bootstrapping.ReadFileContents('platform/bq', 'VERSION')
30
+ bootstrapping.CommandStart('bq', version=version)
31
+ blocked_commands = {
32
+ 'init': 'To authenticate, run gcloud auth.',
33
+ }
34
+ argv = bootstrapping.GetDecodedArgv()
35
+ bootstrapping.WarnAndExitOnBlockedCommand(argv, blocked_commands)
36
+
37
+ cmd_args = [arg for arg in argv[1:] if not arg.startswith('-')]
38
+ args = []
39
+ if cmd_args and cmd_args[0] not in ('version', 'help'):
40
+ # Check for credentials only if they are needed.
41
+ store.IMPERSONATION_TOKEN_PROVIDER = iamcred_util.ImpersonationAccessTokenProvider(
42
+ )
43
+ creds = store.Load() # Checks if there are active credentials
44
+
45
+ project, account = bootstrapping.GetActiveProjectAndAccount()
46
+ adc_path = config.Paths().LegacyCredentialsAdcPath(account)
47
+ single_store_path = config.Paths().LegacyCredentialsBqPath(account)
48
+
49
+ if bootstrapping.GetActiveImpersonateServiceAccount():
50
+ args = ['--oauth_access_token', creds.token]
51
+ elif gce.Metadata() and account in gce.Metadata().Accounts():
52
+ args = ['--use_gce_service_account']
53
+ elif os.path.isfile(adc_path):
54
+ args = [
55
+ '--application_default_credential_file',
56
+ adc_path,
57
+ '--credential_file',
58
+ single_store_path,
59
+ ]
60
+ else:
61
+ p12_key_path = config.Paths().LegacyCredentialsP12KeyPath(account)
62
+ if os.path.isfile(p12_key_path):
63
+ args = [
64
+ '--service_account',
65
+ account,
66
+ '--service_account_credential_file',
67
+ single_store_path,
68
+ '--service_account_private_key_file',
69
+ p12_key_path,
70
+ ]
71
+ else:
72
+ # Don't have any credentials we can pass.
73
+ raise store.NoCredentialsForAccountException(account)
74
+
75
+ use_client_cert = (
76
+ os.getenv('GOOGLE_API_USE_CLIENT_CERTIFICATE',
77
+ 'false').upper() == 'TRUE')
78
+ if use_client_cert:
79
+ args.append('--mtls')
80
+
81
+ _MaybeAddOption(args, 'project_id', project)
82
+
83
+ bootstrapping.CheckUpdates('bq')
84
+
85
+ proxy_params = properties.VALUES.proxy
86
+ _MaybeAddOption(args, 'proxy_address', proxy_params.address.Get())
87
+ _MaybeAddOption(args, 'proxy_port', proxy_params.port.Get())
88
+ _MaybeAddOption(args, 'proxy_username', proxy_params.username.Get())
89
+ _MaybeAddOption(args, 'proxy_password', proxy_params.password.Get())
90
+ _MaybeAddOption(args, 'disable_ssl_validation',
91
+ properties.VALUES.auth.disable_ssl_validation.GetBool())
92
+ _MaybeAddOption(args, 'ca_certificates_file',
93
+ properties.VALUES.core.custom_ca_certs_file.Get())
94
+
95
+ bootstrapping.ExecutePythonTool('platform/bq', 'bq.py', *args)
96
+
97
+
98
+ if __name__ == '__main__':
99
+ bootstrapping.DisallowIncompatiblePythonVersions()
100
+ try:
101
+ main()
102
+ except Exception as e: # pylint: disable=broad-except
103
+ exceptions.HandleError(e, 'bq')