Skip to content

Instantly share code, notes, and snippets.

@GzuPark
GzuPark / pytorch.Dockerfile
Created February 3, 2022 08:20
Sample Dockerfiles for TensorFlow & PyTorch
ARG UBUNTU_VERSION=20.04
ARG CUDA_VERSION=11.3.1
ARG CUDA=11.3
ARG CUDNN_VERSION=8
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${UBUNTU_VERSION}
LABEL maintainer "http://gzupark.dev"
ARG CUDA_VERSION
ARG CUDA
@EndlessEden
EndlessEden / 0001-fix-option-string.patch
Created April 24, 2018 20:47
htop downstream patch(arch)
From 731acc8bced18c90fbe0e18381c32f007f71e0d9 Mon Sep 17 00:00:00 2001
From: Christian Hesse <mail@eworm.de>
Date: Tue, 10 Apr 2018 16:21:46 +0200
Subject: [PATCH 1/1] fix option string
This broke with commit db05ba61065f64b59d0014518be0786b5439e54c.
Signed-off-by: Christian Hesse <mail@eworm.de>
---
htop.c | 2 +-
@EndlessEden
EndlessEden / hdrprobe
Last active April 19, 2024 00:56
hdrprobe - bash script to probe a file with ffprobe and detect if file is in HDR. (Supports notify-send for toaster notifications)
#!/bin/bash
if [ ! -z $DISPLAY ]; then
if [ $(notify-send -u normal -a hdrprobe -t 3000 -v | sed -e 's| |\n|g' | head -1 | grep -c 'notify-send') -gt 0 ]; then
NOTIFY="1"
else
NOTIFY="0"
fi
else
NOTIFY="0"
fi
@jarvisschultz
jarvisschultz / CMakeLists.txt
Last active April 19, 2024 00:56
Simple Float32MultiArray +Eigen Demo
cmake_minimum_required(VERSION 3.5.1)
project(matrix_demo)
find_package(catkin REQUIRED
rospy
roscpp
std_msgs
)
include_directories(
@memphys
memphys / shortcuts.md
Created March 28, 2012 12:22
Bash Shortcuts For Maximum Productivity

source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/

Command Editing Shortcuts

  • Ctrl + a – go to the start of the command line
  • Ctrl + e – go to the end of the command line
  • Ctrl + k – delete from cursor to the end of the command line
  • Ctrl + u – delete from cursor to the start of the command line
  • Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
  • Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
@The-MAZZTer
The-MAZZTer / bin\x-frame-bypass.js
Created September 3, 2022 19:40
Modified x-frame-bypass for Angular-based Chrome extension
"use strict";
document.addEventListener("click", e => {
if (e.defaultPrevented) {
return;
}
var active = document.activeElement;
// Verify it'a actually an anchor tag
if (active && active.nodeName.toLowerCase() === "a" && active.href) {
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active April 19, 2024 00:51
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@karlseguin
karlseguin / test_runner.zig
Last active April 19, 2024 00:44
Custom Zig Test Runner
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
// .target = target,
// .optimize = optimize,
// .test_runner = "test_runner.zig", // add this line
// .root_source_file = .{ .path = "src/main.zig" },
// });
const std = @import("std");
const builtin = @import("builtin");
@Artefact2
Artefact2 / README.md
Last active April 19, 2024 00:44
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

@Susensio
Susensio / property_inheritance.md
Last active April 19, 2024 00:42
Inherit property setter in python 3.7

Python @property inheritance the right way

Given a Parent class with value property, Child can inherit and overload the property while accessing Parent property getter and setter.

Although we could just reimplement the Child.value property logic completely without using Parent.value whatsover, this would violate the DRY principle and, more important, it wouldn't allow for proper multiple inheritance (as show in the example property_inheritance.py bellow).

Two options:

  • Child redefines value property completely, both getter and setter.