Skip to content

Instantly share code, notes, and snippets.

@Kartones
Kartones / postgres-cheatsheet.md
Last active October 15, 2024 22:54
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@Fusl
Fusl / gist:3a708b8c32c9d5264fa0
Last active October 15, 2024 22:53
Streaming audio output from Linux (Pulseaudio) to Windows
# Windows (receiver) side:
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1
# Linux (transmitter) side:
pactl load-module module-null-sink sink_name=remote
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181"
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device.
@Priva28
Priva28 / AudioPlayThrough.swift
Last active October 15, 2024 22:51
This is a basic Swift function that allows for incoming system audio to be played to the system output. It uses the modern Swift syntax for setting up and using RemoteIO Audio Units. I hope someone can use it to avoid the pains of having to use AVAudioEngine and understand how to setup RemoteIO Audio Units in Swift just a little bit easier :)
// This is a basic Swift function that allows for incoming system audio (like the microphone or USB input) to be
// played to the system output. It uses the modern Swift syntax for setting up and using RemoteIO Audio Units.
// Of course, before running this function, you would have to setup your AVAudioSession with the playAndRecord category,
// as well as whatever other options you might like. This is just a barebones function that demonstrates the capability
// and you should implement some better error handling and respond to audio session route changes or interruptions.
// I've only created this gist because even though it seems like it would be a simple thing, there is essentially
// zero documentation on anyone trying to do this on the entire internet, and if there was any, it was basically
// ancient and using Objective-C and outdated APIs. Now with this I hope someone can use it to avoid the pains of
// having to use AVAudioEngine and understand how to setup RemoteIO Audio Units in Swift just
@MBing
MBing / install_wlan_dongle.sh
Last active October 15, 2024 22:51
install TP-Link-WN725N Nano USB Wifi on Raspberry Pi with Kernel 5.10+
# DO NOT PUT THE WIFI DONGLE IN THE DEVICE BEFORE MENTIONED EXPLICITLY BELOW
# Brief note, after this the UI will not show the usb dongle,
# the wifi does work and I get an IP address, so all works,
# but I don't go into detail of making it show on the Raspbian UI.
# (for this purpose I don't care about the UI)
# For the use of this I connected my device to an ethernet connection and through the Router could see the IP which I can SSH into.
## STEP 1: Prepare machine and install packages needed
[SERVICE]
Flush 5
Daemon Off
Log_Level info
Parsers_File /etc/fluent-bit/parsers.conf
[INPUT]
Name Tail
Path /mnt/data/docker/containers/*/*.log
Path_Key file
@Pusnow
Pusnow / CS 분야 우수 학술대회 목록.csv
Last active October 15, 2024 22:47
CS 분야 우수 학술대회 목록
약자 한국정보과학회 (2020) BK21플러스 IF (2018) KAIST CS (2022) SNU CSE (2024.4) POSTECH CSE (2023.10) 평균 (정규화) 학회명 DBLP Key
AAAI 최우수 4 O O 최우수 1.00 AAAI Conference on Artificial Intelligence (AAAI) conf/aaai
AAMAS 우수 2 0.20 International Joint Conference on Autonomous Agents & Multiagent Systems (AAMAS) conf/atal
ACCV 우수 1 우수 0.25 Asian Conference on Computer Vision (ACCV) conf/accv
ACL 최우수 4 O O 최우수 1.00 Annual Meeting of the Association for Computational Linguistics (ACL) conf/acl
ACL Findings 우수 0.10 Findings of ACL series/findacl
ACSAC 우수 2 우수 0.30 Annual Computer Security Applications Conference (ACSAC) conf/acsac
AIED 우수 0.10 International Conference on Artificial Intelligence in Education (AIED) conf/aied
AISTATS 우수 1 우수 0.25 International Conference on Artificial Intelligence and Statistics (AISTATS) conf/aistats
ANCS 우수 1 우수 0.25 Symposium on Architectures for Networking and Communications Systems (ANCS) conf/ancs
@palewire
palewire / new-school.ipynb
Created October 15, 2024 16:28
"New School" LLM Classifier
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@palewire
palewire / old-school.ipynb
Created October 15, 2024 16:25
"Old School" Machine Learning Classifier
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nvs-abhilash
nvs-abhilash / rotate_contour.py
Last active October 15, 2024 22:40
Helper function to resize and rotate contours using OpenCV
import cv2
import numpy as np
def cart2pol(x, y):
theta = np.arctan2(y, x)
rho = np.hypot(x, y)
return theta, rho
layout title description path
barewithrelated
Book Authoring Using GitHub and Git
Formats, tips and techniques for using GitHub and Git as the version control and collaborative platform for writing short and long form books.
usecases/_posts/2001-01-01-book-authoring-using-git-and-github.md

GitHub and Git are not just for writing programming code. They can also be an effective tool for writing articles and books. Matthew McCullough has written a quick guide to writing books in lightweight formats. This article will be folded into this Teaching repository over the coming months.

What is this?