Skip to content

Instantly share code, notes, and snippets.

View reycn's full-sized avatar

Rongxin reycn

View GitHub Profile
@reycn
reycn / gist:416908a2ac68003a0aa23503e0e373d3
Created October 14, 2024 07:03
Sample Mean, Population Mean Visualization
library(ggplot2)
library(dplyr)
set.seed(1)
# 1. Define population parameters
n <- 1000 # Number of observations
mean <- 100 # Mean of the distribution
sd <- 10 # Standard deviation of the distribution
# 2. Generate data
import math
import os
import time
import numpy as np
import pandas as pd
import tiktoken
from openai import OpenAI
from pandarallel import pandarallel
from tqdm import tqdm
@reycn
reycn / env.yml
Last active June 28, 2024 07:51
LLaVA - H100
name: llava
channels:
- conda-forge
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- bzip2=1.0.8=hd590300_5
- ca-certificates=2024.6.2=hbcca054_0
- ld_impl_linux-64=2.40=hf3520f5_7
- libffi=3.4.2=h7f98852_5
@reycn
reycn / gpt-topic-set.csv
Last active October 27, 2023 08:08
gpt-topic-set
label text
0 ENTERTAINMENT The Manhattan Transfer's Tim Hauser Passes, Plus Chats With Gary Numan and John Bergin, Graham Colton and Rhett Walker
1 SPORTS 'These Are My Brothers'
2 SPORTS Novak Djokovic '50-50' On Whether To Play At Tokyo Olympics
3 SPORTS These Are The Parents We All Know From Little League Sidelines
4 SPORTS Richie Incognito, Miami Dolphins Reach Agreement On Suspension, Salary: REPORT
5 ENTERTAINMENT Gary Clark Jr. Puts The Beatles’ ‘Come Together’ Back On The Charts
6 ENTERTAINMENT Quincy Jones Redefines Shade With Comments On Taylor Swift's Music
7 SPORTS LeBron James Jr. Is Headed To A Sixth Straight NBA Finals
8 SPORTS Peyton Manning Calls Doping Allegations 'Complete Trash'
@reycn
reycn / gpt-emotion-set.csv
Last active October 26, 2023 09:26
gpt-emotion-set
label text
127 1 @MzVickie007 i just thought stay away from unknown at least for this bright Friday; its so wonderful outside-love Chi when its bright
101 1 @BubbleFreeze thanks for the #ff love...right back at you!
269 0 is that snow?
85 0 Today is soo HOTTTT.. why must I need to wear clothing?
61 0 @fitprosarah Looks like we will BOTH have to go tomorrow! She is tired from a trip 2 France.
10 1 peace, love, and cookies
19 0 I wonder?....will Gordon Brown ever run out of 'filched' sound-bites in his desperation to appear 'cool' ?
227 0 This weathers nt realy wht i wanted..........!!!!
39 1 ah i love you sweets
@reycn
reycn / reverse_character_ai.md
Created May 28, 2023 07:43 — forked from acheong08/reverse_character_ai.md
A guide on how to reverse engineer character.ai

Authentication:

  • Set cookies from your browser

Step 1: GET https://beta.character.ai/chat/curated_categories/characters/. It returns JSON. You are looking for external_id of the character you want. This will be used for all following steps (external_id or character_external_id)

Step 2: POST https://beta.character.ai/chat/character/info/ with {"external_id":"..."} as payload. Keep track of identifier from the response as tgt for step 4

Step 3: POST https://beta.character.ai/chat/history/create/ with the same payload as step 2. Keep track of external_id in the response as history_external_id.

@reycn
reycn / chatglm-openai-api.ipynb
Created April 21, 2023 07:04 — forked from ninehills/chatglm-openai-api.ipynb
chatglm-openai-api.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@reycn
reycn / openai.list
Last active March 25, 2023 08:13
openai.list
DOMAIN,openai.com
DOMAIN,api.openai.com
DOMAIN,chat.openai.com
DOMAIN,auth0.com
DOMAIN,hcaptcha.com
DOMAIN,recaptcha.net
DOMAIN,cloudflare.com
DOMAIN,sentry.io
DOMAIN,msftconnecttest.com
DOMAIN,bing.com
@reycn
reycn / autologin.py
Created September 1, 2018 14:11
五行代码登录深圳大学城(北大清华哈工大)校园网
# REQUIREMENTS: requests
# coding: utf-8
import requests
def login(username, password):
postdata = {'action':'login','username':username,'password':password,'ac_id':'1','user_ip':'','nas_ip':'','user_mac':'','save_me':'1','ajax':'1'}
print(requests.Session().post('http://10.0.10.66/include/auth_action.php', data=postdata).text)
login("YOUR_USERNAME","YOUR_PASSWORD")