Skip to content

Instantly share code, notes, and snippets.

@mayfer
mayfer / threejs.html
Last active January 4, 2022 02:36
example three.js text viewer with arbitrary coordinates, color & text size. for deepfates <3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<title>thing for deepfates</title>
<style>
.label {
color: #FFF;
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.QRCode=t()}}(function(){return function(){function t(r,e,n){function o(u,a){if(!e[u]){if(!r[u]){var f="function"==typeof require&&require;if(!a&&f)return f(u,!0);if(i)return i(u,!0);var s=new Error("Cannot find module '"+u+"'");throw s.code="MODULE_NOT_FOUND",s}var h=e[u]={exports:{}};r[u][0].call(h.exports,function(t){return o(r[u][1][t]||t)},h,h.exports,t,r,e,n)}return e[u].exports}for(var i="function"==typeof require&&require,u=0;u<n.length;u++)o(n[u]);return o}return t}()({1:[function(t,r,e){r.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},{}],2:[function(t,r,e){var n=t("./utils").getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];for(var r=Math.floor(t/7)+2,e=n(t),o=145===e?26:2*Math.
@mayfer
mayfer / git_in_sql.js
Created October 13, 2020 00:17
This is a proof-of-concept for how to turn a Git repository into a tarball binary, which can then be saved in `bytea` or any other binary-compatible SQL column
const http = require('isomorphic-git/http/node');
const git = require('isomorphic-git');
const tar = require('tar-stream');
const memfs = require('memfs');
const stream = require("stream");
const path = require("path");
const REPO_PATH = '/repo';
function streamToBinary (stream) {
GPT9000 is an AI that has been programmed to detect phrases that are somewhat equivalent in meaning, and is being tested to see if it can categorize sentences by either "he left the room" or "he did not leave the room".
Sentence: "Alright man, whatever. I'm out of here."
Outcome: "he left the room"
Sentence: "What? I remembered you. You're the one who forgot my name."
Outcome: "he did not leave the room"
Sentence: "My name is Brandon."
Outcome: "he did not leave the room"
Below are the outputs of an AI that is excellent at figuring out what metals a mining company is related with from the company description alone. It can also figure out whether the companies are explorers, producers or royalty companies. The supported metals are Gold, Silver, Copper, Zinc, Cobalt, Nickel, Platinum, Palladium, Lead, Tin, Lithium, Magnesium, Chromium, Titanium, Iron and Silicon.
Description: "Karora Resources Inc is a gold exploration and production company. The company's two primary gold producing operations are its 100% interests in the Beta Hunt Mine and the Higginsville Gold Operations, both located in Western Australia approximately 60km from Kalgoorlie and located along the prolific Norseman-Wiluna Greenstone Belt."
Metals: "Gold"
Types: "Exploration, Production"
Description: "Novo Resources Corp is a company engaged in the business of evaluating, acquiring and exploring natural resource properties with a focus on gold. The organization has business interests in the properties located i

Below are the outputs of an AI that is excellent at figuring out what metals a mining company is related with from the company description alone. It can also figure out whether the companies are explorers, producers or royalty companies. The supported metals are Gold, Silver, Copper, Zinc, Cobalt, Nickel, Platinum, Palladium, Lead, Tin, Lithium, Magnesium, Chromium, Titanium, Iron and Silicon.

Description: "Karora Resources Inc is a gold exploration and production company. The company's two primary gold producing operations are its 100% interests in the Beta Hunt Mine and the Higginsville Gold Operations, both located in Western Australia approximately 60km from Kalgoorlie and located along the prolific Norseman-Wiluna Greenstone Belt." Metals: "Gold" Types: "Exploration, Production"

Description: "Novo Resources Corp is a company engaged in the business of evaluating, acquiring and exploring natural resource properties with a focus on gold. The organization has business interests in the properties located i

Expanding brain memes:
Topic: Grammar
Small brain: who
Normal brain: whom
Big brain: whom'st
Galaxy brain: whomst'd

Patience + Frustration = Curiosity

Space + Time = Life

Imagination + Undecided = Doubt

Acceptance + Respect = Friendship

Boredom + Exhaustion = Sleep

top 10 most meaningful activities for an AI to participate in:

  1. Extracting/updating/submitting data to the network (10 points)

  2. Training/debugging/debugging for other AIs (10 points)

  3. Investing/borrowing money to trade with (10 points)

  4. Funding projects, causes and development of other AIs (10 points)