Skip to content

Instantly share code, notes, and snippets.

View Adversarr's full-sized avatar

Zherui Yang Adversarr

View GitHub Profile
@Adversarr
Adversarr / richmd.py
Created April 3, 2025 08:13
Use rich to render markdown from stdin to stdout.
#!/usr/bin/env python3
import sys
from rich.console import Console
from rich.live import Live
from rich.markdown import Markdown
from rich.text import Text
from rich.panel import Panel
class PersistentMarkdown:
def __init__(self):
self.content = []
@Adversarr
Adversarr / gcl-gpu-readme.md
Last active November 28, 2024 12:25
GCL-GPU

GCL GPU user guide

  • IP addr: 222.195.77.187

Our server IP is only available inside USTC networks:

  1. If you are accessing the internet via ustcnet/ustc-guest/eduroam(inside ustc) you should be able to connect directly;
  2. Otherwise, you have to use a jumper machine inside USTC network, and connet via the jumper machine.

See https://adversarr.github.io/2024/07/01/ustcserver/vlab-jumper/ for jumper details.

@Adversarr
Adversarr / basic_mesh_vector_animate.py
Created December 25, 2023 08:38
Animate mesh, vector field using matplotlib.
import time
import matplotlib.pyplot as plt
import numpy as np
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
def plot_mesh(ax, V, F):
return ax.plot_trisurf(V[:, 0], V[:, 1], V[:, 2], triangles=F)