Skip to content

Instantly share code, notes, and snippets.

@jfrery
jfrery / clean-git-local.sh
Created April 2, 2024 20:46
Clean local git branches by branches that have been merged (even if squashed) or once tracked then deleted from remote.
#!/bin/bash
# Checkout main branch quietly
git checkout -q main
# Fetch the latest changes from the remote and prune deleted branches
git fetch --prune
# Function to delete a branch with confirmation
delete_branch() {
@jfrery
jfrery / client_server_fhe_training.py
Last active February 27, 2024 10:08
Example of deployement code for FHE training
import numpy as np
from sklearn.datasets import make_classification
from sklearn.model_selection import train_test_split
from concrete.ml.sklearn import SGDClassifier
from concrete import fhe
# Generate synthetic dataset for classification
X, y = make_classification(n_samples=1000, n_features=20, n_classes=2, random_state=42)
# Split the dataset into training and testing sets