Skip to content

Instantly share code, notes, and snippets.

@eliyastein
eliyastein / microgpt.py
Created March 1, 2026 03:00 — forked from karpathy/microgpt.py
microgpt
"""
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
@eliyastein
eliyastein / portfolio_checker.rb
Created May 23, 2017 21:12 — forked from bplunkert/portfolio_checker.rb
Cryptocurrency portfolio checker
#!/usr/bin/env ruby
balances = {
'BTC' => 0,
'DASH' => 0,
'ETH' => 0,
'LTC' => 0,
'NMC' => 0,
'XMR' => 0
}
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@eliyastein
eliyastein / 70e04a67f1f5fd96a708.md
Created March 31, 2017 18:06 — forked from oshliaer/70e04a67f1f5fd96a708.md
Extract Gmail content to a spreadsheet #gas #gmail #sheet
function ybWidth(){
var w = window,
d = document,
e = d.documentElement,
x = Math.max(e.scrollWidth,e.offsetWidth,e.clientWidth);
return x;
}
var psn;
@eliyastein
eliyastein / uri.js
Created January 31, 2017 03:52 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"