Skip to content

Instantly share code, notes, and snippets.

View opencoca's full-sized avatar
😅
Trapped working in paradise!

OpenCo opencoca

😅
Trapped working in paradise!
View GitHub Profile
@opencoca
opencoca / requirements.txt
Last active November 4, 2021 00:50
GPT-J-6B Inference.ipynb working requirements.txt as of Nov 3 2021
numpy~=1.19.5
tqdm~=4.45.0
wandb>=0.11.2
einops~=0.3.0
requests~=2.25.1
fabric~=2.6.0
optax==0.0.6
git+https://github.com/deepmind/dm-haiku
git+https://github.com/EleutherAI/lm-evaluation-harness/
ray[default]==1.4.1
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>capture microphone audio into buffer</title>
</head>
<body>
<audio id="player" controls></audio>
<input
type="text"
id="username"
@opencoca
opencoca / gpt-j-vue-code-example-this-code-was-generated.markdown
Created September 1, 2021 11:31
GPT J Vue Code example (this code was generated)
@opencoca
opencoca / game_logic.js
Last active February 8, 2021 00:22
https://threejs.org/editor/ Arkanoid game logic with added sound (optimized for Raspberry Pi)
function beep() {
var snd = new Audio("data:audio/wav;base64,//uQRAAAAWMSLwUIYAAsYkXgoQwAEaYLWfkWgAI0wWs/ItAAAGDgYtAgAyN+QWaAAihwMWm4G8QQRDiMcCBcH3Cc+CDv/7xA4Tvh9Rz/y8QADBwMWgQAZG/ILNAARQ4GLTcDeIIIhxGOBAuD7hOfBB3/94gcJ3w+o5/5eIAIAAAVwWgQAVQ2ORaIQwEMAJiDg95G4nQL7mQVWI6GwRcfsZAcsKkJvxgxEjzFUgfHoSQ9Qq7KNwqHwuB13MA4a1q/DmBrHgPcmjiGoh//EwC5nGPEmS4RcfkVKOhJf+WOgoxJclFz3kgn//dBA+ya1GhurNn8zb//9NNutNuhz31f////9vt///z+IdAEAAAK4LQIAKobHItEIYCGAExBwe8jcToF9zIKrEdDYIuP2MgOWFSE34wYiR5iqQPj0JIeoVdlG4VD4XA67mAcNa1fhzA1jwHuTRxDUQ//iYBczjHiTJcIuPyKlHQkv/LHQUYkuSi57yQT//uggfZNajQ3Vmz+Zt//+mm3Wm3Q576v////+32///5/EOgAAADVghQAAAAA//uQZAUAB1WI0PZugAAAAAoQwAAAEk3nRd2qAAAAACiDgAAAAAAABCqEEQRLCgwpBGMlJkIz8jKhGvj4k6jzRnqasNKIeoh5gI7BJaC1A1AoNBjJgbyApVS4IDlZgDU5WUAxEKDNmmALHzZp0Fkz1FMTmGFl1FMEyodIavcCAUHDWrKAIA4aa2oCgILEBupZgHvAhEBcZ6joQBxS76AgccrFlczBvKLC0QI2cBoCFvfTDAo7eoOQInqDPBtvrDEZBNYN5xwNwxQRfw8ZQ5wQVLvO8OYU+mHvFLlDh05Mdg7BT6YrRPpCBznMB2r//xKJjyyOh+cImr2/4doscwD6neZjuZR4AgAABYAAAABy1xcdQtxYBYYZdifkUDgzzXaXn98Z0oi9ILU5mBjFANm
@opencoca
opencoca / Box.jscad
Last active January 17, 2021 20:40
A jscad script used to generate simple storage boxes.
// title : Box
// author : Alexander Somma
// license : MIT License
// description: A box for storing things
// file : Box.jscad
function main (params) {
CSG.defaultResolution2D = (params.quality === 'DRAFT') ? 8 : 32;
var bottomradius = params.bottomdiameter / 2;
@opencoca
opencoca / cheap-ai-chess.markdown
Created January 15, 2021 20:28
Cheap AI Chess!

Cheap AI Chess!

A wonderful opportunity to beat a computer at chess!

Play against a friend, a totally random AI, or wager money as it plays against itself. I'm sure there are still bugs in here but hey, happy new year.

Play together online using Mozilla's Together JS

A Pen by Alexander Somma on CodePen.

# install pyenv
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
@opencoca
opencoca / node_setup.sh
Last active December 31, 2020 23:38
Setup the latest Node, NPM, and Yarn on a Debian based system
sudo apt-get install gcc g++ make && sudo apt-get install -y nodejs && curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && sudo apt-get update && sudo apt-get install yarn
@opencoca
opencoca / index.html
Last active November 19, 2020 20:04
Video Recording Test
<h1><a href="//webrtc.github.io/samples/" title="WebRTC samples homepage">WebRTC samples</a>
<span>MediaRecorder</span></h1>
<p>For more information see the MediaStream Recording API <a
href="http://w3c.github.io/mediacapture-record/MediaRecorder.html"
title="W3C MediaStream Recording API Editor's Draft">Editor's&nbsp;Draft</a>.</p>
<video id="gum" playsinline autoplay muted></video>
<video id="recorded" playsinline loop></video>
var localMessages = {};
document.getElementById('comments')
.innerHTML = `<div id="commentInput">
<input id="commentName" type="text" placeholder="Little Learner"><br/>
<textarea id="commentMessage" placeholder="Your message here"></textarea><br/>
<button onclick="submitComment(this)">Submit Comment</button></div>
<div id="commentList"></div>`;
function getComments() {
console.log('getting messages')