Showing results 6131-6140 of >6,222 (page 614)
https://stencel.io/posts/python-antipatterns.html

# Python antipatterns 2023-05-06 22:56 ## Global variables antipattern Global variables make code harder to reason about, test, and debug. Instead, use local variables or pass variables as function arguments. x = 0 def increment(): global x x += 1 print(x) # Output: 0 increment() print(x) # Output: 1 ## Mutating arguments antipattern Modifying arguments passed to a function can lead to unintended side effects and make code harder to understand. Instead, create a copy of the argument and modify the cop

https://www.novixys.com/blog/python-yield-statement/

Skip to content Novixys Software Dev Blog Menu Home What is the Python Yield Statement? Learn about the Python yield statement which is used to create generators. “Count your age by friends, not years. Count your life by smiles, not tears.” ― John Lennon Contents 1. Introduction 2. A Function vs a Generator 3. What is a Generator? 4. Generating Values for a Loop 5. Using return with yield 6. Restarting a Generator 7. Sending a Value into a Generator 8. On Demand Termination of an Iterator Summary See

https://github.com/TencentCloud/tencentcloud-sdk-python-intl-en/blob/master/tencentcloud/cvm/v20170312/cvm_client.py

Tencent Cloud API 3.0 SDK for Python. Contribute to TencentCloud/tencentcloud-sdk-python-intl-en development by creating an account on GitHub

https://www.bnikolic.co.uk/blog/python/flops/2019/09/27/python-counting-events.html

On the Linux command line it is fairly easy to use the perf command to measure number of floating point operations (or other performance metrics). (See for example this old blog post ) with this approach it is not easy to get a fine grained view of how different stages of processings within a single process. In this short note I describe how the python-papi package can be used to measure the FLOP requirements of any section of a Python program

https://stackabuse.com/implementing-lda-in-python-with-scikit-learn/

In our previous article Implementing PCA in Python with Scikit-Learn, we studied how we can reduce dimensionality of the feature set using PCA. In this article

https://mail.python.org/pipermail//python-ideas/2013-November/024132.html

Perešíni Peter ppershing at gmail.com Thu Nov 21 17:17:53 CET 2013 I really like the colon to show that the indentation is going to change -- it is Pythonic and consistent with the language plus helps both interactive console and parsers/editors to expect the indentation. However, I would still make cascading operator different from dot just to be more explicit (to avoid confusion of the programmers that do not know about this feature yet -- double dot will indicate that this is a new syntax) On Thu, Nov

https://blog.finxter.com/brackets-a-simple-introduction-to-set-comprehension-in-python/

Skip to content Menu 🔴 YouTube 👑 Membership 👩‍🎓 Academy 📖 Books 🎲 Puzzles 🤎 User Stories What Our Users Say About Finxter Finxter Feedback from ~1000 Python Developers Video Reviews Course Review from Cristian Course Review from Adam Review by ChatGPT About Chris Start Here ⭐ A Simple Introduction to Set Comprehension in Python September 27, 2022March 28, 2021 by Chris Being hated by newbies, experienced Python coders can’t live without this awesome Python feature. In this article

https://sourcemaking.com/design_patterns/visitor/python/1

Visitor Design Pattern in Python Back to Visitor description """ Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates. """ import abc class Element(metaclass=abc.ABCMeta): """ Define an Accept operation that takes a visitor as an argument. """ @abc.abstractmethod def accept(self, visitor): pass class ConcreteElementA(Element): """ Implement an Accept operation that takes a visi

https://dzone.com/articles/build-simple-api-with-python-flask-and-sql

You will learn how to build a REST API using Python Flask and SQLite. This beginner-friendly guide includes setup, a GET /items endpoint, and automated tests

https://datatofish.com/how-to-connect-python-to-sql-server-using-pyodbc/

⋅ Tutorials Python Julia R Batch Scripting Feedback ⋅ Data Science Tutorials Python Basics Data Analytics Data Visualization Data Management Convert a Text File to CSV Create a sqlite3 Database Convert Excel to CSV Export DataFrame as JSON Connect to MS Access Connect to SQL Server Import a CSV File Convert JSON String to CSV Import a DataFrame Into SQLite Import an Excel File SQL to DataFrame Graphical User Interface pandas Check for NaN Set Column as Index Compare Two DataFrames Convert a Text File to

‹ Prev Next ›