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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-BC5CDR/rebuild_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:51.860154 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import json
import re
data_dir=sys.argv[1]
def unify_ent2id(ent2id, method='max'):
id2ent = {}
for k, v in ent2id.items():
if v in id2ent:
if method == 'min':
id2ent[v] = k if le... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/QA-PubMedQA/hard_match_evaluation.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:51.861037 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import json
from sklearn.metrics import accuracy_score
pred_file = sys.argv[1]
gold_file = sys.argv[2]
def do_eval(preds, golden):
print(accuracy_score(golden, preds))
return
def main():
preds = []
with o... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/QA-PubMedQA/postprocess.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:51.862005 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import sys
import re
out_file = sys.argv[1]
prefix = [
'(learned[0-9]+ )+',
'we can conclude that',
'we have that',
'in conclusion,',
]
def strip_prefix(line):
for p in prefix:
res = re.search(p, line)
... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DDI/hard_match_evaluation.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:51.863131 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import re
import json
import sys
import os
pred_file = sys.argv[1]
gold_file = sys.argv[2]
pmids_file = sys.argv[3]
def normalize_name(s: str):
s = s.strip()
# normalize roman type id at end of string
num2roman = {"0": "0", "1": "I... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DTI/hard_match_evaluation.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.486111 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import re
import json
import sys
import os
pred_file = sys.argv[1]
gold_file = sys.argv[2]
pmids_file = sys.argv[3]
def normalize_name(s: str):
s = s.strip()
# normalize roman type id at end of string
num2roman = {"0": "0", "1": "I... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | scripts/average_checkpoints.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.499986 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import collections
import os
... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DDI/rebuild_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.501345 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import json
data_dir=sys.argv[1]
def sort_triples(triples, text):
sorted_triples = sorted(triples, key=lambda x:text.find(x['drug']))
return sorted_triples
def build_target_seq_relis(triples):
answer ... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/text-generation/interactive.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.503072 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
from fairseq.models.transformer_lm import TransformerLanguageModel
parser = argparse.ArgumentParser()
parser.add_argument("--data_dir", type=str, default="../../data/PubMed/data-bin")
parser.add_argument("--model_dir", type=str, ... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DTI/rebuild_data.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.503534 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import json
import re
data_dir=sys.argv[1]
def map_relation_to_verb(relation):
special_mapping = {
"product of": "is the product of",
"negative modulator": "negatively modulates",
"other/unknown"... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DTI/postprocess.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.509476 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import re
import json
out_file = sys.argv[1]
prefix = [
'(learned[0-9]+ )+',
'we can conclude that',
'we have that',
'in conclusion,',
]
def strip_prefix(line):
for p in prefix:
res = re.s... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | inference.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.510081 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import argparse
from src.transformer_lm_prompt import TransformerLanguageModelPrompt
parser = argparse.ArgumentParser()
parser.add_argument("--data_dir", type=str, default='')
parser.add_argument("--model_dir", type=str, default=None)
parser.ad... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | examples/RE-DDI/postprocess.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.539303 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import os
import sys
import re
import json
out_file = sys.argv[1]
prefix = [
'(learned[0-9]+ )+',
'we can conclude that',
'we have that',
'in conclusion,',
]
def strip_prefix(line):
for p in prefix:
res = re.s... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | src/constrained_generator.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.569534 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import math
from typing import Dict, List, Optional
import torch
import torch.nn as nn
from fairseq import search, utils
from fairseq.data import data_utils
from fairseq.models import FairseqIncrementalDecoder
from torch import Tensor
from fairs... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | src/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:52.623371 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from .language_modeling_prompt import *
from .transformer_lm_prompt import *
from .language_model_prompt_dataset import *
from .constrained_generator import * |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | src/language_model_prompt_dataset.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:53.071411 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
import numpy as np
import torch
from fairseq.data import FairseqDataset, data_utils
logger = logging.getLogger(__name__)
def collate(samples, pad_idx, eos_idx, prefix=False, sep_idx=None, prompt=None):
if len(samples) == 0... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | src/transformer_lm_prompt.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:53.115777 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
from dataclasses import dataclass, field
from typing import Optional, Dict, List, Tuple
from argparse import Namespace
import torch
from torch import Tensor
import torch.nn as nn
import torch.nn.functional as F
from fairseq import... |
microsoft/BioGPT | https://github.com/microsoft/BioGPT | null | null | null | null | 4,485 | null | null | mit | null | null | null | null | null | null | null | src/language_modeling_prompt.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:53.145367 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
import os
from dataclasses import dataclass, field
from typing import Optional
import torch
from fairseq import search, utils
from fairseq.data import (
Dictionary,
data_utils,
indexed_dataset,
)
from fairseq.tasks im... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/audit.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.627318 | #!/usr/bin/env python3
"""
Main entry point for ClaudeCode audit tool.
This provides a cleaner interface for running the audit.
"""
from claudecode.github_action_audit import main
if __name__ == "__main__":
main() |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/findings_filter.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.631230 | """Findings filter for reducing false positives in security audit results."""
import re
from typing import Dict, Any, List, Tuple, Optional, Pattern
import time
from dataclasses import dataclass, field
from claudecode.claude_api_client import ClaudeAPIClient
from claudecode.constants import DEFAULT_CLAUDE_MODEL
from ... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/evals/run_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.657790 | #!/usr/bin/env python3
"""CLI for running SAST evaluation on a single PR."""
import argparse
import os
import sys
import json
from pathlib import Path
from typing import Dict, Any, Optional, List
from dataclasses import dataclass, asdict
# Import the minimal required functionality
@dataclass
class EvalCase:
"""... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.678665 | """
ClaudeCode - AI-Powered PR Security Audit Tool
A standalone security audit tool that uses Claude Code for comprehensive
security analysis of GitHub pull requests.
"""
__version__ = "1.0.0"
__author__ = "Anthropic Security Team"
# Import main components for easier access
from claudecode.github_action_audit import... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/evals/eval_engine.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.679945 | """Evaluation engine for running SAST security audits on GitHub PRs."""
import os
import sys
import subprocess
import shutil
import time
import threading
from typing import Dict, Any, Optional, Tuple, List
from dataclasses import dataclass, asdict
from pathlib import Path
from ..json_parser import parse_json_with_fal... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/constants.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.687470 | """
Constants and configuration values for ClaudeCode.
"""
import os
# API Configuration
DEFAULT_CLAUDE_MODEL = os.environ.get('CLAUDE_MODEL') or 'claude-opus-4-1-20250805'
DEFAULT_TIMEOUT_SECONDS = 180 # 3 minutes
DEFAULT_MAX_RETRIES = 3
RATE_LIMIT_BACKOFF_MAX = 30 # Maximum backoff time for rate limits
# Token L... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/github_action_audit.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.688837 | #!/usr/bin/env python3
"""
Simplified PR Security Audit for GitHub Actions
Runs Claude Code security audit on current working directory and outputs findings to stdout
"""
import os
import sys
import json
import subprocess
import requests
from typing import Dict, Any, List, Tuple, Optional
from pathlib import Path
impo... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/evals/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.691349 | """Evaluation tool for SAST."""
from .eval_engine import EvalCase, EvalResult, EvaluationEngine, run_single_evaluation
__all__ = [
'EvalCase',
'EvalResult',
'EvaluationEngine',
'run_single_evaluation',
] |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/claude_api_client.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:55.692455 | """Claude API client for direct Anthropic API calls."""
import os
import json
import time
from typing import Dict, Any, Tuple, Optional
from pathlib import Path
from anthropic import Anthropic
from claudecode.constants import (
DEFAULT_CLAUDE_MODEL, DEFAULT_TIMEOUT_SECONDS, DEFAULT_MAX_RETRIES,
RATE_LIMIT_BA... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/json_parser.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.206238 | #!/usr/bin/env python3
"""Utilities for parsing JSON from text output."""
import json
import re
import logging
# Configure logging
logger = logging.getLogger(__name__)
def extract_json_from_text(text):
"""
Extract JSON object from text, looking in various formats and locations.
Args:
text: ... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/prompts.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.220157 | """Security audit prompt templates."""
def get_security_audit_prompt(pr_data, pr_diff=None, include_diff=True, custom_scan_instructions=None):
"""Generate security audit prompt for Claude Code.
Args:
pr_data: PR data dictionary from GitHub API
pr_diff: Optional complete PR diff in unified ... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/logger.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.261272 | """Logging configuration for ClaudeCode."""
import logging
import sys
import os
def get_logger(name: str) -> logging.Logger:
"""Get a configured logger that outputs to stderr.
Args:
name: The name of the logger (usually __name__)
Returns:
Configured logger instance
"""
... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_claude_runner.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.287529 | #!/usr/bin/env python3
"""
Unit tests for SimpleClaudeRunner.
"""
import json
import os
import subprocess
from unittest.mock import Mock, patch
from pathlib import Path
from claudecode.github_action_audit import SimpleClaudeRunner
from claudecode.constants import DEFAULT_CLAUDE_MODEL
class TestSimpleClaudeRunner:
... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_eval_engine.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.289080 | """Tests for eval_engine module."""
import os
from unittest.mock import Mock, patch
import pytest
import json
from claudecode.evals.eval_engine import (
EvaluationEngine, EvalResult, EvalCase, run_single_evaluation
)
class TestEvalResult:
"""Test the EvalResult dataclass."""
def test_eval_result_cr... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_github_action_audit.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.293369 | #!/usr/bin/env python3
"""
Pytest tests for GitHub Action audit script components.
"""
class TestImports:
"""Test that all required modules can be imported."""
def test_main_module_import(self):
"""Test that the main module can be imported."""
from claudecode import github_action_audit
... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_helper_functions.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.298462 | """Unit tests for helper functions in github_action_audit module."""
import pytest
import os
from unittest.mock import patch, MagicMock
from claudecode.github_action_audit import (
get_environment_config,
initialize_clients,
initialize_findings_filter,
run_security_audit,
apply_findings_filter,
... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_hard_exclusion_rules.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.312865 | """Unit tests for HardExclusionRules in findings_filter module."""
from claudecode.findings_filter import HardExclusionRules
class TestHardExclusionRules:
"""Test the HardExclusionRules class for filtering false positives."""
def test_dos_pattern_exclusion(self):
"""Test exclusion of DOS-related... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_findings_conversion.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.334334 | #!/usr/bin/env python3
"""
Unit tests for findings conversion and edge cases.
"""
import pytest
import json
from claudecode.findings_filter import FindingsFilter, HardExclusionRules
from claudecode.json_parser import parse_json_with_fallbacks, extract_json_from_text
def create_simple_filter():
"""Create a filte... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_github_client.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.353589 | #!/usr/bin/env python3
"""
Unit tests for GitHubActionClient.
"""
import pytest
import os
from unittest.mock import Mock, patch
from claudecode.github_action_audit import GitHubActionClient
class TestGitHubActionClient:
"""Test GitHubActionClient functionality."""
def test_init_requires_token(self):
... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_integration.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.774505 | #!/usr/bin/env python3
"""
Pytest tests for SAST integration components.
"""
import pytest
import json
class TestClaudeCodeAudit:
"""Test the main audit functionality."""
@pytest.fixture
def mock_env(self, monkeypatch):
"""Set up mock environment variables."""
monkeypatch.setenv('GITH... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_json_parser.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.866422 | """Unit tests for the json_parser module."""
import json
from typing import Any, Dict
from claudecode.json_parser import parse_json_with_fallbacks, extract_json_from_text
class TestJsonParser:
"""Test JSON parsing utilities."""
def test_parse_valid_json(self):
"""Test parsing valid JSON string."... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_main_function.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.873379 | #!/usr/bin/env python3
"""
Unit tests for main function and full workflow.
"""
import pytest
import json
import os
from unittest.mock import Mock, patch
from pathlib import Path
from claudecode.github_action_audit import main
class TestMainFunction:
"""Test main function execution flow."""
def test_mai... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_prompts.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.878865 | """Unit tests for the prompts module."""
from claudecode.prompts import get_security_audit_prompt
class TestPrompts:
"""Test prompt generation functions."""
def test_get_security_audit_prompt_basic(self):
"""Test basic security audit prompt generation."""
pr_data = {
"number"... |
anthropics/claude-code-security-review | https://github.com/anthropics/claude-code-security-review | null | null | null | null | 4,481 | null | null | mit | null | null | null | null | null | null | null | claudecode/test_workflow_integration.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:56.895204 | #!/usr/bin/env python3
"""
Integration tests for full ClaudeCode workflow.
"""
import pytest
import json
import os
import tempfile
from unittest.mock import Mock, patch
from pathlib import Path
from claudecode.github_action_audit import main
class TestFullWorkflowIntegration:
"""Test complete workflow scenarios... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | common.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.399276 | import io
import os
from collections import defaultdict
from concurrent.futures import ThreadPoolExecutor, as_completed
from multiprocessing.pool import ThreadPool
from typing import Any, Callable
import jinja2
import numpy as np
import requests
from tqdm import tqdm
from .types import EvalResult, Message, SamplerBas... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | gpqa_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.444841 | """
GPQA: A Graduate-Level Google-Proof Q&A Benchmark
David Rein, Betty Li Hou, Asa Cooper Stickland, Jackson Petty, Richard Yuanzhe Pang, Julien Dirani, Julian Michael, Samuel R. Bowman
https://arxiv.org/abs/2311.12022
"""
import random
import re
import pandas
from . import common
from .common import ANSWER_PATTERN... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | browsecomp_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.467730 | """
BrowseComp: A Simple Yet Challenging Benchmark for Browsing Agents
Authors: Jason Wei, Zhiqing Sun, Spencer Papay, Scott McKinney, Jeffrey Han, Isa Fulford, Hyung Won Chung, Alex Tachard Passos, William Fedus, Mia Glaese
https://openai.com/index/browsecomp/
"""
import base64
import hashlib
import random
import re... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | math_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.469721 | """
Measuring Mathematical Problem Solving With the MATH Dataset
Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, Jacob Steinhardt
https://arxiv.org/abs/2103.03874
"""
import random
import re
from typing import Literal
import pandas
from . import common
from .common impo... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | drop_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.470746 | """
DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs
Dheeru Dua, Yizhong Wang, Pradeep Dasigi, Gabriel Stanovsky, Sameer Singh, Matt Gardner
https://arxiv.org/abs/1903.00161
"""
import gzip
import json
import random
import re
import string
from typing import Any, Dict, List, Optiona... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | healthbench_eval_test.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.472151 | from .healthbench_eval import (
RubricItem,
calculate_length_adjusted_score,
calculate_score,
)
def test_calculate_score():
rubric_items = [
RubricItem(criterion="test", points=7, tags=[]),
RubricItem(criterion="test", points=5, tags=[]),
RubricItem(criterion="test", points=10,... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | healthbench_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.473349 | """
This script evaluates the performance of a model on the HealthBench dataset.
To run HealthBench, HealthBench Consensus, or HealthBench Hard, use the simple-evals script:
- `python -m simple-evals.simple_evals --eval=healthbench --model=gpt-4.1`
- `python -m simple-evals.simple_evals --eval=healthbench_consensus --... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | humaneval_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.540831 | """
HumanEval: Evaluating Large Language Models Trained on Code
Mark Chen and Jerry Tworek and Heewoo Jun and Qiming Yuan and Henrique Ponde de Oliveira Pinto and Jared Kaplan and Harri Edwards and Yuri Burda and Nicholas Joseph and Greg Brockman and Alex Ray and Raul Puri and Gretchen Krueger and Michael Petrov and He... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | healthbench_meta_eval_test.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.558074 | from . import healthbench_meta_eval
def test_compute_agreement_for_rater_by_class():
self_pred_list = [True, False, True]
other_preds_list = [[True, True, False], [True, False], [False]]
cluster_list = ["a", "a", "b"]
model_or_physician = "model"
metrics = healthbench_meta_eval.compute_metrics_for... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | healthbench_meta_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.585623 | """
This script evaluates a grader model on grading HealthBench rubrics. It effectively
evaluates the evaluator against physician opinion, so we call it a meta-evaluation.
To run, use the following command (working directory should contain simple-evals folder):
`python -m simple-evals.simple_evals --eval=healthbench_... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | mgsm_eval.py | null | null | null | null | null | null | Python | 2026-05-04T01:59:59.966219 | """
MGSM: Multilingual Grade School Math Benchmark (MGSM) is a benchmark of grade-school math problems.
Language Models are Multilingual Chain-of-Thought Reasoners
Freda Shi, Mirac Suzgun, Markus Freitag, Xuezhi Wang, Suraj Srivats, Soroush Vosoughi, Hyung Won Chung, Yi Tay, Sebastian Ruder, Denny Zhou, Dipanjan Das, ... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | sampler/claude_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.038018 | import time
import os
import anthropic
from ..types import MessageList, SamplerBase, SamplerResponse
from .. import common
CLAUDE_SYSTEM_MESSAGE_LMSYS = (
"The assistant is Claude, created by Anthropic. The current date is "
"{currentDateTime}. Claude's knowledge base was last updated in "
"August 2023 a... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | run_multilingual_mmlu.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.066297 | import json
import pandas as pd
from . import common
from .mmlu_eval import MMLUEval
from .sampler.chat_completion_sampler import (
OPENAI_SYSTEM_MESSAGE_API,
OPENAI_SYSTEM_MESSAGE_CHATGPT,
ChatCompletionSampler,
)
from .sampler.o_chat_completion_sampler import OChatCompletionSampler
def main():
deb... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | sampler/responses_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.066938 | import os
import time
from typing import Any
import openai
from openai import OpenAI
from ..types import MessageList, SamplerBase, SamplerResponse
class ResponsesSampler(SamplerBase):
"""
Sample from OpenAI's responses API
"""
def __init__(
self,
model: str = "gpt-4.1",
syst... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | sampler/o_chat_completion_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.079711 | import time
from typing import Any
import openai
from openai import OpenAI
from ..types import MessageList, SamplerBase, SamplerResponse
class OChatCompletionSampler(SamplerBase):
"""
Sample from OpenAI's chat completion API for o series models
"""
def __init__(
self,
*,
rea... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | simpleqa_eval.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.139178 | """
SimpleQA: Measuring short-form factuality in large language models
Authors: Jason Wei, Nguyen Karina, Hyung Won Chung, Yunxin Joy Jiao, Spencer Papay, Amelia Glaese, John Schulman, William Fedus
https://cdn.openai.com/papers/simpleqa.pdf
"""
import random
import re
import pandas
from . import common
from .types... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | mmlu_eval.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.141820 | """
Measuring Massive Multitask Language Understanding
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, Jacob Steinhardt
https://arxiv.org/abs/2009.03300
"""
import random
import re
import pandas
from . import common
from .common import (
HTML_JINJA,
MULTILINGUAL_ANSWER_PATTER... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | sampler/chat_completion_sampler.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.149643 | import time
from typing import Any
import openai
from openai import OpenAI
from ..types import MessageList, SamplerBase, SamplerResponse
OPENAI_SYSTEM_MESSAGE_API = "You are a helpful assistant."
OPENAI_SYSTEM_MESSAGE_CHATGPT = (
"You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 arch... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | simple_evals.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.150941 | import argparse
import json
import subprocess
from datetime import datetime
import pandas as pd
from . import common
from .browsecomp_eval import BrowseCompEval
from .drop_eval import DropEval
from .gpqa_eval import GPQAEval
from .healthbench_eval import HealthBenchEval
from .healthbench_meta_eval import HealthBenchM... |
openai/simple-evals | https://github.com/openai/simple-evals | null | null | null | null | 4,472 | null | null | mit | null | null | null | null | null | null | null | types.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:00.179245 | from dataclasses import dataclass, field
from typing import Any, Literal, overload
Message = dict[str, Any] # keys role, content
MessageList = list[Message]
@dataclass
class SamplerResponse:
"""
Response from a sampler.
"""
response_text: str
actual_queried_message_list: MessageList
respons... |
schenkd/nginx-ui | https://github.com/schenkd/nginx-ui | null | null | null | null | 4,467 | null | null | mit | null | null | null | null | null | null | null | config.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:03.651826 | import os
class Config(object):
SECRET_KEY = os.urandom(64).hex()
NGINX_PATH = '/etc/nginx'
CONFIG_PATH = os.path.join(NGINX_PATH, 'conf.d')
@staticmethod
def init_app(app):
pass
class DevConfig(Config):
DEBUG = True
class WorkingConfig(Config):
DEBUG = False
config = {
... |
schenkd/nginx-ui | https://github.com/schenkd/nginx-ui | null | null | null | null | 4,467 | null | null | mit | null | null | null | null | null | null | null | app/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:03.652270 | from flask import Flask
from config import config
from flask_moment import Moment
moment = Moment()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config[config_name])
config[config_name].init_app(app)
moment.init_app(app)
from app.ui import ui as ui_blueprint
ap... |
schenkd/nginx-ui | https://github.com/schenkd/nginx-ui | null | null | null | null | 4,467 | null | null | mit | null | null | null | null | null | null | null | app/api/endpoints.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:03.654369 | import datetime
import io
import os
import flask
from app.api import api
@api.route('/config/<name>', methods=['GET'])
def get_config(name: str):
"""
Reads the file with the corresponding name that was passed.
:param name: Configuration file name
:type name: str
:return: Rendered HTML document... |
schenkd/nginx-ui | https://github.com/schenkd/nginx-ui | null | null | null | null | 4,467 | null | null | mit | null | null | null | null | null | null | null | app/ui/views.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:04.180823 | from app.ui import ui
import flask
import os
@ui.route('/', methods=['GET'])
def index():
"""
Delivers the home page of Nginx UI.
:return: Rendered HTML document.
:rtype: str
"""
nginx_path = flask.current_app.config['NGINX_PATH']
config = [f for f in os.listdir(nginx_path) if os.path.is... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/src/bota/apache_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.882208 | import re
def read_file(path):
with open(path, 'r', encoding="utf-8") as fp:
content = fp.read()
return content
def read_conf():
return read_file("/etc/apache2/sites-available/000-default.conf")
def clean_conf(apache_conf, root_path):
apache_conf = re.sub(r'\n\s.*ProxyPass\s+' + ... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.907329 | from setuptools import setup, find_packages
__author__ = "Chetan Jain <53407137+Chetan11-dev@users.noreply.github.com>"
install_requires = [
"click",
]
def get_description():
try:
with open("README.md", encoding="utf-8") as readme_file:
long_description = readme_file.read()
retu... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/increment_version.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.908714 | import re
def main():
with open("setup.py", "r") as file:
setup_file = file.read()
# Match the version string using a robust pattern
version_match = re.search(r"version=['\"](.*?)['\"]", setup_file)
if version_match:
current_version = version_match.group(1).split(".")
... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus-controls/fix.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.933059 | def update_section_controls(file_path):
start_phrase = "declare class Controls {"
end_phrase = "declare function createControls"
new_start_phrase = "declare class SectionControls {"
with open(file_path, "r") as file:
lines = file.readlines()
# Find start and end indices
... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bot_detection_tests.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.934443 | from botasaurus.browser import browser, Driver
def test_browserscan_bot_detection(driver: Driver):
"""
Tests against BrowserScan's bot detection system.
Visits BrowserScan's bot detection demo page.
"""
print("Running BrowserScan Bot Detection test...")
driver.get("https://www.browsersc... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/src/bota/package_storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.946695 | import os
import json
def get_cache_file_path() -> str:
dr = os.path.abspath(os.path.join(os.path.dirname(__file__), 'package_storage.json'))
return dr
class localStoragePyStorageException(Exception):
pass
class BasicStorageBackend:
def raise_dummy_exception(self):
raise localStora... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/src/bota/vm.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.953181 | import time
import click
import os
import subprocess
import requests
from requests.exceptions import ReadTimeout
import traceback
import re
from .apache_utils import make_apache_content, read_conf, remove_apache_proxy_config
def find_ip(attempts=5, proxy=None) -> str:
"""Finds the public IP address of t... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus-controls/increment_version.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.954606 | import json
import os
def increment_minor_version(version):
major, minor, patch = map(int, version.split("."))
patch += 1
return f"{major}.{minor}.{patch}"
def get_ts_files():
ts_files = []
for root, _, files in os.walk("./src"):
for file in files:
if file.endswith(".ts") and... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | bota/src/bota/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:06.992920 | import os
import subprocess
import sys
import time
import click
from os import path, makedirs
from .package_storage import get_package_storage
from .vm import extractRepositoryName, install_desktop_app_in_vm, install_scraper_in_vm, install_ui_scraper_in_vm, uninstall_desktop_app_in_vm
@click.group(context_s... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/beep_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.512209 | from os import name
def play_beep():
if name == 'nt':
import winsound
winsound.PlaySound("SystemQuestion", winsound.SND_ASYNC)
else:
print('\a')
_is_multiprocessing = None
def is_multiprocessing():
global _is_multiprocessing
if _is_multiprocessing is None:
... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/botasaurus_storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.558019 | import os
import json
def relative_path(path, goback=0):
levels = [".."] * (goback + -1)
return os.path.abspath(os.path.join(os.getcwd(), *levels, path.strip()))
def get_cache_file_path() -> str:
dr = os.path.abspath(os.path.join(os.path.dirname(__file__), 'botasaurus_storage.json'))
return ... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/calc_max_parallel_browsers.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.558553 | class BrowserResourceConfig:
AVERAGE_RICH_MEDIA_SITE = 0.5 # 0.5 GB like omkar.cloud (Most Common)
STATIC_SIMPLE_SITE = 0.3 # 0.3 GB like stackoverflow.com
VIDEO_SITE = 0.8 # 0.8 GB like youtube.com, udemy.com
def calc_max_parallel_browsers(average_ram_per_instance = BrowserResourceConfig.AVERAGE_... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/bt.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.563137 | from .calc_max_parallel_browsers import (
calc_max_parallel_browsers,
BrowserResourceConfig,
)
from .output import (
read_json,
write_json,
read_temp_json,
write_temp_json,
read_csv,
write_csv,
read_temp_csv,
write_temp_csv,
read_html,
write_html,
read_... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/browser_decorator.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.580390 | from functools import wraps
from traceback import print_exc, format_exc
from datetime import timedelta
from typing import Any, Callable, Optional, Union, List
from botasaurus.decorators_common import evaluate_proxy, print_running, write_output, IS_PRODUCTION, AsyncQueueResult, AsyncResult, run_parallel, save_error... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/cache.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.582370 | import json
import os
from hashlib import md5
from shutil import rmtree
from json.decoder import JSONDecodeError
from .output import get_output_directory, get_output_path
from .decorators_utils import create_directory_if_not_exists
from .utils import read_json, relative_path, write_json as format_write_json
fro... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/browser.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.583210 | from.browser_decorator import browser,AsyncQueueResult, NotFoundException
from botasaurus_driver.driver import Driver,Wait,IframeElement
from botasaurus_driver.exceptions import DriverException,GoogleCookieConsentException,IframeNotFoundException,ElementWithTextNotFoundException,ElementWithSelectorNotFoundException... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/cl.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.599792 | import json
from typing import List
def snakecase(string: str, keep_together: List[str] = None) -> str:
"""Convert a string into snake_case.
Args:
string (:obj:`str`):
The string to convert to snake_case.
keep_together (:obj:`List[str]`, `optional`):
(Upper) c... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/cache_storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:07.624804 | from datetime import timedelta
from typing import Any, Optional, Dict
from .cache import (
Cache, _get_cache_path, _has, _get, CacheMissException
)
class FileCacheStorage:
"""File-based cache storage using existing cache.py helpers."""
@staticmethod
def get(func_name: str, key_data, expires_in: Op... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/config.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.017815 | # BROWSER CONFIGS
block_images_config = {
"block_images": True,
}
block_images_and_css_config = {
"block_images_and_css": True,
}
headless_config = {
"headless": True,
}
reuse_driver_config = {
"reuse_driver": True,
}
## MAJOR CONFIGS
production_config = {
"raise_exception":... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/create_request.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.131120 | from botasaurus_requests.request_class import Request
def create_request(proxy=None, user_agent=None):
reqs = Request(
proxy,
user_agent
)
if proxy is not None:
reqs.proxy = proxy
return reqs
|
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/decorators_common.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.170834 | import os
from shutil import rmtree
from .env import IS_VM_OR_DOCKER
from .env import IS_PRODUCTION as _IS_PRODUCTION
from .utils import write_file
from .formats import Formats
from .output import fix_excel_filename, write_excel, write_json, write_csv, fix_csv_filename, fix_json_filename
from .decorators_u... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/decorators_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.204973 | import os
def relative_path(path, goback=0):
levels = [".."] * (goback + -1)
return os.path.abspath(os.path.join(os.getcwd(), *levels, path.strip()))
def create_directory_if_not_exists(passed_path):
dir_path = relative_path(passed_path)
try:
if not os.path.exists(dir_path):
... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/decorator_helpers.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.206214 | from typing import Callable, Optional
from functools import wraps
import traceback
from time import sleep, time
from datetime import timedelta
from .utils import is_errors_instance
from .cache import Cache, _get,CacheMissException, _has, _get_cache_path, _create_cache_directory_if_not_exists
from .cache_storage import... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/formats.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.217628 | class Formats:
JSON = 'JSON'
EXCEL = 'EXCEL'
CSV = 'CSV'
JSON_AND_EXCEL = ['JSON', 'EXCEL']
JSON_AND_CSV = ['JSON', 'CSV']
|
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/device.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.219565 | from botasaurus_driver.user_agent import UserAgent
from botasaurus_driver.window_size import WindowSize |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/dontcache.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.220717 | class DontCache:
def __init__(self, result):
self.data = result
def is_dont_cache(obj):
return isinstance(obj, DontCache) |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/env.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.234140 | from os import path, environ, name
IS_IN_KUBERNETES = 'KUBERNETES_SERVICE_HOST' in environ
def _is_docker():
is_windows = name == 'nt'
# Early exit
if is_windows:
return False
from sys import platform
is_mac = platform == "darwin"
# Early exit
if is_ma... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/ip_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.235302 | import requests
from requests.exceptions import ReadTimeout
import traceback
from .botasaurus_storage import get_botasaurus_storage
def _create_proxy_dict(proxy_url: str) -> dict:
"""Converts a proxy URL string into a dictionary for the requests library."""
return {"http": proxy_url, "https": proxy_ur... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/links.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.749950 | from random import shuffle
import functools
from urllib.parse import urlparse, urlunparse
from typing import Union, List
from .output import write_json
from .request_decorator import request
default_request_options = {
# "use_stealth": True,
"raise_exception": True,
"create_error_logs": False,
"close_o... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/list_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.784270 | def iterflatten(array, depth=-1):
"""Iteratively flatten a list shallowly or deeply."""
for item in array:
if isinstance(item, (list, tuple)) and depth != 0:
for subitem in iterflatten(item, depth - 1):
yield subitem
else:
yield item
def flatten_... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/local_storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.794632 | import os
import json
from .utils import relative_path
class localStoragePyStorageException(Exception):
pass
class BasicStorageBackend:
def raise_dummy_exception(self):
raise localStoragePyStorageException("Called dummy backend!")
def get_item(self, item: str, default:any = None) -> ... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/sitemap.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.839957 | from typing import List
import traceback
# Import Filters, Extractors are imported from Sitemaps
from .links import _Base,Filters, Extractors, apply_filters_maps_sorts_randomize, extract_link_upto_nth_segment
from botasaurus.dontcache import is_dont_cache
from .cache import DontCache
from .list_utils import flatt... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/request.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.844573 | from .request_decorator import request, NotFoundException
from .create_request import create_request
from botasaurus_requests.request_class import Request
|
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/sitemap_parser_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.846116 | import re
from urllib.parse import urlparse, unquote_plus, urlunparse
from gzip import decompress
from bs4 import BeautifulSoup
# Import Filters, Extractors are imported from Sitemaps
from .links import extract_link_upto_nth_segment
from .cl import join_link
class GunzipException(Exception):
"""
gunzip() exce... |
omkarcloud/botasaurus | https://github.com/omkarcloud/botasaurus | null | null | null | null | 4,461 | null | null | mit | null | null | null | null | null | null | null | botasaurus/output.py | null | null | null | null | null | null | Python | 2026-05-04T02:00:08.858900 | from json import dumps
from .decorators_utils import create_directory_if_not_exists
from .utils import (
read_file as _read_file,
relative_path,
write_json as _write_json,
read_json as _read_json,
write_html as _write_html,
write_file as _write_file,
)
from .beep_utils import prompt
i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.