Skip to content

Instantly share code, notes, and snippets.

@Birch-san
Birch-san / code-assist.md
Last active March 4, 2024 19:32
Local VSCode AI code assistance via starcoder + 4-bit quantization in ~11GB VRAM

Install HF Code Autocomplete VSCode plugin.

We are not going to set an API token. We are going to specify an API endpoint.
We will try to deploy that API ourselves, to use our own GPU to provide the code assistance.

We will use bigcode/starcoder, a 15.5B param model.
We will use NF4 4-bit quantization to fit this into 10787MiB VRAM.
It would require 23767MiB VRAM unquantized. (still fits on a 4090, which has 24564MiB)!

Setup API

@Sporif
Sporif / nvidia-gpu-sensor.pl
Last active July 21, 2023 06:47 — forked from hacker1024/nvidia-gpu-sensor.pl
KDE KSysGuard NVIDIA GPU temperature/memory/utilization sensor, based on @frantic1048's script, but with units and total memory detection.
#!/usr/bin/perl -w
# act as a KSysGuard sensor
# provides NVIDIA GPU info via `nvidia-smi`
# Usage:
# 1. Save this script, make it executable and move it to a directory in your $PATH
# 2. Save this ksysguard sensor file for Nvidia: https://gist.github.com/Sporif/31f0d8d9efc3315752aa4031f7080d79
# 2. In KSysGuard's menu, open "File > Import Tab From File option"
# 3. Open the sensor file (nvidia.srgd)
@Irio
Irio / amendments.csv
Last active December 28, 2017 01:12
Emendas de deputados federais ao orçamento da União (código-fonte em github.com/Irio/budget)
We can't make this file beautiful and searchable because it's too large.
achievement,achievement_code,additional_value,author,author_page_summary,category,department,destination,file_generation_date,file_generation_time,intervention,intervention_code,justification,location,number,proposed_wording,reference,total_page_summary,type,commitment_info_url,url
Implantação/Aparelham/Adequação Unid Saúde/ Aquis Unid Móvel,552,5.343.000,3230 - Jaime Martins,1 de 13,Individual,Saúde,ESPELHO DE EMENDA DE APROPRIAÇÃO DE DESPESA,2013-12-02,22:03,Atenção Especializada:Hospitais/Policlínicas/Unid.Especializ,003,,3100000 - Minas Gerais,32300001,,,3497 de 8807,Apropriação - Inclusão,http://inteligenciadenegocios3.camara.gov.br/painel/redirectorcamento.jsp?urlbo=iDocID=79334%26sOutputFormat=P%26sRefresh=Y%26lsSANO=2009%26lsSMES=12%26lsSORGAO=%26lsSUO=55901%26lsSACAO=2B31%26lsSSUBTITULO=0031,http://www.camara.gov.br/internet/comissao/index/mista/orca/orcamento/or2009/emendas/despesa/DANIELRJ_AV_LOA_AUTOR2_3230.pdf
Implantação/Aparelham/Adequação Unid Saúde/ Aquis Unid Móvel,552,2.000.000,3230 - Jaime
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 1, 2024 08:20
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jtrecenti
jtrecenti / obras.R
Created March 8, 2017 15:55
baixar obras do governo
library(tabulizer)
library(tidyverse)
library(stringr)
library(abjutils)
u <- "http://legis.senado.leg.br/sdleg-getter/documento/download/a5e8c92c-86c1-45bb-99bd-3ad098905e81"
tab <- tabulizer::extract_tables(u)
arrumar <- function(x) {
x %>%
tolower() %>%
@duhaime
duhaime / gist:9330473f9a4e288f00af
Created September 13, 2015 00:35
Cluster vectors with K-Means
from __future__ import division
from sklearn.cluster import KMeans
from numbers import Number
from pandas import DataFrame
import sys, codecs, numpy
class autovivify_list(dict):
'''Pickleable class to replicate the functionality of collections.defaultdict'''
def __missing__(self, key):
value = self[key] = []
@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing
@mourner
mourner / TileLayer.Common.js
Created February 11, 2012 23:11
Leaflet shortcuts for common tile providers
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {