Skip to content

Instantly share code, notes, and snippets.

View tkuennen's full-sized avatar

Travis Kuennen tkuennen

View GitHub Profile
pip install lifelines
# #############################################################################
# # TCGA-BRCA Multiomics Data Integration and Survival Analysis
# #############################################################################
#
# This notebook demonstrates the integration of Transcriptomics (mRNA), Copy Number Variation (CNV),
# and Clinical data for Breast Invasive Carcinoma (BRCA) from The Cancer Genome Atlas (TCGA).
#
# **ASSUMPTION:** You have downloaded the following files from a source like the
# UCSC Xena Browser and placed them in the same directory as this notebook:
@tkuennen
tkuennen / disable-bitlocker-and-sysprep.ps1
Created October 29, 2025 17:57
Windows 11 Disable Bitlocker sysprep
Disable-BitLocker -MountPoint "C:" -erroraction silentlycontinue
$bl = Get-BitLockerVolume -MountPoint "c:" | select-object -expandproperty VolumeStatus
Do {Get-BitLockerVolume -MountPoint "c:" | select-object -expandproperty VolumeStatus | out-null} Until ($bl = "FullyDecrypted")
$sizemin = Get-PartitionSupportedSize -driveletter c | select-object -expandproperty SizeMin
$result = $sizemin / 10
$final = $sizemin + $result
Resize-Partition -driveletter c -size $final
Import-Module Appx
@tkuennen
tkuennen / cloudflare-ddns-update.sh
Created February 5, 2025 09:39 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
# Long version
# Input variable to mount remote UNC Path as a local drive
$mountAsUser='domain\serviceAccount'
$mountAsPassword='somecomplexpassword'
$uncPath='\\server009\share01\public'
# Scan for next available drive letter, excluding D "CD Rom" and H "Home"
$unavailableDriveLetters=(Get-Volume).DriveLetter|sort
$availableDriveLetters=.{(65..90|%{[char]$_})|?{$_ -notin $unavailableDriveLetters}}
[char]$firstAvailableDriveLetter=$availableDriveLetters[0]
# Victron modbus connection
modbus:
- name: camper-victron
type: tcp
host: 1.2.3.4
port: 502
sensors:
- name: System DC Load
unit_of_measurement: 'W'
device_class: power
@tkuennen
tkuennen / zen34.yaml
Created September 16, 2022 04:45
Zooz remote switch automation triggers
blueprint:
name: Zooz ZEN34 Remote scene control
description: |
Use the Zooz ZEN34 remote to trigger Scenes and control devices based on varying scenes.
This Blueprint is currently configured for the zwaveJS platform.
domain: automation
input:
- hosts: all
become: true
become_user: root
gather_facts: False
tasks:
- name: 1. Adding Intel® oneAPI repository key
shell:
cmd: wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
- name: 2. Adding Intel® oneAPI repository
cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g' -e 's/, $//'
# Source: https://gist.github.com/48f44d3974db698d3127f52b6e7cd0d3
###########################################################
# Automation of Everything #
# How To Combine Argo Events, Workflows, CD, and Rollouts #
# https://youtu.be/XNXJtxkUKeY #
###########################################################
# Requirements:
# - k8s v1.19+ cluster with nginx Ingress
aws lambda invoke --function-name my-function out --log-type Tail