repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | src/silero_vad/tinygrad_model.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.544821 | from tinygrad import nn
class TinySileroVAD:
def __init__(self):
"""
from tinygrad.nn.state import safe_load, load_state_dict
tiny_model = TinySileroVAD()
state_dict = safe_load('data/silero_vad_16k.safetensors')
load_state_dict(tiny_model, state_dict)
"""
... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | src/silero_vad/utils_vad.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.545444 | import torch
import torchaudio
from typing import Callable, List
import warnings
from packaging import version
languages = ['ru', 'en', 'de', 'es']
class OnnxWrapper():
def __init__(self, path, force_onnx_cpu=False):
import numpy as np
global np
import onnxruntime
opts = onnxrun... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | hubconf.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.552922 | dependencies = ['torch', 'torchaudio']
import torch
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from silero_vad.utils_vad import (init_jit_model,
get_speech_timestamps,
save_audio,
... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | tuning/search_thresholds.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.553398 | from utils import init_jit_model, predict, calculate_best_thresholds, SileroVadDataset, SileroVadPadder
from omegaconf import OmegaConf
import torch
torch.set_num_threads(1)
if __name__ == '__main__':
config = OmegaConf.load('config.yml')
loader = torch.utils.data.DataLoader(SileroVadDataset(config, mode='val... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | examples/microphone_and_webRTC_integration/microphone_and_webRTC_integration.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.582345 | import collections, queue
import numpy as np
import pyaudio
import webrtcvad
from halo import Halo
import torch
import torchaudio
class Audio(object):
"""Streams raw audio from microphone. Data is received in a separate thread, and stored in a buffer, to be read from."""
FORMAT = pyaudio.paInt16
# Network... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | src/silero_vad/model.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.610301 | from .utils_vad import init_jit_model, OnnxWrapper
import torch
torch.set_num_threads(1)
def load_silero_vad(onnx=False, opset_version=16):
available_ops = [15, 16]
if onnx and opset_version not in available_ops:
raise Exception(f'Available ONNX opset_version: {available_ops}')
if onnx:
i... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | src/silero_vad/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:26.639014 | from importlib.metadata import version
try:
__version__ = version(__name__)
except:
pass
from silero_vad.model import load_silero_vad
from silero_vad.utils_vad import (get_speech_timestamps,
save_audio,
read_audio,
... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | tuning/tune.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:27.245491 | from utils import SileroVadDataset, SileroVadPadder, VADDecoderRNNJIT, train, validate, init_jit_model
from omegaconf import OmegaConf
import torch.nn as nn
import torch
if __name__ == '__main__':
config = OmegaConf.load('config.yml')
train_dataset = SileroVadDataset(config, mode='train')
train_loader = ... |
snakers4/silero-vad | https://github.com/snakers4/silero-vad | null | null | null | null | 8,947 | null | null | mit | null | null | null | null | null | null | null | tuning/utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:27.262472 | from sklearn.metrics import roc_auc_score, accuracy_score
from torch.utils.data import Dataset
import torch.nn as nn
from tqdm import tqdm
import pandas as pd
import numpy as np
import torchaudio
import warnings
import random
import torch
import gc
warnings.filterwarnings('ignore')
def read_audio(path: str,
... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | agentmain.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.653721 | import os, sys, threading, queue, time, json, re, random, locale
os.environ.setdefault('GA_LANG', 'zh' if any(k in (locale.getlocale()[0] or '').lower() for k in ('zh', 'chinese')) else 'en')
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
elif hasattr(sys.stdout, 'reconfigure'): sys.stdout.reconfigure(errors... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | agent_loop.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.704360 | import json, re, os
from dataclasses import dataclass
from typing import Any, Optional
@dataclass
class StepOutcome:
data: Any
next_prompt: Optional[str] = None
should_exit: bool = False
def try_call_generator(func, *args, **kwargs):
ret = func(*args, **kwargs)
if hasattr(ret, '__iter__') and not is... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/continue_cmd.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.706076 | """`/continue` command: list & restore past model_responses sessions.
Pure functions + one `install(cls)` monkey-patch entry. No side effects at import.
"""
import ast, glob, json, os, re, time
_LOG_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
'temp', 'model_re... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/dingtalkapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.707660 | import asyncio, json, os, sys, threading, time
import requests
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from agentmain import GeneraticAgent
from chatapp_common import AgentChatMixin, ensure_single_instance, public_access, redirect_log, require_runtime, split_text
from llmcore im... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/chatapp_common.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.709022 | import ast, asyncio, glob, json, os, queue as Q, re, socket, sys, time
HELP_COMMANDS = (
("/help", "显示帮助"),
("/status", "查看状态"),
("/stop", "停止当前任务"),
("/new", "开启新对话并清空当前上下文"),
("/restore", "恢复上次对话历史"),
("/continue", "列出可恢复会话"),
("/continue [n]", "恢复第 n 个会话"),
("/llm", "查看当前模型列表"),
... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/fsapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.725717 | import glob, json, os, queue as Q, re, sys, threading, time
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, PROJECT_ROOT)
os.chdir(PROJECT_ROOT)
from agentmain import GeneraticAgent
from frontends.chatapp_common import format_restore
from frontends.continue_cmd import hand... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | TMWebDriver.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.731448 | import json, threading, time, uuid, queue, socket, requests, traceback
from typing import Dict, Any, Optional, List
from simple_websocket_server import WebSocketServer, WebSocket
from bs4 import BeautifulSoup
import bottle, random
from bottle import route, template, request, response
class Session:
def __ini... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | assets/code_run_header.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.732535 | import sys, os, json, re, time, subprocess
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'memory'))
_r = subprocess.run
def _d(b):
if not b: return ''
if isinstance(b, str): return b
try: return b.decode()
except: return b.decode('gbk', 'replace')
def _run(*a, **k):
... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/qqapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.761642 | import asyncio, os, sys, threading, time
from collections import deque
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from agentmain import GeneraticAgent
from chatapp_common import AgentChatMixin, ensure_single_instance, public_access, redirect_log, require_runtime, split_text
from ll... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/dcapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:29.762955 | # Discord Bot Frontend for GenericAgent
# ⚠️ 需要在 Discord Developer Portal 开启 "Message Content Intent"
# Bot → Privileged Gateway Intents → MESSAGE CONTENT INTENT → 打开
# pip install discord.py
import asyncio, os, re, sys, threading, time
from collections import OrderedDict
sys.path.insert(0, os.path.dirname(os.path.... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/qtapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.280560 | """
桌面前端单文件版 – PySide6 聊天面板 + 悬浮按钮 thanks to GaoZhiCheng
依赖: pip install PySide6
可选: pip install markdown (Markdown 渲染)
用法: python frontends/qtapp.py
"""
from __future__ import annotations
import math, os, sys, json, glob, re, base64, time, threading
import queue as _queue
from datetime import datetime
from typing... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/stapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.319492 | import os, sys, subprocess
from urllib.request import urlopen
from urllib.parse import quote
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
if sys.stderr is None: sys.stderr = open(os.devnull, "w")
try: sys.stdout.reconfigure(errors='replace')
except: pass
try: sys.stderr.reconfigure(errors='replace')
except... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/tgapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.342188 | import os, sys, re, threading, asyncio, queue as Q, time, random, uuid
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
_TEMP_DIR = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'temp')
from agentmain import GeneraticAgent
try:
from telegram import BotComma... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/stapp2.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.372132 | import os, sys
import html
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
if sys.stderr is None: sys.stderr = open(os.devnull, "w")
try: sys.stdout.reconfigure(errors='replace')
except: pass
try: sys.stderr.reconfigure(errors='replace')
except: pass
sys.path.append(os.path.abspath(os.path.join(os.path.dirnam... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/L4_raw_sessions/compress_session.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.380897 | """L4 Session Log Processor — compress & extract history.
Format A (JSON): kept as-is. Format B (Raw): strip sys prompt & assistant echo.
"""
import re, os, json, ast
from datetime import datetime
L4_DIR = os.path.dirname(os.path.abspath(__file__))
_RE_PROMPT = re.compile(r'^=== Prompt ===(?: (\d{4}-\d{2}-\d{2} \d... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/wechatapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.388360 | import os, sys, re, threading, queue, time, socket, json, struct, base64, uuid, webbrowser, hashlib, math
from pathlib import Path
from urllib.parse import quote
import requests, qrcode
from Crypto.Cipher import AES
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
_TEMP_DIR = os.path.join... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | ga.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.393435 | import sys, os, re, json, time, threading, importlib
from datetime import datetime
from pathlib import Path
import tempfile, traceback, subprocess, itertools, collections, difflib
if sys.stdout is None: sys.stdout = open(os.devnull, "w")
if sys.stderr is None: sys.stderr = open(os.devnull, "w")
sys.path.append(os.path.... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | frontends/wecomapp.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.400220 | import asyncio, os, select, sys, threading, time, traceback
from collections import deque
from datetime import datetime
from typing import Any, Callable, Dict, Optional, TypedDict
class TurnContext(TypedDict, total=False):
"""Hook callback receives agent locals() — these are the keys we rely on."""
exit_reaso... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | llmcore.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.431163 | import os, json, re, time, requests, sys, threading, urllib3, base64, importlib, uuid
from datetime import datetime
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
_RESP_CACHE_KEY = str(uuid.uuid4())
def _load_mykeys():
global _mykey_path
try:
import mykey; importlib.reload(mykey); ... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/adb_ui.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:30.871265 | # adb_ui.py - 一键dump+解析Android UI (u2优先,原生fallback)
# u2 (uiautomator2) 不受idle限制,适合动画密集app(美团等)
# 弹窗检测: ui(clickable_only=True, raw=True) 找全屏FrameLayout+底部小ImageView(关闭X)
# 已知包名: 美团外卖=com.sankuai.meituan.takeoutnew 淘宝=com.taobao.taobao
import subprocess, xml.etree.ElementTree as ET, os, re, shutil
ADB = shutil.which("... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/keychain.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.186778 | """Keychain: save key to a file, then keys.set("name", file="path"); keys.name.use() to retrieve (use but no print)."""
import json, os, hashlib, pathlib, getpass
_PATH = pathlib.Path.home() / "ga_keychain.enc"
try: _user = os.getlogin()
except OSError: _user = getpass.getuser()
_MASK = hashlib.sha256(f"{_user}@ga_key... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/autonomous_operation_sop/helper.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.188146 | """
autonomous_task.py - 自主行动任务管理API
放置: memory/autonomous_operation_sop/
用法: import autonomous_task (或 from autonomous_operation_sop import autonomous_task)
4个函数:
get_todo() → 返回TODO内容
get_history(n) → 返回最近n条历史
complete_task() → 移报告+编号+写history+返回改TODO指令
set_todo() → 返回TODO真实路径
"""
import ... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/skill_search/skill_search/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.319235 | """CLI 入口: python -m skill_search"""
from __future__ import annotations
import argparse, json, sys
from .engine import SearchResult, SkillSearchError, detect_environment, search, get_stats
# ── 格式化 ───────────────────────────────────────────────
def format_results(results: list[SearchResult], env: dict, query: str) ... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/skill_search/skill_search/engine.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.328758 | """Skill 检索引擎 — API 客户端(含数据模型与环境检测)"""
from __future__ import annotations
import json, os, platform, shutil, subprocess, urllib.request, urllib.error
from dataclasses import dataclass, field
# ── 数据模型 ─────────────────────────────────────────────
@dataclass
class SkillIndex:
"""Skill 索引条目(与服务端结构对齐)"""
key: st... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/ocr_utils.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.332721 | """
本地 OCR 工具
- OCR引擎: rapidocr-onnxruntime (~1s/次, 中英文准确率高, 带bbox)
- 坑(rapid): result[i][2] conf 是 str 不是 float
- 坑(rapid): 无文字时 result 返回 None 而非空列表
- 坑: enhance 放大+高对比度处理,对清晰文字有害,默认关闭
- 坑(远程桌面): ImageGrab/mss 在 RDP 断开后截图全黑,用 ocr_window(hwnd) 代替
"""
import re
from PIL import ImageGrab, Image, ImageEnhance
_LANG = 'z... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/procmem_scanner.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.334386 | import ctypes
import ctypes.wintypes
import argparse
import yara
import sys
import os
import json
# Define WinAPI Types for 64-bit compatibility
PHANDLE = ctypes.wintypes.HANDLE
LPCVOID = ctypes.c_void_p
LPVOID = ctypes.c_void_p
SIZE_T = ctypes.c_size_t
class MEMORY_BASIC_INFORMATION(ctypes.Structure):
_fields_ =... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/ui_detect.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.358347 | #!/usr/bin/env python3
"""
极简UI元素检测脚本 - 基于OmniParser的YOLO模型
依赖: ultralytics, rapidocr-onnxruntime, pillow, numpy
"""
import sys
from pathlib import Path
from ultralytics import YOLO
from PIL import Image, ImageDraw
import numpy as np
DEFAULT_MODEL = str(Path(__file__).resolve().parent.parent / 'temp' / 'weights' / 'ic... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/skill_search/skill_search/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.359227 | """skill_search — Skill 检索 API 客户端"""
from .engine import (
SkillIndex, SearchResult, SkillSearchError,
search, get_stats, detect_environment,
)
__all__ = ["SkillIndex", "SearchResult", "SkillSearchError",
"search", "get_stats", "detect_environment"] |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/vision_api.template.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:31.752234 | import base64, requests, sys, os
from io import BytesIO
from pathlib import Path
# ============ 用户配置区(从 template 拷贝后只需改这里)============
CLAUDE_CONFIG_KEY = 'claude_config141' # mykey.py 中 Claude 配置的变量名
OPENAI_CONFIG_KEY = 'oai_config1' # mykey.py 中 OpenAI 配置的变量名
MODELSCOPE_API_KEY = '' # 直接填你的... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | plugins/langfuse_tracing.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:32.542952 | """Opt-in Langfuse tracing. Self-activates on import if langfuse_config exists in mykey.
Hooks only via monkey-patch so core files stay untouched:
- agent_loop.agent_runner_loop -> outer agent trace (parent of all below)
- llmcore._write_llm_log -> generation span (Prompt=start, Response=end)
- Bas... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | reflect/autonomous.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:32.572393 | # reflect/autonomous.py
INTERVAL = 1800
ONCE = False
def check():
return "[AUTO]🤖 用户已经离开超过30分钟,作为自主智能体,请阅读自动化sop,执行自动任务。" |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | reflect/scheduler.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:32.609560 | import os, json, time as _time, socket as _socket, logging
from datetime import datetime, timedelta
# 端口锁:防止重复启动,bind失败时agentmain会直接崩溃退出
# reload时mod.__dict__保留_lock,跳过重复绑定
try: _lock
except NameError:
_lock = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM)
_lock.bind(('127.0.0.1', 45762)); _lock.listen(1... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | simphtml.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:32.641393 | try: from bs4 import BeautifulSoup
except ImportError: print("[Error] BeautifulSoup4 未安装,请叫Agent安装BeautifulSoup4,再使用web相关工具。")
js_optHTML = r'''function optHTML(text_only=false) {
function createEnhancedDOMCopy() {
const nodeInfo = new WeakMap();
const ignoreTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'META', 'LINK... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | mykey_template_en.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:33.421510 | # ══════════════════════════════════════════════════════════════════════════════
# GenericAgent — mykey.py configuration template (copy to mykey.py and fill in)
# ══════════════════════════════════════════════════════════════════════════════
#
# Quick start:
# 1. Copy this file to mykey.py
# 2. Uncomment one of... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | mykey_template.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:33.545367 | # ══════════════════════════════════════════════════════════════════════════════
# GenericAgent — mykey.py 配置模板(复制为 mykey.py 后填入真实凭证)
# ══════════════════════════════════════════════════════════════════════════════
#
# ┌─────────────────────────────────────────────────────────────────────────┐
# │ 快速上手:只需 3 步 ... |
lsdefine/GenericAgent | https://github.com/lsdefine/GenericAgent | null | null | null | null | 8,934 | null | null | mit | null | null | null | null | null | null | null | memory/ljqCtrl.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:36.184947 | """
CRITICAL: 严禁在此工具链中 import pyautogui (会污染 win32api 导致逻辑冲突)。
ljqCtrl Quick Reference:
- dpi_scale: float (Logical = Physical * dpi_scale)
- Click(x, y): Use Physical Coordinates (from screenshots)
- SetCursorPos(z): Use Physical Coordinates z=(x, y)
- Press(cmd, staytime=0): Keyboard shortcuts (e.g. 'ctrl+v')
- FindB... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/androidndk.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.054129 | import sys
import os
class AndroidNDK:
"""
This class is used to get the current NDK information.
"""
ndk_dir = ""
def __init__(self, ndk_dir):
self.ndk_dir = ndk_dir
@property
def host_tag(self):
"""
Returns the host tag for the current system.
Note: The... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bdistapk.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.057794 | from glob import glob
from os.path import realpath, join, dirname, curdir, basename, split
from setuptools import Command
from shutil import copyfile
import sys
from pythonforandroid.util import rmdir, ensure_dir
def argv_contains(t):
for arg in sys.argv:
if arg.startswith(t):
return True
... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | ci/constants.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.058812 | from enum import Enum
class TargetPython(Enum):
python3 = 2
# recipes that currently break the build
# a recipe could be broken for a target Python and not for the other,
# hence we're maintaining one list per Python target
BROKEN_RECIPES_PYTHON3 = set([
'brokenrecipe',
# enum34 is not compatible with P... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/archs.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.061324 | from os import environ
from os.path import join
from multiprocessing import cpu_count
import shutil
from pythonforandroid.recipe import Recipe
from pythonforandroid.util import BuildInterruptingException, build_platform
class Arch:
command_prefix = None
'''The prefix for NDK commands such as gcc.'''
ar... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstrap.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.063493 | import functools
import glob
import importlib
import os
from os.path import (join, dirname, isdir, normpath, splitext, basename)
from os import listdir, walk, sep
import sh
import shlex
import shutil
from pythonforandroid.logger import (shprint, info, info_main, logger, debug)
from pythonforandroid.util import (
c... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | ci/rebuild_updated_recipes.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:39.840943 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Continuous Integration helper script.
Automatically detects recipes modified in a changeset (compares with master)
and recompiles them.
To run locally, set the environment variables before running:
```
ANDROID_SDK_HOME=~/.buildozer/android/platform/android-sdk-20
ANDRO... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/build.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:40.480364 | from contextlib import suppress
import copy
import glob
import os
import json
import tempfile
from os import environ
from os.path import (
abspath, join, realpath, dirname, expanduser, exists, basename
)
import re
import shutil
import subprocess
import sys
import sh
from packaging.utils import parse_wheel_filenam... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/service_library/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:40.783345 | from pythonforandroid.bootstraps.service_only import ServiceOnlyBootstrap
class ServiceLibraryBootstrap(ServiceOnlyBootstrap):
name = 'service_library'
bootstrap = ServiceLibraryBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/webview/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:40.885572 | from pythonforandroid.toolchain import Bootstrap
class WebViewBootstrap(Bootstrap):
name = 'webview'
recipe_depends = list(
set(Bootstrap.recipe_depends).union({'genericndkbuild'})
)
bootstrap = WebViewBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/checkdependencies.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:41.111480 | from importlib import import_module
from os import environ
import sys
from packaging.version import Version
from pythonforandroid.prerequisites import (
check_and_install_default_prerequisites,
)
def check_python_dependencies():
"""
Check if the Python requirements are installed. This must appears
b... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/distribution.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:41.374771 | import json
import glob
from os.path import exists, join
from pythonforandroid.logger import (
debug, info, info_notify, warning, Err_Style, Err_Fore)
from pythonforandroid.util import (
current_directory, BuildInterruptingException, rmdir)
class Distribution:
'''State container for information about a d... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/entrypoints.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:41.441690 | from pythonforandroid.recommendations import check_python_version
from pythonforandroid.util import BuildInterruptingException, handle_build_exception
def main():
"""
Main entrypoint for running python-for-android as a script.
"""
try:
# Check the Python version before importing anything heav... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/graph.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:42.130521 | from copy import deepcopy
from itertools import product
from pythonforandroid.logger import info
from pythonforandroid.recipe import Recipe
from pythonforandroid.bootstrap import Bootstrap
from pythonforandroid.util import BuildInterruptingException
def fix_deplist(deps):
""" Turn a dependency list into lowercas... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/meson_python.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:42.412350 | import sys
import json
import subprocess
import importlib.util
from os.path import join
from glob import glob
class C:
TARGET_PYTHON_PREFIX = globals().get("TARGET_PYTHON_PREFIX")
PYTHON_MAJOR_VERSION = globals().get("PYTHON_MAJOR_VERSION", sys.version_info.major)
PYTHON_MINOR_VERSION = globals().get("PYT... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/logger.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:42.413794 | import logging
import os
import re
import sh
from sys import stdout, stderr
from math import log10
from collections import defaultdict
from colorama import Style as Colo_Style, Fore as Colo_Fore
# monkey patch to show full output
sh.ErrorReturnCode.truncate_cap = 999999
class LevelDifferentiatingFormatter(logging.F... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/patching.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:42.821735 | """
Helper functions for recipes.
Recipes must supply a list of patches.
Patches consist of a filename and an optional conditional, which is
any function of the form:
def patch_check(arch: string, recipe : Recipe) -> bool
This library provides some helpful conditionals and mechanisms to
... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/pythonpackage.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:43.250082 | """ This module offers highlevel functions to get package metadata
like the METADATA file, the name, or a list of dependencies.
Usage examples:
# Getting package name from pip reference:
from pythonforandroid.pythonpackage import get_package_name
print(get_package_name("pillow"))
#... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/prerequisites.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:43.401365 | #!/usr/bin/env python3
import os
import platform
import shutil
import subprocess
import sys
from pythonforandroid.logger import info, warning, error
from pythonforandroid.util import ensure_dir
class Prerequisite(object):
name = "Default"
homebrew_formula_name = ""
mandatory = dict(linux=False, darwin=F... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipe.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:43.555298 | from os.path import basename, dirname, exists, isdir, isfile, join, realpath, split
import glob
import hashlib
import json
from re import match
import sh
import subprocess
import shutil
import fnmatch
import zipfile
import urllib.request
from urllib.request import urlretrieve
from os import listdir, unlink, environ, c... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/Pillow/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:43.876385 | from os.path import join
from pythonforandroid.recipe import PyProjectRecipe
class PillowRecipe(PyProjectRecipe):
"""
A recipe for Pillow (previously known as Pil).
This recipe allow us to build the Pillow recipe with support for different
types of images and fonts. But you should be aware, that in ... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/aiohttp/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.186695 | """Build AIOHTTP"""
from typing import List
from pythonforandroid.recipe import CppCompiledComponentsPythonRecipe
class AIOHTTPRecipe(CppCompiledComponentsPythonRecipe): # type: ignore # pylint: disable=R0903
version = "3.8.3"
url = "https://pypi.python.org/packages/source/a/aiohttp/aiohttp-{version}.tar.gz"... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.504165 | from pythonforandroid.recipe import PyProjectRecipe, IncludedFilesBehaviour
from pythonforandroid.util import current_directory
from pythonforandroid import logger
from os.path import join
class AndroidRecipe(IncludedFilesBehaviour, PyProjectRecipe):
# name = 'android'
version = None
url = None
src_... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.607960 | '''
Android module
==============
'''
# legacy import
from android._android import * # noqa: F401, F403
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/sdl2/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.678925 | from pythonforandroid.bootstraps._sdl_common import SDLGradleBootstrap
class SDL2GradleBootstrap(SDLGradleBootstrap):
name = "sdl2"
recipe_depends = list(
set(SDLGradleBootstrap.recipe_depends).union({"sdl2"})
)
bootstrap = SDL2GradleBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/empty/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.679458 | from pythonforandroid.toolchain import Bootstrap
class EmptyBootstrap(Bootstrap):
name = 'empty'
recipe_depends = []
can_be_chosen_automatically = False
def assemble_distribution(self):
print('empty bootstrap has no distribute')
exit(1)
bootstrap = EmptyBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/qt/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.686688 | import sh
from os.path import join
from pythonforandroid.toolchain import (
Bootstrap, current_directory, info, info_main, shprint)
from pythonforandroid.util import ensure_dir, rmdir
class QtBootstrap(Bootstrap):
name = 'qt'
recipe_depends = ['python3', 'genericndkbuild', 'PySide6', 'shiboken6']
# th... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/_sdl_common/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.688189 | from os.path import join
from pythonforandroid.toolchain import Bootstrap
from pythonforandroid.util import ensure_dir
class SDLGradleBootstrap(Bootstrap):
name = "_sdl_common"
recipe_depends = []
def _assemble_distribution_for_arch(self, arch):
"""SDL bootstrap skips distribute_aars() - handle... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/sdl3/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.693554 | from pythonforandroid.bootstraps._sdl_common import SDLGradleBootstrap
class SDL3GradleBootstrap(SDLGradleBootstrap):
name = "sdl3"
recipe_depends = list(
set(SDLGradleBootstrap.recipe_depends).union({"sdl3"})
)
bootstrap = SDL3GradleBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/common/build/build.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.719558 | #!/usr/bin/env python3
from gzip import GzipFile
import hashlib
import json
from os.path import (
dirname, join, isfile, realpath,
relpath, split, exists, basename
)
from os import environ, listdir, makedirs, remove
import os
import shlex
import shutil
import subprocess
import sys
import tarfile
import tempfil... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/_ctypes_library_finder.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.806084 |
import sys
import os
def get_activity_lib_dir(activity_name):
from jnius import autoclass
# Get the actual activity instance:
activity_class = autoclass(activity_name)
if activity_class is None:
return None
activity = None
if hasattr(activity_class, "mActivity") and \
act... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/bootstraps/service_only/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:44.834629 | from pythonforandroid.toolchain import Bootstrap
class ServiceOnlyBootstrap(Bootstrap):
name = 'service_only'
recipe_depends = list(
set(Bootstrap.recipe_depends).union({'genericndkbuild'})
)
bootstrap = ServiceOnlyBootstrap()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/activity.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.108356 | from jnius import PythonJavaClass, autoclass, java_method
from android.config import ACTIVITY_CLASS_NAME, ACTIVITY_CLASS_NAMESPACE
_activity = autoclass(ACTIVITY_CLASS_NAME).mActivity
_callbacks = {
'on_new_intent': [],
'on_activity_result': [],
}
class NewIntentListener(PythonJavaClass):
__javainterfac... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/loadingscreen.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.303885 |
from jnius import autoclass
from android.config import ACTIVITY_CLASS_NAME
def hide_loading_screen():
mActivity = autoclass(ACTIVITY_CLASS_NAME).mActivity
mActivity.removeLoadingScreen()
|
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/display_cutout.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.321558 | from jnius import autoclass
from kivy.core.window import Window
from android import mActivity
__all__ = ('get_cutout_pos', 'get_cutout_size', 'get_width_of_bar',
'get_height_of_bar', 'get_size_of_bar', 'get_width_of_bar',
'get_cutout_mode')
def _core_cutout():
decorview = mActivity.getWind... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/permissions.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.323522 | import threading
try:
from jnius import autoclass, PythonJavaClass, java_method
except ImportError:
# To allow importing by build/manifest-creating code without
# pyjnius being present:
def autoclass(item):
raise RuntimeError("pyjnius not available")
from android.config import ACTIVITY_CLASS_... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/broadcast.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.341097 | # -------------------------------------------------------------------
# Broadcast receiver bridge
import logging
from jnius import autoclass, PythonJavaClass, java_method
from android.config import JAVA_NAMESPACE, JNI_NAMESPACE, ACTIVITY_CLASS_NAME, SERVICE_CLASS_NAME
logger = logging.getLogger("BroadcastReceiver")
lo... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/mixer.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.342723 | # This module is, as much a possible, a clone of the pygame
# mixer api.
import android._android_sound as sound
import time
import threading
import os
condition = threading.Condition()
def periodic():
for i in range(0, num_channels):
if i in channels:
channels[i].periodic()
num_channels = ... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/runnable.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.380695 | '''
Runnable
========
'''
from jnius import PythonJavaClass, java_method, autoclass
from android.config import ACTIVITY_CLASS_NAME
# Reference to the activity
_PythonActivity = autoclass(ACTIVITY_CLASS_NAME)
# Cache of functions table. In older Android versions the number of JNI references
# is limited, so by cachin... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/storage.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.413504 | from jnius import autoclass, cast
import os
from android.config import ACTIVITY_CLASS_NAME, SERVICE_CLASS_NAME
Environment = autoclass('android.os.Environment')
File = autoclass('java.io.File')
def _android_has_is_removable_func():
VERSION = autoclass('android.os.Build$VERSION')
return (VERSION.SDK_INT >= ... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/android/touch.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.595620 | """Touch interception helpers for Python for Android.
This module exposes two utilities to hook into the Android SDL surface's
intercept touch mechanism via pyjnius:
- `OnInterceptTouchListener`: a thin bridge class that implements the
Java interface `SDLSurface.OnInterceptTouchListener` and delegates to a
provid... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/android/src/setup.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.663551 | from setuptools import setup, Extension
from Cython.Build import cythonize
import os
library_dirs = os.environ['ANDROID_LIBS_DIR'].split(":")
lib_dict = {
'sdl2': ['SDL2', 'SDL2_image', 'SDL2_mixer', 'SDL2_ttf'],
'sdl3': ['SDL3', 'SDL3_image', 'SDL3_mixer', 'SDL3_ttf'],
}
sdl_libs = lib_dict.get(os.environ['BO... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/apsw/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:45.714150 | from pythonforandroid.recipe import PyProjectRecipe
class ApswRecipe(PyProjectRecipe):
version = '3.50.4.0'
url = 'https://github.com/rogerbinns/apsw/releases/download/{version}/apsw-{version}.tar.gz'
depends = ['sqlite3']
site_packages_name = 'apsw'
def get_recipe_env(self, arch, **kwargs):
... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/atom/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:46.208120 | from pythonforandroid.recipe import PyProjectRecipe
class AtomRecipe(PyProjectRecipe):
site_packages_name = "atom"
version = "0.11.0"
url = "https://files.pythonhosted.org/packages/source/a/atom/atom-{version}.tar.gz"
depends = ["setuptools"]
patches = ["pyproject.toml.patch"]
recipe = AtomRecip... |
kivy/python-for-android | https://github.com/kivy/python-for-android | null | null | null | null | 8,873 | null | null | mit | null | null | null | null | null | null | null | pythonforandroid/recipes/argon2-cffi/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:46.394128 | from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class Argon2Recipe(CompiledComponentsPythonRecipe):
version = '20.1.0'
url = 'git+https://github.com/hynek/argon2-cffi'
depends = ['setuptools', 'cffi']
call_hostpython_via_targetpython = False
build_cmd = 'build'
def get_reci... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_train.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.846729 | from imageai.Detection.Custom import DetectionModelTrainer
trainer = DetectionModelTrainer()
trainer.setModelTypeAsYOLOv3()
trainer.setDataDirectory(data_directory="hololens")
trainer.setTrainConfig(object_names_array=["hololens"], batch_size=4, num_experiments=200, train_from_pretrained_model="yolov3.pt")
#download p... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.848190 | from imageai.Detection.Custom import CustomObjectDetection
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/download/3.0.0-pretrained/yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt
... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_from_array_extract_objects_array.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.851518 | from imageai.Detection.Custom import CustomObjectDetection
import cv2
image_array = cv2.imread("holo2.jpg")
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/download/3.0.0-pretra... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_from_file_extract_objects_array.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.853261 | from imageai.Detection.Custom import CustomObjectDetection
import cv2
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/download/3.0.0-pretrained/yolov3_hololens-yolo_mAP-0.82726_... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_array_input_output.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.859936 | from imageai.Detection.Custom import CustomObjectDetection
import cv2
image_array = cv2.imread("holo2.jpg")
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/download/3.0.0-pretra... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_extract_objects.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.864427 | from imageai.Detection.Custom import CustomObjectDetection
detector = CustomObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/download/3.0.0-pretrained/yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt
... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/camera_feed_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.868988 | from imageai.Detection import VideoObjectDetection
import os
import cv2
execution_path = os.getcwd()
camera = cv2.VideoCapture(0)
detector = VideoObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath(os.path.join(execution_path , "yolov3.pt")) # Download the model via this link https://github.com/O... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_model_training.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.869856 | from imageai.Classification.Custom import ClassificationModelTrainer
model_trainer = ClassificationModelTrainer()
model_trainer.setModelTypeAsResNet50()
model_trainer.setDataDirectory("idenprof")
model_trainer.trainModel(num_experiments=200, batch_size=32)
|
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_model_prediction.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:48.886893 | from imageai.Classification.Custom import CustomImageClassification
import os
execution_path = os.getcwd()
prediction = CustomImageClassification()
prediction.setModelTypeAsResNet50()
prediction.setModelPath(os.path.join(execution_path, "resnet50-idenprof-test_acc_0.78200_epoch-91.pt")) # Download the model via this ... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/custom_detection_video.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:49.722101 | from imageai.Detection.Custom import CustomVideoObjectDetection
import os
execution_path = os.getcwd()
video_detector = CustomVideoObjectDetection()
video_detector.setModelTypeAsYOLOv3()
video_detector.setModelPath("yolov3_hololens-yolo_mAP-0.82726_epoch-73.pt") # https://github.com/OlafenwaMoses/ImageAI/releases/dow... |
OlafenwaMoses/ImageAI | https://github.com/OlafenwaMoses/ImageAI | null | null | null | null | 8,868 | null | null | mit | null | null | null | null | null | null | null | examples/image_custom_object_detection.py | null | null | null | null | null | null | Python | 2026-05-04T02:07:50.060776 | from imageai.Detection import ObjectDetection
import os
from time import time
execution_path = os.getcwd()
detector = ObjectDetection()
detector.setModelTypeAsYOLOv3()
detector.setModelPath( os.path.join(execution_path , "yolov3.pt")) # Download the model via this link https://github.com/OlafenwaMoses/ImageAI/release... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.