Skip to content

Instantly share code, notes, and snippets.

View btquanto's full-sized avatar

To Bao Thien Quan btquanto

View GitHub Profile
@btquanto
btquanto / rosetta.js
Created October 18, 2022 06:35
Rosetta Translation API
import fetch from 'node-fetch';
import jwt from 'jsonwebtoken';
const contractId = 'your-contract-id';
const accessKey = 'your-access-key';
const secretKey = 'your-secret';
async function request(url, {method, headers, body}) {
console.log('------------------------------');
console.log(`${method}: ${url}`)
// ==UserScript==
// @name Novel Reader
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://metruyenchu.com/truyen/*/chuong*
// @match https://truyen.tangthuvien.vn/doc-truyen/*/chuong*
// @match https://www.novelpub.com/novel/*
// @match https://www.lightnovelpub.com/novel/*
@btquanto
btquanto / genshin_5_star_drop_rate_simulation.py
Last active October 12, 2021 20:37
Genshin Impact drop rate simulation reverse engineer
import os
from random import randint
SIMULATIONS = 1000000000
RATE = 6 # The base rate to get a 5* item is 0.6%
chances = dict([(i, 0) for i in range(1, 91)])
times = 0
for i in range(SIMULATIONS):