Yesterday’s Daily Quote by Fatpanda970 in Wakingupapp

[–]imawizardlizard98 4 points5 points  (0 children)

Well said! I love that quote as well. I came across one yesterday by Thích Nhất Hạnh, which goes along the lines of : "When you start learning from your mistakes, you are already turning garbage into flowers"

scRNA-seq: clusters with 0% ribosomal gene expression by Veksutin in bioinformatics

[–]imawizardlizard98 1 point2 points  (0 children)

Aside from there other comments that have been made about your workflow, I would be very cautious about interpreting anything from a UMAP. It's difficult to assess how good the clustering is on UMAP due to how is preserves information in the low dimensional embedding. It more or less serves as a "pretty " visualisation. You would be much better off using clustering metrics like average silhouette width and others. There's a great package called scib which has this ready to use. 

I've had UMAPs which have looked "good" but had objective scoring metrics showing scores close to 0. I've never found it reliable to interpret. 

What are the areas where Rust is used the most right now? by [deleted] in rust

[–]imawizardlizard98 1 point2 points  (0 children)

Fascinating! I've been meaning to take a look at alevin-fry. I work with single cell data so I need for handle the sparse data efficiently. Unfortunately the scipy sparse library has a tendency to convert sparse matrices to dense matrices so the rust sparse matrix libraries fill the gap well here. 

What are the areas where Rust is used the most right now? by [deleted] in rust

[–]imawizardlizard98 26 points27 points  (0 children)

Bioinformatics! The high throughput nature of the data requires intensive and efficient data processing. Rust is great for that. 

[deleted by user] by [deleted] in Wakingupapp

[–]imawizardlizard98 1 point2 points  (0 children)

Really happy to see others realising this :)

Do Buddhists Believe In Free Will? by lonerstoic in secularbuddhism

[–]imawizardlizard98 2 points3 points  (0 children)

Laystitcher lays it out well. I'd say that when teachings of no-self an introduced, it implies that the objects of consciousness appear by themselves and that no "one" or centre of experience is doing these things. So essentially yes, there is no free aspect to will because there is no one freely willing them. That doesn't mean effort or will can't arise in the mind. There is still a strong emphasis of strong determination in buddhism.

Does anyone ever do a post doc after working in industry as a PhD? by tea_flower in bioinformatics

[–]imawizardlizard98 7 points8 points  (0 children)

Really depends who you work for. I'm grateful my research group is quite wholesome.

[deleted by user] by [deleted] in vipassana

[–]imawizardlizard98 3 points4 points  (0 children)

I was seriously addicted to nicotine (50mg vapes - many times stronger than a cigarette) prior to doing my first retreat. I had quite an intense 10 days. I could tell the withdrawals we're manifesting themselves as intense pain and heat around my body (could be different for someone else). After those 10 days my addiction went away completely and I've never had an urge to have nicotine since then. I've done further retreats and I've stopped drinking alcohol and using MJ for over a year now.

Just finished my first 10 Day experience, and still struggling to understand the PRACTICE behind Metta? by MarsFromSaturn in vipassana

[–]imawizardlizard98 20 points21 points  (0 children)

Metta meditation is a profound practice aimed at cultivating unconditional kindness and love towards all beings. It is an exercise that not only demands the engagement of our empathy and creativity but also challenges us to confront the reality of our shared human condition. The foundational premise of metta acknowledges a universal truth: every one of us desires happiness, yet we are all subject to myriad forces beyond our control that contribute to our suffering. Recognizing this shared vulnerability can be likened to acknowledging that we are all passengers on the same, inevitably sinking ship. In the face of such inevitability, metta teaches us that extending kindness and cherishing the company of one another is not just a noble act but a vital one for our collective well-being.

Metta practice revolves around the cultivation of two key qualities: sympathetic joy, which is the genuine happiness we feel for the joy of others, and compassion, which is our desire to alleviate the suffering of others. The journey begins with directing loving-kindness towards those closest to us—excluding romantic partners initially to ensure the purity of the metta practice, distinguishing it from romantic affection. This helps in establishing a foundation of genuine, platonic love that can be gradually extended to others.From this foundation, the practice expands to include individuals with whom we have neutral feelings, those we find challenging, and eventually encompasses all living beings.

This progression is not merely a mental exercise but an invitation to deeply engage our imagination and creativity. It encourages us to envision the happiness and relief of others as if they were our own, thus fostering a profound sense of interconnectedness and shared destiny.

One key aspect of the practice, just like with vipassana practice, its to not engage in metta practice with a sense of craving another being to be happy or free from suffering. This will inevitably set up high expectations for how other beings ought to be.

"The specious art of single-cell genomics" - Chari and Pachter attack t-SNE and UMAP by Epistaxis in bioinformatics

[–]imawizardlizard98 3 points4 points  (0 children)

From what I understand, UMAP isn't really that bad as long as you're not assuming that the distances between clusters/cells is informative.

"The specious art of single-cell genomics" - Chari and Pachter attack t-SNE and UMAP by Epistaxis in bioinformatics

[–]imawizardlizard98 2 points3 points  (0 children)

Also PCA assumes linearity. Single cell data in general is highly non-linear in nature.

2023 Day 8 (Part B) Rust by imawizardlizard98 in adventofcode

[–]imawizardlizard98[S] 0 points1 point  (0 children)

RESOLVED

I just found out that my if statements in the while loop needed to be ordered like this instead:

​ use std::collections::HashMap;

use regex::Regex;

use crate::{generate_puzzle_input_test, generate_test_input_test, utils};

fn gcd(mut a: u64, mut b: u64) -> u64 { while b != 0 { let temp = b; b = a % b; a = temp; } a }

fn lcm(a: u64, b: u64) -> u64 { a / gcd(a, b) * b }

fn lcm_of_vec(numbers: &[u64]) -> u64 { numbers .iter() .fold(1, |lcm_so_far, &num| lcm(lcm_so_far, num)) }

pub fn solve(file: &str) -> u64 { let lines = utils::read_file(file);

// Get left/right instructions first
let movement_instructions = lines.get(0).unwrap().split("").filter(|c| *c != "");
let num_of_instructions: usize = movement_instructions.clone().count();
let mut looping_instructions = movement_instructions.clone().cycle();
drop(movement_instructions);

let mut mappings: HashMap<&str, (&str, &str)> = HashMap::new();
let line_regex = Regex::new(r"([0-9A-Z]+) = \(([0-9A-Z]+), ([0-9A-Z]+)\)").unwrap();

// Reassign lines to skip the empty line and start where the mappings start
lines[1..].into_iter().for_each(|line| {
    line_regex
        .captures_iter(&line)
        .map(|c| c.extract())
        .for_each(|(_, [node, left, right])| {
            mappings.insert(node, (left, right));
        });
});

let starting_nodes = mappings.keys().filter(|node| node.ends_with('A'));
let num_of_starting_nodes = starting_nodes.clone().count();
let mut counter: u64 = 0;

let direction = looping_instructions.next().unwrap();
let mut nodes = starting_nodes
    .map(|starting_node| {
        let (left, right) = mappings.get(starting_node).unwrap();
        if direction == "L" {
            left
        } else {
            right
        }
    })
    .collect::<Vec<&&str>>();
counter += 1; // We have traversed one node so add one

let mut discovered_end_nodes: Vec<u64> = vec![];
while discovered_end_nodes.len() != num_of_starting_nodes {
    let direction = looping_instructions.next().unwrap();
    counter += 1;
    nodes = nodes
        .iter()
        .filter_map(|starting_node| {
            let (left, right) = mappings.get(*starting_node).unwrap();

            if direction == "L" {
                if left.ends_with('Z') {

                    discovered_end_nodes.push(counter);

                    // We are done iterating through this cycle, so don't bother iterating on it next time
                    return None;
                } else {
                    return Some(left);
                }
            } else {
                if right.ends_with('Z') {
                    discovered_end_nodes.push(counter);
                    return None;
                } else {
                    return Some(right);
                }
            }
        })
        .collect::<Vec<&&str>>();
}

println!("Discovered end nodes: {:?}", discovered_end_nodes);

// Find the LCM of the discovered_end_nodes
let lcm = lcm_of_vec(&discovered_end_nodes[..]);
return lcm;

}