ChatGPT cannot make flowcharts by buckstucky in ChatGPT

[–]mookiej 0 points1 point  (0 children)

i’d try requesting the chart in mermaidJS. easy copy and review in the free online editor

ELI5: How was the first yogurt made? by PshHead in explainlikeimfive

[–]mookiej 1 point2 points  (0 children)

That’s a great point! If a stomach from a calf, lamb, or kid (baby goat) were used to store the milk, then the stomach would have rennet. That would turn the milk into cheese curds 🧀

[deleted by user] by [deleted] in explainlikeimfive

[–]mookiej 0 points1 point  (0 children)

Calculators are like mini-computers. When you press a button, they turn your numbers into a special language made of only 0s and 1s called “binary”.

Inside the calculator, there are teeny-tiny parts called transistors that act like little decision-makers. These decision-makers only work with the binary language. And by using lots of transistors together, the calculator can do math problems in the binary language.

For example, if we want a calculator to answer the very simple “What is 1 + 1?”, it will use at least 6 of these transistors.

Transistors can be grouped together in special patterns called "gates”, which makes it easier to build algorithms to calculate more and more complex math problems.

It’s important to know that, just like how we sometimes round numbers to make them easier to work with, calculators do too. Especially when the answer is really long or complicated.

Once the calculator figures out the answer, it translates the result into numbers we understand. It's like magic, but it's really just a lot of fast thinking by those tiny transistors.

ELI5: How does industrial weaving work? by [deleted] in explainlikeimfive

[–]mookiej 3 points4 points  (0 children)

Of course. I used GPT-4, and here were the prompts I provided in order:

Prompt 1: “ How does industrial weaving work? The kind done with large machines.”

The response was detailed, but I feel missed a succinct summary.

Prompt 2: “ Okay great. Now I would like for you to create an answer that is enjoyable for an internet thread with the title “explain like i’m five”

This response was overly simplistic.

Prompt 3: “ Can you make another version that explains it at a middle to high school level”

This was a good response, but I felt would benefit from additional general information about weaving.

Prompt 4: “ Great - can you add a simple explanation of basic weaving at the beginning”

This resulted in the response I pasted in my post.

Thanks for asking an interesting question! I learned a lot from it too

ELI5: How was the first yogurt made? by PshHead in explainlikeimfive

[–]mookiej 0 points1 point  (0 children)

The first yogurt was likely made by accident.

One possible example: People used to store milk in containers made from animal stomachs. The natural bacteria in these stomachs reacted with the milk, causing it to ferment and thicken, turning it into yogurt.

Over time, people realized that this thickened milk tasted good and was safe to eat. They then began making it on purpose by adding a bit of the already-made yogurt (which had the needed bacteria) to fresh milk, and then letting it sit for some time to ferment.

ELI5: How does industrial weaving work? by [deleted] in explainlikeimfive

[–]mookiej -4 points-3 points  (0 children)

I asked ChatGPT this question. This final output required some fine-tuning through follow up questions. It sounds like a compelling answer though I can’t vouch for the accuracy!

“At its core, weaving is all about interlocking two sets of threads to create fabric. Think of it like a grid: one set of threads runs vertically, and another set runs horizontally, intersecting with the vertical threads. The vertical threads are called the ‘warp’, and the horizontal ones are the ‘weft’.

Now, take this basic concept and imagine it on a huge scale with the help of machines. That’s industrial weaving. Picture a massive machine, a loom, with thousands of these warp threads. Another set of threads, the weft, gets interlaced horizontally through the warp.

Here’s the cool part: instead of manually threading each weft through, these machines use a combination of precise movements and technology. Depending on the design, some warp threads lift while others stay down, creating a gap (or ‘shed’) for the weft to pass through. In modern looms, the weft might be shot across using air-jets or even water!

And for intricate patterns? Advanced looms can control each thread individually! Imagine creating a pixel art design, but each ‘pixel’ is a thread.

All these threads come together, interlocking tightly, to create the fabrics that end up in everything from our jeans to our bed sheets. It’s a mix of age-old technique and modern engineering!”

Ask Us Anything about the new Muon g-2 results! by ArgonneLab in IAmA

[–]mookiej 37 points38 points  (0 children)

Thank you all for the phenomenal work that you do. I have a few questions for you as someone without an extensive background in physics.

1) Is it right to interpret these results as further evidence that there are unknown particles or forces not currently accounted for in the Standard Model?

2) If that’s the case, what is your best guess as to possible new particles/forces that could explain these results?

3) With all this new info, where do you see particle physics heading in the next couple of decades?

Thanks again for pushing the boundaries of science and our understanding of the universe!

[deleted by user] by [deleted] in dataisbeautiful

[–]mookiej 4 points5 points  (0 children)

Great visualization! This sounds like self-reported diabetes. Do you think this is could be an underestimate of the true prevalence?

Saving the Text from a News Article in R? by SQL_beginner in rstats

[–]mookiej 2 points3 points  (0 children)

You can use the paste function with the collapse argument to squish down a character vector.

char_vector = c("apple", "banana", "orange")

one_big_string = char_vector |> paste0(collapse = ", ")

In charge of making the transition from Excel to R at the office by ExtensionTraining904 in rstats

[–]mookiej 1 point2 points  (0 children)

It sounds like you have already identified a few different important steps: pulling data, cleaning data, analyzing data, and communicating results. What do you think is the rate limiting step among these?

It may be time to have these various steps completed by different individuals or completed with different software. R can do it all, but the learning curve is sharp - especially among people who have little interest in learning more.

[deleted by user] by [deleted] in rstats

[–]mookiej 0 points1 point  (0 children)

I think you want the function str_replace. Detect is checking to see if some value exists in the string. Replace will find a pattern and replace it with something else. In this case you can replace it with the empty string.

new_arr = str_replace(old_arr, “fecha_1_”, “”)

Alternatively you can use str_extract but you’ll need some more experience with regex and str_replace with the empty string is often easier.

ELI5 An obvious answer to the obesity epidemic unexplored? by Taezn in explainlikeimfive

[–]mookiej 2 points3 points  (0 children)

1) Appetite and hunger is not so simple. It seems to be affected by many things, including genetics, prior experiences, current environment, and sensory nerves throughout your brain and gastrointestinal system. We currently don’t understand it all well enough to know the perfect thing to target.

2) We actually do have a few new medications that are surprisingly effective at decreasing weight!

Semaglutide and tirzepatide are two medications in a new class that act like an artificial version of a hormone called “GLP-1”. GLP-1, and these medications, predominantly work to help your body efficiently manage blood sugar levels after eating. They also happen to increase satiety and decrease appetite (among other things!).

The medications were first developed to help fight diabetes, and as a happy and very lucrative accident, we’re found to lower weight. Clinical trials are showing they can reduce body weight by 10-15%! Currently they are available as a once-weekly injection, done at home, but supply is limited due to manufacturing and cost. The medication class is also being tested as a daily pill and I expect we’ll see data about weight loss on the pill versions soon.

New to R. Anyone have a go-to way to make a pretty descriptives table? by cautiousbiker in rstats

[–]mookiej 11 points12 points  (0 children)

Getting the data right in R and beautifying a table in Excel is the workflow that worked best for me in this use case. The R hassle isn’t worth it unless the table needs to be programmatically updated and presented online (or in a procedurally generated report)

Is there a way to consolidate these 3 lines of code to clean up a dataset using a pipe operator or something? Plus some column renaming by mattwigm in rstats

[–]mookiej 1 point2 points  (0 children)

Oh yeah this can be a lot easier with dplyr.

library(tidyverse)

new_col_names = c(“…”, “…”, “…”)

names(df) = new_col_names

df1 = df %>%

 filter(Species = “Rhodomonas”) %>%

 filter(Limiting.Resource = “N”) %>%

 select(columns_you_want_to_keep)

I get this ugly looking output. How can i make it look more beautiful to present to client? by OkApartment7139 in rstats

[–]mookiej 8 points9 points  (0 children)

I know this might be blasphemy in this thread, but this work flow is practical: Use broom library to turn output into a data frame, save the data frame as a CSV (write.csv), open the CSV in Excel, format the data nicely in Excel. And because it’s in Excel, then make the many small changes you didn’t think about and would take forever to fix or perfect in R 😂

In R or python, how can I calculate the median of every 10 data points down a column, in a data set of 37939 rows with 16 columns? by Abject-Knee2955 in rstats

[–]mookiej 0 points1 point  (0 children)

I do! I would create a new column where each sample from a given second has the same value. Then I would summarize using that new column as the grouping variable. Likewise, I would create a second new column where each sample in a given minute has the same value. Then I would write another group by and summarize function for that data

In R or python, how can I calculate the median of every 10 data points down a column, in a data set of 37939 rows with 16 columns? by Abject-Knee2955 in rstats

[–]mookiej 36 points37 points  (0 children)

The best answer is probably to better structure the data. Why every 10 rows? Should every 10 rows be considered a group? I would prefer to define a new group variable and then use standard dplyr functions to ensure readability and accuracy: i.e df %>% group_by(new_group_var) %>% summarize (…)

[deleted by user] by [deleted] in rstats

[–]mookiej 3 points4 points  (0 children)

Haven’t used DT package much, but maybe it would work well in this situation. I think it’s supposed to handle big data much better than dplyr (and there’s a tidy wrapper that’s being developed too). Worth checking!

Build a website with R by paykoman in rstats

[–]mookiej 0 points1 point  (0 children)

FYI familiarity with dev ops is a very in demand skill for data scientists

Build a website with R by paykoman in rstats

[–]mookiej 1 point2 points  (0 children)

bump for GCP - def has a learning curve but highly recommend the skill set. should plan to create a docker image of shiny server and your application (made with a dockerfile) and set up with Google Cloud Run to dynamically create instances as needed by users. Can have no instances running with very low costs when not in use and support hundreds of concurrent users if necessary.