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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
323,900 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/datasets/interface.py | datasets.interface.IDataset | from collections.abc import Iterator
from abc import ABC, abstractmethod
class IDataset(ABC):
def __init__(self, dataset_id: str):
self.dataset_id = dataset_id
@abstractmethod
def load(self) -> Dataset:
raise NotImplementedError()
@abstractmethod
def __iter__(self) -> Iterator[Ro... |
class IDataset(ABC):
def __init__(self, dataset_id: str):
pass
@abstractmethod
def load(self) -> Dataset:
pass
@abstractmethod
def __iter__(self) -> Iterator[Row]:
pass
def __str__(self) -> str:
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 3 | 0 | 2 | 4 | 1 | 4 | 24 | 14 | 3 | 11 | 8 | 4 | 0 | 9 | 6 | 4 | 1 | 4 | 0 | 4 |
323,901 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/datasets/registry.py | datasets.registry.DatasetRegistry | from .huggingface import HuggingFaceDataset
from .interface import DatasetSource, IDataset
class DatasetRegistry:
_dataset_registry: dict[str, DatasetSource] = {}
@staticmethod
def register_dataset(dataset_id: str, dataset_source: DatasetSource):
DatasetRegistry._dataset_registry[dataset_id] = dat... |
class DatasetRegistry:
@staticmethod
def register_dataset(dataset_id: str, dataset_source: DatasetSource):
pass
@staticmethod
def get_dataset(dataset_id: str) -> IDataset:
pass | 5 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 0 | 5 | 3 | 0 | 0 | 0 | 2 | 2 | 16 | 2 | 14 | 8 | 9 | 0 | 11 | 6 | 8 | 2 | 0 | 1 | 3 |
323,902 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/evaluator/evaluator.py | evaluator.evaluator.Evaluator | from ..datasets.registry import DatasetRegistry
from .interface import EvalResult
from ..models.interface import Dialog, IModel
from ..benchmarks.registry import BenchmarkRegistry
from ..preprocessor.registry import PreprocessorRegistry
from ..graders.registry import GraderRegistry
class Evaluator:
def __init__(s... |
class Evaluator:
def __init__(self, model: IModel, benchmark_id: str | None=None, dataset_id: str | None=None, grader_ids: list[str] | None=None, preprocessor_id: str | None=None, num_examples: int | None=None, is_multi_turn: bool=False):
pass
def run(self, max_parallel_generations: int=10, sleep_sec... | 3 | 0 | 58 | 7 | 45 | 7 | 6 | 0.16 | 0 | 13 | 6 | 0 | 2 | 10 | 2 | 2 | 118 | 14 | 90 | 37 | 74 | 14 | 47 | 24 | 44 | 8 | 0 | 2 | 11 |
323,903 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/evaluator/interface.py | evaluator.interface.EvalResult | from typing import Any
from pydantic import BaseModel
class EvalResult(BaseModel):
metrics: dict[str, float] | None = None
subset_metrics: dict[str, dict[str, float]] | None = None
result_data: list[dict[str, Any]]
topline_metric_name: str |
class EvalResult(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 8 | 0 | 5 | 3 | 4 | 3 | 5 | 3 | 4 | 0 | 5 | 0 | 0 |
323,904 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/graders/interface.py | graders.interface.IGrader | from ..evaluator.interface import EvalResult
from abc import ABC, abstractmethod
from collections import defaultdict
from ..datasets.interface import Row
from typing import Any
from ..utils.utils import map_with_progress
class IGrader(ABC):
def __init__(self, grader_id: str):
self.grader_id = grader_id
... |
class IGrader(ABC):
def __init__(self, grader_id: str):
pass
@abstractmethod
def grade_row(self, row: Row) -> dict[str, Any]:
'''Calculates metrics for a single row.'''
pass
@abstractmethod
def calculate_aggregate_metrics(self, results: list[dict[str, Any]], rows: list[Row]... | 11 | 5 | 8 | 1 | 5 | 2 | 2 | 0.31 | 1 | 6 | 1 | 9 | 7 | 1 | 7 | 27 | 67 | 12 | 42 | 22 | 31 | 13 | 32 | 19 | 24 | 6 | 4 | 3 | 12 |
323,905 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/graders/registry.py | graders.registry.GraderRegistry | from .interface import IGrader
class GraderRegistry:
_grader_registry: dict[str, IGrader] = {}
@staticmethod
def register_grader(grader_id: str, grader: IGrader):
GraderRegistry._grader_registry[grader_id] = grader
@staticmethod
def get_grader(grader_id: str) -> IGrader:
return Gr... |
class GraderRegistry:
@staticmethod
def register_grader(grader_id: str, grader: IGrader):
pass
@staticmethod
def get_grader(grader_id: str) -> IGrader:
pass
@staticmethod
def get_grader_ids() -> list[str]:
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 3 | 3 | 14 | 3 | 11 | 8 | 4 | 0 | 8 | 5 | 4 | 1 | 0 | 0 | 3 |
323,906 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.BulletListChecker | import random
import re
class BulletListChecker(Instruction):
"""Checks the bullet list in the prompt."""
def build_description(self, *, num_bullets=None):
"""Build the instruction description.
Args:
num_bullets: An integer specifying the exact number of bullet lists
that... |
class BulletListChecker(Instruction):
'''Checks the bullet list in the prompt.'''
def build_description(self, *, num_bullets=None):
'''Build the instruction description.
Args:
num_bullets: An integer specifying the exact number of bullet lists
that is required to appear i... | 5 | 5 | 9 | 0 | 5 | 4 | 1 | 0.86 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 9 | 43 | 4 | 21 | 10 | 16 | 18 | 16 | 10 | 11 | 2 | 1 | 1 | 5 |
323,907 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.CapitalLettersEnglishChecker | import langdetect
class CapitalLettersEnglishChecker(Instruction):
"""Checks that the response is in english and is in all capital letters."""
def build_description(self):
"""Build the instruction description."""
self._description_pattern = 'Your entire response should be in English, and in al... |
class CapitalLettersEnglishChecker(Instruction):
'''Checks that the response is in english and is in all capital letters.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
pass
def get_instruction_args_keys(self):
... | 5 | 4 | 5 | 0 | 4 | 1 | 1 | 0.4 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 9 | 25 | 5 | 15 | 7 | 10 | 6 | 15 | 6 | 10 | 2 | 1 | 1 | 5 |
323,908 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.CapitalWordFrequencyChecker | import nltk
import random
class CapitalWordFrequencyChecker(Instruction):
"""Checks frequency of words with all capital letters."""
def build_description(self, capital_frequency=None, capital_relation=None):
"""Build the instruction description.
Args:
capital_frequency: An integer th... |
class CapitalWordFrequencyChecker(Instruction):
'''Checks frequency of words with all capital letters.'''
def build_description(self, capital_frequency=None, capital_relation=None):
'''Build the instruction description.
Args:
capital_frequency: An integer that represents the number o... | 5 | 5 | 14 | 1 | 9 | 3 | 2 | 0.38 | 1 | 1 | 0 | 0 | 4 | 3 | 4 | 9 | 60 | 9 | 37 | 14 | 28 | 14 | 23 | 10 | 18 | 4 | 1 | 1 | 8 |
323,909 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.CommaChecker | import re
class CommaChecker(Instruction):
"""Checks the response for no commas."""
def build_description(self, **kwargs):
"""Build the instruction description."""
self._description_pattern = 'In your entire response, refrain from the use of any commas.'
return self._description_patter... |
class CommaChecker(Instruction):
'''Checks the response for no commas.'''
def build_description(self, **kwargs):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
pass
def get_instruction_args_keys(self):
'''Returns the args keys of `build_... | 5 | 4 | 3 | 0 | 2 | 1 | 1 | 0.4 | 1 | 0 | 0 | 0 | 4 | 1 | 4 | 9 | 18 | 4 | 10 | 6 | 5 | 4 | 10 | 6 | 5 | 1 | 1 | 0 | 4 |
323,910 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.ConstrainedResponseChecker | class ConstrainedResponseChecker(Instruction):
"""Checks the constrained response."""
def build_description(self):
"""Build the instruction description."""
self._constrained_responses = _CONSTRAINED_RESPONSE_OPTIONS
self._description_pattern = 'Answer with one of the following options: ... | class ConstrainedResponseChecker(Instruction):
'''Checks the constrained response.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
'''Returns the keyward args of `build_description`.'''
pass
def get_instruct... | 5 | 5 | 6 | 0 | 4 | 3 | 2 | 0.8 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 9 | 31 | 4 | 15 | 8 | 10 | 12 | 15 | 8 | 10 | 3 | 1 | 2 | 6 |
323,911 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.ConstrainedStartChecker | import re
import random
class ConstrainedStartChecker(Instruction):
"""Checks the response start."""
def build_description(self, *, starter=None):
"""Build the instruction description.
Args:
starter: A string representing the keyward that the response should start
with.
... |
class ConstrainedStartChecker(Instruction):
'''Checks the response start.'''
def build_description(self, *, starter=None):
'''Build the instruction description.
Args:
starter: A string representing the keyward that the response should start
with.
Returns:
... | 5 | 5 | 8 | 0 | 4 | 4 | 2 | 1 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 9 | 38 | 4 | 17 | 9 | 12 | 17 | 15 | 9 | 10 | 3 | 1 | 1 | 7 |
323,912 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.EndChecker | import random
class EndChecker(Instruction):
"""Checks that the prompt ends with a given phrase."""
def build_description(self, *, end_phrase=None):
"""Build the instruction description.
Args:
end_phrase: A string representing the phrase the response should end with.
Returns:... |
class EndChecker(Instruction):
'''Checks that the prompt ends with a given phrase.'''
def build_description(self, *, end_phrase=None):
'''Build the instruction description.
Args:
end_phrase: A string representing the phrase the response should end with.
Returns:
A s... | 5 | 4 | 6 | 0 | 4 | 2 | 2 | 0.53 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 9 | 30 | 4 | 17 | 7 | 12 | 9 | 15 | 7 | 10 | 3 | 1 | 1 | 6 |
323,913 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.ForbiddenWords | import re
class ForbiddenWords(Instruction):
"""Checks that specified words are not used in response."""
def build_description(self, forbidden_words=None):
"""Build the instruction description.
Args:
forbidden_words: A sequences of strings respresenting words that are not
... |
class ForbiddenWords(Instruction):
'''Checks that specified words are not used in response.'''
def build_description(self, forbidden_words=None):
'''Build the instruction description.
Args:
forbidden_words: A sequences of strings respresenting words that are not
allowed i... | 5 | 5 | 7 | 1 | 4 | 3 | 2 | 0.61 | 1 | 2 | 0 | 0 | 4 | 2 | 4 | 9 | 35 | 6 | 18 | 8 | 13 | 11 | 17 | 8 | 12 | 3 | 1 | 2 | 7 |
323,914 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.HighlightSectionChecker | import random
import re
class HighlightSectionChecker(Instruction):
"""Checks the highlighted section."""
def build_description(self, *, num_highlights=None):
"""Build the instruction description.
Args:
num_highlights: An integer specifying the minimum number of highlighted
... |
class HighlightSectionChecker(Instruction):
'''Checks the highlighted section.'''
def build_description(self, *, num_highlights=None):
'''Build the instruction description.
Args:
num_highlights: An integer specifying the minimum number of highlighted
sections.
Ret... | 5 | 5 | 11 | 1 | 6 | 4 | 2 | 0.72 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 9 | 50 | 7 | 25 | 11 | 20 | 18 | 22 | 11 | 17 | 5 | 1 | 2 | 9 |
323,915 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.Instruction | class Instruction:
"""An instruction template."""
def __init__(self, instruction_id):
self.id = instruction_id
def build_description(self, **kwargs):
raise NotImplementedError('`build_description` not implemented.')
def get_instruction_args(self):
raise NotImplementedError('`g... | class Instruction:
'''An instruction template.'''
def __init__(self, instruction_id):
pass
def build_description(self, **kwargs):
pass
def get_instruction_args(self):
pass
def get_instruction_args_keys(self):
pass
def check_following(self, value):
pas... | 6 | 1 | 2 | 0 | 2 | 0 | 1 | 0.09 | 0 | 1 | 0 | 29 | 5 | 1 | 5 | 5 | 17 | 5 | 11 | 7 | 5 | 1 | 11 | 7 | 5 | 1 | 0 | 0 | 5 |
323,916 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.JsonFormat | import json
class JsonFormat(Instruction):
"""Check the Json format."""
def build_description(self):
self._description_pattern = 'Entire output should be wrapped in JSON format. You can use markdown ticks such as ```.'
return self._description_pattern
def get_instruction_args(self):
... |
class JsonFormat(Instruction):
'''Check the Json format.'''
def build_description(self):
pass
def get_instruction_args(self):
'''Returns the keyward args of `build_description`.'''
pass
def get_instruction_args_keys(self):
'''Returns the args keys of `build_descriptio... | 5 | 3 | 7 | 0 | 6 | 1 | 1 | 0.12 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 9 | 32 | 4 | 25 | 7 | 20 | 3 | 15 | 6 | 10 | 2 | 1 | 1 | 5 |
323,917 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.KeySentenceChecker | import random
class KeySentenceChecker(Instruction):
"""Check the existence of certain key sentences."""
def build_description(self, key_sentences=None, num_sentences=None):
"""Build the instruction description.
Args:
key_sentences: A sequences of strings representing the key sentenc... |
class KeySentenceChecker(Instruction):
'''Check the existence of certain key sentences.'''
def build_description(self, key_sentences=None, num_sentences=None):
'''Build the instruction description.
Args:
key_sentences: A sequences of strings representing the key sentences that
... | 5 | 5 | 11 | 1 | 6 | 3 | 2 | 0.5 | 1 | 1 | 0 | 0 | 4 | 3 | 4 | 9 | 48 | 9 | 26 | 11 | 21 | 13 | 21 | 11 | 16 | 3 | 1 | 2 | 8 |
323,918 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.KeywordChecker | import re
class KeywordChecker(Instruction):
"""Check the exisitence of certain keywords."""
def build_description(self, *, keywords=None):
"""Build the instruction description.
Args:
keywords: A sequence of strings representing the keywords that are
expected in the respo... |
class KeywordChecker(Instruction):
'''Check the exisitence of certain keywords.'''
def build_description(self, *, keywords=None):
'''Build the instruction description.
Args:
keywords: A sequence of strings representing the keywords that are
expected in the response.
... | 5 | 5 | 8 | 1 | 4 | 3 | 2 | 0.61 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 9 | 36 | 7 | 18 | 8 | 13 | 11 | 17 | 8 | 12 | 3 | 1 | 2 | 7 |
323,919 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.KeywordFrequencyChecker | import random
import re
class KeywordFrequencyChecker(Instruction):
"""Check the keyword frequency."""
def build_description(self, *, keyword=None, frequency=None, relation=None):
"""Build the instruction description.
Args:
keyword: A string representing a keyword that is expected in... |
class KeywordFrequencyChecker(Instruction):
'''Check the keyword frequency.'''
def build_description(self, *, keyword=None, frequency=None, relation=None):
'''Build the instruction description.
Args:
keyword: A string representing a keyword that is expected in the response.
... | 5 | 5 | 15 | 1 | 10 | 4 | 3 | 0.44 | 1 | 1 | 0 | 0 | 4 | 4 | 4 | 9 | 65 | 9 | 39 | 10 | 34 | 17 | 23 | 10 | 18 | 5 | 1 | 1 | 10 |
323,920 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.LetterFrequencyChecker | import collections
import random
import string
class LetterFrequencyChecker(Instruction):
"""Checks letter frequency."""
def build_description(self, *, letter=None, let_frequency=None, let_relation=None):
"""Build the instruction description.
Args:
letter: A string representing a let... |
class LetterFrequencyChecker(Instruction):
'''Checks letter frequency.'''
def build_description(self, *, letter=None, let_frequency=None, let_relation=None):
'''Build the instruction description.
Args:
letter: A string representing a letter that is expected in the response.
... | 5 | 5 | 15 | 1 | 10 | 4 | 2 | 0.41 | 1 | 3 | 0 | 0 | 4 | 4 | 4 | 9 | 67 | 9 | 41 | 10 | 36 | 17 | 25 | 10 | 20 | 5 | 1 | 1 | 9 |
323,921 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.LowercaseLettersEnglishChecker | import langdetect
class LowercaseLettersEnglishChecker(Instruction):
"""Checks that the response is in english and is in all lowercase letters."""
def build_description(self):
"""Build the instruction description."""
self._description_pattern = 'Your entire response should be in English, and i... |
class LowercaseLettersEnglishChecker(Instruction):
'''Checks that the response is in english and is in all lowercase letters.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
pass
def get_instruction_args_keys(self)... | 5 | 4 | 5 | 0 | 4 | 1 | 1 | 0.35 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 9 | 27 | 5 | 17 | 7 | 12 | 6 | 15 | 6 | 10 | 2 | 1 | 1 | 5 |
323,922 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.NumberOfSentences | from pythainlp.tokenize import sent_tokenize as sent_tokenize_thai
import random
class NumberOfSentences(Instruction):
"""Check the number of sentences."""
def build_description(self, *, num_sentences=None, relation=None):
"""Build the instruction description.
Args:
num_sentences: An... |
class NumberOfSentences(Instruction):
'''Check the number of sentences.'''
def build_description(self, *, num_sentences=None, relation=None):
'''Build the instruction description.
Args:
num_sentences: An integer specifying the number of sentences as a
threshold.
... | 5 | 5 | 16 | 1 | 9 | 6 | 3 | 0.7 | 1 | 2 | 0 | 0 | 4 | 3 | 4 | 9 | 69 | 6 | 37 | 10 | 32 | 26 | 24 | 10 | 19 | 5 | 1 | 1 | 11 |
323,923 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.NumberOfWords | import random
from pythainlp.tokenize import word_tokenize as word_tokenize_thai
class NumberOfWords(Instruction):
"""Checks the number of words."""
def build_description(self, *, num_words=None, relation=None):
"""Build the instruction description.
Args:
num_words: An integer specif... |
class NumberOfWords(Instruction):
'''Checks the number of words.'''
def build_description(self, *, num_words=None, relation=None):
'''Build the instruction description.
Args:
num_words: An integer specifying the number of words contained in the
response.
relatio... | 5 | 5 | 13 | 1 | 8 | 4 | 3 | 0.52 | 1 | 1 | 0 | 0 | 4 | 3 | 4 | 9 | 56 | 9 | 31 | 10 | 26 | 16 | 24 | 10 | 19 | 5 | 1 | 1 | 11 |
323,924 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.ParagraphChecker | import re
import random
class ParagraphChecker(Instruction):
"""Checks the paragraphs."""
def build_description(self, *, num_paragraphs=None):
"""Build the instruction description.
Args:
num_paragraphs: An integer specifying the number of paragraphs.
Returns:
A stri... |
class ParagraphChecker(Instruction):
'''Checks the paragraphs.'''
def build_description(self, *, num_paragraphs=None):
'''Build the instruction description.
Args:
num_paragraphs: An integer specifying the number of paragraphs.
Returns:
A string representing the inst... | 5 | 5 | 11 | 1 | 6 | 4 | 2 | 0.74 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 9 | 48 | 8 | 23 | 10 | 18 | 17 | 20 | 10 | 15 | 4 | 1 | 3 | 8 |
323,925 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.PlaceholderChecker | import random
import re
class PlaceholderChecker(Instruction):
"""Check the placeholders in template writing."""
def build_description(self, *, num_placeholders=None):
"""Build the instruction description.
Args:
num_placeholders: An integer denoting the minimum number of
... |
class PlaceholderChecker(Instruction):
'''Check the placeholders in template writing.'''
def build_description(self, *, num_placeholders=None):
'''Build the instruction description.
Args:
num_placeholders: An integer denoting the minimum number of
placeholders required in... | 5 | 5 | 8 | 0 | 4 | 4 | 1 | 0.94 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 9 | 39 | 4 | 18 | 9 | 13 | 17 | 15 | 9 | 10 | 2 | 1 | 1 | 5 |
323,926 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.PostscriptChecker | import re
import random
class PostscriptChecker(Instruction):
"""Checks the postscript."""
def build_description(self, *, postscript_marker=None):
"""Build the instruction description.
Args:
postscript_marker: A string containing the keyword that marks the start
of the po... |
class PostscriptChecker(Instruction):
'''Checks the postscript.'''
def build_description(self, *, postscript_marker=None):
'''Build the instruction description.
Args:
postscript_marker: A string containing the keyword that marks the start
of the postscript section.
... | 5 | 5 | 10 | 1 | 6 | 4 | 2 | 0.78 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 9 | 47 | 6 | 23 | 9 | 18 | 18 | 19 | 9 | 14 | 4 | 1 | 1 | 9 |
323,927 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.QuotationChecker | class QuotationChecker(Instruction):
"""Checks response is wrapped with double quotation marks."""
def build_description(self):
"""Build the instruction description."""
self._description_pattern = 'Wrap your entire response with double quotation marks.'
return self._description_pattern
... | class QuotationChecker(Instruction):
'''Checks response is wrapped with double quotation marks.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
'''Returns the keyword args of build description.'''
pass
def g... | 5 | 5 | 6 | 0 | 5 | 1 | 1 | 0.29 | 1 | 0 | 0 | 0 | 4 | 1 | 4 | 9 | 31 | 4 | 21 | 9 | 16 | 6 | 14 | 9 | 9 | 1 | 1 | 0 | 4 |
323,928 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.RepeatPromptThenAnswer | class RepeatPromptThenAnswer(Instruction):
"""Checks that Prompt is first repeated then answered."""
def build_description(self, *, prompt_to_repeat=None):
"""Build the instruction description.
Args:
prompt_to_repeat: The prompt that is meant to be repeated.
Returns:
... | class RepeatPromptThenAnswer(Instruction):
'''Checks that Prompt is first repeated then answered.'''
def build_description(self, *, prompt_to_repeat=None):
'''Build the instruction description.
Args:
prompt_to_repeat: The prompt that is meant to be repeated.
Returns:
... | 5 | 3 | 7 | 0 | 5 | 2 | 2 | 0.38 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 9 | 33 | 4 | 21 | 7 | 16 | 8 | 15 | 7 | 10 | 2 | 1 | 1 | 6 |
323,929 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.RephraseChecker | import re
class RephraseChecker(Instruction):
"""Checks the repharse."""
def build_description(self, *, original_message):
"""Build the instruction description.
Args:
original_message: A string representing the original message. The
rephrased response should only change i... |
class RephraseChecker(Instruction):
'''Checks the repharse.'''
def build_description(self, *, original_message):
'''Build the instruction description.
Args:
original_message: A string representing the original message. The
rephrased response should only change its words/s... | 7 | 7 | 8 | 1 | 4 | 4 | 1 | 0.88 | 1 | 1 | 0 | 0 | 6 | 2 | 6 | 11 | 57 | 10 | 25 | 11 | 18 | 22 | 21 | 11 | 14 | 2 | 1 | 1 | 8 |
323,930 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.RephraseParagraph | import collections
import re
class RephraseParagraph(Instruction):
"""Checks that the paragraph is rephrased."""
def build_description(self, *, original_paragraph, low, high):
"""Builds the instruction description.
Args:
original_paragraph: A string presenting the original paragraph.... |
class RephraseParagraph(Instruction):
'''Checks that the paragraph is rephrased.'''
def build_description(self, *, original_paragraph, low, high):
'''Builds the instruction description.
Args:
original_paragraph: A string presenting the original paragraph. The
rephrases re... | 5 | 4 | 12 | 1 | 8 | 3 | 1 | 0.38 | 1 | 1 | 0 | 0 | 4 | 4 | 4 | 9 | 53 | 9 | 32 | 15 | 27 | 12 | 20 | 15 | 15 | 2 | 1 | 1 | 5 |
323,931 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.ResponseLanguageChecker | import langdetect
import random
class ResponseLanguageChecker(Instruction):
"""Check the language of the entire response."""
def build_description(self, *, language=None):
"""Build the instruction description.
Args:
language: A string representing the expected language of the respons... |
class ResponseLanguageChecker(Instruction):
'''Check the language of the entire response.'''
def build_description(self, *, language=None):
'''Build the instruction description.
Args:
language: A string representing the expected language of the response. The
language has ... | 5 | 5 | 10 | 1 | 5 | 5 | 2 | 1.05 | 1 | 2 | 0 | 0 | 4 | 2 | 4 | 9 | 46 | 6 | 20 | 8 | 15 | 21 | 18 | 7 | 13 | 2 | 1 | 1 | 6 |
323,932 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.SectionChecker | import re
import random
class SectionChecker(Instruction):
"""Checks the sections."""
def build_description(self, *, section_spliter=None, num_sections=None):
"""Build the instruction description.
Args:
section_spliter: A string represents the section spliter keyword that
... |
class SectionChecker(Instruction):
'''Checks the sections.'''
def build_description(self, *, section_spliter=None, num_sections=None):
'''Build the instruction description.
Args:
section_spliter: A string represents the section spliter keyword that
marks a new section, i.... | 5 | 5 | 13 | 1 | 7 | 5 | 2 | 0.72 | 1 | 1 | 0 | 0 | 4 | 3 | 4 | 9 | 57 | 7 | 29 | 11 | 24 | 21 | 19 | 11 | 14 | 4 | 1 | 1 | 7 |
323,933 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.TitleChecker | import re
class TitleChecker(Instruction):
"""Checks the response for a title."""
def build_description(self):
"""Build the instruction description."""
self._description_pattern = 'Your answer must contain a title, wrapped in double angular brackets, such as <<poem of joy>>.'
return se... |
class TitleChecker(Instruction):
'''Checks the response for a title.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
pass
def get_instruction_args_keys(self):
'''Returns the args keys of `build_description`... | 5 | 4 | 5 | 0 | 4 | 1 | 2 | 0.22 | 1 | 0 | 0 | 0 | 4 | 1 | 4 | 9 | 27 | 5 | 18 | 10 | 13 | 4 | 16 | 10 | 11 | 3 | 1 | 2 | 6 |
323,934 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/benchmarks/ifeval/utils/ifeval_utils.py | ifeval_utils.TwoResponsesChecker | class TwoResponsesChecker(Instruction):
"""Check that two responses were given."""
def build_description(self):
"""Build the instruction description."""
self._description_pattern = 'Give two different responses. Responses and only responses should be separated by 6 asterisk symbols: ******.'
... | class TwoResponsesChecker(Instruction):
'''Check that two responses were given.'''
def build_description(self):
'''Build the instruction description.'''
pass
def get_instruction_args(self):
'''Returns the keyward args of `build_description`.'''
pass
def get_instruction... | 5 | 5 | 7 | 0 | 5 | 2 | 2 | 0.48 | 1 | 2 | 0 | 0 | 4 | 1 | 4 | 9 | 35 | 4 | 21 | 9 | 16 | 10 | 17 | 9 | 12 | 4 | 1 | 3 | 7 |
323,935 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/cli/load_provider_confs.py | llama_verifications.cli.load_provider_confs.ModelConfig | from pydantic import BaseModel
class ModelConfig(BaseModel):
id: str
canonical_id: str |
class ModelConfig(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.67 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 0 | 3 | 1 | 2 | 2 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
323,936 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/cli/load_provider_confs.py | llama_verifications.cli.load_provider_confs.ProviderConfig | from pydantic import BaseModel
class ProviderConfig(BaseModel):
provider: str
base_url: str
api_key_var: str
models: list[ModelConfig]
test_exclusions: dict[str, list[str]]
self_hosted: bool = False |
class ProviderConfig(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 7 | 0 | 7 | 2 | 6 | 0 | 7 | 2 | 6 | 0 | 5 | 0 | 0 |
323,937 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/reporting/diff_generator.py | llama_verifications.reporting.diff_generator.DiffGenerator | from llama_verifications.schemas.report_diff_v1 import BenchmarkDiff, FunctionalTestsDiff, NumberTriplet, ReportDiffV1
from datetime import UTC, datetime
from llama_verifications.schemas.report_v1 import ReportV1
import json
from pathlib import Path
class DiffGenerator:
"""Generates diff reports comparing two eval... |
class DiffGenerator:
'''Generates diff reports comparing two evaluation runs.'''
def generate_diff(self, baseline_report: ReportV1, target_report: ReportV1, output_path: Path | None=None) -> ReportDiffV1:
'''Generate a diff report comparing baseline and target runs.
Args:
baseline_... | 7 | 7 | 40 | 7 | 27 | 7 | 5 | 0.27 | 0 | 12 | 5 | 0 | 6 | 0 | 6 | 6 | 250 | 48 | 160 | 61 | 141 | 43 | 85 | 47 | 78 | 8 | 0 | 2 | 27 |
323,938 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/reporting/unified_reporter.py | llama_verifications.reporting.unified_reporter.UnifiedReporter | from datetime import UTC, datetime
from llama_verifications.schemas.report_v1 import BenchmarkResult, Benchmarks, BenchmarksSummary, EvalTestCase, FunctionalTests, FunctionalTestsSummary, ReportV1
import uuid
from typing import Any
from pathlib import Path
import json
class UnifiedReporter:
"""Generates unified re... |
class UnifiedReporter:
'''Generates unified reports from functional tests and benchmarks.'''
def __init__(self, results_dir: Path):
pass
def generate_report(self, provider: str, model: str, model_checkpoint: str, run_id: str | None=None, metadata: dict[str, Any] | None=None, output_path: Path | N... | 6 | 5 | 44 | 6 | 31 | 7 | 5 | 0.22 | 0 | 15 | 7 | 0 | 5 | 1 | 5 | 5 | 227 | 36 | 157 | 52 | 143 | 34 | 86 | 38 | 80 | 8 | 0 | 4 | 26 |
323,939 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_diff_v1.py | llama_verifications.schemas.report_diff_v1.BenchmarkDiff | from pydantic import BaseModel, Field
class BenchmarkDiff(BaseModel):
"""Individual benchmark diff result."""
name: str = Field(..., description='Benchmark name')
metric: str = Field(..., description='Metric name')
baseline: float | None = Field(None, description='Baseline metric value')
target: fl... |
class BenchmarkDiff(BaseModel):
'''Individual benchmark diff result.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 9 | 1 | 7 | 7 | 6 | 1 | 7 | 7 | 6 | 0 | 5 | 0 | 0 |
323,940 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_diff_v1.py | llama_verifications.schemas.report_diff_v1.FunctionalTestsDiff | from pydantic import BaseModel, Field
class FunctionalTestsDiff(BaseModel):
"""Functional tests diff section."""
summary: dict[str, NumberTriplet] = Field(..., description='Summary statistics as triplets (baseline, target, delta)')
regressions: list[str] | None = Field(None, description='List of test names... |
class FunctionalTestsDiff(BaseModel):
'''Functional tests diff section.'''
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 |
323,941 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_diff_v1.py | llama_verifications.schemas.report_diff_v1.NumberTriplet | from pydantic import BaseModel, Field
class NumberTriplet(BaseModel):
"""Triplet of baseline, target, and delta values."""
baseline: float | None = Field(None, description='Baseline value')
target: float | None = Field(None, description='Target value')
delta: float | None = Field(None, description='Del... |
class NumberTriplet(BaseModel):
'''Triplet of baseline, target, and delta values.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 6 | 1 | 4 | 4 | 3 | 1 | 4 | 4 | 3 | 0 | 5 | 0 | 0 |
323,942 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_diff_v1.py | llama_verifications.schemas.report_diff_v1.ReportDiffV1 | from pydantic import BaseModel, Field
from datetime import datetime
from uuid import UUID
from typing import Any, Literal
class ReportDiffV1(BaseModel):
"""Report diff schema v1.0 for comparing two evaluation runs."""
schema_version: Literal['1.0'] = Field('1.0', description='Schema version')
generated_at:... |
class ReportDiffV1(BaseModel):
'''Report diff schema v1.0 for comparing two evaluation runs.'''
class Config:
def to_json_dict(self) -> dict[str, Any]:
'''Convert to JSON-serializable dictionary.'''
pass | 3 | 2 | 12 | 0 | 9 | 3 | 4 | 0.19 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 83 | 28 | 3 | 21 | 10 | 18 | 4 | 18 | 10 | 15 | 4 | 5 | 1 | 4 |
323,943 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.BenchmarkResult | from typing import Any, Literal
from pydantic import BaseModel, Field, model_validator
class BenchmarkResult(BaseModel):
"""Individual benchmark result."""
name: str = Field(..., description='Dataset/benchmark identifier')
topline_metric_name: str = Field(..., description='Primary metric name')
metrics... |
class BenchmarkResult(BaseModel):
'''Individual benchmark result.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 8 | 1 | 6 | 6 | 5 | 1 | 6 | 6 | 5 | 0 | 5 | 0 | 0 |
323,944 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.Benchmarks | from pydantic import BaseModel, Field, model_validator
class Benchmarks(BaseModel):
"""Benchmarks section of the report."""
summary: BenchmarksSummary
benchmarks: list[BenchmarkResult] = Field(default_factory=list, description='Individual benchmark results') |
class Benchmarks(BaseModel):
'''Benchmarks section of the report.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 1 | 3 | 2 | 2 | 1 | 3 | 2 | 2 | 0 | 5 | 0 | 0 |
323,945 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.BenchmarksSummary | from pydantic import BaseModel, Field, model_validator
class BenchmarksSummary(BaseModel):
"""Summary statistics for benchmarks."""
total: int = Field(..., ge=0, description='Number of benchmarks executed') |
class BenchmarksSummary(BaseModel):
'''Summary statistics for benchmarks.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 4 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
323,946 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.FunctionalTests | from pydantic import BaseModel, Field, model_validator
class FunctionalTests(BaseModel):
"""Functional tests section of the report."""
summary: FunctionalTestsSummary
cases: list[EvalTestCase] = Field(default_factory=list, description='Individual test case results') |
class FunctionalTests(BaseModel):
'''Functional tests section of the report.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 1 | 3 | 2 | 2 | 1 | 3 | 2 | 2 | 0 | 5 | 0 | 0 |
323,947 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.FunctionalTestsSummary | from pydantic import BaseModel, Field, model_validator
class FunctionalTestsSummary(BaseModel):
"""Summary statistics for functional tests."""
total: int = Field(..., ge=0, description='Total number of tests')
passed: int = Field(..., ge=0, description='Number of passed tests')
failed: int = Field(...,... | null | 4 | 2 | 8 | 0 | 7 | 1 | 4 | 0.12 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 83 | 21 | 2 | 17 | 12 | 13 | 2 | 15 | 11 | 13 | 4 | 5 | 2 | 4 |
323,948 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/schemas/report_v1.py | llama_verifications.schemas.report_v1.ReportV1 | from typing import Any, Literal
from uuid import UUID
from datetime import datetime
from pydantic import BaseModel, Field, model_validator
class ReportV1(BaseModel):
"""Main report schema v1.0 for Llama Stack Evals."""
schema_version: Literal['1.0'] = Field('1.0', description='Schema version')
generated_at... |
class ReportV1(BaseModel):
'''Main report schema v1.0 for Llama Stack Evals.'''
class Config:
def to_json_dict(self) -> dict[str, Any]:
'''Convert to JSON-serializable dictionary.'''
pass | 3 | 2 | 10 | 0 | 7 | 3 | 3 | 0.17 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 83 | 31 | 3 | 24 | 12 | 21 | 4 | 19 | 12 | 16 | 3 | 5 | 1 | 3 |
323,949 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/models/interface.py | models.interface.IModel | from abc import ABC, abstractmethod
class IModel(ABC):
"""Base class for all LLM model wrappers."""
def __init__(self, model_name: str, api_key: str | None=None):
self.model_name = model_name
self.api_key = api_key
@abstractmethod
def minibatch_size(self) -> int:
raise NotImpl... |
class IModel(ABC):
'''Base class for all LLM model wrappers.'''
def __init__(self, model_name: str, api_key: str | None=None):
pass
@abstractmethod
def minibatch_size(self) -> int:
pass
@abstractmethod
def generate(self, dialog_minibatch: list[Dialog], *, temperature: float, ma... | 7 | 2 | 4 | 0 | 4 | 0 | 1 | 0.11 | 1 | 5 | 0 | 2 | 4 | 2 | 4 | 24 | 25 | 4 | 19 | 16 | 5 | 2 | 10 | 7 | 5 | 1 | 4 | 0 | 4 |
323,950 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/models/openai_model.py | models.openai_model.OpenAIModel | import time
from openai import OpenAI
import json
import copy
import os
from .interface import Dialog, IModel
from openai.types.chat import ChatCompletionMessage
from typing import Any
class OpenAIModel(IModel):
"""Call any OpenAI compatible API endpoint."""
def __init__(self, model_id: str, system_message: s... |
class OpenAIModel(IModel):
'''Call any OpenAI compatible API endpoint.'''
def __init__(self, model_id: str, system_message: str | None=None, base_url: str | None=None, api_key: str | None=None):
pass
def minibatch_size(self) -> int:
pass
def generate(self, dialog_minibatch: list[Dial... | 5 | 1 | 20 | 1 | 18 | 1 | 4 | 0.05 | 1 | 8 | 0 | 0 | 4 | 6 | 4 | 28 | 84 | 6 | 74 | 34 | 55 | 4 | 46 | 19 | 41 | 12 | 5 | 5 | 16 |
323,951 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/preprocessor/interface.py | preprocessor.interface.IPreprocessor | from ..datasets.interface import Row
from abc import ABC, abstractmethod
from ..utils.utils import map_with_progress
class IPreprocessor(ABC):
def __init__(self, preprocessor_id: str):
self.preprocessor_id = preprocessor_id
@abstractmethod
def preprocess_row(self, row: Row) -> Row:
pass
... |
class IPreprocessor(ABC):
def __init__(self, preprocessor_id: str):
pass
@abstractmethod
def preprocess_row(self, row: Row) -> Row:
pass
def preprocess_row(self, row: Row) -> Row:
pass
def preprocess_row_wrapper(row: Row) -> Row:
pass
def __str__(s... | 7 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 2 | 0 | 7 | 4 | 1 | 4 | 24 | 18 | 4 | 14 | 9 | 7 | 0 | 13 | 8 | 7 | 1 | 4 | 0 | 5 |
323,952 | meta-llama/llama-verifications | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/meta-llama_llama-verifications/llama_verifications/benchmarks/preprocessor/registry.py | preprocessor.registry.PreprocessorRegistry | from .interface import IPreprocessor
class PreprocessorRegistry:
_preprocessor_registry: dict[str, type[IPreprocessor]] = {}
@staticmethod
def register_preprocessor(preprocessor_id: str, preprocessor: IPreprocessor):
PreprocessorRegistry._preprocessor_registry[preprocessor_id] = preprocessor
... |
class PreprocessorRegistry:
@staticmethod
def register_preprocessor(preprocessor_id: str, preprocessor: IPreprocessor):
pass
@staticmethod
def get_preprocessor(preprocessor_id: str) -> IPreprocessor:
pass
@staticmethod
def get_preprocessor_ids() -> list[str]:
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 3 | 3 | 14 | 3 | 11 | 8 | 4 | 0 | 8 | 5 | 4 | 1 | 0 | 0 | 3 |
323,953 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/Dataset.py | followthemoney.dataset.Dataset.Dataset | from followthemoney.util import PathLike
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
from typing_extensions import Self
from followthemoney.dataset.resource import DataResource
from functools import cached_property
import yaml
class Dataset:
"""A container for entities, often from one source o... |
class Dataset:
'''A container for entities, often from one source or related to one topic.
A dataset is a set of data, sez W3C.'''
def __init__(self: Self, data: Dict[str, Any]) -> None:
pass
@cached_property
def is_collection(self: Self) -> bool:
pass
@property
def dataset... | 22 | 3 | 4 | 0 | 4 | 0 | 1 | 0.09 | 0 | 10 | 3 | 0 | 12 | 3 | 14 | 14 | 78 | 16 | 58 | 35 | 32 | 5 | 49 | 25 | 32 | 3 | 0 | 2 | 20 |
323,954 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/Dataset.py | followthemoney.dataset.Dataset.DatasetModel | from followthemoney.dataset.util import Url, DateTimeISO, dataset_name_check
from followthemoney.dataset.publisher import DataPublisher
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
from followthemoney.dataset.resource import DataResource
from followthemoney.dataset.coverage import DataCoverage
from ... |
class DatasetModel(BaseModel):
@field_validator('name', mode='after')
@classmethod
def check_name(cls, value: str) -> str:
pass
@model_validator(mode='before')
@classmethod
def ensure_data(cls, data: Any) -> Any:
pass
def get_resource(self, name: str) -> DataResource:
... | 8 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 6 | 1 | 0 | 1 | 0 | 3 | 85 | 42 | 3 | 39 | 23 | 31 | 0 | 35 | 21 | 31 | 3 | 5 | 2 | 7 |
323,955 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/catalog.py | followthemoney.dataset.catalog.DataCatalog | from followthemoney.util import PathLike
from typing import Optional, Dict, Any, Generic, Set, Type, List
from followthemoney.exc import MetadataException
from followthemoney.dataset.dataset import DS
import yaml
from followthemoney.types import registry
class DataCatalog(Generic[DS]):
"""A data catalog is a colle... |
class DataCatalog(Generic[DS]):
'''A data catalog is a collection of datasets. It provides methods for retrieving or
creating datasets, and for checking if a dataset exists in the catalog.'''
def __init__(self, dataset_type: Type[DS], data: Dict[str, Any]) -> None:
pass
def add(self, dataset:... | 13 | 7 | 5 | 0 | 5 | 1 | 2 | 0.2 | 1 | 4 | 1 | 0 | 9 | 3 | 10 | 12 | 68 | 10 | 49 | 23 | 36 | 10 | 44 | 20 | 33 | 4 | 1 | 2 | 19 |
323,956 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/coverage.py | followthemoney.dataset.coverage.DataCoverage | from pydantic import BaseModel
from followthemoney.dataset.util import CountryCode, PartialDate
from typing import List, Literal, Optional, TypeAlias
class DataCoverage(BaseModel):
"""Details on the temporal and geographic scope of a dataset."""
start: Optional[PartialDate] = None
end: Optional[PartialDate... |
class DataCoverage(BaseModel):
'''Details on the temporal and geographic scope of a dataset.'''
def __repr__(self) -> str:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.13 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 83 | 11 | 2 | 8 | 7 | 6 | 1 | 8 | 7 | 6 | 1 | 5 | 0 | 1 |
323,957 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/dataset.py | followthemoney.dataset.dataset.Dataset | from typing_extensions import Self
from functools import cached_property
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
from followthemoney.util import PathLike
import yaml
from followthemoney.dataset.resource import DataResource
class Dataset:
"""A container for entities, often from one source o... |
class Dataset:
'''A container for entities, often from one source or related to one topic.
A dataset is a set of data, sez W3C.'''
def __init__(self: Self, data: Dict[str, Any]) -> None:
pass
@cached_property
def is_collection(self: Self) -> bool:
pass
@property
def dataset... | 22 | 3 | 4 | 0 | 4 | 0 | 1 | 0.09 | 0 | 10 | 3 | 0 | 12 | 3 | 14 | 14 | 78 | 16 | 58 | 35 | 32 | 5 | 49 | 25 | 32 | 3 | 0 | 2 | 20 |
323,958 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/dataset.py | followthemoney.dataset.dataset.DatasetModel | from followthemoney.dataset.publisher import DataPublisher
from pydantic import BaseModel, field_validator, model_validator
from followthemoney.dataset.util import Url, DateTimeISO, dataset_name_check
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
from followthemoney.dataset.coverage import DataCovera... |
class DatasetModel(BaseModel):
@field_validator('name', mode='after')
@classmethod
def check_name(cls, value: str) -> str:
pass
@model_validator(mode='before')
@classmethod
def ensure_data(cls, data: Any) -> Any:
pass
def get_resource(self, name: str) -> DataResource:
... | 8 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 1 | 6 | 1 | 0 | 1 | 0 | 3 | 85 | 42 | 3 | 39 | 23 | 31 | 0 | 35 | 21 | 31 | 3 | 5 | 2 | 7 |
323,959 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/publisher.py | followthemoney.dataset.publisher.DataPublisher | from pydantic import BaseModel, computed_field
from typing import Optional
from followthemoney.dataset.util import CountryCode, Url
from followthemoney.types import registry
class DataPublisher(BaseModel):
"""Publisher information, eg. the government authority."""
name: str
url: Optional[Url] = None
na... |
class DataPublisher(BaseModel):
'''Publisher information, eg. the government authority.'''
@computed_field
@property
def country_label(self) -> Optional[str]:
pass | 4 | 1 | 4 | 0 | 4 | 0 | 2 | 0.2 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 83 | 19 | 2 | 15 | 10 | 11 | 3 | 13 | 9 | 11 | 2 | 5 | 1 | 2 |
323,960 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/dataset/resource.py | followthemoney.dataset.resource.DataResource | from pydantic import BaseModel, field_validator, computed_field
from followthemoney.dataset.util import Url, DateTimeISO
from typing import Optional
from followthemoney.types import registry
class DataResource(BaseModel):
"""A downloadable resource that is part of a dataset."""
name: str
url: Optional[Url]... |
class DataResource(BaseModel):
'''A downloadable resource that is part of a dataset.'''
@field_validator('mime_type', mode='after')
@classmethod
def ensure_mime_type(cls, value: str) -> Optional[str]:
pass
@computed_field
@property
def mime_type_label(self) -> Optional[str]:
... | 7 | 1 | 5 | 0 | 5 | 0 | 2 | 0.14 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 84 | 26 | 3 | 21 | 12 | 14 | 3 | 17 | 10 | 14 | 2 | 5 | 1 | 4 |
323,961 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/entity.py | followthemoney.entity.ValueEntity | from followthemoney.schema import Schema
from followthemoney.statement import BASE_ID, Statement
from rigour.names import pick_name
from followthemoney.proxy import EntityProxy
from typing import Any, Dict, List, Optional, Set, TypeVar
class ValueEntity(EntityProxy):
"""
This class has the extended attributes ... |
class ValueEntity(EntityProxy):
'''
This class has the extended attributes from `StatementEntity` but without
statements. Useful for streaming around. Starting from followthemoeny 4.0,
applications should use this entity class as the base class.
'''
def __init__(self, schema: Schema, data:... | 4 | 1 | 19 | 0 | 18 | 1 | 4 | 0.1 | 1 | 8 | 2 | 0 | 3 | 7 | 3 | 38 | 81 | 5 | 69 | 23 | 59 | 7 | 39 | 17 | 35 | 5 | 2 | 2 | 11 |
323,962 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.ErrorSpec | from typing import Dict, Optional, TypedDict
class ErrorSpec(TypedDict, total=False):
properties: Dict[str, str] |
class ErrorSpec(TypedDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 0 |
323,963 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.FollowTheMoneyException | class FollowTheMoneyException(Exception):
"""Catch-all exception for errors emitted by this library."""
pass | class FollowTheMoneyException(Exception):
'''Catch-all exception for errors emitted by this library.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 4 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
323,964 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.InvalidData | from typing import Dict, Optional, TypedDict
class InvalidData(FollowTheMoneyException):
"""Schema validation errors will be caught by the API."""
def __init__(self, message: str, errors: Optional[ErrorSpec]=None) -> None:
super(InvalidData, self).__init__(message)
self.errors: ErrorSpec = err... |
class InvalidData(FollowTheMoneyException):
'''Schema validation errors will be caught by the API.'''
def __init__(self, message: str, errors: Optional[ErrorSpec]=None) -> None:
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 1 | 3 | 1 | 0 | 1 | 1 | 1 | 11 | 6 | 1 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
323,965 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.InvalidMapping | class InvalidMapping(FollowTheMoneyException):
"""A data mapping was invalid."""
pass | class InvalidMapping(FollowTheMoneyException):
'''A data mapping was invalid.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,966 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.InvalidModel | class InvalidModel(FollowTheMoneyException):
"""The schema model is not defined correctly."""
pass | class InvalidModel(FollowTheMoneyException):
'''The schema model is not defined correctly.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,967 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/exc.py | followthemoney.exc.MetadataException | class MetadataException(FollowTheMoneyException):
"""An exception raised by dataset metadata validation."""
pass | class MetadataException(FollowTheMoneyException):
'''An exception raised by dataset metadata validation.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
323,968 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/common.py | followthemoney.export.common.Exporter | from followthemoney.schema import Schema
from followthemoney.proxy import EntityProxy
from typing import Generator, List, Optional, Tuple
from followthemoney.types import registry
from followthemoney.property import Property
class Exporter(object):
def __init__(self, export_all: bool=False) -> None:
self.... |
class Exporter(object):
def __init__(self, export_all: bool=False) -> None:
pass
def exportable_properties(self, schema: Schema) -> Generator[Property, None, None]:
pass
def exportable_fields(self, proxy: EntityProxy) -> Generator[Tuple[Property, List[str]], None, None]:
pass
... | 6 | 0 | 3 | 0 | 3 | 0 | 2 | 0 | 1 | 6 | 3 | 4 | 5 | 1 | 5 | 5 | 22 | 4 | 18 | 11 | 10 | 0 | 16 | 9 | 10 | 4 | 1 | 3 | 9 |
323,969 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/csv.py | followthemoney.export.csv.CSVExporter | from followthemoney.util import PathLike
from followthemoney.proxy import EntityProxy
from followthemoney.export.common import Exporter
from followthemoney.schema import Schema
from typing import Any, Dict, List, Optional, Protocol, Tuple
class CSVExporter(Exporter, CSVMixin):
def __init__(self, directory: PathLi... |
class CSVExporter(Exporter, CSVMixin):
def __init__(self, directory: PathLike, export_all: bool=True, extra: Optional[List[str]]=None) -> None:
pass
def _write_header(self, writer: CSVWriter, schema: Schema) -> None:
pass
def write(self, proxy: EntityProxy, extra: Optional[List[str]]=Non... | 5 | 0 | 6 | 0 | 6 | 0 | 2 | 0.04 | 2 | 5 | 3 | 0 | 4 | 0 | 4 | 14 | 29 | 4 | 24 | 15 | 14 | 1 | 19 | 10 | 14 | 2 | 2 | 1 | 6 |
323,970 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/csv.py | followthemoney.export.csv.CSVMixin | import csv
from followthemoney.schema import Schema
from followthemoney.util import PathLike
from pathlib import Path
from io import TextIOWrapper
from typing import Any, Dict, List, Optional, Protocol, Tuple
class CSVMixin(object):
def _configure(self, directory: PathLike, extra: Optional[List[str]]=None) -> Non... |
class CSVMixin(object):
def _configure(self, directory: PathLike, extra: Optional[List[str]]=None) -> None:
pass
def _open_csv_file(self, name: str) -> Tuple[TextIOWrapper, CSVWriter]:
pass
def _write_header(self, writer: CSVWriter, schema: Schema) -> None:
pass
def _get_wri... | 6 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 6 | 2 | 2 | 5 | 3 | 5 | 5 | 31 | 4 | 27 | 18 | 17 | 0 | 23 | 14 | 17 | 2 | 1 | 1 | 7 |
323,971 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/csv.py | followthemoney.export.csv.CSVWriter | from typing import Any, Dict, List, Optional, Protocol, Tuple
class CSVWriter(Protocol):
@property
def dialect(self) -> Any:
...
def writerow(self, row: Any) -> Any:
...
def writerows(self, rows: Any) -> None:
... |
class CSVWriter(Protocol):
@property
def dialect(self) -> Any:
pass
def writerow(self, row: Any) -> Any:
pass
def writerows(self, rows: Any) -> None:
pass | 5 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 27 | 5 | 0 | 5 | 5 | 3 | 0 | 7 | 4 | 3 | 1 | 5 | 0 | 3 |
323,972 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/excel.py | followthemoney.export.excel.ExcelExporter | from typing import Dict, List, Optional
from followthemoney.util import PathLike, sanitize_text
from followthemoney.proxy import E
from openpyxl.utils.exceptions import IllegalCharacterError
from openpyxl.worksheet.worksheet import Worksheet
from followthemoney.export.common import Exporter
from followthemoney.schema i... |
class ExcelExporter(ExcelWriter, Exporter):
def __init__(self, file_path: PathLike, extra: Optional[List[str]]=None):
pass
def write(self, proxy: E, extra: Optional[List[str]]=None) -> None:
pass
def finalize(self) -> None:
pass | 4 | 0 | 8 | 0 | 8 | 0 | 2 | 0 | 2 | 2 | 1 | 0 | 3 | 3 | 3 | 11 | 28 | 2 | 26 | 13 | 22 | 0 | 26 | 12 | 22 | 5 | 2 | 2 | 7 |
323,973 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/excel.py | followthemoney.export.excel.ExcelWriter | from followthemoney.util import PathLike, sanitize_text
from openpyxl.worksheet.worksheet import Worksheet
from openpyxl import Workbook
from typing import Dict, List, Optional
from openpyxl.styles import Font, PatternFill
from openpyxl.cell import WriteOnlyCell
from io import BytesIO
class ExcelWriter(object):
HE... |
class ExcelWriter(object):
def __init__(self) -> None:
pass
def make_sheet(self, title: str, headers: List[str]) -> Worksheet:
pass
def get_bytesio(self) -> BytesIO:
pass | 4 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 1 | 0 | 1 | 3 | 1 | 3 | 3 | 28 | 3 | 25 | 13 | 21 | 0 | 23 | 13 | 19 | 2 | 1 | 1 | 4 |
323,974 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/graph.py | followthemoney.export.graph.GraphExporter | from followthemoney.export.common import Exporter
from followthemoney.types import registry
from followthemoney.graph import Edge, Graph, Node
from typing import Dict, Iterable, List, Optional, TextIO, Union
from followthemoney.proxy import E
class GraphExporter(Exporter):
"""Base functions for exporting a propert... |
class GraphExporter(Exporter):
'''Base functions for exporting a property graph from a stream
of entities.'''
def __init__(self, edge_types: Iterable[str]=DEFAULT_EDGE_TYPES) -> None:
pass
def get_attributes(self, element: Union[Node, Edge]) -> Dict[str, str]:
pass
def write(self... | 7 | 1 | 3 | 0 | 3 | 0 | 1 | 0.1 | 1 | 5 | 3 | 3 | 6 | 1 | 6 | 11 | 29 | 6 | 21 | 11 | 14 | 2 | 21 | 11 | 14 | 3 | 2 | 2 | 8 |
323,975 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/graph.py | followthemoney.export.graph.NXGraphExporter | from typing import Dict, Iterable, List, Optional, TextIO, Union
import networkx as nx
from networkx.readwrite.gexf import generate_gexf
class NXGraphExporter(GraphExporter):
"""Write to NetworkX data structure, which in turn can be exported
to the file formats for Gephi (GEXF) and D3."""
def __init__(sel... |
class NXGraphExporter(GraphExporter):
'''Write to NetworkX data structure, which in turn can be exported
to the file formats for Gephi (GEXF) and D3.'''
def __init__(self, fh: TextIO, edge_types: Iterable[str]=DEFAULT_EDGE_TYPES) -> None:
pass
def finalize_graph(self) -> None:
'''Conv... | 3 | 2 | 14 | 2 | 12 | 1 | 4 | 0.13 | 1 | 3 | 0 | 0 | 2 | 1 | 2 | 13 | 32 | 5 | 24 | 11 | 19 | 3 | 22 | 9 | 19 | 6 | 3 | 2 | 7 |
323,976 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/neo4j.py | followthemoney.export.neo4j.CypherGraphExporter | from followthemoney.util import PathLike, const_case
import json
from typing import Any, Dict, Iterable, List, Optional, Set, TextIO
from followthemoney.export.graph import GraphExporter, DEFAULT_EDGE_TYPES
class CypherGraphExporter(GraphExporter):
"""Cypher query format, used for import to Neo4J. This is a bit li... |
class CypherGraphExporter(GraphExporter):
'''Cypher query format, used for import to Neo4J. This is a bit like
writing SQL with individual statements - so for large datasets it
might be a better idea to do a CSV-based import.'''
def __init__(self, fh: TextIO, edge_types: Iterable[str]=DEFAULT_EDGE_TYP... | 4 | 2 | 19 | 1 | 18 | 0 | 4 | 0.11 | 1 | 6 | 0 | 0 | 3 | 2 | 3 | 14 | 67 | 6 | 55 | 13 | 51 | 6 | 36 | 13 | 32 | 8 | 3 | 2 | 12 |
323,977 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/neo4j.py | followthemoney.export.neo4j.Neo4JCSVExporter | from followthemoney.export.csv import CSVMixin, CSVWriter
from followthemoney.graph import Edge, Node
from followthemoney.export.graph import GraphExporter, DEFAULT_EDGE_TYPES
import os
from followthemoney.schema import Schema
from followthemoney.util import PathLike, const_case
from typing import Any, Dict, Iterable, ... |
class Neo4JCSVExporter(CSVMixin, GraphExporter):
def __init__(self, directory: PathLike, extra: Optional[List[str]]=None, edge_types: Iterable[str]=DEFAULT_EDGE_TYPES) -> None:
pass
def _write_header(self, writer: CSVWriter, schema: Schema) -> None:
pass
def write_graph(self, extra: Opti... | 7 | 0 | 15 | 2 | 13 | 0 | 3 | 0.01 | 2 | 7 | 4 | 0 | 6 | 5 | 6 | 22 | 96 | 14 | 81 | 36 | 69 | 1 | 74 | 30 | 67 | 5 | 3 | 3 | 19 |
323,978 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/export/rdf.py | followthemoney.export.rdf.RDFExporter | from followthemoney.types import registry
from rdflib.term import Identifier, URIRef, Literal
from followthemoney.export.common import Exporter
from prefixdate import Precision
from rdflib import Graph, Namespace
from followthemoney.proxy import EntityProxy
from rdflib import RDF, SKOS, XSD
from typing import Generator... |
class RDFExporter(Exporter):
'''Export the entity as RDF N-Triples.'''
def __init__(self, fh: TextIO, qualified: bool=True) -> None:
pass
def entity_triples(self, proxy: EntityProxy) -> Generator[Triple, None, None]:
pass
def write(self, proxy: EntityProxy, extra: Optional[List[str]]... | 4 | 1 | 14 | 0 | 14 | 0 | 5 | 0.02 | 1 | 7 | 1 | 0 | 3 | 2 | 3 | 8 | 62 | 5 | 56 | 16 | 52 | 1 | 39 | 16 | 35 | 11 | 2 | 3 | 15 |
323,979 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/graph.py | followthemoney.graph.Edge | from followthemoney.property import Property
from followthemoney.exc import InvalidModel
from typing import Any, Dict, Generator, Iterable, List, Optional
from followthemoney.proxy import EntityProxy
from followthemoney.schema import Schema
class Edge(object):
"""A link between two nodes."""
__slots__ = ['id',... |
class Edge(object):
'''A link between two nodes.'''
def __init__(self, graph: 'Graph', source: Node, target: Node, proxy: Optional[EntityProxy]=None, prop: Optional[Property]=None, value: Optional[str]=None):
pass
@property
def source(self) -> Optional[Node]:
'''The graph node from whi... | 16 | 6 | 7 | 0 | 6 | 1 | 2 | 0.1 | 1 | 9 | 5 | 0 | 10 | 8 | 10 | 10 | 97 | 11 | 78 | 33 | 54 | 8 | 51 | 20 | 40 | 4 | 1 | 2 | 21 |
323,980 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/graph.py | followthemoney.graph.Graph | from followthemoney.property import Property
from followthemoney.exc import InvalidModel
from followthemoney.types.common import PropertyType
from followthemoney.proxy import EntityProxy
from followthemoney.types import registry
from typing import Any, Dict, Generator, Iterable, List, Optional
class Graph(object):
... |
class Graph(object):
'''A set of nodes and edges, derived from entities and their properties.
This represents an alternative interpretation of FtM data as a property
graph.
This class is meant to be extensible in order to support additional
backends, like Aleph.
'''
def __init__(self, edge... | 16 | 12 | 7 | 0 | 6 | 1 | 3 | 0.26 | 1 | 8 | 6 | 0 | 14 | 4 | 14 | 14 | 122 | 15 | 85 | 38 | 63 | 22 | 74 | 30 | 59 | 6 | 1 | 3 | 35 |
323,981 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/graph.py | followthemoney.graph.Node | from followthemoney.types.common import PropertyType
from followthemoney.schema import Schema
from typing import Any, Dict, Generator, Iterable, List, Optional
from followthemoney.proxy import EntityProxy
from followthemoney.exc import InvalidModel
from followthemoney.types import registry
class Node(object):
"""A... |
class Node(object):
'''A node represents either an entity that can be rendered as a
node in a graph, or as a re-ified value, like a name, email
address or phone number.'''
def __init__(self, type_: PropertyType, value: str, proxy: Optional[EntityProxy]=None, schema: Optional[Schema]=None) -> None:
... | 13 | 5 | 5 | 0 | 4 | 1 | 1 | 0.3 | 1 | 8 | 4 | 0 | 8 | 5 | 9 | 9 | 66 | 10 | 43 | 26 | 24 | 13 | 29 | 17 | 19 | 2 | 1 | 1 | 12 |
323,982 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/csv.py | followthemoney.mapping.csv.CSVSource | from followthemoney.mapping.source import Record, Source
from urllib.parse import urlparse
from csv import DictReader
import os
import requests
from typing import TYPE_CHECKING, cast
from typing import Any, Dict, Generator, ItemsView, Iterable, List, Optional, Set, Tuple
from banal import keys_values, ensure_list
impor... |
class CSVSource(Source):
'''Special case for entity loading directly from a CSV URL'''
def __init__(self, query: 'QueryMapping', data: Dict[str, Any]) -> None:
pass
def _parse_filters(self, filters: ItemsView[str, Any]) -> FilterList:
pass
def check_filters(self, data: Record) -> boo... | 9 | 2 | 9 | 0 | 8 | 1 | 4 | 0.08 | 1 | 7 | 1 | 0 | 5 | 3 | 6 | 9 | 64 | 8 | 52 | 27 | 43 | 4 | 49 | 24 | 42 | 5 | 2 | 3 | 21 |
323,983 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/entity.py | followthemoney.mapping.entity.EntityMapping | from followthemoney.proxy import EntityProxy
from hashlib import sha1
from followthemoney.exc import InvalidMapping
from warnings import warn
from followthemoney.util import key_bytes
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set
from followthemoney.mapping.property import PropertyMapping
from banal ... |
class EntityMapping(object):
def __init__(self, model: 'Model', query: 'QueryMapping', name: str, data: Dict[str, Any], key_prefix: Optional[str]=None) -> None:
pass
def bind(self) -> None:
pass
def compute_key(self, record: Record) -> Optional[str]:
'''Generate a key for this en... | 6 | 1 | 24 | 2 | 20 | 2 | 6 | 0.11 | 1 | 6 | 2 | 0 | 5 | 9 | 5 | 5 | 137 | 13 | 112 | 40 | 97 | 12 | 79 | 31 | 73 | 12 | 1 | 3 | 30 |
323,984 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/property.py | followthemoney.mapping.property.PropertyMapping | import re
from followthemoney.proxy import EntityProxy
from followthemoney.property import Property
from copy import deepcopy
from normality import stringify
from followthemoney.util import sanitize_text
from followthemoney.mapping.source import Record
from banal import keys_values, as_bool
from warnings import warn
fr... |
class PropertyMapping(object):
'''Map values from a given record (e.g. a CSV row or SQL result) to the
schema form.'''
def __init__(self, query: 'QueryMapping', data: Dict[str, Any], prop: Property) -> None:
pass
def bind(self) -> None:
pass
def record_values(self, record: Record... | 5 | 1 | 27 | 4 | 21 | 3 | 6 | 0.12 | 1 | 5 | 1 | 0 | 4 | 12 | 4 | 4 | 131 | 20 | 100 | 36 | 91 | 12 | 69 | 32 | 64 | 8 | 1 | 2 | 23 |
323,985 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/query.py | followthemoney.mapping.query.QueryMapping | from followthemoney.exc import InvalidMapping
from typing import TYPE_CHECKING, Any, List, Optional, Set, Dict
from followthemoney.mapping.csv import CSVSource
from followthemoney.proxy import EntityProxy
from followthemoney.mapping.entity import EntityMapping
from followthemoney.mapping.sql import SQLSource
from follo... |
class QueryMapping:
def __init__(self, model: 'Model', data: Dict[str, Any], key_prefix: Optional[str]=None) -> None:
pass
def _get_source(self, data: Dict[str, Any]) -> Source:
pass
def map(self, record: Record) -> Dict[str, EntityProxy]:
pass | 4 | 0 | 17 | 2 | 14 | 2 | 5 | 0.12 | 0 | 8 | 5 | 0 | 3 | 4 | 3 | 3 | 56 | 8 | 43 | 19 | 37 | 5 | 41 | 17 | 37 | 8 | 0 | 3 | 14 |
323,986 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/source.py | followthemoney.mapping.source.Source | from typing import TYPE_CHECKING, Any, Dict, Generator, Optional, Set, cast
class Source(object):
def __init__(self, query: 'QueryMapping', data: Dict[str, Any]) -> None:
self.query = query
self.filters = cast(Dict[str, Any], data.get('filters', {})).items()
self.filters_not = cast(Dict[st... |
class Source(object):
def __init__(self, query: 'QueryMapping', data: Dict[str, Any]) -> None:
pass
@property
def records(self) -> Generator[Record, None, None]:
pass
def __len__(self) -> int:
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 4 | 0 | 2 | 3 | 3 | 3 | 3 | 12 | 2 | 10 | 8 | 5 | 0 | 9 | 7 | 5 | 1 | 1 | 0 | 3 |
323,987 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/sql.py | followthemoney.mapping.sql.QueryTable | from sqlalchemy.sql.elements import Label
from uuid import uuid4
from sqlalchemy.engine import Engine, create_engine
from sqlalchemy import MetaData, func, select
from sqlalchemy.schema import Table
from followthemoney.exc import InvalidMapping
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Uni... |
class QueryTable(object):
'''A table to be joined in.'''
def __init__(self, meta: MetaData, engine: Engine, data: Union[str, Dict[str, str]]) -> None:
pass | 2 | 1 | 18 | 1 | 17 | 0 | 4 | 0.06 | 1 | 3 | 1 | 0 | 1 | 3 | 1 | 1 | 21 | 2 | 18 | 12 | 14 | 1 | 16 | 10 | 14 | 4 | 1 | 1 | 4 |
323,988 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/mapping/sql.py | followthemoney.mapping.sql.SQLSource | from banal import ensure_list, is_listish, keys_values
from sqlalchemy import MetaData, func, select
import os
from sqlalchemy.sql.elements import Label
from followthemoney.mapping.source import Record, Source
from followthemoney.util import sanitize_text
from followthemoney.exc import InvalidMapping
from sqlalchemy.po... |
class SQLSource(Source):
'''Query mapper for loading data from a SQL query.'''
def __init__(self, query: 'QueryMapping', data: Dict[str, Any]) -> None:
pass
def get_column(self, ref: Optional[str]) -> Label[Any]:
pass
def apply_filters(self, q: Select[Any]) -> Select[Any]:
pa... | 8 | 2 | 11 | 0 | 10 | 1 | 3 | 0.08 | 1 | 6 | 2 | 0 | 6 | 5 | 6 | 9 | 76 | 7 | 64 | 35 | 56 | 5 | 61 | 32 | 54 | 6 | 2 | 5 | 19 |
323,989 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/model.py | followthemoney.model.Model | from functools import cache
from followthemoney.types import registry
from followthemoney.types.common import PropertyType, PropertyTypeToDict
import os
from typing import Dict, Generator, Iterator, Optional, Set, TypedDict, Union
from typing import TYPE_CHECKING, Any
from followthemoney.schema import Schema, SchemaToD... |
class Model(object):
'''A collection of all the schemata available in followthemoney. The model
provides some helper functions to find schemata, properties or to instantiate
entity proxies based on the schema metadata.'''
def __init__(self, path: str) -> None:
pass
@classmethod
def ins... | 19 | 14 | 8 | 0 | 6 | 2 | 2 | 0.34 | 1 | 12 | 6 | 0 | 15 | 4 | 16 | 16 | 159 | 24 | 101 | 55 | 71 | 34 | 88 | 44 | 68 | 5 | 1 | 3 | 37 |
323,990 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/model.py | followthemoney.model.ModelToDict | from followthemoney.types.common import PropertyType, PropertyTypeToDict
from typing import Dict, Generator, Iterator, Optional, Set, TypedDict, Union
from followthemoney.schema import Schema, SchemaToDict
class ModelToDict(TypedDict):
schemata: Dict[str, SchemaToDict]
types: Dict[str, PropertyTypeToDict] |
class ModelToDict(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
323,991 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/namespace.py | followthemoney.namespace.Namespace | import hmac
from followthemoney.types import registry
from followthemoney.util import get_entity_id, key_bytes
from typing import Any, Optional, Tuple, Union
from followthemoney.proxy import E
class Namespace(object):
"""Namespaces are used to partition entity IDs into different units,
which traditionally repr... |
class Namespace(object):
'''Namespaces are used to partition entity IDs into different units,
which traditionally represent a dataset, collection or source.
See module docstring for details.'''
def __init__(self, name: Optional[str]=None) -> None:
pass
@classmethod
def parse(cls, entit... | 14 | 6 | 7 | 0 | 6 | 1 | 3 | 0.16 | 1 | 4 | 0 | 0 | 7 | 2 | 10 | 10 | 90 | 12 | 67 | 29 | 53 | 11 | 64 | 26 | 53 | 7 | 1 | 4 | 27 |
323,992 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/ontology.py | followthemoney.ontology.Ontology | from followthemoney.types import registry
from rdflib.namespace import OWL, DCTERMS, RDF, RDFS, XSD
from followthemoney import model
from followthemoney.util import PathLike
from followthemoney.schema import Schema
from followthemoney.property import Property
from datetime import datetime
from rdflib import Graph, URIR... |
class Ontology(object):
def __init__(self) -> None:
pass
def add_schemata(self) -> None:
pass
def add_class(self, schema: Schema) -> None:
pass
def add_property(self, prop: Property) -> None:
pass
def write_namespace_docs(self, path: PathLike) -> None:
p... | 6 | 0 | 11 | 1 | 9 | 0 | 3 | 0 | 1 | 5 | 2 | 0 | 5 | 2 | 5 | 5 | 58 | 10 | 48 | 18 | 42 | 0 | 48 | 17 | 42 | 6 | 1 | 2 | 14 |
323,993 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/property.py | followthemoney.property.Property | from followthemoney.util import gettext, get_entity_id, const
from followthemoney.exc import InvalidModel
from followthemoney.types import registry
from banal import is_mapping, as_bool
from typing import TYPE_CHECKING, Any, List, Optional, TypedDict
class Property:
"""A definition of a value-holding field on a sc... |
class Property:
'''A definition of a value-holding field on a schema. Properties define
the field type and other possible constraints. They also serve as entity
to entity references.'''
def __init__(self, schema: 'Schema', name: str, data: PropertySpec) -> None:
pass
def generate(self, mo... | 15 | 8 | 12 | 1 | 8 | 3 | 3 | 0.33 | 0 | 8 | 3 | 0 | 12 | 17 | 12 | 12 | 184 | 30 | 116 | 39 | 101 | 38 | 88 | 37 | 75 | 9 | 0 | 3 | 33 |
323,994 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/property.py | followthemoney.property.PropertyDict | from typing import TYPE_CHECKING, Any, List, Optional, TypedDict
class PropertyDict(TypedDict, total=False):
label: Optional[str]
description: Optional[str]
type: Optional[str]
hidden: Optional[bool]
matchable: Optional[bool]
deprecated: Optional[bool]
maxLength: Optional[int]
range: Op... |
class PropertyDict(TypedDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1 | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 11 | 0 | 10 | 1 | 9 | 1 | 10 | 1 | 9 | 0 | 1 | 0 | 0 |
323,995 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/property.py | followthemoney.property.PropertySpec | class PropertySpec(PropertyDict):
reverse: ReverseSpec | class PropertySpec(PropertyDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
323,996 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/property.py | followthemoney.property.PropertyToDict | from typing import TYPE_CHECKING, Any, List, Optional, TypedDict
class PropertyToDict(PropertyDict, total=False):
name: str
qname: str
reverse: Optional[str]
stub: Optional[bool] |
class PropertyToDict(PropertyDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 2 | 0 | 0 |
323,997 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/property.py | followthemoney.property.ReverseSpec | from typing import TYPE_CHECKING, Any, List, Optional, TypedDict
class ReverseSpec(TypedDict, total=False):
name: str
label: Optional[str]
hidden: Optional[bool] |
class ReverseSpec(TypedDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
323,998 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/proxy.py | followthemoney.proxy.EntityProxy | from typing import TYPE_CHECKING, cast, Any
from banal import ensure_dict
from followthemoney.exc import InvalidData
from rigour.names import pick_name
from typing import Dict, Generator, List, Optional, Set, Tuple, Union, Type, TypeVar
from followthemoney.types.common import PropertyType
from followthemoney.property i... |
class EntityProxy(object):
'''A wrapper object for an entity, with utility functions for the
introspection and manipulation of its properties.
This is the main working object in the library, used to generate, validate
and emit data.'''
def __init__(self, schema: Schema, data: Dict[str, Any], key_p... | 44 | 27 | 12 | 1 | 7 | 4 | 2 | 0.47 | 1 | 17 | 5 | 2 | 34 | 6 | 35 | 35 | 462 | 62 | 272 | 138 | 193 | 128 | 221 | 94 | 185 | 7 | 1 | 3 | 86 |
323,999 | opensanctions/followthemoney | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/opensanctions_followthemoney/followthemoney/schema.py | followthemoney.schema.EdgeSpec | from typing import Dict, List, Optional, Set, TypedDict, Union
class EdgeSpec(TypedDict, total=False):
source: str
target: str
caption: List[str]
label: str
directed: bool |
class EdgeSpec(TypedDict, total=False):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.