Skip to content

Instantly share code, notes, and snippets.

View eatcosmos's full-sized avatar

eatcosmos eatcosmos

View GitHub Profile
@eatcosmos
eatcosmos / gitclone_client.bat
Created April 29, 2024 11:16
my Hello-World program in Python
@REM # 如何借道远程服务器执行gitclone_client.bat
@echo off
rem Check if the required arguments are provided
if "%~1"=="" (
echo Usage: gitclone repo_url [download_dir] [unzip_dir]
exit /b 1
)
@eatcosmos
eatcosmos / WebGL-WebGPU-frameworks-libraries.md
Created June 16, 2023 18:35 — forked from dmnsgn/WebGL-WebGPU-frameworks-libraries.md
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries

Name Stars Last Commit Description
three.js ![GitHub Rep
@eatcosmos
eatcosmos / 1
Created October 29, 2022 09:09
1
script_content_patterns = r'<script>\s*\S+</script>'
script_content_patterns = r'<script>'
script_content = re.findall(script_content_patterns, r.text)
print(script_content)
body_content_patterns = r'<body>\s*\S+</body>'
body_content = re.findall(body_content_patterns, r.text)
print(body_content)
if len(script_content) != 0:
print("认为检测到重定向...") # 视为中文网址
else:
@eatcosmos
eatcosmos / 闪退输出
Created April 18, 2022 08:03
chromium启动闪退bug
./chrome
[9382:9382:0418/155858.050486:INFO:content_main_runner_impl.cc(975)] Chrome is running in full browser mode.
[9413:9413:0418/155858.894180:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[9382:9382:0418/155918.562644:WARNING:account_consistency_mode_manager.cc(63)] Desktop Identity Consistency cannot be enabled as no OAuth client ID and client secret have been configured.
[9382:9434:0418/155918.595003:WARNING:web_database.cc(116)] Web database is too new.
import taichi as ti
ti.init(arch=ti.gpu)
n = 320
pixels = ti.field(dtype=float, shape=(n * 2, n))
@ti.func
def complex_sqr(z):
return ti.Vector([z[0]**2 - z[1]**2, z[1] * z[0] * 2])
import taichi as ti
ti.init(ti.gpu)
# global control
paused = ti.field(ti.i32, ())
# gravitational constant 6.67408e-11, using 1 for simplicity
G = 1
PI = 3.141592653