私立PDD図書館・百科辞書のLZHファイルをapi.pyと同じディレクトリに置いて展開し、以下のような配置にしてください。
.
├── api.py
├── a
│ ├── あ
│ ├── い
│ ├── う
私立PDD図書館・百科辞書のLZHファイルをapi.pyと同じディレクトリに置いて展開し、以下のような配置にしてください。
.
├── api.py
├── a
│ ├── あ
│ ├── い
│ ├── う
| import io | |
| import json | |
| import os | |
| import re | |
| import sys | |
| import time | |
| from datetime import datetime | |
| import requests as req | |
| from PIL import Image, ImageDraw, ImageFont |
| #!/usr/bin/env python3 | |
| """ | |
| Chousei-chan: 調整さんの日付一覧を生成するスクリプト | |
| # 必要なもの | |
| - Python 3.9 以上 | |
| - Click (pip で入れてください) |
| import time | |
| from datetime import datetime | |
| from email.utils import parsedate | |
| # pip install requests beautifulsoup4 | |
| import requests | |
| from bs4 import BeautifulSoup as BS | |
| last = None |
| ROOT=~/.pyenv/versions/3.9.1 | |
| VENV_ROOT=$ROOT | |
| cmake \ | |
| -D CMAKE_BUILD_TYPE=RELEASE \ | |
| -D CMAKE_INSTALL_PREFIX=$VENV_ROOT \ | |
| -D INSTALL_C_EXAMPLES=OFF \ | |
| -D BUILD_NEW_PYTHON_SUPPORT=ON \ | |
| -D BUILD_opencv_java=OFF \ | |
| -D BUILD_opencv_python2=OFF \ |
| #!/usr/bin/env python3 | |
| import fileinput, sys | |
| from dataclasses import dataclass | |
| @dataclass | |
| class Style: | |
| start: int | |
| patch: dict |
| import time | |
| from datetime import datetime | |
| from email.utils import parsedate | |
| import requests | |
| last = None | |
| while True: |
| // From: https://stackoverflow.com/questions/12040303/how-to-access-physical-addresses-from-user-space-in-linux | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <fcntl.h> | |
| #include <sys/mman.h> | |
| #include <unistd.h> | |
| int main(int argc, char *argv[]) { | |
| if (argc < 3) { |
| # Runs on Python 3.8 + Pillow | |
| # Should run also on Python 3.7+ | |
| from pathlib import Path | |
| from PIL import Image, ImageOps, ImageFilter | |
| def main(): | |
| Path('./stroked').mkdir(exist_ok=True) |
| #!/usr/bin/env python3 | |
| # atsumorizer - resize and posterize square image into ACNH-compatible one | |
| import json | |
| import click | |
| from more_itertools import collapse | |
| from PIL import Image, ImageDraw, ImageFont |