Skip to content

Instantly share code, notes, and snippets.

View ilyazub's full-sized avatar
🇺🇦

ilyazub

🇺🇦
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active April 23, 2024 16:03
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

[
{
"code": "ac_refrigeration_repair",
"value": 7623,
"name": "A/C, Refrigeration Repair"
},
{
"code": "accounting_bookkeeping_services",
"value": 8931,
"name": "Accounting/Bookkeeping Services"
@DaniruKun
DaniruKun / whisper-transcribe.bash
Last active March 31, 2024 01:50
Transcribe (and translate) any VOD (e.g. from Youtube) using Whisper from OpenAI and embed subtitles!
#!/usr/bin/env bash
# Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./transcribe-vod help` to print help info.
# MIT License
# Copyright (c) 2022 Daniils Petrovs
@yob
yob / README.md
Last active November 8, 2023 12:49
Installing ruby 3.0 with rbenv/ruby-build with openssl 3

Bllergh. This is a real pain.

The openssl extension that ships with ruby 3.0 only compiles against openssl <= 1.1, but now openssl 3.0 is shipped in debian testing/unstable.

Ruby bug here: https://bugs.ruby-lang.org/issues/18658

Version >= 3.0 of the openssl rubygem does compile against openssl 3.0 though.

I use rbenv to manage ruby versions on my system, which uses ruby-build to manage installs.

# Rails production setup via SQLite3 made durable by https://litestream.io/
# Copy this to Dockerfile on a fresh rails app. Deploy to fly.io or any other container engine.
#
# try locally: docker build . -t rails && docker run -p3000:3000 -it rails
#
# in production you might want to map /data to somewhere on the host,
# but you don't have to!
#
FROM ruby:3.0.2
@tiran
tiran / audient_id4_pipewire.md
Last active March 25, 2024 07:32
Audient iD4 with pipewire: split mic and DI inputs into separate streams

UPDATE

The workaround is no longer needed with recent alsa-ucm, e.g. alsa-ucm-1.2.11-2.fc39. Just configure the device to use Default Alsa Profile instead of Pro.

old workaround

  • cp /usr/share/pipewire/media-session.d/media-session.conf ~/.config/pipewire/media-session.d/
  • add loopback modules to context.modules section
  • configure interface to use Pro Audio profile
  • systemctl restart --user pipewire.service pipewire-pulse.service
@esafwan
esafwan / Zlib Python Examples.md
Last active March 21, 2024 17:24
Python zlib use custom dictionary(pre-defined zdict) example with and without unicode.
@alirezamika
alirezamika / autoscraper-examples.md
Last active March 19, 2024 15:33
AutoScraper Examples

Grouping results and removing unwanted ones

Here we want to scrape product name, price and rating from ebay product pages:

url = 'https://www.ebay.com/itm/Sony-PlayStation-4-PS4-Pro-1TB-4K-Console-Black/203084236670' 

wanted_list = ['Sony PlayStation 4 PS4 Pro 1TB 4K Console - Black', 'US $349.99', '4.8'] 

scraper.build(url, wanted_list)
@lu4nm3
lu4nm3 / main.rs
Last active January 16, 2024 09:38
Tokio Async: Concurrent vs Parallel
use futures::StreamExt;
use std::error::Error;
use tokio;
use tokio::macros::support::Pin;
use tokio::prelude::*;
use tokio::time::{Duration, Instant};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut multi_threaded_runtime = tokio::runtime::Builder::new()
.threaded_scheduler()
cd ~/Library/Android/sdk/platform-tools/
# Get the hash of the mitmproxy-ca certificate.
openssl x509 -inform PEM -subject_hash_old -in ~/.mitmproxy/mitmproxy-ca.pem | head -1
# We will use this hash value, append '.0' (dot zero) and use this as the filename for the resulting Android certificate
cat ~/.mitmproxy/mitmproxy-ca.pem > c8750f0d.0
openssl x509 -inform PEM -text -in ~/.mitmproxy/mitmproxy-ca.pem -out /dev/null >> c8750f0d.0
# In an other terminal, we will start the emulator with writable /system volume