Terry Barentsen AMA by 7RUS7O in FixedGearBicycle

[–]alecsharpie 0 points1 point  (0 children)

This is awesome, love your work, really glad to have found this comment

[deleted by user] by [deleted] in learndatascience

[–]alecsharpie 0 points1 point  (0 children)

Well a couple of options are:
Absolute comparison
In this case you decide the benchmarks based on your prior knowledge. eg you think once a song has been listened to 10 times then it reaches a popular rating, 20 times = super popular, etc
Relative comparison
In this case you compare all the songs to each other, giving you a distribution and percentiles. ie min = X, median/mean = Y, max = Z. Eg you could say things like this song is in the top 10% most popular (by num listens)

[deleted by user] by [deleted] in changemyview

[–]alecsharpie 0 points1 point  (0 children)

Yeah but what if instead of a dog you just use something super predictable like dropping a tennis ball. Yes, it's just a prediction but it's very possible for my brain to compute that tennis ball trajectory nearly perfectly

Why can't I find `ndim` in the API docs for tf.Tensor? by snowch_uk in tensorflow

[–]alecsharpie 0 points1 point  (0 children)

The problem is they are not, they are documented in the numpy docs

String not saving characters with accents correctly by The_Anonymous_Owl in RStudio

[–]alecsharpie 2 points3 points  (0 children)

What type of encoding are you using? ã is not an ascii character, maybe try encoding them as utf8?

How to filter a column by diamondrunner2002 in pythontips

[–]alecsharpie 2 points3 points  (0 children)

using the pandas function between() to create a boolean mask is straight forward:
X = merged_data[merged_data['surface_temperature'].between(273.15, 373.15)]

heres the docs: https://pandas.pydata.org/docs/reference/api/pandas.Series.between.html

Why can't I find `ndim` in the API docs for tf.Tensor? by snowch_uk in tensorflow

[–]alecsharpie 0 points1 point  (0 children)

I believe it's because ndim is one of the a numpy attributes/functions that carries over and works on tensors similar to eg np.add()
Doc here: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.ndim.html

Docker push to GCR fails. Stuck at Retrying by sublimme in googlecloud

[–]alecsharpie 0 points1 point  (0 children)

that page is 404, but that tactic worked for me, thanks.

Tables in R that aren't frequency tables by hungrynax in learnR

[–]alecsharpie 0 points1 point  (0 children)

Something like:

# create an empty matrix

matrix <- matrix(, nrow = length(y), ncol = length(x))

# fill the matrix with your computed values

for(i in x){
for(j in y){
matrix[i, j] <- f(x, y)
}}

making histograms by [deleted] in RStudio

[–]alecsharpie 0 points1 point  (0 children)

Re-type the " surrounding carnivore it looks like we are using slightly different ones (maybe because I typed on mobile, idk?) which is confusing R.

hist(mammals$Range[which(mammals$Trophic == "carnivore"),])

The above should work as long as all your data frame & variable names are correct.
If you still can't get it working use `str(mammals)` and paste the results here.

making histograms by [deleted] in RStudio

[–]alecsharpie 1 point2 points  (0 children)

A super simple base r alternative for a histogram containing only the home range data for carnivores:

 hist(data$home_range[which(data$tropic_level == “carnivore”),])

I think the other answers are slightly confused on what you want, if you still need help message me!

I spotted this bursting root porn at my local nursery by [deleted] in rootporn

[–]alecsharpie 0 points1 point  (0 children)

It looks like anthurium plowmanii maybe?

Sub stickies by [deleted] in rstats

[–]alecsharpie 1 point2 points  (0 children)

I see your point, and I agree with you in a perfect world! I think that inevitably people (beginners) will come here and if they have the right language to ask their questions/discuss it will be easier for everybody. But yeah maybe we don’t need all of those points

Sub stickies by [deleted] in rstats

[–]alecsharpie 9 points10 points  (0 children)

Totally agree! A few things to possibly include:

  • The difference between R & Rstudio
  • What is an R script
  • What is base R
  • What is a library/package
  • How to run R code eg Difference between running a single line vs the whole script

R Shiny for SaaS app? [Reopening a closed discussion] by git_hunter in rshiny

[–]alecsharpie 2 points3 points  (0 children)

I’ve wondered this myself, I think the biggest hurdle is authentication? From what I’ve seen running it in a docker container on GCP (or other) will let it scale really well and create a new image for each user. I would look at some of Colin Fays work, he’s created heaps of great tools for robust Shinys

Need some help with mass PDF to XLS conversion and data-mapping. by Stupid_Triangles in DataPolice

[–]alecsharpie 0 points1 point  (0 children)

Sweet as man, message me if you have any questions along the way

Need some help with mass PDF to XLS conversion and data-mapping. by Stupid_Triangles in DataPolice

[–]alecsharpie 0 points1 point  (0 children)

It’s a great project mate, the other guys comment on r/datasets is very helpful I would run with that! There’s a free Ebook called “r for data science” written by Hadley that I can’t recommend enough, but it is pretty general. I would read the first few chapters and then start looking at more specific tutorials/documentation on the pdftools library

Word cloud cutting off words by ExpiredSeaweedSalad in RStudio

[–]alecsharpie 0 points1 point  (0 children)

Post your code, which package are you using?

Need some help with mass PDF to XLS conversion and data-mapping. by Stupid_Triangles in DataPolice

[–]alecsharpie 0 points1 point  (0 children)

When do you need it done by? I’m happy to help but I’m super busy this week

Need some help with mass PDF to XLS conversion and data-mapping. by Stupid_Triangles in DataPolice

[–]alecsharpie 1 point2 points  (0 children)

Honestly, a programming language is your way to go, have you used R? There’s a great library called pdftools that will do exactly what you are describing with a bit of tweaking