Skip to content

Instantly share code, notes, and snippets.

View abhillman's full-sized avatar
:shipit:

Aryeh Hillman abhillman

:shipit:
View GitHub Profile
@abhillman
abhillman / SoYouWantToBeASeedAIProgrammer.md
Last active November 2, 2025 04:28
So You Want To Be A Seed AI Programmer

So You Want To Be A Seed AI Programmer

Written by Eliezer Yudkowsky

The First Thing to Remember

Not everyone needs to be a seed AI programmer. SIAI will probably need at least 20 regular donors per working programmer, perhaps more. There is nothing wrong with being one of those donors. It is just as necessary.

Please bear this in mind. Sometimes it seems like everyone wants to be a seed AI programmer; and that, of course, is simply not going to work. Too many would-be cooks, not enough ingredients. You may not be able to become a seed AI programmer. In fact it is extremely likely that you can't. This should not break your heart. You can learn seed AI after the Singularity, if we live through it and we're all still human-sized minds - learn the art of creating a mind when it's safe, when you can relax and have fun learning, stopping to smell the roses whenever you feel like it, instead of needing to push as hard as possible.

Meanwhile, before the Singu
@abhillman
abhillman / python311
Last active November 3, 2023 04:53
Wrapped version of Python 3.11 for allowing nix-managed python with IntelliJ/PyCharm
#!/bin/bash
# Use of python311 with dependencies, binaries, and other aspects of the environment with nix under IntelliJ.
# Instruct IntelliJ to use this script by specifying a path to this file as the "system" python interpreter.
# Make sure this file is named `python311` (IntelliJ may otherwise reject it) executable by running `chmod +x ...``.
#
# If a `shell.nix` file is located in the same path as this wrapper script, its contents will be used in addition to
# the dependencies listed below via `-p`.
#
# Copyright (C) 2032 Aryeh Hillman ([email protected])
# Permission to copy and modify is granted under the AGPLv3 license
@abhillman
abhillman / nix.lorri.plist
Last active January 3, 2023 07:39
systemd for nix's lorri daemon
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nix.lorri</string>
<key>ProgramArguments</key>
<array>
<string>lorri</string>
<string>daemon</string>
import Network.HTTP.Conduit (simpleHttp)
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as C
import Text.XML.HXT.Core
import Data.List
urbanDictionaryURL :: String
urbanDictionaryURL = "https://www.urbandictionary.com/random.php"
getRandomUrbanEntry :: IO String
@abhillman
abhillman / remove_comments.py
Created November 24, 2014 03:03
Little program to remove c-like comments given from input via standard in
#!/usr/bin/python
# Little program to remove c-like comments from input given via standard in
import fileinput
from sys import stdout
COMMENT_OPEN = False
OPEN_COMMENT = '/*'
CLOSE_COMMENT = '*/'
OPEN_COMMENT_IDX = 0
CLOSE_COMMENT_IDX = 0
{-
Module: urban.hs
Description: Grabs example sentences for a random term from Urban Dictionary
Copyright: June 18, 2014
License: MIT
Maintainer: [email protected]
Stability: experimental
Portability: portable
@abhillman
abhillman / JSONMiddleware.py
Last active April 20, 2016 06:04
Django Middleware to add request.JSON to any HTTP requests that (1) are ajax and (2) are application/json content type.
from django.utils import simplejson
class JSONMiddleware(object):
def process_request(self, request):
request.JSON = None
if request.is_ajax():
if request.META.get('CONTENT_TYPE').count('application/json'):
try:
request.JSON = simplejson.loads(request.body)
except simplejson.JSONDecodeError: