Skip to content

Instantly share code, notes, and snippets.

View harsha5500's full-sized avatar

Harsha Krishna harsha5500

View GitHub Profile
@harsha5500
harsha5500 / init.el
Created September 28, 2025 10:43
emacs configuration
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@harsha5500
harsha5500 / torch_test_cuda.py
Created July 29, 2023 05:54
Test if pytorch has cuda enabled.
# Simple test to check if pytorch is installed and can create matrices
import torch
x = torch.rand(5, 3)
print(x)
print("\n")
if torch.cuda.is_available():
print("Is PyTorch CUDA installed: " + str(torch.cuda.is_available()))
print("Number of Cuda Devices: " + str(torch.cuda.device_count()))
@harsha5500
harsha5500 / Makefile
Created July 29, 2023 05:53
Makefile for Macos M1
# Makefile template to compile SLD2 sources on Apple m1 with compile and installed libraries
all:
arch -arm64 cc -c src/filehandler.c -I include
arch -arm64 cc -c src/main.c -I include -I /usr/local/include/SDL2
arch -arm64 cc -o hl1038 main.o filehandler.o -L /usr/local/lib -lsdl2 -lsdl2_image -lsdl2_ttf
clean:
rm filehandler.o
rm main.o
@harsha5500
harsha5500 / .vimrc
Created July 29, 2023 05:52
My VIM configuration
" turn on syntax highlighting
syntax on
" turn on line numbers
set nu
set tabstop=4 "Tab space is 4
set shiftwidth=4
set softtabstop=0
set noexpandtab
@harsha5500
harsha5500 / .gitignore
Last active July 29, 2023 05:52
Gitignore template
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*