Skip to content

Instantly share code, notes, and snippets.

View fomightez's full-sized avatar

Wayne's Bioinformatics Code Portal fomightez

View GitHub Profile
@fomightez
fomightez / useful_jupyterlite_that_does_not_work_without_shell.py
Last active January 6, 2026 18:10
Useful snippets and examples for use of JupyterLite with commands typically related to the shell available in standard Jupyter
#Useful snippets and examples for use of JupyterLite with commands typically related to the shell available in standard Jupyter
# (Also see 'Useful snippets and examples for when converting command line commands from Jupyter/IPython back to Pure Python' at
# https://gist.github.com/fomightez/ed79e33e97601d839dd550fd224d583c because a lot of these overlap, yet JupyterLite has some magics that obviously don't work with Pure Python
# MAGIC COMMANDS THAT SHOULD WORK IN JUPYTERLITE
%pwd
%store s >test_store.txt # if `s` previously define.
#`%ls` fails at present, but you can do
import os
os.listdir()
@fomightez
fomightez / Pandas dataframe to Pandas Styler Object to MS WORD via HTML.ipynb
Last active August 20, 2025 18:10
Pandas dataframe to Pandas Styler Object to Microsoft WORD via HTML
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / README.md
Last active August 13, 2025 16:31
3D surface plots working in SageMath 10.7 kernel in Jupyter August 2025

Pertinent Stackoverflow post with SageMath code that plots 3D surfaces using SageMath 10.7 kernel in Jupyter at present: https://stackoverflow.com/q/79733626/8508004
See my comments there on how to run the demonstration.




Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / evaluate_date_timestamps_in_pipeline_stdout.py
Last active July 10, 2025 21:15
Evaluating date timestamp info in typical long and short read pipeline.
def collect_time_info(input_text_filepath):
'''
Take the entire row of columns and return that row of columns plus extra
columns with the details gleaned from timestamps in the the corresponding
`logs/???????_<accession>.out`
'''
with open(input_text_filepath, 'r') as thelog_stdout_file:
std_out_string=thelog_stdout_file.read()
# with std_out log read in, parse it for the informaiton in the three timestamps
start_ts = std_out_string.split('Current timestamp at start: ')[1].split('\n')[0].strip()
@fomightez
fomightez / Centered plots based on Discourse Post.ipynb
Created June 20, 2025 17:48
Centered MAtplotlib plots based on Discourse Post
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / Converting_Bytes_to_MBytes.ipynb
Created June 17, 2025 18:47
Converting Bytes to MBytes in the sense used by Sequence Read Archive tables and metadata and Logan Search Results. Allows inter-relating the various numbers given in exported data.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fomightez
fomightez / README.md
Last active July 26, 2025 02:04
JupyterLab current on Binder with awscli and zstd
@fomightez
fomightez / demo_ipylab_using_documentsearch.ipynb
Created May 16, 2025 16:20
Demonstrate using documentsearch in a Jupyter Notebook via ipylab for programmatic text search, in reply to a Jupyter Discourse thread https://discourse.jupyter.org/t/targeted-documentsearch-command/34957?u=fomightez
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.