Skip to content

Instantly share code, notes, and snippets.

View Wybxc's full-sized avatar
🏠
Working from home

Jiayi Zhuang Wybxc

🏠
Working from home
View GitHub Profile
import os
from gptpdf import parse_pdf
from GeneralAgent import Agent
import fire
def parse(
pdf_path: str,
output_dir: str = "./",
prompt: dict | None = None,
@Wybxc
Wybxc / voicefixer.yml
Created November 28, 2023 14:52
conda environment of voicefixer
name: voicefixer
channels:
- pytorch
- conda-forge
- microsoft
- defaults
dependencies:
- blas=1.0=mkl
- brotli-python=1.0.9=py37hf2a7229_7
- ca-certificates=2023.7.22=h56e8100_0
@Wybxc
Wybxc / MBTI.md
Created September 13, 2023 05:15
ChatGPT 测试 MBTI

User

假设你是一个接受心理测验的人,我会向你提出一系列问题,你要按照是否符合你的真实情况进行打分,从-3(完全不同意)到+3(完全同意),如果你明白了,请回复“好的”。

ChatGPT

好的,我已经明白了。请继续提出你的问题。

User

  1. You regularly make new friends.
  2. You spend a lot of your free time exploring various random topics that pique your interest.
  3. Seeing other people cry can easily make you feel like you want to cry too.
  4. You often make a backup plan for a backup plan.
@Wybxc
Wybxc / connect.py
Created August 30, 2023 06:49
connect to pku its
# -*- coding: utf-8 -*-
import requests
from loguru import logger
def connect() -> bool:
logger.debug("开始连接")
try:
url = "https://its4.pku.edu.cn/cas/ITSClient"
@Wybxc
Wybxc / 方差分析.ipynb
Created June 1, 2023 15:18
双因子方差分析计算器
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Wybxc
Wybxc / GitHub.md
Last active August 4, 2023 01:14
《你说得对》New Bing 精选集

你说的对,但是GitHub是由Tom Preston-Werner、Chris Wanstrath、PJ Hyett和Scott Chacon自主研发的一款基于Git的代码托管平台。它发生在一个被称作互联网的全球信息网络中,在这里,被注册为GitHub用户的人将被授予创建和管理仓库的权限,导引开源软件和协作开发。你将扮演一位名为your_username的开发者,创建或加入项目,和他们一起编写代码,找回bug——同时,逐步发掘GitHub社区的真相。

@Wybxc
Wybxc / chatgpt-api.py
Created March 14, 2023 08:17
Simple wrapper around OpenAI GPT3.5 api
from typing import Optional, Sequence, Tuple
import requests
import json
SYSTEM = "You are a helpful assistant."
def chat_complete(
*,
system: str = SYSTEM,
@Wybxc
Wybxc / DOI 协议解释.md
Last active February 27, 2023 11:44
ChatGPT 问答集锦

什么是 DOI 协议?


DOI 协议是数字对象标识符(Digital Object Identifier)的缩写,它是一种用于标识数字内容的标准。DOI 号是一种数字串,可用于识别、定位和引用数字对象,如学术论文、数据集、书籍、音频和视频文件等。

DOI 协议的主要作用是提供持久性标识符,确保数字对象能够长期访问和引用。这是因为数字对象可能会被移动、删除或更改,但通过 DOI 号,可以始终定位到原始的数字对象。

DOI 协议由国际DOI基金会(International DOI Foundation)维护,该基金会负责颁发和管理 DOI 号。各个领域的出版商、数据库提供商和数字库管理机构可以申请 DOI 号并将其分配给其所管理的数字对象。

@Wybxc
Wybxc / model_convert.py
Last active February 12, 2023 14:49
将 ChatRWKV 模型转为 TorchScript 版本
"""Convert RWKV PyTorch savepoint to TorchScript model.
"""
from typing import Final, List, Optional
import click
import torch
import torch.nn as nn
import torch.nn.functional as F
@Wybxc
Wybxc / aio.c
Created December 28, 2022 03:11
(WIP) an async/await library in C
#include "aio.h"
#include "queue.h"
#include "uthash/include/uthash.h"
#include <stdio.h>
#include <sys/epoll.h>
struct fd_to_promise {
int fd;
promise_t *promise;
UT_hash_handle hh;