Python – Iterators
One of the benefits of having your own blog and not following any schedule for subjects to write about is that you may write for whatever you feel like, whenever you feel like. So, Iterations in Python is the subject …
One of the benefits of having your own blog and not following any schedule for subjects to write about is that you may write for whatever you feel like, whenever you feel like. So, Iterations in Python is the subject …
Check if folder is empty: Public Function FolderIsEmpty(myPath As String) As Boolean FolderIsEmpty = CBool(Dir(myPath & “*.*”) = “”) End Function Delete all files in a folder: Public Sub DeleteAllFiles(path As String) Kill path & “*.*” End Sub Create text …
Making a CRUD application with Python is actually one of the basic thing a Python Developer should be able to do. Although some may argue it is extremely basic – it is not. Requirements The basic requirements for this one, …
The idea of the article is to show how to make a simple Django App, with 4 links, each of which navigates to a specific page. The whole code of the “app” is in GitHub, here: https://github.com/Vitosh/Python_personal/tree/master/JustProject. In general, these are …
Exception handling in python is actually quite an interesting topic. In general, the exceptions in programming could be of three types: syntactic errors – these would be noticed by your IDE or by the interpretor, thus you do not need …
VBA and source control? Do you know what is VBA? Are you sure we can source control the code, that resides in Excel? Oh, you mean that lengthy way of extracting the modules one by one? But why? Don’t you …
Using API calls with VBA and Python to write a database is actually a pretty decent architecture. Here, I would like to say that “It takes the best of the both worlds”, but the truth is that it takes the …
Using API calls with VBA and Python to Read and Write to a Database Read more →
This is a short step-by-step introduction on how to build virtual environment in Python and how to use it. Virtual envirnments keep dependencies, required by the specific project separated. Thus, it is the “clean and clear” place of the project, …
Yesterday I received an email, refering to some 2 old articles in VitoshAcademy for nested loops without recursion: VBA – Nested loops with recursion (Permutations) VBA – Avoid nested loops with recursion (Part 2) As far as the person from …
Cells and ranges in Excel are quite interesting, as these will always give some points to think of. About an year, after writing the article about VBA – Cells and Ranges in Excel (A bit more than the standard story), …
They say practice makes perfect and in order to improve my data visualization skills I recently took up a weekly challenge. There are multiple ones depending on your interest and tool of choice, most of them advertised on Twitter. Whether …
Most probably you feel like you have a good clue already how to locate a value in a given Excel row. There are plenty of ways – Find() , looking through the cells one by one, looking through the Internet for …
More than 3 years ago, I wrote an article about floating point numbers in Excel and a tiny problem with those, concerning all floating point numbers. This article is actually a nice one and it is worth reading – What …
Convert number to name – [3 -> March] Converting month number to name in VBA is actually coming out of the box with the MonthName() function, which is built-in the stanard VBA library: Sub MonthNameExample() Dim i As Long For …
VBA – Convert Month Name to Number and Vice Versa Read more →
I have decided to make a 19 minute YouTube video, to explain the basics of VBA debugging, as there are quite a few tricks that not everyone knows. The agenda: Properties Window -> F4 Immediate Window -> Ctrl + G …
Copying excel worksheets around is actually a piece of cake for a VBA developer (or so they/we think). Mainly because you can record the actions and then “learn” from them, editing a bit the code and etc. Well, there is …
VBA – Copying Excel worksheet to a new workbook without leaving the old Excel reference Read more →
Copying worksheet in VBA is actually a trivial task – use the macro recorder see the code and use it further. Anyway, if you are coding professionally with VBA (yup, we still exist:), you somehow get stomach problems, whenever you …
Months ago, I was planning to take part in the #RailGirls event in Sofia, and I was even a partner in the event. Anyway, as it was postponed up to somewhere in the future, I have decided to go through …
Python – Django Girls – Introduction to Django – Video Read more →
In the previous article for abstraction and inheritance I wrote some classes, showing the basics of these two programming concepts. In this one, I will write unit tests for one of the classes, written before. Software testing is an important …
Python – Writing Unit Tests with unittest library – Video Read more →
Abstract classes in Python are classes that inherit from the ABC (Abstract base class). In the video below, I have solved a problem, showing how 2 classes inherit from an abstract class and implement its methods. The abstract class is …
In this article I am planning to give an answer of the following two questions: What is a closure? A closure is a function, inheriting variables from enclosing environment. Operationally, a closure is a record storing a function together with …
Abstract class and abstract methods are one of the pillars of Object Oriented Programming. In Python, an abstract class is a class, inheriting from Abstract Base Classes (ABC) library. And an abstract method is a method of this class, which …
Python – Abstract Methods and Abstract Class – Live Coding Video Read more →
Long time ago, various people, including me, were trying to make permutations and combinations with nested loops and various other “heavy” structures. Anyway, in Python there is a library, which does this for us and sets the end of the …
Python – Permutations and Combinations Made Easy with Itertools Read more →
Today I have decided to check whether I can pass the first homework from SoftUni OOP with Python, through a live coding session. I have not read the problem before the video, thus I may say it took me exactly …
Python – Defining Classes and Methods with Python – LiveCoding Video Read more →
Ok. This article is for all the people, who have written code like this one: if direction == “left” then if column > 0 then: new_row = current_row new_col = current_col – 1 When they were solving a problem like …
Cartopy is a Python package designed for geospatial data processing in order to produce maps and other geospatial data analyses. Making a map with Python and Cartopy is actually easier than you might think, but still it has its own …
The Bayes’ theorem is interesting, as far as it is both quite challenging to understand and shocking once you really realize the simplicity of the numbers behind it. It describes the probability of an event, based on prior knowledge of conditions that …
Python – Bayes’ theorem – Drug testing example. 99% is not enough! Read more →
In 2013 and 2014 (wow, already 7 years ago!) I wrote two articles about linear regression with Excel. Now, I am getting more and more interested in Python, thus I guess it would be interesting to remake the article into …
Working with python, pandas and dataframes is quite challenging even for experienced Excel & VBA developer, as I love to consider myself for one. Thus, today I was fighting for quite some time to add new columns to a dataframe, …
Python – Building New Columns in a Dataframe, Based on Other Columns Read more →
The good, the bad and the ugly is a famous western. In Python, “the ugly” is probably the **kwargs, as far as it has two stars before it. Anyhow, the idea of *args, **kwargs and arg is simply to pass arguments. …
Python – *args, **kwargs and the normal ones (arg) Read more →