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
9月 08 13:50:02 home-router open-webui[140332]: INFO [open_webui.apps.openai.main] get_all_models() | |
9月 08 13:50:08 home-router open-webui[140332]: ERROR [open_webui.apps.openai.main] Connection error: | |
9月 08 13:50:08 home-router open-webui[140332]: ERROR [open_webui.apps.openai.main] Connection error: | |
9月 08 13:50:08 home-router open-webui[140332]: ERROR [open_webui.apps.openai.main] Connection error: | |
9月 08 13:50:08 home-router open-webui[140332]: DEBUG [open_webui.apps.openai.main] get_all_models:responses() [None, None, None] | |
9月 08 13:50:08 home-router open-webui[140332]: DEBUG [open_webui.apps.openai.main] merge_models_lists <map object at 0x7f6cad8365c0> | |
9月 08 13:50:08 home-router open-webui[140332]: DEBUG [open_webui.apps.openai.main] models: {'data': []} | |
9月 08 13:50:08 home-router open-webui[140332]: INFO [open_webui.apps.openai.main] get_all_models() | |
9月 08 13:50:10 home-router open-webui[140332]: DEBUG [open_webui.main] Commit session after request | |
9月 08 13:50:10 home-router open-webui[140332]: INFO: |
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
INFO: 10.40.10.1:0 - "POST /api/chat/completed HTTP/1.0" 500 Internal Server Error | |
ERROR: Exception in ASGI application | |
+ Exception Group Traceback (most recent call last): | |
| File "/nix/store/ivmgz1axqf7i0vr1pbm5r4i0hb01an0h-python3.12-starlette-0.37.2/lib/python3.12/site-packages/starlette/_utils.py", line 87, in collapse_excgroups | |
| yield | |
| File "/nix/store/ivmgz1axqf7i0vr1pbm5r4i0hb01an0h-python3.12-starlette-0.37.2/lib/python3.12/site-packages/starlette/middleware/base.py", line 190, in __call__ | |
| async with anyio.create_task_group() as task_group: | |
| File "/nix/store/3vg8ys3dm90a5bi692x3f2hza11b670d-python3.12-anyio-4.3.0/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 678, in __aexit__ | |
| raise BaseExceptionGroup( | |
| ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception) |
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
def f(x: int): | |
return x + 1 | |
a: int = "abc" | |
f(a) | |
def g(): | |
from collections import namedtuple |
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 nix-shell | |
#! nix-shell -p 'python3.withPackages (ps: with ps; [ msgspec ])' -i python3 | |
import msgspec | |
print('hello') |
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 nix-shell | |
#!nix-shell -i python --packages python311 python311Packages.pypdf2 | |
import PyPDF2 | |
def merge_pdfs(input_path_list: list[str], output_path: str): | |
pdfWriter = PyPDF2.PdfWriter() | |
for input_path in input_path_list: | |
pdf1 = PyPDF2.PdfReader(open(input_path, "rb")) |
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
{ | |
"files.trimTrailingWhitespace": true, | |
"python.languageServer": "Pylance", | |
"python.analysis.typeCheckingMode": "strict", | |
"python.analysis.diagnosticSeverityOverrides": { | |
"reportImportCycles": "warning", | |
"reportUnnecessaryComparison": "information", | |
"reportUnnecessaryIsInstance": "information", | |
"reportUnnecessaryContains": "information", | |
"reportUnusedImport": "information", |
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
#NOTE: not working yet, need debuging | |
{pkgs ? import <nixpkgs> {}, ...}: | |
pkgs.stdenv.mkDerivation rec { | |
pname = "popo"; | |
version = "3.56.1"; | |
src = pkgs.fetchurl { | |
url = "https://popo.netease.com/file/popolinux/popo_${version}_amd64_ubuntu.deb"; |
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
{ | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
inputs.flake-utils.url = "github:numtide/flake-utils"; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
hpkgs = pkgs.haskell.packages.ghc923; | |
in rec { |
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 nix-shell | |
#! nix-shell -p "expect" -i expect | |
#set timeout -1 | |
cd ~/ws/nixos | |
spawn nix repl | |
send ":lf .\n" |
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 -S bash -c 'nix-shell --pure $0 -A env' | |
# Usage: | |
# 1. run directly to enter bash (inside venv): `./venv-py37.nix` | |
# 2. build a standalone executable: `nix bundle -f ./venv-py37.nix` #this not works yet since it cause nested `unshare -U` call | |
# 3. run bash with extra arguments: `nix run -f ./venv-py37.nix '' -- -c 'python --version'` | |
# More: | |
# 1. commit id of nixpkgs can be found here: https://lazamar.co.uk/nix-versions/?channel=nixpkgs-unstable&package=python3 | |
let |
NewerOlder