R and Python Tips
@R_PythonTips
Apparently, this user prefers to keep an air of mystery about them.
Bạn có thể thích
I would be posting R and Python programming tips. Some handwritten posts and code tips are on the way. Happy programming! #rstats #python
Opened too many tabs but don't want to lose your place by closing *all* of them? Not a problem. #rstats
One of many goodies in RStudio: if you go into LaTeX math mode ($...$) and you hover over an equation you'll see a beautiful mathematically typeset preview of the equation @rstudio @rstudiotips
Most likely candidates: while ⟶ [ <expr> while <cond> ] try/except ⟶ f(x) except ValueError else default
Over time, many #Python statements have evolved a variant form as an expression: print ⟶ print() function def ⟶ lambda if ⟶ ternary operator for-loop with list.append() ⟶ list comprehension def and yield ⟶ generator expression = assignment ⟶ walrus operator
Thanks to everyone who submitted a solution. I'm glad other people think this sort of thing is fun! Here's my solution, using a BayesTable class that demonstrates Bayes's Theorem: allendowney.blogspot.com/2018/09/tom-ba… More Bayes puzzles coming soon!
I have a box of dice with 4, 6, 8, and 12 sides, the same number of each. I choose one at random, roll it twice without showing you, and report that I got the same outcome both times. If I roll the same die again, what is the probability I get the same outcome a third time?
Purrr's reduce function is so powerful. We can join multiple tables (read it as >2) using two lines of code. List all the tables and pipe it up with <<reduce>>. #rstats
Been meaning to check out Deep Learning with Keras and R? This post has everything you need to get started: blog.rstudio.com/2018/09/12/get… #rstats #rkeras
Writing production #python code: * Simplest thing that works * Consider type signatures * Add repr, copy, and pickle support. * Watch out for circular references * Think hard about concurrency * Handle exotic and unanticipated use cases * Learn from the experience * Repeat
Interested in statistical methods for data science? Check out our probabilistic programming and bayesian methods playlist, including: "Bayesian Network Modeling using R and Python" by Pragyansmita Nayak: youtube.com/watch?v=6pl3m-… Don't forget to subscribe to #PyData on Youtube!
youtube.com
YouTube
Bayesian Network Modeling using R and Python - Pragyansmita Nayak
Python or R? Trick question: Both! Check out our PyData video playlist of R talks, including: "A Beginner's Guide to Random Forests - R vs Python" by Linda Uruchurtu: youtube.com/watch?v=fFPsjp… #rstats #scikitlearn #sklearn Don't forget to subscribe for updates!
youtube.com
YouTube
Linda Uruchurtu: A Beginner's Guide to Random Forests - R vs Python |...
#python factlet: I learned something new. A "binade" is the set of floating point numbers that all have the same exponent. Presumably, if an addition z=y+x is closed within a single binade, it will be lossless.
These are indeed handy! "RStudio IDE Easy Tricks You Might've Missed" by @lopp_sean buff.ly/2f2hmZt via @rstudio #rstats
To convert row names to column in a data frame we can use <<rownames_to_column(df, var = colname>> from tibble package. #rstats
If we want to compare two data sets, to ensure whether the data matches, we can use setequal() or identical(). The difference is, setequal() wouldn't mind duplicates and/or order whereas identical() will return FALSE on duplicates or mismatch in order between data sets. #rstats
If the format spec came first, it could easily be partialed: currency = partial(format, ',.2f')
Witness Max Kuhn talk about Modeling in the #Tidyverse. @topepos The roadmap for modeling packages that adhere to tidyverse-tenets. Empirical validation and good methods, consistent interfaces, buff.ly/2FujRVE #rstudioconf #rstats
United States Xu hướng
- 1. Don Lemon 6,420 posts
- 2. Keion White 1,163 posts
- 3. #LumioseOOTD N/A
- 4. New World 93.3K posts
- 5. Luke Kwon N/A
- 6. Bobby Brink N/A
- 7. Justin Brazeau N/A
- 8. #FrozenFrenzy N/A
- 9. Caden 2,166 posts
- 10. Outbreak 4,586 posts
- 11. Riley Gaines 110K posts
- 12. Nvidia 51K posts
- 13. Nelson 32.5K posts
- 14. Ersson N/A
- 15. $NVDA 86.2K posts
- 16. Tulane University N/A
- 17. #MarcelReed N/A
- 18. Fuentes 85.2K posts
- 19. UTEP N/A
- 20. Megyn Kelly 5,599 posts
Something went wrong.
Something went wrong.