Skip to content

Instantly share code, notes, and snippets.

import asyncio
import base64
import json
import os
import pyaudio
from websockets.asyncio.client import connect
class SimpleGeminiVoice:
def __init__(self):
@disler
disler / README.md
Last active December 15, 2024 16:32
Four Level Framework for Prompt Engineering
@AndrasKovacs
AndrasKovacs / HOASOnly.hs
Last active December 15, 2024 16:31
HOAS-only lambda calculus
{-# language BlockArguments, LambdaCase, Strict, UnicodeSyntax #-}
{-|
Minimal dependent lambda caluclus with:
- HOAS-only representation
- Lossless printing
- Bidirectional checking
- Efficient evaluation & conversion checking
Inspired by https://gist.github.com/Hirrolot/27e6b02a051df333811a23b97c375196
@CGArtPython
CGArtPython / add_asset_from_user_asset_lib.py
Created November 24, 2024 21:13
[Blender Python] Add an asset from the User Asset Library into the scene (vidoe explination https://www.skool.com/cgpython/make-a-button-to-add-a-model?p=abc92a32)
import pathlib
import bpy
def find_user_asset_dir():
user_lib_index = bpy.context.preferences.filepaths.asset_libraries.find("User Library")
if user_lib_index == -1:
return None
user_asset_lib = bpy.context.preferences.filepaths.asset_libraries[user_lib_index]
@gamba
gamba / swisslotto_1970-01-10_1979-03-31.csv
Last active December 15, 2024 16:30
A csv summary of all Swiss Lotto draws since 1970. https://www.swisslos.ch/
Draw Numbers Complementary #
1979-03-31 [2, 8, 17, 19, 21, 40] 1
1979-03-24 [3, 0, 5, 16, 35, 36] 37
1979-03-17 [0, 5, 6, 12, 19, 29] 39
1979-03-10 [12, 18, 2, 0, 25, 35] 38
1979-03-03 [3, 4, 11, 21, 27, 32] 37
1979-02-24 [5, 6, 14, 24, 34, 36] 26
1979-02-17 [5, 9, 17, 18, 20, 28] 29
1979-02-10 [6, 11, 18, 27, 32, 40] 13
1979-02-03 [6, 13, 23, 32, 36, 39] 9
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 15, 2024 16:29
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under User Settings -> Gift Inventory
@olebedev
olebedev / README.md
Last active December 15, 2024 16:25
LLM CLI in Nix

Installation

nix-env -i -f ./default.nix
@cortez24rus
cortez24rus / README.md
Created December 15, 2024 16:23 — forked from gilangvperdana/README.md
Install GeoIP for Nginx

General

  • If you want to see your client website region, you can install GeoIP module on Nginx
  • The project I've worked on, using (Filebeat, Logstash, Elasticsearch) after GeoIP is installed then visualized using Kibana or Grafana : image

Installation

sudo apt update
sudo apt install libnginx-mod-http-geoip
@dineshsaini
dineshsaini / gist:caf8fb2d53b315cf32f0d55092ef4c0e
Last active December 15, 2024 16:18
make gnome tracker disable or stop completely
#!/usr/bin/env bash
# make tracker3 daemon non workable & idompotent
# this script will reset its settings, and configure tracker3 daemon, to not let it do anyting.
# if other code has dependency on this tracker, then it will not break, but we also do achieve our goal.
# interpretation for org.freedesktop.Tracker3.Miner.Files enable-monitor from this file
# https://gitlab.gnome.org/GNOME/tracker-miners/-/blob/master/src/miners/fs/tracker-config.c
#Time in seconds before crawling filesystem (0->1000)