Python tutorials

Bucket Sort in Python

Introduction In this tutorial, we’ll be diving into the theory and implementation of Bucket Sort in Python. Bucket Sort is a comparison-type algorithm which assigns elements of a list we want to sort in Buckets, or Bins. The contents of these buckets are then sorted, typically with another algorithm. After sorting, the contents of the buckets are appended, forming a sorted collection. Bucket Sort can be thought of as a scatter-order-gather approach towards sorting a list, due to the fact […]

Read more

How to Write a Makefile – Automating Python Setup, Compilation, and Testing

Introduction When you want to run a project that has multiple sources, resources, etc., you need to make sure that all of the code is recompiled before the main program is compiled or run. For example, imagine our software looks something like this: main_program.source -> uses the libraries `math.source` and `draw.source` math.source -> uses the libraries `floating_point_calc.source` and `integer_calc.source` draw.source -> uses the library `opengl.source` So if we make a change in opengl.source for example, we need to recompile both […]

Read more

‘is’ vs ‘==’ in Python – Object Comparison

‘is’ vs ‘==’ in Python Python has two very similar operators for checking whether two objects are equal. These two operators are is and ==. They are usually confused with one another because with simple data types, like ints and strings (which many people start learning Python with) they seem to do the same thing: x = 5 s = “example” print(“x == 5: ” + str(x == 5)) print(“x is 5: ” + str(x is 5)) print(“s == ‘example’: […]

Read more

Managing Python Environments with direnv and pyenv

Introduction As Python developers, most of us are familiar with Virtual Environments. One of the first things we do when working on a new project is to create an environment. We commonly use virtualenv or venv exactly for that purpose. Each project we work on uses different packages and may even be compatible with only one Python version. Doing something repeatedly warrants automation. In this article, we’ll see how direnv and pyenv can help us do that. As a side […]

Read more

What’s New in Tensorflow 2.0?

Introduction If you are a Machine Learning Engineer, Data Scientist, or a hobbyist developing Machine Learning Models from time to time just for fun, then it is very likely that you are familiar with Tensorflow. Tensorflow is an open-source and a free framework developed by Google Brain Team written in Python, C++, and CUDA. It is used to develop, test, and deploy Machine Learning models. Initially, Tensoflow did not have full support for multiple platforms and programming languages, and it […]

Read more

Guide to Basic Data Types in Python with Examples

Introduction to Python Data Types In this article, we’ll be diving into the Basic Data Types in Python. These form some of the fundamental ways you can represent data. One way to categorize these basic data types is in one of four groups: Numeric: int, float and the less frequently encountered complex Sequence: str (string), list and tuple Boolean: (True or False) Dictionary: dict(dictionary) data type, consisting of (key, value) pairs It’s important to point out that Python usually doesn’t […]

Read more

Deep Learning Models in Keras – Exploratory Data Analysis (EDA)

Introduction Deep learning is one of the most interesting and promising areas of artificial intelligence (AI) and machine learning currently. With great advances in technology and algorithms in recent years, deep learning has opened the door to a new era of AI applications. In many of these applications, deep learning algorithms performed equal to human experts and sometimes surpassed them. Python has become the go-to language for Machine Learning and many of the most popular and powerful deep learning libraries […]

Read more

Deep Learning in Keras – Data Preprocessing

Introduction Deep learning is one of the most interesting and promising areas of artificial intelligence (AI) and machine learning currently. With great advances in technology and algorithms in recent years, deep learning has opened the door to a new era of AI applications. In many of these applications, deep learning algorithms performed equal to human experts and sometimes surpassed them. Python has become the go-to language for Machine Learning and many of the most popular and powerful deep learning libraries […]

Read more

Integrating H2 with Python and Flask

Introduction H2 is a lightweight database server written in Java. It can be embedded in Java applications, or run as a standalone server. In this tutorial, we’ll review why H2 can be a good option for your projects. We’ll also learn how to integrate H2 with Python by building a simple Flask API. The Features of H2 H2 was built with performance in mind. “H2 is a combination of: fast, stable, easy to use, and features”. Although H2 is prominent […]

Read more

Data Science – learn R or Python?

Hi Folks, I have a query around whether to learn R from scratch or should I leverage my basic python knowledge to extend into Data Science with scikit,numpy ,pandas? So I am bit confused … I am not shy to learn New programming language like R etc bur really need to know who edges out whom in market. Maybe i should learn R too along with Python so  your valuable opinion matters.             Also i […]

Read more
1 166 167 168 169 170 181