Skip to content

Instantly share code, notes, and snippets.

@aquadzn
aquadzn / video_inference.ipynb
Last active November 25, 2023 20:47
DINO Video inference
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@iwanbolzern
iwanbolzern / readme.md
Last active March 14, 2022 11:12
Have you ever been in a situation where you would have liked others to give you a data frame with the right columns? If no, you're a lucky one. 🤩 If yes, check out this gist 🧐

First step in the direction of a really typed DataFrame

I come across many great libraries every day, but unfortunately most of them are not well suited for enterprise or medical projects, because they lack the possibility for proper interface definitions or the ussage of refactoring capabilities of your IDE.

This is especially true if it comes to libraries in the data science area. Just remember your last df['my_feature'] = df['my_feature'] * 2 😉 And unfortunately, exactly these libraries are also the ones that are written for super fast computations.

Well it seems that we have the choice between the super fast not typed option and a bunch of slow crappy other implementations...

Hard life... 😥

@cinderblock
cinderblock / Setup Raspberry Pi OS Image Script.md
Last active September 27, 2021 00:19
Scripts to setup a Raspberry Pi OS image **before** flashing to SD card
@ivder
ivder / onnxinference.py
Created November 4, 2019 01:08
ONNX inference using caffe2 and pytorch
# Inference in Caffe2 using the ONNX model
import caffe2.python.onnx.backend as backend
import onnx
import torch
import torchvision
from torchvision.transforms import transforms
from PIL import Image
import numpy as np
# First load the onnx model
@dominictarr
dominictarr / readme.md
Created November 26, 2018 22:39
statement on event-stream compromise

Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.

@broros

otherwise why would he hand over a popular package to a stranger?

If it's not fun anymore, you get literally nothing from maintaining a popular package.

One time, I was working as a dishwasher in a restu

@hhromic
hhromic / raspbian-stretch-lite-slimdown.md
Last active May 22, 2023 11:02
Slimming Down Raspbian Stretch Lite

Slimming Down Raspbian Stretch Lite

Notes for slimming down a fresh installation of Raspbian Stretch Lite. This guide does not strip Raspbian of basic functionality such as Bluetooth and mDNS.

Instructions

Install a fresh Raspbian Stretch Lite image into the SD card ([source][1]).

$ unzip -p 2018-04-18-raspbian-stretch-lite.zip | dd bs=4M of=/dev/sdX conv=fsync

#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted
@pubkey
pubkey / Mad_Catz_linux.bash
Last active January 18, 2024 09:44
Mad Catz R.A.T. 7/9 on Linux ubuntu/mint
#The mouse will suck on linux because of the programmable buttons.
#This script will change the button-delegation so that the mouse doesn't stuck.
#@link https://community.linuxmint.com/hardware/view/10217
sudo mkdir /etc/X11/xorg.conf.d
sudo rm /etc/X11/xorg.conf.d/910-rat.conf
# add the following to the file
echo "Section \"InputClass\"" >> /etc/X11/xorg.conf.d/910-rat.conf
@randombenj
randombenj / .zshrc
Last active May 8, 2024 07:19
Custom ZSH Prompt
# Path to your oh-my-zsh installation.
export ZSH=~/.oh-my-zsh
plugins=(git asdf zsh-syntax-highlighting zsh-autosuggestions zsh-autocomplete)
# User configuration
if [ -f $ZSH_CUSTOM/path.sh ]; then
source $ZSH_CUSTOM/path.sh
fi