Skip to content

Instantly share code, notes, and snippets.

@tzeitim
tzeitim / gist:93c9f6f6d8f981f99956d803c2895db1
Last active February 27, 2024 10:37
select top_n in polars based on a group
#top n by clone
top_n = 100
what = "clone"
df.filter(
pl.int_range(0, pl.len()).over(what) < top_n)
@tzeitim
tzeitim / mc2b.yaml
Created May 4, 2022 15:11
conda environment with compilers needed to install MC2
name: mc2b
channels:
- conda-forge
dependencies:
- gcc_linux-64
- gxx_linux-64
- python>=3.9
- pip
- conda-forge::numpy
- libopenblas
@tzeitim
tzeitim / gist:dce4bb9a17c9aa639ebe23f843c8ee5a
Last active May 3, 2022 10:34
Example of nested parallelization by BLAS on MC2
#0 - PROCESSORS: 56
#0 - call analyze_clean_genes:
#0 - with adata: cc_b3 annotated data with 18806 X 32288 float32s
#0 - with what: __x__
#0 - with properly_sampled_min_gene_total: 1
#0 - with noisy_lonely_max_sampled_cells: 10000
#0 - with noisy_lonely_downsample_min_samples: 750
#0 - with noisy_lonely_downsample_min_cell_quantile: 0.05 (5%)
#0 - with noisy_lonely_downsample_max_cell_quantile: 0.5 (50%)
#0 - with noisy_lonely_min_gene_total: 100
@tzeitim
tzeitim / gist:2e35fe1960ebe733ad46fafee472dc10
Created August 23, 2021 13:14
Illegal instruction metacells
(test_mc2) [15:08:48 polivar@aquarius:/local/users/polivar] (36600)$
gdb `which python3`
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see: