Skip to content

Instantly share code, notes, and snippets.

@lalitmee
lalitmee / settings.lua
Created March 29, 2021 10:59
nvim settings
local fn = vim.fn
local api = vim.api
local executable = function(e)
return fn.executable(e) > 0
end
local opts_info = vim.api.nvim_get_all_options_info()
local opt = setmetatable(
{}, {
import os
import sys
import argparse
import numpy as np
import torch
import torch.quantization as tq
from pathlib import Path
from torch import nn
from _collections_abc import Iterable
from collections import OrderedDict
@Smthri
Smthri / quantization_test.py
Last active August 16, 2021 08:07
Our result is approximately equal to the float output of the non-quantized convolution. However, sometimes PyTorch yields result with a large error.
import numpy as np
import torch
import torch.quantization as tq
from torch import nn
from copy import deepcopy
## Manual quantization
# weight, bias, input
kernel_size = 3
@ppetrushkov
ppetrushkov / minimal_fbgemm.cpp
Created March 19, 2020 14:52
DNNL vs FBGEMM u8s8s32 single core performance
#include <iostream>
#include <chrono>
#include <cmath>
#include "dnnl.hpp"
#include "fbgemm/Fbgemm.h"
template<typename T>
@hsm207
hsm207 / conv2d_as_matmul.ipynb
Last active January 17, 2024 17:12
Code to accompany my blog post at https://bit.ly/2KfmQ76
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BIGBALLON
BIGBALLON / extract_ILSVRC.sh
Created May 13, 2018 20:09
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active September 11, 2024 11:40
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@rxaviers
rxaviers / gist:7360908
Last active September 21, 2024 18:09
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000