Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
@initcron
initcron / compose.yaml
Created May 28, 2025 07:57
Docker Compose spec for FastAPI and Streamlit
services:
fastapi:
image: docker.io/xxxxxx/fastapi:dev.
build:
context: "./"
dockerfile: "Dockerfile"
ports:
- "8000:8000"
streamlit:
import mlflow
from mlflow.models import infer_signature
from sklearn.linear_model import LinearRegression
from sklearn.datasets import make_regression
from sklearn.metrics import mean_squared_error

# 1. Set tracking URI to local MLflow server
mlflow.set_tracking_uri("http://host.docker.internal:5555")
print("📡 Tracking to:", mlflow.get_tracking_uri())
@initcron
initcron / basic-ml.ipynb.md
Last active May 26, 2025 09:37
Sample Notebook Code
# Step 0 / Cell 0
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report, r2_score, mean_squared_error
@initcron
initcron / prod-app.yaml
Last active May 23, 2025 09:14
ArgoCD App for Prod
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: vote-prod
namespace: argocd
spec:
destination:
namespace: prod
server: https://kubernetes.default.svc
project: default
@initcron
initcron / Dockerfile
Created May 21, 2025 07:08
Dockerfile for New Sysfoo App
FROM maven:3.9.6-eclipse-temurin-17 AS build
WORKDIR /app
COPY . .
RUN mvn package -DskipTests
FROM eclipse-temurin:17-jre-noble as package
WORKDIR /app
COPY --from=build /app/target/sysfoo-*.jar ./sysfoo.jar
EXPOSE 8080
docker_bnp:
runs-on: ubuntu-latest
needs: package
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and test Docker image
run: |
COMMIT_HASH=$(echo ${{ github.sha }} | cut -c1-7)
package:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
job: [unit-test, sca, sbom]
name: Run ${{ matrix.job }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Compile sysfoo app
run: mvn compile
name: CI Pipeline
on:
push:
branches:
- main
pull_request:
jobs:
build: