Skip to content

Instantly share code, notes, and snippets.

View SomeBottle's full-sized avatar
😇
Drowning in the ocean of knowledge.

SomeBottle SomeBottle

😇
Drowning in the ocean of knowledge.
View GitHub Profile
@SomeBottle
SomeBottle / Dockerfile
Last active July 29, 2025 05:08
My JupyterLab Docker Container for Research Experiments
#FROM bitnami/python:3.11.11
FROM docker.1ms.run/bitnami/python:3.11.11
# 【可配置环境变量】
# JUPYTER_PASSWORD: Jupyter 登录密码,不配置的话默认是随机字串
# JUPYTER_WORKDIR: 工作目录,默认是 /app
# JUPYTER_PORT: Jupyter 端口,默认是 9527
ENV JUPYTER_WORKDIR="/app" \
JUPYTER_CONF_DIR="/home/somebottle/.jupyter" \
@SomeBottle
SomeBottle / web_api.py
Created April 9, 2025 09:46
Deepseek VL2 Web API (Modified based on web_demo.py from the official repo)
# Copyright (c) 2023-2024 DeepSeek.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@SomeBottle
SomeBottle / instruction.md
Created January 26, 2025 17:43
Alternative to Docker in Google Colab: Apptainer
@SomeBottle
SomeBottle / custom_matplotlib_fonts.ipynb
Created November 23, 2024 05:05
Custom CJK font for matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SomeBottle
SomeBottle / original_glyph_to_uni.json
Created October 18, 2024 08:01
Source Han Sans SC 字体中所有基本汉字字形的 SHA-1 哈希与 Unicode 码点的映射
This file has been truncated, but you can view the full file.
{"uni65AF": "uni2E9F", "uni7403": "uni2EA0", "uni7EA6": "uni2EC5", "uni539F": "uni2EC6", "uni8F6F": "uni2ECB", "uni793A": "uni2ED3", "uni7B97": "uni2ED4", "uni88AB": "uni2ED8", "uni4FA7": "uni2EDA", "uni4F17": "uni2EDB", "uni79FB": "uni2EDD", "uni63CF": "uni2EE2", "uni54C1": "uni2EE3", "uni65AD": "uni2EE9", "uni51CF": "uni2F00", "uni7A7A": "uni2F04", "uni7597": "uni2F06", "uni6362": "uni2F08", "uni589E": "uni2F09", "uni6253": "uni2F0A", "uni7F51": "uni2F0F", "uni5185": "uni2F12", "uni706F": "uni2F17", "uni6C42": "uni2F1C", "uni7EA4": "uni2F1D", "uni522B": "uni2F1F", "uni7528": "uni2F20", "uni505A": "uni2F24", "uni57F9": "uni2F25", "uni8BAD": "uni2F26", "uni809D": "uni2F29", "uni54CD": "uni2F2D", "uni7ED3": "uni2F2F", "uni79BB": "uni2F30", "uni57CE": "uni2F32", "uni5740": "uni2F34", "uni5224": "uni2F3C", "uni6D4B": "uni2F3E", "uni5047": "uni2F3F", "uni4E00": "uni2F40", "uni52A0": "uni2F42", "uni4E70": "uni2F43", "uni6392": "uni2F45", "uni8840": "uni2F46", "uni5DE5": "uni2F47", "uni544A": "uni2F49", "uni50A8":
@SomeBottle
SomeBottle / 2022-lanqiao-final-leftRightShift.cpp
Created February 9, 2023 05:19
2022蓝桥杯国赛B组-左移右移
#include <cstdio>
using namespace std;
// 链表节点
typedef struct Node
{
int data;
Node *prev; // 指向前一个节点
Node *next; // 指向后一个节点
@SomeBottle
SomeBottle / basic-19.cpp
Created November 22, 2022 10:31
【错误题解】蓝桥杯VIP基础-完美的代价
/*
题目链接:https://www.dotcpp.com/oj/problem1467.html
注意!这是错误题解,有一个测试例可以造成死循环:
7
ewfwsea
*/
#include <cstdio>
#include <vector>
using namespace std;
@SomeBottle
SomeBottle / bilibili_caputure.js
Created November 4, 2022 05:53
bilibili截图油猴脚本
// ==UserScript==
// @name B站视频截图
// @namespace http://tampermonkey.net/
// @version 0.1.7
// @description 视频一键截图
// @author Bleu_Bleine
// @match https://www.bilibili.com/*
// @match https://live.bilibili.com/*
// @grant none
// @require https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js
@SomeBottle
SomeBottle / test.js
Last active September 6, 2022 09:50
RCON TEST
const Rcon = require('rcon');
var conn = new Rcon('127.0.0.1', 25575, '123456');
conn.on('auth', function () {
// You must wait until this event is fired before sending any commands,
// otherwise those commands will fail.
console.log("Authenticated");
console.log("Sending command: help")
conn.send("help");
}).on('response', function (str) {