Skip to content

Instantly share code, notes, and snippets.

View SamuelMarks's full-sized avatar
:octocat:
C > Rust > Go > TypeScript > C++

Samuel Marks SamuelMarks

:octocat:
C > Rust > Go > TypeScript > C++
View GitHub Profile
@SamuelMarks
SamuelMarks / Makefile
Created August 17, 2020 08:49
Thesis Makefile. Entire Thesis will be open-sourced once the university has accepted it.
SHELL := bash
SRC_FILES = $(filter-out Thesis.tex, $(wildcard *.tex))
.PHONY: Thesis.pdf all clean
all: $(patsubst %.dot,%.svg,$(wildcard *.dot)) Thesis.pdf
%.tex:
for name in *.tex; do
echo '$< =' "$<" '$name =' "$name"
@SamuelMarks
SamuelMarks / article.md
Created June 20, 2020 09:53
Open-source isn't racist. Stop attacking us.

Recently there has been a push towards renaming 'master' to 'main' in all git repositories. Advocates reason that the terminology is noninclusive, and has racist overtones[1]--[5].

@Una @github It's a great idea and we are already working on this! cc @billygriffin22{width="6.5in" height="2.5375in"}

CEO of GitHub, [6]

The alleged offensive meaning of master and slave in computer coding is

@SamuelMarks
SamuelMarks / tpu.md
Last active January 22, 2020 00:12
Nothing to TPU in 5 Google Cloud commands

Google Cloud configuration

First: install the CLI program for your distribution: https://cloud.google.com/sdk/install

Parameters

Modify accordingly:

export REGION='us-central1'
export ZONE='us-central1-f'
export PROJECT_NAME='proj'
@SamuelMarks
SamuelMarks / transfer.bash
Created December 20, 2019 12:42
Transfer all repos on GitHub.com (api.github.com) between organisations
#!/usr/bin/env bash
organisations="$(hub api '/user/orgs' | jq -r '.[] | .login')";
repos="$(for org in $organisations; do hub api '/orgs/'"$org"'/repos' | jq -r '.[] | .name'; done)"
for org in $organisations; do
for repo in $repos; do
( hub api '/repos/'"$org"'/'"$repo"'/transfer' -F 'new_owner'='offscale' | jq . ) &
done
done
$ pip install -U pip setuptools
Requirement already up-to-date: pip in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (19.3.1)
Requirement already up-to-date: setuptools in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (41.6.0)
$ pip install -U jupyter
Requirement already up-to-date: jupyter in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (1.0.0)
Requirement already satisfied, skipping upgrade: ipykernel in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (from jupyter) (5.1.2)
Requirement already satisfied, skipping upgrade: jupyter-console in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (from jupyter) (6.0.0)
Requirement already satisfied, skipping upgrade: notebook in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (from jupyter) (6.0.1)
sudo: apt-get install -y --no-install-recommends cuda-10-0 libcudnn7=7.6.2.24-1+cuda10.0 libcudnn7-dev=7.6.2.24-1+cuda10.0
out:
out: Reading package lists... 0%
out:
out: Reading package lists... 100%
out:
out: Reading package lists... Done
out:
out:
out: Building dependency tree... 0%
This file has been truncated, but you can view the full file.
Executing task 'install_tensorflow0'
run: pip install -U pip setuptools
out: Requirement already up-to-date: pip in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (19.2.3)
out: Requirement already up-to-date: setuptools in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (41.2.0)
out:
run: pip install -U jupyter
out: Requirement already up-to-date: jupyter in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (1.0.0)
out: Requirement already satisfied, skipping upgrade: nbconvert in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (from jupyter) (5.6.0)
out: Requirement already satisfied, skipping upgrade: ipywidgets in /opt/venvs/tflow3.6.8/lib/python3.6/site-packages (from jupyter) (7.5.1)
@SamuelMarks
SamuelMarks / log.txt
Created June 22, 2019 02:25
brew install --verbose --debug musl-cross
This file has been truncated, but you can view the full file.
Updating Homebrew...
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/filosottile/homebrew-musl-cross/musl-cross.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/gnu-sed.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/make.rb
==> Installing musl-cross from filosottile/musl-cross
/usr/bin/sandbox-exec -f /private/tmp/homebrew20190622-9604-1kkd7oh.sb nice /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.3.0/gems/simplecov-cobertura-1.3.1/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.3.0/gems/ruby-macho-2.2.0/lib:/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.3.0/gems/rubocop-rspec-1.33.0/lib:/usr/local/Homebrew

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@SamuelMarks
SamuelMarks / python.rb
Last active July 29, 2020 14:15
python 3.6.8 brew formula
class Python < Formula
desc "Interpreted, interactive, object-oriented programming language"
homepage "https://www.python.org/"
url "https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz"
sha256 "35446241e995773b1bed7d196f4b624dadcadc8429f26282e756b2fb8a351193"
revision 1
bottle do
sha256 "1bc5a2d3f0a8602bf2f46de7c43fcb6dde4f110c0f4518d4e802cb1f733a43de" => :high_sierra
sha256 "131d39120ac6ca2f21bf231de7414c08916cea472bc5219e0bcb49541f77cb9f" => :sierra