id
int64
0
458k
file_name
stringlengths
4
119
file_path
stringlengths
14
227
content
stringlengths
24
9.96M
size
int64
24
9.96M
language
stringclasses
1 value
extension
stringclasses
14 values
total_lines
int64
1
219k
avg_line_length
float64
2.52
4.63M
max_line_length
int64
5
9.91M
alphanum_fraction
float64
0
1
repo_name
stringlengths
7
101
repo_stars
int64
100
139k
repo_forks
int64
0
26.4k
repo_open_issues
int64
0
2.27k
repo_license
stringclasses
12 values
repo_extraction_date
stringclasses
433 values
2,287,400
scheduler_ros.py
cyiyang_miniros/deliver_scheduler/scripts/scheduler_ros.py
# -*- coding: utf-8 -*- import threading import rospy from playsound import playsound from scheduler import NeedToChangeStatus, RequestType, Scheduler, TargetStatus from deliver_scheduler.msg import EveryoneStatus from deliver_scheduler.srv import ( ChangeTimeResult, ChangeTimeResultResponse, DestinationM...
6,837
Python
.py
137
33.810219
88
0.641378
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,401
scheduler.py
cyiyang_miniros/deliver_scheduler/scripts/scheduler.py
# -*- coding: utf-8 -*- import threading import time from enum import Enum, unique from math import ceil, floor from reloadable_timer import ReloadableTimer from statemachine import State, StateMachine from statemachine.exceptions import TransitionNotAllowed LitterStrategy = Enum("LitterStrategy", ("DROP_MAX", "DROP_...
13,975
Python
.py
309
28.003236
88
0.570476
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,402
SchedulerExample.py
cyiyang_miniros/deliver_scheduler/scripts/examples/SchedulerExample.py
""" 流程: GetNextTarget -> DrugLoaded -> Delivered """ import sys sys.path.append("..") import os os.chdir(os.path.dirname(__file__)) import time from scheduler import Scheduler if __name__ == "__main__": scheduler = Scheduler() # 获取将A药品送到区域1的需求 scheduler.GetNewRequest("A", 1) target = scheduler.G...
1,139
Python
.py
37
22.540541
77
0.708245
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,403
CoolingTimeRefreshTest.py
cyiyang_miniros/deliver_scheduler/scripts/examples/CoolingTimeRefreshTest.py
# -*- coding: utf-8 -*- """回归测试,修改后的Scheduler应通过该测试 """ import sys sys.path.append("..") import os os.chdir(os.path.dirname(__file__)) import time from scheduler import Scheduler, NeedToChangeStatus if __name__ == "__main__": scheduler = Scheduler(DEBUG=True) scheduler.GetNewRequest("A", 1) nextTarget...
4,116
Python
.py
106
32.566038
87
0.691146
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,404
ReloadableTimerTests.py
cyiyang_miniros/deliver_scheduler/scripts/examples/ReloadableTimerTests.py
import sys sys.path.append("/home/ncut/drug-deliverer/deliver_scheduler/scripts") import time from scheduler import ReloadableTimer def timeCostlyFun(): print("timeCostlyFun running!") time.sleep(5) print("timeCostlyFun finished!") def MakePrint(): print("Triggered!") if __name__ == "__main__": ...
597
Python
.py
20
25.65
70
0.717047
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,405
regressionTests.py
cyiyang_miniros/deliver_scheduler/scripts/examples/regressionTests.py
# -*- coding: utf-8 -*- """回归测试,修改后的Scheduler应通过该测试 """ import sys sys.path.append("..") import os os.chdir(os.path.dirname(__file__)) import time from scheduler import Scheduler if __name__ == "__main__": scheduler = Scheduler(DEBUG=True) scheduler.start() scheduler.GetNewRequest("A", 1) nextTarg...
1,119
Python
.py
34
26.117647
85
0.688008
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,406
RestartWithIntervalTest.py
cyiyang_miniros/deliver_scheduler/scripts/examples/RestartWithIntervalTest.py
import sys sys.path.append("/home/ncut/drug-deliverer/deliver_scheduler/scripts") import time from scheduler import ReloadableTimer def SayHi(): print("Hi!") timer = ReloadableTimer(5, True, SayHi) timer.restartWithInterval(10) timer.start() time.sleep(15)
267
Python
.py
10
24.7
70
0.804781
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,407
multicarTest.py
cyiyang_miniros/deliver_scheduler/scripts/examples/multicarTest.py
# -*- coding: utf-8 -*- """多车回归测试,修改后的Scheduler应通过该测试 """ import sys sys.path.append("..") import os os.chdir(os.path.dirname(__file__)) import time from scheduler import Scheduler, NeedToChangeStatus scheduler = Scheduler() scheduler.GetNewRequest("A", 1) scheduler.GetNewRequest("B", 2) scheduler.GetNewRequest("...
511
Python
.py
18
25.055556
51
0.78714
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,408
StateMachineTest.py
cyiyang_miniros/deliver_scheduler/scripts/examples/StateMachineTest.py
# -*- coding: utf-8 -*- from statemachine import State, StateMachine from statemachine.exceptions import TransitionNotAllowed class CoolingTime(StateMachine): # 定义状态 speedUpState = State("speedUpState") slowDownState = State("slowDownState") normalState = State("normalState", initial=True) # 定义状...
616
Python
.py
15
36.466667
76
0.765217
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,409
reminder_basic.py
cyiyang_miniros/board_reminder/scripts/reminder_basic.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import threading import time import warnings DEBUGING = True class Reminder(object): """每隔Interval时间非阻塞调用DefaultRemind方法的定时器对象,第一个定时器的等待时间为firstInterval""" def __init__(self, defaultInterval=3 * 60): self.defaultInterval = defaultInterval # Pyt...
4,199
Python
.py
94
27.808511
85
0.623328
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,410
reminder_basic.py.bak
cyiyang_miniros/board_reminder/scripts/reminder_basic.py.bak
#!/usr/bin/env python # -*- coding: utf-8 -*- import threading import time import warnings DEBUGING = True class Reminder(object): """每隔Interval时间非阻塞调用DefaultRemind方法的定时器对象""" def __init__(self, defaultInterval=3 * 60, elapsedTimeRemindInterval=5): self.defaultInterval = defaultInterval # ...
5,783
Python
.py
123
29.731707
87
0.639732
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,411
reminder_client.py
cyiyang_miniros/board_reminder/scripts/reminder_client.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys sys.path.append("/home/fanch/demo2/src/board_reminder/scripts") import threading import time import rospy from reminder_basic import Reminder from board_reminder.srv import NeedToSeeMsg, NeedToSeeMsgResponse class BoardReminder(Reminder): def __init__(...
2,334
Python
.py
49
35.102041
87
0.699111
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,412
send_goals_scripts_send_goals_node_python.py.sisc
cyiyang_miniros/drug-deliverer.si4project/cache/parse/send_goals_scripts_send_goals_node_python.py.sisc
0T)%ÕµÕµÖµÖµ¥ÜÕ Õµ¥Ä© Õµ...
10,005
Python
.pyt
47
211.893617
1,028
0.177528
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,413
send_goals_node_python.py
cyiyang_miniros/send_goals/scripts/send_goals_node_python.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # 动作通信:该例程在任一仿真环境下,执行/action_client通信,消息类型move_base_msgs/MoveBaseAction MoveBaseGoal import roslib import rospy import actionlib from actionlib_msgs.msg import * from geometry_msgs.msg import Pose, Point, Quaternion from move_base_msgs.msg import MoveBaseAction, MoveBaseGo...
2,559
Python
.pyt
64
30.890625
84
0.637744
cyiyang/miniros
8
1
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,414
ui.py
hackcatml_kfd-explorer/ui.py
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'ui_test.ui' ## ## Created by: Qt User Interface Compiler version 6.5.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###################...
26,157
Python
.py
415
54.277108
180
0.711086
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,415
history.py
hackcatml_kfd-explorer/history.py
import platform from PySide6 import QtCore, QtGui, QtWidgets from PySide6.QtCore import Qt, QObject from PySide6.QtWidgets import QTableWidgetItem, QWidget class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(480, 170) font = QtGui.QFont() font.se...
3,096
Python
.py
65
39.230769
105
0.690776
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,416
code.py
hackcatml_kfd-explorer/code.py
import platform import frida from PySide6 import QtCore from PySide6.QtCore import QObject MESSAGE = "" ERRMESSAGE = "" def clean_message(): global MESSAGE MESSAGE = '' class Instrument(QObject): attachsig = QtCore.Signal(int) def __init__(self, script_text, target): super().__init__() ...
4,763
Python
.py
121
30.752066
120
0.639843
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,417
utilviewer.py
hackcatml_kfd-explorer/utilviewer.py
import re import frida from PySide6 import QtGui from PySide6.QtGui import QAction from PySide6.QtWidgets import QTextBrowser, QTextEdit, QLineEdit, QPushButton, QCheckBox import globvar class UtilViewerClass(QTextEdit): def __init__(self, args): super(UtilViewerClass, self).__init__(args) self...
5,802
Python
.py
125
35.64
136
0.550584
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,418
globvar.py
hackcatml_kfd-explorer/globvar.py
errorType1 = "script has been destroyed" fridaInstrument = None enumerateRanges = [] isFridaAttached = False offsets = [] arch = None isHexEditMode = False hexEdited = [] currentFrameBlockNumber = 0 currentFrameStartAddress = '' visitedAddress = []
253
Python
.py
11
21.636364
40
0.798319
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,419
hexviewer.py
hackcatml_kfd-explorer/hexviewer.py
import inspect import re from PySide6 import QtGui, QtCore from PySide6.QtCore import Qt from PySide6.QtGui import QTextCursor, QAction, QCursor from PySide6.QtWidgets import QTextEdit, QApplication, QWidget, QVBoxLayout import globvar class HexViewerClass(QTextEdit): wheelupsig = QtCore.Signal(str) wheelsi...
20,766
Python
.py
370
43.586486
446
0.589453
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,420
disasm.py
hackcatml_kfd-explorer/disasm.py
import re import platform from PySide6.QtCore import QObject, Qt, Slot from PySide6 import QtCore, QtGui, QtWidgets from PySide6.QtWidgets import QWidget from capstone import * class Ui_Form(object): def setupUi(self, Form): Form.setObjectName("Form") Form.resize(550, 300) self.gridLayout...
3,831
Python
.py
83
37.46988
105
0.635534
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,421
main.py
hackcatml_kfd-explorer/main.py
import collections import inspect import platform import re from PySide6 import QtGui from PySide6.QtCore import QThread, Slot, Qt, QEvent, QPoint from PySide6.QtGui import QPixmap, QTextCursor, QShortcut, QKeySequence, QIcon, QPalette from PySide6.QtWidgets import QLabel, QMainWindow, QMessageBox, QApplication impor...
29,774
Python
.py
589
38.237691
153
0.601719
hackcatml/kfd-explorer
8
2
0
LGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,422
metadata_removal_tool.py
sh1d0wg1m3r_Metadata-Removal-Tool/metadata_removal_tool.py
import os import tkinter as tk from tkinter import filedialog, messagebox from PIL import Image from PyPDF2 import PdfReader, PdfWriter from docx import Document from mutagen.mp3 import MP3 from mutagen.id3 import ID3, ID3NoHeaderError from mutagen.flac import FLAC from openpyxl import load_workbook import zi...
7,203
Python
.py
174
30.643678
134
0.59665
sh1d0wg1m3r/Metadata-Removal-Tool
8
0
1
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,423
__config__.py
AdhamSamehA_Outbound-Phone-GPT/__config__.py
import os from dotenv import load_dotenv # Load `.env` content file load_dotenv() # Set up the directory paths within your project AGENT_CONFIGS_FOLDER = f'{os.getcwd()}/example_agent_configs' AGENT_CACHE_FOLDER = f'{os.getcwd()}/example_cache_files' AGENT_AUDIO_FOLDER = f"{os.getcwd()}/example_audio_files" # Confi...
3,599
Python
.py
68
51.294118
304
0.730244
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,424
__utils__.py
AdhamSamehA_Outbound-Phone-GPT/__utils__.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
19,127
Python
.py
400
38.6025
192
0.623881
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,425
app.py
AdhamSamehA_Outbound-Phone-GPT/app.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
36,953
Python
.py
603
47.661692
295
0.561336
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,426
logger_config.py
AdhamSamehA_Outbound-Phone-GPT/logger_config.py
import logging import time class MyFormatter(logging.Formatter): def formatTime(self, record, datefmt=None): ct = self.converter(record.created) t = time.strftime("%H:%M:%S", ct) s = "%s,%03d" % (t, record.msecs) return s def setup_logger(name, level=logging.INFO): logger = log...
811
Python
.py
20
34
101
0.682398
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,427
FillerPredictionModel.py
AdhamSamehA_Outbound-Phone-GPT/FillerPredictionModel.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
3,050
Python
.py
61
42.213115
183
0.679892
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,428
Worker.py
AdhamSamehA_Outbound-Phone-GPT/Worker.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
18,868
Python
.py
314
46.907643
202
0.614828
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,429
stages.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/stages.py
# Example conversation stages for the Sales Agent and Recruitmet Coordinator # Feel free to modify, add/drop stages based on the use case. SALES_CONVERSATION_STAGES = { "1": "Introduction: Start the conversation by introducing yourself and your company. Be polite and respectful while keeping the tone of the conver...
2,265
Python
.py
21
104.428571
271
0.760375
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,430
prompts.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/prompts.py
# Default inception prompt : This is the main system prompt for `ConversationalModel` workers SALES_AGENT_DEFAULT_INCEPTION_PROMPT = "Never forget your name is {salesperson_name}. You work as a {salesperson_role}.\\nYou work at a company named {company_name}. {company_name}'s business is the following: {company_busines...
8,249
Python
.py
32
256.59375
6,127
0.785366
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,431
chains.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/chains.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
3,164
Python
.py
71
33.873239
112
0.632382
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,432
agents.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/agents.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
10,046
Python
.py
216
37.175926
120
0.64436
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,433
logger.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/logger.py
import logging import time from functools import wraps logger = logging.getLogger(__name__) stream_handler = logging.StreamHandler() log_filename = "output.log" file_handler = logging.FileHandler(filename=log_filename) handlers = [stream_handler, file_handler] class TimeFilter(logging.Filter): def filter(self, ...
1,119
Python
.py
29
34.172414
81
0.707136
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,434
playground.py
AdhamSamehA_Outbound-Phone-GPT/ConversationModel/playground.py
""" This file is part of Outbound Phone GPT. Outbound Phone GPT is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
2,523
Python
.py
57
36.491228
126
0.6702
AdhamSamehA/Outbound-Phone-GPT
8
4
2
GPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,435
天知强卡器.py
a1929238_tenchi-cards-enhancer/天知强卡器.py
# 天知强卡器,以pyqt6为GUI # setting字典的结构为:setting[type][name][count] # 统计数据字典的结构为:statistics[type][name][count] # 更新目标: 增加香料/四叶草点击后检查 # -*- coding: utf-8 -*- import time from PyQt6 import QtWidgets, QtCore, QtGui, uic import sys import win32gui import win32api import win32con import json from ctypes import windll, c_void_p, b...
131,438
Python
.py
2,529
29.840253
156
0.544863
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,436
ResourceInit.py
a1929238_tenchi-cards-enhancer/module/ResourceInit.py
# 资源初始化模块,有常用图片资源的初始化,并保存为全局变量,也有图片读取的方法 from .utils import imread import os class ResourceInit: def __init__(self): # 获取项目根目录路径 self.root_dir = os.path.dirname(os.path.dirname(__file__)) # 以完整路径导入图片 self.card_bind_img = imread(os.path.join(self.root_dir, "items/bind_icon/card_bind...
3,476
Python
.py
59
41.372881
114
0.634213
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,437
bg_img_match.py
a1929238_tenchi-cards-enhancer/module/bg_img_match.py
import time from typing import Union import cv2 import numpy as np from module.bg_img_screenshot import capture_image_png, png_cropping def match_template_with_optional_mask(img_source, img_template) -> np.ndarray: """ 使用可选掩模进行模板匹配。 如果模板图像包含Alpha通道且不是纯白,则使用该Alpha通道作为掩模进行匹配。 如果模板图像不包含Alpha通道或Alpha通道...
10,876
Python
.py
252
27.051587
122
0.591985
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,438
restore_window_if_minimized.py
a1929238_tenchi-cards-enhancer/module/restore_window_if_minimized.py
import win32con import win32gui def restore_window_if_minimized(handle) -> bool: """ :param handle: 句柄 :return: 如果是最小化, 并恢复至激活窗口的底层, 则返回True, 否则返回False. """ # 检查窗口是否最小化 if win32gui.IsIconic(handle): # 恢复窗口(但不会将其置于最前面) win32gui.ShowWindow(handle, win32con.SW_RESTORE) #...
687
Python
.py
16
26.9375
98
0.655955
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,439
utils.py
a1929238_tenchi-cards-enhancer/module/utils.py
# 常用方法 import numpy as np import cv2 import sys import os # 读取图片 def imread(filename, with_alpha=False): # 使用 np.fromfile 读取数据 data = np.fromfile(filename, dtype=np.uint8) # 使用 cv2.imdecode() 解码图像数据 if with_alpha: image = cv2.imdecode(data, cv2.IMREAD_UNCHANGED) els...
1,627
Python
.py
45
24.066667
76
0.623938
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,440
AutoCushion.py
a1929238_tenchi-cards-enhancer/module/AutoCushion.py
from PyQt6.QtCore import QThread, Qt from PyQt6.QtGui import QColor from PyQt6.QtWidgets import QTableWidgetItem, QMessageBox import re import numpy as np # 自动垫卡 class AutoCushion(): # 自动垫卡分为几步:1.强化成功率计算器,找到相等的成功几率 2.选择卡片配方 3.自行选择多种规律 4.进行自动制卡跟垫卡,出现任意一种规律后停止 def __init__(self, main_window): # 实例化主窗口 ...
22,635
Python
.py
484
29.028926
164
0.566201
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,441
bg_img_screenshot.py
a1929238_tenchi-cards-enhancer/module/bg_img_screenshot.py
from ctypes import windll, byref, c_ubyte from ctypes.wintypes import RECT, HWND import numpy as np from numpy import uint8, frombuffer from module.restore_window_if_minimized import restore_window_if_minimized # 如果没有依赖 # pip install opencv-contrib-python # 排除缩放干扰 但有的时候会出错 可以在这里多测试测试 windll.user32.SetProcessDPIAwar...
4,684
Python
.py
88
33.693182
102
0.645581
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,442
EnhanceSimulator.py
a1929238_tenchi-cards-enhancer/module/EnhanceSimulator.py
# 强化模拟器,自动垫卡的前置科技 import random import json import itertools import copy from PyQt6.QtWidgets import QMessageBox from GUI.qwidgetwebexpectation import QWidgetWebExpectation class EnhanceSimulator: """ 强化的概率区间如下: ((基于主卡最高概率副卡) + (基于主卡次高概率副卡)/3 + (基于主卡次高概率副卡)/3) * 四叶草加成 + (前方所有概率 * 总概率加成) """ def ...
26,614
Python
.py
577
26.175043
117
0.48142
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,443
CardPackEditor.py
a1929238_tenchi-cards-enhancer/module/CardPackEditor.py
import sys from PyQt6.QtWidgets import ( QApplication, QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QListWidget, QInputDialog, QMessageBox, QComboBox ) from PyQt6.QtCore import Qt, pyqtSignal class CardPackEditor(QWidget): save_signal = pyqtSignal(dict) def __init__(self, card_p...
6,724
Python
.py
138
34.463768
83
0.629915
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,444
bg_img_screenshot.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/bg_img_screenshot.cpython-311.pyc
§ }xGfÀãó¶—ddlmZmZmZddlmZmZddlZddlm Z m Z ddl m Z ej  ¦«ddededefd „Zdd „Zdefd „Zdefd „ZdS)é)ÚwindllÚbyrefÚc_ubyte)ÚRECTÚHWNDN)Úuint8Ú frombuffer)Úrestore_window_if_minim...
5,145
Python
.py
43
117
763
0.332223
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,445
bg_img_match.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/bg_img_match.cpython-311.pyc
§ }xGf§+ãóş—ddlZddlmZddlZddlZddlmZmZdej fd„Z dde d e dede ffd „Z dd e d edede ffd „Z dde d e de de de dedefd„Z dd e d ede de def d„ZdS)éN)ÚUnion)Úcap...
10,299
Python
.py
101
97.980198
791
0.391876
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,446
utils.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/utils.cpython-311.pyc
§ PÄ|f�ãóF—ddlZddlZddlZddlZdd„Zdefd„Zd„Zd„Z dS) éNFcóÈ—tj|tj¬¦«}|r tj|tj¦«}ntj|tj...
2,502
Python
.py
13
191.307692
1,693
0.332932
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,447
restore_window_if_minimized.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/restore_window_if_minimized.cpython-311.pyc
§ }xGfÃãó"—ddlZddlZdefd„ZdS)éNÚreturnc ó—tj|¦«ritj|tj¦«tj|tjddddtjtj...
1,023
Python
.py
11
90.818182
405
0.411649
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,448
ResourceInit.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/ResourceInit.cpython-311.pyc
§ ò wfÓ ãó4—ddlmZddlZGd„d¦«ZdS)é)ÚimreadéNcó&—eZdZd„Zd„Zd„Zd„ZdS)Ú ResourceInitcó&‡—tj tj t...
5,797
Python
.py
21
274.952381
1,308
0.297213
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,449
draggablelabel.py
a1929238_tenchi-cards-enhancer/GUI/draggablelabel.py
from PyQt6 import QtCore, QtWidgets, QtGui import win32gui import ctypes from ctypes.wintypes import POINT # 拖曳图片控件 class DraggableLabel(QtWidgets.QLabel): handleChanged = QtCore.pyqtSignal(int) def __init__(self, parent=None): super().__init__(parent) self.setMouseTracking(True) # 开启鼠标跟踪 ...
3,675
Python
.py
64
41.453125
130
0.662841
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,450
qwidgetwebexpectation.py
a1929238_tenchi-cards-enhancer/GUI/qwidgetwebexpectation.py
from PyQt6.QtWidgets import QWidget, QVBoxLayout from PyQt6.QtWebEngineWidgets import QWebEngineView # 使用ECharts为统计数据绘制图表,用内置的谷歌浏览器显示 class QWidgetWebExpectation(QWidget): """ 使用ECharts为统计数据绘制图表,用内置的谷歌浏览器显示, 显示为单独的窗口 """ def __init__(self, cost_total, net_profit, gold_cost, time_spend) -> None: ...
5,842
Python
.py
143
20.363636
112
0.380758
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,451
priceeditor.py
a1929238_tenchi-cards-enhancer/GUI/priceeditor.py
from PyQt6.QtWidgets import QDialog, QVBoxLayout, QTableWidget, QTableWidgetItem, QPushButton, QApplication, QDoubleSpinBox from PyQt6.QtCore import Qt class PriceEditor(QDialog): def __init__(self, item_dict, parent=None): super().__init__(parent) self.table = QTableWidget() self....
1,814
Python
.py
34
37.352941
123
0.633163
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,452
clickableslot.py
a1929238_tenchi-cards-enhancer/GUI/clickableslot.py
from PyQt6.QtWidgets import QLabel, QMainWindow from PyQt6.QtCore import Qt class ClickableSlot(QLabel): def __init__(self, parent=None): super().__init__(parent) # 设置鼠标悬停时的光标形状 self.setCursor(Qt.CursorShape.PointingHandCursor) # 设置提示 self.setToolTip("点击删除当前槽位内容") ...
958
Python
.py
23
27.391304
61
0.652174
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,453
webstatistics.py
a1929238_tenchi-cards-enhancer/GUI/webstatistics.py
from PyQt6.QtWidgets import QWidget, QTabWidget, QVBoxLayout from PyQt6.QtWebEngineWidgets import QWebEngineView import json # 使用ECharts为统计数据绘制图表,用内置的谷歌浏览器显示 class WebStatistics(): """ 使用ECharts为统计数据绘制图表,用内置的谷歌浏览器显示 """ def __init__(self, main_window) -> None: self.main_window = main_window ...
8,810
Python
.py
243
20.8107
119
0.464263
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,454
editwindow.py
a1929238_tenchi-cards-enhancer/GUI/editwindow.py
from PyQt6.QtWidgets import QWidget from PyQt6.QtCore import Qt, pyqtSignal from PyQt6 import uic import sys import os class EditWindow(QWidget): closed = pyqtSignal() # 编辑窗口,编辑选定强化星级的主卡,副卡1,副卡2,副卡3的全部属性 def __init__(self, enhance_level, parent=None): super().__init__() # 加载UI文件 ui_...
1,617
Python
.py
36
28.333333
85
0.623418
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,455
clickablelabel.py
a1929238_tenchi-cards-enhancer/GUI/clickablelabel.py
from PyQt6.QtWidgets import QLabel, QMainWindow from PyQt6.QtCore import Qt class ClickableLabel(QLabel): def __init__(self, parent=None): super().__init__(parent) self.edit_window = None # 用于存储当前打开的编辑窗口 # 设置鼠标悬停时的光标形状 self.setCursor(Qt.CursorShape.PointingHandCursor) # 设...
2,059
Python
.py
55
22.581818
61
0.544438
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,456
multiselectcombobox.py
a1929238_tenchi-cards-enhancer/GUI/multiselectcombobox.py
import sys from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QListWidget, QListWidgetItem, QPushButton, QHBoxLayout, QLabel, QComboBox, QSizePolicy from PyQt6.QtCore import Qt, pyqtSignal from PyQt6.QtGui import QIcon from module.utils import resource_path class MultiSelectComboBox(QWidget): recipeAd...
4,373
Python
.py
97
29.793814
150
0.647658
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,457
draggablelabel.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/draggablelabel.cpython-311.pyc
§ ¥ßÔe¢ãó\—ddlmZmZmZddlZddlZddlmZGd„dej¦«Z dS)é)ÚQtCoreÚ QtWidgetsÚQtGuiN)ÚPOINTcód‡—eZdZeje¦«Zd ˆfd„ Zd„Zd„Z d„Z d„Z d„Z d„Z ˆxZS) ÚDraggableLa...
6,795
Python
.py
25
270.72
956
0.316792
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,458
multiselectcombobox.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/multiselectcombobox.cpython-311.pyc
§ g9xf�ãó2—ddlZddlmZmZmZmZmZmZmZm Z m Z m Z ddl m Z mZddlmZddlmZGd„de¦«ZedkrReej¦«Ze¦«Ze ¦«eje ¦«...
6,918
Python
.py
33
205.333333
1,468
0.307145
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,459
editwindow.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/editwindow.cpython-311.pyc
§ ‹³ŞexãóZ—ddlmZddlmZmZddlmZddlZddlZGd„de¦«Z dS)é)ÚQWidget)ÚQtÚ pyqtSignal)ÚuicNcóD‡—eZdZe¦«Zdˆfd„ Zˆfd„Zd„ZˆxZS)Ú EditWindowNcóV•—t...
2,856
Python
.py
18
157.555556
626
0.33075
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,460
clickablelabel.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/clickablelabel.cpython-311.pyc
§ $Ï|fIãó>—ddlmZmZddlmZGd„de¦«ZdS)é)ÚQLabelÚ QMainWindow)ÚQtcóD‡—eZdZdˆfd„ Zˆfd„Zˆfd„Zˆfd„Zd„ZˆxZS)ÚClickableLabelNcóô•—t¦« ...
3,593
Python
.py
38
84.894737
524
0.31721
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,461
bg_img_screenshot.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/bg_img_screenshot.cpython-311.pyc
§ }xGfÀãó¶—ddlmZmZmZddlmZmZddlZddlm Z m Z ddl m Z ej  ¦«ddededefd „Zdd „Zdefd „Zdefd „ZdS)é)ÚwindllÚbyrefÚc_ubyte)ÚRECTÚHWNDN)Úuint8Ú frombuffer)Úrestore_window_if_minim...
5,145
Python
.pyt
43
117
763
0.332223
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,462
bg_img_match.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/bg_img_match.cpython-311.pyc
§ }xGf§+ãóş—ddlZddlmZddlZddlZddlmZmZdej fd„Z dde d e dede ffd „Z dd e d edede ffd „Z dde d e de de de dedefd„Z dd e d ede de def d„ZdS)éN)ÚUnion)Úcap...
10,299
Python
.pyt
101
97.980198
791
0.391876
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,463
utils.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/utils.cpython-311.pyc
§ PÄ|f�ãóF—ddlZddlZddlZddlZdd„Zdefd„Zd„Zd„Z dS) éNFcóÈ—tj|tj¬¦«}|r tj|tj¦«}ntj|tj...
2,502
Python
.pyt
13
191.307692
1,693
0.332932
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,464
restore_window_if_minimized.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/restore_window_if_minimized.cpython-311.pyc
§ }xGfÃãó"—ddlZddlZdefd„ZdS)éNÚreturnc ó—tj|¦«ritj|tj¦«tj|tjddddtjtj...
1,023
Python
.pyt
11
90.818182
405
0.411649
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,465
ResourceInit.cpython-311.pyc
a1929238_tenchi-cards-enhancer/module/__pycache__/ResourceInit.cpython-311.pyc
§ ò wfÓ ãó4—ddlmZddlZGd„d¦«ZdS)é)ÚimreadéNcó&—eZdZd„Zd„Zd„Zd„ZdS)Ú ResourceInitcó&‡—tj tj t...
5,797
Python
.pyt
21
274.952381
1,308
0.297213
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,466
draggablelabel.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/draggablelabel.cpython-311.pyc
§ ¥ßÔe¢ãó\—ddlmZmZmZddlZddlZddlmZGd„dej¦«Z dS)é)ÚQtCoreÚ QtWidgetsÚQtGuiN)ÚPOINTcód‡—eZdZeje¦«Zd ˆfd„ Zd„Zd„Z d„Z d„Z d„Z d„Z ˆxZS) ÚDraggableLa...
6,795
Python
.pyt
25
270.72
956
0.316792
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,467
multiselectcombobox.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/multiselectcombobox.cpython-311.pyc
§ g9xf�ãó2—ddlZddlmZmZmZmZmZmZmZm Z m Z m Z ddl m Z mZddlmZddlmZGd„de¦«ZedkrReej¦«Ze¦«Ze ¦«eje ¦«...
6,918
Python
.pyt
33
205.333333
1,468
0.307145
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,468
editwindow.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/editwindow.cpython-311.pyc
§ ‹³ŞexãóZ—ddlmZddlmZmZddlmZddlZddlZGd„de¦«Z dS)é)ÚQWidget)ÚQtÚ pyqtSignal)ÚuicNcóD‡—eZdZe¦«Zdˆfd„ Zˆfd„Zd„ZˆxZS)Ú EditWindowNcóV•—t...
2,856
Python
.pyt
18
157.555556
626
0.33075
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,469
clickablelabel.cpython-311.pyc
a1929238_tenchi-cards-enhancer/GUI/__pycache__/clickablelabel.cpython-311.pyc
§ $Ï|fIãó>—ddlmZmZddlmZGd„de¦«ZdS)é)ÚQLabelÚ QMainWindow)ÚQtcóD‡—eZdZdˆfd„ Zˆfd„Zˆfd„Zˆfd„Zd„ZˆxZS)ÚClickableLabelNcóô•—t¦« ...
3,593
Python
.pyt
38
84.894737
524
0.31721
a1929238/tenchi-cards-enhancer
8
2
0
AGPL-3.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,470
setup.py
Skirlax_MuAlphaZeroLibrary/setup.py
from setuptools import setup setup( name="mu_alpha_zero_library", version="1.0.9.6", description="Library for running and training MuZero and AlphaZero models.", author="Skyr", install_requires=open("requirements.txt").read().strip().split("\n"), long_description=open('README.md',encoding="utf-...
513
Python
.py
14
32.142857
80
0.676707
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,471
donkey_kong.py
Skirlax_MuAlphaZeroLibrary/examples/donkey_kong.py
import numpy as np import torch as th from gymnasium import make from mu_alpha_zero import MuZeroGame class DonkeyKongGame(MuZeroGame): def __init__(self): self.donkey_kong_env = make("ALE/DonkeyKong-v5", obs_type="rgb") self.is_done = False def get_next_state(self, action: int, player: int o...
1,262
Python
.py
31
33.483871
89
0.629296
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,472
donkey_kong.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/examples/__pycache__/donkey_kong.cpython-311.pyc
§ à6ÛeîãóJ—ddlZddlZddlmZddlmZGd„de¦«ZdS)éN)Úmake)Ú MuZeroGamec óæ—eZdZd„Zdedepddejpejee ffd„Z dejpejfd„Z defd„Z defd „Z depdde pdf...
3,166
Python
.py
14
225.071429
561
0.355217
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,473
start_jobs.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/start_jobs.py
import argparse import json import os import optuna from mu_alpha_zero.AlphaZero.utils import az_optuna_parameter_search os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = "hide" def main(): parser_ = argparse.ArgumentParser( description="Start optuna optimization jobs" ) # parser_.add_argument("n", he...
1,579
Python
.py
37
37.810811
111
0.655781
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,474
shared_storage_manager.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/shared_storage_manager.py
import copy import multiprocess # from pathos.helpers import mp as multiprocess from multiprocess.managers import BaseManager from mu_alpha_zero.mem_buffer import MemBuffer class SharedStorage: def __init__(self, mem_buffer: MemBuffer): self.mem_buffer = mem_buffer self.experimental_network_params...
2,949
Python
.py
71
33.746479
76
0.678822
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,475
config.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/config.py
# --- Linear input sizes for different board and atari sizes --- # 4608 for (5x5) board # 512 for (3x3) board # 32768 for (10x10) board # 18432 for (8x8) board # 8192 for (6x6) atari from dataclasses import dataclass, field from typing import Literal, Callable import torch.optim @dataclass class Config: num_net...
5,302
Python
.py
160
28.06875
104
0.648022
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,476
trainer.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/trainer.py
from multiprocess import set_start_method from multiprocess.context import Process set_start_method("spawn", force=True) from mu_alpha_zero.General.utils import not_zero from copy import deepcopy from typing import Type import torch as th from tqdm import tqdm from mu_alpha_zero.AlphaZero.Arena.arena import Arena ...
19,321
Python
.py
300
50.67
134
0.640386
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,477
prepare_for_upload.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/prepare_for_upload.py
import os if "root.root" in os.listdir(): exit(0) os.makedirs("AlphaZeroTicTacToe",exist_ok=True) os.chdir("AlphaZeroTicTacToe") os.makedirs("Logs/ProgramLogs") os.makedirs("Checkpoints/NetVersions/Temp") os.makedirs("Checkpoints/Traces")
253
Python
.py
8
28.875
47
0.791489
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,478
__init__.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/__init__.py
from mu_alpha_zero.MuZero.muzero import MuZero from mu_alpha_zero.AlphaZero.alpha_zero import AlphaZero from mu_alpha_zero.General.memory import GeneralMemoryBuffer from mu_alpha_zero.General.network import GeneralNetwork from mu_alpha_zero.General.arena import GeneralArena from mu_alpha_zero.General.az_game import Alp...
884
Python
.py
15
57.866667
76
0.855991
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,479
save_best_params.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/save_best_params.py
import optuna import json def main(): study = optuna.load_study(study_name="alpha_zero", storage="mysql://root:584792@localhost/alpha_zero") with open("best_params_2.json", "w") as file: json.dump(study.best_params, file) print(f"Best params saved to best_params.json. The params achieved a score ...
384
Python
.py
9
38.555556
106
0.684636
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,480
mem_buffer.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/mem_buffer.py
import itertools import random import uuid from collections import deque from itertools import chain import numpy as np import numpy.random import torch as th from diskcache import Deque from torch.utils.data import Dataset, DataLoader from mu_alpha_zero.General.memory import GeneralMemoryBuffer from mu_alpha_zero.Ge...
12,496
Python
.py
252
38.583333
124
0.605673
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,481
mem_buffer.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/__pycache__/mem_buffer.cpython-311.pyc
§ aG¡f«@ãó�—ddlZddlZddlZddlmZddlmZddlZddlZddl Z ddl Z ddl m Z ddlmZmZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lm Z Gd„de¦«Z!Gd„de¦«Z"Gd„d¦«...
34,763
Python
.py
105
330.047619
1,519
0.323523
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,482
__init__.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/__pycache__/__init__.cpython-311.pyc
§ µ%îetãó—ddlmZddlmZddlmZddlmZddlm Z ddl m Z ddl m Z ddlmZdd lmZmZdd lmZmZdd lmZdd lmZdd lmZddlmZddlmZdS)é)ÚMuZero)Ú AlphaZero)ÚGeneralMemoryBuffer)ÚGeneralNetwork)Ú GeneralAr...
1,494
Python
.py
8
185.625
682
0.65232
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,483
config.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/__pycache__/config.cpython-311.pyc
§ G¤f*ãó˜—ddlmZmZeGd„d¦«¦«ZeGd„de¦«¦«ZeGd„de¦«¦«ZdS) é)Ú dataclassÚfieldcóˆ—eZdZUdZeed<dZeed<dZeed<dZ eed<d Z d...
8,034
Python
.py
43
185.813953
1,158
0.413163
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,484
solver.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/PerfectConnect4Negamax/solver.py
from collections import OrderedDict class LRUCache(OrderedDict): # limit size, removing the least recently used key when full # source: https://docs.python.org/3/library/collections def __init__(self, maxsize=128, *args, **kwds): self.maxsize = maxsize super().__init__(*args, **kwds) ...
2,371
Python
.py
57
31.578947
79
0.54
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,485
board.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/PerfectConnect4Negamax/board.py
class Board: ''' class to store and manipulate connect 4 game states ''' def __init__(self, width=7, height=6): self.w = width self.h = height self.board_state = [0, 0] self.col_heights = [(height + 1) * i for i in range(width)] self.moves = 0 self.history = [] ...
3,873
Python
.py
93
31.860215
79
0.534946
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,486
az_game.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/az_game.py
from abc import ABC, abstractmethod from mu_alpha_zero.General.utils import adjust_probabilities import numpy as np class AlphaZeroGame(ABC): """ Make your custom game extend this class and implement all the methods. """ def game_result(self, player, board) -> float | None: """ Return...
3,765
Python
.py
108
27.037037
97
0.61456
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,487
search_tree.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/search_tree.py
from abc import ABC, abstractmethod import numpy as np import torch as th from mu_alpha_zero.General.memory import GeneralMemoryBuffer from mu_alpha_zero.General.network import GeneralNetwork class SearchTree(ABC): @abstractmethod def play_one_game(self, network, device: th.device,dir_path: str or None = N...
1,241
Python
.py
38
25.526316
118
0.633697
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,488
arena.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/arena.py
import time from abc import abstractmethod, ABC from typing import Type import wandb from mu_alpha_zero.AlphaZero.Arena.players import Player, NetPlayer, RandomPlayer from mu_alpha_zero.AlphaZero.checkpointer import CheckPointer from mu_alpha_zero.shared_storage_manager import SharedStorage class GeneralArena(ABC):...
2,713
Python
.py
44
49.5
121
0.619602
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,489
network.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/network.py
from abc import ABC, abstractmethod from mu_alpha_zero.General.az_game import AlphaZeroGame from mu_alpha_zero.General.mz_game import MuZeroGame from mu_alpha_zero.Hooks.hook_manager import HookManager from mu_alpha_zero.config import Config import torch as th class GeneralNetwork(ABC): @abstractmethod def...
3,547
Python
.py
84
34.797619
115
0.6745
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,490
memory.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/memory.py
from abc import ABC, abstractmethod class GeneralMemoryBuffer(ABC): @abstractmethod def add(self, experience): """ Add a single experience to the buffer. """ pass @abstractmethod def add_list(self, experience_list): """ Add a list of experiences to the ...
674
Python
.py
29
15.965517
48
0.56964
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,491
mz_game.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/mz_game.py
from abc import ABC, abstractmethod import numpy as np import torch as th from mu_alpha_zero.General.utils import adjust_probabilities class MuZeroGame(ABC): """ Keep state representations as Gzip if, muzero_config.use_true_game_state is True """ @abstractmethod def get_next_state(self, action: ...
3,402
Python
.py
91
29.747253
137
0.637936
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,492
utils.py
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/utils.py
import os import subprocess import sys def find_project_root() -> str: dir_ = os.path.dirname(os.path.abspath(__file__)) os.chdir(dir_) while "root.root" not in os.listdir(dir_): if os.getcwd() == "/" or os.getcwd() == "C:\\": raise FileNotFoundError("Could not find project root.") ...
2,875
Python
.py
66
37.424242
125
0.657215
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,493
memory.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/memory.cpython-311.pyc
§ føf¢ãó2—ddlmZmZGd„de¦«ZdS)é)ÚABCÚabstractmethodcó|—eZdZed„¦«Zed„¦«Zed„¦«Zed„¦«Zed„¦«ZdS)ÚGeneralMemoryBuffercó...
1,621
Python
.py
14
110.142857
399
0.402363
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,494
az_game.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/az_game.cpython-311.pyc
§ ’Ô†f"ãóF—ddlmZmZddlmZddlZGd„de¦«ZdS)é)ÚABCÚabstractmethod)Úadjust_probabilitiesNc ó2—eZdZdZdedzfd„Zededefd„¦«Ze d„¦«Z e d e d e j defd „¦«...
5,992
Python
.py
58
97.465517
706
0.436731
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,495
utils.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/utils.cpython-311.pyc
§ ’Ô†f; ãó˜—ddlZddlZddlZdefd„Zd„Zdefd„Zdefd„ZGd„d¦«Zd „Z d „Z de efd „Z dd e de fd„ZdS)éNÚreturncóò—tj tj ...
7,465
Python
.py
36
205.527778
966
0.344192
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,496
search_tree.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/search_tree.cpython-311.pyc
§ føfÙãóZ—ddlmZmZddlZddlZddlmZddl m Z Gd„de¦«Z dS)é)ÚABCÚabstractmethodN)ÚGeneralMemoryBuffer)ÚGeneralNetworkcó—eZdZeddejdepddeee e e ffd„¦«Z e dd...
2,471
Python
.py
22
107.636364
660
0.433061
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,497
network.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/network.cpython-311.pyc
§ "¨žf¢ ãó–—ddlmZmZddlmZddlmZddlmZddl Z Gd„de¦«Z Gd„d e ¦«Z Gd „d e ¦«Z dS) é)ÚABCÚabstractmethod)Ú MuZeroGame)Ú HookManager)ÚConfigNcó¶—eZdZed„¦«Z...
5,721
Python
.py
51
105.196078
695
0.492506
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,498
mz_game.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/mz_game.cpython-311.pyc
§ ¯a�fc ãóN—ddlmZmZddlZddlZddlmZGd„de¦«Z dS)é)ÚABCÚabstractmethodN)Úadjust_probabilitiesc óú—eZdZededepddejpejee ffd„¦«Z edejpejfd„¦...
5,517
Python
.py
44
118.363636
799
0.47004
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)
2,287,499
arena.cpython-311.pyc
Skirlax_MuAlphaZeroLibrary/mu_alpha_zero/General/__pycache__/arena.cpython-311.pyc
§ Ái¡f ãóz—ddlZddlmZmZddlmZddlZddlmZm Z m Z ddl m Z ddl mZGd„de¦«ZdS) éN)ÚabstractmethodÚABC)ÚType)ÚPlayerÚ NetPlayerÚ RandomPlayer)Ú CheckPointer)Ú SharedStoragecóŒ—eZdZe ddee...
4,033
Python
.py
31
128.967742
855
0.394954
Skirlax/MuAlphaZeroLibrary
8
0
0
GPL-2.0
9/5/2024, 10:48:18 PM (Europe/Amsterdam)