Systems | Development | Analytics | API | Testing

Python

How to Handle Unhashable Type List Exceptions in Python

The Python TypeError: unhashable type: 'list' usually means that a list is being used as a hash argument. This error occurs when trying to hash a list, which is an unhashable object. For example, using a list as a key in a Python dictionary will cause this error since dictionaries only accept hashable data types as a key. The standard way to solve this issue is to cast a list to a tuple, which is a hashable data type.

How to Catch Multiple Exceptions in Python?

When a program encounters an exception during execution, it is terminated if the exception is not handled. By handling multiple exceptions, a program can respond to different exceptions without terminating it. In Python, try-except blocks can be used to catch and respond to one or multiple exceptions. In cases where a process raises more than one possible exception, they can all be handled using a single except clause.

3 Ways to Integrate MySQL With Python

As one of the most popular relational database management systems, MYSQL gets a lot of use from a variety of applications. With the popularity of Python in web-based applications, it's essential that MySQL and Python can communicate with one another. Read on to learn more about MySQL and to discover three ways to integrate it with Python.

REST API With Python

According to Stack Overflow Developers’ Survey 2019, Python is the second “most loved” language with 73 percent of the developers choosing it above other languages prevailing in the market. Python is a highly versatile language that supports a wide variety of use cases across several languages. It is a language well-known for its ease of use, portability, and ability to handle large data sets.

6 Best API Frameworks for Python Developers

APIs are a quick and easy way to create applications that can connect to other services. APIs provide an interface for developers, allowing them to leverage their programming skills in one language (Python) and use it with any service they want. Python is a popular choice for APIs because of the high level of abstraction available and its extensive library support.

Processing DICOM Files With Spark on CDP Hybrid Cloud

In this video, you will see how you can use PySpark to process medical images from an MRI and convert them from DICOM format to PNG. The data is read from and written to AWS S3 and we leverage numpy and the pydicom libraries to do the data transformation. We are using data from the "RSNA-MICCAI Brain Tumor Radiogenomic Classification" Kaggle competition but this approach can be used for general purpose DICOM processing.

Building an ETL Pipeline in Python

Thanks to its user-friendliness and popularity in the field of data science, Python is one of the best programming languages for ETL. Still, coding an ETL pipeline from scratch isn’t for the faint of heart — you’ll need to handle concerns such as database connections, parallelism, job scheduling, and logging yourself. The good news is that Python makes it easier to deal with these issues by offering dozens of ETL tools and packages.

Managing Python dependencies for Spark workloads in Cloudera Data Engineering

Apache Spark is now widely used in many enterprises for building high-performance ETL and Machine Learning pipelines. If the users are already familiar with Python then PySpark provides a python API for using Apache Spark. When users work with PySpark they often use existing python and/or custom Python packages in their program to extend and complement Apache Spark’s functionality. Apache Spark provides several options to manage these dependencies.

Why Python cProfile is the Recommended Profiling Interface

Performance optimization is a basic need for software development. When it comes to optimizing app performance, tracking frequency, maintaining production, or perpetuation method calls, profilers play a vital role. Learn why Python cProfile is a recommended profiling interface and how it enhances your software performance.