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 / jupyter-ollama-GPU-Metal.md
Last active May 13, 2024 20:49
Jupyter Notebook Tensorflow Mac

TF JUPYTER LAB MAC METAL

conda create --name ollama python=3.10 -y && conda activate ollama && 
conda install -c apple tensorflow-deps -y && pip install tensorflow-macos && pip install tensorflow-metal && conda install notebook -y && pip install numpy  --upgrade && pip install pandas  --upgrade && pip install matplotlib  --upgrade && pip install scikit-learn  --upgrade && pip install scipy  --upgrade && pip install plotly  --upgrade && pip install jupyterlab && 
pip3 install chardet && conda activate ollama && sudo mkdir /Users/vitorcalvi/Desktop/JupyterNotebooks

Jupiter lab

@vitorcalvi
vitorcalvi / vaiiii.txt
Last active May 18, 2024 09:41
micromamba Ros2 MAC
#### Source
https://robostack.github.io/GettingStarted.html#__tabbed_1_2
# Install gazebo Mac
curl -ssL http://get.gazebosim.org | sh
# Create a ros-humble desktop environment
micromamba create -n ros_env -c conda-forge -c robostack-staging ros-humble-desktop
@vitorcalvi
vitorcalvi / Dockerfile
Last active May 6, 2024 09:13
TensorFlow and Pytorch via JupyterLab on Dockerc no password
FROM tensorflow/tensorflow:2.14.0-gpu
ARG BUILD_DATE
ENV PORT 8888
LABEL org.opencontainers.image.authors="[email protected]" \
org.opencontainers.image.vendor="Diego, Rincon-Yanez" \
org.opencontainers.image.title="Tensorflow GPU Jupyter" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.version="2.9.3" \
@vitorcalvi
vitorcalvi / Dockerfile
Created May 13, 2024 08:12 — forked from kfsone/Dockerfile
WIP Dockerfile for litellm + ollama + memgpt + autogen + jupyter
# Work in progress. V0.1
# ALL THE THINGS.
ARG APT_PROXY #=http://apt-cacher-ng.lan:3142/
ARG PIP_INDEX_URL #=http://devpi.lan:3141/root/pypi/+simple
ARG PIP_TRUSTED_HOST #=devpi.lan
ARG JUPYTER_PORT=37799
ARG LITELLM_PORT=11111
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 as build-llama
@vitorcalvi
vitorcalvi / docker-cleanup-resources.md
Last active May 15, 2024 10:17 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

One line (generated by ChatGPT 3.5)

sudo docker volume ls -qf dangling=true | xargs -r sudo docker volume rm && \
sudo docker network rm $(sudo docker network ls --format "{{.ID}} {{.Name}}" | grep -v "bridge" | awk '/ / { print $1 }') && \
sudo docker images --filter "dangling=true" -q --no-trunc | xargs -r sudo docker rmi && \
sudo docker images | grep "none" | awk '/ / { print $3 }' | xargs -r sudo docker rmi && \
sudo docker rm $(sudo docker ps -qa --no-trunc --filter "status=exited")
@vitorcalvi
vitorcalvi / macM1Install.bash
Last active April 22, 2025 07:30
Comprehensive Bash script to automate macOS developer setup: installs essential apps with Homebrew, sets up Zsh with Oh My Zsh and Powerlevel10k, downloads FlutterFlow, updates /etc/hosts, sets up a conda environment, and installs Anaconda.
#!/usr/bin/env bash
set -euo pipefail
# --- Configurable lists ---
CASKS=(
macs-fan-control whatsapp discord lm-studio android-file-transfer balenaetcher
flutter visual-studio-code sublime-text android-studio rectangle iterm2
android-platform-tools tradingview jan xcode
)
FORMULAS=(
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()
@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++
@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 / 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