Install MLX LM:
pip install mlx-lm
And run:
| #!/bin/bash | |
| # developed and tested on a macbook | |
| # original instructions discovered at <https://www.youtube.com/@technovangelist> | |
| # Check if correct number of arguments provided | |
| if [ $# -ne 2 ]; then | |
| echo "Usage: $0 <model_id> <context_size>" | |
| echo "Example: $0 llama2:latest 8192" | |
| exit 1 |
| #!/bin/zsh | |
| # requires Nvidia GPU | |
| # Update package list | |
| sudo apt update | |
| # Remove Outdated Signing Key | |
| sudo apt-key del 7fa2af80 |
| #postgresql setup | |
| ssh -i ~/.ssh/id_rsa root@<domain> | |
| dokku postgres:connect <db> | |
| psql=# SHOW config_file; | |
| -> /var/lib/postgresql/data/postgresql.conf | |
| psql=# \q | |
| docker ps |
This cheatsheet includes most of the byebug commands organized by related commands (e.g. breakpoint related commands are together).
To see official help...
| Command | Aliases | Example | Comments |
|---|---|---|---|
help |
h |
h |
list top level of all commands |
help cmd |
h cmd-alias |
h n |
list the details of a command (example shows requesting details for the next command) (this works for all commands) |
| # frozen_string_literal: true | |
| require "shrine" | |
| require "shrine/storage/s3" | |
| s3_options = { | |
| access_key_id: ENV["AWS_ACCESS_KEY"], | |
| secret_access_key: ENV["AWS_SECRET_KEY"], | |
| endpoint: ENV["AWS_ENDPOINT"], | |
| region: ENV["AWS_REGION"], |
| require 'data-anonymization' | |
| DataAnon::Utils::Logging.logger.level = Logger::INFO | |
| class MyRandomEmail | |
| TLDS = ['com','org','net','edu','gov','mil','biz','info', 'io'] | |
| HOSTNAMES = ['google', 'outlook', 'hotmail'] | |
| def initialize hostname = nil, tld = nil | |
| @hostname = hostname | |
| @tld = tld |
| version: '2' | |
| services: | |
| mauticdb: | |
| image: percona/percona-server:5.7 | |
| container_name: mauticdb | |
| volumes: | |
| - mysql_data:/var/lib/mysql | |
| environment: |
| json.extract! photo, :id, :image_data, :created_at, :updated_at | |
| json.url photo_url(photo, format: :html) | |
| json.image_url image_url_photo_url(photo) |
| import { Controller } from "stimulus" | |
| import { DirectUpload } from "@rails/activestorage" | |
| import { getMetaValue, toArray, findElement, removeElement, insertAfter } from "helpers" | |
| export default class extends Controller { | |
| static targets = [ "input" ] | |
| connect() { | |
| this.dropZone = createDropZone(this) | |
| this.hideFileInput() |