Skip to content

Instantly share code, notes, and snippets.

$re = qr/
. # single letter is a palindrome
|
(.) # first letter
(??{ $re })?? # apply recursivly (not interpolated yet)
\1 # last letter
/x;
@goodside
goodside / gist:3247921
Created August 3, 2012 13:56
Install virtualenv(wrapper) on Debian Squeeze
sudo aptitude install python-pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
@goodside
goodside / gist:4496435
Created January 9, 2013 20:15
Jumptap curl output
$ curl -v "http://a.jumptap.com/a/ads?l=en&pub=INVALID&site=pa_okcupid2_okcupid_mob_web&spot=pa_okcupid2_okcupid_mob_web_adspot&v=v30"
* About to connect() to a.jumptap.com port 80 (#0)
* Trying 209.94.144.164... connected
* Connected to a.jumptap.com (209.94.144.164) port 80 (#0)
> GET /a/ads?l=en&pub=INVALID&site=pa_okcupid2_okcupid_mob_web&spot=pa_okcupid2_okcupid_mob_web_adspot&v=v30 HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: a.jumptap.com
> Accept: */*
>
"""
Toy demonstration of chain-of-thought and consensus prompting using OpenAI API.
© Riley Goodside 2022
"""
import os
import re
from statistics import mode