planetpython.org planetpython.org

Mike Driscoll: PyDev of the Week: Sunita Dwivedi

This week we welcome Sunita Dwivedi as our PyDev of the Week! Sunita works for the DISH Network. She is active with PyDEN, the Denver, CO Python users group as well as PyColorado. Let’s take some time to learn more about Sunita! Can you tell us a little about yourself (hobbies, education, etc): I live by the phrase “A life not tried enough is not lived enough”. I don’t know who said it, may be I dreamt it. Just...

planetpython.org planetpython.org

Doug Hellmann: sphinxcontrib-spelling 6.0.0

sphinxcontrib-spelling is a spelling checker for Sphinx-based documentation. It uses PyEnchant to produce a report showing misspelled words. What’s new in 6.0.0? add release notes for recent changes stop using reno to manage release notes Fix typo: commiters → committers (contributions by Jon Dufresne) Run pyupgrade across the codebase (contributions by Jon Dufresne) Add ‘Framework … Continue reading...

planetpython.org planetpython.org

Weekly Python StackOverflow Report: (ccxlvi) stackoverflow python report

These are the ten most rated questions at Stack Overflow last week.Between brackets: [question score / answers count]Build date: 2020-10-17 21:54:11 GMTHow can I generate three random integers that satisfy some condition? - [22/5]How to calculate distance for every row in a pandas dataframe from a single point efficiently? - [8/4]Pre-release versions are not matched by pip when using the `--pre` option - [7/1]Deleting rows which sum to...

planetpython.org planetpython.org

Stack Abuse: Python: Get Number of Elements in a List

Introduction Getting the number of elements in a list in Python is a common operation. For example, you will need to know how many elements the list has whenever you iterate through it. Remember that lists can have a combination of integers, floats, strings, booleans, other lists, etc. as their elements: # List of just integers list_a = [12, 5, 91, 18] # List of integers, floats, strings, booleans list_b = [4, 1.2, "hello...

planetpython.org planetpython.org

Ned Batchelder: Ordered dict surprises

Since Python 3.6, regular dictionaries retain their insertion order: when you iterate over a dict, you get the items in the same order they were added to the dict. Before 3.6, dicts were unordered: the iteration order was seemingly random.Here are two surprising things about these ordered dicts.You can’t get the first itemSince the items in a dict have a specific order, it should be easy to get the first (or Nth) item, right? Wrong....

planetpython.org planetpython.org

Test and Code: 134: Business Outcomes and Software Development

Within software projects, there are lots of metrics we could measure. But which ones really matter. Instead of a list, Benjamin Harding shares with us a way of thinking about business outcomes that can help us with every day decision making. We talk about: Business outcomes vs vanity metrics As a developer, how do you keep business outcomes in mind Thinking about customer value all the time Communicating decisions and options in...