Skip to content

Instantly share code, notes, and snippets.

View SharanSMenon's full-sized avatar
🎯
Focusing

SharanSMenon

🎯
Focusing
View GitHub Profile
@SharanSMenon
SharanSMenon / init.vim
Created August 5, 2022 20:54
Basic Neovim Configuration
call plug#begin("~/.vim/plugged")
" Theme
Plug 'arcticicestudio/nord-vim'
" Language Client
Plug 'neoclide/coc.nvim', {'branch': 'release'}
let g:coc_global_extensions = ['coc-emmet', 'coc-css', 'coc-html', 'coc-json', 'coc-prettier', 'coc-tsserver', 'coc-python']
" TypeScript Highlighting
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
@SharanSMenon
SharanSMenon / efficientnet-pytorch.md
Last active November 10, 2023 04:00
EfficientNet Implementation PyTorch

EfficientNet Implementation

An implementation of Efficientnet in PyTorch

Results

Pytorch

B0:

# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
#
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
#
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SharanSMenon
SharanSMenon / Hex_and_Binary.md
Last active August 15, 2022 12:52
Hex and Binary Python

Hex and Binary

There are two python programs in this gist

The first one is binary_letters.py

It has two functions: binary_to_text and text_to_binary

The seconf one is hex_letters.py

It has two functions: string_to_hex and hex_to_string

@engelen
engelen / argmax.js
Last active March 7, 2023 01:32
Single-line ArgMax for JavaScript
/**
* Retrieve the array key corresponding to the largest element in the array.
*
* @param {Array.<number>} array Input array
* @return {number} Index of array element with largest value
*/
function argMax(array) {
return array.map((x, i) => [x, i]).reduce((r, a) => (a[0] > r[0] ? a : r))[1];
}
@jaberg
jaberg / dot_flops.py
Last active February 25, 2022 22:08
Measure GEMM speed via numpy.dot
#!/bin/python
import sys
import time
import numpy as np
N = int(sys.argv[1])
dtype = sys.argv[2]
A = np.random.rand(N, N).astype(dtype)
B = np.random.rand(N, N).astype(dtype)