Author: Vitosh

Python OOP – Classes, Methods, Attribures, Composition, Inheritance

Have you ever dreamt about coding classes like a pro? No? You had “normal” dreams? Anyway, in the video below, I am solving 3 exercises with a lot of debugging and some basic tests. Exercises are from the book Python

Tagged with: , , , , , , ,

Python Dictionary – Advanced. With YouTube video.

Some time ago, I wrote an article about defaultdict  in Python here – vitoshacademy.com/python-defaultdict-object-or-how-to-avoid-the-key-error. Now, I have decided to make a video about it and increase the scope with standard dictionary functions and an advanced class, that checks whether the

Python In Excel – with YouTube video!

Finally! Microsoft did it! Put python in MS Excel! And I was able to install it and test it on my machine! The video of my attempts is here below: The “code” is that one:

Enjoy it!

Tagged with: , ,

Python – Logging into a file and into the console

Python allows decent built-in logging. As I am going to explain in the video below, the built-in logging is actually rather neat – it allows everyone to log into a file or into the console within minutes – just the

Tagged with: , , , , , ,

Python – Empty list as a default argument in a python function

This is probably a python “feature” that every junior developer has bumped into – once you make an empty list as a default argument in Python, it works as expected only for the first object of the class. For the second object – not exactly. Don’t worry, everyone has hit that bug, even it they are not willing to admit it.

Tagged with: , , ,

Python – Reading and Writing Files – With YouTube Video

Another YouTube video for Python – this time, about reading and writing to files. It is a bit interesting, if these are your first steps with Python, for me it was a nice reminder of how the “things” used to

Tagged with: , , ,

Python – Lambda Expressions – With YouTube Video

As one of the acknoledged reviewers of the Manning book Python How-To, I have decided to make a YouTube video, based on a part of the book, mentioning Lambda Expressions. The video is here, and the code I have used

Tagged with: , , , ,

Python – Cramer’s Rule for Linear Equations – With YouTube Video

Creamer’s rule for a solution of linear equations states pretty much the following: Using this interesting picture from the German Wikipedia, I have created the following video, explaining a bit the Rule of Mr. Cramer: The video goes through the

Tagged with: , , , , , ,

Noise. Random Noise. Perlin Noise. With Jupyter Notebook.

Perlin random noise.

Tagged with: , , ,

MS Word – Connect a connector to a Shape

Have you ever got your connectors in MS Word not in line? Like this one: The good and intended way to do it, was pushed by Microsoft some time ago – go buy yourself MS Visio. But, if you do

Azure – Quickstart: Deploy a Pyton Flask web app to Azure App Service – With YouTube Video

Following the step-by-step original tutorial here, I have created a simple Azure video tutorial, explaining how to deploy a python flask web app with local git. The idea to have something on your own PC and then simply using this

Tagged with: , , , , ,

Go – Define Test Coverage in Golang – With Picture and Coverprofile – With YouTube Video

Ever dreamt to have a picture of the test coverage of your code? In green for the covered rows and red for the non-covered ones? No? Anyway, read this article to see what you have missed 🙂

Tagged with: , , , , , ,

Go – Function that gets a website and returns its title – With ChatGPT

I took a look at that new ChatGPT and I can officially say – the future is now. Take a look at what it does, after writing it a simple nice request: The first result did not work, as it

Tagged with: , , , , ,

Go – “While Do” and “Do While” loops in go

Ok, so the golang language does not exactly have the word “while” in it. Anyway, the do-while and while-do loops can be easily implemented with a for loop. The main difference between the do-while and while-do is that in the

Tagged with: , , ,

Python – Split worksheet to worksheets, save Excel worksheets to csv

Same article, but for VBA is here – https://www.vitoshacademy.com/vba-split-worksheet-to-worksheets-save-excel-worksheets-to-csv/ This article does 2 things: Splits one worksheet to multiple worksheets Then goes through the worksheets and saves them as *.CSV files So what is the idea? Having this excel file,

Tagged with: , , ,

VBA – Check if resource or url exists in the internet

If you are one of the many VBA developers, then most probably you have been asked once or twice to download some file from a local eshare or site. Before downloading it, it really makes sense to check, whether this

Tagged with: , , , ,

Python – Filtering values from a Pandas DataFrame

Some time ago, probably yesterday or the day before, I had to filter a pandas dataframe and somehow it did not come intuitively into my mind how to do it. As I did not have an article about it, I

Tagged with: , , ,

VBA – Insert Into String

Inserting into string in Excel should be a trivial task, but it always makes sense to have something prepared in the boilerplate, before you start working. Ok, why is it important to have a nice function, if something like this

Git Log tricks

The idea here would be to show some git log tricks and to develop the article, whenever I find something more and more worthy. Before starting this one, please remember that exiting vim editors in the command prompt is with

Tagged with: , , , ,

Python – Just a bit about datetime and timedelta

Ok, dates in VBA and Excel are somehow complicated, because of some “feature” that Microsoft Excel has introduced, due to compatibility issues. I have already wrote a few articles about these here, and separate one about what day is Friday

Tagged with: , , ,

Python – Init a class with a default list property correctly

Sometimes, (but only sometimes) we think that writing too much code is useless and writing less code in python is more readable and performs faster. While in the general case this is true, this article is simply going to show

Tagged with: , , , ,

Python – Reading and writing to the console

Reading from the console and writing to it is a piece of cake in python. These two functions do it for you perfectly:

Then why am I writing a whole article about it? Well, there is something fancy, if

Tagged with: , , , ,

Python – Enumerate Lists in a Loop

Plenty of times, when you are looping with a for-each loop in python, you somehow realize that you need a counter. Then you most probably write something ugly like this one:

Why is this ugly? Mainly because the next

Tagged with: , , , ,

Python – Write a DataFrame or List to multiple tabs in Excel

The idea of the article is to provide a Python code that does the following: Takes a list or DataFrame; Splits it into quite a few smaller parts; Writes each one on a separate Excel worksheet; Pretty much like this:

Tagged with: , , , , ,

VBA – Split worksheet to worksheets, save Excel worksheets to csv

Same article, but for Python is here – https://www.vitoshacademy.com/python-split-worksheet-to-worksheets-save-excel-worksheets-to-csv/ This article does 2 things: Splits one worksheet to multiple worksheets Then goes through the worksheets and saves them as *.CSV files I hope that is enough for you. Ok, so

Tagged with: , , ,

VBA – Option Compare (Text || Binary || Database)

Option Compare  in VBA is the thing, that will save you ugly stuff like this one:

Yup, it is a bit ugly, using UCase  to compare all the time, between small letter text and big letter text. So, if you

Tagged with: , , , , ,

Python – Plotting a circle with matplotlib

Plotting a circle with matplotlib library in python is an interesting task. If you google it, you will find quite good answers, but anyway, I am here because I want to summarize my point of view. Pretty much, the idea

Tagged with: , , , , ,

VBA – Get Substring Between 2 Substrings – Locate value of Nth XML

Getting N-th string between two substrings might sound a bad idea, until you do not need it. And with VBA, you better have something prepared. So, imagine the following XML (from this article here):

Your task is to get

Tagged with: , , , , , , , ,

Python – dictionary to CSV

Dictionary to a CSV file is probably a good question, if you are hiring a VBA developer. For a python person it should be a trivial one, as this one should not be even a tough search in Google. Anyway,

Tagged with: , ,

How to get redirect url using Excel VBA or Python

Getting some tiny URL, that redirects you to somewhere else might be dangerous. There are a lot of people, that would never ever click on bit.ly/something or goo.gl/something, just because they do not know where the redirect is going to

Tagged with: , , , , , ,
Top