- https://twitter.com/lyrical_dolphin/status/1598498134338207744
- Please be aware WSL version to run from the task scheduler
This file contains 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
#!/usr/bin/env python3 | |
import argparse | |
import datetime | |
import json | |
import re | |
import threading | |
from http.server import BaseHTTPRequestHandler, HTTPServer | |
from pathlib import Path | |
import serial |
This file contains 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
#!/usr/bin/env python3 | |
import time | |
from datasets import load_dataset | |
while True: | |
try: | |
ds = load_dataset("reazon-research/reazonspeech", "all") | |
except Exception as e: |
This file contains 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
#!/usr/bin/env python3 | |
from transformers import AutoTokenizer | |
def main() -> None: | |
txt: str = "鯯を食べたい" | |
m1 = "rinna/japanese-gpt-neox-3.6b-instruction-ppo" |
I revolced the following warnings related to libnvinfer.so.7
and libnvinfer_plugin.so.7
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plugin.so.7: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: xxxxx
W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
This file contains 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
javascript:document.querySelector('button[aria-label="More options"]').click();new MutationObserver((m,o) => { const p = Array.from(document.querySelectorAll("span")).find( (el) => el.textContent === "Open picture-in-picture mode" ); if (p) { p.click(); o.disconnect(); }}).observe(document.getElementsByTagName("body")[0], { childList: true, subtree: true,}); |
This file contains 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
error: `NIN` should be `INN`, `MIN`, `BIN`, `NINE` | |
--> ./scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py:49:76 | |
| | |
49 | new_layer.query.weight.data = old_checkpoint[f"all_modules.{index}.NIN_0.W"].data.T | |
| ^^^ | |
| | |
error: `NIN` should be `INN`, `MIN`, `BIN`, `NINE` | |
--> ./scripts/convert_ncsnpp_original_checkpoint_to_diffusers.py:50:74 | |
| | |
50 | new_layer.key.weight.data = old_checkpoint[f"all_modules.{index}.NIN_1.W"].data.T |
This file contains 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
#!/usr/bin/env python3 | |
from pathlib import Path | |
import torch | |
from diffusers import StableDiffusionPipeline | |
from torch.amp.autocast_mode import autocast | |
def get_max_index(p: Path): | |
mx = 0 |
This file contains 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 csv | |
import fileinput | |
import sys | |
w = csv.writer(sys.stdout) | |
for cols in csv.reader(fileinput.input()): | |
w.writerow( | |
[cols[i] for i in [0, 1, 2, 3, 0, 4, 5, 6, 7, 8, 9, 11, 10]] | |
+ ["*", "*", "*", "*", "*"] |
This file contains 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
#!/usr/bin/env python3 | |
# CF: https://www.python.org/dev/peps/pep-0526/#class-and-instance-variable-annotations | |
# https://qiita.com/7shi/items/d37493c58a8bb8d7beed | |
# https://gammasoft.jp/blog/python-built-in-types/ | |
from typing import ClassVar, Dict | |
class MyClass: |
NewerOlder