Author: Vitosh

C# – Build a .NET Standard library with Visual C# – Video

Following the Microsoft tutorial for building a .Net Standard library with Visual Basic from here, I have decided to make a video for .Net Standard library with C#. Pretty much, it is one and the same. The library contains one

Tagged with: , , , , ,

Writing data from text file to Excel cells

There are quite a few methods for writing data from a text file to Excel. The main are the following: Through a Query Table Through opening the text file and Reading and writing line by line Reading the text file,

Tagged with: , , , , ,

Python – UnitTests in Jupyter Notebook

Unit testing is the “sweet” part of the programming – once you have tested “all the things”, you feel that the code you have submitted somewhere is actually valid and somehow it works. Furthermore, it allows you to nicely brag

Tagged with: , , , , ,

Book Review – Stephen Wolfram – Adventures of Computational Explorer

Some time ago, I have received the book of Stephen Wolfram – Adventures of Computational Explorer for a review. Stephen is the guy behind WolframAlpha – https://www.wolframalpha.com/, a PhD in physics before his 21. birthday, considered a prodigy by some

Tagged with: , ,

VBA – Extracting financial data from a website in table format

Although there are plenty of other tools for extracting data from a website (take a look at Beautiful Soup), VBA is somehow good, because … well, because it is somehow challenging to do it every time. Yesterday, I answered a

Tagged with: , , , , , ,

Python – Statsmodels Example – Video

Statsmodels is a nice statistics library in Python, which eases the data processing and analysis with Python. The library is available here – statsmodels.org and on its official web site the installation guide is always up to date. In the

Tagged with: , ,

Excel – How to build magic square with VBA, following Python Mod Mathematics

Some 4 years ago I wrote an article for calculating magic square with python. What the article did was actually checking whether the square is magic, and not calculating a new one. This one is going to show how these

Tagged with: , , ,

Python – Plotting DataFrame and Working with Pandas – Video

Working with Pandas is like working with Excel on steroids – it can really do a lot of things fast, but somehow doing the easy things get complicated. In this video and article tutorial I am presenting loading data to

Tagged with: , , , , , , ,

Python – Platforms Jumping – CodeForces

Greedy algorithm is described as an algorithm that follows the problem-solving heuristic of making the locally optimal choice at each stage with the intent of finding a global optimum. Thus, it is always interesting to find a problem, which can

Tagged with: , , ,

Python Slice Notation

Python Slice Notation is somehow easy and tough in the same way. Lately, I was doing some competitive programming with Python and I have decided to write a summary of the slice notation, thus there is always a place for

Tagged with: , , , , , , ,

Python – Binary String Minimizing Problem – CodeForces

Codeforces has introduced a third division in their competitions. Initially I though this is the place to go for “easy” stuff, as far as some of the 2nd division problems require some advanced algorithms, like combinations of graphs and months

Tagged with: , , , , ,

Find all list (li) elements in a special position of a web site

So, my idea was to obtain all the elements, tagged with “li” from here – vitoshacademy.com/all, using BeautifulSoup4 and Python. Initially, I thought about running a simple soup.findAll("li") , but it also added the text from the menus, which were

Tagged with: , , , ,

Scraping a web site up to the N-th level with Python

Scraping data from a web site has always been a pleasure with Python. If you come from the VBA world, the BeautifulSoup4 is indeed beautiful! I have been scraping a web site with python before, but now as I have

Tagged with: , , , ,

Dynamic dropdown list in Excel VBA with variables

Dropdown lists in Excel usually are built from a range or from a variable list. Dropdown list from Excel Range Thus, building a dynamic dropdown list may include building a dynamic range, with undeclared end. Thus, let’s imagine that the

Tagged with: , , , , ,

Prime numbers matrix and coloring with Python and xlsxwriter

About 4 years ago, I wrote an article about prime numbers in Excel and their visualisation with VBA – vba-function-in-excel-to-check-prime-numbers. Pretty much, it displays the prime numbers in a 10 x N matrix, starting from 1 and finishing at N:

Tagged with: , , , , , , , , , ,

Scraping web site and writing its links to a database with Python

Scraping a web site with BeautifulSoup 4 and Python is a walk in the park, if you have scraped a web site with VBA before. Still, there are a few tricks, that should be taken into account. Trick #1 –

Tagged with: , , ,

Adding data to SqlLite3 database with Python

After reading the database to python from the previous post here, it is time to do the ADD data to the database. Our database is created like this:

The database has autoincremented primary key, thus we do not need

Tagged with: , , , ,

Connecting SqlLite3 database to Python and Reading it

Connecting SqlLite3 database to a Python file is actually 1 line of code: conn = sqlite3.connect(r"C:\Users\database.db") I have used a database from sqllitetutorial.net, which was rather neat. Then DB Browser for SQLLite a LEFT JOIN was implemented, in order to unite the

Tagged with: , , ,

Adding data to SqlLite3 database, but only one value with Python

Life is hard, when you are learning Python and you see things that are making no sense the way they run. After writing about adding data to SqlLite3 with Python, today I have tried to do the same, but for

Tagged with: , , ,

Find all HTML tags in a web page and print them from a sorted dictionary

Finding all HTML tags from a web page and recording these to a dictionary is magically easy task with Python (if you compare it with #VBA), when Beautiful Soup 4 is used. soup.find_all(True) loops through the tags and a simple

Tagged with: , , , ,

Write Formulas in Excel through Python XlsWriter

Writing formulas with Excel with Python is a technique, that needs some practice, actually. Although XlsWriter has some good documentaion, not a lot is covered on the point, that concerns creating a file with a formula in it. First and

Tagged with: , , , ,

Writing to a text file in Python from a variable, ignoring encoding problems

Writing to a file in Python is usually a simple 2-liner, which is easy to be written:

However, problems with the encoding may cause some research needed. Concerning the encoding this is a great article from the creator of

Tagged with: , , ,

Show all links from a website with Python and BeautifulSoup

Showing all links from a website with Python and BeautifulSoup is actually 6 lines of code – 2 to define the used libraries and 4 to do the job:

In general, BeautifulSoup comes out of the box with beautiful

Tagged with: ,

Python – The birthday paradox algorithm

The birthday paradox is an interesting problem, mainly because of its somehow “unexpected” results. The problem usually is stated as the following: What is the minimum number of people in a room, in order to have a probability higher than

Tagged with: , , ,

VBA – How to implement workbook events in Excel – GIF

The Excel Workbook object is a part of the Workbooks collection. The events are the code, which is “activated” or “triggered”, once a specific event happens. These events are different and could be unlimited, but there are a few built-in Workbook

Tagged with: , , ,

Sets in Python – Differece, Symetric Difference, Union, Intersection

After writing the article scraping a web site up to the N-th level with Python, I have decided to summarize what could be achieved with Set() in this language. Pretty much, sets can be described as lists with a few

Tagged with: , , , ,

Numpy and Pandas – Small introduction with Jupyter Notebook

Last week I was participating at the Python and ML Summit in Berlin. One of the most interesting lectures, on which I participated, was a workshop by, named “Reading all yourself was yesterday – How to turn large amounts of

Tagged with: , , , , ,

Python and MachineLearning Summit in Berlin – Summary

This Monday and Tuesday (14. – 15. October 2019) I was in Berlin, participating at the #Python and #ML Summit. Actually, #Berlin is a nice city, one of my favourites in Germany, thus if you are not from there, only

Tagged with: , , , ,

Competitive Programming – Bus Stops Problem – Video

In competitive programming, following the ICPC rules, one of the best strategies is to scan the problems given to your team and to start with the easiest ones. The easiest ones are not always the first problems and sometimes these

Tagged with: , ,

VBA – How to avoid naming variables with non-latin alphabet characters (special letters)

Writing code in the local language is actually taught by about 100% of the German VBA books, which I have read. Which is “kind of ok”, if the VBA code only works on German computers. However, if this is not

Tagged with: , ,
Top