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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/socket.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #define PORT 80 |
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
| #r "nuget: FsHttp" | |
| #r "nuget: Spectre.Console.ImageSharp" | |
| open FsHttp | |
| open Spectre.Console | |
| let imgUrl = | |
| "https://banner2.cleanpng.com/20200525/frt/transparent-hero-image-hero-logo-cartoon-5ecc928ba8c9a0.2212187815904651636914.jpg" |
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
| #r "nuget:Microsoft.ML" | |
| #r "nuget:Microsoft.ML.OnnxRuntime" | |
| #r "nuget:Microsoft.ML.OnnxTransformer" | |
| #r "nuget:Microsoft.ML.ImageAnalytics" | |
| #r "nuget:System.Drawing.Common" | |
| open System.IO | |
| open System.Drawing | |
| open Microsoft.ML | |
| open Microsoft.ML.Data |
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
| { | |
| "final_space": true, | |
| "console_title": true, | |
| "console_title_style": "folder", | |
| "blocks": [ | |
| { | |
| "type": "prompt", | |
| "alignment": "left", | |
| "horizontal_offset": 0, | |
| "vertical_offset": 0, |
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
| "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" | |
| " " | |
| " __ _ _ _ __ ___ _ __ ___ " | |
| " \ \ / / | '_ ` _ \| '__/ __| " | |
| " \ V /| | | | | | | | | (__ " | |
| " \_/ |_|_| |_| |_|_| \___| " | |
| " " | |
| " " | |
| "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" |
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
| #include <cstdlib> | |
| #include <iostream> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| #define length(x) (sizeof(x)/sizeof(x[0])) | |
| using namespace std; | |
| int convolucion () |
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
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
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 F# dojo is directly inspired by the | |
| // Digit Recognizer competition from Kaggle.com: | |
| // http://www.kaggle.com/c/digit-recognizer | |
| // The datasets below are simply shorter versions of | |
| // the training dataset from Kaggle. | |
| // The goal of the dojo will be to | |
| // create a classifier that uses training data | |
| // to recognize hand-written digits, and | |
| // evaluate the quality of our classifier |