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,300 | secretlycarl/onboarderr | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/secretlycarl_onboarderr/app.py | app.Config | import os
from dotenv import load_dotenv, set_key
import re
import requests
class Config:
"""Centralized configuration management with validation"""
def __init__(self):
self._load_environment()
self._validate_config()
def _load_environment(self):
"""Load environment variables once... |
class Config:
'''Centralized configuration management with validation'''
def __init__(self):
pass
def _load_environment(self):
'''Load environment variables once at startup'''
pass
def _validate_config(self):
'''Validate critical configuration values'''
pass
... | 16 | 15 | 11 | 1 | 9 | 1 | 3 | 0.17 | 0 | 6 | 0 | 0 | 15 | 0 | 15 | 15 | 189 | 29 | 138 | 42 | 119 | 23 | 112 | 41 | 93 | 10 | 0 | 2 | 47 |
323,301 | secretlycarl/onboarderr | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/secretlycarl_onboarderr/app.py | app.DownloadProgress | import time
class DownloadProgress:
"""Class for tracking download progress with better error handling"""
def __init__(self, library_name='', total=0):
self.current = 0
self.total = total
self.successful = 0
self.failed = 0
self.library_name = library_name
self.... |
class DownloadProgress:
'''Class for tracking download progress with better error handling'''
def __init__(self, library_name='', total=0):
pass
def start(self):
'''Start the download process'''
pass
def complete(self, successful=True):
'''Complete the download proces... | 7 | 6 | 6 | 0 | 5 | 1 | 1 | 0.19 | 0 | 1 | 1 | 0 | 6 | 11 | 6 | 6 | 42 | 5 | 31 | 18 | 24 | 6 | 31 | 18 | 24 | 2 | 0 | 0 | 7 |
323,302 | secretlycarl/onboarderr | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/secretlycarl_onboarderr/app.py | app.DownloadStatus | class DownloadStatus:
"""Enum-like class for download status tracking"""
IDLE = 'idle'
QUEUED = 'queued'
IN_PROGRESS = 'in_progress'
COMPLETED = 'completed'
FAILED = 'failed'
CANCELLED = 'cancelled' | class DownloadStatus:
'''Enum-like class for download status tracking'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0 | 7 | 7 | 6 | 1 | 7 | 7 | 6 | 0 | 0 | 0 | 0 |
323,303 | secretlycarl/onboarderr | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/secretlycarl_onboarderr/app.py | app.RateLimitManager | from threading import Lock
from collections import defaultdict, OrderedDict
class RateLimitManager:
"""Centralized rate limiting state management"""
def __init__(self):
self.failed_attempts = defaultdict(list)
self.lockout_end_times = defaultdict(float)
self.form_submissions = defaultd... |
class RateLimitManager:
'''Centralized rate limiting state management'''
def __init__(self):
pass
def cleanup_expired_data(self, current_time):
'''Clean up expired rate limit data'''
pass | 3 | 2 | 21 | 1 | 18 | 6 | 5 | 0.33 | 0 | 3 | 0 | 0 | 2 | 8 | 2 | 2 | 44 | 3 | 36 | 16 | 33 | 12 | 27 | 15 | 24 | 8 | 0 | 4 | 9 |
323,304 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/examples/spaceship-titanic/evaluate.py | evaluate.IncorrectSubmissionError | class IncorrectSubmissionError(Exception):
pass | class IncorrectSubmissionError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
323,305 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/examples/cuda/evaluate.py | evaluate.Model | import torch.nn as nn
import math
import torch
import torch.nn.functional as F
class Model(nn.Module):
"""
A vanilla multi-head masked self-attention layer with a projection at the end.
"""
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
super().__init__()
asse... |
class Model(nn.Module):
'''
A vanilla multi-head masked self-attention layer with a projection at the end.
'''
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
pass
def forward(self, x):
pass | 3 | 1 | 16 | 1 | 12 | 7 | 1 | 0.64 | 1 | 2 | 0 | 0 | 2 | 6 | 2 | 2 | 38 | 3 | 25 | 13 | 22 | 16 | 25 | 13 | 22 | 1 | 1 | 0 | 2 |
323,306 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/examples/triton/evaluate.py | evaluate.Model | import torch.nn as nn
import torch.nn.functional as F
import torch
import math
class Model(nn.Module):
"""
A vanilla multi-head masked self-attention layer with a projection at the end.
"""
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
super().__init__()
asse... |
class Model(nn.Module):
'''
A vanilla multi-head masked self-attention layer with a projection at the end.
'''
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
pass
def forward(self, x):
pass | 3 | 1 | 16 | 1 | 12 | 7 | 1 | 0.64 | 1 | 2 | 0 | 0 | 2 | 6 | 2 | 2 | 38 | 3 | 25 | 13 | 22 | 16 | 25 | 13 | 22 | 1 | 1 | 0 | 2 |
323,307 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/examples/hello-kernel-world/optimize.py | optimize.Model | import torch.nn as nn
import torch
class Model(nn.Module):
"""
Model that performs a matrix multiplication, division, summation, and scaling.
"""
def __init__(self, input_size, hidden_size, scaling_factor):
super(Model, self).__init__()
self.weight = nn.Parameter(torch.randn(hidden_siz... |
class Model(nn.Module):
'''
Model that performs a matrix multiplication, division, summation, and scaling.
'''
def __init__(self, input_size, hidden_size, scaling_factor):
pass
def forward(self, x):
'''
Args:
x (torch.Tensor): Input tensor of shape (batch_size,... | 3 | 2 | 8 | 0 | 5 | 3 | 1 | 0.82 | 1 | 1 | 0 | 0 | 2 | 2 | 2 | 2 | 22 | 2 | 11 | 5 | 8 | 9 | 11 | 5 | 8 | 1 | 1 | 0 | 2 |
323,308 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/examples/triton/optimize.py | optimize.Model | import math
import torch.nn.functional as F
import torch.nn as nn
import torch
class Model(nn.Module):
"""
A vanilla multi-head masked self-attention layer with a projection at the end.
"""
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
super().__init__()
asse... |
class Model(nn.Module):
'''
A vanilla multi-head masked self-attention layer with a projection at the end.
'''
def __init__(self, n_embd, n_head, attn_pdrop, resid_pdrop, max_seqlen):
pass
def forward(self, x):
pass | 3 | 1 | 16 | 1 | 12 | 7 | 1 | 0.64 | 1 | 2 | 0 | 0 | 2 | 6 | 2 | 2 | 38 | 3 | 25 | 13 | 22 | 16 | 25 | 13 | 22 | 1 | 1 | 0 | 2 |
323,309 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/chatbot.py | weco.chatbot.Chatbot | from .panels import OptimizationOptionsPanel, EvaluationScriptPanel
from rich.prompt import Prompt
from typing import List, Optional, Dict, Any, Tuple
from rich.console import Console
import argparse
import sys
import shlex
from .api import get_optimization_suggestions_from_codebase, generate_evaluation_script_and_metr... |
class Chatbot:
def __init__(self, project_path: pathlib.Path, console: Console, run_parser: argparse.ArgumentParser, model: Optional[str]=None):
pass
def analyze_codebase_and_get_optimization_options(self) -> Optional[List[Dict[str, str]]]:
'''Analyze the codebase using gitingest and get opti... | 14 | 11 | 48 | 6 | 37 | 7 | 5 | 0.18 | 0 | 17 | 2 | 0 | 13 | 15 | 13 | 13 | 643 | 96 | 482 | 118 | 445 | 86 | 308 | 97 | 287 | 15 | 0 | 4 | 70 |
323,310 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/chatbot.py | weco.chatbot.UserInteractionHelper | from typing import List, Optional, Dict, Any, Tuple
from rich.prompt import Prompt
from rich.console import Console
from .panels import OptimizationOptionsPanel, EvaluationScriptPanel
class UserInteractionHelper:
"""Helper class for standardized user interactions."""
def __init__(self, console: Console):
... |
class UserInteractionHelper:
'''Helper class for standardized user interactions.'''
def __init__(self, console: Console):
pass
def get_choice(self, prompt: str, choices: List[str], default: str=None, show_choices: bool=True, max_retries: int=5) -> str:
'''Standardized choice prompt with e... | 9 | 8 | 16 | 2 | 12 | 2 | 4 | 0.14 | 0 | 11 | 1 | 0 | 8 | 1 | 8 | 8 | 134 | 24 | 97 | 27 | 84 | 14 | 92 | 23 | 83 | 8 | 0 | 4 | 29 |
323,311 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/optimizer.py | weco.optimizer.HeartbeatSender | import threading
from .api import start_optimization_run, evaluate_feedback_then_suggest_next_solution, get_optimization_run_status, send_heartbeat, report_termination
import traceback
import sys
class HeartbeatSender(threading.Thread):
def __init__(self, run_id: str, auth_headers: dict, stop_event: threading.Eve... |
class HeartbeatSender(threading.Thread):
def __init__(self, run_id: str, auth_headers: dict, stop_event: threading.Event, interval: int=30):
pass
def run(self):
pass | 3 | 0 | 12 | 2 | 9 | 3 | 3 | 0.33 | 1 | 6 | 0 | 0 | 2 | 4 | 2 | 27 | 25 | 4 | 18 | 8 | 15 | 6 | 18 | 7 | 15 | 5 | 1 | 3 | 6 |
323,312 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.EvaluationOutputPanel | from rich.panel import Panel
class EvaluationOutputPanel:
"""Displays evaluation output with truncation for long outputs."""
def __init__(self):
self.output = ''
def update(self, output: str) -> None:
"""Update the evaluation output."""
self.output = output
def clear(self) ->... |
class EvaluationOutputPanel:
'''Displays evaluation output with truncation for long outputs.'''
def __init__(self):
pass
def update(self, output: str) -> None:
'''Update the evaluation output.'''
pass
def clear(self) -> None:
'''Clear the evaluation output.'''
... | 5 | 4 | 3 | 0 | 2 | 1 | 1 | 0.44 | 0 | 2 | 0 | 0 | 4 | 1 | 4 | 4 | 17 | 4 | 9 | 6 | 4 | 4 | 9 | 6 | 4 | 1 | 0 | 0 | 4 |
323,313 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.EvaluationScriptPanel | from rich.panel import Panel
from rich.syntax import Syntax
class EvaluationScriptPanel:
"""Panel for displaying evaluation scripts with syntax highlighting.
Shows Python evaluation scripts with proper syntax highlighting,
line numbers, and a descriptive title.
"""
def get_display(self, script_co... |
class EvaluationScriptPanel:
'''Panel for displaying evaluation scripts with syntax highlighting.
Shows Python evaluation scripts with proper syntax highlighting,
line numbers, and a descriptive title.
'''
def get_display(self, script_content: str, script_path: str='evaluate.py') -> Panel:
... | 2 | 2 | 9 | 0 | 8 | 1 | 1 | 0.56 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 16 | 2 | 9 | 2 | 7 | 5 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
323,314 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.MetricTree | from typing import Dict, List, Optional, Union, Tuple
class MetricTree:
"""Manages the tree structure of optimization solutions."""
def __init__(self, maximize: bool):
self.nodes: Dict[str, Node] = {}
self.maximize = maximize
def clear(self):
"""Clear the tree."""
self.nod... |
class MetricTree:
'''Manages the tree structure of optimization solutions.'''
def __init__(self, maximize: bool):
pass
def clear(self):
'''Clear the tree.'''
pass
def add_node(self, node: Node):
'''Add a node to the tree.'''
pass
def get_root_node(self) -... | 6 | 5 | 8 | 0 | 6 | 2 | 2 | 0.31 | 0 | 4 | 1 | 0 | 5 | 2 | 5 | 5 | 45 | 6 | 32 | 10 | 26 | 10 | 24 | 10 | 18 | 3 | 0 | 2 | 10 |
323,315 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.MetricTreePanel | from rich.tree import Tree
from rich.panel import Panel
from typing import Dict, List, Optional, Union, Tuple
class MetricTreePanel:
"""Displays the solution tree with depth limiting."""
def __init__(self, maximize: bool):
self.metric_tree = MetricTree(maximize=maximize)
def build_metric_tree(sel... |
class MetricTreePanel:
'''Displays the solution tree with depth limiting.'''
def __init__(self, maximize: bool):
pass
def build_metric_tree(self, nodes: List[dict]):
'''Build the tree from the list of nodes.'''
pass
def set_unevaluated_node(self, node_id: str):
'''Set... | 7 | 5 | 21 | 2 | 15 | 4 | 3 | 0.27 | 0 | 8 | 2 | 0 | 5 | 1 | 5 | 5 | 94 | 13 | 64 | 18 | 57 | 17 | 48 | 18 | 41 | 7 | 0 | 2 | 17 |
323,316 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.Node | from typing import Dict, List, Optional, Union, Tuple
class Node:
"""Represents a node in the solution tree."""
def __init__(self, id: str, parent_id: Union[str, None], code: Union[str, None], metric: Union[float, None], is_buggy: Union[bool, None]):
self.id = id
self.parent_id = parent_id
... |
class Node:
'''Represents a node in the solution tree.'''
def __init__(self, id: str, parent_id: Union[str, None], code: Union[str, None], metric: Union[float, None], is_buggy: Union[bool, None]):
pass | 2 | 1 | 16 | 0 | 16 | 0 | 1 | 0.06 | 0 | 3 | 0 | 0 | 1 | 8 | 1 | 1 | 19 | 1 | 17 | 17 | 8 | 1 | 10 | 10 | 8 | 1 | 0 | 0 | 1 |
323,317 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.OptimizationOptionsPanel | from typing import Dict, List, Optional, Union, Tuple
from rich.table import Table
from rich import box
class OptimizationOptionsPanel:
"""Panel for displaying optimization options in a table.
Creates a formatted table showing optimization suggestions with details
like target file, description, estimated ... |
class OptimizationOptionsPanel:
'''Panel for displaying optimization options in a table.
Creates a formatted table showing optimization suggestions with details
like target file, description, estimated cost, and predicted gains.
'''
def get_display(self, options: List[Dict[str, str]]) -> Table:
... | 2 | 2 | 18 | 1 | 16 | 1 | 2 | 0.29 | 0 | 3 | 0 | 0 | 1 | 0 | 1 | 1 | 25 | 3 | 17 | 4 | 15 | 5 | 11 | 4 | 9 | 2 | 0 | 1 | 2 |
323,318 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.SolutionPanels | from typing import Dict, List, Optional, Union, Tuple
from rich.panel import Panel
from rich.syntax import Syntax
from pathlib import Path
class SolutionPanels:
"""Displays the current and best solutions side by side."""
def __init__(self, metric_name: str, source_fp: Path):
self.current_node = None
... |
class SolutionPanels:
'''Displays the current and best solutions side by side.'''
def __init__(self, metric_name: str, source_fp: Path):
pass
def _determine_lexer(self, source_fp: Path) -> str:
'''Determine the lexer for the source file.'''
pass
def update(self, current_node:... | 5 | 4 | 11 | 1 | 8 | 3 | 2 | 0.38 | 0 | 6 | 1 | 0 | 4 | 4 | 4 | 4 | 51 | 7 | 32 | 16 | 27 | 12 | 20 | 16 | 15 | 5 | 0 | 0 | 8 |
323,319 | WecoAI/weco-cli | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/WecoAI_weco-cli/weco/panels.py | weco.panels.SummaryPanel | from rich.panel import Panel
from rich.layout import Layout
from pathlib import Path
from rich.table import Table
from .__init__ import __dashboard_url__
from .utils import format_number
from typing import Dict, List, Optional, Union, Tuple
from rich.progress import BarColumn, Progress, TextColumn
class SummaryPanel:
... |
class SummaryPanel:
'''Holds a summary of the optimization run.'''
def __init__(self, maximize: bool, metric_name: str, total_steps: int, model: str, runs_dir: str, run_id: str=None, run_name: str=None):
pass
def set_run_id(self, run_id: str):
'''Set the run ID.'''
pass
def s... | 10 | 9 | 14 | 1 | 11 | 2 | 2 | 0.17 | 0 | 12 | 0 | 0 | 9 | 13 | 9 | 9 | 136 | 17 | 102 | 36 | 83 | 17 | 56 | 27 | 46 | 5 | 0 | 1 | 16 |
323,320 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/hybrid_search/app.py | app.Document | from pytidb.schema import FullTextField, TableModel, Field
class Document(TableModel):
__tablename__ = 'documents'
__table_args__ = {'extend_existing': True}
id: int = Field(primary_key=True)
text: str = FullTextField()
text_vec: list[float] = embed_fn.VectorField(source_field='text') |
class Document(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 7 | 1 | 6 | 5 | 5 | 0 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,321 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/text2sql/app.py | app.QuestionSQLResponse | from pydantic import BaseModel
class QuestionSQLResponse(BaseModel):
question: str
sql: str
markdown: str |
class QuestionSQLResponse(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 5 | 0 | 0 |
323,322 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/custom_embedding/custom_embedding.py | custom_embedding.BGEM3EmbeddingFunction | from pytidb.embeddings.base import BaseEmbeddingFunction, EmbeddingSourceType
from pytidb.schema import Field
from FlagEmbedding import BGEM3FlagModel
from typing import Any, Optional, List
class BGEM3EmbeddingFunction(BaseEmbeddingFunction):
"""
A custom embedding function that uses BGE-M3 model for text embe... |
class BGEM3EmbeddingFunction(BaseEmbeddingFunction):
'''
A custom embedding function that uses BGE-M3 model for text embeddings.
BGE-M3 is a versatile embedding model that supports dense retrieval, sparse retrieval, and multi-vector retrieval.
'''
def __init__(self, model_name: str='BAAI/bge-m3', ... | 6 | 6 | 25 | 3 | 12 | 10 | 2 | 0.83 | 1 | 6 | 0 | 0 | 5 | 2 | 5 | 92 | 142 | 22 | 66 | 32 | 45 | 55 | 29 | 16 | 23 | 2 | 6 | 1 | 9 |
323,323 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/sql/ddl.py | ddl.TiDBSchemaDropper | from sqlalchemy.sql.ddl import SchemaGenerator, SchemaDropper, CreateIndex
from ..tiflash_replica import SetTiFlashReplica, TiFlashReplica
class TiDBSchemaDropper(SchemaDropper):
def visit_tiflash_replica(self, tiflash_replica: TiFlashReplica):
with self.with_ddl_events(tiflash_replica):
tifla... |
class TiDBSchemaDropper(SchemaDropper):
def visit_tiflash_replica(self, tiflash_replica: TiFlashReplica):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 2 | 3 | 0 | 5 | 2 | 3 | 1 | 1 | 1 | 1 |
323,324 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/sql/ddl.py | ddl.TiDBSchemaGenerator | from pytidb.orm.indexes import VectorIndex, FullTextIndex
from pytidb.utils import TIDB_SERVERLESS_HOST_PATTERN
from sqlalchemy.sql.ddl import SchemaGenerator, SchemaDropper, CreateIndex
from ..tiflash_replica import SetTiFlashReplica, TiFlashReplica
class TiDBSchemaGenerator(SchemaGenerator):
def visit_index(sel... |
class TiDBSchemaGenerator(SchemaGenerator):
def visit_index(self, index, create_ok=False):
pass
def _has_tiflash_replica(self, tiflash_replica: TiFlashReplica) -> bool:
pass
def visit_tiflash_replica(self, tiflash_replica: TiFlashReplica):
pass | 4 | 0 | 8 | 1 | 7 | 1 | 2 | 0.14 | 1 | 5 | 4 | 0 | 3 | 0 | 3 | 3 | 28 | 4 | 21 | 5 | 17 | 3 | 19 | 5 | 15 | 4 | 1 | 3 | 7 |
323,325 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/hybrid_search/example.py | example.Chunk | from pytidb.schema import FullTextField, TableModel, Field
class Chunk(TableModel, table=True):
__tablename__ = 'chunks'
id: int = Field(primary_key=True)
text: str = FullTextField()
text_vec: list[float] = embed_fn.VectorField(source_field='text') |
class Chunk(TableModel, table=True):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 5 | 0 | 5 | 4 | 4 | 0 | 5 | 4 | 4 | 0 | 3 | 0 | 0 |
323,326 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/fulltext_search/example.py | example.Item | from pytidb.schema import FullTextField, TableModel, Field
class Item(TableModel):
__tablename__ = 'items'
__table_args__ = {'extend_existing': True}
id: int = Field(primary_key=True)
title: str = FullTextField()
language: str = Field(max_length=10) |
class Item(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 7 | 1 | 6 | 5 | 5 | 0 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,327 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/auto_embedding/main.py | main.Chunk | from pytidb.datatype import TEXT
from pytidb.schema import TableModel, Field
class Chunk(TableModel):
id: int = Field(primary_key=True)
text: str = Field(sa_type=TEXT)
text_vec: list[float] = embed_func.VectorField(source_field='text') |
class Chunk(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 4 | 0 | 4 | 3 | 3 | 0 | 4 | 3 | 3 | 0 | 3 | 0 | 0 |
323,328 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/quickstart/main.py | main.Chunk | from pytidb.schema import TableModel, Field
class Chunk(TableModel, table=True):
__tablename__ = 'chunks'
id: int = Field(primary_key=True)
text: str = Field()
text_vec: list[float] = text_embed.VectorField(source_field='text')
user_id: int = Field() |
class Chunk(TableModel, table=True):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 6 | 0 | 6 | 5 | 5 | 0 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,329 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/rag/main.py | main.Chunk | from pytidb.schema import TableModel, Field
class Chunk(TableModel):
__tablename__ = 'chunks'
__table_args__ = {'extend_existing': True}
id: int = Field(primary_key=True)
text: str = Field()
text_vec: list[float] = text_embed.VectorField(source_field='text') |
class Chunk(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 10 | 1 | 8 | 5 | 7 | 1 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,330 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/custom_embedding/main.py | main.Document | from pytidb.datatype import TEXT
from pytidb.schema import TableModel, Field
class Document(TableModel):
__tablename__ = 'bge_m3_documents'
id: int = Field(primary_key=True)
title: str = Field(sa_type=TEXT)
content: str = Field(sa_type=TEXT)
content_vec: list[float] = embed_func.VectorField(source_... |
class Document(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.17 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 8 | 1 | 6 | 5 | 5 | 1 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,331 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/basic/main.py | main.Item | from pytidb.schema import TableModel, Field, VectorField
from pytidb.datatype import JSON, TEXT
class Item(TableModel):
__tablename__ = 'items_in_basic_example'
id: int = Field(primary_key=True)
content: str = Field(sa_type=TEXT)
embedding: list[float] = VectorField(dimensions=3)
meta: dict = Field... |
class Item(TableModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 6 | 0 | 6 | 5 | 5 | 0 | 6 | 5 | 5 | 0 | 3 | 0 | 0 |
323,332 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/examples/memory/memory.py | memory.Memory | import datetime
from typing import List, Dict, Any
from pytidb.datatype import TEXT
from pytidb.schema import TableModel, Field, Column
class Memory:
def __init__(self, tidb_client, embedding_fn, openai_client):
self.tidb_client = tidb_client
self.embedding_fn = embedding_fn
self.openai_cl... |
class Memory:
def __init__(self, tidb_client, embedding_fn, openai_client):
pass
class MemoryRecord(TableModel):
def add(self, messages: List[Dict[str, Any]], user_id: str='default_user'):
'''Add a new memory by extracting key facts from conversation.'''
pass
def search(... | 6 | 3 | 15 | 1 | 12 | 1 | 1 | 0.08 | 0 | 4 | 1 | 0 | 4 | 5 | 4 | 4 | 62 | 8 | 50 | 25 | 42 | 4 | 29 | 23 | 23 | 2 | 0 | 1 | 5 |
323,333 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/client.py | pytidb.client.TiDBClient | from pytidb.result import SQLExecuteResult, SQLQueryResult
from pytidb.base import default_registry
from pydantic import PrivateAttr
import sqlalchemy
from pytidb.table import Table
from typing import List, Literal, Optional, Type, Generator
from pytidb.orm.variables import EMBED_PROVIDER_API_KEY_VARS
from pytidb.schem... | null | 26 | 3 | 12 | 1 | 9 | 2 | 2 | 0.2 | 0 | 9 | 3 | 0 | 20 | 2 | 21 | 21 | 290 | 45 | 205 | 101 | 142 | 40 | 137 | 51 | 115 | 6 | 0 | 3 | 45 |
323,334 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/embeddings/base.py | pytidb.embeddings.base.BaseEmbeddingFunction | from typing import Optional, Any, Literal
from abc import ABC, abstractmethod
from pydantic import BaseModel, Field
class BaseEmbeddingFunction(BaseModel, ABC):
provider: str = Field('openai', description='The name of the embedding provider')
model_name: str = Field(None, description='The name of embedding mod... |
class BaseEmbeddingFunction(BaseModel, ABC):
def __init__(self, /, **data: Any):
pass
def VectorField(self, source_field: Optional[str]=None, source_type: Optional[EmbeddingSourceType]='text', **kwargs):
'''
Create a VectorField with auto embedding configuration.
Args:
... | 9 | 4 | 15 | 2 | 6 | 7 | 1 | 0.64 | 2 | 6 | 0 | 3 | 5 | 0 | 5 | 87 | 101 | 14 | 53 | 29 | 29 | 34 | 17 | 12 | 10 | 1 | 5 | 0 | 5 |
323,335 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/embeddings/builtin.py | pytidb.embeddings.builtin.EmbeddingFunction | from typing import TYPE_CHECKING, Any, List, Optional, Union
from pytidb.embeddings.base import BaseEmbeddingFunction, EmbeddingSourceType
from pathlib import Path
from pydantic import Field
import urllib.request
from pytidb.embeddings.aliases import normalize_model_name
from pytidb.embeddings.utils import encode_local... |
class EmbeddingFunction(BaseEmbeddingFunction):
def __init__(self, model_name: str, dimensions: Optional[int]=None, api_key: Optional[str]=None, api_base: Optional[str]=None, timeout: Optional[int]=None, caching: bool=True, use_server: Optional[bool]=None, additional_json_options: Optional[dict[str, Any]]=None, m... | 9 | 4 | 27 | 2 | 20 | 5 | 3 | 0.24 | 1 | 11 | 0 | 0 | 8 | 2 | 8 | 95 | 242 | 23 | 177 | 69 | 130 | 42 | 79 | 32 | 68 | 11 | 6 | 4 | 26 |
323,336 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/errors.py | pytidb.errors.EmbeddingColumnMismatchError | class EmbeddingColumnMismatchError(ValueError):
"""
Exception raised when the existing embedding column does not match the expected dimension.
Attributes:
existing_col (str): The definition of the existing embedding column.
expected_col (str): The definition of the expected embedding column... | class EmbeddingColumnMismatchError(ValueError):
'''
Exception raised when the existing embedding column does not match the expected dimension.
Attributes:
existing_col (str): The definition of the existing embedding column.
expected_col (str): The definition of the expected embedding column.... | 2 | 1 | 6 | 0 | 6 | 0 | 1 | 0.86 | 1 | 1 | 0 | 0 | 1 | 2 | 1 | 12 | 15 | 2 | 7 | 4 | 5 | 6 | 5 | 4 | 3 | 1 | 4 | 0 | 1 |
323,337 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/ext/mcp/server.py | pytidb.ext.mcp.server.AppContext | from dataclasses import dataclass
@dataclass
class AppContext:
tidb: TiDBConnector | @dataclass
class AppContext:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
323,338 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/ext/mcp/server.py | pytidb.ext.mcp.server.TiDBConnector | from pytidb import TiDBClient
from pytidb.utils import TIDB_SERVERLESS_HOST_PATTERN
from typing import AsyncIterator, Optional
from pydantic import MySQLDsn
class TiDBConnector:
def __init__(self, database_url: Optional[str]=None, *, host: Optional[str]=None, port: Optional[int]=None, username: Optional[str]=None... | null | 14 | 0 | 8 | 0 | 8 | 0 | 2 | 0.01 | 0 | 6 | 0 | 0 | 12 | 6 | 12 | 12 | 112 | 13 | 98 | 39 | 70 | 1 | 55 | 24 | 42 | 4 | 0 | 3 | 21 |
323,339 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/distance_metric.py | pytidb.orm.distance_metric.DistanceMetric | import enum
class DistanceMetric(str, enum.Enum):
"""
An enumeration representing different types of distance metrics.
- `DistanceMetric.L1`: L1 (Manhattan) distance metric.
- `DistanceMetric.L2`: L2 (Euclidean) distance metric.
- `DistanceMetric.COSINE`: Cosine distance metric.
- `DistanceMet... |
class DistanceMetric(str, enum.Enum):
'''
An enumeration representing different types of distance metrics.
- `DistanceMetric.L1`: L1 (Manhattan) distance metric.
- `DistanceMetric.L2`: L2 (Euclidean) distance metric.
- `DistanceMetric.COSINE`: Cosine distance metric.
- `DistanceMetric.NEGATIVE_... | 2 | 2 | 22 | 2 | 13 | 7 | 5 | 0.78 | 2 | 1 | 0 | 0 | 1 | 0 | 1 | 116 | 37 | 5 | 18 | 6 | 16 | 14 | 12 | 6 | 10 | 5 | 4 | 1 | 5 |
323,340 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.fts_match_word | from sqlalchemy.sql.functions import GenericFunction
class fts_match_word(GenericFunction):
type = None
name = 'FTS_MATCH_WORD'
inherit_cache = True |
class fts_match_word(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,341 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_cosine_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_cosine_distance(GenericFunction):
type = None
name = 'VEC_COSINE_DISTANCE'
inherit_cache = True |
class vec_cosine_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,342 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_embed_cosine_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_embed_cosine_distance(GenericFunction):
type = None
name = 'VEC_EMBED_COSINE_DISTANCE'
inherit_cache = True |
class vec_embed_cosine_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,343 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_embed_l1_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_embed_l1_distance(GenericFunction):
type = None
name = 'VEC_EMBED_L1_DISTANCE'
inherit_cache = True |
class vec_embed_l1_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,344 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_embed_l2_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_embed_l2_distance(GenericFunction):
type = None
name = 'VEC_EMBED_L2_DISTANCE'
inherit_cache = True |
class vec_embed_l2_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,345 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_l1_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_l1_distance(GenericFunction):
type = None
name = 'VEC_L1_DISTANCE'
inherit_cache = True |
class vec_l1_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,346 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_l2_distance | from sqlalchemy.sql.functions import GenericFunction
class vec_l2_distance(GenericFunction):
type = None
name = 'VEC_L2_DISTANCE'
inherit_cache = True |
class vec_l2_distance(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,347 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/functions.py | pytidb.orm.functions.vec_negative_inner_product | from sqlalchemy.sql.functions import GenericFunction
class vec_negative_inner_product(GenericFunction):
type = None
name = 'VEC_NEGATIVE_INNER_PRODUCT'
inherit_cache = True |
class vec_negative_inner_product(GenericFunction):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
323,348 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/indexes.py | pytidb.orm.indexes.FullTextIndex | from pytidb.orm._typing import _CreateDropBind
from pytidb.orm.tiflash_replica import TiFlashReplica
from pytidb.utils import TIDB_SERVERLESS_HOST_PATTERN
from sqlalchemy.sql.schema import Index
class FullTextIndex(Index):
"""Full Text Index schema."""
def __init__(self, name, *column_names, fts_parser: FullT... |
class FullTextIndex(Index):
'''Full Text Index schema.'''
def __init__(self, name, *column_names, fts_parser: FullTextParser='MULTILINGUAL', ensure_columnar_replica: bool=True, **kw):
pass
def create(self, bind: _CreateDropBind, checkfirst: bool=False) -> None:
pass | 3 | 1 | 13 | 1 | 11 | 1 | 2 | 0.13 | 1 | 5 | 2 | 0 | 2 | 3 | 2 | 2 | 30 | 4 | 23 | 14 | 12 | 3 | 16 | 6 | 12 | 2 | 1 | 1 | 4 |
323,349 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/indexes.py | pytidb.orm.indexes.VectorIndex | from sqlalchemy import text
from pytidb.orm._typing import _CreateDropBind
from sqlalchemy.sql.schema import Index
from pytidb.orm.distance_metric import DistanceMetric, validate_distance_metric
from pytidb.orm.tiflash_replica import TiFlashReplica
from typing import Literal, Union
from pytidb.utils import TIDB_SERVERL... |
class VectorIndex(Index):
'''Vector Index schema.'''
def __init__(self, name, *columns, distance_metric: Union[DistanceMetric, str]=DistanceMetric.COSINE, algorithm: VectorIndexAlgorithm='HNSW', ensure_columnar_replica: bool=True, **kw):
pass
def create(self, bind: _CreateDropBind, checkfirst: bo... | 3 | 1 | 28 | 3 | 24 | 2 | 4 | 0.08 | 1 | 7 | 3 | 0 | 2 | 4 | 2 | 2 | 59 | 7 | 48 | 21 | 36 | 4 | 32 | 12 | 28 | 6 | 1 | 1 | 8 |
323,350 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/tiflash_replica.py | pytidb.orm.tiflash_replica.SetTiFlashReplica | from sqlalchemy.sql.ddl import _CreateBase
class SetTiFlashReplica(_CreateBase):
"""DDL element for SET TIFLASH REPLICA operation."""
__visit_name__ = 'set_tiflash_replica'
def __init__(self, element):
super().__init__(element) |
class SetTiFlashReplica(_CreateBase):
'''DDL element for SET TIFLASH REPLICA operation.'''
def __init__(self, element):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.25 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 7 | 2 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
323,351 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/tiflash_replica.py | pytidb.orm.tiflash_replica.TiFlashReplica | from pytidb.orm._typing import _CreateDropBind
from sqlalchemy import Connection, Engine, select, Table
from typing import Optional, Any, TypedDict
from sqlalchemy.sql.base import DialectKWArgs
from .information_schema import tiflash_replica
from sqlalchemy.sql.schema import SchemaItem
class TiFlashReplica(DialectKWAr... |
class TiFlashReplica(DialectKWArgs, SchemaItem):
'''A table-level TiFlash replica.
TiFlash is the columnar storage engine for TiDB. This class provides
DDL operations to manage TiFlash replicas for tables.
Examples::
# Create TiFlash replica
replica = TiFlashReplica(table, replica_count... | 6 | 5 | 20 | 3 | 12 | 5 | 2 | 0.56 | 2 | 10 | 3 | 0 | 5 | 3 | 5 | 5 | 125 | 27 | 63 | 25 | 48 | 35 | 34 | 18 | 26 | 6 | 1 | 2 | 12 |
323,352 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/tiflash_replica.py | pytidb.orm.tiflash_replica.TiFlashReplicaProgress | from typing import Optional, Any, TypedDict
class TiFlashReplicaProgress(TypedDict):
table_schema: str
table_name: str
replica_count: int
location_labels: str
available: bool
progress: float |
class TiFlashReplicaProgress(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 0 | 7 | 1 | 6 | 0 | 7 | 1 | 6 | 0 | 1 | 0 | 0 |
323,353 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/orm/vector.py | pytidb.orm.vector.VECTOR | import sqlalchemy
from typing import Optional, Union, List
class VECTOR(sqlalchemy.types.UserDefinedType):
"""
Represents a vector column type in TiDB.
"""
dim: Optional[int]
cache_ok = True
def __init__(self, dim: Optional[int]=None):
if dim is not None and (not isinstance(dim, int)):... |
class VECTOR(sqlalchemy.types.UserDefinedType):
'''
Represents a vector column type in TiDB.
'''
def __init__(self, dim: Optional[int]=None):
pass
def get_col_spec(self, **kw):
'''
Returns the column specification for the vector column.
If the dimension is not spec... | 16 | 5 | 6 | 1 | 4 | 1 | 1 | 0.24 | 1 | 3 | 0 | 0 | 4 | 0 | 4 | 4 | 97 | 24 | 59 | 21 | 43 | 14 | 43 | 21 | 27 | 3 | 1 | 1 | 17 |
323,354 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/rerankers/base.py | pytidb.rerankers.base.BaseReranker | from abc import ABC, abstractmethod
from typing import List, Optional
class BaseReranker(ABC):
@abstractmethod
def rerank(self, query: str, documents: List[str], top_n: Optional[int]=None) -> List[RerankResult]:
raise NotImplementedError() |
class BaseReranker(ABC):
@abstractmethod
def rerank(self, query: str, documents: List[str], top_n: Optional[int]=None) -> List[RerankResult]:
pass | 3 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 1 | 4 | 1 | 1 | 1 | 0 | 1 | 21 | 9 | 0 | 9 | 8 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
323,355 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/rerankers/base.py | pytidb.rerankers.base.RerankResult | from pydantic import BaseModel
class RerankResult(BaseModel):
index: int
relevance_score: float |
class RerankResult(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
323,356 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/rerankers/litellm.py | pytidb.rerankers.litellm.LiteLLMReranker | from typing import List, Optional
from pytidb.rerankers.base import BaseReranker, RerankResult
class LiteLLMReranker(BaseReranker):
def __init__(self, model_name: str, api_key: Optional[str]=None, api_base: Optional[str]=None, timeout: Optional[int]=None):
self.model_name = model_name
self.api_key... |
class LiteLLMReranker(BaseReranker):
def __init__(self, model_name: str, api_key: Optional[str]=None, api_base: Optional[str]=None, timeout: Optional[int]=None):
pass
def rerank(self, query: str, documents: List[str], top_n: Optional[int]=None) -> List[RerankResult]:
pass | 3 | 0 | 18 | 1 | 17 | 0 | 2 | 0 | 1 | 5 | 1 | 0 | 2 | 4 | 2 | 23 | 37 | 3 | 34 | 17 | 22 | 0 | 13 | 9 | 9 | 2 | 5 | 1 | 3 |
323,357 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/result.py | pytidb.result.QueryResult | from pydantic import BaseModel, Field
from abc import ABC, abstractmethod
from typing import Optional, List, Type
class QueryResult(ABC):
@abstractmethod
def to_list(self) -> List[dict]:
pass
@abstractmethod
def to_pydantic(self) -> List[BaseModel]:
pass
@abstractmethod
def t... |
class QueryResult(ABC):
@abstractmethod
def to_list(self) -> List[dict]:
pass
@abstractmethod
def to_pydantic(self) -> List[BaseModel]:
pass
@abstractmethod
def to_pandas(self):
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 2 | 3 | 0 | 3 | 23 | 12 | 2 | 10 | 7 | 3 | 0 | 7 | 4 | 3 | 1 | 4 | 0 | 3 |
323,358 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/result.py | pytidb.result.SQLExecuteResult | from pydantic import BaseModel, Field
from typing import Optional, List, Type
class SQLExecuteResult(BaseModel):
rowcount: int = Field(0)
success: bool = Field(False)
message: Optional[str] = Field(None) |
class SQLExecuteResult(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 5 | 0 | 0 |
323,359 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/result.py | pytidb.result.SQLModelQueryResult | from pydantic import BaseModel, Field
from typing import Optional, List, Type
class SQLModelQueryResult(QueryResult):
def __init__(self, data: List[BaseModel]):
self._data = data
def to_list(self) -> List[dict]:
return [item.model_dump() for item in self._data]
def to_pydantic(self) -> L... |
class SQLModelQueryResult(QueryResult):
def __init__(self, data: List[BaseModel]):
pass
def to_list(self) -> List[dict]:
pass
def to_pydantic(self) -> List[BaseModel]:
pass
def to_pandas(self):
pass | 5 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 4 | 0 | 0 | 4 | 1 | 4 | 27 | 19 | 3 | 16 | 8 | 10 | 0 | 14 | 8 | 8 | 2 | 5 | 1 | 5 |
323,360 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/result.py | pytidb.result.SQLQueryResult | from sqlalchemy import Result
from pydantic import BaseModel, Field
from typing import Optional, List, Type
class SQLQueryResult(QueryResult):
_result: Result
def __init__(self, result):
self._result = result
def scalar(self):
return self._result.scalar()
def one(self):
retur... |
class SQLQueryResult(QueryResult):
def __init__(self, result):
pass
def scalar(self):
pass
def one(self):
pass
def to_rows(self):
pass
def to_pandas(self):
pass
def to_list(self) -> List[dict]:
pass
def to_pydantic(self, model: Type[Bas... | 8 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 5 | 0 | 0 | 7 | 0 | 7 | 30 | 34 | 7 | 27 | 14 | 18 | 0 | 25 | 14 | 16 | 2 | 5 | 1 | 8 |
323,361 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/schema.py | pytidb.schema.ColumnInfo | from pydantic import BaseModel
class ColumnInfo(BaseModel):
column_name: str
column_type: str |
class ColumnInfo(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
323,362 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/schema.py | pytidb.schema.QueryBundle | from typing import Any, Literal, Optional, TYPE_CHECKING, List, TypedDict, Union
class QueryBundle(TypedDict):
query: Optional[Any]
query_vector: Optional[VectorDataType] |
class QueryBundle(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,363 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/schema.py | pytidb.schema.TableModel | from sqlmodel import SQLModel, Field, Relationship
class TableModel(SQLModel, metaclass=TableModelMeta):
pass |
class TableModel(SQLModel, metaclass=TableModelMeta):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 42 | 0 | 0 | 0 | 1 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
323,364 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/schema.py | pytidb.schema.TableModelMeta | from sqlmodel.main import FieldInfo, RelationshipInfo, SQLModelMetaclass
class TableModelMeta(SQLModelMetaclass):
def __new__(mcs, name, bases, namespace, **kwargs):
if name != 'TableModel':
kwargs.setdefault('table', True)
return super().__new__(mcs, name, bases, namespace, **kwargs) |
class TableModelMeta(SQLModelMetaclass):
def __new__(mcs, name, bases, namespace, **kwargs):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 2 | 3 | 0 | 5 | 2 | 3 | 2 | 1 | 1 | 2 |
323,365 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/search.py | pytidb.search.Search | from pytidb.schema import QueryBundle, VectorDataType, TableModel
from pytidb.orm.distance_metric import DistanceMetric, validate_distance_metric
from pydantic import BaseModel, Field
from sqlalchemy.sql.base import Generative, _generative
from pytidb.fusion import fusion_result_rows_by_rrf, fusion_result_rows_by_weigh... |
class Search(Generative):
'''Represents a TiDB vector/fulltext/hybrid search statement.
The :class:`_search.Search` object is normally constructed using the
:func:`_search.search` function. See that function for details.
.. seealso::
:func:`_search.search`
'''
def __init__(self, table:... | 53 | 16 | 19 | 2 | 13 | 4 | 3 | 0.28 | 1 | 20 | 6 | 0 | 36 | 22 | 36 | 36 | 756 | 128 | 492 | 197 | 411 | 136 | 319 | 150 | 280 | 8 | 1 | 4 | 97 |
323,366 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/search.py | pytidb.search.SearchResult | from pydantic import BaseModel, Field
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Union, Tuple, Sequence, TypeVar, Generic, overload
class SearchResult(BaseModel, Generic[T]):
hit: T
distance: Optional[float] = Field(description='The distance between the query vector and the... |
class SearchResult(BaseModel, Generic[T]):
def __getattr__(self, item: str):
pass
@property
def similarity_score(self) -> Optional[float]:
pass | 4 | 0 | 6 | 0 | 6 | 0 | 2 | 0 | 2 | 3 | 0 | 0 | 2 | 0 | 2 | 86 | 28 | 2 | 26 | 7 | 22 | 0 | 13 | 6 | 10 | 2 | 5 | 1 | 4 |
323,367 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/table.py | pytidb.table.Table | from pytidb.orm.indexes import FullTextIndex, VectorIndex, format_distance_expression
from pathlib import Path
from pytidb.filters import Filters, build_filter_clauses
from pytidb.schema import QueryBundle, TableModelMeta, VectorDataType, TableModel, ColumnInfo, DistanceMetric
from pytidb.search import SearchType, Sear... |
class Table(Generic[T]):
def __init__(self, *, client: 'TiDBClient', schema: Optional[Type[T]]=None):
pass
@property
def table_model(self) -> T:
pass
@property
def table_name(self) -> str:
pass
@property
def client(self) -> 'TiDBClient':
pass
@property
... | 38 | 2 | 17 | 2 | 13 | 1 | 3 | 0.1 | 1 | 23 | 10 | 0 | 30 | 12 | 30 | 30 | 536 | 83 | 410 | 154 | 349 | 43 | 276 | 117 | 245 | 12 | 1 | 4 | 91 |
323,368 | pingcap/pytidb | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/pingcap_pytidb/pytidb/utils.py | pytidb.utils.TiDBConnectionURL | from pydantic import AnyUrl, UrlConstraints
class TiDBConnectionURL(AnyUrl):
"""A URL that enforces specific constraints for TiDB connections.
Format:
mysql+pymysql://[username:password@]host[:port][/database]
mysql+pymysql://[username:password@]host[:port][/database]?ssl_verify_cert=true&ssl_... | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.56 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 16 | 2 | 9 | 2 | 8 | 5 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
323,369 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/contributors_page.py | contributors_page.ContributorsPage | import urllib.request
import threading
import webbrowser
import requests
from core.ai_engine import set_ai_status
from PIL import Image, ImageTk
import json
import tkinter as tk
import io
from tkinter import ttk
import os
import time
class ContributorsPage(tk.Frame):
def __init__(self, parent, back_callback, root... |
class ContributorsPage(tk.Frame):
def __init__(self, parent, back_callback, root=None):
pass
def setup_styles(self):
'''Configure styles to match Karbon's theme using current theme_colors and font'''
pass
def show_loading(self):
'''Display a simple loading animation'''
... | 16 | 10 | 31 | 4 | 24 | 5 | 2 | 0.19 | 1 | 11 | 0 | 0 | 11 | 22 | 11 | 175 | 473 | 64 | 360 | 83 | 344 | 67 | 207 | 80 | 191 | 8 | 4 | 4 | 32 |
323,370 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/core/prompt_drafts_system.py | core.prompt_drafts_system.DraftsManagerUI | import tkinter as tk
from datetime import datetime
from tkinter import ttk, messagebox, simpledialog
class DraftsManagerUI(tk.Toplevel):
"""Main UI window for managing prompt drafts"""
def __init__(self, parent, get_current_prompt_callback=None, load_draft_callback=None):
super().__init__(parent)
... |
class DraftsManagerUI(tk.Toplevel):
'''Main UI window for managing prompt drafts'''
def __init__(self, parent, get_current_prompt_callback=None, load_draft_callback=None):
pass
def setup_window(self):
'''Configure the main window'''
pass
def setup_ui(self):
'''Setup t... | 16 | 12 | 27 | 3 | 21 | 7 | 2 | 0.32 | 1 | 9 | 1 | 0 | 12 | 6 | 12 | 197 | 397 | 52 | 304 | 52 | 288 | 96 | 153 | 52 | 137 | 6 | 3 | 3 | 32 |
323,371 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/core/prompt_drafts_system.py | core.prompt_drafts_system.PromptDraftsButton | import tkinter as tk
class PromptDraftsButton:
"""Helper class to add drafts button to existing prompt input"""
def __init__(self, parent_frame, get_prompt_callback, set_prompt_callback):
self.parent_frame = parent_frame
self.get_prompt = get_prompt_callback
self.set_prompt = set_promp... |
class PromptDraftsButton:
'''Helper class to add drafts button to existing prompt input'''
def __init__(self, parent_frame, get_prompt_callback, set_prompt_callback):
pass
def create_button(self):
'''Create the drafts button'''
pass
def open_drafts_manager(self):
'''O... | 4 | 3 | 13 | 1 | 11 | 2 | 1 | 0.18 | 0 | 2 | 1 | 0 | 3 | 5 | 3 | 3 | 44 | 6 | 34 | 10 | 30 | 6 | 16 | 10 | 12 | 2 | 0 | 1 | 4 |
323,372 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/core/prompt_drafts_system.py | core.prompt_drafts_system.PromptDraftsManager | import json
from datetime import datetime
from typing import List, Dict, Optional
import os
class PromptDraftsManager:
"""Backend manager for handling prompt drafts operations"""
def __init__(self, drafts_file='prompt_drafts.json'):
self.drafts_file = drafts_file
self.drafts = self.load_drafts... |
class PromptDraftsManager:
'''Backend manager for handling prompt drafts operations'''
def __init__(self, drafts_file='prompt_drafts.json'):
pass
def load_drafts(self) -> Dict:
'''Load drafts from JSON file'''
pass
def save_drafts(self):
'''Save drafts to JSON file'''... | 10 | 9 | 8 | 0 | 7 | 1 | 2 | 0.19 | 0 | 4 | 0 | 0 | 9 | 2 | 9 | 9 | 86 | 11 | 63 | 20 | 53 | 12 | 53 | 16 | 43 | 3 | 0 | 3 | 18 |
323,373 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/contributors_view.py | ui_items.contributors_view.ContributorsView | import tkinter as tk
class ContributorsView(tk.Frame):
def __init__(self, parent):
super().__init__(parent)
self.configure(bg='#1e1e1e')
title = tk.Label(self, text='Contributors', font=('Helvetica', 20, 'bold'), fg='#ffffff', bg='#1e1e1e')
title.pack(pady=20)
contributors ... |
class ContributorsView(tk.Frame):
def __init__(self, parent):
pass | 2 | 0 | 21 | 3 | 18 | 3 | 2 | 0.16 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 165 | 22 | 3 | 19 | 6 | 17 | 3 | 10 | 6 | 8 | 2 | 4 | 1 | 2 |
323,374 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/editor_view.py | ui_items.editor_view.EditorView | import tkinter as tk
import threading
from core.ai_engine import generate_code_from_prompt, ai_status
import os
from tkinter import ttk, messagebox, filedialog
from exporters.exporter import export_code
from core import prompt_history
class EditorView(tk.Frame):
def __init__(self, master, get_code_callback, set_c... |
class EditorView(tk.Frame):
def __init__(self, master, get_code_callback, set_code_callback, get_api_key_callback, get_model_source_callback):
pass
def setup_ui(self):
pass
def create_header(self):
pass
def create_toolbar(self):
pass
def insert_text(self, words)... | 45 | 11 | 31 | 4 | 25 | 5 | 3 | 0.21 | 1 | 12 | 1 | 0 | 37 | 26 | 37 | 201 | 1,346 | 191 | 1,063 | 175 | 1,015 | 228 | 522 | 160 | 474 | 14 | 4 | 7 | 132 |
323,375 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/editor_view.py | ui_items.editor_view.SimpleEmbeddedPreview | class SimpleEmbeddedPreview:
def __init__(self, parent_frame):
self.parent_frame = parent_frame
self.current_html = ''
def update_content(self, html_content):
"""Update the preview content by opening in browser"""
try:
temp_file = open_html_in_browser(html_content, ... | class SimpleEmbeddedPreview:
def __init__(self, parent_frame):
pass
def update_content(self, html_content):
'''Update the preview content by opening in browser'''
pass | 3 | 1 | 8 | 0 | 7 | 1 | 2 | 0.14 | 0 | 1 | 0 | 0 | 2 | 2 | 2 | 2 | 17 | 1 | 14 | 7 | 11 | 2 | 14 | 6 | 11 | 3 | 0 | 2 | 4 |
323,376 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/karbon_ui.py | ui_items.karbon_ui.KarbonUI | from ui_items.editor_view import EditorView, open_html_in_browser
from exporters.exporter import export_code, export_to_github
from ui_items.prompt_view import PromptView
from core.ai_engine import ai_status, generate_code_from_prompt
from tkinter import ttk, messagebox
from contributors_page import ContributorsPage
im... |
class KarbonUI:
def __init__(self, root, user=None):
pass
def show_history_panel(self):
pass
def show_selected():
pass
def setup_window(self):
pass
def center_window(self):
pass
def setup_styles(self):
pass
def create_title_... | 91 | 1 | 21 | 2 | 19 | 5 | 2 | 0.27 | 0 | 28 | 4 | 0 | 86 | 34 | 86 | 86 | 1,946 | 290 | 1,644 | 356 | 1,540 | 439 | 1,017 | 349 | 913 | 6 | 0 | 4 | 199 |
323,377 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/prompt_view.py | ui_items.prompt_view.PromptView | from core.ai_engine import ai_status
import tkinter as tk
import core.prompt_history as prompt_history
from core.ai_engine import optimize_prompt
from core.ai_engine import generate_code_from_prompt
import threading
class PromptView(tk.Frame):
def __init__(self, master, on_generate, get_api_key_callback, get_mode... |
class PromptView(tk.Frame):
def __init__(self, master, on_generate, get_api_key_callback, get_model_source_callback, examples_data):
pass
def setup_ui(self):
pass
def create_hero_section(self):
pass
def create_input_section(self):
pass
def create_secondary_butto... | 31 | 0 | 20 | 0 | 19 | 3 | 2 | 0.16 | 1 | 12 | 0 | 0 | 23 | 17 | 23 | 187 | 578 | 36 | 530 | 110 | 497 | 85 | 292 | 109 | 259 | 5 | 4 | 3 | 55 |
323,378 | ProTecGames/Karbon | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/ProTecGames_Karbon/ui_items/token_manager_view.py | ui_items.token_manager_view.TokenManagerView | from exporters.exporter import validate_github_token
import tkinter as tk
from tkinter import ttk, messagebox
import threading
from core.token_manager import encrypt_token, decrypt_token, clear_token, token_exists, ERROR_NO_TOKEN, SUCCESS_TOKEN_SAVED
import webbrowser
class TokenManagerView(ttk.Frame):
def __init... |
class TokenManagerView(ttk.Frame):
def __init__(self, parent, back_callback):
pass
def setup_styles(self):
'''Configure styles to match Karbon's theme'''
pass
def check_token_status(self):
'''Check if a token exists and update the UI accordingly'''
pass
def t... | 10 | 8 | 37 | 4 | 29 | 9 | 2 | 0.31 | 1 | 12 | 0 | 0 | 9 | 23 | 9 | 177 | 342 | 42 | 264 | 41 | 253 | 81 | 110 | 40 | 99 | 4 | 5 | 2 | 18 |
323,379 | rdnfn/feedback-forensics | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/rdnfn_feedback-forensics/src/feedback_forensics/data/datasets.py | feedback_forensics.data.datasets.BuiltinDataset | from dataclasses import dataclass
import re
@dataclass
class BuiltinDataset:
"""Class to represent a built-in dataset."""
name: str
path: str | None = None
description: str | None = None
filterable_columns: list[str] | None = None
source: str | None = None
@property
def url_name(self) ... | @dataclass
class BuiltinDataset:
'''Class to represent a built-in dataset.'''
@property
def url_name(self) -> str:
'''Get the name of the dataset for the URL.'''
pass | 4 | 2 | 8 | 0 | 6 | 2 | 1 | 0.23 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 2 | 13 | 7 | 10 | 3 | 8 | 6 | 6 | 1 | 0 | 0 | 1 |
323,380 | rdnfn/feedback-forensics | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/rdnfn_feedback-forensics/src/feedback_forensics/data/handler.py | feedback_forensics.data.handler.ColumnHandler | from feedback_forensics.data.loader import add_virtual_annotators, get_votes_dict
from pathlib import Path
from feedback_forensics.app.metrics import get_overall_metrics, compute_annotator_metrics
from loguru import logger
class ColumnHandler:
"""Class to handle data operations (loading, computing metrics) of a si... |
class ColumnHandler:
'''Class to handle data operations (loading, computing metrics) of a single annotation column dataset.'''
def __init__(self, cache: dict | None=None, avail_datasets: dict | None=None, reference_models: list[str] | None=None):
pass
@property
def votes_dict(self):
pa... | 30 | 11 | 6 | 1 | 5 | 1 | 1 | 0.19 | 0 | 5 | 0 | 0 | 19 | 8 | 19 | 19 | 150 | 31 | 100 | 46 | 65 | 19 | 62 | 31 | 42 | 2 | 0 | 1 | 21 |
323,381 | rdnfn/feedback-forensics | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/rdnfn_feedback-forensics/src/feedback_forensics/data/handler.py | feedback_forensics.data.handler.DatasetHandler | from loguru import logger
import pandas as pd
from pathlib import Path
class DatasetHandler:
"""Class to handle dataset operations of multi-column annotation datasets.
A dataset consists of one or multiple annotation columns, represented by
ColumnHandler objects. Each column can either be a different anno... |
class DatasetHandler:
'''Class to handle dataset operations of multi-column annotation datasets.
A dataset consists of one or multiple annotation columns, represented by
ColumnHandler objects. Each column can either be a different annotator or
the same annotator but on a different data(sub)set.
'''... | 35 | 25 | 12 | 1 | 10 | 2 | 2 | 0.19 | 0 | 9 | 1 | 0 | 26 | 5 | 26 | 26 | 350 | 49 | 256 | 85 | 203 | 48 | 136 | 59 | 109 | 8 | 0 | 2 | 44 |
323,382 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/application.py | scriptorium.application.ScriptoriumApplication | from scriptorium.dialogs import ScrptPreferencesDialog
from .language_tool import LanguageTool
from .window import ScrptWindow
from gi.repository import Gio, Adw, GLib, GObject
class ScriptoriumApplication(Adw.Application):
"""The main application singleton class."""
language_tool = GObject.Property(type=Langu... |
class ScriptoriumApplication(Adw.Application):
'''The main application singleton class.'''
def __init__(self):
pass
def change_color_scheme(self, _settings, value):
'''Handle a change in the select color scheme setting.'''
pass
def do_activate(self):
'''Called when th... | 9 | 7 | 12 | 1 | 8 | 3 | 2 | 0.4 | 1 | 4 | 3 | 0 | 8 | 1 | 8 | 8 | 110 | 16 | 67 | 19 | 58 | 27 | 45 | 19 | 36 | 4 | 1 | 1 | 13 |
323,383 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/dialogs/dialog_add.py | scriptorium.dialogs.dialog_add.ScrptAddDialog | from gi.repository import Adw, GObject, Gtk
from scriptorium.globals import BASE
@Gtk.Template(resource_path=f'{BASE}/dialogs/dialog_add.ui')
class ScrptAddDialog(Adw.AlertDialog):
"""Dialog to add a new scene."""
__gtype_name__ = 'ScrptAddDialog'
title = GObject.Property(type=str)
synopsis = GObject.P... | @Gtk.Template(resource_path=f'{BASE}/dialogs/dialog_add.ui')
class ScrptAddDialog(Adw.AlertDialog):
'''Dialog to add a new scene.'''
def __init__(self, name, **kwargs):
'''Create a new instance of the class.'''
pass
@Gtk.Template.Callback()
def on_title_changed(self, entry_row):
... | 5 | 3 | 5 | 1 | 3 | 1 | 1 | 0.27 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 19 | 5 | 11 | 8 | 7 | 3 | 10 | 7 | 7 | 1 | 1 | 0 | 2 |
323,384 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/dialogs/preferences.py | scriptorium.dialogs.preferences.ScrptPreferencesDialog | from gi.repository import Adw, Gtk, Gio, Pango
from scriptorium.globals import BASE
from scriptorium.utils import html_to_buffer
@Gtk.Template(resource_path=f'{BASE}/dialogs/preferences.ui')
class ScrptPreferencesDialog(Adw.PreferencesDialog):
__gtype_name__ = 'ScrptPreferencesDialog'
open_last_project = Gtk.T... | @Gtk.Template(resource_path=f'{BASE}/dialogs/preferences.ui')
class ScrptPreferencesDialog(Adw.PreferencesDialog):
def __init__(self):
'''Create a new instance of the class.'''
pass
@Gtk.Template.Callback()
def on_font_selected(self, _button, _value):
'''Handle the selection of a ne... | 7 | 3 | 20 | 3 | 15 | 2 | 1 | 0.13 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 3 | 74 | 12 | 55 | 21 | 49 | 7 | 28 | 19 | 24 | 1 | 1 | 0 | 3 |
323,385 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/dialogs/select_entities.py | scriptorium.dialogs.select_entities.ScrptSelectEntitiesDialog | from scriptorium.globals import BASE
from gi.repository import Adw, Gtk
@Gtk.Template(resource_path=f'{BASE}/dialogs/select_entities.ui')
class ScrptSelectEntitiesDialog(Adw.AlertDialog):
"""Dialog to select story elements."""
__gtype_name__ = 'ScrptSelectEntitiesDialog'
list_box = Gtk.Template.Child()
... | @Gtk.Template(resource_path=f'{BASE}/dialogs/select_entities.ui')
class ScrptSelectEntitiesDialog(Adw.AlertDialog):
'''Dialog to select story elements.'''
def __init__(self, scene, entities):
'''Create a new instance of the class.'''
pass
def _filter(self, row):
'''Return True if t... | 5 | 3 | 7 | 1 | 5 | 2 | 2 | 0.33 | 1 | 1 | 0 | 0 | 3 | 1 | 3 | 3 | 31 | 7 | 18 | 10 | 14 | 6 | 18 | 10 | 14 | 2 | 1 | 1 | 5 |
323,386 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/dialogs/select_scenes.py | scriptorium.dialogs.select_scenes.ScrptSelectScenesDialog | from gi.repository import Adw, Gtk
from scriptorium.globals import BASE
@Gtk.Template(resource_path=f'{BASE}/dialogs/select_scenes.ui')
class ScrptSelectScenesDialog(Adw.AlertDialog):
"""Dialog to select scenes."""
__gtype_name__ = 'ScrptSelectScenesDialog'
scenes_list = Gtk.Template.Child()
def __ini... | @Gtk.Template(resource_path=f'{BASE}/dialogs/select_scenes.ui')
class ScrptSelectScenesDialog(Adw.AlertDialog):
'''Dialog to select scenes.'''
def __init__(self, manuscript_scenes):
'''Create a new instance of the class.'''
pass
def _filter_scenes(self, row):
'''Return True if the ... | 5 | 3 | 7 | 1 | 5 | 2 | 2 | 0.35 | 1 | 1 | 0 | 0 | 3 | 0 | 3 | 3 | 30 | 7 | 17 | 9 | 13 | 6 | 17 | 9 | 13 | 2 | 1 | 1 | 5 |
323,387 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/language_tool.py | scriptorium.language_tool.LanguageTool | import json
from scriptorium.models import Annotation
from gi.repository import Gio, GObject, Soup, GLib
class LanguageTool(GObject.Object):
server_is_alive = GObject.Property(type=bool, default=False)
def __init__(self):
super().__init__()
self._session = Soup.Session()
self._proc_lan... |
class LanguageTool(GObject.Object):
def __init__(self):
pass
def send_ping(self):
pass
def handle_ping_reply(self, session, result):
pass
def shutdown(self):
pass
def _start_server(self):
pass
def check(self, text: str, language: str, callback):
... | 8 | 1 | 17 | 3 | 12 | 2 | 3 | 0.17 | 1 | 2 | 0 | 0 | 7 | 2 | 7 | 7 | 129 | 26 | 88 | 21 | 80 | 15 | 57 | 21 | 49 | 8 | 1 | 2 | 19 |
323,388 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/Scene.py | scriptorium.models.Scene.Scene | from gi.repository import Gtk, GObject, Gio
from .commit_message import CommitMessage
from .entity import Entity
from .resource import Resource
from scriptorium.utils import html_to_buffer, buffer_to_html
from pathlib import Path
class Scene(Resource):
"""A scene is a basic building block of manuscripts."""
__... |
class Scene(Resource):
'''A scene is a basic building block of manuscripts.'''
def __init__(self, project, identifier: str):
'''Create a scene.'''
pass
@property
def data_files(self):
pass
@property
def history(self):
'''Return the history of commits about that ... | 14 | 9 | 9 | 1 | 6 | 2 | 2 | 0.28 | 1 | 6 | 2 | 0 | 10 | 3 | 10 | 15 | 107 | 21 | 67 | 31 | 53 | 19 | 61 | 28 | 50 | 3 | 2 | 2 | 21 |
323,389 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/annotation.py | scriptorium.models.annotation.Annotation | from gi.repository import GObject, Gtk
class Annotation(GObject.Object):
"""An annotation is a section of a text marked with some text."""
__gtype_name__ = 'Annotation'
title = GObject.Property(type=str)
message = GObject.Property(type=str)
category = GObject.Property(type=str)
offset = GObject... |
class Annotation(GObject.Object):
'''An annotation is a section of a text marked with some text.'''
def __init__(self):
'''Create a new instance of Chapter.'''
pass | 2 | 2 | 4 | 0 | 3 | 1 | 1 | 0.18 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 15 | 2 | 11 | 9 | 9 | 2 | 11 | 9 | 9 | 1 | 1 | 0 | 1 |
323,390 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/chapter.py | scriptorium.models.chapter.Chapter | from gi.repository import Gio, GObject
from .scene import Scene
from .resource import Resource
class Chapter(Resource):
"""A chapter is a list of scenes."""
__gtype_name__ = 'Chapter'
content = GObject.Property(type=Gio.ListStore)
def __init__(self, project, identifier):
"""Create a new instan... |
class Chapter(Resource):
'''A chapter is a list of scenes.'''
def __init__(self, project, identifier):
'''Create a new instance of Chapter.'''
pass
def remove_scene(self, scene: Scene):
'''Remove a scene from the chapter.'''
pass
def add_scene(self, scene: Scene, posi... | 5 | 5 | 6 | 0 | 5 | 1 | 2 | 0.23 | 1 | 3 | 1 | 0 | 4 | 0 | 4 | 9 | 32 | 5 | 22 | 10 | 17 | 5 | 20 | 10 | 15 | 2 | 2 | 1 | 7 |
323,391 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/commit_message.py | scriptorium.models.commit_message.CommitMessage | from gi.repository import GObject
class CommitMessage(GObject.Object):
"""A commit message is a message with a date."""
def __init__(self, datetime, message):
"""Create a new message."""
super().__init__()
self._datetime = datetime
self._message = message
@GObject.Property... |
class CommitMessage(GObject.Object):
'''A commit message is a message with a date.'''
def __init__(self, datetime, message):
'''Create a new message.'''
pass
@GObject.Property(type=str)
def datetime(self) -> str:
pass
@GObject.Property(type=str)
def message(self) -> str... | 6 | 2 | 3 | 0 | 3 | 0 | 1 | 0.18 | 1 | 2 | 0 | 0 | 3 | 2 | 3 | 3 | 17 | 4 | 11 | 8 | 5 | 2 | 9 | 6 | 5 | 1 | 1 | 0 | 3 |
323,392 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/entity.py | scriptorium.models.entity.Entity | from .resource import Resource
from gi.repository import GObject
class Entity(Resource):
"""An entity is a story element (person, place, prop, ...)"""
__gtype_name__ = 'Entity'
category = GObject.Property(type=str)
def __init__(self, project, identifier: str):
"""Create an entity."""
s... |
class Entity(Resource):
'''An entity is a story element (person, place, prop, ...)'''
def __init__(self, project, identifier: str):
'''Create an entity.'''
pass
@GObject.Property(type=GObject.Object)
def manuscript(self):
'''Return the manuscript the entity is associated to.'''... | 5 | 4 | 6 | 1 | 4 | 2 | 2 | 0.4 | 1 | 3 | 0 | 0 | 3 | 0 | 3 | 8 | 27 | 6 | 15 | 9 | 10 | 6 | 14 | 8 | 10 | 3 | 2 | 1 | 5 |
323,393 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/image.py | scriptorium.models.image.Image | from .resource import Resource
import shutil
from gi.repository import GObject, Gio, Gdk
from pathlib import Path
class Image(Resource):
__gtype_name__ = 'Image'
file_name = GObject.Property(type=str)
def __init__(self, project, identifier: str):
"""Create an image instance."""
super().__i... |
class Image(Resource):
def __init__(self, project, identifier: str):
'''Create an image instance.'''
pass
@property
def data_files(self):
'''Return the file path for the image if it has been set.'''
pass
@property
def path(self):
pass
@property
def w... | 13 | 4 | 7 | 1 | 5 | 1 | 2 | 0.25 | 1 | 3 | 0 | 0 | 7 | 2 | 7 | 12 | 65 | 15 | 40 | 20 | 27 | 10 | 32 | 15 | 24 | 3 | 2 | 2 | 12 |
323,394 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/library.py | scriptorium.models.library.Library | from pathlib import Path
from gi.repository import GObject, Gio
import shutil
from .project import Project
from .manuscript import Manuscript
import uuid
class Library(GObject.Object):
"""The library is the collection of projects."""
projects: GObject.Property = GObject.Property(type=Gio.ListStore)
def __... |
class Library(GObject.Object):
'''The library is the collection of projects.'''
def __init__(self):
'''Create an instance of the library for the target folder.'''
pass
def open_folder(self, base_directory: str):
pass
@property
def base_directory(self) -> Path:
'''T... | 8 | 6 | 11 | 2 | 6 | 3 | 2 | 0.56 | 1 | 5 | 2 | 0 | 6 | 1 | 6 | 6 | 75 | 19 | 36 | 18 | 28 | 20 | 35 | 17 | 28 | 3 | 1 | 2 | 10 |
323,395 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/manuscript.py | scriptorium.models.manuscript.Manuscript | from .chapter import Chapter
from .resource import Resource
from .scene import Scene
from gi.repository import GObject, Gio
from .image import Image
class Manuscript(Resource):
"""A manuscript is a collection of scenes and chapters."""
__gtype_name__ = 'Manuscript'
content = GObject.Property(type=Gio.ListS... |
class Manuscript(Resource):
'''A manuscript is a collection of scenes and chapters.'''
def __init__(self, project, identifier):
'''Create a new manuscript.'''
pass
def add_resource(self, resource: Resource, position: int=None) -> bool:
'''Add an existing resource to the manuscript... | 4 | 4 | 10 | 1 | 6 | 2 | 2 | 0.45 | 1 | 6 | 2 | 0 | 3 | 0 | 3 | 8 | 41 | 9 | 22 | 9 | 18 | 10 | 21 | 9 | 17 | 3 | 2 | 1 | 6 |
323,396 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/project.py | scriptorium.models.project.Project | import git
from .chapter import Chapter
from .manuscript import Manuscript
from .scene import Scene
from gi.repository import GObject, Gio, Gtk
import uuid
from .entity import Entity
from .resource import Resource
import yaml
from pathlib import Path
from .image import Image
class Project(GObject.Object):
__gtype_... |
class Project(GObject.Object):
def __init__(self, project_path):
'''Create a resource.'''
pass
def _set_can_be_opened(self):
'''Set property to true if the project has the right format.'''
pass
def migrate(self) -> bool:
'''Migrate the project to the current versi... | 26 | 17 | 18 | 3 | 12 | 4 | 4 | 0.35 | 1 | 13 | 6 | 0 | 18 | 3 | 18 | 18 | 367 | 68 | 221 | 76 | 195 | 78 | 180 | 66 | 161 | 16 | 1 | 6 | 67 |
323,397 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/resource.py | scriptorium.models.resource.Resource | from gi.repository import GObject, Gio
class Resource(GObject.Object):
__gtype_name__ = 'Resource'
identifier = GObject.Property(type=str)
title = GObject.Property(type=str)
synopsis = GObject.Property(type=str)
deleted = GObject.Signal()
def __init__(self, project, identifier: str):
"... |
class Resource(GObject.Object):
def __init__(self, project, identifier: str):
'''Create a resource.'''
pass
@property
def project(self):
pass
@property
def data_files(self):
pass
@property
def references(self):
'''Provide a list of other resources re... | 9 | 3 | 10 | 1 | 6 | 3 | 3 | 0.44 | 1 | 4 | 0 | 6 | 5 | 1 | 5 | 5 | 70 | 14 | 39 | 23 | 30 | 17 | 35 | 20 | 29 | 10 | 1 | 6 | 14 |
323,398 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/models/scene.py | scriptorium.models.scene.Scene | from pathlib import Path
from .entity import Entity
from scriptorium.utils import html_to_buffer, buffer_to_html
from gi.repository import Gtk, GObject, Gio
from .resource import Resource
from .commit_message import CommitMessage
class Scene(Resource):
"""A scene is a basic building block of manuscripts."""
__... |
class Scene(Resource):
'''A scene is a basic building block of manuscripts.'''
def __init__(self, project, identifier: str):
'''Create a scene.'''
pass
@property
def data_files(self):
pass
@property
def history(self):
'''Return the history of commits about that ... | 14 | 9 | 9 | 1 | 6 | 2 | 2 | 0.28 | 1 | 6 | 2 | 0 | 10 | 3 | 10 | 15 | 107 | 21 | 67 | 31 | 53 | 19 | 61 | 28 | 50 | 3 | 2 | 2 | 21 |
323,399 | cgueret/Scriptorium | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/cgueret_Scriptorium/scriptorium/utils/publisher.py | scriptorium.utils.publisher.Publisher | from scriptorium.models import Resource, Manuscript, Chapter, Scene
from gi.repository import Gio
from jinja2 import Environment, PackageLoader, select_autoescape
from scriptorium.globals import BASE
import io
from ebooklib import epub
class Publisher(object):
"""
Publisher is a helper class to encapsulate the... |
class Publisher(object):
'''
Publisher is a helper class to encapsulate the content of the manuscript
as a set of HTML files. This content can be used as a view in the editor
or exported to disk as an epub.
'''
def __init__(self, manuscript: Manuscript):
'''Create a new instance of a P... | 9 | 3 | 17 | 2 | 12 | 3 | 3 | 0.3 | 1 | 1 | 0 | 0 | 7 | 3 | 7 | 7 | 133 | 24 | 84 | 23 | 75 | 25 | 62 | 22 | 54 | 6 | 1 | 2 | 19 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.