Skip to content

Instantly share code, notes, and snippets.

View seanjensengrey's full-sized avatar

Sean Jensen-Grey seanjensengrey

View GitHub Profile
@seanjensengrey
seanjensengrey / bitter_lesson.md
Created September 11, 2021 20:15
computation advances faster than heuristics

source: http://www.incompleteideas.net/IncIdeas/BitterLesson.html

The Bitter Lesson

Rich Sutton

March 13, 2019

The biggest lesson that can be read from 70 years of AI research is that general methods that leverage computation are ultimately the most effective, and by a large margin. The ultimate reason for this is Moore's law, or rather its generalization of continued exponentially falling cost per unit of computation. Most AI research has been conducted as if the computation available to the agent were constant (in which case leveraging human knowledge would be one of the only ways to improve performance) but, over a slightly longer time than a typical research project, massively more computation inevitably becomes available. Seeking an improvement that makes a difference in the shorter term, researchers seek to leverage their human knowledge of the domain, but the only thing that matters in the long run is the leveraging of computation. These two need n

apt-get remove docker docker-engine docker.io containerd runc
 
apt-get install \
  apt-transport-https \
  ca-certificates \
  curl \
  gnupg \
  lsb-release

Instance level metadata urls

Both AWS and GCP, probably Azure as well, offer the ability to query instance level metadata from within the guest (and container)

Both cloud use the same IP address (169.254.169.254) internally to handle the request.

tl;dr, do a get request against the metadata url and look at the response headers.

Java and Spatialite on Debian/Ubuntu

All instructions/links/version are valid as of Oct 25, 2014

Here is how I got up-and running with the Xerial JDBC driver and libspatialite on a Ubuntu 12 x86_64 box.

Getting the Native Libraries� (sqlite3/libspatialite)

Install libspatialite dependencies:

# https://stopa.io/post/243
from collections import Counter
import random
a = ['r'] * 99 + ['w']
b = ['w'] * 99 + ['r']
t = [a,b]
@seanjensengrey
seanjensengrey / osx_cpulimits.sh
Created February 16, 2020 05:56
throttling mdworker on osx
#! /bin/bash
# from https://www.facebook.com/notes/netways/wenn-das-macbook-zu-hei%C3%9F-ist-cpulimitsh/10150313173463753/
# Description:
#
# If you want to decrease the CPU demands for an application
# you can use this very simple and ugly "hack".
# I use it when I convert videos on my MacBook Pro
# to prevent it from getting to warm. Even if the CPU is IDLE this hack
# will prevent the application to use the CPU during Sleep Time
# (in contrast to renice/nice commands which will take all IDLE time).
In [17]: (a, (b)) = (1, (2,3, ([4,5,6])))                                                                                                                     

In [18]: b                                                                                                                                                    
Out[18]: (2, 3, [4, 5, 6])

In [19]: (a, (b,e,(f))) = (1, (2,3, ([4,5,6])))                                                                                                               

In [20]: a                                                                                                                                                    
Out[20]: 1
@seanjensengrey
seanjensengrey / install_basho_otp_kerl.md
Last active July 3, 2019 17:52
Installing the Basho Maintained Erlang with Kerl

How to install Basho Erlang using Kerl.

note: Instructions for other platforms are available in the Erlang docs

install kerl

curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod +x kerl