| x | y | z |
|---|---|---|
| 1.00 | 1.00 | 1.41 |
| 1.00 | 1.25 | 1.60 |
| 1.00 | 1.50 | 1.80 |
| 1.00 | 1.75 | 2.02 |
| 1.00 | 2.00 | 2.24 |
| 1.00 | 2.25 | 2.46 |
| 1.00 | 2.50 | 2.69 |
| 1.00 | 2.75 | 2.93 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # linux | |
| **/lib | |
| **/lib32 | |
| **/lib64 | |
| **/usr/bin | |
| **/usr/sbin | |
| **/usr/lib | |
| **/usr/local/lib | |
| **/usr/local/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyannote.audio import Pipeline | |
| import torch | |
| pipeline = Pipeline.from_pretrained("pyannote/speaker-diarization-3.1", use_auth_token="...") | |
| import os | |
| import glob | |
| import torchaudio | |
| from pydub import AudioSegment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| workspace: | |
| image: panjojocom/py39-cuda-12.8.1-ubuntu-24.04-audio-torch | |
| container_name: workspace | |
| volumes: | |
| - ./workspace:/workspace | |
| ports: | |
| - 8080:8080 | |
| - 8000:8000 | |
| - 5050:5050 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 下載 youtube 字幕按鈕 | |
| // 建立一個下載字幕的按鈕 | |
| const downloadButton = document.createElement('a'); | |
| var yt = ytInitialPlayerResponse['captions']; | |
| // 字幕語言列表物件,這物件需讀取過,才會將字幕 url 讀取,通過 token | |
| // yt.playerCaptionsTracklistRenderer.captionTracks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 懶得裝 zsh 跟整套 oh my 時,塞上去 bash 版本 | |
| _my_ssh_autocomplete() { | |
| local cur=${COMP_WORDS[COMP_CWORD]} | |
| if [[ $cur =~ ^[0-9]{1,3}$ ]]; then | |
| local full_ip="[email protected].${cur}" | |
| COMPREPLY=( $(compgen -W "$full_ip" -- "$cur") ) | |
| fi | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, BitsAndBytesConfig | |
| from datasets import Dataset | |
| from torch.cuda.amp import autocast | |
| import json | |
| import glob | |
| import os |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, BitsAndBytesConfig | |
| import json | |
| import os | |
| model_path = "/workspace/Qwen3-0.6B" | |
| fine_tune_path = "/workspace/4bit-train" | |
| per_device_train_batch_size=3 | |
| learning_rate=5e-6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ollama import Client | |
| import json | |
| import re | |
| client = Client( | |
| host='http://ollama:11434', | |
| headers={'x-some-header': 'some-value'} | |
| ) | |
| f = open("text.txt", "r") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from bs4 import BeautifulSoup | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.common.by import By | |
| from time import sleep | |
| class WebCrawler: | |
| def __init__(self, default_url): | |
| self.driver = webdriver.Chrome() |
NewerOlder