Skip to content

Instantly share code, notes, and snippets.

Avatar

Sean Jensen-Grey seanjensengrey

View GitHub Profile
@seanjensengrey
seanjensengrey / bitter_lesson.md
Created Sep 11, 2021
computation advances faster than heuristics
View bitter_lesson.md

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

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

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.

View ipc_test.md
View set_chance.py
# 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 Feb 16, 2020
throttling mdworker on osx
View osx_cpulimits.sh
#! /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).
View destructure.md
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
View java10_xx_options.md

$java -XX:+PrintFlagsFinal -version

[Global flags]
ccstrlist AOTLibrary                               =                                          {product} {default}
      int ActiveProcessorCount                     = -1                                       {product} {default}
    uintx AdaptiveSizeDecrementScaleFactor         = 4                                        {product} {default}
    uintx AdaptiveSizeMajorGCDecayTimeScale        = 10                                       {product} {default}
    uintx AdaptiveSizePolicyCollectionCostMargin   = 50                                       {product} {default}
    uintx AdaptiveSizePolicyInitializingSteps      = 20                                       {product} {default}
View logo_memo.md
Logo Memo 1 AIM-246.pdf A Computer Laboratory For Elementary Schools
Logo Memo 2 AIM-247.pdf Teaching Children Thinking
Logo Memo 3 AIM-248.pdf Twenty Things To Do With A Computer
Logo Memo 4 AIM-249.pdf Teaching Children To Be Mathematicians vs. Teaching About Mathematics
Logo Memo 5 AIM-254.pdf NIM: A Game-Playing Program
Logo Memo 6 AIM-264.pdf Developing A Musical Ear: A Ne