id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
324,500 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/reaction.py | botpy.types.reaction.Reaction | from typing import TypedDict, Literal, List
from .emoji import Emoji
class Reaction(TypedDict):
user_id: str
guild_id: str
channel_id: str
target: ReactionTarget
emoji: Emoji |
class Reaction(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
324,501 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/reaction.py | botpy.types.reaction.ReactionTarget | from typing import TypedDict, Literal, List
class ReactionTarget(TypedDict):
id: str
type: ReactionTargetType |
class ReactionTarget(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 |
324,502 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/reaction.py | botpy.types.reaction.ReactionUsers | from typing import TypedDict, Literal, List
from .user import User
class ReactionUsers(TypedDict):
users: List[User]
cookie: str
is_end: bool |
class ReactionUsers(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 2 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
324,503 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.AtGuildInfo | from typing import TypedDict, Literal, List
class AtGuildInfo(TypedDict):
guild_id: str
guild_name: str |
class AtGuildInfo(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 |
324,504 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.AtInfo | from typing import TypedDict, Literal, List
class AtInfo(TypedDict):
type: AuditType
user_info: AtUserInfo
role_info: AtRoleInfo
guild_info: AtGuildInfo |
class AtInfo(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
324,505 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.AtRoleInfo | from typing import TypedDict, Literal, List
class AtRoleInfo(TypedDict):
role_id: int
name: str
color: int |
class AtRoleInfo(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
324,506 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.AtUserInfo | from typing import TypedDict, Literal, List
class AtUserInfo(TypedDict):
id: str
nick: str |
class AtUserInfo(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 |
324,507 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.ChannelInfo | from typing import TypedDict, Literal, List
class ChannelInfo(TypedDict):
channel_id: int
channel_name: str |
class ChannelInfo(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 |
324,508 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.Elem | from typing import TypedDict, Literal, List
class Elem(TypedDict):
text: TextElem
image: ImageElem
video: VideoElem
url: URLElem
type: ElemType |
class Elem(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
324,509 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.EmojiInfo | from typing import TypedDict, Literal, List
class EmojiInfo(TypedDict):
id: str
type: str
name: str
url: str |
class EmojiInfo(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
324,510 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.ImageElem | from typing import TypedDict, Literal, List
class ImageElem(TypedDict):
third_url: str
width_percent: float |
class ImageElem(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 |
324,511 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.Paragraph | from typing import TypedDict, Literal, List
class Paragraph(TypedDict):
elems: List[Elem]
props: ParagraphProps |
class Paragraph(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 |
324,512 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.ParagraphProps | from typing import TypedDict, Literal, List
class ParagraphProps(TypedDict):
alignment: Alignment |
class ParagraphProps(TypedDict):
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 | 1 | 0 | 0 |
324,513 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.PlatImage | from typing import TypedDict, Literal, List
class PlatImage(TypedDict):
url: str
width: int
height: int
image_id: str |
class PlatImage(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
324,514 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.PlatVideo | from typing import TypedDict, Literal, List
class PlatVideo(TypedDict):
url: str
width: int
height: int
video_id: str
duration: int
cover: PlatImage |
class PlatVideo(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 |
324,515 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.RichObject | from typing import TypedDict, Literal, List
class RichObject(TypedDict):
type: RichType
text_info: TextInfo
at_info: AtInfo
url_info: URLInfo
emoji_info: EmojiInfo
channel_info: ChannelInfo |
class RichObject(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 |
324,516 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.RichText | from typing import TypedDict, Literal, List
class RichText(TypedDict):
paragraphs: Paragraph |
class RichText(TypedDict):
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 | 1 | 0 | 0 |
324,517 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.TextElem | from typing import TypedDict, Literal, List
class TextElem(TypedDict):
text: str
props: TextProps |
class TextElem(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 |
324,518 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.TextInfo | from typing import TypedDict, Literal, List
class TextInfo(TypedDict):
text: str |
class TextInfo(TypedDict):
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 | 1 | 0 | 0 |
324,519 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.TextProps | from typing import TypedDict, Literal, List
class TextProps(TypedDict):
font_bold: bool
italic: bool
underline: bool |
class TextProps(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
324,520 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.URLElem | from typing import TypedDict, Literal, List
class URLElem(TypedDict):
url: str
desc: str |
class URLElem(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 |
324,521 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.URLInfo | from typing import TypedDict, Literal, List
class URLInfo(TypedDict):
url: str
display_text: str |
class URLInfo(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 |
324,522 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/rich_text.py | botpy.types.rich_text.VideoElem | from typing import TypedDict, Literal, List
class VideoElem(TypedDict):
third_url: str |
class VideoElem(TypedDict):
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 | 1 | 0 | 0 |
324,523 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/robot.py | botpy.types.robot.Robot | from typing import TypedDict
class Robot(TypedDict):
id: str
username: str
avatar: str |
class Robot(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
324,524 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/schedule.py | botpy.types.schedule.Schedule | from botpy.types.user import Member
class Schedule:
"""
RemindType
提醒类型 id 描述
0 不提醒
1 开始时提醒
2 开始前 5 分钟提醒
3 开始前 15 分钟提醒
4 开始前 30 分钟提醒
5 开始前 60 分钟提醒
"""
id: str
name: str
description: str
start_timestamp: str
end_timestamp: str
c... |
class Schedule:
'''
RemindType
提醒类型 id 描述
0 不提醒
1 开始时提醒
2 开始前 5 分钟提醒
3 开始前 15 分钟提醒
4 开始前 30 分钟提醒
5 开始前 60 分钟提醒
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.11 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 1 | 9 | 1 | 8 | 10 | 9 | 1 | 8 | 0 | 0 | 0 | 0 |
324,525 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/session.py | botpy.types.session.Session | from typing import TypedDict
from ..robot import Token
class Session(TypedDict):
session_id: str
last_seq: int
intent: int
token: Token
url: str
shards: ShardConfig |
class Session(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 |
324,526 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/session.py | botpy.types.session.ShardConfig | from typing import TypedDict
class ShardConfig(TypedDict):
shard_id: int
shard_count: int |
class ShardConfig(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 |
324,527 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/user.py | botpy.types.user.GuildMemberPayload | class GuildMemberPayload(Member):
guild_id: str | class GuildMemberPayload(Member):
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 |
324,528 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/user.py | botpy.types.user.Member | from typing import TypedDict, List
class Member(TypedDict):
user: User
nick: str
roles: List[str]
joined_at: str |
class Member(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
324,529 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/types/user.py | botpy.types.user.User | from typing import TypedDict, List
class User(TypedDict):
id: str
username: str
avatar: str
bot: bool
union_openid: str
union_user_account: str |
class User(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 |
324,530 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/botpy/user.py | botpy.user.Member | from .api import BotAPI
from .types import user
class Member:
__slots__ = ('_api', '_ctx', 'user', 'nick', 'roles', 'joined_at', 'event_id', 'guild_id')
def __init__(self, api: BotAPI, event_id, data: user.GuildMemberPayload):
self._api = api
self.user = self._User(data.get('user', {}))
... |
class Member:
def __init__(self, api: BotAPI, event_id, data: user.GuildMemberPayload):
pass
def __repr__(self):
pass
class _User:
def __init__(self, api: BotAPI, event_id, data: user.GuildMemberPayload):
pass
def __repr__(self):
pass | 6 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 0 | 4 | 3 | 0 | 2 | 7 | 2 | 2 | 27 | 5 | 22 | 20 | 16 | 0 | 22 | 20 | 16 | 1 | 0 | 0 | 4 |
324,531 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy_integration.py | botpy_integration.BotpyClient | from config import BOT_APPID, BOT_APPSECRET, USE_BOTPY_CLIENT, BOTPY_INTENTS, BOTPY_LOG_LEVEL, BOTPY_TIMEOUT, BOTPY_IS_SANDBOX
import logging
class BotpyClient(botpy.Client if BOTPY_AVAILABLE else object):
"""Botpy客户端适配器"""
def __init__(self, event_handler):
if not BOTPY_AVAILABLE:
raise I... |
class BotpyClient(botpy.Client if BOTPY_AVAILABLE else object):
'''Botpy客户端适配器'''
def __init__(self, event_handler):
pass
def _parse_intents(self, intents_str: str) -> Intents:
'''解析intents配置字符串'''
pass
async def on_ready(self):
'''机器人准备就绪'''
pass
async d... | 16 | 15 | 6 | 0 | 5 | 1 | 1 | 0.24 | 0 | 9 | 6 | 0 | 15 | 2 | 15 | 15 | 113 | 21 | 74 | 26 | 58 | 18 | 49 | 26 | 33 | 3 | 0 | 2 | 18 |
324,532 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy_integration.py | botpy_integration.BotpyEventAdapter | from typing import Optional, Dict, Any, List
class BotpyEventAdapter:
"""Botpy事件适配器,将botpy事件转换为现有框架事件格式"""
def __init__(self, event_handler):
self.event_handler = event_handler
def convert_message_to_event_data(self, message) -> Dict[str, Any]:
"""将botpy消息对象转换为现有框架的事件数据格式"""
if is... |
class BotpyEventAdapter:
'''Botpy事件适配器,将botpy事件转换为现有框架事件格式'''
def __init__(self, event_handler):
pass
def convert_message_to_event_data(self, message) -> Dict[str, Any]:
'''将botpy消息对象转换为现有框架的事件数据格式'''
pass | 3 | 2 | 31 | 0 | 28 | 3 | 3 | 0.11 | 0 | 7 | 4 | 0 | 2 | 1 | 2 | 2 | 65 | 2 | 57 | 4 | 54 | 6 | 11 | 4 | 8 | 5 | 0 | 1 | 6 |
324,533 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/color_formatter.py | color_formatter.ColorFormatter | import logging
from colorama import Fore, Style
class ColorFormatter(logging.Formatter):
"""为不同级别的日志添加不同颜色的格式化器"""
COLORS = {'DEBUG': Fore.CYAN, 'INFO': Fore.GREEN, 'WARNING': Fore.YELLOW, 'ERROR': Fore.RED, 'CRITICAL': Fore.RED + Style.BRIGHT}
MODULE_COLORS = {'websocket_client': Fore.MAGENTA, 'event_hand... |
class ColorFormatter(logging.Formatter):
'''为不同级别的日志添加不同颜色的格式化器'''
def __init__(self, fmt=None, datefmt=None, style='%'):
pass
def format(self, record):
pass | 3 | 1 | 15 | 3 | 9 | 4 | 3 | 0.29 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 9 | 53 | 9 | 34 | 12 | 31 | 10 | 21 | 12 | 18 | 5 | 2 | 2 | 6 |
324,534 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_announce.py | demo_announce.MyClient | import botpy
from botpy.types.announce import AnnouncesType
from botpy.message import Message
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
_log.info(f'{self.robot.name}receive message {message.content}')
await self.api.post_message(message.channel_id, conte... |
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
pass | 2 | 0 | 18 | 4 | 11 | 3 | 4 | 0.25 | 1 | 2 | 2 | 0 | 1 | 0 | 1 | 1 | 19 | 4 | 12 | 4 | 10 | 3 | 10 | 4 | 8 | 4 | 1 | 1 | 4 |
324,535 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_api_permission.py | demo_api_permission.MyClient | from botpy.types.permission import APIPermissionDemandIdentify
from botpy.message import Message
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
await message.reply(c... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 9 | 1 | 7 | 1 | 3 | 0.13 | 1 | 2 | 2 | 0 | 2 | 0 | 2 | 2 | 19 | 2 | 15 | 7 | 12 | 2 | 13 | 7 | 10 | 4 | 1 | 2 | 5 |
324,536 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply.py | demo_at_reply.MyClient | import asyncio
from botpy.message import Message
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
_log.info(message.author.avatar)
if 'sleep' in message.conten... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 10 | 1 | 9 | 3 | 6 | 0 | 9 | 3 | 6 | 2 | 1 | 1 | 3 |
324,537 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_ark.py | demo_at_reply_ark.MyClient | from botpy.types.message import Ark, ArkKv
import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
payload: Ark = Ark(template_id=37, kv=[Ar... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 12 | 1 | 7 | 7 | 1 | 1 | 1 | 3 | 3 | 0 | 2 | 0 | 2 | 2 | 26 | 2 | 14 | 4 | 11 | 14 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
324,538 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_command.py | demo_at_reply_command.MyClient | import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
handlers = [hello, good_night]
for handler in handlers:
if await handler(api=self.api, message=message):
return |
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
pass | 2 | 0 | 9 | 0 | 8 | 1 | 3 | 0.11 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 1 | 10 | 0 | 9 | 5 | 7 | 1 | 6 | 4 | 4 | 3 | 1 | 2 | 3 |
324,539 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_embed.py | demo_at_reply_embed.MyClient | import botpy
from botpy.message import Message
from botpy.types.message import Embed, EmbedField
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
embed = Embed(title='embed消息', pro... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 12 | 1 | 6 | 5 | 1 | 0.69 | 1 | 3 | 3 | 0 | 2 | 0 | 2 | 2 | 25 | 3 | 13 | 4 | 10 | 9 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
324,540 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_file_data.py | demo_at_reply_file_data.MyClient | import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
with open('resource/test.png', 'rb') as img:
img_bytes = img.read()
... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 6 | 0 | 5 | 2 | 1 | 0.3 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 14 | 1 | 10 | 5 | 7 | 3 | 10 | 4 | 7 | 1 | 1 | 1 | 2 |
324,541 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_keyboard.py | demo_at_reply_keyboard.MyClient | from botpy.message import Message
import botpy
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
await send_template_keyboard(self.api, message)
await send_self_defined_keyboard(self.api, message) |
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 4 | 0 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 1 | 0 | 1 |
324,542 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_markdown.py | demo_at_reply_markdown.MyClient | import botpy
from botpy.message import Message
from botpy.types.message import MarkdownPayload, MessageMarkdownParams
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def handle_send_markdown_by_template(self, channel_id, msg_id):
... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def handle_send_markdown_by_template(self, channel_id, msg_id):
pass
async def handle_send_markdown_by_content(self, channel_id, msg_id):
pass
async def on_at_message_create(self, message: Message):
pass | 5 | 0 | 5 | 0 | 4 | 1 | 1 | 0.18 | 1 | 3 | 3 | 0 | 4 | 0 | 4 | 4 | 23 | 4 | 17 | 8 | 12 | 3 | 14 | 8 | 9 | 1 | 1 | 0 | 4 |
324,543 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_at_reply_reference.py | demo_at_reply_reference.MyClient | from botpy.message import Message
from botpy.types.message import Reference
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
message_reference = Reference(message_id=m... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 6 | 0 | 5 | 1 | 1 | 0.18 | 1 | 2 | 2 | 0 | 2 | 0 | 2 | 2 | 14 | 1 | 11 | 4 | 8 | 2 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
324,544 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_audio_or_live_channel_member.py | demo_audio_or_live_channel_member.MyClient | import botpy
from botpy.audio import PublicAudio
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_audio_or_live_channel_member_enter(self, Public_Audio: PublicAudio):
if Public_Audio.channel_type == 2:
_log.info... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_audio_or_live_channel_member_enter(self, Public_Audio: PublicAudio):
pass
async def on_audio_or_live_channel_member_exit(self, Public_Audio: PublicAudio):
pass | 4 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 3 | 0 | 3 | 3 | 15 | 2 | 13 | 4 | 9 | 0 | 11 | 4 | 7 | 3 | 1 | 1 | 7 |
324,545 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_c2c_manage_event.py | demo_c2c_manage_event.MyClient | from botpy.manage import C2CManageEvent
import botpy
class MyClient(botpy.Client):
async def on_friend_add(self, event: C2CManageEvent):
_log.info('用户添加机器人:' + str(event))
await self.api.post_c2c_message(openid=event.openid, msg_type=0, event_id=event.event_id, content='hello')
async def on_f... |
class MyClient(botpy.Client):
async def on_friend_add(self, event: C2CManageEvent):
pass
async def on_friend_del(self, event: C2CManageEvent):
pass
async def on_c2c_msg_reject(self, event: C2CManageEvent):
pass
async def on_c2c_msg_receive(self, event: C2CManageEvent):
pass | 5 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 4 | 0 | 4 | 4 | 18 | 3 | 15 | 5 | 10 | 0 | 10 | 5 | 5 | 1 | 1 | 0 | 4 |
324,546 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_c2c_reply_file.py | demo_c2c_reply_file.MyClient | from botpy.message import C2CMessage
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_c2c_message_create(self, message: C2CMessage):
file_url = ''
uploadMedia = await message._api.post_c2c_file(openid=m... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_c2c_message_create(self, message: C2CMessage):
pass | 3 | 0 | 9 | 1 | 8 | 3 | 1 | 0.31 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 19 | 2 | 16 | 5 | 13 | 5 | 7 | 5 | 4 | 1 | 1 | 0 | 2 |
324,547 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_c2c_reply_text.py | demo_c2c_reply_text.MyClient | from botpy.message import C2CMessage
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_c2c_message_create(self, message: C2CMessage):
await message._api.post_c2c_message(openid=message.author.user_openid, msg_ty... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_c2c_message_create(self, message: C2CMessage):
pass | 3 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 10 | 1 | 9 | 3 | 6 | 0 | 5 | 3 | 2 | 1 | 1 | 0 | 2 |
324,548 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_dms_reply.py | demo_dms_reply.MyClient | import botpy
from botpy.message import DirectMessage, Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_direct_message_create(self, message: DirectMessage):
await self.api.post_dms(guild_id=message.guild_id, content=... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_direct_message_create(self, message: DirectMessage):
pass
async def on_at_message_create(self, message: Message):
pass | 4 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 3 | 0 | 3 | 3 | 16 | 2 | 14 | 5 | 10 | 0 | 10 | 5 | 6 | 2 | 1 | 1 | 4 |
324,549 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_get_reaction_users.py | demo_get_reaction_users.MyClient | from typing import List
from botpy.types.user import User
from botpy.types import reaction
import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
users: List[User] = []
cookie = ''
while True:
reactio... |
class MyClient(botpy.Client):
async def on_at_message_create(self, message: Message):
pass | 2 | 0 | 25 | 4 | 21 | 0 | 5 | 0 | 1 | 3 | 3 | 0 | 1 | 0 | 1 | 1 | 26 | 4 | 22 | 6 | 20 | 0 | 15 | 6 | 13 | 5 | 1 | 2 | 5 |
324,550 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_group_manage_event.py | demo_group_manage_event.MyClient | from botpy.manage import GroupManageEvent
import botpy
class MyClient(botpy.Client):
async def on_group_add_robot(self, event: GroupManageEvent):
_log.info('机器人被添加到群聊:' + str(event))
await self.api.post_group_message(group_openid=event.group_openid, msg_type=0, event_id=event.event_id, content='he... |
class MyClient(botpy.Client):
async def on_group_add_robot(self, event: GroupManageEvent):
pass
async def on_group_del_robot(self, event: GroupManageEvent):
pass
async def on_group_msg_reject(self, event: GroupManageEvent):
pass
async def on_group_msg_receive(self, event: GroupManageEve... | 5 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 4 | 0 | 4 | 4 | 18 | 3 | 15 | 5 | 10 | 0 | 10 | 5 | 5 | 1 | 1 | 0 | 4 |
324,551 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_group_reply_file.py | demo_group_reply_file.MyClient | from botpy.message import GroupMessage, Message
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_group_at_message_create(self, message: GroupMessage):
file_url = ''
uploadMedia = await message._api.post... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_group_at_message_create(self, message: GroupMessage):
pass | 3 | 0 | 9 | 1 | 8 | 3 | 1 | 0.31 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 19 | 2 | 16 | 5 | 13 | 5 | 7 | 5 | 4 | 1 | 1 | 0 | 2 |
324,552 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_group_reply_text.py | demo_group_reply_text.MyClient | import botpy
from botpy.message import GroupMessage, Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_group_at_message_create(self, message: GroupMessage):
messageResult = await message._api.post_group_message(group... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_group_at_message_create(self, message: GroupMessage):
pass | 3 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 11 | 1 | 10 | 4 | 7 | 0 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
324,553 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_guild_member_event.py | demo_guild_member_event.MyClient | from botpy.user import Member
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_guild_member_add(self, member: Member):
_log.info('%s 加入频道' % member.nick)
dms_payload = await self.api.create_dms(member.g... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_guild_member_add(self, member: Member):
pass
async def on_guild_member_update(self, member: Member):
pass
async def on_guild_member_remove(self, member: Member):
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 4 | 0 | 4 | 4 | 15 | 3 | 12 | 6 | 7 | 0 | 12 | 6 | 7 | 1 | 1 | 0 | 4 |
324,554 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_open_forum_event.py | demo_open_forum_event.MyClient | from botpy.forum import OpenThread
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_open_forum_thread_create(self, open_forum_thread: OpenThread):
_log.info('%s 创建了主题' % open_forum_thread.author_id)
async ... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_open_forum_thread_create(self, open_forum_thread: OpenThread):
pass
async def on_open_forum_thread_update(self, open_forum_thread: OpenThread):
pass
async def on_open_forum_thread_delete(self, open_forum_thread: O... | 9 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 8 | 0 | 8 | 8 | 24 | 7 | 17 | 9 | 8 | 0 | 17 | 9 | 8 | 1 | 1 | 0 | 8 |
324,555 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_pins_message.py | demo_pins_message.MyClient | import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
await message.reply(content=f'机器人{self.robot.name}收到你的@消息了: {message.content}')
... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 8 | 1 | 7 | 0 | 3 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 17 | 3 | 14 | 5 | 11 | 0 | 14 | 5 | 11 | 4 | 1 | 1 | 5 |
324,556 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_recall.py | demo_recall.MyClient | from botpy.message import Message
import botpy
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
_message = await message.reply(content=f'机器人{self.robot.name}收到你的@消息了: {message.cont... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 2 | 7 | 1 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 1 | 0 | 2 |
324,557 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/botpy/examples/demo_schedule.py | demo_schedule.MyClient | import time
import botpy
from botpy.message import Message
class MyClient(botpy.Client):
async def on_ready(self):
_log.info(f'robot 「{self.robot.name}」 on_ready!')
async def on_at_message_create(self, message: Message):
schedule_id: str = ''
_log.info('receive message %s' % message.c... |
class MyClient(botpy.Client):
async def on_ready(self):
pass
async def on_at_message_create(self, message: Message):
pass | 3 | 0 | 20 | 2 | 17 | 2 | 3 | 0.09 | 1 | 3 | 1 | 0 | 2 | 0 | 2 | 2 | 42 | 5 | 35 | 8 | 32 | 3 | 17 | 8 | 14 | 5 | 1 | 1 | 6 |
324,558 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.EnhancedMessage | from typing import Dict, Any, Optional, Union
from dataclasses import dataclass
@dataclass
class EnhancedMessage:
"""增强的消息对象"""
id: Optional[str] = None
content: Optional[str] = None
author: Optional[EnhancedUser] = None
channel_id: Optional[str] = None
guild_id: Optional[str] = None
group_... | @dataclass
class EnhancedMessage:
'''增强的消息对象'''
@classmethod
def from_event_data(cls, event_data: Dict[str, Any], event_type: str) -> 'EnhancedMessage':
'''从事件数据创建消息对象'''
pass
def is_group_message(self) -> bool:
'''判断是否为群聊消息'''
pass
def is_private_message(self) -> b... | 8 | 6 | 7 | 0 | 6 | 1 | 2 | 0.14 | 0 | 7 | 3 | 0 | 4 | 0 | 5 | 5 | 55 | 6 | 43 | 19 | 36 | 6 | 28 | 18 | 22 | 4 | 0 | 1 | 10 |
324,559 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.EnhancedUser | from dataclasses import dataclass
from typing import Dict, Any, Optional, Union
@dataclass
class EnhancedUser:
"""增强的用户信息"""
id: Optional[str] = None
username: Optional[str] = None
avatar: Optional[str] = None
bot: Optional[bool] = None
openid: Optional[str] = None
user_openid: Optional[str... | @dataclass
class EnhancedUser:
'''增强的用户信息'''
@classmethod
def from_dict(cls, data: Dict[str, Any]) -> 'EnhancedUser':
'''从字典创建用户对象'''
pass
def get_user_id(self) -> Optional[str]:
'''获取用户ID,优先级:id > user_openid > member_openid > openid'''
pass | 5 | 3 | 7 | 0 | 6 | 1 | 1 | 0.14 | 0 | 2 | 0 | 0 | 1 | 0 | 2 | 2 | 26 | 2 | 21 | 10 | 17 | 3 | 12 | 9 | 9 | 1 | 0 | 0 | 2 |
324,560 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.EventDataNormalizer | from typing import Dict, Any, Optional, Union
class EventDataNormalizer:
"""事件数据标准化器"""
@staticmethod
def normalize_event_data(event_type: str, event_data: Dict[str, Any]) -> Dict[str, Any]:
"""标准化事件数据格式"""
normalized = event_data.copy()
normalized['type'] = event_type
if '... |
class EventDataNormalizer:
'''事件数据标准化器'''
@staticmethod
def normalize_event_data(event_type: str, event_data: Dict[str, Any]) -> Dict[str, Any]:
'''标准化事件数据格式'''
pass
@staticmethod
def extract_user_id(event_data: Dict[str, Any]) -> Optional[str]:
'''从事件数据中提取用户ID'''
pa... | 7 | 4 | 16 | 2 | 12 | 3 | 5 | 0.23 | 0 | 5 | 0 | 0 | 0 | 0 | 3 | 3 | 56 | 8 | 39 | 13 | 32 | 9 | 36 | 10 | 32 | 6 | 0 | 3 | 15 |
324,561 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.EventType | from enum import Enum
class EventType(Enum):
"""事件类型枚举"""
AT_MESSAGE_CREATE = 'AT_MESSAGE_CREATE'
DIRECT_MESSAGE_CREATE = 'DIRECT_MESSAGE_CREATE'
GROUP_AT_MESSAGE_CREATE = 'GROUP_AT_MESSAGE_CREATE'
C2C_MESSAGE_CREATE = 'C2C_MESSAGE_CREATE'
READY = 'READY'
RESUMED = 'RESUMED'
GROUP_ADD_R... |
class EventType(Enum):
'''事件类型枚举'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 23 | 3 | 15 | 15 | 14 | 5 | 15 | 15 | 14 | 0 | 4 | 0 | 0 |
324,562 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.MessageBuilder | from typing import Dict, Any, Optional, Union
class MessageBuilder:
"""增强的消息构建器"""
@staticmethod
def build_text_message(content: str) -> Dict[str, Any]:
"""构建文本消息"""
return {'content': content, 'msg_type': MessageType.TEXT.value}
@staticmethod
def build_markdown_message(content: s... |
class MessageBuilder:
'''增强的消息构建器'''
@staticmethod
def build_text_message(content: str) -> Dict[str, Any]:
'''构建文本消息'''
pass
@staticmethod
def build_markdown_message(content: str, markdown: Dict[str, Any]) -> Dict[str, Any]:
'''构建Markdown消息'''
pass
@staticmethod
... | 13 | 7 | 6 | 0 | 5 | 1 | 1 | 0.18 | 0 | 3 | 1 | 0 | 0 | 0 | 6 | 6 | 52 | 6 | 39 | 13 | 26 | 7 | 13 | 7 | 6 | 1 | 0 | 0 | 6 |
324,563 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/enhanced_message_types.py | enhanced_message_types.MessageType | from enum import Enum
class MessageType(Enum):
"""消息类型枚举"""
TEXT = 0
IMAGE = 1
MARKDOWN = 2
ARK = 3
EMBED = 4
FILE = 7
MEDIA = 7 |
class MessageType(Enum):
'''消息类型枚举'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 9 | 0 | 8 | 8 | 7 | 2 | 8 | 8 | 7 | 0 | 4 | 0 | 0 |
324,564 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/event_handler.py | event_handler.EventHandler | from plugins.plugin_manager import plugin_manager
from typing import Optional, Dict, Any
import traceback
import re
from auth_manager import auth_manager
from config import ENABLE_BLACKLIST, BLACKLIST_SHOW_REASON
from message import MessageSender
from stats_manager import stats_manager
from blacklist_manager import bla... |
class EventHandler:
'''
事件处理器:处理QQ机器人的各类事件
支持消息事件、机器人加入/退出群聊、用户添加/删除机器人等事件
'''
def __init__(self):
pass
def _load_ai_plugin_if_needed(self):
'''尝试加载AI聊天插件'''
pass
async def handle_event(self, event_type, event_data):
'''处理事件分发'''
pass
def _get... | 48 | 43 | 16 | 2 | 12 | 2 | 3 | 0.23 | 0 | 9 | 2 | 0 | 43 | 3 | 43 | 43 | 760 | 120 | 537 | 136 | 485 | 122 | 483 | 125 | 431 | 23 | 0 | 5 | 139 |
324,565 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/message.py | message.MessageBuilder | class MessageBuilder:
@staticmethod
def build_text_message(content):
"""构建纯文本消息"""
return {'content': content}
@staticmethod
def build_image_message(url):
"""构建图片消息"""
return {'image': url}
@staticmethod
def build_keyboard_message(content, buttons):
"""... | class MessageBuilder:
@staticmethod
def build_text_message(content):
'''构建纯文本消息'''
pass
@staticmethod
def build_image_message(url):
'''构建图片消息'''
pass
@staticmethod
def build_keyboard_message(content, buttons):
'''构建带按钮的消息'''
pass
@staticmethod... | 19 | 9 | 9 | 1 | 5 | 4 | 1 | 0.67 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 9 | 95 | 14 | 51 | 19 | 32 | 34 | 19 | 10 | 9 | 1 | 0 | 0 | 9 |
324,566 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/message.py | message.MessageSender | from config import API_SEND_MESSAGE_URL, API_BASE_URL
from auth import auth_manager
import requests
from enhanced_message_types import MessageType
from typing import Dict, Any, Union
class MessageSender:
@staticmethod
def _prepare_message_data(message_content: Union[str, Dict[str, Any]], message_type: Union[s... |
class MessageSender:
@staticmethod
def _prepare_message_data(message_content: Union[str, Dict[str, Any]], message_type: Union[str, int]='text') -> Dict[str, Any]:
'''准备消息数据,支持多种消息格式'''
pass
@staticmethod
def send_message(channel_id, message_type, message_content, is_group=False):
... | 37 | 18 | 23 | 3 | 13 | 7 | 3 | 0.5 | 0 | 8 | 2 | 0 | 0 | 0 | 18 | 18 | 450 | 68 | 256 | 81 | 219 | 127 | 186 | 58 | 167 | 10 | 0 | 3 | 58 |
324,567 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/base_plugin.py | plugins.base_plugin.BasePlugin | import logging
from abc import ABC, abstractmethod
class BasePlugin(ABC):
"""
插件基类,所有插件都应该继承这个类
"""
def __init__(self, command: str, description: str, is_builtin: bool=False, hidden: bool=False):
"""
初始化插件
Args:
command: 插件的命令名称
description: 插件的描述信息
... |
class BasePlugin(ABC):
'''
插件基类,所有插件都应该继承这个类
'''
def __init__(self, command: str, description: str, is_builtin: bool=False, hidden: bool=False):
'''
初始化插件
Args:
command: 插件的命令名称
description: 插件的描述信息
is_builtin: 是否为内置插件
hidden: 是否在... | 5 | 4 | 12 | 1 | 3 | 8 | 1 | 2.17 | 1 | 2 | 0 | 12 | 3 | 5 | 3 | 23 | 45 | 7 | 12 | 10 | 7 | 26 | 11 | 9 | 7 | 1 | 4 | 0 | 3 |
324,568 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/fortune_plugin.py | plugins.fortune_plugin.FortunePlugin | import json
import random
from datetime import datetime
import logging
from plugins.base_plugin import BasePlugin
import os
class FortunePlugin(BasePlugin):
"""
今日运势插件,为每个用户提供每日1-100的运势值,每天每人只能抽一次。
功能特点:
1. 每个用户每天只能抽取一次运势
2. 重复抽取会返回当天的结果
3. 支持针对特定关键词的特别运势
4. 自动清理过期运势记录,默认只保留30天内的记录
"""... |
class FortunePlugin(BasePlugin):
'''
今日运势插件,为每个用户提供每日1-100的运势值,每天每人只能抽一次。
功能特点:
1. 每个用户每天只能抽取一次运势
2. 重复抽取会返回当天的结果
3. 支持针对特定关键词的特别运势
4. 自动清理过期运势记录,默认只保留30天内的记录
'''
def __init__(self):
pass
def _load_data(self):
'''加载运势记录数据,并清理过期记录'''
pass
def _save_... | 7 | 6 | 27 | 5 | 17 | 6 | 4 | 0.43 | 1 | 6 | 0 | 0 | 6 | 6 | 6 | 29 | 180 | 35 | 102 | 32 | 95 | 44 | 94 | 28 | 87 | 9 | 5 | 4 | 23 |
324,569 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_admin_plugin.py | plugins.hiklqqbot_admin_plugin.HiklqqbotAdminPlugin | from auth_manager import auth_manager
from plugins.base_plugin import BasePlugin
import logging
class HiklqqbotAdminPlugin(BasePlugin):
"""
管理员管理插件,用于添加/删除/查看管理员
"""
def __init__(self):
super().__init__(command='hiklqqbot_admin', description='管理员管理:添加/删除/查看管理员', is_builtin=True, hidden=False)
... |
class HiklqqbotAdminPlugin(BasePlugin):
'''
管理员管理插件,用于添加/删除/查看管理员
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
处理管理员相关命令
Args:
params: 命令参数
user_id: 用户ID,用于... | 3 | 2 | 44 | 9 | 25 | 10 | 7 | 0.45 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 25 | 93 | 19 | 51 | 9 | 48 | 23 | 38 | 9 | 35 | 12 | 5 | 2 | 13 |
324,570 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_blacklist_plugin.py | plugins.hiklqqbot_blacklist_plugin.HiklqqbotBlacklistPlugin | import logging
from plugins.base_plugin import BasePlugin
from typing import Dict, Any, List
from datetime import datetime, timedelta
from auth_manager import auth_manager
from blacklist_manager import blacklist_manager, BlacklistType
class HiklqqbotBlacklistPlugin(BasePlugin):
"""黑名单管理插件"""
def __init__(self... |
class HiklqqbotBlacklistPlugin(BasePlugin):
'''黑名单管理插件'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''处理黑名单命令 - BasePlugin要求的抽象方法'''
pass
def _get_help_message(self) -> str:
'''获取帮助信息'''
... | 10 | 9 | 27 | 4 | 21 | 1 | 7 | 0.07 | 1 | 8 | 0 | 0 | 9 | 4 | 9 | 32 | 250 | 44 | 194 | 49 | 184 | 14 | 150 | 48 | 140 | 11 | 5 | 3 | 59 |
324,571 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_maintenance_plugin.py | plugins.hiklqqbot_maintenance_plugin.HiklqqbotMaintenancePlugin | from auth_manager import auth_manager
import logging
from plugins.base_plugin import BasePlugin
class HiklqqbotMaintenancePlugin(BasePlugin):
"""
维护模式管理插件,仅管理员可用
"""
def __init__(self):
super().__init__(command='hiklqqbot_maintenance', description='设置或查看维护模式状态 (仅管理员可用)', is_builtin=True)
... |
class HiklqqbotMaintenancePlugin(BasePlugin):
'''
维护模式管理插件,仅管理员可用
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
设置或查询维护模式
Args:
params: 命令参数 (on/off)
user_id... | 3 | 2 | 20 | 2 | 11 | 7 | 4 | 0.7 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 25 | 45 | 6 | 23 | 6 | 20 | 16 | 17 | 6 | 14 | 6 | 5 | 1 | 7 |
324,572 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_ping_plugin.py | plugins.hiklqqbot_ping_plugin.HiklqqbotPingPlugin | import time
import logging
from auth_manager import auth_manager
from plugins.base_plugin import BasePlugin
class HiklqqbotPingPlugin(BasePlugin):
"""
Ping命令插件,用于测试机器人是否在线以及响应速度
"""
def __init__(self):
super().__init__(command='hiklqqbot_ping', description='测试机器人是否在线 (仅管理员可用)', is_builtin=True... |
class HiklqqbotPingPlugin(BasePlugin):
'''
Ping命令插件,用于测试机器人是否在线以及响应速度
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
处理ping命令,返回pong和当前时间戳
Args:
params: 命令参数(不使用)
... | 3 | 2 | 12 | 2 | 5 | 6 | 2 | 1.4 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 25 | 30 | 6 | 10 | 5 | 7 | 14 | 10 | 5 | 7 | 2 | 5 | 1 | 3 |
324,573 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_reload_plugin.py | plugins.hiklqqbot_reload_plugin.HiklqqbotReloadPlugin | from plugins.plugin_manager import plugin_manager
from plugins.base_plugin import BasePlugin
import logging
from auth_manager import auth_manager
import sys
import importlib
class HiklqqbotReloadPlugin(BasePlugin):
"""
热重载插件,用于在运行时重新加载所有插件
"""
def __init__(self):
super().__init__(command='hikl... |
class HiklqqbotReloadPlugin(BasePlugin):
'''
热重载插件,用于在运行时重新加载所有插件
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
处理reload命令,重新加载plugins目录下的所有插件
Args:
params: 参数,可以为空或特定的插... | 4 | 3 | 39 | 6 | 21 | 12 | 6 | 0.61 | 1 | 4 | 0 | 0 | 3 | 1 | 3 | 26 | 124 | 21 | 64 | 22 | 60 | 39 | 63 | 21 | 59 | 11 | 5 | 4 | 19 |
324,574 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_stats_plugin.py | plugins.hiklqqbot_stats_plugin.HiklqqbotStatsPlugin | import logging
from plugins.base_plugin import BasePlugin
from datetime import datetime, timedelta
from stats_manager import stats_manager
from auth_manager import auth_manager
class HiklqqbotStatsPlugin(BasePlugin):
"""
统计数据管理插件:用于查看和管理机器人的统计数据
仅限管理员使用
"""
def __init__(self):
super().__in... |
class HiklqqbotStatsPlugin(BasePlugin):
'''
统计数据管理插件:用于查看和管理机器人的统计数据
仅限管理员使用
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
处理统计命令
格式: hiklqqbot_stats <子命令> [参数]
'''
... | 13 | 12 | 42 | 7 | 30 | 4 | 7 | 0.15 | 1 | 7 | 0 | 0 | 12 | 2 | 12 | 35 | 519 | 98 | 365 | 127 | 352 | 56 | 287 | 119 | 274 | 12 | 5 | 3 | 83 |
324,575 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/hiklqqbot_userid_plugin.py | plugins.hiklqqbot_userid_plugin.HiklqqbotUseridPlugin | from auth_manager import auth_manager
import json
import uuid
import logging
import time
from plugins.base_plugin import BasePlugin
import os
from typing import Dict, Any
class HiklqqbotUseridPlugin(BasePlugin):
"""
用户ID查询插件,生成唯一标识符并记录用户信息
"""
def __init__(self):
super().__init__(command='hikl... |
class HiklqqbotUseridPlugin(BasePlugin):
'''
用户ID查询插件,生成唯一标识符并记录用户信息
'''
def __init__(self):
pass
def _load_records(self) -> Dict[str, Any]:
'''加载用户记录'''
pass
def _save_records(self) -> bool:
'''保存用户记录'''
pass
def _generate_unique_id(self) -> str:... | 6 | 5 | 28 | 4 | 18 | 6 | 4 | 0.36 | 1 | 7 | 0 | 0 | 5 | 4 | 5 | 28 | 148 | 27 | 89 | 21 | 83 | 32 | 63 | 17 | 57 | 12 | 5 | 3 | 19 |
324,576 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/plugin_manager.py | plugins.plugin_manager.PluginManager | from auth_manager import auth_manager
from typing import Dict, List, Type, Optional
import inspect
import pkgutil
import os
import importlib
from .base_plugin import BasePlugin
class PluginManager:
"""
插件管理器,负责加载和管理所有插件
"""
def __init__(self):
self.plugins: Dict[str, BasePlugin] = {}
s... |
class PluginManager:
'''
插件管理器,负责加载和管理所有插件
'''
def __init__(self):
pass
def load_plugins(self, plugin_package_name: str='plugins') -> None:
'''
从指定包中加载所有插件
Args:
plugin_package_name: 插件包名称
'''
pass
def _clean_duplicate_commands(self... | 12 | 11 | 26 | 5 | 13 | 9 | 4 | 0.7 | 0 | 5 | 1 | 0 | 11 | 2 | 11 | 11 | 301 | 64 | 141 | 44 | 129 | 99 | 132 | 41 | 120 | 9 | 0 | 5 | 48 |
324,577 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/plugins/simple_response_plugin.py | plugins.simple_response_plugin.SimpleResponsePlugin | import logging
from plugins.base_plugin import BasePlugin
class SimpleResponsePlugin(BasePlugin):
"""
简单的响应插件,输入1返回2
"""
def __init__(self):
super().__init__(command='1', description='输入/1返回2', is_builtin=False)
self.logger = logging.getLogger('plugin.simple_response')
async def h... |
class SimpleResponsePlugin(BasePlugin):
'''
简单的响应插件,输入1返回2
'''
def __init__(self):
pass
async def handle(self, params: str, user_id: str=None, group_openid: str=None, **kwargs) -> str:
'''
处理1命令,返回2
Args:
params: 命令参数(不使用)
user_id: 用户ID(不使用)... | 3 | 2 | 9 | 1 | 3 | 5 | 1 | 1.86 | 1 | 2 | 0 | 0 | 2 | 1 | 2 | 25 | 24 | 4 | 7 | 4 | 4 | 13 | 7 | 4 | 4 | 1 | 5 | 0 | 2 |
324,578 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/stats_manager.py | stats_manager.StatsManager | import random
from config import STATS_MAX_MONTHS
import json
import time
from typing import Dict, List, Set, Optional, Tuple
import logging
import string
import os
from datetime import datetime
class StatsManager:
"""
统计管理器:记录和管理机器人的统计数据
包括群组、用户、消息等信息
"""
_instance = None
def __new__(cls, *ar... |
class StatsManager:
'''
统计管理器:记录和管理机器人的统计数据
包括群组、用户、消息等信息
'''
def __new__(cls, *args, **kwargs):
pass
def __init__(self, data_dir: str='data'):
pass
def _load_data(self):
'''从文件加载数据'''
pass
def cleanup_time_stats(self):
'''清理过期的时间统计数据,只保留最近STA... | 35 | 33 | 14 | 2 | 10 | 2 | 3 | 0.29 | 0 | 9 | 0 | 0 | 34 | 13 | 34 | 34 | 521 | 105 | 332 | 81 | 297 | 95 | 289 | 76 | 254 | 22 | 0 | 4 | 101 |
324,579 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/webhook_server.py | webhook_server.WebhookServer | from event_handler import event_handler
from config import BOT_APPSECRET, WEBHOOK_HOST, WEBHOOK_PORT, WEBHOOK_PATH
import json
from aiohttp import web
class WebhookServer:
def __init__(self):
self.app = web.Application()
self.app.router.add_post(WEBHOOK_PATH, self.handle_webhook)
self.runn... |
class WebhookServer:
def __init__(self):
pass
async def start(self):
'''启动webhook服务器'''
pass
async def stop(self):
'''停止webhook服务器'''
pass
async def handle_webhook(self, request):
'''处理来自QQ机器人平台的webhook请求'''
pass
async def _handle_validat... | 6 | 4 | 14 | 2 | 11 | 2 | 2 | 0.16 | 0 | 2 | 0 | 0 | 5 | 2 | 5 | 5 | 76 | 12 | 55 | 23 | 49 | 9 | 52 | 21 | 46 | 5 | 0 | 3 | 11 |
324,580 | kldhsh123/hiklqqbot | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/kldhsh123_hiklqqbot/websocket_client.py | websocket_client.WebSocketClient | import random
import asyncio
from event_handler import event_handler
import time
import json
import websockets
from auth import auth_manager
class WebSocketClient:
def __init__(self):
self.gateway_url = 'wss://api.sgroup.qq.com/websocket/'
self.heartbeat_interval = 45000
self.session_id = ... |
class WebSocketClient:
def __init__(self):
pass
async def connect(self):
'''连接到WebSocket网关'''
pass
async def identify(self):
'''发送鉴权消息'''
pass
async def heartbeat_loop(self):
'''心跳循环'''
pass
async def send_heartbeat(self):
'''发送心跳... | 12 | 10 | 34 | 3 | 25 | 6 | 6 | 0.23 | 0 | 3 | 0 | 0 | 11 | 10 | 11 | 11 | 380 | 48 | 279 | 50 | 267 | 64 | 233 | 41 | 221 | 9 | 0 | 5 | 61 |
324,581 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/_utilities.py | langchain_pinecone._utilities.DistanceStrategy | from enum import Enum
class DistanceStrategy(str, Enum):
"""Enumerator of the Distance strategies for calculating distances
between vectors."""
EUCLIDEAN_DISTANCE = 'EUCLIDEAN_DISTANCE'
MAX_INNER_PRODUCT = 'MAX_INNER_PRODUCT'
COSINE = 'COSINE' |
class DistanceStrategy(str, Enum):
'''Enumerator of the Distance strategies for calculating distances
between vectors.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 7 | 1 | 4 | 4 | 3 | 2 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
324,582 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/embeddings.py | langchain_pinecone.embeddings.PineconeEmbeddings | from typing_extensions import Self
from langchain_core.utils import secret_from_env
from langchain_core.embeddings import Embeddings
from pinecone import PineconeAsyncio as PineconeAsyncioClient
from pinecone import Pinecone as PineconeClient
from typing import Any, Dict, Iterable, List, Optional
from langchain_pinecon... |
class PineconeEmbeddings(BaseModel, Embeddings):
'''PineconeEmbeddings embedding model.
Example:
.. code-block:: python
from langchain_pinecone import PineconeEmbeddings
from langchain_pinecone import PineconeVectorStore
from langchain_core.documents import Document
... | 19 | 10 | 10 | 0 | 9 | 1 | 2 | 0.35 | 2 | 11 | 0 | 1 | 12 | 0 | 13 | 95 | 224 | 32 | 143 | 57 | 119 | 50 | 78 | 47 | 63 | 5 | 5 | 3 | 23 |
324,583 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/embeddings.py | langchain_pinecone.embeddings.PineconeSparseEmbeddings | from typing import Any, Dict, Iterable, List, Optional
from pydantic import AliasChoices, BaseModel, ConfigDict, Field, PrivateAttr, SecretStr, model_validator
from pinecone import SparseValues
class PineconeSparseEmbeddings(PineconeEmbeddings):
"""PineconeSparseEmbeddings embedding model.
Example:
..... |
class PineconeSparseEmbeddings(PineconeEmbeddings):
'''PineconeSparseEmbeddings embedding model.
Example:
.. code-block:: python
from langchain_pinecone import PineconeSparseEmbeddings
from langchain_pinecone import PineconeVectorStore
from langchain_core.documents i... | 8 | 6 | 14 | 0 | 12 | 1 | 2 | 0.91 | 1 | 3 | 0 | 0 | 4 | 3 | 5 | 100 | 145 | 23 | 64 | 27 | 56 | 58 | 33 | 23 | 27 | 4 | 6 | 3 | 12 |
324,584 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/rerank.py | langchain_pinecone.rerank.PineconeRerank | from langchain_core.utils import secret_from_env
from pinecone import Pinecone, PineconeAsyncio
from typing import Any, Dict, List, Optional, Sequence, Union
from langchain_core.documents import BaseDocumentCompressor, Document
from langchain_core.callbacks.base import Callbacks
from copy import deepcopy
from pydantic ... |
class PineconeRerank(BaseDocumentCompressor):
'''Document compressor that uses `Pinecone Rerank API`.'''
@model_validator(mode='after')
def validate_model_supported(self) -> Any:
'''Validate that the provided model is supported by Pinecone for reranking.'''
pass
def list_supported_mode... | 14 | 12 | 21 | 2 | 17 | 2 | 4 | 0.13 | 1 | 10 | 0 | 0 | 12 | 0 | 12 | 12 | 295 | 42 | 229 | 91 | 183 | 30 | 125 | 56 | 112 | 7 | 1 | 3 | 45 |
324,585 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/vectorstores.py | langchain_pinecone.vectorstores.Pinecone | from langchain_core._api.deprecation import deprecated
@deprecated(since='0.0.3', removal='1.0.0', alternative='PineconeVectorStore')
class Pinecone(PineconeVectorStore):
"""Deprecated. Use PineconeVectorStore instead."""
pass | @deprecated(since='0.0.3', removal='1.0.0', alternative='PineconeVectorStore')
class Pinecone(PineconeVectorStore):
'''Deprecated. Use PineconeVectorStore instead.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
324,586 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/vectorstores.py | langchain_pinecone.vectorstores.PineconeVectorStore | from langchain_core.embeddings import Embeddings
from langchain_pinecone._utilities import DistanceStrategy, maximal_marginal_relevance
from pinecone import PineconeAsyncio as PineconeAsyncioClient
from langchain_core.documents import Document
from pinecone import Pinecone as PineconeClient
from typing import TYPE_CHEC... |
class PineconeVectorStore(VectorStore):
'''Pinecone vector store integration.
Setup:
Install ``langchain-pinecone`` and set the environment variable ``PINECONE_API_KEY``.
.. code-block:: bash
pip install -qU langchain-pinecone
export PINECONE_API_KEY = "your-pinecone-api... | 35 | 22 | 32 | 2 | 23 | 7 | 3 | 0.46 | 1 | 13 | 1 | 2 | 21 | 4 | 26 | 26 | 1,005 | 131 | 599 | 303 | 385 | 277 | 231 | 107 | 204 | 10 | 1 | 3 | 74 |
324,587 | langchain-ai/langchain-pinecone | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/langchain-ai_langchain-pinecone/libs/pinecone/langchain_pinecone/vectorstores_sparse.py | langchain_pinecone.vectorstores_sparse.PineconeSparseVectorStore | import uuid
from langchain_core.documents import Document
import asyncio
from langchain_pinecone.vectorstores import PineconeVectorStore
from langchain_pinecone._utilities import DistanceStrategy, sparse_maximal_marginal_relevance
from typing import TYPE_CHECKING, Any, Iterable, List, Optional, Tuple, TypeVar
from lang... |
class PineconeSparseVectorStore(PineconeVectorStore):
'''Pinecone sparse vector store integration.
This class extends PineconeVectorStore to support sparse vector representations.
It requires a Pinecone sparse index and PineconeSparseEmbeddings.
Setup:
```python
# Install required packa... | 18 | 11 | 35 | 2 | 26 | 7 | 3 | 0.54 | 1 | 14 | 2 | 0 | 16 | 1 | 16 | 42 | 713 | 78 | 415 | 204 | 269 | 224 | 146 | 68 | 129 | 7 | 2 | 3 | 49 |
324,588 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/Generation.py | dashscope.aigc.Generation.AioGeneration | from dashscope.api_entities.dashscope_response import GenerationResponse, Message, Role
import json
from dashscope.common.utils import _get_task_group_and_task
from dashscope.client.base_api import BaseAioApi, BaseApi
from dashscope.common.error import InputRequired, ModelRequired
from typing import Any, Dict, Generato... |
class AioGeneration(BaseAioApi):
class Models:
'''@deprecated, use qwen_turbo instead'''
@classmethod
async def call(cls, model: str, prompt: Any=None, history: list=None, api_key: str=None, messages: List[Message]=None, plugins: Union[str, Dict[str, Any]]=None, workspace: str=None, **kwargs) -> U... | 4 | 2 | 118 | 2 | 40 | 76 | 6 | 1.57 | 1 | 9 | 5 | 0 | 0 | 0 | 1 | 3 | 136 | 5 | 51 | 27 | 37 | 80 | 28 | 16 | 25 | 6 | 1 | 2 | 6 |
324,589 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/Generation.py | dashscope.aigc.Generation.Generation | from typing import Any, Dict, Generator, List, Union
import json
import copy
from dashscope.common.error import InputRequired, ModelRequired
from dashscope.common.logging import logger
from dashscope.api_entities.dashscope_response import GenerationResponse, Message, Role
from dashscope.common.constants import CUSTOMIZ... |
class Generation(BaseApi):
class Models:
'''@deprecated, use qwen_turbo instead'''
@classmethod
def call(cls, model: str, prompt: Any=None, history: list=None, api_key: str=None, messages: List[Message]=None, plugins: Union[str, Dict[str, Any]]=None, workspace: str=None, **kwargs) -> Union[Generat... | 6 | 2 | 78 | 2 | 38 | 38 | 9 | 0.92 | 1 | 10 | 6 | 0 | 0 | 0 | 2 | 4 | 175 | 8 | 87 | 34 | 70 | 80 | 54 | 21 | 50 | 11 | 1 | 2 | 17 |
324,590 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/chat_completion.py | dashscope.aigc.chat_completion.AioGeneration | from dashscope.client.base_api import BaseAioApi, CreateMixin
from typing import Any, Dict, Generator, List, Union
from dashscope.common.error import InputRequired, ModelRequired
from dashscope.aigc.generation import Generation
from dashscope.api_entities.dashscope_response import GenerationResponse, Message
import jso... |
class AioGeneration(BaseAioApi):
class Models:
'''@deprecated, use qwen_turbo instead'''
@classmethod
async def call(cls, model: str, prompt: Any=None, history: list=None, api_key: str=None, messages: List[Message]=None, plugins: Union[str, Dict[str, Any]]=None, workspace: str=None, **kwargs) -> U... | 4 | 2 | 118 | 2 | 40 | 76 | 6 | 1.57 | 1 | 9 | 5 | 0 | 0 | 0 | 1 | 3 | 136 | 5 | 51 | 27 | 37 | 80 | 28 | 16 | 25 | 6 | 1 | 2 | 6 |
324,591 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/chat_completion.py | dashscope.aigc.chat_completion.Completions | from typing import Any, Dict, Generator, List, Union
from dashscope.api_entities.chat_completion_types import ChatCompletion, ChatCompletionChunk
from dashscope.common.error import InputRequired, ModelRequired
from dashscope.client.base_api import BaseAioApi, CreateMixin
import dashscope
from dashscope.api_entities.das... |
class Completions(CreateMixin):
'''Support openai compatible chat completion interface.
'''
@classmethod
def create(cls, *, model: str, messages: List[Message], stream: bool=False, temperature: float=None, top_p: float=None, top_k: int=None, stop: Union[List[str], List[List[int]]]=None, max_tokens: int... | 3 | 2 | 121 | 4 | 60 | 57 | 13 | 0.94 | 1 | 10 | 5 | 0 | 0 | 0 | 1 | 2 | 128 | 6 | 63 | 24 | 43 | 59 | 30 | 5 | 28 | 13 | 1 | 1 | 13 |
324,592 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.AttachmentRoleMessageParam | from dashscope.api_entities.dashscope_response import DashScopeAPIResponse, DictMixin, Role
class AttachmentRoleMessageParam(MessageParam):
meta: dict
def __init__(self, meta: dict, **kwargs):
super().__init__(role=Role.ATTACHMENT, meta=meta, **kwargs) |
class AttachmentRoleMessageParam(MessageParam):
def __init__(self, meta: dict, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 47 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
324,593 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.CodeGeneration | from dashscope.common.error import InputRequired, ModelRequired
from dashscope.common.utils import _get_task_group_and_task
from typing import Generator, List, Union
from dashscope.api_entities.dashscope_response import DashScopeAPIResponse, DictMixin, Role
from dashscope.common.constants import MESSAGE, SCENE
from das... |
class CodeGeneration(BaseApi):
class Models:
class Scenes:
@classmethod
def call(cls, model: str, scene: str=None, api_key: str=None, message: List[MessageParam]=None, workspace: str=None, **kwargs) -> Union[DashScopeAPIResponse, Generator[DashScopeAPIResponse, None, None]]:
'''Call generati... | 7 | 1 | 39 | 2 | 17 | 20 | 3 | 0.86 | 1 | 6 | 4 | 0 | 0 | 0 | 2 | 4 | 98 | 7 | 49 | 31 | 33 | 42 | 29 | 20 | 24 | 4 | 1 | 1 | 5 |
324,594 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.MessageParam | from dashscope.api_entities.dashscope_response import DashScopeAPIResponse, DictMixin, Role
class MessageParam(DictMixin):
role: str
def __init__(self, role: str, **kwargs):
super().__init__(role=role, **kwargs) |
class MessageParam(DictMixin):
def __init__(self, role: str, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 4 | 1 | 0 | 1 | 46 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 3 | 0 | 1 |
324,595 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.OtherRoleContentMessageParam | class OtherRoleContentMessageParam(MessageParam):
content: str
def __init__(self, role: str, content: str, **kwargs):
super().__init__(role=role, content=content, **kwargs) | class OtherRoleContentMessageParam(MessageParam):
def __init__(self, role: str, content: str, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 47 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
324,596 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.OtherRoleMetaMessageParam | class OtherRoleMetaMessageParam(MessageParam):
meta: dict
def __init__(self, role: str, meta: dict, **kwargs):
super().__init__(role=role, meta=meta, **kwargs) | class OtherRoleMetaMessageParam(MessageParam):
def __init__(self, role: str, meta: dict, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 47 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
324,597 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/code_generation.py | dashscope.aigc.code_generation.UserRoleMessageParam | from dashscope.api_entities.dashscope_response import DashScopeAPIResponse, DictMixin, Role
class UserRoleMessageParam(MessageParam):
content: str
def __init__(self, content: str, **kwargs):
super().__init__(role=Role.USER, content=content, **kwargs) |
class UserRoleMessageParam(MessageParam):
def __init__(self, content: str, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 3 | 1 | 0 | 1 | 0 | 1 | 47 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 4 | 0 | 1 |
324,598 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/conversation.py | dashscope.aigc.conversation.Conversation | from dashscope.common.constants import DEPRECATED_MESSAGE, HISTORY, PROMPT
import json
from dashscope.common.logging import logger
from dashscope.common.utils import _get_task_group_and_task
from copy import deepcopy
from typing import Any, Dict, Generator, List, Union
from dashscope.api_entities.dashscope_response imp... |
class Conversation(BaseApi):
'''Conversational robot interface.
'''
class Models:
'''@deprecated, use qwen_turbo instead'''
def __init__(self, history: History=None) -> None:
'''Init a chat.
Args:
history (dict): The conversation initialization settings.
... | 7 | 4 | 41 | 1 | 22 | 18 | 5 | 0.78 | 1 | 15 | 9 | 0 | 5 | 1 | 5 | 7 | 223 | 12 | 119 | 41 | 98 | 93 | 72 | 27 | 65 | 11 | 1 | 2 | 24 |
324,599 | dashscope/dashscope-sdk-python | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/dashscope_dashscope-sdk-python/dashscope/aigc/conversation.py | dashscope.aigc.conversation.History | from typing import Any, Dict, Generator, List, Union
from dashscope.common.constants import DEPRECATED_MESSAGE, HISTORY, PROMPT
from dashscope.common.logging import logger
class History(list):
"""Manage the conversation history.
"""
def __init__(self, items: List[HistoryItem]=None):
"""Init a his... |
class History(list):
'''Manage the conversation history.
'''
def __init__(self, items: List[HistoryItem]=None):
'''Init a history with list of HistoryItems.
Args:
items (List[HistoryItem], optional): The history items.
Defaults to None.
'''
pass | 2 | 2 | 12 | 1 | 6 | 5 | 2 | 1 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 34 | 16 | 2 | 7 | 2 | 5 | 7 | 6 | 2 | 4 | 2 | 2 | 1 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.