#pythonista

TechKeysXTechKeysX
2025-06-26

Swap variable using tuple :
This is a Pythonic and efficient way to swap values without using a temporary variable. a, b = b, a

Tyler V. :vturtle:TerabyteTiger@dftba.club
2025-06-26

I'm in need of a #pythonista to tell me why this code is throwing the error "NameError: local variable referenced before assignment"

The python code:
timer = 5
def handle_timer():
    while timer >= 0:
        text_area.text = str(timer)
        time.sleep(1)
        timer = timer - 1
🟡🐍Sviatoslove.pie♥🇺🇦#StandWithUkraine🙏 | українець на чужиніwebknjaz.me@bsky.brid.gy
2025-05-24

Still en route home from #PyConUS sprints.. Looking forward to decompressing in several hours, even though all the intense interactions were inspiring and meaningful. I'm so privileged to have so many #pythonista friends in my life 🫶 #Python

2025-04-21

@mrola Tengo meses usando #DeepSeek para generar código, y es mucho más eficiente, limpio y bien documentado, que otras herramientas similares. He podido generar scripts incluso para herramientas en iOS, como #Pythonista o #Scriptable con facilidad.

2025-03-25

@ambv pdb -p
???

REALLY?

I think I just died and went to #pythonista heaven :)

(Also WOW do I wish I had that feature when I worked at AMZN. Can't tell you how many times I had to try and debug a deeply embedded process running positively GNARLY enterprise Python code!)

2025-01-13

We’re very excited to be kicking off 2025 with an exciting announcement… PyCon UK is back, and we’re moving to a brand-new location!

After several fantastic years in Cardiff, the 2025 conference is heading up north. We’re thrilled to announce that PyCon UK 2025 will be held in Manchester from the 19th to the 22nd of September 🗓️

Expect a full program of talks, workshops, and sprints for all Pythonistas. We look forward to seeing you there! 🐍

#PyConUK2025 #PythonProgramming #Pythonista

2024-12-07

I just stumbled on the following #Python code

if not (3 <= len(sys.argv) <= 4):

Which I find quite confusing (or even revolting)
Additionally I think it is wrong as the program takes exactly 2 arguments.
So

if ( len(sys.argv) != 3):

would have been far easier to understand.

Nevertheless, can a #Pythonista please explain me the pattern?

From other programming languages I would have expected it to fail miserably because the evaluation order would have created something like

(3 <= len(sys.argv) )<= 4)

where the first part would evaluate to true or false which both are likely smaller than 4

2024-10-24

Hello Pythonistas,

Hope to see you all in meet up again!
Our next meet-up will be on Wednesday, November 6,2024.
Join us, have a chat, and learn more featutes of aider.chat by Jane Ooi & Timothy Downs and arithmetic trading in Python by Adolfo Villalobos.

Book your spot at meetup.com/melbourne-python-us and join us at 5:30 pm on Wednesday, November 6 at Judo Bank, in the Queen and Collins Building, Level 26/376-390 Collins St, Melbourne VIC 3000, Australia.
-up

2024-09-20

The last tool on the list is another allrounder 🚀

📦 summarytools (by Dominic Comtois)

I’m a visual person and I like to “see” my data. With a combination of two commands from {summarytools} that’s easy and you get a descriptive overview in your viewer pane in your IDE.

🔗 github.com/dcomtois/summarytoo

---------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of view(dfSummary()). The function comes from {summarytools} and is applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here (which are descriptive statistics in your viewer pane).
2024-09-19

The next #rstats package comes with a full suite of functions to wrangle your data 🛠️

📦 SmartEDA (by Dayanand Ubrangala and others)

I like to use a powerful function to get a brief overview of the data - if you’re looking for more, it can also generate a standardized #HTML report for you.

🔗 daya6489.github.io/SmartEDA/

---------------------
Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of ExpData(). The function comes from {SmartEDA} and is applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-19

Hello Pythonistas,

Hope to see you all in meet up again!
Our next meet-up will be on Wednesday, October 2.
Join us, have a chat, and learn more about migrating COBOL data to PostgreSQL using Python and Django by Alan and Knowledge Graphs and GNNs by Mohammad.

👉 Book your spot-meetup.com/melbourne-python-us and join us at 5:30 pm on Wednesday, October 2 at Judo Bank, in the Queen and Collins Building, Level 26/376-390 Collins St, Melbourne VIC 3000, Australia.
-up

2024-09-18

I like the next one because without creating full-blown plots, you get visuals. How cool is that?

📦 skimr (by Elin Waring and others)

As you can see in the screenshot, calling skimr::skim() gives you a wealth of descriptive statistics - all readily accessible in your console.

🔗 docs.ropensci.org/skimr/

---------------------
Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of skim(). The function comes from {skimr} and is applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-16

I can't present today's package without bias—it was my first #rstats package and taught me a lot about #softwaredevelopment.

📦 overviewR (by Cosima Meyer & Dennis Hammerschmidt)

It’s designed for time-series cross-sectional data but works for a range of datasets in your #EDA.

🔗 cosimameyer.github.io/overview

---------------------

Looking for more #rstats packages for #EDA? Check out this post: bit.ly/eda-in-rstats

#pythonista? Series coming soon!

#rladies

Code showing the output of overview_tab(), overview_plot() and overview_na(). The functions come from {overviewR} and are applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-15

The next package sheds light on your missing data 💡

📦 naniar (by @njtierney, @visnut, @milesmcbain, @colinfay and others)

It's all about highlighting and dealing with missing data 🕵🏼‍♀️ (and I love the hex-logo - it tells the story so nicely!)

🔗 naniar.njtierney.com

---------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of miss_var_summary(). The function comes from {naniar} and is applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-14

The next package for #EDA is

📦 Hmisc (by Frank Harrell & Charles Dupont).

I'm just scratching the surface, but Hmisc::describe() is my go-to for a great tabular overview of descriptive stats.

🔗 hbiostat.org/r/hmisc/ 🔗 hbiostat.org/r/hmisc/#package- (workflows)

---------------------

Looking for more #rstats packages for #EDA? Check out this post: bit.ly/eda-in-rstats

#pythonista? Series coming soon!

#rladies

Code showing the output of describe(). The function comes from {Hmisc} and is applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-13

Let's welcome another good friend in #EDA in #rstats

📦 gtsummary (by Daniel Sjoberg (creator and maintainer) as well as contributors)

It gives you nice, publication-ready tables (and goes beyond #EDA here - if you are looking for a way to present regression tables nicely, this one has it for you too!)

🔗 danieldsjoberg.com/gtsummary/

------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

This is the code:  "#--------------------------------------------------------------------------------------------------- # Get the data library(palmerpenguins)  #--------------------------------------------------------------------------------------------------- # Exploratory data analysis with gtsummary library(gtsummary) tbl_summary(penguins)   # And this is the output:"  Below is a screenshot of a nicely formatted table containing standard descriptive statistics on a variable (and category) level.
2024-09-12

Next up is {dlookr} that you can use to support your #EDA workflow in #rstats

📦 dlookr (by Choonghyun Ryu)

It builds on its diagnose function family and gives you also specific ways how to visualize and analyze outliers.

🔗 choonghyunryu.github.io/dlookr

---------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of diagnose(), diagnose_numeric() and diagnose_category(). All functions come from {dlookr} and are applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the full content here.
2024-09-11

And let’s continue the #EDA series in #rstats with

📦 DataExplorer (by Boxuan Cui)

This package is rich - it comes with ready-made reports that can be generated with just one line of code: create_report(penguins). Check out the report here to see what it looks like: cosimameyer.com/media/report.h

🔗 github.com/boxuancui/DataExplo

---------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

# Get the data library(palmerpenguins)  # Exploratory data analysis with DataExplorer library(DataExplorer) create_report(penguins)  # This line will generate the HTML report that you can see in the link (in post)
2024-09-09

Let's talk about #EDA, a key part of any #datascience workflow. Understanding your data and spotting biases is crucial for modeling and interpreting results 🔎

Luckily, many tools can support your workflow. I'll start with #rstats 🚀

📦 R Essentials

No extra packages needed—#rstats provides built-in functions that give a data overview

---------------------

Looking for more #rstats packages for #EDA? Check out this blog post: bit.ly/eda-in-rstats

#pythonista? A series is coming soon!

#rladies

Code showing the output of dim(), tail(), str(), and summary(). All are built-in functions in R and are applied to the {penguins} dataset. Unfortunately, the alt text doesn't allow a full print of the content - this is why I am not adding the content here.
2024-05-20

I am so incredibly inspired and just a bit overwhelmed by #pyconus2024

I met so many amazing people and saw SO MANY great talks.

I'll definitely be re-watching a few while I take the time to process it all and play with some of the amazing new tools I've been exposed to.

What a truly exceptional community we have. I am very grateful for the huge team of people who clearly gave it their all and proud to be a #pythonista :)

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst