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,288,500
fnparser.py
zimolab_PyGUIAdapter/pyguiadapter/parser/fnparser.py
import dataclasses import inspect import warnings from collections import OrderedDict from typing import Callable, Literal, List, Tuple, Set, Dict, Any, Type, Union, Optional import tomli from .docstring import FnDocstring from .typenames import get_typename, get_type_args from .. import utils from ..fn import FnInfo...
11,439
Python
.py
263
32.292776
100
0.594876
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,501
docstring.py
zimolab_PyGUIAdapter/pyguiadapter/parser/docstring.py
from typing import Optional import docstring_parser class FnDocstring(object): def __init__(self, fn_docstring: str): self._fn_docstring: str = fn_docstring try: self._docstring = docstring_parser.parse(fn_docstring) except docstring_parser.ParseError: self._docs...
1,897
Python
.py
45
33.155556
80
0.654891
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,502
io.py
zimolab_PyGUIAdapter/pyguiadapter/utils/io.py
""" @Time : 2024.10.20 @File : io.py @Author : zimolab @Project : PyGUIAdapter @Desc : 读写文件相关的工具函数 """ def read_text_file(text_file: str, encoding: str = "utf-8") -> str: """ 读取文本文件内容。 Args: text_file: 文件路径 encoding: 文件编码,默认utf-8 Returns: 返回文件内容。 """ with op...
1,398
Python
.py
51
16.862745
83
0.563653
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,503
dialog.py
zimolab_PyGUIAdapter/pyguiadapter/utils/dialog.py
""" @Time : 2024.10.20 @File : dialog.py @Author : zimolab @Project : PyGUIAdapter @Desc : 定义了自定义对话框基类。 """ from abc import abstractmethod from typing import Optional, Any from qtpy.QtWidgets import QDialog, QWidget class BaseCustomDialog(QDialog): """ 自定义对话框基类,可用于实现自定义消息对话框、自定义输入对话框等。 """ ...
1,416
Python
.py
44
20.431818
77
0.593176
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,504
messagebox.py
zimolab_PyGUIAdapter/pyguiadapter/utils/messagebox.py
""" @Time : 2024/10/20 @Author : zimolab @File : messagebox.py @Project : PyGUIAdapter @Desc : 消息对话框相关的工具函数 """ import dataclasses from typing import Any, Literal, Tuple, Type, Optional, Union from qtpy.QtCore import Qt from qtpy.QtGui import QIcon, QPixmap from qtpy.QtWidgets import ( QWidget, QDia...
11,632
Python
.py
356
22.823034
87
0.630853
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,505
inputdialog.py
zimolab_PyGUIAdapter/pyguiadapter/utils/inputdialog.py
""" @Time : 2024.10.20 @File : inputdialog.py @Author : zimolab @Project : PyGUIAdapter @Desc : 输入对话框相关的工具函数 """ import ast import json from abc import abstractmethod from typing import Optional, Any, Tuple from typing import ( Union, List, Literal, Sequence, cast, Type, ) from pyqco...
21,190
Python
.py
638
21.437304
88
0.589346
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,506
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/utils/__init__.py
from ._core import * from ._ui import * from .io import * from .dialog import BaseCustomDialog from .messagebox import * from .filedialog import * from .inputdialog import *
174
Python
.py
7
23.857143
36
0.784431
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,507
filedialog.py
zimolab_PyGUIAdapter/pyguiadapter/utils/filedialog.py
""" @Time : 2024.10.20 @File : filedialog.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供文件选择对话框的相关工具函数 """ from typing import List, Optional from qtpy import compat from qtpy.QtCore import QUrl from qtpy.QtWidgets import QWidget, QFileDialog def get_existing_directory( parent: Optional[QWidge...
3,565
Python
.py
114
19.649123
77
0.6175
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,508
_core.py
zimolab_PyGUIAdapter/pyguiadapter/utils/_core.py
""" @Time : 2024.10.20 @File : _core.py @Author : zimolab @Project : PyGUIAdapter @Desc : 一些重要的工具函数和类型定义 """ import ast import base64 import hashlib import inspect import re import traceback import warnings from io import StringIO from typing import List, Set, Tuple, Any, Union, Optional, Type PyLiteralType...
4,948
Python
.py
144
28.229167
87
0.626872
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,509
_ui.py
zimolab_PyGUIAdapter/pyguiadapter/utils/_ui.py
""" @Time : 2024.10.20 @File : _ui.py @Author : zimolab @Project : PyGUIAdapter @Desc : 一些UI相关的工具函数 """ import os.path import warnings from typing import Literal, Tuple, Union, Optional import qtawesome as qta from qtpy.QtCore import QSize from qtpy.QtGui import QColor from qtpy.QtGui import QIcon, QPixmap,...
5,441
Python
.py
155
28.245161
80
0.621802
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,510
uclipboard.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/uclipboard.py
""" @Time : 2024.10.20 @File : uclipboard.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供了访问系统剪贴板的相关接口 """ from concurrent.futures import Future from typing import Optional from ..window import ( CLIPBOARD_GET_TEXT, CLIPBOARD_SET_TEXT, CLIPBOARD_GET_SELECTION_TEXT, CLIPBOARD_SET_SEL...
1,953
Python
.py
59
26.355932
85
0.71106
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,511
udialog.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/udialog.py
""" @Time : 2024.10.20 @File : udialog.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供对话框相关的功能 """ from concurrent.futures import Future from typing import Any, Literal, Tuple, Type, Optional, Union from qtpy.QtGui import QPixmap from .ucontext import _context from ..utils import IconType, Informat...
6,322
Python
.py
226
18.969027
86
0.622255
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,512
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/__init__.py
from .adapter import GUIAdapter from . import uoutput from .udialog import BaseCustomDialog # noinspection SpellCheckingInspection __all__ = [ "GUIAdapter", "BaseCustomDialog", "uoutput", ]
203
Python
.py
9
20.111111
38
0.766839
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,513
ucontext.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/ucontext.py
""" @Time : 2024.10.20 @File : ucontext.py @Author : zimolab @Project : PyGUIAdapter @Desc : 维护全局上下文信息,提供一些核心功能 """ import warnings from concurrent.futures import Future from typing import Any, Type, Optional, Callable, Dict from qtpy.QtCore import QObject, Signal, QMutex from ..utils import BaseCustomDial...
8,152
Python
.py
189
34.835979
96
0.654683
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,514
uoutput.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/uoutput.py
""" @Time : 2024.10.20 @File : uoutput.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供信息打印相关的功能 """ import dataclasses import os.path from typing import Optional, Union, Dict, Any from ..constants.color import ( COLOR_INFO, COLOR_DEBUG, COLOR_WARNING, COLOR_FATAL, COLOR_CRITICAL,...
7,993
Python
.py
233
22.317597
95
0.591884
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,515
utoast.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/utoast.py
""" @Time : 2024.10.20 @File : utoast.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供toast消息弹窗相关的功能 """ from typing import Optional from .ucontext import _context from ..toast import ToastConfig # noinspection PyProtectedMember from ..windows.fnexec._base import BaseFnExecuteWindow def _on_show_t...
1,489
Python
.py
52
22.096154
75
0.683728
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,516
adapter.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/adapter.py
""" @Time : 2024.10.20 @File : adapter.py @Author : zimolab @Project : PyGUIAdapter @Desc : 定义了GUI适配器类GUIAdapter,负责管理函数和启动GUI应用。 """ import sys import warnings from collections import OrderedDict from typing import ( Literal, Dict, Type, Tuple, List, Union, Optional, Callable,...
14,435
Python
.py
343
29.419825
116
0.618026
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,517
uprogress.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/uprogress.py
""" @Time : 2024.10.20 @File : uprogress.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供进度条相关的功能 """ from typing import Literal, Optional from .ucontext import _context def show_progressbar( min_value: int = 0, max_value: int = 100, inverted_appearance: bool = False, *, message...
2,577
Python
.py
70
23.885714
96
0.633733
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,518
ubeep.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/ubeep.py
""" @Time : 2024.10.20 @File : ubeep.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供了发出蜂鸣声的功能 """ from qtpy.QtWidgets import QApplication def beep() -> None: """ 发出蜂鸣声。 Returns: 无返回值 """ QApplication.beep()
299
Python
.py
15
14
39
0.621849
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,519
uinput.py
zimolab_PyGUIAdapter/pyguiadapter/adapter/uinput.py
""" @Time : 2024.10.20 @File : uinput.py @Author : zimolab @Project : PyGUIAdapter @Desc : 提供输入框相关的功能 """ from concurrent.futures import Future from typing import ( List, Tuple, Literal, Callable, Any, Optional, Union, Sequence, Type, ) from qtpy.QtCore import QUrl from q...
12,540
Python
.py
372
21.846774
88
0.612245
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,520
constants.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/constants.py
DEFAULT_WINDOW_TITLE = "Code Editor" DEFAULT_UNTITLED_FILENAME = "Untitled" DEFAULT_TAB_SIZE = 4 DEFAULT_ICON_SIZE = (24, 24) DEFAULT_LINE_WRAP_WIDTH = 88 QUIT_DIALOG_TITLE = "Quit" CONFIRM_DIALOG_TITLE = "Confirm" ERROR_DIALOG_TITLE = "Error" UNSAVED_WARNING_MSG = "Unsaved changes will be lost. Continue?" OPEN_FILE_D...
839
Python
.py
28
28.857143
63
0.733911
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,521
_example.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/_example.py
from pyqcodeeditor.highlighters import QPythonHighlighter from qtpy.QtWidgets import QApplication from pyguiadapter.codeeditor import ( CodeEditorWindow, CodeEditorConfig, PythonFormatter, ) app = QApplication([]) config = CodeEditorConfig( highlighter=QPythonHighlighter, formatter=PythonFormatter...
687
Python
.py
24
25.208333
57
0.694402
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,522
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/__init__.py
from .base import ( LineWrapMode, WordWrapMode, BaseCodeEditorWindow, BaseCodeFormatter, create_highlighter, ) from .editor import CodeEditorWindow, CodeEditorConfig from .formatters import JsonFormatter, PythonFormatter __all__ = [ "LineWrapMode", "WordWrapMode", "BaseCodeEditorWindow"...
467
Python
.py
20
19.5
54
0.737668
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,523
editor.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/editor.py
import dataclasses from typing import Optional, List, Union from pyqcodeeditor.QStyleSyntaxHighlighter import QStyleSyntaxHighlighter from qtpy.QtWidgets import QWidget from .actions import DEFAULT_MENUS, DEFAULT_TOOLBAR from .base import BaseCodeEditorWindow, CodeEditorConfig from .. import utils from ..action impor...
2,769
Python
.py
63
34.904762
82
0.665923
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,524
base.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/base.py
import dataclasses import inspect import os from abc import abstractmethod from typing import Type, Callable, Tuple, Optional, Union, List from pyqcodeeditor.QCodeEditor import QCodeEditor from pyqcodeeditor.QStyleSyntaxHighlighter import QStyleSyntaxHighlighter from qtpy.QtGui import QTextOption from qtpy.QtWidgets i...
15,193
Python
.py
381
30.973753
86
0.639403
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,525
actions.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/actions.py
from typing import List from .base import BaseCodeEditorWindow from .constants import ( DEFAULT_ICON_SIZE, ACTION_OPEN, ACTION_SAVE, ACTION_SAVE_AS, ACTION_QUIT, ACTION_UNDO, ACTION_REDO, ACTION_CUT, ACTION_COPY, ACTION_PASTE, ACTION_FORMAT_CODE, ACTION_SELECT_ALL, M...
3,854
Python
.py
154
20.266234
66
0.662114
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,526
_json.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/formatters/_json.py
import json import warnings from typing import Optional from ..base import BaseCodeFormatter class JsonFormatter(BaseCodeFormatter): def __init__(self, indent: int = 4): self._indent = indent @property def indent(self) -> int: return self._indent @indent.setter def indent(self,...
761
Python
.py
22
27.272727
88
0.636612
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,527
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/formatters/__init__.py
from ._json import JsonFormatter from ._python import PythonFormatter __all__ = [ "JsonFormatter", "PythonFormatter", ]
129
Python
.py
6
19
36
0.729508
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,528
_python.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/formatters/_python.py
import warnings from typing import Optional from yapf.yapflib.yapf_api import FormatCode from ..base import BaseCodeFormatter class PythonFormatter(BaseCodeFormatter): def format_code(self, text: str) -> Optional[str]: try: formatted, changed = FormatCode(text) except Exception as e:...
497
Python
.py
15
24.933333
56
0.648536
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,529
font.py
zimolab_PyGUIAdapter/pyguiadapter/constants/font.py
FONT_FAMILY = "Consolas, monospace, Monaco, Source Code Pro, Inter, Arial, sans-serif;" FONT_EXTRA_SMALL = 12 FONT_SMALL = 13 FONT_BASE = 14 FONT_MEDIUM = 16 FONT_LARGE = 18 FONT_EXTRA_LARGE = 20 FONT_HUGE = 26 FONT_EXTRA_HUGE = 30
232
Python
.py
9
24.777778
87
0.744395
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,530
color.py
zimolab_PyGUIAdapter/pyguiadapter/constants/color.py
COLOR_SUCCESS = "#67C23A" COLOR_WARNING = "#FFFF00" COLOR_FATAL = "#FF0000" COLOR_INFO = "#00FF00" COLOR_CRITICAL = "#A61C00" COLOR_DEBUG = "#909399" COLOR_BASE_TEXT = "#000000" COLOR_PRIMARY_TEXT = "#303133" COLOR_REGULAR_TEXT = "#606266" COLOR_SECONDARY_TEXT = "#A8ABB2" COLOR_DISABLED_TEXT = "#C0C4CC" COLOR_BASE_BA...
542
Python
.py
17
30.705882
45
0.743295
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,531
clipboard.py
zimolab_PyGUIAdapter/pyguiadapter/constants/clipboard.py
CLIPBOARD_SET_TEXT = 0 CLIPBOARD_GET_TEXT = 1 CLIPBOARD_SUPPORTS_SELECTION = 2 CLIPBOARD_GET_SELECTION_TEXT = 3 CLIPBOARD_SET_SELECTION_TEXT = 4 CLIPBOARD_OWNS_SELECTION = 5 CLIPBOARD_OWNS_CLIPBOARD = 6
203
Python
.py
7
28
32
0.811224
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,532
document_browser.py
zimolab_PyGUIAdapter/pyguiadapter/windows/document_browser.py
""" @Time : 2024.10.20 @File : document_browser.py @Author : zimolab @Project : PyGUIAdapter @Desc : 文档浏览器类的实现 """ import dataclasses import re from typing import Optional from urllib.parse import unquote from qtpy.QtCore import QUrl, Signal from qtpy.QtWidgets import QWidget from ..constants.color import ...
3,252
Python
.py
78
30.910256
85
0.656392
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,533
_window.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnselect/_window.py
import dataclasses from typing import Tuple, Dict, Literal, List, Union, Optional from qtpy.QtCore import QSize, Qt from qtpy.QtGui import QIcon from qtpy.QtWidgets import ( QSplitter, QToolBox, QVBoxLayout, QPushButton, QWidget, ) from ._group import FnGroupPage from ..document_browser import Doc...
11,272
Python
.py
264
32.901515
86
0.650066
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,534
_group.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnselect/_group.py
from typing import Tuple, List, Union, Optional import qtawesome as qta from qtpy.QtCore import QSize, Qt, Signal, QModelIndex from qtpy.QtWidgets import ( QVBoxLayout, QListWidget, QListWidgetItem, QWidget, ) from ...bundle import FnBundle from ...utils import get_icon, get_size DEFAULT_FN_ICON = "f...
5,367
Python
.py
136
30.691176
85
0.628797
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,535
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnselect/__init__.py
from ._window import FnSelectWindow, FnSelectWindowConfig __all__ = [ "FnSelectWindow", "FnSelectWindowConfig", ]
123
Python
.py
5
21.8
57
0.74359
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,536
_window.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_window.py
from typing import Tuple, Literal, Dict, Union, Type, Any, List, Optional from qtpy.QtCore import Qt from qtpy.QtWidgets import ( QWidget, QVBoxLayout, QDockWidget, ) from ._base import ( BaseFnExecuteWindow, DEFAULT_EXECUTOR_CLASS, FnExecuteWindowConfig, FnExecuteWindowEventListener, ...
33,476
Python
.py
912
23.199561
101
0.586683
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,537
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/__init__.py
from ._base import ( FnExecuteWindowConfig, DockWidgetArea, TopDockWidgetArea, BottomDockWidgetArea, LeftDockWidgetArea, RightDockWidgetArea, NoDockWidgetArea, DockWidgetAreas, AllDockWidgetAreas, FnExecuteWindowEventListener, SimpleFnExecuteWindowEventListener, ) from ._outp...
809
Python
.py
31
21.83871
64
0.765766
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,538
_base.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_base.py
import dataclasses from abc import abstractmethod from typing import Tuple, Dict, Union, Type, Optional, Literal, Any, Callable, List from qtpy.QtCore import QSize, Qt from ._output_area import OutputBrowserConfig, ProgressBarConfig from ..document_browser import DocumentBrowserConfig from ...exceptions import Parame...
18,337
Python
.py
460
28.671739
95
0.656319
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,539
area.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_operation_area/area.py
from typing import Optional from qtpy.QtCore import Signal from qtpy.QtWidgets import QWidget, QPushButton, QCheckBox, QVBoxLayout, QHBoxLayout from .._base import FnExecuteWindowConfig from ....utils import hline class OperationArea(QWidget): sig_execute_requested = Signal() sig_cancel_requested = Signal()...
4,219
Python
.py
81
43.679012
88
0.692457
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,540
area.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_document_area/area.py
from typing import Literal, Optional, Callable from qtpy.QtWidgets import QWidget, QVBoxLayout from ...document_browser import DocumentBrowserConfig, DocumentBrowser from ....utils import set_textbrowser_content class DocumentArea(QWidget): # noinspection SpellCheckingInspection def __init__( self, ...
1,981
Python
.py
39
42.974359
87
0.696058
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,541
area.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_parameter_area/area.py
import dataclasses from typing import Optional, Any, Dict, List, Tuple, Type from qtpy.QtWidgets import QWidget, QVBoxLayout from .base import BaseParameterArea, BaseParameterGroupBox from .group import ParameterGroupBox from .._base import FnExecuteWindowConfig from ....bundle import FnBundle from ....exceptions imp...
6,544
Python
.py
140
37.857143
106
0.669749
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,542
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_parameter_area/__init__.py
from .base import BaseParameterPage, BaseParameterGroupBox, BaseParameterArea from .area import ParameterArea
110
Python
.py
2
54
77
0.888889
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,543
base.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_parameter_area/base.py
from abc import abstractmethod from typing import Dict, Any, List, Tuple, Type, Optional from qtpy.QtCore import Signal from qtpy.QtGui import QIcon from qtpy.QtWidgets import QWidget, QToolBox from ....exceptions import ParameterError from ....paramwidget import BaseParameterWidget, BaseParameterWidgetConfig class...
8,527
Python
.py
272
24.485294
88
0.660147
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,544
group.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_parameter_area/group.py
from collections import OrderedDict from typing import Dict, Any, List, Tuple, Type, Optional from qtpy.QtGui import QIcon from qtpy.QtWidgets import ( QWidget, QVBoxLayout, QScrollArea, QSpacerItem, QSizePolicy, ) from .base import BaseParameterPage, BaseParameterGroupBox from .._base import FnEx...
14,820
Python
.py
338
34.707101
85
0.652942
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,545
browser.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_output_area/browser.py
import dataclasses from typing import Optional from qtpy.QtWidgets import QWidget from ....constants.color import ( COLOR_TERMINAL_BACKGROUND_CLASSIC, COLOR_TERMINAL_TEXT_CLASSIC, ) from ....constants.font import FONT_FAMILY, FONT_LARGE from ....textbrowser import TextBrowserConfig, TextBrowser @dataclasses...
825
Python
.py
22
32.636364
78
0.750643
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,546
area.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_output_area/area.py
from typing import Optional from qtpy.QtWidgets import QWidget, QVBoxLayout from .browser import OutputBrowserConfig, OutputBrowser from .progressbar import ProgressBarConfig, ProgressBar class OutputArea(QWidget): def __init__( self, parent: QWidget, output_browser_config: Optional[OutputBrowserConfig]...
1,668
Python
.py
37
37.513514
83
0.695545
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,547
__init__.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_output_area/__init__.py
from .area import OutputArea from .browser import OutputBrowserConfig from .progressbar import ProgressBarConfig
113
Python
.py
3
36.666667
42
0.890909
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,548
progressbar.py
zimolab_PyGUIAdapter/pyguiadapter/windows/fnexec/_output_area/progressbar.py
import dataclasses from typing import Literal, Optional from qtpy.QtCore import Qt from qtpy.QtWidgets import QWidget, QVBoxLayout, QProgressBar, QLabel _FORMATS = { "richtext": Qt.TextFormat.RichText, "markdown": Qt.TextFormat.MarkdownText, "plaintext": Qt.TextFormat.PlainText, "autotext": Qt.TextFor...
2,686
Python
.py
65
33.907692
84
0.67408
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,549
_python.py
zimolab_PyGUIAdapter/pyguiadapter/codeeditor/formatters/_python.py
import warnings from typing import Optional from yapf.yapflib.yapf_api import FormatCode from ..base import BaseCodeFormatter class PythonFormatter(BaseCodeFormatter): def format_code(self, text: str) -> Optional[str]: try: formatted, changed = FormatCode(text) except Exception as e:...
497
Python
.pyt
15
24.933333
56
0.648536
zimolab/PyGUIAdapter
8
0
0
GPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,550
app.py
1368129224_tgbot-for-tdl/app.py
import os import re import sys import socket import asyncio import logging import logging.handlers import tomlkit from telebot import asyncio_helper from telebot.types import InlineKeyboardButton, InlineKeyboardMarkup from telebot.async_telebot import AsyncTeleBot # global CFG_PATH = 'tdl_bot_config.toml' RE_STR = r'...
8,851
Python
.py
201
35.552239
220
0.602576
1368129224/tgbot-for-tdl
8
0
0
AGPL-3.0
9/5/2024, 10:48:26 PM (Europe/Amsterdam)
2,288,551
main.py
lypsoty112_llm-project-skeleton/main.py
from src.controller import Controller controller = Controller() message = input("Enter a message: ") data = { "history": [{ "content": message, "role": "human" }] } output = controller.run(data) print(output.message.content)
245
Python
.py
10
21.5
43
0.692641
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,552
config.py
lypsoty112_llm-project-skeleton/src/config.py
import os from typing import Literal import yaml from pydantic import Field, BaseModel from dotenv import load_dotenv class ChainConfig(BaseModel): name: str = Field("default", title="The name of the chain") llm: str = Field("Gpt35", title="The exact name of the llm component to be used. Case-sensitive.") ...
2,265
Python
.py
41
48.268293
174
0.668476
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,553
controller.py
lypsoty112_llm-project-skeleton/src/controller.py
import sys from loguru import logger from src.chains.baseChain import BaseOuterChain from src.config import Config from src.models.chains.base import OuterChainInput, OuterChainOutput from src.chains import * # noqa class Controller: main_chain: BaseOuterChain def __init__(self): # Get the config ...
1,720
Python
.py
34
42.647059
136
0.673238
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,554
main.py
lypsoty112_llm-project-skeleton/src/models/main.py
import datetime from typing import Literal from pydantic import BaseModel, ConfigDict, Field class Message(BaseModel): content: str = Field(..., description="Content of the message", example="Hello, how are you?") role: Literal["human", "ai", "system"] = Field(..., description="Role of the entity sending the ...
794
Python
.py
13
56.307692
126
0.721649
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,555
base.py
lypsoty112_llm-project-skeleton/src/models/chains/base.py
from pydantic import BaseModel, Field from src.models.main import History, Message class OuterChainInput(BaseModel): history: History class OuterChainOutput(BaseModel): message: Message metadata: dict = Field({}) class ChainBuildData(BaseModel): pass
274
Python
.py
9
26.888889
44
0.794574
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,556
main.py
lypsoty112_llm-project-skeleton/src/models/llm/main.py
from pydantic import BaseModel, Field from src.models.main import History, Message class LlmBuildData(BaseModel): chat: bool = Field(False, description="Whether the model is a chat model") temperature: float = Field(0.7, description="Temperature. Might be ignored.") max_tokens: int = Field(1024, descripti...
958
Python
.py
16
56
117
0.75
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,557
baseChain.py
lypsoty112_llm-project-skeleton/src/chains/baseChain.py
from abc import ABC, abstractmethod from typing import Type from langchain_core.runnables import Runnable from pydantic import BaseModel from src.components.base.baseComponent import BaseComponent from src.components.llm.baseLlm import BaseLlm from src.config import Config from src.models.chains.base import ChainBuil...
2,013
Python
.py
47
37.148936
162
0.706667
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,558
example.py
lypsoty112_llm-project-skeleton/src/chains/example.py
from langchain_core.prompts import PromptTemplate from loguru import logger from src.chains.baseChain import BaseOuterChain from src.config import Config from src.models.chains.base import ChainBuildData, OuterChainInput, OuterChainOutput from src.models.main import Message PROMPT = "Respond to the following message ...
1,684
Python
.py
27
56.185185
122
0.731352
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,559
baseComponent.py
lypsoty112_llm-project-skeleton/src/components/base/baseComponent.py
from abc import ABC, abstractmethod from typing import Type from loguru import logger from pydantic import BaseModel from src.config import Config class BaseComponent(ABC): config: Config def __init__(self, config: Config = None) -> None: super().__init__() self.config = config if c...
1,149
Python
.py
33
28.272727
86
0.658824
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,560
baseLLM.py
lypsoty112_llm-project-skeleton/src/components/llm/baseLLM.py
from abc import ABC, abstractmethod from langchain_core.language_models.base import BaseLanguageModel from src.components.base.baseComponent import BaseComponent from src.config import Config from src.models.llm.main import LlmBuildData, LlmChatData, LlmChatResponse, LlmRunData, LlmRunResponse class BaseLlm(BaseCom...
1,460
Python
.py
36
34.611111
102
0.704255
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,561
openai.py
lypsoty112_llm-project-skeleton/src/components/llm/openai.py
from langchain_openai import OpenAI, ChatOpenAI from src.components.llm.baseLlm import BaseLlm from src.config import Config from src.models.llm.main import LlmBuildData, LlmChatData, LlmChatResponse, LlmRunData, LlmRunResponse from src.models.main import Message class Gpt35(BaseLlm): def __init__(self, config:...
1,953
Python
.py
34
50.235294
184
0.700734
lypsoty112/llm-project-skeleton
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,562
EcoLens_Static.py
maxprogrammer007_EcoLens/EcoLens/Code File/EcoLens_Static.py
''' <TEAM ECOLENS> Members : Arnav Jha, Abhinav Shukla , Harsh Sharma The E- WASTE OBJECT DETECTION project aims to identify and categorize electronic waste items using computer vision techniques The goal is to help users understand how to dispose of e-waste properly by providing information on each detected item As t...
2,981
Python
.py
65
36.938462
133
0.652522
maxprogrammer007/EcoLens
8
0
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,563
v.24.06.10.py
God-2077_python-code/键盘监听/v.24.06.10.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2024/06/10 # @Author : Kissablecho # @FileName: Keyboard monitoring.py # @Software: Visual Studio Code # @Blog :https://blog.csdn.net/y223421 # @Github : https://github.com/God-2077 from datetime import datetime import keyboard from configparser import C...
5,380
Python
.py
141
28.865248
80
0.646366
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,564
v.24.03.11.py
God-2077_python-code/键盘监听/v.24.03.11.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2024/03/11 # @Author : Kissablecho # @FileName: Keyboard monitoring.py # @Software: Visual Studio Code # @Blog :https://blog.csdn.net/y223421 import time import keyboard from configparser import ConfigParser import signal import sys # 读取config.ini配置文件 co...
1,265
Python
.py
43
25.302326
70
0.633304
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,565
v.24.07.16.py
God-2077_python-code/键盘监听/v.24.07.16.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2024/07/16 # @Author : Kissablecho # @FileName: Keyboard monitoring.py # @Software: Visual Studio Code # @Blog :https://blog.csdn.net/y223421 # @Blog : https://buasis.eu.org/ # @Github : https://github.com/God-2077 from datetime import datetime import...
6,100
Python
.py
145
34.124138
182
0.650074
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,566
v.24.06.15.py
God-2077_python-code/键盘监听/v.24.06.15.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2024/06/15 # @Author : Kissablecho # @FileName: Keyboard monitoring.py # @Software: Visual Studio Code # @Blog :https://blog.csdn.net/y223421 # @Blog : https://buasis.eu.org/ # @Github : https://github.com/God-2077 import datetime import keyboard from...
6,199
Python
.py
155
30.380645
89
0.626629
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,567
v.24.06.16.py
God-2077_python-code/键盘监听/v.24.06.16.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Date : 2024/06/16 # @Author : Kissablecho # @FileName: Keyboard monitoring.py # @Software: Visual Studio Code # @Blog :https://blog.csdn.net/y223421 # @Blog : https://buasis.eu.org/ # @Github : https://github.com/God-2077 from datetime import datetime import...
5,039
Python
.py
117
35.410256
182
0.648589
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,568
psql_terminal.py
God-2077_python-code/psql_terminal/psql_terminal.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import psycopg2 import sys connection = None # 初始化为 None connection_string = "postgresql://aaaaaaa:[YOUR-PASSWORD]@aaaaaaaaaa.aa.aa:6543/aaaaa" # 你的url try: connection = psycopg2.connect(connection_string) cursor = connection.cursor() print("Co...
1,211
Python
.py
33
25.909091
95
0.58452
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,569
v.24-03-30.网易云音乐歌单批连下载歌曲.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-03-30.网易云音乐歌单批连下载歌曲.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import requests import os import json # JSON链接 # json_url = "https://api.injahow.cn/meting/?type=playlist&id=9313871605" playlist = input("歌单ID:") if playlist == '': print("必须输入歌单ID") exit() json_url = "https://api.injahow.cn/meting/?type=play...
2,107
Python
.py
57
27.824561
75
0.637673
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,570
v.24-10-06.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-10-06.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import requests from mutagen.mp3 import MP3 import time import signal import sys import re from tabulate import tabulate def download_file(url, file_path, file_type, index, total_files, timeout=10): try: response = requests.get(url, stream=True, timeout...
9,901
Python
.py
221
30.529412
109
0.54688
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,571
v.24-04-04.优化.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-04-04.优化.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import json import requests from urllib.parse import quote def download_song(url, song_path): try: response = requests.get(url, stream=True) response.raise_for_status() # 检查请求是否成功 total_size = int(response.headers.get('content-length', 0...
2,845
Python
.py
65
30.292308
86
0.585386
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,572
v.24-07-18.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-07-18.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import requests from mutagen.mp3 import MP3 import time import signal import sys import re from tabulate import tabulate def download_song(url, song_path, song_index, total_songs, yuan_name): global error_song_id global error_song_name try: resp...
10,225
Python
.py
228
31.671053
109
0.574032
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,573
v.23-04-04.多线程.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.23-04-04.多线程.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import json import requests from urllib.parse import quote from concurrent.futures import ThreadPoolExecutor log_msg = {} log_index = 0 def show_log(f:bool=False): global log_index if f or log_index % 20 == 0: p_msg = "" os.system('cls') ...
3,484
Python
.py
83
29.975904
86
0.589447
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,574
v.24-04-05.最终版.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-04-05.最终版.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import json import requests import librosa from urllib.parse import quote import time import signal import sys def download_song(url, song_path, song_index, total_songs): try: response = requests.get(url, stream=True) response.rais...
6,677
Python
.py
143
31.461538
101
0.568397
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,575
v.24-07-19.py
God-2077_python-code/网易云音乐歌单批量下载歌曲/v.24-07-19.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import os import requests from mutagen.mp3 import MP3 import time import signal import sys import re from tabulate import tabulate def download_file(url, file_path, file_type, index, total_files, timeout=10): try: response = requests.get(url, stream=True, timeout...
9,297
Python
.py
208
30.822115
109
0.554471
God-2077/python-code
8
3
1
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,576
health_check.py
sean89503_Invidious_Cast/health_check.py
import time def update_health_status(): """Updates the last health check time variable.""" global last_health_check_time # Declare the variable as global last_health_check_time = time.time() # Optional: You can add additional health check logic here # For example, checking database connection or extern...
467
Python
.py
9
48.555556
71
0.772124
sean89503/Invidious_Cast
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,577
app.py
sean89503_Invidious_Cast/app.py
from flask import Flask, request, send_from_directory, render_template, redirect, flash, Response import xml.etree.ElementTree as ET import os from datetime import datetime import time import logging from multiprocessing import Process import yt_dlp app = Flask(__name__) #########Set Peramiters file_path ...
7,118
Python
.py
164
36.054878
141
0.624184
sean89503/Invidious_Cast
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,578
main.py
sean89503_Invidious_Cast/main.py
import xml.etree.ElementTree as ET import os from datetime import datetime import time import logging import multiprocessing from multiprocessing import Process from app import app from waitress import serve import yt_dlp import json #########Set Peramiters file_path = "channels.txt" CAST_DOMAIN = os.get...
23,612
Python
.py
444
40.632883
155
0.564487
sean89503/Invidious_Cast
8
1
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,579
app.py
MaxMLang_RAG-nificent/src/app.py
import os from typing import List import dotenv from langchain.embeddings.openai import OpenAIEmbeddings from langchain.chains import ConversationalRetrievalChain from langchain.chat_models import ChatOpenAI from langchain_groq import ChatGroq from langchain_pinecone import Pinecone from langchain.docstore.document imp...
5,034
Python
.py
111
35.153153
165
0.61504
MaxMLang/RAG-nificent
8
0
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,580
data_ingestion.py
MaxMLang_RAG-nificent/src/data_ingestion.py
import os from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain_openai import OpenAIEmbeddings from langchain_pinecone import PineconeVectorStore from langchain_community.document_loaders import PyPDFLoader from langchain_community.document_loaders import DirectoryLoader import dotenv doten...
882
Python
.py
21
40.238095
141
0.832356
MaxMLang/RAG-nificent
8
0
0
GPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,581
test_persist.py
TshineZheng_Filamentor/test/test_persist.py
import os import consts def setup_module(): consts.setup() def teardown_module(): # 删除 test_channel.txt import os os.remove(f'{consts.STORAGE_PATH}pytest.channel') def test_update_printer_channel(): import utils.persist as persist persist.update_printer_channel('pytest', 3) with o...
1,150
Python
.py
30
31.7
64
0.673221
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,582
test_bambu_client.py
TshineZheng_Filamentor/test/test_bambu_client.py
def test_bambu(): from impl.bambu_client import BambuClient, BambuClientConfig import paho.mqtt.client as mqtt client = BambuClient(BambuClientConfig("127.0.0.1", 'lan_pwd', "device_serial")) msg = """ {"print":{"upgrade_state":{"sequence_id":0,"progress":"100","status":"UPGRADE_SUCCESS","consistency...
2,610
Python
.py
8
321.75
2,347
0.674248
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,583
test_app_config.py
TshineZheng_Filamentor/test/test_app_config.py
import json from app_config import AppConfig, ChannelRelation, DetectRelation, IDBrokenDetect, IDController, IDPrinterClient from impl.bambu_client import BambuClient, BambuClientConfig from impl.mqtt_broken_detect import MQTTBrokenDetect from impl.yba_ams_controller import YBAAMSController from mqtt_config import MQTT...
5,616
Python
.py
111
42.225225
133
0.656753
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,584
test_bambu_gcode.py
TshineZheng_Filamentor/test/test_bambu_gcode.py
def test_get_first_fila_from_gcode_file(): from impl.bambu_client import BambuClient url = 'https://raw.githubusercontent.com/TshineZheng/Filamentor/main/test/test.3mf' path = 'Metadata/plate_1.gcode' fila_channel = BambuClient.get_first_fila_from_gcode(url, path) assert fila_channel == 0
313
Python
.py
6
47.333333
87
0.743421
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,585
broken_detect.py
TshineZheng_Filamentor/src/broken_detect.py
from abc import abstractmethod from src.base_unit import BaseUnit class BrokenDetect(BaseUnit): def __init__(self): super().__init__() @staticmethod @abstractmethod def type_name() -> str: pass @abstractmethod def to_dict(self) -> dict: """保存配置 """ re...
726
Python
.py
28
17.535714
46
0.580093
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,586
controller.py
TshineZheng_Filamentor/src/controller.py
from abc import abstractmethod from enum import Enum from typing import List from src.base_unit import BaseUnit from src.broken_detect import BrokenDetect from src.utils.log import LOGE class ChannelAction(Enum): """控制类型 """ NONE = -1 # 待机(根据控制器类型自动判断是松开还是送料) PUSH = 1 # 送 PULL = 2 # 退 STOP...
3,352
Python
.py
98
22.877551
93
0.602234
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,587
mqtt_config.py
TshineZheng_Filamentor/src/mqtt_config.py
class MQTTConfig: def __init__(self, server: str = None, port: int = 1883, client_id: str = 'Filamentor-MQTT', username: str = '', password: str = ''): self.server = server self.port = port self.client_id = client_id self.username = username self.password = p...
869
Python
.py
25
24.68
116
0.534442
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,588
printer_client.py
TshineZheng_Filamentor/src/printer_client.py
from abc import abstractmethod from enum import Enum from typing import Any, Callable from src.base_unit import BaseUnit from src.broken_detect import BrokenDetect class Action(Enum): CHANGE_FILAMENT = 0 # 更换通道 FILAMENT_SWITCH = 1 # 打印机断料检测器状态改变 TASK_START = 2 # 接到任务 TASK_PREPARE = 3 # 准备开始 TA...
3,013
Python
.py
96
19.479167
72
0.567176
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,589
core_services.py
TshineZheng_Filamentor/src/core_services.py
def stop(): import src.ams_core as ams_core import src.app_config as app_config from src.utils.log import LOGI LOGI('关闭所有连接') # stop all for a in ams_core.ams_list: a.stop() for p in app_config.config.printer_list: p.client.stop() for c in app_config.config.controller_lis...
1,281
Python
.py
42
22.071429
47
0.64191
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,590
consts.py
TshineZheng_Filamentor/src/consts.py
STORAGE_PATH = 'data/' # 数据存储目录 FIX_Z = False FIX_Z_GCODE = None # FIX_Z_TEMP = None FIX_Z_PAUSE_COUNT = None PAUSE_Z_OFFSET = 3.0 DO_HOME_Z_HEIGHT = 10.0 LAYER_HEIGHT = 0.2 def setup(): import os if not os.path.exists(STORAGE_PATH): os.mkdir(STORAGE_PATH) global FIX_Z global FIX_Z_GCODE ...
1,598
Python
.py
41
30.804878
68
0.59973
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,591
ams_core.py
TshineZheng_Filamentor/src/ams_core.py
import threading import time from datetime import datetime from typing import Callable, List import src.printer_client as printer from src.controller import ChannelAction, Controller from src.utils.log import TAGLOG import src.utils.persist as persist from src.app_config import config LOAD_TIMEOUT = 30 # 装料超时,超时会尝试...
13,118
Python
.py
235
37.310638
126
0.626062
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,592
main.py
TshineZheng_Filamentor/src/main.py
from fastapi import FastAPI import src.web as web app = FastAPI() web.init(app) @app.on_event("startup") async def startup_event(): from loguru import logger import sys import src.consts as consts import src.core_services as core_services import src.web.front as front from dotenv import load_...
651
Python
.py
24
23.125
45
0.723748
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,593
base_unit.py
TshineZheng_Filamentor/src/base_unit.py
from abc import ABC, abstractmethod class BaseUnit(ABC): def __init__(self): self.is_running = False @abstractmethod def start(self): self.is_running = True @abstractmethod def stop(self): self.is_running = False def get_sync_info(self) -> dict: """同步时返回的信息 ...
414
Python
.py
16
17.25
36
0.576087
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,594
app_config.py
TshineZheng_Filamentor/src/app_config.py
import json import os from typing import List, Tuple from src import consts from src.broken_detect import BrokenDetect from src.controller import Controller from src.impl.bambu_client import BambuClient from src.impl.mqtt_broken_detect import MQTTBrokenDetect from src.impl.yba_ams_controller import YBAAMSController fr...
13,298
Python
.py
304
32.575658
264
0.593928
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,595
yba_ams_controller.py
TshineZheng_Filamentor/src/impl/yba_ams_controller.py
import threading import time from typing import List from src.controller import ChannelAction, Controller import socket from src.utils.log import LOGE, LOGI ams_head = b'\x2f\x2f\xff\xfe\x01\x02' class YBAAMSController(Controller): @staticmethod def type_name() -> str: return "yba_ams" def __in...
4,392
Python
.py
119
24.10084
99
0.538442
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,596
bambu_client.py
TshineZheng_Filamentor/src/impl/bambu_client.py
from datetime import datetime import json import math import os import ssl import threading import time from typing import Any import paho.mqtt.client as mqtt from src import consts from src.broken_detect import BrokenDetect import src.utils.gcode_util as gcode_util from src.utils.json_util import ast from src.utils.l...
15,819
Python
.py
340
33.641176
137
0.584451
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,597
yba_ams_servo_controller.py
TshineZheng_Filamentor/src/impl/yba_ams_servo_controller.py
from src.impl.yba_ams_py_controller import YBAAMSPYController class YBAAMSServoController(YBAAMSPYController): @staticmethod def type_name() -> str: return "yba_ams_servo" def is_initiative_push(self, channel_index: int) -> bool: return False
277
Python
.py
7
33.714286
61
0.731061
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,598
yba_single_buffer_controller.py
TshineZheng_Filamentor/src/impl/yba_single_buffer_controller.py
from src.broken_detect import BrokenDetect from src.impl.yba_ams_py_controller import YBAAMSPYController ams_head = b'\x2f\x2f\xff\xfe\x01\x02' class YBASingleBufferController(YBAAMSPYController): @staticmethod def type_name() -> str: return "yba_ams_single_buffer" def __init__(self, ip: str, p...
2,267
Python
.py
62
28.66129
79
0.611188
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)
2,288,599
mqtt_broken_detect.py
TshineZheng_Filamentor/src/impl/mqtt_broken_detect.py
import time from src.broken_detect import BrokenDetect from src.utils.log import LOGE, LOGI from src.mqtt_config import MQTTConfig import paho.mqtt.client as mqtt TOPIC = '/openams/filament_broken_detect' class MQTTBrokenDetect(BrokenDetect): """断料检测服务 通过监听 {TOPIC} 主题,检测打印机是否断料 当监听数据为 "1" 时表示有料,当监听数据为 ...
3,211
Python
.py
81
27.098765
119
0.598504
TshineZheng/Filamentor
8
2
0
AGPL-3.0
9/5/2024, 10:48:34 PM (Europe/Amsterdam)