Skip to content

Instantly share code, notes, and snippets.

View jarutis's full-sized avatar

Jonas Jarutis jarutis

View GitHub Profile
@jarutis
jarutis / handler.py
Created March 21, 2023 07:43
YoloV8 Torchserve model handler
"""Custom TorchServe model handler for YOLOv8 models.
"""
from ts.torch_handler.base_handler import BaseHandler
import numpy as np
import base64
import torch
import torchvision.transforms as tf
import io
from PIL import Image
import cv2
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -sg escape-time 0
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
@jarutis
jarutis / spotify.md
Created April 28, 2021 12:36
Spotify on linux

Installing spotify on Linux

If you use Snap to install Spotify:

snap install spotify

Spotify startup time on my machine is ~30s.

@jarutis
jarutis / CMakeLists.txt
Last active July 5, 2024 15:51
Example OpenCL program with C++ and CMake
cmake_minimum_required(VERSION 3.7)
project(opencl_cmake VERSION 0.0.1 LANGUAGES CXX)
add_executable(vadd main)
target_compile_features(vadd PRIVATE cxx_auto_type)
find_package(OpenCL REQUIRED)
target_link_libraries(vadd OpenCL::OpenCL)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jarutis
jarutis / .ensime
Created February 28, 2017 13:49
ensime new format
:scala-compiler-jars ("/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.1/scala-compiler-2.12.1.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.1/scala-library-2.12.1.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.1/scala-reflect-2.12.1.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scalap/2.12.1/scalap-2.12.1.jar")
:ensime-server-jars ("/Users/jj/.coursier/cache/v1/https/oss.sonatype.org/content/repositories/snapshots/org/ensime/monkeys_2.12/2.0.0-SNAPSHOT/monkeys_2.12-2.0.0-SNAPSHOT.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/com/zaxxer/HikariCP/2.6.0/HikariCP-2.6.0.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.12/2.4.17/akka-actor_2.12-2.4.17.jar" "/Users/jj/.coursier/cache/v1/https/repo1.maven.org/maven2/com/typesafe/akka/akka-slf4j_2.12/2.4.17/akka-slf4j_2.12-2
@jarutis
jarutis / build.gradle
Created December 3, 2016 17:53
Build file for dl4j
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'java'
id 'scala'
}