Skip to content

Instantly share code, notes, and snippets.

View bibendi's full-sized avatar

Misha Merkushin bibendi

View GitHub Profile
@bibendi
bibendi / Get started with local and remote LLM GPT.md
Last active July 6, 2024 13:02
Get started with local and remote LLM GPT.md

[[GPT]] Гайд для тех, кто не хочет делиться своими данными при общении с AI чатами или сэкономить 20 баксов на подписку, а тратить не больше 5 в крипте. То есть с LLM моделя можно работать как полностью локально (важна оперативка), либо через провайдера OpenRouter.

Local

Для работа offline с [[LLM]] модели вам нужно следующее:

  • Сначала немного теории. Что такое [[LLM]] модели https://www.youtube.com/watch?v=zjkBMFhNj_g
  • Устанавливаем Ollama сервер. Это как Docker, только для моделей
    • Скачиваем сервере с https://ollama.com/
    • Выбираем модель https://ollama.com/library и скачиваем ее. Если у вас не более 16Gb RAM, то я рекомендую wizardlm2:7b. Это супер новая модель, примерно сопоставимая с chatGPT 3.5.
    • Команда следующая: ollama run wizardlm2:7b-q5_K_M. После скачивания запуститься промт, в котором можно проверить модель, ну либо сразу закрыть. На верхней панели должна появиться иконка с запущенной ламой.
  • Чтобы взаимодействовать с моделью далее нужно установить клиент. Их есть два вида: webU
@MarkBennett
MarkBennett / installing-ruby-2.5.1-on-m1.md
Last active July 9, 2024 13:23
Installing Ruby 2.5 on Mac M1
@palkan
palkan / Dockefile
Last active May 14, 2020 06:09
hybrid dockerfile
ARG RUBY_VERSION
# === Base image ===
FROM ruby:${RUBY_VERSION}-slim-buster as base
ARG NODE_MAJOR
ARG POSTGRES_VERSION
ARG BUNDLER_VERSION
ARG YARN_VERSION
# Common dependencies
@furdarius
furdarius / rkn_unblock.md
Last active January 10, 2024 19:08
Настройка обхода РКН на роутере
@seebk
seebk / README.md
Last active July 23, 2024 22:43
Extract embedded certificates and keys from OpenVPN config files

This python script is intended to automate the extraction of embedded certificates and keys from OpenVPN config files.

Unfortunately the GNOME Network-Manager is not able to automatically import OpenVPN config files with embedded certificates and keys. A workaround is to manually extract these and store them in separate files (e.g. see https://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/).

Instructions:

  • Make shure all the required packages are installed. For example on Ubuntu and Debian run:

    $ sudo apt-get install python3 network-manager-openvpn-gnome

@ogrrd
ogrrd / dnsmasq OS X.md
Last active July 22, 2024 08:36
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@roberto
roberto / _flash_messages.html.erb
Created August 13, 2012 22:47
Rails flash messages using Twitter Bootstrap
<% flash.each do |type, message| %>
<div class="alert <%= bootstrap_class_for(type) %> fade in">
<button class="close" data-dismiss="alert">×</button>
<%= message %>
</div>
<% end %>
@norman
norman / earthdistance.rb
Last active November 3, 2022 21:20
Geographic Searches With Postgres's Earthdistance and Cube Extensions
#!/usr/bin/env ruby
=begin
= Geographic Searches With Postgres's Earthdistance and Cube Extensions
This program shows how to easily create a Postgres database that uses the Cube
and Earthdistance extensions to perform fast queries on geographic data.
Briefly, the problem this code solves is "show me all places within 50
kilometers of New York City."
@senko
senko / onchange.sh
Last active July 14, 2023 07:54
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of