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 / 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.
{"9d54c7eddd15ec31726b29f592430e47936c3efc":12032,"2540ae57553e3c3542668335cd21e6ccb4ed8ab2":19969,"878a66be9424c1da6738ca0d09dd538582cd41d2":19970,"118ba31cd91449d121f0469a2a647dfc6625b7e5":19971,"fe2b90646077c39fba114f88ac2d63b1923c6e5f":19972,"ea0f566843ecbddf7b0a9d215bffca33c15725ed":19973,"720760930a2f444665169e0b524c896769336348":19974,"be938217e8ea5e6965f9b99e54c4bfc41c859d70":19975,"8a7744c667afba4775d52e65f0c419990016bd23":19976,"e7f1ced4c6273859fad3fe2f5d0aec181291abfe":19977,"5cb1b6f51fbac5f78c8cc550614095ed68650f3f":19978,"55a178610fa82dc2e0b9fd3c752eb9ba71ca4d48":19979,"f24265507e45131a2c7b3f0c93ead25c530e8ba0":19980,"0450a4f34119fcb0655cb742ad0f4cc2f0f552dc":19981,"f63c174636a2c29b9914cca6e981f4426a6c51b8":19982,"a0c5d30a57d0b2e50765b1190e9fa51b4183deb6":19983,"491615a9dc790d5b15d18bf7f2ff1949ae56a541":19984,"53054ea486228f97a1e1dea34561fc54f542a0bc":19985,"7efcec7e16bdad5da8b331f72328c9412a7690e2":19986,"c3a2402cc6fc8018c271d2d3fea756808bd90c22":19987,"c196a2f379a6e60980c5097b96b330025f932153":
{"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) {
@SomeBottle
SomeBottle / MemoryAllocation-WorstFit.c
Last active May 11, 2022 15:07
动态分区存储管理-内存分配-最坏适应WorstFit算法
/* 动态分区存储管理
* 实验要求
* 编写程序模拟实现内存的动态分区法存储管理。
* 内存空闲区使用空闲分区链管理,采用最坏适应算法从空闲分区链中寻找空闲区进行分配,
* 内存回收时假定不做与相邻空闲区的合并。
* 假定系统的内存共640K,初始状态为操作系统本身占用64K。
* 在t1时间之后,有作业A、B、C、D分别请求8K、16K、64K、124K的内存空间;
* 在t2时间之后,作业C完成;
* 在t3时间之后,作业E请求50K的内存空间;
* 在t4时间之后,作业D完成。
@SomeBottle
SomeBottle / maxCommonDiv.c
Created April 27, 2022 05:58
欧几里得算法求最大公约数
#include <stdio.h>
long int CommonDiv(long int num1, long int num2) { // 寻找两数最大公约数
long int dividend; // 被除数
long int divisor; // 除数
long int remainder; // 余数
if (num1 > num2) {
dividend = num1;
divisor = num2;
} else {