Skip to content

Instantly share code, notes, and snippets.

View enkerewpo's full-sized avatar
:octocat:
foxing

wheatfox enkerewpo

:octocat:
foxing
View GitHub Profile
@enkerewpo
enkerewpo / virt.dts
Created April 22, 2025 14:37
virt.dts
/dts-v1/;
/ {
#size-cells = <0x02>;
#address-cells = <0x02>;
compatible = "linux,dummy-loongson3";
platform-bus@16000000 {
interrupt-parent = <0x8003>;
ranges = <0x00 0x00 0x16000000 0x2000000>;
@enkerewpo
enkerewpo / graph.py
Last active February 28, 2025 02:45
Algorithm Design and Analysis Function Graph - wheatfox 2025.2
# wheatfox 2025.2
# this script is for teaching purpose only
from matplotlib import pyplot as plt
import numpy as np
colors = plt.cm.tab10.colors
def gen(x):
x_prime = np.floor(np.log2(x))
for i in range(len(x_prime)):