Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
""" | |
Importable get called from file & location. | |
Based on a tweet by Ned Batchelder @nedbat | |
""" | |
import inspect | |
def where_am_i(): | |
""" Return the current filename and line number. """ | |
bf = inspect.currentframe().f_back | |
return (bf.f_globals.get("__file__", "interactive"), bf.f_lineno) |
pytest [options] [file_or_dir] [file_or_dir] ...
import operator | |
people.sort(key=operator.itemgetter('age')) | |
people.sort(key=operator.itemgetter('name')) |
# !/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
__coverage__ = 0.00 | |
__author__ = "Bruce_H_Cottman" | |
__license__ = "MIT License" | |
""" A sandbox DevOps implemented in Python. | |
Environment can vary by language, os, cpu, packages, | |
package versions.... | |
""" |
# | |
# Working through some examples from python 3 asyncio docs | |
# | |
# https://docs.python.org/3/library/asyncio.html#module-asyncio | |
# | |
import asyncio | |
import random | |
import time |
# Set the prefix to ^A. | |
unbind C-b | |
set -g prefix ^A | |
bind a send-prefix | |
# Start windows and panes at 1, not 0 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
set -g renumber-windows on |
" plugins | |
let need_to_install_plugins = 0 | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
let need_to_install_plugins = 1 | |
endif | |
call plug#begin() | |
Plug 'tpope/vim-sensible' |
Git | Perforce Command Line | P4V | Notes |
---|---|---|---|
git pull | p4 sync | get latest revision | |
n/a | p4 update | ? | Get latest revision without overwriting files that have been changed. |
git checkout | p4 edit | checkout | You plan to change a file from the version control system |
git commit | p4 submit | submit | |
git push | n/a | n/a | No perforce equivalent. There is no concept of a pure local submit in Perforce. |
# -*- coding: utf-8 -*- | |
import networkx as nx | |
import graph_tool as gt | |
def get_prop_type(value, key=None): | |
""" | |
Performs typing and value conversion for the graph_tool PropertyMap class. | |
If a key is provided, it also ensures the key is in a format that can be | |
used with the PropertyMap. Returns a tuple, (type name, value, key) | |
""" |