id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
324,300
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/linkml/linkml_config.py
src.aurelian.agents.linkml.linkml_config.LinkMLDependencies
from typing import List, Optional from dataclasses import dataclass, field from aurelian.dependencies.workdir import HasWorkdir, WorkDir from pydantic_ai import AgentRunError @dataclass class LinkMLDependencies(HasWorkdir): """Configuration for the LinkML agent.""" workdir: Optional[WorkDir] = None def __...
@dataclass class LinkMLDependencies(HasWorkdir): '''Configuration for the LinkML agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass def parse_objects_from_file(self, data_file: str) -> List[dict]: ''' Parse objects from a file in the wo...
4
3
10
1
5
5
2
0.91
1
3
1
0
2
0
2
22
25
4
11
6
7
10
11
6
7
2
5
1
4
324,301
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/linkml/linkml_evals.py
src.aurelian.agents.linkml.linkml_evals.LinkMLMetadata
from typing import Optional, Any, Dict, Callable, Awaitable class LinkMLMetadata(Dict[str, Any]): """Simple metadata dictionary for LinkML evaluations.""" pass
class LinkMLMetadata(Dict[str, Any]): '''Simple metadata dictionary for LinkML evaluations.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
0
3
0
2
1
1
1
2
1
1
0
1
0
0
324,302
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/linkml/linkml_tools.py
src.aurelian.agents.linkml.linkml_tools.LinkMLError
from pydantic_ai import RunContext, ModelRetry class LinkMLError(ModelRetry): pass
class LinkMLError(ModelRetry): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
324,303
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/linkml/linkml_tools.py
src.aurelian.agents.linkml.linkml_tools.SchemaValidationError
class SchemaValidationError(LinkMLError): """Base exception for all schema validation errors.""" def __init__(self, message='Schema validation failed', details=None): self.details = details or {} super().__init__(message)
class SchemaValidationError(LinkMLError): '''Base exception for all schema validation errors.''' def __init__(self, message='Schema validation failed', details=None): pass
2
1
3
0
3
0
1
0.25
1
1
0
0
1
1
1
1
5
0
4
3
2
1
4
3
2
1
2
0
1
324,304
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/linkml/linkml_tools.py
src.aurelian.agents.linkml.linkml_tools.ValidationResult
from typing import Optional from pydantic import BaseModel class ValidationResult(BaseModel): valid: bool info_messages: Optional[list[str]] = None
class ValidationResult(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
3
0
3
2
2
0
3
2
2
0
5
0
0
324,305
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/literature/literature_config.py
src.aurelian.agents.literature.literature_config.LiteratureDependencies
from aurelian.dependencies.workdir import HasWorkdir, WorkDir from dataclasses import dataclass @dataclass class LiteratureDependencies(HasWorkdir): """ Configuration for the literature agent. """ max_results: int = 10 def __post_init__(self): """Initialize the config with default values."...
@dataclass class LiteratureDependencies(HasWorkdir): ''' Configuration for the literature agent. ''' def __post_init__(self): '''Initialize the config with default values.''' pass
3
2
5
0
3
2
2
1
1
1
1
0
1
1
1
21
11
1
5
4
3
5
5
4
3
2
5
1
2
324,306
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/monarch/monarch_config.py
src.aurelian.agents.monarch.monarch_config.MonarchDependencies
from dataclasses import dataclass, field from oaklib import get_adapter from oaklib.interfaces import OboGraphInterface from aurelian.dependencies.workdir import HasWorkdir, WorkDir @dataclass class MonarchDependencies(HasWorkdir): """Configuration for the Monarch agent.""" taxon: str = '9606' def __post_...
@dataclass class MonarchDependencies(HasWorkdir): '''Configuration for the Monarch agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass def get_monarch_adapter(self) -> OboGraphInterface: '''Get a configured Monarch adapter.''' pass ...
5
4
4
0
2
1
1
0.67
1
1
1
0
3
1
3
23
19
4
9
6
5
6
9
6
5
2
5
1
4
324,307
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/oak/oak_config.py
src.aurelian.agents.oak.oak_config.OakDependencies
from aurelian.dependencies.workdir import HasWorkdir, WorkDir class OakDependencies(HasWorkdir): """ OAK agent dependencies that include a working directory. This allows the agent to maintain state and access files on the local filesystem. """ pass
class OakDependencies(HasWorkdir): ''' OAK agent dependencies that include a working directory. This allows the agent to maintain state and access files on the local filesystem. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
20
7
1
2
1
1
4
2
1
1
0
5
0
0
324,308
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/ontology_mapper/ontology_mapper_config.py
src.aurelian.agents.ontology_mapper.ontology_mapper_config.OntologyMapperDependencies
from typing import List, Optional from dataclasses import dataclass, field from aurelian.dependencies.workdir import HasWorkdir, WorkDir @dataclass class OntologyMapperDependencies(HasWorkdir): """ Configuration for the ontology mapper agent. We include a default set of ontologies because the initial text...
@dataclass class OntologyMapperDependencies(HasWorkdir): ''' Configuration for the ontology mapper agent. We include a default set of ontologies because the initial text embedding index is slow.. this can easily be changed e.g. in command line ''' def __post_init__(self): '''Initialize ...
3
2
5
0
3
2
2
0.88
1
1
1
0
1
1
1
21
17
2
8
5
6
7
6
5
4
2
5
1
2
324,309
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/ontology_mapper/ontology_mapper_evals.py
src.aurelian.agents.ontology_mapper.ontology_mapper_evals.OntologyMapperMetadata
from typing import Optional, Any, Dict, Callable, Awaitable class OntologyMapperMetadata(Dict[str, Any]): """Simple metadata dictionary for Ontology Mapper evaluations.""" pass
class OntologyMapperMetadata(Dict[str, Any]): '''Simple metadata dictionary for Ontology Mapper evaluations.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
0
3
0
2
1
1
1
2
1
1
0
1
0
0
324,310
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/paperqa/paperqa_config.py
src.aurelian.agents.paperqa.paperqa_config.PaperQADependencies
from dataclasses import dataclass, field from typing import Optional, List import os from paperqa import Settings as PQASettings from aurelian.dependencies.workdir import HasWorkdir, WorkDir from paperqa.settings import AnswerSettings, ParsingSettings, PromptSettings, AgentSettings, IndexSettings, Settings @dataclass ...
@dataclass class PaperQADependencies(HasWorkdir): '''Configuration for the PaperQA agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass def set_paperqa_settings(self) -> PQASettings: ''' Convert to PaperQA Settings object. This al...
4
3
19
2
14
3
2
0.09
1
1
1
0
2
0
2
22
97
12
78
16
75
7
19
16
16
2
5
1
3
324,311
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/phenopackets/phenopackets_config.py
src.aurelian.agents.phenopackets.phenopackets_config.PhenopacketsDependencies
from dataclasses import dataclass, field from linkml_store.api import Collection from aurelian.dependencies.workdir import HasWorkdir, WorkDir from linkml_store import Client from typing import Optional @dataclass class PhenopacketsDependencies(HasWorkdir): """ Configuration for the phenopackets agent. """...
@dataclass class PhenopacketsDependencies(HasWorkdir): ''' Configuration for the phenopackets agent. ''' def __post_init__(self): '''Initialize the config with default values.''' pass @property def collection(self) -> Collection: ''' Get the phenopackets collecti...
5
3
10
1
6
4
2
0.56
1
1
1
0
2
1
2
22
31
3
18
12
14
10
17
11
14
2
5
1
4
324,312
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/phenopackets/phenopackets_evals.py
src.aurelian.agents.phenopackets.phenopackets_evals.PhenopacketsMetadata
from typing import Optional, Any, Dict, Callable, Awaitable class PhenopacketsMetadata(Dict[str, Any]): """Simple metadata dictionary for Phenopackets evaluations.""" pass
class PhenopacketsMetadata(Dict[str, Any]): '''Simple metadata dictionary for Phenopackets evaluations.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
0
3
0
2
1
1
1
2
1
1
0
1
0
0
324,313
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/rag/rag_config.py
src.aurelian.agents.rag.rag_config.RagDependencies
from linkml_store.api import Collection from dataclasses import dataclass, field from aurelian.dependencies.workdir import HasWorkdir, WorkDir from . import COLLECTION_NAME from linkml_store import Client from typing import Optional @dataclass class RagDependencies: """Configuration for the RAG agent.""" db_pa...
@dataclass class RagDependencies: '''Configuration for the RAG agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass @property def collection(self) -> Collection: '''Get the database collection, initializing it if needed.''' pass
5
3
7
0
6
1
2
0.26
0
1
1
0
2
0
2
2
28
4
19
12
15
5
18
11
15
2
0
1
4
324,314
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/robot_ontology/robot_ontology_config.py
src.aurelian.agents.robot_ontology.robot_ontology_config.RobotDependencies
from dataclasses import field, dataclass from aurelian.dependencies.workdir import WorkDir, HasWorkdir from typing import Dict, Optional @dataclass class RobotDependencies(HasWorkdir): """Configuration for the ROBOT ontology agent.""" workdir: Optional[WorkDir] = None prefix_map: Dict[str, str] = field(def...
@dataclass class RobotDependencies(HasWorkdir): '''Configuration for the ROBOT ontology agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass
3
2
5
0
3
2
2
0.43
1
1
1
0
1
0
1
21
11
1
7
4
5
3
6
4
4
2
5
1
2
324,315
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/schema_generator/schema_generator_config.py
src.aurelian.agents.schema_generator.schema_generator_config.SchemaGeneratorDependencies
from typing import Optional, Dict from dataclasses import dataclass, field from aurelian.dependencies.workdir import HasWorkdir, WorkDir @dataclass class SchemaGeneratorDependencies(HasWorkdir): """Dependencies for sophisticated schema generation. Uses dependency injection pattern - LinkML dependencies are in...
@dataclass class SchemaGeneratorDependencies(HasWorkdir): '''Dependencies for sophisticated schema generation. Uses dependency injection pattern - LinkML dependencies are injected when needed. ''' pass
2
1
0
0
0
0
0
0.12
1
1
1
0
0
0
0
20
32
3
26
6
25
3
6
6
5
0
5
0
0
324,316
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/talisman/talisman_config.py
src.aurelian.agents.talisman.talisman_config.TalismanConfig
from typing import Any, Dict, Optional from aurelian.dependencies.workdir import HasWorkdir, WorkDir from dataclasses import dataclass, field import os from bioservices import UniProt from bioservices.eutils import EUtils as NCBI @dataclass class TalismanConfig(HasWorkdir): """Configuration for the Talisman agent....
@dataclass class TalismanConfig(HasWorkdir): '''Configuration for the Talisman agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass def get_uniprot_client(self) -> UniProt: '''Get a configured UniProt client.''' pass def get_ncbi_cli...
5
4
8
1
5
2
2
0.58
1
1
1
0
3
1
3
23
40
10
19
10
14
11
19
10
14
5
5
1
7
324,317
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/talisman/talisman_tools.py
src.aurelian.agents.talisman.talisman_tools.FunctionalTerm
from typing import Dict, List, Optional, Tuple, Any from pydantic import BaseModel, Field class FunctionalTerm(BaseModel): """A functional term associated with genes.""" term: str = Field(..., description='The biological term or concept') genes: List[str] = Field(..., description='List of genes associated ...
class FunctionalTerm(BaseModel): '''A functional term associated with genes.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
82
5
0
4
4
3
1
4
4
3
0
5
0
0
324,318
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/talisman/talisman_tools.py
src.aurelian.agents.talisman.talisman_tools.GeneSetAnalysis
from pydantic import BaseModel, Field from typing import Dict, List, Optional, Tuple, Any class GeneSetAnalysis(BaseModel): """Complete analysis of a gene set.""" input_species: str = Field(default='', description='The species provided by the user') inferred_species: str = Field(default='', description='Th...
class GeneSetAnalysis(BaseModel): '''Complete analysis of a gene set.''' pass
1
1
0
0
0
0
0
0.11
1
0
0
0
0
0
0
82
10
0
9
6
8
1
6
6
5
0
5
0
0
324,319
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/talisman/talisman_tools.py
src.aurelian.agents.talisman.talisman_tools.GeneSummary
from pydantic import BaseModel, Field class GeneSummary(BaseModel): """Summary information for a gene.""" id: str = Field(..., description='The gene identifier (Gene Symbol)') annotation: str = Field(..., description='Genomic coordinates or accession with position') genomic_context: str = Field(..., de...
class GeneSummary(BaseModel): '''Summary information for a gene.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
7
0
6
5
5
1
6
5
5
0
5
0
0
324,320
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/talisman/talisman_tools.py
src.aurelian.agents.talisman.talisman_tools.RateLimiter
import threading import time class RateLimiter: """Simple rate limiter to ensure we don't exceed API rate limits.""" def __init__(self, max_calls: int=3, period: float=1.0): """ Initialize the rate limiter. Args: max_calls: Maximum number of calls allowed in the period ...
class RateLimiter: '''Simple rate limiter to ensure we don't exceed API rate limits.''' def __init__(self, max_calls: int=3, period: float=1.0): ''' Initialize the rate limiter. Args: max_calls: Maximum number of calls allowed in the period period: Time period i...
3
3
17
2
8
7
2
0.88
0
2
0
0
2
4
2
2
38
6
17
10
14
15
17
10
14
3
0
3
4
324,321
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/ubergraph/ubergraph_config.py
src.aurelian.agents.ubergraph.ubergraph_config.Dependencies
from aurelian.dependencies.workdir import HasWorkdir, WorkDir from typing import Dict, Optional from dataclasses import dataclass, field @dataclass class Dependencies(HasWorkdir): """Configuration for the UberGraph agent.""" endpoint: str = UBERGRAPH_ENDPOINT prefixes: Dict[str, str] = field(default_factor...
@dataclass class Dependencies(HasWorkdir): '''Configuration for the UberGraph agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass
3
2
5
0
3
2
2
0.86
1
1
1
0
1
1
1
21
17
4
7
6
5
6
7
6
5
2
5
1
2
324,322
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/ubergraph/ubergraph_tools.py
src.aurelian.agents.ubergraph.ubergraph_tools.QueryResults
from pydantic import BaseModel from typing import Any, Dict, List, Optional class QueryResults(BaseModel): """Results of a SPARQL query.""" results: List[Dict] = []
class QueryResults(BaseModel): '''Results of a SPARQL query.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
82
3
0
2
2
1
1
2
2
1
0
5
0
0
324,323
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/uniprot/uniprot_config.py
src.aurelian.agents.uniprot.uniprot_config.UniprotConfig
from bioservices import UniProt from dataclasses import dataclass, field from aurelian.dependencies.workdir import HasWorkdir, WorkDir from typing import Any, Dict, Optional @dataclass class UniprotConfig(HasWorkdir): """Configuration for the UniProt agent.""" uniprot_client_options: Dict[str, Any] = field(def...
@dataclass class UniprotConfig(HasWorkdir): '''Configuration for the UniProt agent.''' def __post_init__(self): '''Initialize the config with default values.''' pass def get_uniprot_client(self) -> UniProt: '''Get a configured UniProt client.''' pass
4
3
6
1
4
2
2
0.67
1
1
1
0
2
1
2
22
19
4
9
5
6
6
9
5
6
3
5
1
4
324,324
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/uniprot/uniprot_evals.py
src.aurelian.agents.uniprot.uniprot_evals.UniprotMetadata
from typing import Optional, Any, Dict, Callable, Awaitable class UniprotMetadata(Dict[str, Any]): """Simple metadata dictionary for UniProt evaluations.""" pass
class UniprotMetadata(Dict[str, Any]): '''Simple metadata dictionary for UniProt evaluations.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
0
3
0
2
1
1
1
2
1
1
0
1
0
0
324,325
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/web/web_config.py
src.aurelian.agents.web.web_config.WebDependencies
from aurelian.dependencies.workdir import HasWorkdir, WorkDir class WebDependencies(HasWorkdir): """ Web agent dependencies that include a working directory. This allows the agent to maintain state and access files on the local filesystem. """ pass
class WebDependencies(HasWorkdir): ''' Web agent dependencies that include a working directory. This allows the agent to maintain state and access files on the local filesystem. ''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
20
7
1
2
1
1
4
2
1
1
0
5
0
0
324,326
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/web/web_tools.py
src.aurelian.agents.web.web_tools.Citation
from pydantic import BaseModel, Field from typing import List, Optional class Citation(BaseModel): """Citation model for query results with citations.""" citation_number: str = Field(description='Citation number or identifier') url: str = Field(description='URL source of the citation') timestamp: Optio...
class Citation(BaseModel): '''Citation model for query results with citations.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
8
1
6
4
5
1
4
4
3
0
5
0
0
324,327
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/agents/web/web_tools.py
src.aurelian.agents.web.web_tools.ResultWithCitations
from pydantic import BaseModel, Field from typing import List, Optional class ResultWithCitations(BaseModel): """Generic result model for queries that return content with citations.""" content: str = Field(description='Content of the response') citations: List[Citation] = Field(default_factory=list, descri...
class ResultWithCitations(BaseModel): '''Generic result model for queries that return content with citations.''' pass
1
1
0
0
0
0
0
0.2
1
0
0
0
0
0
0
82
7
1
5
3
4
1
3
3
2
0
5
0
0
324,328
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/dependencies/workdir.py
src.aurelian.dependencies.workdir.HasWorkdir
from abc import ABC from dataclasses import dataclass, field @dataclass class HasWorkdir(ABC): workdir: WorkDir = field(default_factory=lambda: WorkDir())
@dataclass class HasWorkdir(ABC): pass
2
0
0
0
0
0
0
0
1
1
1
27
0
0
0
20
2
0
2
2
1
0
2
2
1
0
4
0
0
324,329
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/dependencies/workdir.py
src.aurelian.dependencies.workdir.WorkDir
from typing import List from dataclasses import dataclass, field import tempfile from pathlib import Path @dataclass class WorkDir: """ Class to handle working directory operations. Example: >>> wd = WorkDir.create_temporary_workdir() >>> wd.check_file_exists("test.txt") False ...
@dataclass class WorkDir: ''' Class to handle working directory operations. Example: >>> wd = WorkDir.create_temporary_workdir() >>> wd.check_file_exists("test.txt") False >>> wd.write_file("test.txt", "Hello, world!") >>> wd.check_file_exists("test.txt") True...
12
2
4
0
3
1
1
0.53
0
3
0
0
8
0
9
9
66
14
34
16
23
18
33
13
23
1
0
1
9
324,330
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/mcp/config_generator.py
src.aurelian.mcp.config_generator.MCPConfigGenerator
from pathlib import Path import os from typing import Dict, Optional, Any import json class MCPConfigGenerator: """Generator for MCP server configuration.""" def __init__(self, base_dir: Optional[str]=None): """ Initialize the MCP config generator. Args: base_dir: Base dir...
class MCPConfigGenerator: '''Generator for MCP server configuration.''' def __init__(self, base_dir: Optional[str]=None): ''' Initialize the MCP config generator. Args: base_dir: Base directory for resolving relative paths (defaults to current working directory) '''...
4
4
26
4
14
8
3
0.6
0
3
0
0
3
1
3
3
83
16
42
15
38
25
28
14
24
8
0
3
10
324,331
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/tools/web/url_download.py
src.aurelian.tools.web.url_download.URLDownloadResult
from typing_extensions import TypedDict class URLDownloadResult(TypedDict): """The result of downloading a URL.""" size: int 'The size of the downloaded content.' location: str 'The location of the downloaded content.'
class URLDownloadResult(TypedDict): '''The result of downloading a URL.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
0
7
1
3
1
2
3
3
1
2
0
1
0
0
324,332
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/tools/web/url_download.py
src.aurelian.tools.web.url_download.URLDownloadTool
from dataclasses import dataclass from aurelian.dependencies.workdir import WorkDir @dataclass class URLDownloadTool: """A tool for downloading a URL.""" workdir: WorkDir async def __call__(self, url: str, local_file_name: str) -> list[dict]: """Download the contents of a URL. Args: ...
@dataclass class URLDownloadTool: '''A tool for downloading a URL.''' async def __call__(self, url: str, local_file_name: str) -> list[dict]: '''Download the contents of a URL. Args: url: URL of the web page local_file_name: Name of the local file to save Returns...
3
2
15
2
6
7
1
1
0
3
0
0
1
0
1
1
19
3
8
5
4
8
8
5
4
1
0
0
1
324,333
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/utils/documentation_manager.py
src.aurelian.utils.documentation_manager.Document
from typing import Dict, Optional, List from pydantic import BaseModel class Document(BaseModel): """ A document is a file in the documentation directory. """ id: str title: str path: str metadata: Optional[Dict] = None
class Document(BaseModel): ''' A document is a file in the documentation directory. ''' pass
1
1
0
0
0
0
0
0.6
1
0
0
0
0
0
0
82
8
0
5
2
4
3
5
2
4
0
5
0
0
324,334
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/utils/documentation_manager.py
src.aurelian.utils.documentation_manager.DocumentationManager
from pathlib import Path from typing import Dict, Optional, List from dataclasses import dataclass @dataclass class DocumentationManager: """ A manager for the documentation directory. """ documents_dir: Path collection_name: Optional[str] = None def all_documents(self) -> List[Document]: ...
@dataclass class DocumentationManager: ''' A manager for the documentation directory. ''' def all_documents(self) -> List[Document]: ''' Get all available documents. ''' pass def get_documents_for_prompt(self, extra_text: str='') -> str: ''' Get the ...
5
4
11
1
7
4
2
0.61
0
4
1
0
3
0
3
3
43
6
23
8
19
14
18
8
14
3
0
2
6
324,335
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/utils/doi_fetcher.py
src.aurelian.utils.doi_fetcher.DOIFetcher
import requests import re from bs4 import BeautifulSoup import logfire import requests_cache from markitdown import MarkItDown import os from tempfile import NamedTemporaryFile from typing import Any, Dict, List, Optional class DOIFetcher: """Fetch metadata and full text for a DOI using various APIs.""" def _...
class DOIFetcher: '''Fetch metadata and full text for a DOI using various APIs.''' def __init__(self, email: Optional[str]=None, url_prefixes: Optional[List[str]]=None): '''Initialize the DOI fetcher with a contact email (required by some APIs). Args: email (str): Contact email for...
8
8
29
4
14
12
4
0.86
0
5
1
0
7
3
7
7
213
35
96
40
88
83
92
36
84
10
0
5
28
324,336
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/utils/doi_fetcher.py
src.aurelian.utils.doi_fetcher.FullTextInfo
from typing import Any, Dict, List, Optional from openai import BaseModel from pydantic import Field class FullTextInfo(BaseModel): """Data model for full text information.""" success: bool = True abstract: Optional[str] = Field(None, description='Abstract of the article') text: Optional[str] = Field(N...
class FullTextInfo(BaseModel): '''Data model for full text information.''' pass
1
1
0
0
0
0
0
0.14
1
0
0
0
0
0
0
8
9
1
7
7
6
1
7
7
6
0
2
0
0
324,337
monarch-initiative/aurelian
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/monarch-initiative_aurelian/src/aurelian/evaluators/substring_evaluator.py
substring_evaluator.SubstringEvaluator
from pydantic_evals.evaluators import Evaluator, EvaluatorContext class SubstringEvaluator(Evaluator[str, str]): """ Custom evaluator for GO-CAM agent responses. This evaluator checks if the expected substring is present in the agent's response. If no expected output is specified, it assumes the test ...
class SubstringEvaluator(Evaluator[str, str]): ''' Custom evaluator for GO-CAM agent responses. This evaluator checks if the expected substring is present in the agent's response. If no expected output is specified, it assumes the test passes (for cases where we only want to verify the agent doesn'...
2
2
18
3
6
9
3
2.14
1
2
0
0
1
0
1
1
27
5
7
2
5
15
7
2
5
3
1
1
3
324,338
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/commands/command_handlers.py
WentUrc_astrbot_plugin_turnrig.commands.command_handlers.CommandHandlers
from ..utils.session_formatter import normalize_session_id from astrbot.api.event import AstrMessageEvent from astrbot.api import logger import time class CommandHandlers: """ 命令处理器喵~ 🎯 专门负责处理各种TurnRig插件命令的可爱小助手! ฅ(^•ω•^ฅ 这个处理器会帮你: - 🔧 解析和验证命令参数 - ✅ 检查管理员权限 - 📋 管理任务的增删改查 - 👂 处理监听和转...
class CommandHandlers: ''' 命令处理器喵~ 🎯 专门负责处理各种TurnRig插件命令的可爱小助手! ฅ(^•ω•^ฅ 这个处理器会帮你: - 🔧 解析和验证命令参数 - ✅ 检查管理员权限 - 📋 管理任务的增删改查 - 👂 处理监听和转发配置 - 🧹 清理过期数据 Note: 所有的命令都会经过精心处理,确保安全执行喵! 💫 ''' def __init__(self, plugin_instance): ''' 初始化命令处理器喵~ 🎮 ...
39
39
38
7
22
9
5
0.42
0
5
0
0
38
1
38
38
1,493
287
848
242
727
360
518
160
479
12
0
3
173
324,339
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/config/config_manager.py
WentUrc_astrbot_plugin_turnrig.config.config_manager.ConfigManager
from astrbot.api import logger import json import os class ConfigManager: """ 配置管理器喵~ 负责管理插件配置和消息缓存的可爱小助手! ฅ(^•ω•^ฅ """ def __init__(self, data_dir): """ 初始化配置管理器喵! Args: data_dir: 数据存储目录喵~ """ self.data_dir = data_dir self.config_path =...
class ConfigManager: ''' 配置管理器喵~ 负责管理插件配置和消息缓存的可爱小助手! ฅ(^•ω•^ฅ ''' def __init__(self, data_dir): ''' 初始化配置管理器喵! Args: data_dir: 数据存储目录喵~ ''' pass def load_config(self): ''' 从文件加载配置喵~ 把保存的配置文件读取出来! ✨ Returns: ...
6
6
28
3
15
10
3
0.73
0
4
0
0
5
3
5
5
152
22
77
28
70
56
65
20
58
6
0
4
17
324,340
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/main.py
WentUrc_astrbot_plugin_turnrig.main.TurnRigPlugin
from astrbot.api import logger import time from .config.config_manager import ConfigManager from astrbot.api.event import AstrMessageEvent, MessageEventResult, filter from .messaging.forward_manager import ForwardManager from .commands.command_handlers import CommandHandlers import os from astrbot.api.star import Conte...
@register('astrbot_plugin_turnrig', 'IGCrystal', '监听并转发消息的可爱插件喵~ ฅ(^•ω•^ฅ', '1.6.1', 'https://github.com/IGCrystal/astrbot_plugin_turnrig') class TurnRigPlugin(Star): ''' TurnRig消息转发插件喵~ 🚀 这是一个超级可爱的消息转发小助手! ฅ(^•ω•^ฅ 功能特色: - 📨 智能消息监听和转发 - 🎯 多任务管理系统 - 💾 持久化配置和缓存 - 🔄 自动重试机制 - ✨ 支持各...
84
49
14
1
8
5
2
0.62
1
13
5
0
48
10
48
48
774
121
412
168
297
255
260
100
209
9
1
7
101
324,341
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward/cache_manager.py
WentUrc_astrbot_plugin_turnrig.messaging.forward.cache_manager.CacheManager
import os from astrbot.api import logger import asyncio import json class CacheManager: """ 消息缓存管理器喵~ 💾 负责管理失败消息的缓存,确保重要消息不会丢失! ฅ(^•ω•^ฅ 这个小助手会帮你: - 📝 记录发送失败的消息 - 🔄 管理重试计数 - 💾 持久化缓存到文件 - 🧹 定期清理过期数据 Note: 所有失败的消息都会被可爱地保存起来,等待重试喵! ✨ """ def __init__(self, plugi...
class CacheManager: ''' 消息缓存管理器喵~ 💾 负责管理失败消息的缓存,确保重要消息不会丢失! ฅ(^•ω•^ฅ 这个小助手会帮你: - 📝 记录发送失败的消息 - 🔄 管理重试计数 - 💾 持久化缓存到文件 - 🧹 定期清理过期数据 Note: 所有失败的消息都会被可爱地保存起来,等待重试喵! ✨ ''' def __init__(self, plugin): ''' 初始化缓存管理器喵!(ฅ^•ω•^ฅ) Args: ...
9
9
27
3
14
11
3
0.85
0
4
0
0
8
3
8
8
241
36
112
31
99
95
71
22
62
5
0
5
26
324,342
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward/download_helper.py
WentUrc_astrbot_plugin_turnrig.messaging.forward.download_helper.DownloadHelper
from astrbot.api import logger import uuid import requests import os import asyncio import traceback class DownloadHelper: """ 媒体下载助手喵~ 📥 专门帮忙下载各种媒体文件的小可爱! ฅ(^•ω•^ฅ 这个小助手会帮你: - 🖼️ 下载图片文件 - 🎵 下载音频文件 - 🎬 下载视频文件 - 💾 管理本地缓存 - 🔄 智能重试下载 Note: 支持多种下载方式,确保媒体文件能正确下载喵! ✨ ...
class DownloadHelper: ''' 媒体下载助手喵~ 📥 专门帮忙下载各种媒体文件的小可爱! ฅ(^•ω•^ฅ 这个小助手会帮你: - 🖼️ 下载图片文件 - 🎵 下载音频文件 - 🎬 下载视频文件 - 💾 管理本地缓存 - 🔄 智能重试下载 Note: 支持多种下载方式,确保媒体文件能正确下载喵! ✨ ''' def __init__(self, image_dir=None): ''' 初始化下载助手喵!(ฅ^•ω•^ฅ) Args: ...
6
6
46
6
26
15
6
0.65
0
3
0
0
5
1
5
5
249
39
130
27
124
85
90
24
84
12
0
5
28
324,343
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward/message_builder.py
WentUrc_astrbot_plugin_turnrig.messaging.forward.message_builder.MessageBuilder
import time import os import json from .download_helper import DownloadHelper import base64 class MessageBuilder: """ 消息构建器喵~ 🏗️ 负责将原始消息转换为转发格式,让每条消息都变得可爱又整齐! ฅ(^•ω•^)ฅ 这个小工具会帮你: - 📦 构建转发节点 - 🖼️ 处理图片消息 - 🎵 处理音频消息 - 📁 处理文件消息 - 😸 处理特殊表情 Note: 所有的消息都会被精心打包,确保转发时不会丢失...
class MessageBuilder: ''' 消息构建器喵~ 🏗️ 负责将原始消息转换为转发格式,让每条消息都变得可爱又整齐! ฅ(^•ω•^)ฅ 这个小工具会帮你: - 📦 构建转发节点 - 🖼️ 处理图片消息 - 🎵 处理音频消息 - 📁 处理文件消息 - 😸 处理特殊表情 Note: 所有的消息都会被精心打包,确保转发时不会丢失内容喵! ✨ ''' def __init__(self, download_helper=None, plugin=None): ''' ...
13
12
56
7
38
12
9
0.34
0
9
1
0
11
2
11
11
688
95
450
92
432
155
282
83
268
32
0
8
107
324,344
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward/message_sender.py
WentUrc_astrbot_plugin_turnrig.messaging.forward.message_sender.MessageSender
from astrbot.api import logger import base64 from collections import defaultdict import asyncio import uuid import traceback import threading from astrbot.api.message_components import Plain import os class MessageSender: """ 消息发送器喵~ 📤 专门负责处理消息发送和转发的核心组件! ฅ(^•ω•^ฅ 这个发送器会帮你: - 🚀 智能多策略消息发送 - �...
class MessageSender: ''' 消息发送器喵~ 📤 专门负责处理消息发送和转发的核心组件! ฅ(^•ω•^ฅ 这个发送器会帮你: - 🚀 智能多策略消息发送 - 🖼️ 图片和GIF处理 - 🔄 自动重试机制 - 💾 消息去重跟踪 - 🧹 自动清理过期记录 Note: 支持合并转发、单条发送等多种发送模式喵! ✨ ''' def __init__(self, plugin, download_helper): ''' 初始化消息发送器喵~ 🐾 ...
26
23
67
10
41
17
9
0.44
0
8
0
0
22
8
22
22
1,689
278
1,003
238
939
437
708
190
670
38
0
9
222
324,345
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward/retry_manager.py
WentUrc_astrbot_plugin_turnrig.messaging.forward.retry_manager.RetryManager
import hashlib from astrbot.api import logger import time class RetryManager: """ 消息重试管理器喵~ 🔄 负责重新发送失败的消息,不放弃任何一条重要消息! ฅ(^•ω•^ฅ 这个小助手会帮你: - 🔄 智能重试失败的消息 - ⏰ 控制重试间隔时间 - 📊 管理重试计数 - 🚫 放弃无希望的消息 Note: 使用指数退避策略,避免频繁重试造成负担喵! ⚠️ """ def __init__(self, plugin, cache_man...
class RetryManager: ''' 消息重试管理器喵~ 🔄 负责重新发送失败的消息,不放弃任何一条重要消息! ฅ(^•ω•^ฅ 这个小助手会帮你: - 🔄 智能重试失败的消息 - ⏰ 控制重试间隔时间 - 📊 管理重试计数 - 🚫 放弃无希望的消息 Note: 使用指数退避策略,避免频繁重试造成负担喵! ⚠️ ''' def __init__(self, plugin, cache_manager, message_builder, message_sender): ''' ...
5
5
62
9
36
17
6
0.53
0
6
0
0
4
4
4
4
265
42
146
38
139
77
93
34
88
12
0
4
24
324,346
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/forward_manager.py
WentUrc_astrbot_plugin_turnrig.messaging.forward_manager.ForwardManager
import traceback import os import hashlib import time from .forward import CacheManager, DownloadHelper, MessageBuilder, MessageSender, RetryManager from astrbot.api import logger import asyncio class ForwardManager: """ 消息转发管理器喵~ ฅ(^•ω•^ฅ) 负责协调各个组件,让消息能够安全地转发到目标会话喵! 这个小可爱会帮你: - 📨 构建转发节点 - 🎯...
class ForwardManager: ''' 消息转发管理器喵~ ฅ(^•ω•^ฅ) 负责协调各个组件,让消息能够安全地转发到目标会话喵! 这个小可爱会帮你: - 📨 构建转发节点 - 🎯 发送到各个平台 - 🔄 重试失败的消息 - 💾 管理消息缓存 Note: 所有转发操作都会经过这里喵!⚠️ ''' def __init__(self, plugin): ''' 初始化转发管理器喵!(ฅ^•ω•^ฅ) Args: plugin: 插件实例...
9
9
51
6
32
13
6
0.45
0
12
5
0
8
9
8
8
429
61
256
56
243
114
157
48
148
36
0
7
45
324,347
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/messaging/message_listener.py
WentUrc_astrbot_plugin_turnrig.messaging.message_listener.MessageListener
from .message_serializer import async_serialize_message import re import time from typing import Any from astrbot.api.message_components import Plain from astrbot.api.event import AstrMessageEvent from astrbot.api import logger class MessageListener: """ 消息监听器喵~ 👂 专门负责监听和处理各种消息的可爱小助手! ฅ(^•ω•^)ฅ 这个小监听...
class MessageListener: ''' 消息监听器喵~ 👂 专门负责监听和处理各种消息的可爱小助手! ฅ(^•ω•^)ฅ 这个小监听器会帮你: - 👂 监听所有消息事件 - 🔍 检测消息内容和特殊格式 - 💾 缓存符合条件的消息 - 📤 触发消息转发操作 - 🎯 智能过滤和匹配规则 Note: 所有的消息都会经过这里进行精心筛选喵! ✨ ''' def __init__(self, plugin): ''' 初始化消息监听器喵~ 🐾 Args:...
13
13
91
12
65
15
14
0.25
0
14
0
0
12
2
12
12
1,119
153
775
140
756
197
483
128
470
90
0
10
173
324,348
WentUrc/astrbot_plugin_turnrig
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WentUrc_astrbot_plugin_turnrig/scripts/generate_changelog.py
generate_changelog.ChangelogGenerator
import re from pathlib import Path import subprocess from datetime import datetime class ChangelogGenerator: """ Changelog 生成器喵~ 📋 智能分析Git提交历史并生成规范的变更日志! Features: - 🏷️ 自动分类提交类型 - 📝 生成标准格式输出 - 🌐 支持多种提交格式 - 💫 智能去重和清理 """ COMMIT_TYPE_MAP = {'feat': 'Added', '...
class ChangelogGenerator: ''' Changelog 生成器喵~ 📋 智能分析Git提交历史并生成规范的变更日志! Features: - 🏷️ 自动分类提交类型 - 📝 生成标准格式输出 - 🌐 支持多种提交格式 - 💫 智能去重和清理 ''' def __init__(self): ''' 初始化Changelog生成器喵~ 🐾 创建所有必要的分类容器! ''' pass def get_...
11
11
39
4
25
13
5
0.52
0
10
0
0
10
1
10
10
432
52
267
63
252
140
177
56
166
11
0
4
50
324,349
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/examples/realtime/drone_racing_realtime.py
drone_racing_realtime.DraggableGLViewWidget
from PyQt5.QtCore import QObject, Qt, QTimer, pyqtSignal from pyqtgraph.opengl import GLViewWidget class DraggableGLViewWidget(GLViewWidget): """Custom GLViewWidget that supports manual camera interaction""" def __init__(self, parent=None): super().__init__(parent) self.manual_camera_interacti...
class DraggableGLViewWidget(GLViewWidget): '''Custom GLViewWidget that supports manual camera interaction''' def __init__(self, parent=None): pass def mousePressEvent(self, event): pass def re_enable_auto_camera(self): '''Re-enable auto camera adjustment after manual interact...
7
2
7
0
6
2
2
0.32
1
1
0
0
6
2
6
6
52
6
38
9
31
12
38
9
31
3
1
1
12
324,350
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/examples/realtime/drone_racing_realtime.py
drone_racing_realtime.DroneRacingGUI
import numpy as np from PyQt5.QtCore import QObject, Qt, QTimer, pyqtSignal from PyQt5.QtWidgets import QApplication, QCheckBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QMainWindow, QPushButton, QScrollArea, QVBoxLayout, QWidget from pyqtgraph import Vector import threading from examples.drone.drone_rac...
class DroneRacingGUI(QMainWindow): def __init__(self): pass def setup_gui(self): '''Set up the GUI layout''' pass def update_gate_x_text(self, gate_idx, field): pass def update_gate_y_text(self, gate_idx, field): pass def update_gate_z_text(self, gate_id...
15
10
26
0
22
5
3
0.22
1
10
2
0
14
20
14
14
379
13
306
124
291
67
278
119
263
12
1
5
41
324,351
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/examples/realtime/drone_racing_realtime.py
drone_racing_realtime.OptimizationWorker
import numpy as np import time from examples.drone.drone_racing import A_gate_c_params, A_gate_param, gate_center_params, gen_vertices, initial_gate_centers, problem from PyQt5.QtCore import QObject, Qt, QTimer, pyqtSignal class OptimizationWorker(QObject): finished = pyqtSignal() results_ready = pyqtSignal(di...
class OptimizationWorker(QObject): def __init__(self): pass def update_gate_position(self, gate_idx, x, y, z): pass def run_optimization(self): pass
4
0
26
0
24
3
3
0.12
1
2
0
0
3
5
3
3
86
3
75
24
71
9
59
23
55
7
1
4
10
324,352
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/examples/realtime/dubins_car_realtime.py
dubins_car_realtime.ObstaclePlotWidget
from dubins_car.dubins_car import obs_center, obs_radius, plotting_dict, problem import pyqtgraph as pg from PyQt5.QtCore import Qt, QTimer class ObstaclePlotWidget(pg.PlotWidget): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.dragging = False def keyPressEvent(s...
class ObstaclePlotWidget(pg.PlotWidget): def __init__(self, *args, **kwargs): pass def keyPressEvent(self, event): pass def mousePressEvent(self, event): pass def mouseMoveEvent(self, event): pass def mouseReleaseEvent(self, event): pass
6
0
8
0
7
1
3
0.08
1
1
0
0
5
1
5
5
45
4
38
13
32
3
31
13
25
6
1
1
13
324,353
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/examples/realtime/obstacle_avoidance_realtime.py
obstacle_avoidance_realtime.Obstacle3DPlotWidget
import numpy as np from PyQt5.QtCore import Qt, QTimer from PyQt5.QtWidgets import QApplication, QGroupBox, QHBoxLayout, QLabel, QLineEdit, QSlider, QVBoxLayout, QWidget from drone.obstacle_avoidance_realtime_test import obs_center_1, obs_center_2, obs_center_3, plotting_dict, problem from openscvx.utils import generat...
class Obstacle3DPlotWidget(QWidget): def __init__(self, *args, **kwargs): pass def create_control_panel(self): '''Create the control panel with sliders for each obstacle''' pass def create_obstacle_ellipsoids(self): pass def on_slider_changed(self, value, obstacle_id...
11
8
25
0
20
5
3
0.25
1
7
0
0
10
15
10
10
257
9
203
81
192
51
180
80
169
4
1
2
25
324,354
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/control.py
openscvx.backend.control.Control
import numpy as np from openscvx.backend.variable import Variable class Control(Variable): """A class representing the control variables in an optimal control problem. The Control class extends Variable to handle control-specific properties and supports both true and augmented control dimensions. It provi...
class Control(Variable): '''A class representing the control variables in an optimal control problem. The Control class extends Variable to handle control-specific properties and supports both true and augmented control dimensions. It provides methods for appending new control variables and accessing s...
10
8
11
1
5
5
2
1.43
1
3
0
0
7
3
7
23
118
21
40
16
30
57
35
14
27
3
2
2
11
324,355
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.Add
class Add(Expr): def __init__(self, left, right): self.left = left self.right = right def children(self): return [self.left, self.right]
class Add(Expr): def __init__(self, left, right): pass def children(self): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
2
2
8
7
1
6
5
3
0
6
5
3
1
1
0
2
324,356
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.Expr
class Expr: """ Base class for symbolic expressions in optimization problems. Note: This class is currently not being used. """ def __add__(self, other): return Add(self, to_expr(other)) def __mul__(self, other): return Mul(self, to_expr(other)) def __matmul__(self, other...
class Expr: ''' Base class for symbolic expressions in optimization problems. Note: This class is currently not being used. ''' def __add__(self, other): pass def __mul__(self, other): pass def __matmul__(self, other): pass def __neg__(self): pass ...
7
1
3
0
3
0
1
0.24
0
4
4
7
6
0
6
6
28
7
17
10
10
4
17
10
10
2
0
1
7
324,357
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.Literal
class Literal(Expr): """Represents a literal value in an expression.""" def __init__(self, value): self.value = value def children(self): return []
class Literal(Expr): '''Represents a literal value in an expression.''' def __init__(self, value): pass def children(self): pass
3
1
2
0
2
0
1
0.2
1
0
0
0
2
1
2
8
8
2
5
4
2
1
5
4
2
1
1
0
2
324,358
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.MatMul
class MatMul(Expr): def __init__(self, left, right): self.left = left self.right = right def children(self): return [self.left, self.right]
class MatMul(Expr): def __init__(self, left, right): pass def children(self): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
2
2
8
7
1
6
5
3
0
6
5
3
1
1
0
2
324,359
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.Mul
class Mul(Expr): def __init__(self, left, right): self.left = left self.right = right def children(self): return [self.left, self.right]
class Mul(Expr): def __init__(self, left, right): pass def children(self): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
2
2
8
7
1
6
5
3
0
6
5
3
1
1
0
2
324,360
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/expr.py
openscvx.backend.expr.Neg
class Neg(Expr): def __init__(self, operand): self.operand = operand def children(self): return [self.operand]
class Neg(Expr): def __init__(self, operand): pass def children(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
8
6
1
5
4
2
0
5
4
2
1
1
0
2
324,361
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/parameter.py
openscvx.backend.parameter.Parameter
from openscvx.backend.expr import Expr class Parameter(Expr): """A class representing a parameter in the optimization problem. Parameters are symbolic variables that can be used in expressions and constraints. They maintain a registry of all created parameters and can be indexed or sliced. Attributes...
class Parameter(Expr): '''A class representing a parameter in the optimization problem. Parameters are symbolic variables that can be used in expressions and constraints. They maintain a registry of all created parameters and can be indexed or sliced. Attributes: _registry (dict): Class-level d...
10
7
11
2
4
6
2
1.45
1
6
0
0
4
3
6
12
91
20
29
16
19
42
24
13
17
3
1
1
9
324,362
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/state.py
openscvx.backend.state.Fix
class Fix: """Class representing a fixed state variable in the optimization problem. A fixed state variable is one that is constrained to a specific value and cannot be optimized. Attributes: value: The fixed value that the state variable must take. """ def __init__(self, value): ...
class Fix: '''Class representing a fixed state variable in the optimization problem. A fixed state variable is one that is constrained to a specific value and cannot be optimized. Attributes: value: The fixed value that the state variable must take. ''' def __init__(self, value): ...
3
3
7
1
2
4
1
2.8
0
0
0
0
2
1
2
2
25
6
5
4
2
14
5
4
2
1
0
0
2
324,363
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/state.py
openscvx.backend.state.Free
class Free: """Class representing a free state variable in the optimization problem. A free state variable is one that is not constrained to any specific value but can be optimized within its bounds. Attributes: guess: The initial guess value for optimization. """ def __init__(self, g...
class Free: '''Class representing a free state variable in the optimization problem. A free state variable is one that is not constrained to any specific value but can be optimized within its bounds. Attributes: guess: The initial guess value for optimization. ''' def __init__(self, gue...
3
3
7
1
2
4
1
2.8
0
0
0
0
2
1
2
2
25
6
5
4
2
14
5
4
2
1
0
0
2
324,364
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/state.py
openscvx.backend.state.Maximize
class Maximize: """Class representing a state variable to be maximized in the optimization problem. A maximized state variable is one that is optimized to achieve the highest possible value within its bounds. Attributes: guess: The initial guess value for optimization. """ def __init_...
class Maximize: '''Class representing a state variable to be maximized in the optimization problem. A maximized state variable is one that is optimized to achieve the highest possible value within its bounds. Attributes: guess: The initial guess value for optimization. ''' def __init__(...
3
3
7
1
2
4
1
2.8
0
0
0
0
2
1
2
2
25
6
5
4
2
14
5
4
2
1
0
0
2
324,365
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/state.py
openscvx.backend.state.Minimize
class Minimize: """Class representing a state variable to be minimized in the optimization problem. A minimized state variable is one that is optimized to achieve the lowest possible value within its bounds. Attributes: guess: The initial guess value for optimization. """ def __init__...
class Minimize: '''Class representing a state variable to be minimized in the optimization problem. A minimized state variable is one that is optimized to achieve the lowest possible value within its bounds. Attributes: guess: The initial guess value for optimization. ''' def __init__(s...
3
3
7
1
2
4
1
2.8
0
0
0
0
2
1
2
2
25
6
5
4
2
14
5
4
2
1
0
0
2
324,366
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/state.py
openscvx.backend.state.State
from openscvx.backend.variable import Variable import numpy as np class State(Variable): """A class representing the state variables in an optimal control problem. The State class extends Variable to handle state-specific properties like initial and final conditions, as well as true and augmented state di...
class State(Variable): '''A class representing the state variables in an optimal control problem. The State class extends Variable to handle state-specific properties like initial and final conditions, as well as true and augmented state dimensions. It supports various boundary condition types: - F...
28
17
17
2
11
5
3
0.66
1
10
4
0
16
9
16
32
360
55
184
58
146
121
136
38
118
15
2
3
57
324,367
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/backend/variable.py
openscvx.backend.variable.Variable
from openscvx.backend.expr import Expr import numpy as np class Variable(Expr): """A base class for variables in an optimal control problem. The Variable class provides the fundamental structure for state and control variables, handling their shapes, bounds, and initial guesses. It supports operations lik...
class Variable(Expr): '''A base class for variables in an optimal control problem. The Variable class provides the fundamental structure for state and control variables, handling their shapes, bounds, and initial guesses. It supports operations like appending new variables and slicing. Attributes: ...
20
13
18
3
8
7
2
0.8
1
7
0
2
10
5
10
16
220
45
97
29
77
78
73
22
60
9
1
3
29
324,368
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.Config
from dataclasses import dataclass @dataclass class Config: sim: SimConfig scp: ScpConfig cvx: ConvexSolverConfig dis: DiscretizationConfig prp: PropagationConfig dev: DevConfig def __post_init__(self): pass
@dataclass class Config: def __post_init__(self): pass
3
0
2
0
2
0
1
0
0
0
0
0
1
0
1
1
10
1
9
2
7
0
9
2
7
1
0
0
1
324,369
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.ConvexSolverConfig
from typing import Callable, Optional from dataclasses import dataclass @dataclass class ConvexSolverConfig: def __init__(self, solver: str='QOCO', solver_args: Optional[dict]=None, cvxpygen: bool=False, cvxpygen_override: bool=False): """ Configuration class for convex solver settings. T...
@dataclass class ConvexSolverConfig: def __init__(self, solver: str='QOCO', solver_args: Optional[dict]=None, cvxpygen: bool=False, cvxpygen_override: bool=False): ''' Configuration class for convex solver settings. This class defines the parameters required for configuring a convex solver....
3
1
41
3
15
23
3
1.44
0
3
0
0
1
4
1
1
42
3
16
12
8
23
8
6
6
3
0
1
3
324,370
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.DevConfig
from dataclasses import dataclass @dataclass class DevConfig: def __init__(self, profiling: bool=False, debug: bool=False, printing: bool=True): """ Configuration class for development settings. This class defines the parameters used for development and debugging purposes. ...
@dataclass class DevConfig: def __init__(self, profiling: bool=False, debug: bool=False, printing: bool=True): ''' Configuration class for development settings. This class defines the parameters used for development and debugging purposes. Main arguments: These are t...
3
1
21
3
4
14
1
2.8
0
1
0
0
1
3
1
1
22
3
5
5
3
14
5
5
3
1
0
0
1
324,371
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.DiscretizationConfig
from typing import Callable, Optional from dataclasses import dataclass @dataclass class DiscretizationConfig: def __init__(self, dis_type: str='FOH', custom_integrator: bool=False, solver: str='Tsit5', args: Optional[dict]=None, atol: float=0.001, rtol: float=1e-06): """ Configuration class for d...
@dataclass class DiscretizationConfig: def __init__(self, dis_type: str='FOH', custom_integrator: bool=False, solver: str='Tsit5', args: Optional[dict]=None, atol: float=0.001, rtol: float=1e-06): ''' Configuration class for discretization settings. This class defines the parameters require...
3
1
46
5
15
26
2
1.63
0
4
0
0
1
6
1
1
47
5
16
16
6
26
8
8
6
2
0
0
2
324,372
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.PropagationConfig
from typing import Callable, Optional from dataclasses import dataclass @dataclass class PropagationConfig: def __init__(self, inter_sample: int=30, dt: float=0.01, solver: str='Dopri8', max_tau_len: int=1000, args: Optional[dict]=None, atol: float=0.001, rtol: float=1e-06): """ Configuration clas...
@dataclass class PropagationConfig: def __init__(self, inter_sample: int=30, dt: float=0.01, solver: str='Dopri8', max_tau_len: int=1000, args: Optional[dict]=None, atol: float=0.001, rtol: float=1e-06): ''' Configuration class for propagation settings. This class defines the parameters req...
3
1
43
4
17
22
2
1.22
0
4
0
0
1
7
1
1
44
4
18
18
7
22
9
9
7
2
0
0
2
324,373
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.ScpConfig
from typing import Callable, Optional from dataclasses import dataclass @dataclass class ScpConfig: def __init__(self, n: Optional[int]=None, k_max: int=200, w_tr: float=1.0, lam_vc: float=1.0, ep_tr: float=0.0001, ep_vb: float=0.0001, ep_vc: float=1e-08, lam_cost: float=0.0, lam_vb: float=0.0, uniform_time_grid:...
@dataclass class ScpConfig: def __init__(self, n: Optional[int]=None, k_max: int=200, w_tr: float=1.0, lam_vc: float=1.0, ep_tr: float=0.0001, ep_vb: float=0.0001, ep_vc: float=1e-08, lam_cost: float=0.0, lam_vb: float=0.0, uniform_time_grid: bool=False, cost_drop: int=-1, cost_relax: float=1.0, w_tr_adapt: float=...
4
1
38
2
20
16
2
0.78
0
3
0
0
2
15
2
2
77
4
41
37
21
32
24
20
21
3
0
1
4
324,374
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/config.py
openscvx.config.SimConfig
from dataclasses import dataclass from openscvx.backend.control import Control from typing import Callable, Optional from openscvx.backend.state import State import numpy as np @dataclass(init=False) class SimConfig: def __init__(self, x: State, x_prop: State, u: Control, total_time: float, idx_x_true: slice, idx...
@dataclass(init=False) class SimConfig: def __init__(self, x: State, x_prop: State, u: Control, total_time: float, idx_x_true: slice, idx_x_true_prop: slice, idx_u_true: slice, idx_t: slice, idx_y: slice, idx_y_prop: slice, idx_s: slice, save_compiled: bool=True, ctcs_node_intervals: Optional[list]=None, constrain...
5
1
51
3
32
16
4
0.63
0
9
2
0
2
26
2
2
139
10
79
67
53
50
55
45
51
8
0
3
12
324,375
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/constraints/ctcs.py
openscvx.constraints.ctcs.CTCSConstraint
from openscvx.backend.state import State, Variable from dataclasses import dataclass from openscvx.backend.control import Control import jax.numpy as jnp import inspect from jax.lax import cond from typing import Callable, Optional, Union @dataclass class CTCSConstraint: """ Dataclass for continuous-time const...
@dataclass class CTCSConstraint: ''' Dataclass for continuous-time constraint satisfaction (CTCS) constraints over a trajectory interval. A `CTCSConstraint` wraps a residual function `func(x, u)`, applies a pointwise `penalty` to its outputs, and accumulates the penalized sum only within a speci...
4
3
26
3
13
10
4
2.44
0
5
3
0
2
0
2
2
132
16
34
15
31
83
22
15
19
4
0
1
7
324,376
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/constraints/nodal.py
openscvx.constraints.nodal.NodalConstraint
from jax import jacfwd, vmap from dataclasses import dataclass from typing import Callable, Optional, Union import jax.numpy as jnp @dataclass class NodalConstraint: """ Encapsulates a constraint function applied at specific trajectory nodes. A `NodalConstraint` wraps a function `g(x, u)` that computes co...
@dataclass class NodalConstraint: ''' Encapsulates a constraint function applied at specific trajectory nodes. A `NodalConstraint` wraps a function `g(x, u)` that computes constraint residuals for given state `x` and input `u`. It can optionally apply only at a subset of trajectory nodes, support ve...
6
4
11
1
6
5
3
3.03
0
2
0
0
4
1
4
4
147
22
31
14
26
94
30
14
25
5
0
2
10
324,377
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/constraints/violation.py
openscvx.constraints.violation.CTCSViolation
import jax.numpy as jnp from typing import Callable, Optional from dataclasses import dataclass @dataclass class CTCSViolation: """Class representing a continuous-time constraint satisfaction (CTCS) violation. This class holds the constraint function and its gradients for computing constraint violations i...
null
2
1
0
0
0
0
0
2
0
0
0
0
0
0
0
0
15
3
4
3
3
8
4
3
3
0
0
0
0
324,378
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/dynamics.py
openscvx.dynamics.Dynamics
import jax.numpy as jnp from dataclasses import dataclass from typing import Callable, Optional, Union @dataclass class Dynamics: """ Dataclass to hold a system dynamics function and (optionally) its gradients. This class is intended to be instantiated using the `dynamics` decorator wrapped around a fu...
@dataclass class Dynamics: ''' Dataclass to hold a system dynamics function and (optionally) its gradients. This class is intended to be instantiated using the `dynamics` decorator wrapped around a function defining the system dynamics. Both the dynamics and optional gradients should be composed of ...
2
1
0
0
0
0
0
23.75
0
0
0
0
0
0
0
0
121
22
4
3
3
95
4
3
3
0
0
0
0
324,379
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/results.py
openscvx.results.OptimizationResults
from typing import Any, Optional from dataclasses import dataclass, field from openscvx.backend.state import State import numpy as np from openscvx.backend.control import Control @dataclass class OptimizationResults: """ Structured container for optimization results from the Successive Convexification (SCP) so...
@dataclass class OptimizationResults: ''' Structured container for optimization results from the Successive Convexification (SCP) solver. This class provides a type-safe and organized way to store and access optimization results, replacing the previous dictionary-based approach. It includes core optimiz...
10
9
13
2
4
7
2
1.7
0
5
0
0
8
0
8
8
170
35
50
24
41
85
49
24
40
3
0
2
16
324,380
haynec/OpenSCvx
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/haynec_OpenSCvx/openscvx/trajoptproblem.py
openscvx.trajoptproblem.TrajOptProblem
from openscvx.backend.state import Free, State import threading from openscvx.config import Config, ConvexSolverConfig, DevConfig, DiscretizationConfig, PropagationConfig, ScpConfig, SimConfig from openscvx.augmentation.dynamics_augmentation import build_augmented_dynamics from openscvx.backend.control import Control f...
class TrajOptProblem: def __init__(self, dynamics: Dynamics, constraints: List[Union[CTCSConstraint, NodalConstraint]], x: State, u: Control, N: int, idx_time: int, params: Optional[dict]=None, dynamics_prop: Optional[callable]=None, x_prop: State=None, scp: Optional[ScpConfig]=None, dis: Optional[DiscretizationC...
6
2
118
15
86
21
8
0.24
0
27
14
0
5
21
5
5
594
79
433
113
401
103
234
78
225
15
0
4
42
324,381
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/auth.py
auth.Auth
import time from config import BOT_APPID, BOT_APPSECRET, API_AUTH_URL, BOT_TOKEN import requests class Auth: def __init__(self): self.access_token = None self.expires_at = 0 def get_access_token(self): """获取或刷新访问令牌""" current_time = time.time() if self.access_token and...
class Auth: def __init__(self): pass def get_access_token(self): '''获取或刷新访问令牌''' pass def get_auth_header(self, use_bot_token=False): '''获取包含认证信息的请求头 Args: use_bot_token (bool): 之前参数用于区分是否使用Bot令牌格式,现在QQ已经统一要求使用AccessToken ''' pass
4
2
22
4
14
4
3
0.25
0
4
0
0
3
3
3
3
70
15
44
15
40
11
36
15
32
6
0
1
8
324,382
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/auth_manager.py
auth_manager.AuthManager
import json import os from typing import List, Set class AuthManager: """ 权限管理系统,负责管理用户权限和维护模式 """ def __init__(self): self.admins: Set[str] = set() self.maintenance_mode = False self.auth_file = 'admins.json' self.logger = logger self._load_admins() def _l...
class AuthManager: ''' 权限管理系统,负责管理用户权限和维护模式 ''' def __init__(self): pass def _load_admins(self) -> None: ''' 从文件加载管理员列表 ''' pass def _save_admins(self) -> None: ''' 保存管理员列表到文件 ''' pass def reload_admins(self) -> Non...
12
11
12
1
5
5
2
1.02
0
5
0
0
11
4
11
11
145
27
59
21
47
60
58
17
46
3
0
3
20
324,383
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/blacklist_manager.py
blacklist_manager.BlacklistEntry
from typing import Dict, List, Optional, Set, Any from datetime import datetime from dataclasses import dataclass, asdict @dataclass class BlacklistEntry: """黑名单条目""" id: str type: BlacklistType reason: str added_by: str added_time: str expires_at: Optional[str] = None def is_expired(s...
@dataclass class BlacklistEntry: '''黑名单条目''' def is_expired(self) -> bool: '''检查是否已过期''' pass def to_dict(self) -> Dict[str, Any]: '''转换为字典''' pass @classmethod def from_dict(cls, data: Dict[str, Any]) -> 'BlacklistEntry': '''从字典创建''' pass
6
4
6
0
5
1
2
0.42
0
5
1
0
2
0
3
3
31
3
24
9
18
10
23
8
18
3
0
1
5
324,384
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/blacklist_manager.py
blacklist_manager.BlacklistManager
import threading from config import ENABLE_BLACKLIST, BLACKLIST_AUTO_SAVE, BLACKLIST_LOG_BLOCKED from datetime import datetime import os import json from typing import Dict, List, Optional, Set, Any class BlacklistManager: """黑名单管理器""" def __init__(self, data_file: str='blacklist.json', auto_save: bool=None):...
class BlacklistManager: '''黑名单管理器''' def __init__(self, data_file: str='blacklist.json', auto_save: bool=None): pass def _load_data(self): '''加载黑名单数据''' pass def _save_data(self): '''保存黑名单数据''' pass def _cleanup_expired(self): '''清理过期的黑名单条目''' ...
21
20
9
1
7
1
2
0.18
0
7
2
0
20
5
20
20
207
44
138
41
117
25
121
37
100
6
0
4
40
324,385
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/blacklist_manager.py
blacklist_manager.BlacklistType
from enum import Enum class BlacklistType(Enum): """黑名单类型""" USER = 'user' GROUP = 'group'
class BlacklistType(Enum): '''黑名单类型''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
49
4
0
3
3
2
1
3
3
2
0
4
0
0
324,386
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/api.py
botpy.api.BotAPI
from .types import guild, user, channel, message, audio, announce, permission, schedule, emoji, pins_message, reaction, forum from .flags import Permission from io import BufferedReader from .http import BotHttp, Route from typing import Any, List, Union, BinaryIO, Dict class BotAPI: """ 机器人相关的API接口类 使用注意...
class BotAPI: ''' 机器人相关的API接口类 使用注意: - 如果要直接使用api,可以通过client的内部成员变量,通过`self.api.xx`来使用 - 设置超时时间: Client(timeout=5) - API当前返回的所有自定义类型数据为字典数据,通过TypedDict进行类型提示 ''' def __init__(self, http: BotHttp): ''' Args: http (BotHttp): 用于发送请求的 http 客户端。 ...
66
66
21
3
8
10
1
1.28
0
41
35
0
65
1
65
65
1,487
230
552
301
354
705
254
167
188
3
0
2
77
324,387
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/audio.py
botpy.audio.Audio
from .api import BotAPI from .types import audio class Audio: __slots__ = ('_api', '_ctx', 'channel_id', 'guild_id', 'audio_url', 'text', 'event_id') def __init__(self, api: BotAPI, event_id, data: audio.AudioAction): self._api = api self.channel_id = data.get('channel_id', None) self....
class Audio: def __init__(self, api: BotAPI, event_id, data: audio.AudioAction): pass def __repr__(self): pass
3
0
5
1
5
0
1
0
0
3
2
0
2
6
2
2
21
3
18
10
15
0
11
10
8
1
0
0
2
324,388
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/audio.py
botpy.audio.PublicAudio
from .types import audio from .api import BotAPI class PublicAudio: __slots__ = ('_api', '_ctx', 'guild_id', 'channel_id', 'channel_type', 'user_id') def __init__(self, api: BotAPI, data: audio.AudioLive): self._api = api self.guild_id = data.get('guild_id', None) self.channel_id = dat...
class PublicAudio: def __init__(self, api: BotAPI, data: audio.AudioLive): pass def __repr__(self): pass
3
0
4
0
4
0
1
0
0
3
2
0
2
5
2
2
18
2
16
9
13
0
10
9
7
1
0
0
2
324,389
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/channel.py
botpy.channel.Channel
from .types import channel from .api import BotAPI class Channel: __slots__ = ('_api', 'guild_id', 'id', 'name', 'type', 'sub_type', 'position', 'owner_id', 'private_type', 'speak_permission', 'application_id', 'permissions', 'event_id') def __init__(self, api: BotAPI, event_id, data: channel.ChannelPayload):...
class Channel: def __init__(self, api: BotAPI, event_id, data: channel.ChannelPayload): pass def __repr__(self): pass
3
0
8
1
8
0
1
0
0
3
2
0
2
12
2
2
34
3
31
16
28
0
17
16
14
1
0
0
2
324,390
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/client.py
botpy.client.Client
from typing import Any, Callable, Coroutine, Dict, List, Tuple, Optional, Union, Type from .flags import Intents import asyncio import traceback from .http import BotHttp from types import TracebackType from .robot import Robot, Token from .connection import ConnectionSession from .gateway import BotWebSocket from .api...
class Client: '''``Client` 是一个用于与 QQ频道机器人 Websocket 和 API 交互的类。''' def __init__(self, intents: Intents, timeout: int=5, is_sandbox=False, log_config: Union[str, dict]=None, log_format: str=None, log_level: int=None, bot_log: Union[bool, None]=True, ext_handlers: Union[dict, List[dict], bool]=True): ''...
22
7
13
1
9
3
2
0.33
0
18
7
0
18
10
18
18
266
46
165
73
116
55
115
44
94
6
0
3
36
324,391
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/client.py
botpy.client._LoopSentinel
class _LoopSentinel: __slots__ = () def __getattr__(self, attr: str) -> None: raise AttributeError('无法在非异步上下文中访问循环属性')
class _LoopSentinel: def __getattr__(self, attr: str) -> None: pass
2
0
2
0
2
0
1
0
0
2
0
0
1
0
1
1
5
1
4
3
2
0
4
3
2
1
0
0
1
324,392
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/connection.py
botpy.connection.ConnectionSession
from .types import session from .api import BotAPI import asyncio from typing import List, Callable, Dict, Any, Optional class ConnectionSession: """Client的Websocket连接会话 SessionPool主要支持session的重连,可以根据session的状态动态设置是否需要进行重连操作 这里通过设置session_id=""空则任务session需要重连 """ def __init__(self, max_async, con...
class ConnectionSession: '''Client的Websocket连接会话 SessionPool主要支持session的重连,可以根据session的状态动态设置是否需要进行重连操作 这里通过设置session_id=""空则任务session需要重连 ''' def __init__(self, max_async, connect: Callable, dispatch: Callable, loop=None, api: BotAPI=None): pass async def multi_run(self, session_inte...
5
1
11
1
9
1
2
0.22
0
6
3
0
4
7
4
4
53
8
37
24
25
8
30
17
25
5
0
3
9
324,393
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/connection.py
botpy.connection.ConnectionState
from .channel import Channel import inspect from .api import BotAPI from typing import List, Callable, Dict, Any, Optional from .forum import Thread, OpenThread from .guild import Guild from .interaction import Interaction from .manage import C2CManageEvent, GroupManageEvent from .message import C2CMessage, GroupMessag...
null
55
1
3
0
3
0
1
0.07
0
20
18
0
54
4
54
54
230
56
162
106
107
12
162
106
107
3
0
2
56
324,394
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.AuthenticationFailedError
class AuthenticationFailedError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class AuthenticationFailedError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2
324,395
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.ForbiddenError
class ForbiddenError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class ForbiddenError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2
324,396
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.MethodNotAllowedError
class MethodNotAllowedError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class MethodNotAllowedError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2
324,397
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.NotFoundError
class NotFoundError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class NotFoundError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2
324,398
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.SequenceNumberError
class SequenceNumberError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class SequenceNumberError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2
324,399
kldhsh123/hiklqqbot
/Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/errors.py
botpy.errors.ServerError
class ServerError(RuntimeError): def __init__(self, msg): self.msgs = msg def __str__(self): return self.msgs
class ServerError(RuntimeError): def __init__(self, msg): pass def __str__(self): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
1
2
13
6
1
5
4
2
0
5
4
2
1
4
0
2