Skip to content

Instantly share code, notes, and snippets.

From: Elon Musk <[MASK]>
To: Greg Brockman <[MASK]>
CC: Sam Altman <[MASK]>
Date: Sun, Nov 22, 2015 at 7:48 PM
Subject: follow up from call
Blog sounds good, assuming adjustments for neutrality vs being YC-centric.
I'd favor positioning the blog to appeal a bit more to the general public -- there is a lot of value to having the public root for us to succeed -- and then having a longer, more detailed and inside-baseball version for recruiting, with a link to it at the end of the general public version.
@sdan
sdan / gist:9fd34bf561e98a798ec3ee55231bfb36
Created April 29, 2023 03:47
Running Chroma on Railway (no permanence)
1. Fork https://github.com/chroma-core/chroma ; for some reason you can't deploy images on Railway
Ensure you add PORT=8000 env var in Railway
2. Client side:
Railway doesn't allow HTTP connections so you'll need to open up SSL connections on the client side like so(for some reason this isn't properly documented):
# Set up ChromaDB client
client = chromadb.Client(Settings(

Keybase proof

I hereby claim:

  • I am sdan on github.
  • I am sdan (https://keybase.io/sdan) on keybase.
  • I have a public key ASCNnyRpRtiqmD03S9pjbggODAOBS4dFZGzajZri0yLWPgo

To claim this, I am signing this object:

#!/bin/sh
set -x
# == Swarm training (alpha release) ==
# Setup:
#
# git clone https://github.com/shawwn/gpt-2
# cd gpt-2
# git checkout dev-shard
@sdan
sdan / Creating a static copy of a dynamic website.md
Created December 30, 2019 10:43 — forked from azizur/Creating a static copy of a dynamic website.md
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.

Keybase proof

I hereby claim:

  • I am dantuluri on github.
  • I am dantuluri (https://keybase.io/dantuluri) on keybase.
  • I have a public key ASDDijB9xXBvzuQL_JlDDZ-ERVHZM0dmOYh2cXqgEd8_Awo

To claim this, I am signing this object:

@sdan
sdan / ppo.py
Created February 26, 2019 17:25
import numpy as np
import tensorflow as tf
import gym
import time
import spinup.algos.ppo.core as core
from spinup.utils.logx import EpochLogger
from spinup.utils.mpi_tf import MpiAdamOptimizer, sync_all_params, MpiAdadeltaOptimizer, MpiAdagradOptimizer, MpiFtrlOptimizer, MpiGradientDescentOptimizer, MpiMomentumOptimizer, MpiProximalAdagradOptimizer, MpiProximalGradientDescentOptimizer, MpiRMSPropOptimizer, MpiAdaMaxOptimizer, MpiAdamGSOptimizer, MpiAdamWOptimizer, MpiAddSignOptimizer, MpiGGTOptimizer, MpiLARSOptimizer, MpiLazyAdamGSOptimizer, MpiLazyAdamOptimizer, MpiMomentumWOptimizer, MpiNadamOptimizer, MpiPowerSignOptimizer, MpiShampooOptimizer
from spinup.utils.mpi_tools import mpi_fork, mpi_avg, proc_id, mpi_statistics_scalar, num_procs
import numpy as np
import math
import tensorflow as tf
from mpi4py import MPI
from spinup.utils.mpi_tools import broadcast
def flat_concat(xs):
return tf.concat([tf.reshape(x,(-1,)) for x in xs], axis=0)
@sdan
sdan / run_utils.py
Last active February 24, 2019 08:10
from spinup.user_config import DEFAULT_DATA_DIR, FORCE_DATESTAMP, \
DEFAULT_SHORTHAND, WAIT_BEFORE_LAUNCH
from spinup.utils.logx import colorize
from spinup.utils.mpi_tools import mpi_fork, msg
from spinup.utils.serialization_utils import convert_json
import base64
from copy import deepcopy
import cloudpickle
import json
import numpy as np
import numpy as np
import math
import tensorflow as tf
from mpi4py import MPI
from spinup.utils.mpi_tools import broadcast
def flat_concat(xs):
return tf.concat([tf.reshape(x,(-1,)) for x in xs], axis=0)