This article is part of a series dedicated to comparing Mojo and Python. After the speed comparison in the previous article , we now turn to the comparison of Mojo structs with Python classes. Mojo Update In November 2024 Magic was released , a new virtual environment and package manager that replaces the Modular CLI. Mojo’s latest version, 24.5.0, is available through the new Magic package…
As I promised in the previous article , we’re going to take a look at our first speed comparison between Mojo and Python. Update: On 21st January 2025, updated Mojo code to reflect changes in Mojo 24.6.0 . Speed Comparison using Complex Numbers You can find the complete code in my GitHub repository dedicated to this series of articles. In this speed comparison I use complex numbers. Inspired by a…
This article is part of a series that I dedicate to comparing Mojo with Python. If you want to read about what Mojo is , how to get started or the previous article of this series , you can check my previous articles. Update: On 21st January 2025, updated Mojo code to reflect changes in Mojo 24.6.0 . Examples of File and String Operations You can find the complete code in my GitHub repository…
If you are reading this article, you may be just as excited as I am about Mojo . Almost a year ago, I already wrote an article about it and now I have even more confidence in its future. I felt it was high time I did some hands-on coding in Mojo and I decided to start a series of articles, this one being the first. Update: On 17th June 2024 Mojo 24.4.0 was released and it brought some great…
What is a slug? In web development a slug is the unique identifying part of a web address, normally being the last part of the URL. For example, in the URL https://www.semrush.com/blog/what-is-a-url-slug the part what-is-a-url-slug is a slug. Slugs are unique for a web page. Why to slugify your URLs? The most important reason is to have SEO friendly URLs. When the search engine algorithm comes…
In this article I will show a working example of running Django and PostgreSQL with Docker Compose . We’ll have a look at running the Django migrations and creating the superuser as well. Also, we want to keep our database changes so that it remains available if we restart the application. Let’s dive in. To accomplish this, we need two containers - one for Postgres and one for Django. Postgres…
One of the greatest things in life for me is definitely travelling. People who travel with me know that I take a lot of photos. These photos have turned out to be quite handy for my new machine learning project to classify images. The Goal Using Python’s Keras library, I want to build a neural network and train it on my travelling photos to classify images whether they contain any water or not.…
Update on 9th May 2024: Mojo is developing so rapidly that a couple of things I wrote last year are already obsolete. let variables are not supported anymore you can define three types of function arguments : borrowed , inout and owned to execute your mojo code you need a main method Among all the tech stack I have worked with in my life I enjoy working with Python the most. Even with its…
I have longed for something new, something challenging for some time now and I decided to take on some courses about machine learning. I am really interested in the topic and as it plays a big part in our lives - I would say bigger than one might think -, I wanted to understand it better. I have started reading a book and completed several LinkedIn courses. In a way this post offers me a way to…
In an earlier article I mentioned that we would start migrating some of our processes. Our main goal was to replace the combination of the Oracle database and PL SQL with the combination of parquet files and Python. Here are my experience, the challenges and successes that we have had along this journey. The Beginning: What?, Why? and How? It is important - especially at a company level - that you…
I know that some people don’t have their best opinion on Oracle and of course there are truths to both sides. All things considered I think an Oracle database can be powerful, well-optimized and PL SQL provides us a great deal of functionalities at the database level. One of the advantages is that even if something seems “impossible” or quite complicated to be implemented in PL SQL, there is still…
I am going to present an example how we can fetch a file from a URL and save it for later usage. And all using only Oracle PL SQL. Our clients at work have many ways of providing data to us and now one of them decided to do it in a form of a file through their web API. The task is to download the file and save it on our server so that later it can be the source of an external table . The Final…
As I mentioned in my previous blog post , while continuing working with Oracle and PL SQL, we are migrating some processes to Python using parquet files. A requirement related to Python and parquet files came up a short while ago and I thought it could be interesting. So, in medias res; we want to be able to read and write single parquet files and partitioned parquet data sets on a remote server.…
We are facing some interesting times at work as we are going to start changing our technology stack in the near future. Most of our Oracle processes will be replaced by Python, processing the data stored in parquet files . For indispensable database processes we will change to PostgreSQL. I like Oracle and it has served us well, but I am excited about learning and working with new technologies.…
Having returned to work after some well-spent holidays, the New Year started with a quite interesting issue for me. A vast index calculation process that commonly takes 5 to 20 minutes to run started to behave strangely executing in 7 to 30 hours(!). This, of course, was unacceptable, so the issue quickly took over as the highest priority. The process, written in PLSQL, runs in an Oracle database.…
Our team’s latest sprint has not just brought me the month of December, it has presented an engaging topic. A brief overview of the challenge at hand, I had to load a huge amount of files in PL SQL in parallel considering certain prioritizations and set-ups. Let us see how it went. Task Description We have been working on a process, in which we; load a large quantity of files into an Oracle…
I am convinced that seeing - among others - MIN , MAX , SUM or COUNT would remind you first of SQL aggregate functions. However, there is a magnificent feature in Oracle: the analytic functions. My experience is that once you write your first one, you just can’t stop using them. So, what are the analytic functions? How are they different to the aggregate functions? Well, the difference is not in…
We often have a task at work when we need data from a database table in a way that some values are not displayed in rows, but being next to each other. In other words, rotating rows into columns. Depending on the particular task, I always try to use the simpliest way to do it. Let me show three methods by means of which I have coped with this so far. To present some examples, I created a simple…
A short while ago I was working on a PL/SQL task where I needed to loop through some particular files in a folder. As always, I aimed for a solution that is simple and requires less effort to get the result. Let’s see what I came up with. Task description The task was to find a good solution to list all the required files in a directory. The directory is on the same Linux server where the database…