If you have a background in languages such as Java, C or C++ which are compiled or statically typed, you might find the way that Python works a bit confusing. For instance, when we assign a value to a variable (say a = 1
), how the heck does Python know that variable a
is an integer?
In statically-typed languages the variables’ types are determined at compile-time. In most languages that support this static typing model, programmers must specify the type of each variable. …
Stack Overflow is the leading community for developers where people are able to ask and answer programming-related questions. More than 21 million questions have been asked, more than 31 million answers have been provided, and more than 80 million comments have been made! I have to admit that most of the posts are pretty bad, but there are definitely tons of answers that are amazingly useful, well-written, and justified.
Apart from the very basic questions asking how to print a string with Python, Java, or Go, there are also numerous unpopular questions to which you’ll find some useful answers. …
In the context of Machine Learning, the split of our modelling dataset into training and testing samples is probably one of the earliest pre-processing steps that we need to undertake. The creation of different samples for training and testing helps us evaluate model performance.
In this article, we will discuss the purpose of training and testing samples in the context of modelling and model training. Additionally. we are going to explore three easy ways one can use to create such samples using Python and pandas. More specifically, we will showcase how to create training and testing samples:
scikit-learn
(aka…
There are many publications across Medium that do not display their number of followers. Even though there are many publications that choose to display the number of Medium users who are following them, there are certain publications (including Geek Culture) that currently choose not to display the number of followers on its homepage.
Python has been one of the most widely used programming languages that is still gaining popularity over time. The field is increasingly competitive as more people want to become proficient in the language and secure a good job in the area. Therefore, it is important to keep learning and improving your coding skills in order to be able to compete other people and make progress in your career as a Python Developer or Data Scientist.
In this article, I am going to discuss a few tips that could eventually help you stand out as a Python Programmer by using techniques…
There are mornings that I wake up particularly low and in a very bad mood and one of the biggest mistakes I used to do was start battling with unpleasant emotions. This is simply going to make them worse and even stronger. When you are not able to accept an emotion and initiate a battle against it, you automatically place your attention to that specific emotion. In other words, you are consuming most of your energy to fight a battle you’ve already lost.
“Where you place your attention is where you place your energy”
— Dr Joe Dispenza
The first…
A Python set is a collection type introduced back in version 2.4. It is one of the most powerful data structures of the language as its characteristics can prove useful and practical in numerous use cases. In this article, we’ll have a quick look at the theory behind sets and later on will discuss the most common set operations as well as a few use-cases where sets come in handy.
A set is a mutable and unordered collection of hashable (i.e. immutable) objects with no duplicates. …
Depending on the data that we wish to store in a database, it is common practice to adjust the collation of tables accordingly in order to avoid any unwanted behaviors.
In this article, we are going to introduce collation in databases and discuss why it is important to configure the collation of your tables accordingly. Additionally, we are going to explore a few ways you can check the collation of tables in MySQL (or MariaDB). Finally, we will showcase how you can change a table’s collation.
A collation is a set of rules that explicitly define how to compare and…
Most modern programming languages and software products around come with some hidden functionalities that we usually call “Easter Eggs”. In this article, we are going to discuss the purpose of Easter Eggs and why they are implemented in the first place. Additionally, we will explore eight different Easter Eggs that come with Python core language.
In programming languages and software products in general, an Easter Egg is a hidden piece of functionality or unusual behaviour that usually remains undocumented. It is implemented mostly for entertainment purposes since such functionality doesn’t really serve any purpose in the context of software development…
Apache Spark is a framework that enables the process of enormous amount of data in a reasonable amount of time. The efficiency of this unified engine is hugely dependent on its ability to distribute and parallelise the work performed over a collection of data.
In this article, we are going to introduce partitions in Spark and also explain how to re-partition DataFrames. Additionally, we will also discuss when it is worth increasing or decreasing the number of partitions of Spark DataFrames in order to optimise the execution time as much as possible.
In order to achieve high parallelism, Spark will…
ML Engineer | Python Developer | Interested in Neuroscience and Mindfulness