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 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 |
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
#!/usr/bin/env python3 | |
""" | |
Chousei-chan: 調整さんの日付一覧を生成するスクリプト | |
# 必要なもの | |
- Python 3.9 以上 | |
- Click (pip で入れてください) |
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 time | |
from datetime import datetime | |
from email.utils import parsedate | |
# pip install requests beautifulsoup4 | |
import requests | |
from bs4 import BeautifulSoup as BS | |
last = None |
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
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 \ |
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
#!/usr/bin/env python3 | |
import fileinput, sys | |
from dataclasses import dataclass | |
@dataclass | |
class Style: | |
start: int | |
patch: dict |
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 time | |
from datetime import datetime | |
from email.utils import parsedate | |
import requests | |
last = None | |
while 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
// 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) { |
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
# 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) |
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
#!/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 | |
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
class 部屋: | |
def __init__(self): | |
self.elapsed = 0 | |
self.delta = 1000 | |
def 時を進める(self): | |
self.elapsed += self.delta | |
def 精神と時の部屋にする(self): |