Skip to content

Instantly share code, notes, and snippets.

View rossgoodwin's full-sized avatar
💭
I may be slow to respond.

Ross Goodwin rossgoodwin

💭
I may be slow to respond.
View GitHub Profile
@rossgoodwin
rossgoodwin / verify.txt
Created July 10, 2022 18:43
Tezos verification
I am attesting that this GitHub handle rossgoodwin is linked to the Tezos account tz2H3d3VxxB24xuHB2GzhDsQNne6yYFidkGS for tzprofiles
sig:spsig1DdNYgbfJBtAAYYjsLBC4Z6sbGy3xJFeQGR9jPVaDCp3xqPUgoR2oBV2UUW38xm6JGmoWGg2KnGUMBJiRFSWuJ6nY7UodX
@rossgoodwin
rossgoodwin / index.html
Last active November 6, 2020 21:25
d3-dendrogram-example
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node circle {
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
@rossgoodwin
rossgoodwin / printF.sh
Last active July 2, 2020 23:41
What I believe to be the fastest way to print "F" billions (or trillions, quadrillions, etc) of times using BASH
#!/usr/bin/env bash
# USAGE:
# ./printF.sh <F_count> <outfile>
#
# printF.sh Copyright (C) 2020 Ross Goodwin
# This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
# This is free software, and you are welcome to redistribute it
# under certain conditions; type `show c' for details.
head -c ${1} < /dev/zero | tr '\0' '\106' | dd of=${2}
# coding: utf-8
# In[4]:
from string import punctuation
from sys import argv
def not_with_semicolon(line):
return not line[0] in punctuation
#!/bin/bash
wget https://github.com/ethereum-mining/ethminer/releases/download/v0.19.0-alpha.0/ethminer-0.19.0-alpha.0-cuda-9-linux-x86_64.tar.gz
tar -xvzf ethminer-0.19.0-alpha.0-cuda-9-linux-x86_64.tar.gz
export GPU_FORCE_64BIT_PTR=0
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
cd bin
./ethminer --farm-recheck 200 -U -S us1.ethermine.org:4444 -FS us2.ethermine.org:4444 -O 0x5e9c910618ae158a312ba4f7ad2d365a7aa1659b.Benjamin
@rossgoodwin
rossgoodwin / generate.py
Created May 23, 2019 06:36
Based on Kyle McDonald's jupyter notebook code for sampling GPT-2 models
#!/usr/bin/env python
# coding: utf-8
# In[1]:
import json
import os
import numpy as np
import tensorflow as tf
#!/usr/bin/env python3
# Usage:
# PYTHONPATH=src ./train --dataset <file|directory|glob>
import argparse
import json
import os
import numpy as np
import tensorflow as tf
import time
#!/usr/bin/env python3
# Usage:
# PYTHONPATH=src ./train --dataset <file|directory|glob>
import argparse
import json
import os
import numpy as np
import tensorflow as tf
import time
const stopRe = /\band\b|\bor\b|\bbut\b|\bnor\b|\bfor\b|\byet\b|\bso\b|\bin\b|\bon\b|\bto\b|\bof\b|\binto\b|\bwith\b|[\.\!\?\n]+|[,;:]/igm;
export default { }
// function puncStrip(text) {
// return text; // no processing
// // return text.match(puncStripRe)[1]; // kyle's processing
// }
@rossgoodwin
rossgoodwin / poems.js
Last active April 10, 2019 01:53
line trimmer
const stopRe = /\band\b|\bor\b|\bbut\b|\bnor\b|\bfor\b|\byet\b|\bso\b|\bin\b|\bon\b|\bto\b|\bof\b|\binto\b|\bwith\b|[\.\!\?]+|[,;:]/igm;
export default { }
// function puncStrip(text) {
// return text; // no processing
// // return text.match(puncStripRe)[1]; // kyle's processing
// }