Skip to content

Instantly share code, notes, and snippets.

View breakds's full-sized avatar

Break Yang breakds

View GitHub Profile

Go1 on Flat Ground

Test command

$ testspeed ~/projects/Hobot/hobot/environments/mj_models/go1/scene.xml 100000 20

Where 20 means using 20 (asynchronous) threads.

@breakds
breakds / visualize_histogram.ipynb
Last active April 15, 2023 01:19
bokeh interactive visualization example in jupyter notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@breakds
breakds / LLM.md
Created March 29, 2023 20:55 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@breakds
breakds / heap_test.py
Last active November 15, 2022 01:22
Testing how fast Python 3.11 has become
# CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz
#
# Python 3.9 on NixOS - Time elapsed = 14.530219 seconds
# Python 3.10 on NixOS - Time elapsed = 10.266909 seconds
# Python 3.11 on NixOS - Time elapsed = 5.466192 seconds
import random
import time
@breakds
breakds / mlp_with_equinox.ipynb
Last active June 13, 2022 18:27
MLP with equinox
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@breakds
breakds / indexing_test.py
Last active May 11, 2022 17:54
Demonstrate multi_threading in pytorch on tensor slicing (CPU)
import torch
import time
num_envs = 40
buffer_length = 1_000_000
buffer = torch.zeros([num_envs, buffer_length]).cpu()
B = 5120
T = 100
@breakds
breakds / catkin.nix
Created September 30, 2019 05:45
Packaging ROS on Nix
# Check https://github.com/airalab/airapkgs/blob/nixos-unstable/pkgs/development/ros-modules/catkin/default.nix
{ lib, pkgs, stdenv, fetchFromGitHub, callPackage,
python2Packages, ... }:
let
pname = "catkin";
version = "0.7.18";
subversion = "1";
rosdistro = "kinetic";
@breakds
breakds / keybase.md
Created September 30, 2019 03:21
keybase.md

Keybase proof

I hereby claim:

  • I am breakds on github.
  • I am breakds (https://keybase.io/breakds) on keybase.
  • I have a public key ASAnP3lGzPeEoxCzyLjxIm_M7RzbRWwryG8FvdjwwpXbLgo

To claim this, I am signing this object:

@breakds
breakds / nginx.nix
Created November 26, 2017 02:45
Nginx configuration
{ config, lib, pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 80 443 8885 ];
services.nginx = {
enable = true;
recommendedProxySettings = true;
statusPage = true;
@breakds
breakds / chs.yml
Last active October 5, 2017 18:49
Example: Multi-language support in React.
pages:
home:
title: 首页
searchPlaceholder: 搜索功能尚未开放
armor:
title: 防具
armorSet: 套装
produce: 生产
weapon:
title: 武器