Skip to content

Instantly share code, notes, and snippets.

View AeroXi's full-sized avatar
🎯
Focusing

John Wick AeroXi

🎯
Focusing
View GitHub Profile
---
version: "3.0"
services:
mongo:
image: mongo:latest
params:
storage:
data:
mount: /var/lib/mongodb
@AeroXi
AeroXi / txt2json.py
Created October 21, 2021 10:12
将txt转换为GPT2-Chinese的训练格式
import json
dic = {}
with open("train.txt", "r", encoding="utf8") as f:
merge_line = ""
for line in f:
line = line.strip()
merge_line += line
if len(merge_line) > 500:
dic[merge_line] = 1
@AeroXi
AeroXi / bot.py
Created September 26, 2019 15:17
家国梦自动收集金币和运送列车物资
from subprocess import run
from time import sleep
run(['adb devices'], shell=True)
# 打开USB调试
# 打开开发者选项——指针位置
# 将已开启的土地坐标填入 land
# 列车上物资的坐标填入 train
land = [
@AeroXi
AeroXi / screen_log
Created August 27, 2019 08:27
error log when pretrain on vcr
2019-08-26 21:17:42.954423: I tensorflow/core/common_runtime/bfc_allocator.cc:654] 2 Chunks of size 29364224 totalling 56.01MiB
2019-08-26 21:17:42.954434: I tensorflow/core/common_runtime/bfc_allocator.cc:654] 1 Chunks of size 29425664 totalling 28.06MiB
2019-08-26 21:17:42.954446: I tensorflow/core/common_runtime/bfc_allocator.cc:654] 1 Chunks of size 32751616 totalling 31.23MiB
2019-08-26 21:17:42.954458: I tensorflow/core/common_runtime/bfc_allocator.cc:654] 6 Chunks of size 125018112 totalling 715.36MiB
2019-08-26 21:17:42.954469: I tensorflow/core/common_runtime/bfc_allocator.cc:658] Sum Total of in-use chunks: 10.14GiB
2019-08-26 21:17:42.954485: I tensorflow/core/common_runtime/bfc_allocator.cc:660] Stats:
Limit: 10895235482
InUse: 10891294208
MaxInUse: 10891294208
NumAllocs: 4208