POST http://bearybot.herokuapp.com/
Content-Type: application/json
{
"text": "lilei 你好呀"
}
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
| _FUNCS = {} | |
| def register(name): | |
| def wrap(func): | |
| global _FUNCS | |
| if name not in _FUNCS: | |
| _FUNCS[name] = func | |
| else: | |
| raise ValueError("name `{}` is already registered!".format(name)) |
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 matplotlib.pyplot as plt | |
| plt.style.use('ggplot') | |
| plt.rcParams['font.sans-serif'] = ['WenQuanYi Micro Hei'] | |
| plt.rcParams['legend.fontsize'] = 14 | |
| group_names = ['不依赖其他条目', '依赖其他条目'] | |
| group_size = [24, 40] | |
| subgroup_names = ['', '1个', '2个', '3个', '4个', '5个', '9个', '13个'] | |
| subgroup_size = [24, 15, 13, 5, 3, 2, 1, 1] |
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
| (add-to-list 'org-roam-capture-templates `("p" "Person" plain (function org-roam-capture--get-point) | |
| ,(concat "* 基本信息\n\n" | |
| " - 性别: %?\n" | |
| " - 生日: \n" | |
| " - 籍贯: \n" | |
| " - 教育经历:\n" | |
| " - 工作经历:\n" | |
| " - 家人:\n" | |
| " - 居住地址:\n" | |
| " - 联系方式:\n\n - 手机:\n - 微信:\n - 邮箱:\n" |
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 click | |
| @click.command() | |
| @click.option("--age", type=int, default=24, help="你当前的年龄") | |
| @click.option("--asset", type=float, default=0, help="上一年年末总资产") | |
| @click.option("--salary", type=float, default=200000, help="预计今年年工作收入") | |
| @click.option("--salary-rate", type=float, default=0.1, help="预计工作收入年增长率") | |
| @click.option("--invest", type=float, default=10000, help="预计今年投资收入") | |
| @click.option("--invest-rate", type=float, default=0.1, help="预计投资收入年增长率") | |
| @click.option("--expense", type=float, default=90000, help="预计今年支出") |
- 登录蛋卷基金网页版:https://danjuanapp.com/
- 打开浏览器 DevTools 的 Network 面板,刷新页面后,在 Network 面板点开任意一个返回结果为 json 类型的请求,复制
请求Cookie中的内容到config.json中
- 执行
python danjuan_exporter.py -c config.json -o orders.json
-
登录 B 站
-
打开浏览器 DevTools 的 Network 面板,刷新页面后,在 Network 面板点开任意一个返回结果为 json 类型的请求,复制
请求Cookie中的内容到cookies.json中 -
执行脚本导出数据
python export_bili_history.py -c cookies.json -o results.jsonl -p 10
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 re | |
| import json | |
| import argparse | |
| from urllib.parse import unquote_plus | |
| import requests | |
| from lxml import html |
使用示例:
python playgpt.py --model gpt-3.5-turbo \
--proxy 'http://localhost:8888' \
--max-tokens 10 \
--top-logprobs 3 \
--result-num 10 \
--temperature 0 \
--prompt '起一个女性名字,姓刘,名字要和月亮有关,但不要直接用月字,尝试根据一些古诗词里的典故,使用较常见而不是冷僻的字,只输出名字无需其他。结果是:刘'OlderNewer
