Skip to content

Instantly share code, notes, and snippets.

View jrf's full-sized avatar
🐈

Jeffrey Fetzer jrf

🐈
View GitHub Profile
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 28, 2025 17:08
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
"""
Histogram equalization using CLAHE
"""
# Import required packages:
import cv2
from matplotlib import pyplot as plt
def show_img_with_matplotlib(color_img, title, pos):
@philipashlock
philipashlock / userChrome.css
Created February 8, 2019 20:03
Firefox userChrome.css for use with Tree Style Tab on Mac OS
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Adapted from https://www.reddit.com/r/FirefoxCSS/comments/ao3ydl/configuring_firefox_for_tree_style_tab_usage/ */
/* hide native tabs and sidebar header */
#TabsToolbar-customization-target {
visibility: collapse;
}
@jcreinhold
jcreinhold / resnet3d.ipynb
Last active July 26, 2021 08:24
3d resnet for nifti images in fastai
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nadavrot
nadavrot / Matrix.md
Last active July 22, 2025 08:44
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@L0SG
L0SG / freeze_example.py
Last active October 12, 2023 05:02
PyTorch example: freezing a part of the net (including fine-tuning)
import torch
from torch import nn
from torch.autograd import Variable
import torch.nn.functional as F
import torch.optim as optim
# toy feed-forward net
class Net(nn.Module):
def __init__(self):
@santi-pdp
santi-pdp / Hello PyTorch.ipynb
Created January 24, 2018 17:53
Toy example in pytorch for binary classification
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@erogol
erogol / dataset_mongo.py
Last active September 19, 2024 12:21
PyTorch MongoDB dataset interface
import io
import os
import numpy as np
from PIL import Image
from pymongo import MongoClient
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
def pil_loader(f):
@jzstark
jzstark / #readme.md
Last active May 4, 2019 18:10
An implementation of InceptionV3 network with Owl

InceptionV3

InceptionV3 is one of Google’s latest effort to do image recognition. This is a standard task in computer vision, where models try to classify entire images into 1000 classes, like "Zebra", "Dalmatian", and "Dishwasher". Compared with previous DNN models, InceptionV3 has one of the most complex networks architectures in computer vision models. The original paper of this network is here.

Usage

This gist implements an InceptionV3 service in Owl, and provides simple interfaces to use. Here is an example:

#zoo "9428a62a31dbea75511882ab8218076f"
@kevinzakka
kevinzakka / data_loader.py
Last active March 16, 2025 18:14
Train, Validation and Test Split for torchvision Datasets
"""
Create train, valid, test iterators for CIFAR-10 [1].
Easily extended to MNIST, CIFAR-100 and Imagenet.
[1]: https://discuss.pytorch.org/t/feedback-on-pytorch-for-kaggle-competitions/2252/4
"""
import torch
import numpy as np