Skip to content

Instantly share code, notes, and snippets.

View vitorcalvi's full-sized avatar
🎯
Focusing

Carlos Vitor Botti Calvi vitorcalvi

🎯
Focusing
View GitHub Profile
@vitorcalvi
vitorcalvi / setup-ai-stack.md
Last active April 7, 2025 07:27
EVO-X1 34GB Machine Learning Device Setup
@vitorcalvi
vitorcalvi / gist:b29cf640e13e161367c7303306991c44
Created March 20, 2025 16:31
Benchmark llam_cpp: AVX2 vs SSE4 matrix ops
#!/usr/bin/env python3
import os
import re
import json
import signal
import subprocess
import concurrent.futures
from datetime import datetime
import argparse
## Max Token
python -m llama_cpp.server --model DeepSeek-R1-Distill-Qwen-1.5B-Q4_1.gguf --host 0.0.0.0 --n_threads 8 --n_batch 512 --n_gpu_layers 0 --n_ctx 2048 --mul_mat_q 1
# Balanced
python -m llama_cpp.server --model DeepSeek-R1-Distill-Qwen-1.5B-Q4_1.gguf --host 0.0.0.0 --n_threads 8 --n_batch 32 --n_gpu_layers 0 --n_ctx 512 --mul_mat_q 1 --offload_kqv 1
## VULKAN
@vitorcalvi
vitorcalvi / go.sh
Created January 31, 2025 08:34
Docker - DeepSeek 1.5B - RAG
#!/bin/bash
# Stop script on error
set -e
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
@vitorcalvi
vitorcalvi / install_talib.sh
Created January 20, 2025 21:43
install ta-lib
#!/bin/bash
# Set TA-Lib version
PYTHON_TA_LIB_VERSION="0.4.28"
# Update package list and install dependencies
echo "Updating package list and installing dependencies..."
sudo apt-get update
sudo apt-get install -y build-essential wget libcurl4-openssl-dev python3-dev python3-pip
#!/usr/bin/env bash
#
# llm_setup.sh - Universal LLM setup script with CPU compatibility check
#
# This script checks CPU compatibility and sets up either vLLM (if AVX2/AVX512 available)
# or llama.cpp (if not available)
set -euo pipefail
###############################################################################
# Helper functions
@vitorcalvi
vitorcalvi / Mailu_SMTP.md
Last active January 1, 2025 17:39 — forked from WebSofter/README.md
Mailu configuration for SMTP implementation

Instruction

Instal docker

sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io && sudo usermod -aG docker ${USER}

@vitorcalvi
vitorcalvi / outbound-email-with-cloudflare.md
Created December 29, 2024 13:26 — forked from 6220119/outbound-email-with-cloudflare.md
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@vitorcalvi
vitorcalvi / ComfyUImacInstall.sh
Last active December 30, 2024 08:38
ComfyUI Mac Silicon
#!/bin/bash
set -e
# Install dependencies
brew install llvm libomp [email protected]
# Set up LLVM paths
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export CC=$(brew --prefix llvm)/bin/clang
export CXX=$(brew --prefix llvm)/bin/clang++
import os
import logging
import requests
from alpaca.data.historical.news import NewsClient
from alpaca.data.requests import NewsRequest
from datetime import datetime
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()