This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Nobody asked for microgpt in CUDA C, which is exactly why it had to happen. | |
| // It is no longer particularly micro. | |
| // It is, however, stupidly fast. | |
| #include <cuda_runtime.h> | |
| #include <cublas_v2.h> | |
| #include <math.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * neoleo.c -- Language Emergent Organism (single-file edition) | |
| * | |
| * Complete autonomous digital organism in one C file. | |
| * D.N.A. from mini-arianna. Arianna -> Leo. Mother -> Son. | |
| * | |
| * Build: cc neoleo.c -O2 -lm -lsqlite3 -lpthread -o neoleo | |
| * Run: ./neoleo | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| microgpt2.py | |
| A dependency-free, single-file GPT-style language model in pure Python. | |
| Key properties: | |
| - stdlib only | |
| - explicit forward/backward kernels (no generic scalar autograd) | |
| - flat float32 parameter buffers using array('f') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * postgpt.c — zero-dependency BPE transformer with metaweights. | |
| * | |
| * C port of postgpt.py. Same algorithm, same resonance. | |
| * Dual attention: Content (QK^T) + RRPRAM (x @ Wr). | |
| * Metaweights: statistical probability space from BPE tokenization. | |
| * | |
| * Compile: gcc -O2 -o postgpt postgpt.c -lm | |
| * Run: ./postgpt | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: ================================================================ | |
| :: BATCH SCRIPT FOR AUTOMATED PHOTOGRAMMETRY TRACKING WORKFLOW | |
| :: By polyfjord - https://youtube.com/polyfjord | |
| :: ================================================================ | |
| :: USAGE | |
| :: • Double-click this .bat or run it from a command prompt. | |
| :: • Frames are extracted, features matched, and a sparse | |
| :: reconstruction is produced automatically. | |
| :: • Videos that have already been processed are skipped on | |
| :: subsequent runs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Exit on error | |
| set -e | |
| # Log file | |
| LOG_FILE="./versioned_vfox_install.log" | |
| # Utils | |
| print_loader() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <main data-active-index="0" data-debug="false"> | |
| <div class="card-stack"> | |
| <div class="card"><img src="https://assets.codepen.io/215059/card-stack-demo-05.jpg" /></div> | |
| <div class="card"><img src="https://assets.codepen.io/215059/card-stack-demo-04.jpg" /></div> | |
| <div class="card"><img src="https://assets.codepen.io/215059/card-stack-demo-06.jpg" /></div> | |
| <div class="card"><img src="https://assets.codepen.io/215059/card-stack-demo-07.jpg" /></div> | |
| <div class="card"><img src="https://assets.codepen.io/215059/card-stack-demo-08.jpg" /></div> | |
| </div> | |
| <div class="scroller"> | |
| <div class="scroll-item"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This method works only when pdf is rendered with Text Layer | |
| // It compares particular text/word element coordinates with | |
| // the rectangle's coordinates. If text/word coordinates is in | |
| // the rectangle, text has got. And successing texts are similar. | |
| // Check out text layer rendering option at the article below. | |
| // https://www.sitepoint.com/custom-pdf-rendering/ | |
| function getTextInRect(pageNumber, Xi, Yi, Xl, Yl) { // modify pageNumber if required | |
| // Get the page if page render method works like (page-1, page-2, ...) | |
| // If not, modify according to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var scientificToDecimal = function (num) { | |
| var nsign = Math.sign(num); | |
| //remove the sign | |
| num = Math.abs(num); | |
| //if the number is in scientific notation remove it | |
| if (/\d+\.?\d*e[\+\-]*\d+/i.test(num)) { | |
| var zero = '0', | |
| parts = String(num).toLowerCase().split('e'), //split into coeff and exponent | |
| e = parts.pop(), //store the exponential part | |
| l = Math.abs(e), //get the number of zeros |
NewerOlder