项目愿景:
文档状态:
-
版本: [例如:1.0]
-
最后更新: [例如:2025-09-20]
############################### | |
# Git Line Endings # | |
############################### | |
# Set default behaviour to automatically normalize line endings. | |
* text=auto | |
# Force batch scripts to always use CRLF line endings so that if a repo is accessed | |
# in Windows via a file share from Linux, the scripts will work. | |
*.{cmd,[cC][mM][dD]} text eol=crlf |
import subprocess | |
from AppKit import NSSpeechSynthesizer | |
import time | |
def text_to_speech(sentence: str): | |
voice_identifier = "com.apple.voice.premium.zh-CN.Han" | |
synthesizer = NSSpeechSynthesizer.alloc().initWithVoice_(voice_identifier) | |
if synthesizer is None: | |
print(f"Error: Failed to initialize speech synthesizer with voice '{voice_identifier}'.") |
void hexprint(void *buf, size_t s) { | |
unsigned char *byte = (unsigned char *)buf; | |
for (size_t i = 0; i < s; i++) { | |
if (i % 16 == 0 && i != 0) { | |
printf(" |"); | |
for (size_t j = i - 16; j < i; j++) { | |
printf("%c", (byte[j] >= 32 && byte[j] <= 126) ? byte[j] : '.'); | |
} | |
printf("|\n"); |
root = true | |
[*.{c,cc,cpp,cs,h,hpp,lua,py,js,ts,go}] | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true | |
indent_style = space | |
indent_size = 4 | |
max_line_length = 120 |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import json | |
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler): | |
def do_POST(self): | |
# Get the size of data | |
content_length = int(self.headers['Content-Length']) | |
post_data = self.rfile.read(content_length).decode('utf-8') |
from queue import Queue | |
import sys | |
import time | |
from PyQt6.QtCore import QSize, Qt, QObject, pyqtSlot, QThread, pyqtSignal | |
from PyQt6.QtGui import QTextCursor | |
from PyQt6.QtWidgets import QApplication, QMainWindow, QPushButton, QTextEdit, QVBoxLayout, QHBoxLayout, QWidget | |
class WriteStream(object): |
#!/usr/bin/env python3 | |
import os | |
import sys | |
import re | |
import pathlib | |
import logging | |
import click | |
import sh |
; 我同时使用MacOS和Windows工作,快捷键设置的主要目的是让两个系统的快捷键在键盘上的位置保持一致。 | |
; 这样切换系统敲击键盘时,我不需要调整我的肌肉记忆。 | |
; ! alt key(command key on macOS) | |
; # win key(option key on macOS) | |
; ^ ctrl key | |
; + shift key | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#Warn ; Enable warnings to assist with detecting common errors. |