repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/collate.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:31.661180 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import random
import torch
def collate_data_and_cast(
samples_list,
mask_ratio_tuple,
mask_probability,
dtype,
n_tokens=None,
mas... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:31.677363 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
from .ade20k import ADE20K
from .coco_captions import CocoCaptions
from .image_net import ImageNet
from .image_net_22k import ImageNet22k
|
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/ade20k.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:31.743224 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import os
from enum import Enum
from typing import Any, Callable, List, Optional, Tuple, Union
from PIL import Image
from .decoders import Decoder, DenseT... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/coco_captions.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:31.835104 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import json
import os
import random
from enum import Enum
from typing import Callable, Dict, List, Optional, Union
from .decoders import ImageDataDecoder, ... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/decoders.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:31.918698 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
from io import BytesIO
from typing import Any
from PIL import Image
class Decoder:
def decode(self) -> Any:
raise NotImplementedError
class... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/extended.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.025258 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
from typing import Any, Tuple
from torchvision.datasets import VisionDataset
from .decoders import Decoder, ImageDataDecoder, TargetDecoder
class Extend... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/image_net.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.091982 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import csv
import logging
import os
from enum import Enum
from typing import Callable, List, Optional, Tuple, Union
import numpy as np
from .decoders impo... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/datasets/image_net_22k.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.094321 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import os
import warnings
from dataclasses import dataclass
from enum import Enum
from functools import lru_cache
from gzip import GzipFile
from io import B... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/loaders.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.118847 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
from enum import Enum
from typing import Any, Callable, List, Optional, TypeVar
import torch
from torch.utils.data import Sampler
from .dat... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/masking.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.148738 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import math
import random
import numpy as np
class MaskingGenerator:
def __init__(
self,
input_size,
num_masking_patches=None... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/meta_loaders.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.207228 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
from typing import Any, Iterable, Iterator, List, Tuple, TypeVar
import numpy as np
logger = logging.getLogger("dinov3")
Loader = Iterable[... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/samplers.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.224203 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import itertools
import warnings
from typing import Any, Optional
import numpy as np
import torch
from torch.utils.data.sampler import Sampler
from dinov3... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/data/transforms.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.323255 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
import math
from typing import Sequence
import PIL
import torch
from torchvision import transforms
logger = logging.getLogger("dinov3")
d... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/distributed/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.432460 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
# isort: skip_file
from .torch_distributed_wrapper import (
disable_distributed as disable,
enable_distributed as enable,
get_default_process_gr... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/distributed/torch_distributed_primitives.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.456751 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
from typing import Any, Dict, List, Optional
import torch
import torch.distributed as dist
from torch.nn import functional as F
from .torch_distributed_wr... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/distributed/torch_distributed_wrapper.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.596300 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
import os
import random
import socket
import subprocess
from datetime import timedelta
from enum import Enum
from typing import List, Sequenc... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/eval/data.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.623914 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
from functools import lru_cache
from typing import Any, Callable, Optional
import numpy as np
import torch
from torch.utils.data import Subs... |
zju3dv/InfiniDepth | https://github.com/zju3dv/InfiniDepth | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | InfiniDepth/model/block/torchhub/dinov3/dinov3/eval/accumulators.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:32.692265 | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This software may be used and distributed in accordance with
# the terms of the DINOv3 License Agreement.
import logging
from collections import defaultdict
from typing import Dict, List, Optional
import torch
from torch import Tensor
from dinov3.distributed i... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/ECS_TASK_PATCHING_AUTOMATION/ecs_task_patching_recovery/ecs_task_patching_recovery_stack.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.643417 | from aws_cdk import (
Stack,
aws_events as events,
aws_events_targets as targets,
aws_lambda as lambda_,
aws_stepfunctions as sfn,
aws_stepfunctions_tasks as tasks,
Duration,
RemovalPolicy,
aws_iam as iam,
)
from constructs import Construct
class EcsTaskPatchingRecoveryStack(Stack):... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/ECS_TASK_PATCHING_AUTOMATION/tests/unit/test_ecs_task_patching_recovery_stack.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.651556 | import aws_cdk as core
import aws_cdk.assertions as assertions
from ecs_task_patching_recovery.ecs_task_patching_recovery_stack import EcsTaskPatchingRecoveryStack
# example tests. To run these tests, uncomment this file along with the example
# resource in ecs_task_patching_recovery/ecs_task_patching_recovery_stack.... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/AWS_EBS_VOLUME_LOST/stepbystep/alexa_skill.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.652118 | import json
import datetime
import urllib.request
import dateutil.parser
import math
import os
WELCOME_MESSAGE = ("Welcome to Production Environment! You can ask me about your production environment status!")
EXIT_SKILL_MESSAGE = "Thank you! Enjoy the rest of your summit!"
HELP_MESSAGE = ("I know stuff about your pr... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/lookup_cloudtrail_events.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.654474 | import datetime
import collections
import boto3
cloudtrail = boto3.client('cloudtrail')
def lambda_handler(event, context):
account_id = event['account_id']
time_discovered = event['time_discovered']
username = event['username']
deleted_key = event['deleted_key']
endtime = datetime.datetime.now()... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/ECS_TASK_PATCHING_AUTOMATION/app.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.660566 | #!/usr/bin/env python3
import os
import aws_cdk as cdk
from ecs_task_patching_recovery.ecs_task_patching_recovery_stack import EcsTaskPatchingRecoveryStack
app = cdk.App()
EcsTaskPatchingRecoveryStack(app, "EcsTaskPatchingRecoveryStack",
# If you don't specify 'env', this stack will be environment-agnostic.
... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/notify_security.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.694732 | import os
import boto3
TOPIC_ARN = os.environ['TOPIC_ARN'] # ARN for SNS topic to post message to
TEMPLATE = '''At {} the IAM access key {} for user {} on account {} was deleted after it was found to have been publicly exposed on the internet.
Below are summaries of the most recent actions, resource names, and resou... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | automated-actions/AWS_RISK_CREDENTIALS_EXPOSED/lambda_functions/delete_access_key_pair.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:36.701387 | import boto3
iam = boto3.client('iam')
def lambda_handler(event, context):
account_id = event['account']
time_discovered = event['time']
details = event['detail']
access_key_id = details['affectedEntities'][0]['entityValue']
print('Looking up username for access key pair...')
username = get_u... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | coralogix-notifier/LambdaFunction.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.255497 | import os
import time
import logging
import json
import urllib.error
from urllib.request import Request, urlopen
CORALOGIX_LOG_URL = os.getenv('CORALOGIX_LOG_URL')
PRIVATE_KEY = os.getenv('PRIVATE_KEY')
APP_NAME = os.getenv('APP_NAME')
SUB_SYSTEM = os.getenv('SUB_SYSTEM')
WARN = 4
TIMEOUT = os.getenv('CORALOGIX_TIMEO... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | high-availability-endpoint/python/main.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.256794 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from health_client import HealthClient, ActiveRegionHasChangedError
import datetime
import logging
logging.basicConfig(level=logging.INFO)
def event_details(event):
# NOTE: It is more ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | chime-notifier/LambdaFunction.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.283750 | # Sample Lambda Function to post notifications to a Chime room when an AWS Health event happens
from __future__ import print_function
import json
import logging
import os
from urllib2 import Request, urlopen, URLError, HTTPError
# Setting up logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# main func... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.288138 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.289305 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | high-availability-endpoint/python/region_lookup.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.298621 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import dns.resolver
class RegionLookupError(Exception):
"""Rasied when there was a problem when looking up the active region"""
pass
def active_region():
qname = 'global.health.amazonaws.com'
try... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | high-availability-endpoint/python/health_client.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.300322 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from region_lookup import active_region
import boto3
class ActiveRegionHasChangedError(Exception):
"""Rasied when the active region has changed"""
pass
class HealthClient:
__active_region = None
... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/boto.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.301222 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.312001 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/complete.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.341704 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/s3.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.846352 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/cli.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.893363 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/setup_replication_rules.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.909833 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/s3control.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.911487 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/aws/iam.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.924218 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.948636 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/replicate.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.951443 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/setup_iam_role.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.960001 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/validate_setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.961501 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/commands/split.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:37.971438 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/output.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.735127 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/types.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.746295 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/constants.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.752664 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/version.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.761034 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/tests/test_kms.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.822752 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/scripts/hatch_build.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.837132 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-replication-script/setupReplication-me-central-1.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.842002 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/tests/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.851829 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-inventory-to-batch-job/s3_batch_replication/manifest.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:38.876381 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/S3-replication-script/test/test_setup_replication.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.296558 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import unittest
from unittest.mock import MagicMock, patch
import sys
import os
import io
from botocore.exceptions import ClientError
sys.path.insert(0, os.path.dirname(os.path.dirname(os.... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-aws-datasync/cleanup_datasync_tasks.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.330633 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-aws-datasync/check_task_status.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.361076 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-aws-datasync/create_datasync_task.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.408313 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-batch-operations/create_batch_copy_jobs.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.436744 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-batch-operations/tests/test_copy_large_objects.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.437219 | """Tests for copy_large_objects.py."""
import os
import sys
import textwrap
import boto3
import pytest
from moto import mock_aws
from unittest.mock import MagicMock, patch, call
from botocore.exceptions import ClientError
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import copy_large_objects as... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-batch-operations/copy_large_objects.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.460225 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-batch-operations/tests/conftest.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.465930 | import argparse
import os
import pytest
@pytest.fixture(autouse=True, scope="session")
def aws_credentials():
"""Set dummy AWS credentials for moto."""
os.environ["AWS_ACCESS_KEY_ID"] = "testing"
os.environ["AWS_SECRET_ACCESS_KEY"] = "testing"
os.environ["AWS_SECURITY_TOKEN"] = "testing"
os.envir... |
aws/aws-health-tools | https://github.com/aws/aws-health-tools | null | null | null | null | 950 | null | null | apache-2.0 | null | null | null | null | null | null | null | misc/s3-cross-region-copy-using-batch-operations/generate_manifest.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:39.477845 | #!/usr/bin/env python3
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# ht... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/skills.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.810763 | import logging
import re
from pathlib import Path
from .utils import expand_sop_paths, load_external_sops
logger = logging.getLogger(__name__)
def generate_anthropic_skills(output_dir: str, sop_paths: str | None = None):
"""Generate Anthropic skills from SOPs"""
output_path = Path(output_dir)
output_pat... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/copy_agent_sops_hook.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.811668 | import shutil
from pathlib import Path
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
# Copy SOPs
sops_source_dir = Path("../agent-sops")
sops_target_dir = Path("strands_agents_... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/cursor.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.820636 | import logging
import re
from pathlib import Path
from .utils import expand_sop_paths, load_external_sops
logger = logging.getLogger(__name__)
def generate_cursor_commands(output_dir: str, sop_paths: str | None = None):
"""Generate Cursor commands from SOPs
Args:
output_dir: Output directory for Cu... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_external_sop_loading.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.831798 | import tempfile
from pathlib import Path
from unittest.mock import MagicMock, patch
from strands_agents_sops.mcp import run_mcp_server
from strands_agents_sops.utils import expand_sop_paths, load_external_sops
class TestPathExpansion:
"""Test path expansion and validation utilities"""
def test_expand_tilde_... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/mcp.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.847185 | import logging
import re
from pathlib import Path
from mcp.server.fastmcp import FastMCP
from .utils import expand_sop_paths, load_external_sops
logger = logging.getLogger(__name__)
def run_mcp_server(sop_paths: str | None = None):
"""Run the MCP server for serving SOPs as prompts
Args:
sop_paths:... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_cursor.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.862389 | import tempfile
from pathlib import Path
from strands_agents_sops.cursor import generate_cursor_commands
def test_generate_cursor_commands():
"""Test cursor commands generation"""
with tempfile.TemporaryDirectory() as temp_dir:
generate_cursor_commands(temp_dir)
# Check that files were creat... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.862947 | import logging
import os
import re
from pathlib import Path
from typing import Any
logger = logging.getLogger(__name__)
def expand_sop_paths(sop_paths_str: str) -> list[Path]:
"""Expand and validate SOP directory paths.
Paths are separated by ``os.pathsep`` (``:`` on Unix, ``;`` on Windows) so
that Wind... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.899204 | from pathlib import Path
from .rules import get_sop_format as get_sop_format
# Load all SOP files as module attributes
_sops_dir = Path(__file__).parent / "sops"
for _md_file in _sops_dir.glob("*.sop.md"):
if _md_file.is_file():
# Convert filename to valid Python identifier
_attr_name = (
... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/rules.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.899663 | from pathlib import Path
def get_sop_format() -> str:
"""Get the agent SOP format rule as a string.
Returns:
Content of the agent-sop-format.md rule file.
"""
rule_file = Path(__file__).parent / "rules" / "agent-sop-format.md"
return rule_file.read_text()
def output_rules():
"""Outp... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/strands_agents_sops/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:41.943796 | import argparse
from .cursor import generate_cursor_commands
from .mcp import run_mcp_server
from .rules import output_rules
from .skills import generate_anthropic_skills
# Registry for command generators: maps type -> (generator_function, default_output_dir)
COMMAND_GENERATORS = {
"cursor": (generate_cursor_comm... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_skills_external_sops.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:42.377200 | import tempfile
from pathlib import Path
from unittest.mock import patch
from strands_agents_sops.skills import generate_anthropic_skills
class TestSkillsCLIIntegration:
"""Test CLI argument parsing for skills subcommand"""
def test_skills_accepts_sop_paths_argument(self):
"""Test that skills subcom... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:42.406852 | from unittest.mock import MagicMock, patch
from strands_agents_sops.utils import expand_sop_paths, load_external_sops
def test_expand_sop_paths_empty():
"""Test expand_sop_paths with empty string"""
result = expand_sop_paths("")
assert result == []
def test_expand_sop_paths_with_empty_parts():
"""T... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_main.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:42.455642 | from unittest.mock import patch
from strands_agents_sops.__main__ import main
@patch("strands_agents_sops.__main__.generate_anthropic_skills")
@patch("sys.argv", ["strands-agents-sops", "skills", "--output-dir", "test-dir"])
def test_main_skills_command(mock_generate):
"""Test main function with skills command""... |
strands-agents/agent-sop | https://github.com/strands-agents/agent-sop | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | python/tests/test_rules.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:42.969000 | from unittest.mock import MagicMock, patch
import pytest
from strands_agents_sops.rules import get_sop_format, output_rules
def test_get_sop_format_file_not_found():
"""Test get_sop_format raises FileNotFoundError when rule file doesn't exist"""
with patch("strands_agents_sops.rules.Path") as mock_path:
... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/evisrag/eval.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.617059 | import os
import re
import sys
import json
import numpy as np
import pandas as pd
from collections import Counter
import string
import time, sys
from tqdm import tqdm
from collections import defaultdict
import csv
import argparse
# from torchmetrics.text.bert import BERTScore
# from transformers import AutoTokenizer
"... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/dataset/data_collator.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.621746 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
from dataclasses import dataclass
from transformers import DefaultDataCollator
def reshape(input_list):
keys = input_list[0].keys()
output_dict = {key: [] for key in keys}
for data in input_list:
for key in keys:
output_dic... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/evisrag/prompt.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.622982 | def evidence_promot_grpo(query):
return f"""You are an AI Visual QA assistant. I will provide you with a question and several images. Please follow the four steps below:
Step 1: Observe the Images
First, analyze the question and consider what types of images may contain relevant information. Then, examine each ima... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/evisrag/predict.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.629048 | import os
os.environ["CUDA_VISIBLE_DEVICES"] = "7"
import sys
import json
from tqdm import tqdm
import re
from PIL import Image
from transformers import AutoProcessor
from vllm import LLM, SamplingParams
from qwen_vl_utils import process_vision_info
import argparse
from prompt import (
evidence_promot_grpo,
evi... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/dataset/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.630113 | # from .beir_dataset import BEIRDataset
from .data_collator import (
MMQPCollator,
)
from .inference_dataset import (
InferenceDataset,
MappingParquetDataset,
MappingTsvDataset,
StreamParquetDataset,
StreamTsvDataset,
)
from .train_dataset import (
MappingMMDRTrainDataset,
StreamMMDRTrai... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/dataset/train_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.643944 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
import glob
import logging
import os
import random
from typing import List
import json
from datasets import load_dataset
from torch.utils.data import Dataset, IterableDataset
from transformers import PreTrainedTokenizer
from ..arguments import DataArgument... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.644482 | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="openmatch-thunlp",
version="0.0.1",
author="Shi Yu",
author_email="yushi17@foxmail.com",
description="An python package for research on Information Retrieval",
long_d... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/arguments.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.646881 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
from dataclasses import dataclass, field
from typing import List, Optional
from transformers import Seq2SeqTrainingArguments, TrainingArguments
@dataclass
class ModelArguments:
model_name_or_path: str = field(
default=None,
metadata... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/dataset/inference_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:45.648125 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
import os
from functools import lru_cache
from typing import Callable, Dict, List, Union
import datasets
from datasets import Dataset, load_dataset
from torch.utils.data import Dataset, IterableDataset
from transformers import AutoProcessor, PreTrainedTok... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/generation_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.231205 | import pandas as pd
import re
import Levenshtein
import editdistance
import sys
import json
import numpy as np
import os
import string
from collections import Counter
from PIL import Image
WORD_NUMBER_MAP = {"zero": 0, "one": 1, "two": 2, "three": 3, "four": 4,
"five": 5, "six": 6, "seven": 7, "ei... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/inference/inference.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.238982 | import logging
import os
import sys
import gc
import glob
import pickle
from contextlib import nullcontext
import numpy as np
import torch
from torch.cuda import amp
from torch.utils.data import DataLoader
from tqdm import tqdm
from transformers import BatchEncoding
from openmatch.arguments import InferenceArguments as... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/driver/eval.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.240224 | import logging
import os
import sys
import glob
import csv
import json
import torch
import pytrec_eval
# from transformers import AutoConfig, AutoTokenizer, HfArgumentParser
from transformers import HfArgumentParser
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../../src')))
... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/driver/train.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.261737 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
import logging
import os
import sys
import json
from transformers import AutoTokenizer, HfArgumentParser, set_seed
from openmatch.arguments import DataArguments
from openmatch.arguments import DRTrainingArguments as TrainingArguments
from openmatch.argum... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/loss.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.277033 | import torch
from torch import Tensor
from torch import distributed as dist
from torch.nn import functional as F
class SimpleContrastiveLoss:
def __init__(self, temperature:float=0.02):
self.temperature = temperature
def __call__(self, x: Tensor, y: Tensor, target: Tensor = None, reduction: str = "mea... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/dense_retrieval_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.277593 | # Adapted from Tevatron (https://github.com/texttron/tevatron)
import json
import logging
import os
from dataclasses import dataclass
from typing import Dict, Optional
import torch
import torch.distributed as dist
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from transformers import (
... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_minicpmv/configuration_minicpm.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:46.328687 | # coding=utf-8
# Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved.
#
# This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX
# and OPT implementations in this library. It has been modified from its
# original forms to accommodate minor architectural differences compared
# to G... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_siglip/image_processing_siglip.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.086775 | # coding=utf-8
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_siglip/processing_siglip.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.090459 | # coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_minicpmv/resampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.091972 | # Copyright (c) Alibaba Cloud.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
from collections import OrderedDict
import math
import requests
from io import BytesIO
from functools import partial
from PIL import Image
from typing import Callable... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_siglip/tokenization_siglip.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.093451 | # coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_siglip/configuration_siglip.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.094666 | # coding=utf-8
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_minicpmv/modeling_minicpmv.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.095909 | import math
from typing import List, Optional
import json
import timm
import torch
import time
import torchvision
from PIL import Image
from timm.data import IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD
from torchvision import transforms
from transformers import LlamaTokenizer
from transformers import BatchEncodin... |
OpenBMB/VisRAG | https://github.com/OpenBMB/VisRAG | null | null | null | null | 949 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/openmatch/modeling/modeling_siglip/modeling_siglip.py | null | null | null | null | null | null | Python | 2026-05-04T02:41:47.097310 | # coding=utf-8
# Copyright 2024 Google AI and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.