Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
| """ | |
| 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 |
| llmc() { | |
| local system_prompt='Output a command that I can run in a ZSH terminal on macOS to accomplish the following task. Try to make the command self-documenting, using the long version of flags where possible. Output the command first enclosed in a "```zsh" codeblock followed by a concise explanation of how it accomplishes it.' | |
| local temp_file=$(mktemp) | |
| local capturing=true | |
| local command_buffer="" | |
| local first_line=true | |
| local cleaned_up=false # Flag to indicate whether cleanup has been run | |
| cleanup() { | |
| # Only run cleanup if it hasn't been done yet |
| export const intersperse = <T>(arr: T[], separator: (n: number) => T): T[] => | |
| arr.flatMap(arr, (a, i) => i > 0 ? [separator(i-1), a] : [a])) |
| import useSWR from '@zeit/swr'; | |
| import localForage from 'localforage'; | |
| import { ConfigInterface } from '@zeit/swr/dist/src/types'; | |
| import { useState, useEffect } from 'react'; | |
| export function usePersistentSWR(key: string, fn?: Function, config?: ConfigInterface) { | |
| let handleSuccess; | |
| if (config !== undefined && config.onSuccess !== undefined) { | |
| const { onSuccess } = config; | |
| handleSuccess = (data: any, key: string, config: ConfigInterface) => { |
Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
Please see the original article for a full explanation. Please feel free to comment, question and criticize there as well!
Requires https://www.npmjs.com/package/simple-free-encryption-tool
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install it.