Month: November 2019

Cryptography in Python

ModernPythonStandardLibraryBook

After writing about hashing passwords in Python, I have decided to publish the other parts of the chapter, “Cryptography” from the “Modern Python Standard Library Cookbook“, written by Alessandro Molina and and kindly provided to me by PacktPublishing.In the article,

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: , , , ,
Top