Skip to content

Instantly share code, notes, and snippets.

View fk128's full-sized avatar

Fahdi Kanavati fk128

View GitHub Profile
@fk128
fk128 / insert_text_overlay_at_timestamps.jsx
Created April 28, 2018 14:13
insert text overlays at timestamps in after effects from text file input
/**
* Modified from:
SRT subtitle import for AE CS5
By August Bering
*/
/*
example text file input containing:
0:15
import os
import argparse
import glob
import re
import time
MIN = -1024
MAX = 3072
@fk128
fk128 / bn_variant.py
Created May 21, 2021 07:44
mean only and STD only batch normalization - Tensorflow 2
from tensorflow.keras import layers
import tensorflow as tf
class MeanOnlyBN(layers.BatchNormalization):
def __init__(self, **kwargs):
kwargs['scale'] = False
kwargs['center'] = False
kwargs['fused'] = False
super().__init__(**kwargs)
@fk128
fk128 / pgadmin.yaml
Last active May 19, 2023 12:46
k8s deployment of pgadmin with server setup from env variable
---
apiVersion: v1
kind: Service
metadata:
labels:
app: pgadmin
name: pgadmin
spec:
ports:
- name: pgadmin
@fk128
fk128 / generate_mip.py
Created May 1, 2024 13:22
Generate resampled MIP image from dicom
import SimpleITK as sitk
import numpy as np
from imageio import imwrite
from argparse import ArgumentParser
"""
requirements.txt
SimpleITK
numpy