Skip to content

Instantly share code, notes, and snippets.

View gorborukov's full-sized avatar

Evgeny gorborukov

  • Krasnodar
View GitHub Profile
@rain-1
rain-1 / LLM.md
Last active June 29, 2024 07:00
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@brenogazzola
brenogazzola / migrate_im_to_vips.md
Last active March 17, 2024 21:56
Steps to migrate ImageMagick to Libvips

For apps built before the image_processing gem became the default, the migration will involve two steps:

  1. Migrating to the image processing syntax while still using ImageMagick;
  2. Switching to Vips and updating the compression options;

Migrate to the image processing syntax

Before changing from ImageMagick to Vips, it's better to first test the new syntax and ensure everything is still working.

1. Move everything that has to do with compression to a saver hash:

variant(format: :jpg, strip: true, quality: 80)
import requests
app_id = '3d344fd907f547d0b3d34014bfd7659b'
app_password = '3a7cd5e6ca8545d29f37ad94ab8408de'
oauth_token = 'AQAAAAAo4ZEPAAVUTiN9vwEfPEzGoaWgy2SU2i0'
counter_id = '46337109' # ID счетчика
url = "https://api-metrika.yandex.net/stat/v1/data"
querystring = {"ids": "46337109", "metrics": "ym:s:users,ym:s:ecommercePurchases,ym:s:ecommerceRevenue",
@sphaero
sphaero / Nodes.cpp
Created December 12, 2018 15:07 — forked from ChemistAion/nodes.cpp
Second prototype of standalone node graph editor for ImGui
#include "Nodes.h"
namespace ImGui
{
template<int n>
struct BezierWeights
{
constexpr BezierWeights() : x_(), y_(), z_(), w_()
{
for (int i = 1; i <= n; ++i)
@PierBover
PierBover / client.js
Created October 1, 2018 23:28
Node.js UDP Broadcast example
const dgram = require('dgram');
const message = new Buffer('Server?');
const socket = dgram.createSocket('udp4');
socket.on('listening', function () {
socket.setBroadcast(true);
setInterval(() => {
socket.send(message, 0, message.length, 5555, '255.255.255.255');
}, 5000);
});
@ivorpad
ivorpad / prisma.md
Last active October 6, 2019 03:20
Quick instructions to setup a Prisma server on Linode
  1. SSH to server
  2. Install Docker and Docker Compose:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
  1. Install Node:
@Mystfit
Mystfit / test_radio_dish_udp.h
Last active June 4, 2023 23:28
libzmq Radio/Dish example using UDP multicast
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <signal.h>
#include <unistd.h> // for usleep
#define ZMQ_BUILD_DRAFT_API
#include <zmq.h>
@slavikdev
slavikdev / cheatsheet.md
Created March 16, 2017 17:54
Rails request path cheatsheet

Rails request path cheatsheet

Full path with query string

>>  request.url
=> "http://localhost:3000/ask-help.amp?hui=pizda"

Virtual path without query string

>>  request.path
=&gt; "/ask-help.amp"