Skip to content

Instantly share code, notes, and snippets.

@ruoyu0088
ruoyu0088 / cmd.txt
Last active July 25, 2025 16:37
linux_cmd
sudo add-apt-repository ppa:kelebek333/nvidia-legacy
sudo apt update
sudo apt install nvidia-340 xorg-modulepath-fix
sudo apt install emulationstation retroarch
sudo add-apt-repository ppa:emulationstation/ppa -y
sudo apt-get update
sudo apt-get install emulationstation-theme-simple emulationstation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
from collections.abc import Sized, Iterable, Iterator
from itertools import product, count, combinations, permutations
from collections import defaultdict
from typing import Optional
import cycosat
BlocksColor = [
'#ffb631',
'#f0ea4b',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import taichi as ti
ti.init(arch=ti.gpu)
StatusSearch, StatusAtFood, StatusGoHome, StatusAtHome = 1, 2, 3, 4
pi = 3.1415926
width = 80
height = 60
N = 1000
ant_length = 1
@ruoyu0088
ruoyu0088 / taichi_zoo_life.py
Last active September 19, 2022 08:52
taichi_zoo_life.py
import taichi as ti
Category10_10 = ('#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd',
'#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf')
ti.init(arch=ti.gpu)
N = 2000
N_COLOR = 10
COLORS = [int(c[1:], 16) for c in Category10_10]
from kiwisolver import strength
import taichi as ti
import numpy as np
Category10_10 = ('#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf')
ti.init(arch=ti.gpu)
N = 5000
N_COLOR = 10
. ....... .......,,,.......*(* /%/
.. . .... .,,... .*//, /&/
... ... ....,,,,,,,,. ,*//, /&/
.. .....,,,,.*/*,. *%*
. .. ..,,,*,,. *(,
..... ..,*,,.. *#*
..,***,. *#*
.,*(*,. *%/.
. .,/#* *(*.
.. .,**,**,