reprex has been ported to #python 😮 by Chris Baker. More ways to inflict your bugs and puzzlement on others! https://t.co/ZuuU7hnfh2 pic.twitter.com/EqvOVNEWLJ
— Jenny Bryan (@JennyBryan) August 31, 2018
reprex has been ported to #python 😮 by Chris Baker. More ways to inflict your bugs and puzzlement on others! https://t.co/ZuuU7hnfh2 pic.twitter.com/EqvOVNEWLJ
— Jenny Bryan (@JennyBryan) August 31, 2018
Bowler - Safe code refactoring for modern Python. https://t.co/ZqZpJmOFgq
— Python Trending (@pythontrending) August 30, 2018
Speed-up your code with @lru_cache decorator:https://t.co/Io3V6H6Dyz
— Daily Python Tip (@python_tip) August 30, 2018
Example - calculation of 35th Fibonacci number
(speedup from 4.32s to 0.000055s): https://t.co/QPonLSbWIm pic.twitter.com/ufPkakn4Nm
Understanding Python Dataclasses — Part 1 – https://t.co/4gBBXtlbfe
— Pycoders Weekly (@pycoders) August 25, 2018
RainCloudPlots: A wrapper function combining a jitter plot, a box plot, and a density plot into one single function sounds like useful thing to have. The R, Matlab, and Python functions are available https://t.co/HKmMOP9XWK https://t.co/DMqZhMYbTg
— Sebastian Raschka (@rasbt) August 24, 2018
This looks big: pyodide, the scientific #Python stack compiled to WebAssembly. Run Python *locally* in your browser, interact directly with #JavaScript. #programming
— Randy Olson (@randal_olson) August 24, 2018
Repo: https://t.co/4BZDKByLEf
Demo: https://t.co/dNmvLscvqI pic.twitter.com/0rz2YqQ8rf
By default, Python compare objects using their ids. Consider the following class:
— Daily Python Tip (@python_tip) August 16, 2018
class Number:
def __init__(self, x):
self.x = x
n1 = Number(1)
n2 = Number(1)
n1 == n2 # False 😲😲
The elegant solution to this problem is to use #dataclasses https://t.co/wxBtxfyLPR
Wanna know which line of your function is eating all the time? Measure it with #lprun: pic.twitter.com/1NpmVNH6F1
— Daily Python Tip (@python_tip) August 15, 2018
✨ 🐍 Python in Shiny? You bet!
— Mara Averick (@dataandme) August 9, 2018
"Reticulated Shiny" ✍️ @lopp_seanhttps://t.co/4gtVEK60VU #rstats #rshiny #python pic.twitter.com/qPG2pidECl
Pro Python tip from Larry Hastings: replace os.system() with https://t.co/nlqriQPg4E() to run shell commands from Python; the former does not return errors if they are thrown
— Rachael Tatman (@rctatman) August 9, 2018
One of my favorite Python 3 builtins is functools.lru_cache(): with a simple decorator, repeated function calls become O(1) table lookups. https://t.co/ORphGWvkCz pic.twitter.com/NmYVIxO9mE
— Jake VanderPlas (@jakevdp) August 8, 2018
f-strings in Python 3.6+ are so slick...
— Jake VanderPlas (@jakevdp) August 1, 2018
# before f-strings
>>> name = 'Guido'
>>> print("{name} created Python".format(name=name))
Guido created Python
# with f-strings
>>> print(f"{name} created Python")
Guido created Python