This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ syft nvcr.io/nvidia/pytorch:24.02-py3 | |
✔ Pulled image | |
✔ Loaded image nvcr.io/nvidia/pytorch:24.02-py3 | |
✔ Parsed image sha256:43fcc1b74fd54c3598c3c3d569c7ec4f6e93dc78adad06e38783c95e1bfd5c94 | |
✔ Cataloged contents 57fd547447043b585ed68a43a7f1dfd3d01ea25c821df0b032b9da79ab82a385 | |
├── ✔ Packages [892 packages] | |
├── ✔ File digests [14,449 files] | |
├── ✔ File metadata [14,449 locations] | |
└── ✔ Executables [2,759 executables] | |
[0432] WARN cataloger failed cataloger=javascript-package-cataloger error=failed to parse package.json file: json: cannot unmarshal s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syft --platform linux/amd64 cgr.dev/chainguard/pytorch-cuda12 | |
✔ Pulled image | |
✔ Loaded image cgr.dev/chainguard/pytorch-cuda12:latest | |
✔ Parsed image sha256:fde1b4b832c4dd0008ba8a49ac886ada4b3bbf3248b438f893e42664d29c9e07 | |
✔ Cataloged contents efb7865bb45355ec5582bd8e02f1b14792c03cfdade52b6b1214e8eaf88ac99c | |
├── ✔ Packages [69 packages] | |
├── ✔ File digests [19,193 files] | |
├── ✔ File metadata [19,193 locations] | |
└── ✔ Executables [432 executables] | |
NAME VERSION TYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import pandas as pd | |
import requests | |
YOUR_SHEET_ID = "1ifFaQyNfgC-V0AnubYm9P3btkNwN9rXJNAHiauflHV4" | |
CSV_URL = f"https://docs.google.com/spreadsheet/ccc?key={YOUR_SHEET_ID}&output=csv" | |
res = requests.get(url=CSV_URL) | |
with open("image-names.csv", "wb") as data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import pandas as pd | |
pd.options.display.float_format = '{:.4f}'.format | |
with open("funder_finder_results.jsonl") as f: | |
df = pd.DataFrame(json.loads(line) for line in f) | |
#print(df.info()) | |
#print(df.type.value_counts()) | |
#print(pd.crosstab(df.type, df.funding_type)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import pandas as pd | |
with open("funder_finder_results.jsonl") as f: | |
df = pd.DataFrame(json.loads(line) for line in f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# find number of top 1000 python packages that have one or more CVEs | |
import json | |
# find all packages with a CVE | |
# Open the JSON file | |
with open("pyup_io_safety_db_python_cve.json") as file: | |
# Load the JSON data | |
data = json.load(file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# collect data from multiple repos into a CSV. Each line is one type of a contribution to | |
# one particular repo | |
import json | |
import os | |
def run_python_command(command): | |
# Execute the command and capture the output | |
output = os.popen(command).read().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"funding_type": "individual", "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https://github.com/pytest-dev/execnet"} | |
{"funding_type": "organizational", "num_contributors": 5, "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https://github.com/ipython/comm"} | |
{"funding_type": "individual", "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https://github.com/scrapy/cssselect"} | |
{"funding_type": "individual", "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https://github.com/horejsek/python-fastjsonschema"} | |
{"funding_type": "individual", "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https://github.com/pytest-dev/py"} | |
{"funding_type": "individual", "type": "Github Sponsors", "is_funded": true, "date_of_data_collection": "2023-05-28", "repo_name": "https: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/pytest-dev/execnet | |
https://github.com/ipython/comm | |
https://github.com/scrapy/cssselect | |
https://github.com/confluentinc/confluent-kafka-python | |
https://github.com/explosion/cymem | |
https://github.com/sighingnow/libclang | |
https://github.com/rbarrois/python-semanticversion | |
https://github.com/horejsek/python-fastjsonschema | |
https://github.com/pytest-dev/py | |
https://github.com/html5lib/html5lib-python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Filter deps2repos output for top python package GitHub URLs""" | |
input_filename = "pypi_repo_deps2repos_output.txt" | |
output_filename = "deps2repos_output_post_filtering.txt" | |
# read in output of deps2repos | |
with open(input_filename, "r") as file: | |
# only start collecting data on the 79th line because | |
# the early information is about repos lacking GitHub | |
# repos |
NewerOlder