Skip to content

Instantly share code, notes, and snippets.

View bryanpaget's full-sized avatar
🎯
Focusing

Bryan Paget bryanpaget

🎯
Focusing
View GitHub Profile
#!/usr/bin/env Rscript
update.packages(ask = F)
install.packages(c(
"shiny",
"plotly",
"gridlayout",
"bslib",
@bryanpaget
bryanpaget / Dockerfile
Created April 4, 2023 17:04
Testing Dockerfile for RStudio
ARG RSTUDIO_VERSION=2022.07.2-576
ARG SHA256=6dc6a71c7a4805e347ab88d9d9574f8898191dfd0bc3191940ee3096ff47fbcd
RUN apt-get update && \
apt install -y --no-install-recommends software-properties-common dirmngr && \
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc && \
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" && \
apt install -y --no-install-recommends r-base r-base-core r-recommended r-base-dev && \
apt-get update && apt-get -y dist-upgrade
@bryanpaget
bryanpaget / logs_investigation.md
Last active August 21, 2023 20:25
Debugging Github Actions logs to find the source of the build problem.
@bryanpaget
bryanpaget / abc-new-containers.md
Last active September 13, 2023 20:47
New Design for AAW Kubeflow Containers

JupyterLab

This can be the "base" of the AAW images. I noticed there is an environmental variable DEFAULT_JUPYTER_URL=/lab and it might be possible to have the SAME image for each of our offerings, but simply change that variable. So the RStudio image would be identical to the JupyterLab image but we'd change DEFAULT_JUPYTER_URL=/lab to DEFAULT_JUPYTER_URL=/rstudio. This may result in slightly less optmized (for size) images but it would reduce maintenence burden and as I've discovered already the below image does not take long to build.

ARG BASE_VERSION=2023-08-07
FROM jupyter/datascience-notebook:$BASE_VERSION

# Must be set in deepest image
ENV DEFAULT_JUPYTER_URL=/lab 
@bryanpaget
bryanpaget / main.tf
Last active September 14, 2023 18:16
Azure Image Cleaner Terraform Files
resource "azurerm_kubernetes_cluster" "cluster" {
image_cleaner_enabled = true
image_cleaner_interval_hours = var.azure_image_cleaner.image_cleaner_interval_hours
}
FROM jupyter/datascience-notebook:ed2908bbb62e
###############################
### docker-bits/∞_CMD.Dockerfile
###############################
# Configure container startup
USER root
WORKDIR /home/$NB_USER
@bryanpaget
bryanpaget / tools.md
Last active November 17, 2023 17:48
Some useful tools for the AAW

Data analysis starts with the data so lets look at tools for importing datasets and inspecting them for quality and interactions.

Tools for Importing, Inspecting and Cleaning Data

YData Profiling

ydata has a Python tool that works great in JupyterLab called ydata-profiling. This can be used with the following code to obtain an overview of your data.

Key features

# The Zone
## Features
### AI
#### Vanna
[Vanna](https://github.com/vanna-ai/vanna) is an AI framework that offers tools for natural language processing (NLP) and machine learning model deployment. It provides pre-built NLP models, custom model training, and an API for integrating these models into applications.
**Key Features:**
@bryanpaget
bryanpaget / install.sh
Created November 12, 2024 18:53
Install Tools for Work
#!/usr/bin/env bash
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc
# Install tools
sudo apt install build-essential procps curl file git unzip
#!/bin/bash
RSTUDIO_URL="http://localhost:8787"
curl -f -s "$RSTUDIO_URL" || { echo "RStudio not responding"; exit 1; }
echo "RStudio is running correctly."