Skip to content

Instantly share code, notes, and snippets.

View lynzrand's full-sized avatar
🧻
Thesis isn't that far from toilet paper

Rynco Maekawa lynzrand

🧻
Thesis isn't that far from toilet paper
View GitHub Profile
// ==UserScript==
// @name 学堂云/雨课堂(是雨课堂4.0,非雨课堂,题库自动搜集)
// @namespace dandanmuaa@gmail.com
// @version 1.2
// @description 雨课堂脚本
// @author sea of flowers
// @match *://*.yuketang.cn/*
// @match *://*.edu.cn/*
// @connect huan.fm210.cn
// @grant unsafeWindow
(* Calculate good rational representation of [value] within relative \
error [epsilon], with denominator not bigger than [limit].
Returns List[(approximation, relativeError, absoluteError)]
*)
RationalReprInside := Function[{limit, epsilon, value}, Module[
{reprs, real, approx, delta},
reprs = {};
(* For each denominator,
find the appropriate approximation if possible *)
@lynzrand
lynzrand / sstu-waterfall.cfg
Created May 20, 2021 16:22
Implement waterfall effects on SSTU engines
// Remove stock effects
@PART[SSTU-SC-ENG-*]:AFTER[SSTU]
{
@EFFECTS
{
@running_closed
{
!MODEL_MULTI_PARTICLE,*{}
}
@running_main
@lynzrand
lynzrand / readme.md
Last active December 8, 2020 17:44
Github Contribution Renderer

Dependencies

drawsvg
colormath

Usage

  1. Download
from typing import List, Tuple
from PIL import Image, ImageDraw, ImageColor
import math
import random
from PIL.Image import new
from PIL.ImageDraw import Draw
def gen_saturated_color() -> Tuple[int, int, int]:
@lynzrand
lynzrand / Plugin.cs
Created October 16, 2020 17:28
FixKPlug
using BepInEx;
using HarmonyLib;
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections.Generic;
namespace Karenia.FixKPlug
{
[BepInPlugin(id, projectName, version)]
@lynzrand
lynzrand / Dockerfile
Created September 20, 2020 07:41
Bollard build image result issue
# Shared Volume
FROM busybox:buildroot-2014.02
VOLUME /data
CMD ["/bin/sh"]
@lynzrand
lynzrand / program.cs
Created August 26, 2020 02:28
Splitting stream & reading stuff inside
using System;
using System.Threading;
using System.IO;
using System.Threading.Tasks;
using System.Text.Unicode;
using System.Text;
using SharpCompress.Readers;
using MicroKnights.IO.Streams;
class Program
@lynzrand
lynzrand / 软件过程与质量索引.md
Last active September 12, 2023 01:54
软件过程与质量索引

软件过程与质量索引

前言、图例

PPT 本身就很乱……我尽量整理了。

感觉做 ppt 的人脑子是一团浆糊,很多地方逻辑乱七八糟的,标题层级也不一样,完全没有他做的软件过程标准那么精巧。或许这就是软件开发的常态吧(笑)

这篇文档说是索引,其实是介于索引和知识点总结之间的一个东西。希望它能对你的考试有所帮助吧。记得多用 Ctrl+F 查找。 >

r0 虚拟机标准

本次大作业的编译目标是 r0 虚拟机 (r0vm) 的汇编 (s0)。其设计参考了 JVM、DotNet CLR 和上学期的 c0 虚拟机。

虚拟机简介

r0vm 是一个具有线性内存空间的栈式虚拟机。内存空间以 8 位(1 字节)为单位寻址,栈空间以 64 位(8 字节)为单位压栈弹栈。

TODO: 二进制格式