Skip to content

Instantly share code, notes, and snippets.

View tschreiner's full-sized avatar
😃

Tedd Schreiner tschreiner

😃
View GitHub Profile
@tschreiner
tschreiner / FEA-simulations.md
Last active February 1, 2024 10:11
Open source FEA simulation - focused on soft body collision

Open source FEA simulation software for soft tissue

If you want to calculate the deformation of objects caused by a collision with another object there are some open source projects you might want to check out.

For example

Literature

@tschreiner
tschreiner / README.md
Created February 1, 2024 00:26
Preparing objects for FEA

Requirements:

  • Meshmixer
  • Meshlab

If you have a obj file

  • open meshmixer
  • decimate mesh
  • open meshlab
@tschreiner
tschreiner / README.md
Last active January 30, 2024 16:29
.zshrc snippet: Delete and create k8s job with status monitoring

README

Robust deletion and creation of jobs. Just execute the command and the function will do everything else for you!

schreinert@M-LH27HGWM95 idoit-sync-v2 % manage_k8s_job             
2024-01-30 17:22:22 Deleting existing job...
job.batch "imc-sync-job-test" deleted
2024-01-30 17:22:22 Deleting associated pods, if any...
2024-01-30 17:22:22 Deleting pods imc-sync-job-test-lfv6v...
pod "imc-sync-job-test-lfv6v" deleted
@tschreiner
tschreiner / transcribe.py
Created January 29, 2024 00:19
Create .SRT subtitles for a mp4 video using OpenAI whisper
conda create --name torch python=3.8
conda activate torch
pip install git+https://github.com/openai/whisper.git
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
@tschreiner
tschreiner / exception_handler.py
Created January 22, 2024 15:11
Exception handler for sending unhandled exceptions to the developer
import traceback
import smtplib
from email.mime.text import MIMEText
def send_error_to_developer(error_details):
msg = MIMEText(error_details)
msg['Subject'] = 'Application Error Report'
msg['From'] = '[email protected]'
msg['To'] = '[email protected]'
@tschreiner
tschreiner / idoit-ipam-dns.md
Created January 14, 2023 16:09
i-doit IPAM and DNS Object types, Categories and Attributes
Objekttyp Kategorie Attribut Attribut Beispielwert
Server Allgemein Bezeichnung
Kategorie
Einsatzzweck
Zustand
CMDB-Status
Objekt ID
Objek
@tschreiner
tschreiner / README.md
Created September 9, 2022 10:33
Enable OBS Virtual camera for WhatsApp on macOS

Enable OBS Virtual camera for WhatsApp on macOS

Due to security requirements you cannot use the OBS virtual camera on macOS in default. To use the virtual camera you have to make sure to download the WhatsApp client from the official WhatsApp website (not the version from the Apple AppStore). After installation you have to execute as normal user:

(Make sure WhatsApp Desktop is closed)

codesign --remove-signature /Applications/WhatsApp.app/

After that the camera should be available as "OBS virtual camera" in the call menu in the upper toolbar of WhatsApp Desktop

@tschreiner
tschreiner / 3D-model-generation-from-DICOM.md
Last active August 29, 2022 19:08
Generate cranio-maxillofacial 3d models and landmarks from CBCT (DICOM) data without manual segmentation by open source tools (3D slicer and pre-trained machine learning models for segmentation and landmark registration)

Create surface models and landmarks from CBCT (DICOM) scans with 3D Slicer

Contents

  • Slicer 3D Installation and extension installation
  • Converting DICOM data to NRRD data
  • Run AMASSS to generate surface models
  • Run ALI-CBCT to generate cephalometric landmarks
  • Saving and sharing data
@tschreiner
tschreiner / ceph-out.osd
Created August 6, 2021 20:02
ceph-out.osd
#!/bin/bash
for i in {8,9,10,13,14,15,20}
do
N=$i
echo $N
ceph osd out osd.$N
while ! ceph osd safe-to-destroy osd.$N ; do sleep 1m ; done
ceph osd destroy osd.$N
ceph-volume lvm zap /path/to/device
done
#!/usr/bin/python2.7
if False: '''
2017-05-03
Public rerelease of Dahua Backdoor PoC
https://github.com/mcw0/PoC/blob/master/dahua-backdoor-PoC.py
2017-03-20