Skip to content

Instantly share code, notes, and snippets.

View srmds's full-sized avatar
🖖

Steven Ramdas srmds

🖖
View GitHub Profile
@legendof-selda
legendof-selda / mkdocs_azure_wiki_sync.yml
Last active June 17, 2023 04:35
GitHub action which syncs mkdocs to azure devops wiki.
name: Publish docs via GitHub Pages
# syncs your mkdocs markdown files with azure devops wiki.
# NOTE: this doesn't work with automated markdown files which maybe generated in your case
# this also doesn't deal with ordering
on:
push:
branches:
- develop
workflow_dispatch:
@tafaust
tafaust / application.py
Created April 21, 2022 19:41
FastAPI singleton service dependency injection across multiple requests
import random
import click
import uvicorn
from fastapi import FastAPI, APIRouter, Depends, Request
# Service
class MySingletonService:
def __init__(self):
@scottrigby
scottrigby / demo.md
Last active January 14, 2021 06:01
Demo: Flux Helm Operator -> Controller Migration

Demo: Flux Helm Operator -> Controller Migration

  1. Create local cluster

    kind create cluster
  2. Barebones flux2 install for demo

@noelbundick
noelbundick / Dockerfile
Last active April 24, 2024 08:14
Consuming packages from a private Azure Pipelines Python artifact feed
# We set an environment variable in this phase so it gets picked up by pip, but we don't want to bake secrets into our container image
FROM python:3.6-alpine AS builder
ARG INDEX_URL
ENV PIP_EXTRA_INDEX_URL=$INDEX_URL
COPY requirements.txt .
RUN pip install -U pip \
&& pip install --user -r requirements.txt
@jjstill
jjstill / spark-minikube.sh
Last active February 4, 2024 15:58
Running Spark job on local kubernetes (minikube)
# Starting minikube with 8Gb of memory and 3 CPUs
minikube --memory 8192 --cpus 3 start
# Creating separate Namespace for Spark driver and executor pods
kubectl create namespace spark
# Creating ServiceAccount and ClusterRoleBinding for Spark
kubectl create serviceaccount spark-serviceaccount --namespace spark
kubectl create clusterrolebinding spark-rolebinding --clusterrole=edit --serviceaccount=spark:spark-serviceaccount --namespace=spark
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@amberjrivera
amberjrivera / Pipeline-guide.md
Created January 26, 2018 05:02
Quick tutorial on Sklearn's Pipeline constructor for machine learning

If You've Never Used Sklearn's Pipeline Constructor...You're Doing It Wrong

How To Use sklearn Pipelines, FeatureUnions, and GridSearchCV With Your Own Transformers

By Emily Gill and Amber Rivera

What's a Pipeline and Why Use One?

The Pipeline constructor from sklearn allows you to chain transformers and estimators together into a sequence that functions as one cohesive unit. For example, if your model involves feature selection, standardization, and then regression, those three steps, each as it's own class, could be encapsulated together via Pipeline.

Benefits: readability, reusability and easier experimentation.