Skip to content

Instantly share code, notes, and snippets.

View ZeroX29a's full-sized avatar
🤔
What's the next idea?

JCtine ZeroX29a

🤔
What's the next idea?
View GitHub Profile
@erincandescent
erincandescent / NibblerCPU.vhd
Created May 20, 2014 00:59
Nibbler 4-bit CPU in VHDL
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;
entity NibblerCPU is Port(
clk : in STD_LOGIC;
rst : in STD_LOGIC;
prog_addr : out std_logic_vector(11 downto 0);
prog_data : in std_logic_vector(7 downto 0);

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
@sroecker
sroecker / debug_pytorch_rocm.py
Last active May 15, 2024 19:51
If this is not crashing then PyTorch is most likely running with your AMD graphics card and ROCm, if not see magic variables
import torch
print("pytorch version: " + torch.__version__)
print("CUDA available: " + str(torch.cuda.is_available()))
print("device count: " + str(torch.cuda.device_count()))
print("current device: " + str(torch.cuda.current_device()))
print("device name: " + torch.cuda.get_device_name(torch.cuda.current_device()))
print("backend:")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(device)