Skip to content

Instantly share code, notes, and snippets.

@mikebohdan
mikebohdan / README.md
Created November 17, 2023 16:09
Setup Tabby on WSL with CUDA

Setup Tabby on WSL

What is tabby? Tabby is a free, locally running alternative for GitHub Copilot. If you have an Nvidia GPU, you can run it with significant acceleration. Currently, it supports only a few programming languages, but if you use one of these, you can use all the benefits of AI-assisted code completion for free. You can choose different models with different sizes to better fit your hardware.

@mikebohdan
mikebohdan / cats.py
Last active September 22, 2018 21:56
from functools import partial
class Monoid:
@classmethod
def mempty(cls):
raise NotImplementedError
def mappend(self, other):
raise NotImplementedError
@mikebohdan
mikebohdan / tco.py
Last active June 15, 2019 09:44
TCO for python 3.7
from dataclasses import dataclass, field
from functools import wraps
@dataclass
class _TCOCall:
args: list = field(default_factory=list)
kwargs: dict = field(default_factory=dict)
@mikebohdan
mikebohdan / Palindrome.hs
Last active January 23, 2018 14:09
Generalised Project Euler Problem 4
module Palindrome where
-- Solution for Project Euler Problem 4
-- https://projecteuler.net/index.php?section=problems&id=4
import Safe (headMay)
data Result
= Result { getFirst :: Int