この実装は、ファインマンのスカラー重力理論で必要となるテンソル量の組み合わせから、独立なスカラー量を生成するためのアルゴリズムです。
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
# Example usage | |
# uv run equ.py "\int_{0}^{\pi} \sin(x) dx = 2" -H 64 | |
def main(): | |
import argparse | |
parser = argparse.ArgumentParser(description='LaTeX数式を画像化してSIXEL表示') | |
parser.add_argument('equation', type=str, help='LaTeX形式の数式($記号は不要)') | |
parser.add_argument('--fontsize', type=int, default=12, help='フォントサイズ') | |
parser.add_argument('--dpi', type=int, default=300, help='画像解像度(DPI)') | |
parser.add_argument('--color', type=str, default='white', help='文字色') |
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
all: | |
rm -f _output.mp4 | |
for mp4 in *.mp4; do echo file $$mp4; done > list.txt | |
ffmpeg -f concat -i list.txt -c copy _output.mp4 | |
ifdef NO | |
NEXT_NO := $(shell echo $$(printf "%02d" $$((10#$(NO) + 1)))) | |
endif | |
last: |
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 argparse, sys, glob, io | |
from PIL import Image | |
parser = argparse.ArgumentParser(description='Process an image with a language model.') | |
parser.add_argument('image_path', type=str, nargs='+', help='Path to the image file') | |
parser.add_argument('--translate', type=str, default='', help='Translate the response to the specified language (e.g. Japanese)') | |
parser.add_argument('--model', type=str, default='', help='Model to use (e.g. aya-expanse)') | |
parser.add_argument('--shrink', type=int, default=None, help='Maximum size of the image to shrink (e.g. 640)') | |
args = parser.parse_args() | |
if args.translate and not args.model: |
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
Model | Target | Dim | Rank | Similarity | Line | Text | |
---|---|---|---|---|---|---|---|
TaylorAI/bge-micro-v2 | 楽器について | 384 | 1 | 0.96016 | 1243 | 私について父に何も言わないでください。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 2 | 0.92611 | 3624 | プラタパディティヤはこの件についてこれ以上異議を唱えなかった。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 3 | 0.92270 | 829 | この件について、私がどのように推測できるでしょうか?」 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 4 | 0.91973 | 3314 | シータラームの冗談については、他にも何百もの話がある。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 5 | 0.91585 | 1988 | 「さあ、私について来なさい」と言った。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 6 | 0.91575 | 258 | 大臣は「あなたの叔父についてです」と言いました。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 7 | 0.91552 | 5012 | 息をついて言った。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 8 | 0.91191 | 4579 | ウダヤディティヤはため息をついて言った。 | |
TaylorAI/bge-micro-v2 | 楽器について | 384 | 9 | 0.91052 | 2477 | 他には誰もできない。」 |
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 os | |
import google.generativeai as genai | |
genai.configure(api_key=os.environ["GEMINI_API_KEY"]) | |
generation_config = { | |
"temperature": 1, | |
"top_p": 0.95, | |
"top_k": 40, | |
"max_output_tokens": 8192, |
動作保証できかねます。使用は自己責任で。
本家
フォーク(スクリプトから使用)
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
model = "cagliostrolab/animagine-xl-3.1" | |
vae = "madebyollin/taesdxl" | |
lcm_lora = "../lcm-lora/lcm-animagine-3.safetensors" | |
prompt = "1girl, original, eating pizza" | |
negative_prompt = "nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract]" | |
import argparse | |
argparser = argparse.ArgumentParser() | |
argparser.add_argument("--dml", action="store_true") |
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 argparse | |
parser = argparse.ArgumentParser(description='Process text file and create tensor embeddings') | |
parser.add_argument('textfile', help='Input text file path') | |
parser.add_argument('--ollama', action='store_true', help='Use Ollama') | |
arg = parser.parse_args() | |
import os, torch, safetensors.torch | |
from tqdm import tqdm |
NewerOlder