Skip to content

Instantly share code, notes, and snippets.

@ChenyangGao
ChenyangGao / libgen_search.py
Last active April 9, 2024 07:32
libgen (library genius) 工具集
#!/usr/bin/env python3
# encoding: utf-8
"libgen.rs 搜索信息罗列"
__author__ = "ChenyangGao <https://chenyanggao.github.io>"
__version__ = (0, 0, 1)
__all__ = ["search", "info", "get_downlinks", "get_downlink_from_libgenli"]
if __name__ == "__main__":
@ChenyangGao
ChenyangGao / youtube_videos.py
Last active April 4, 2024 04:43
Youtube 工具集
#!/usr/bin/env python3
# coding: utf-8
__author__ = "ChenyangGao <https://chenyanggao.github.io>"
__all__ = ["video_iter"]
__version__ = (0, 0, 1)
if __name__ == "__main__":
from argparse import ArgumentParser
@ChenyangGao
ChenyangGao / salttiger.py
Last active June 1, 2024 12:50
采集盐虎的电子书网站的文章 https://salttiger.com
#!/usr/bin/env python3
# coding: utf-8
"salttiger.com 文章采集"
__version__ = (0, 0, 3)
__author__ = "ChenyangGao <https://github.com/ChenyangGao>"
__all__ = [
"get_archive_list", "get_archive_detail", "update_archives", "update_json_db",
"update_sqlite_db", "sqlite_to_json", "json_to_sqlite"
@ChenyangGao
ChenyangGao / web-115-302.py
Last active May 31, 2024 04:38
获取 115 文件信息和 302 下载链接
#!/usr/bin/env python3
# encoding: utf-8
"获取 115 文件信息和下载链接"
__author__ = "ChenyangGao <https://chenyanggao.github.io>"
__version__ = (0, 0, 3)
if __name__ == "__main__":
from argparse import ArgumentParser, RawTextHelpFormatter
@ChenyangGao
ChenyangGao / qrcode_cookie_115
Last active July 19, 2024 03:01
115扫码登录,可选择 app,获取 cookie
@ChenyangGao
ChenyangGao / unihan.py
Created October 14, 2023 06:22
Unihan (UNICODE HAN DATABASE) Character Information Query Tool
#!/usr/bin/env python3
# coding: utf-8
"""Unihan (UNICODE HAN DATABASE) Character Information Query Tool
Latest version:
- https://www.unicode.org/reports/tr38/
Unihan source:
- https://www.unicode.org/Public/UCD/latest/ucd/Unihan.zip
- https://www.unicode.org/Public/UCD/latest/ucd/
@ChenyangGao
ChenyangGao / alist.sh
Last active July 15, 2024 07:05
在服务器部署alist和clouddrive(原来只支持openwrt,现在已通用)
#!/usr/bin/env bash
# current_shell_rcfile() {
# if [ -n "$BASH_VERSION" ]; then
# printf "%s\n" ~/.bashrc
# elif [ -n "$ZSH_VERSION" ]; then
# printf "%s\n" ~/.zshrc
# elif [ -n "$FISH_VERSION" ]; then
# printf "%s\n" ~/.config/fish/config.fish
# elif [ -n "$XONSH_VERSION" ]; then
@ChenyangGao
ChenyangGao / usepip.py
Created June 20, 2023 06:15
This module supports the convenient use of `pip` in code, not just on the command line.
#!/usr/bin/env python3
# coding: utf-8
# Reference:
# https://docs.python.org/3/installing/index.html
# https://packaging.python.org/tutorials/installing-packages/
# https://pip.pypa.io/en/stable/
__author__ = 'ChenyangGao <https://chenyanggao.github.io/>'
__version__ = (0, 0, 6)
@ChenyangGao
ChenyangGao / numsign.py
Created January 21, 2023 08:30
提供一些函数,做一些有关数字正负号相关的事情
#!/usr/bin/env python3
# coding: utf-8
"""这个模块提供了一些函数,做一些有关数字正负号相关的事情。
"""
__author__ = "ChenyangGao <https://chenyanggao.github.io/>"
__version__ = (0, 0, 1)
__all__ = [
"sign", "sign2", "turnsign", "bysign", "bysign1",
@ChenyangGao
ChenyangGao / pandas_to_excel_bytes.py
Created September 8, 2022 08:49
把pandas的DataFrame转化成Excel格式的字节数据
#!/usr/bin/env python3
# coding: utf-8
"""这个模块提供了工具函数,可以把 `pandas` 的 `DataFrame` 转换成
xlsx 格式的 Excel 文件的二进制数据
"""
__author__ = "ChenyangGao <https://chenyanggao.github.io/>"
__version__ = (0, 1)
__all__ = ["df_to_excel_bytes", "sql_to_excel_bytes"]