Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / GPT-4 Reverse Turing Test.md
Last active October 8, 2024 02:59
GPT-4 Reverse Turing Test

The reverse turing test

I asked GPT-4 to come up with 10 questions to determine if the answerer was AI or human.

I provided my own answers for these questions and I also asked ChatGPT to answer them.

The result is that GPT-4 was able to correctly differentiate between AI and Human.

@rain-1
rain-1 / LLM.md
Last active April 8, 2025 13:49
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.

@Gavinok
Gavinok / chatgpt.el
Last active October 20, 2024 01:10
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,
@sts10
sts10 / rust-command-line-utilities.markdown
Last active April 27, 2025 15:15
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@Trapez
Trapez / gist:58d1526f7c06584af99e08709069f54d
Last active February 15, 2024 14:05
Spacemacs python configuration
Spacemacs python
Configure python layer.
(python :variables
python-lsp-backend 'lsp
python-lsp-server 'pyright
python-fill-column 99
python-formatter 'black
python-format-on-save t
python-test-runner 'pytest
@zfarbp
zfarbp / s.md
Last active April 20, 2025 19:17
Trigger Spotify with osascript

Trigger Spotify with osascript

/Applications/Spotify.app/Contents/Resources/Spotify.sdef

# read-only
osascript -e 'tell application "Spotify" to player state'                  # stopped,playing,paused
osascript -e 'tell application "Spotify" to current track'                 # The current playing track.
osascript -e 'tell application "Spotify" to artwork url of current track'  # Image data in TIFF format.
osascript -e 'tell application "Spotify" to artist of current track'       # The artist of the track.
@johngrib
johngrib / contribution.sh
Created December 31, 2018 14:58
Show github contribution graph on terminal
#! /usr/local/bin/bash
MYGITHUB=johngrib
RAW=/tmp/$MYGITHUB-github
TABLE=/tmp/$MYGITHUB-github-table
COLORS=/tmp/$MYGITHUB-github-colors
curl -s https://github.com/$MYGITHUB/ > $RAW
TITLE=`cat /tmp/johngrib-github | pcregrep -M '[0-9,]+ contributions\s*\n\s*in the last year'`
@jaimevalero
jaimevalero / extract_awesome.sh
Last active May 13, 2023 00:29
Which awesome resource has more awesomess in an awesome list
# Order an awesome list by number stars.
#
# Tis one liner scripts extracts the number of stars from each repo from a given awesome list, and order repos by the number of start
# This one liner uses jq command, so you should have it installed in your machine
# Parameter
# Awesome List to extract, in raw
AWESOME_LIST=https://raw.githubusercontent.com/pditommaso/awesome-pipeline/master/README.md
#CREDENTIALS="jaimevalero:mysecret"
CREDENTIALS="replace-for-your-github-user:replace-for-your-github-password"
Hints.characters = 'asdfgwertzxcvb';
settings.hintAlign = 'left';
settings.nextLinkRegex = /((?!first)(next|older|more|>|›|»|forward|→|次(のページ|へ))+)/i;
settings.prevLinkRegex = /((?!last)(prev(ious)?|newer|back|«|less|<|‹|←|前(のページ|へ))+)/i;
settings.focusAfterClosed = 'right';
settings.scrollStepSize = 70;
settings.smoothScroll = true;
[
'cp', ';cp', ';ap', ';s', 'spa', 'spb', 'spd', 'sps', 'spc', 'sd',