这是简单地提取 人类生存发展与核科学 课件中文字的脚本。
适用于已经有笔记但担心考一些课件里边角的内容有觉得把课件全打下来太浪费的同学。
| termux-setup-storage | |
| apt install clang python python-dev fftw libzmq libzmq-dev freetype freetype-dev libpng libpng-dev pkg-config curl vim-python zsh | |
| sh -c "$(curl -fsSL https://github.com/Cabbagec/termux-ohmyzsh/raw/master/install.sh)" |
| from os import popen | |
| from sys import argv | |
| import subprocess | |
| from re import findall | |
| app_nickname = {'j': 'jupyter notebook --no-browser', | |
| 'd': 'grip', | |
| 'k': 'mkdocs serve'} |
| mode := 1 | |
| #c:: | |
| mode:=!mode ;not! toggle | |
| return | |
| #If mode ; All hotkeys below this line will only work if mode is TRUE | |
| j::1 | |
| k::2 | |
| l::3 |
这是简单地提取 人类生存发展与核科学 课件中文字的脚本。
适用于已经有笔记但担心考一些课件里边角的内容有觉得把课件全打下来太浪费的同学。
| // ==UserScript== | |
| // @name BDWM Block Board Modified | |
| // @version 2.0 | |
| // @description BDWM_BLOCK by motaguoke, modified by Allan Chain | |
| // @icon https://bbs.pku.edu.cn/favicon.ico | |
| // @include http://bbs.pku.edu.cn/* | |
| // @include https://bbs.pku.edu.cn/* | |
| // @include https://*.bdwm.net/* | |
| // @include http://*.bdwm.net/* | |
| // @homepageURL https://gist.github.com/AllanChain/50e2810d7abf54fe4fb09c175d5f00e7 |
| from bs4 import BeautifulSoup | |
| from pathlib import Path | |
| from dataclasses import dataclass | |
| import urllib.request | |
| import re | |
| from unicodedata import normalize | |
| from mutagen.mp3 import EasyMP3 | |
| DOWNLOAD_TEMPLATE = "http://music.163.com/song/media/outer/url?id=%s.mp3" |
| // ==UserScript== | |
| // @name ZhiHu Mobile | |
| // @version 1.0.2 | |
| // @description 知乎移动端修复 | |
| // @include https://www.zhihu.com/* | |
| // @include https://zhuanlan.zhihu.com/* | |
| // @grant GM_addStyle | |
| // @run-at document-start | |
| // ==/UserScript== |
| % | |
| % MpLtX --- a LaTeX Class for Modern Physics Lab | |
| % Copyright (C) 2013 Modern Phys. Lab, School of Phys., Peking Univ. | |
| % | |
| % MpLtX is a template for experiment report of Modern Physics Lab in | |
| % Peking University. This template depends on the "revtex4.2" package from | |
| % APS Journals <http://publish.aps.org/revtex/revtex-faq> | |
| % | |
| % To use this template, you should open the package download from APS Journals' | |
| % website as above and follow instructions from the README file in the package. |
| from pathlib import Path | |
| from zipfile import ZipFile | |
| PROJECT_ROOT = Path(__file__).parent.parent | |
| SRC_ROOT = PROJECT_ROOT / "src" | |
| DIST_ROOT = SRC_ROOT / "dist" | |
| DIST_ZIP = DIST_ROOT / "output.zip" | |
| FILE_INCLUDE = ["pkuphysu_wechat/**/*", "*.py", "bootstrap"] | |
| FILE_NAME_EXCLUDE = [".secrets.local.toml"] |
| import socket | |
| import urllib.request | |
| def get_out_ipv6(): | |
| s = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) | |
| s.connect(("2620:0:ccc::2", 80)) | |
| ipv6 = s.getsockname()[0] | |
| s.close() | |
| print(ipv6) | |
| return ipv6 |