Skip to content

Instantly share code, notes, and snippets.

@opencoca
opencoca / index.pug
Created February 7, 2023 14:05
Less Flex cards
header
img(src='https://source.unsplash.com/random/901x200/?example', alt='Example Image', style=' --w:100% ')
section.wow.animate__fadeIn(style='--p: 2rem; --ta: center')
h1 Heading Level 1
h2 Heading Level 2
h3 Heading Level 3
h4 Heading Level 4
h5 Heading Level 5
@opencoca
opencoca / BuildnRun.sh
Last active December 22, 2022 13:19
BuildnRun.sh is a straightforward bash script that streamlines and standardizes the process of building and tagging Docker images
#!/bin/bash
# Version 1.3
# Copyright (c) Startr LLC. All rights reserved.
# This script is licensed under the GNU Affero General Public License v3.0.
# For more information, see https://www.gnu.org/licenses/agpl-3.0.en.html
# OpenCo™ Cocom Build 'n' Run Script
# This simple script builds and runs this directory 's Dockerfile Image
@opencoca
opencoca / APAstyle
Created September 18, 2022 23:02 — forked from pdparker/APAstyle
APA Style for Markdown
/* I have only tested this on Chrome but it
prints nicely to A4 size */
@media print {
body {
width: 210mm;
height: 297mm;
}
}
@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