Category: Python

Python code examples

Run Python Functions From Excel With VBA with Shell through CommandPrompt

Selecting Python for a “weapon” of choice has many positive points, which I am not going to describe now. Still, if you want to run python code with the help of VBA and the Shell through the CommandPrompt of Windows,

Tagged with: , , ,

How to Search In Excel Worksheet with Python

Working with Python and Excel together is really fun for a VBA Developer! It somehow shows you what all these years of coding with VBA have taught you! Today, I was thinking how to implement the .Find() method of searching in

Tagged with: , , ,

Python – Simple writing in Excel with XlsWriter

The XlsxWriter library of Python is a nice gem for a VBA developer – you would be really interested to see the problems a Python developer should be facing, just to achieve a simple part Excel automatization. Still, these are

Tagged with: , ,

DevOps Conference in coming – time to install Python on my machine

In less than 4 days I would be travelling to Berlin to see what is happening on the DevOpsCon there. I will be present for a whole day workshop for machine learning with Python, thus I have decided that it

Tagged with: , ,

Book Review – Python Algorithms

Some month ago, I have kindly received two books from Apress.com for a review. The first one was for Python Data Analytics, which I have already reviewed and the second once was Python Algorithms. Before starting the review, let me

Tagged with:

Book Review – Python Data Analytics – Coming soon

A new book review is coming in the next weeks – I have noticed the Python books of Apress some time ago and today I was provided with a paper copy for a review.   The review is yet to come!

Tagged with: ,

Python – Algorithm from CodeForces – Bears and Blocks

Hello party people! 🙂 Today I was wondering whether I have forgotten to code in Python after 4 weeks of coding marathon in VBA and I have decided to try a small portion of the weekly challenge from CodeForces! So, the

Tagged with: , ,

Python – Algorithm – Calculate Average distance with Dijkstra

In the current article I will try to solve a problem for calculation of average distance with Dijkstra, given in codeforces.com contest here in pdf. What is the problem like? We have n weighted graphs like this: For each given graph,

Tagged with: , ,

Python Algorithms – Maximum combinations of coins

Sometimes complicated algorithms are really easy to be written down. The current problem is solved in 6 lines of code (from line 5 to line 11), but it you need to put effort to understand how the algorithm works and what are

Tagged with: , ,

Python Algorithms – Full Dijkstra is stunning again

Yesterday I have spent some hours, trying to resolve one problem for shortest paths. The problem was coming from HackBulgaria and was somehow similar to these two problems here: Get the shortest path in a weighted graph with Dijkstra Dijkstra for

Tagged with: , , , ,

Python – Calculating words in matrix – contest problem

Today I was looking into the following problem for word counter in python from Hack Bulgaria: You are given a rectangular table filled with characters and a word. Your task is to count the occurrences of the word in the

Tagged with: , , ,

Python – Dijkstra algorithm for all nodes

In this article I will present the solution of a problem for finding the shortest path on a weighted graph, using the Dijkstra algorithm for all nodes. The problem is formulated by HackBulgaria here. Pretty much, you are given a

Tagged with: , , ,

Python – Usage of a Binary Tree with List in Python

After the article here, concerning the building of the binary trees and their usefulness, today I will show how to use these trees in action 🙂 Imagine that we have the following problem, used in arena.hackbulgaria.com: Implement a program in

Tagged with: , , , ,

Python – Build a binary tree list in python

Binary trees are really useful, if you are solving an algorithmic problem. They consists of nodes (a.k.a vertices) and edges. Thus, each node has two edges, which are leading to another node. Something like this: The above tree is a simple random non-balanced

Tagged with: , ,

Python – Algorithm Challenge – First Day At School

Yesterday, I have started to solve problems from a challenging Russian site for programming competitions. Today, I have decided to spend about 30 minutes on another problem, which seemed easy, but I am already spending hours on it, without being able

Tagged with: , ,

Python – Algorithms About Palindromes

About 3 weeks ago, I have enlisted myself in some course for algorithms. There, one of the guys mentioned a web site for web contests and I have decided to take a look. The site is called Timus.ru and the

Tagged with: , , , ,

Python – ABC analysis for linguists in Django

How did it all start? When I was a student at the University of Sofia, I had to translate about 100 pages of the Greek Military Codex, which was quite an unpleasant task (if someone claims the opposite – run away from

Tagged with: , ,

Python Algoritm – Insertion Sort with Python

As I have already mentioned, the following 2 months I will be dealing with algorithms! Thus, I have enlisted myself in a course for them and I will be spamming my site constantly with some useful (mainly for me) stuff

Tagged with: , ,

Python3.4 – Advanced Reading from Files

About 15 weeks ago, I was making my first steps in Python (sometimes it is a pity that I do not have dates on my articles, but I like it this way).  During my first steps, once I had the

Tagged with: , ,

Python – Encryption and Decryption of a message

This month I have finished with my Python course in HackBulgaria, thus I have decided to continue with a course, called Algorithms.  The course had a requirement of three tasks, which should be resolved in a reasonable time. The first one

Tagged with: , , ,

Python Algorithms – Stable Matching Problem

  Some time ago I started to interest myself in algorithms. Thus, I bought 2 books about them and I started to read 🙂 The first problem in the first book was explaining the Stable Matching Problem. The essence of the problem is

Tagged with: , , ,

Python Django – How to add css to django application

So, some time ago I have started to create apps in Django with Python. It is really fun and amazing, what one can achieve with this package 🙂 E.g., I have generated a small app, counting words and analyzing their repeatability,

Tagged with: , , , ,

Python – Send e-mails with Python

Sending e-mail through the internet is quite a trivial trick in many programming languages. Some time ago, I have shown how to send MS Excel range as an e-mail and how to send a mail through VBA, with HTML. As far

Tagged with: , , , ,

Python – SQL Alchemy or plain SQL ?

Using SQL in Python reminded me of the “fun” I used to have in VBA MS Access, when I had to concatenate strings in VBA. Probably I was not the only one having “fun” and enjoying it, thus some good and

Tagged with: , , , ,

Python / Sqlite3 – Make a DB with Python

Some time ago, I have built something like a primitive SQL language for C# here. Today, I have worked on a similar task, checking the powers of Sqlite3 with Python. This time it was not that primitive and the results were better

Tagged with: , , ,

Python – Crawling the top 50 sites from Bulgaria for their servers

Have you ever wondered on what servers the top 50 most visited Bulgarian sites run? That is definitely an interesting question, if you are Bulgarian IT admin and you have pretty much free time 🙂 Anyway, as far as I am

Tagged with: , , ,

Python – Who follows you at GitHub?

Who follows you? Who follows your followers? And who follows the followers of your followers? And what about the next level? These are pretty interesting question actually. With easy answers, if you are interested only in GitHub. The GitHub team have provided

Tagged with: , , , ,

Python – ABC analysis for linguists

Some time ago, like a year or so, I have written an article for ABC analysis for linguists for C#. Today, I have decided to do it for Python, just for fun and to check whether the 80/20 rule is valid.

Tagged with: , , , ,

Python – Add data to external files and get JSON data from files

initially, the idea of the article was to write four lines of code, doing the following 2 tasks: uploading data to a given file getting JSON data from file and using it in an application However, as soon as I started, I

Tagged with: , , , , ,

Python – A little bit about lists and operations with them

Python’s lists are powerful. Especially, if you come from the VBA world its like switching to a new car after years of using the old red Ikarus. Thus, I have decided to write a small article about them, just to be

Tagged with: , , , ,
Top