I decided to share this topic while doing research on Deep Learning on Graph, the latest trend in Deep learning. One of the challenges that I had was to the processing power of my laptop while processing hundreds of thousands of nodes. While buying a new laptop with a good GPU is not cheap, around $2k+ US, I decided to dive into the free platform provided by Google (GG). URL: What is great about...
Understand python arguments *args and **kwargs
Most new Python programmers have a hard time figuring out the *args and **kwargs magic variables. So what are they? *args and **kwargs Firstly, it is not necessary to write *args or **kwargs. Only the * (asterisk) is necessary. You can use *var and **vars instead. Writing *args and **kwargs is just a convention. So now let’s take a look at *args first. Usage of *args *args and...
Determine the sizes of python objects
When working with data structures, you may want to analyse the space complexity of a particular object. For example, you want to compare the size of a sparse matrix and a dense matrix which represent the same data. With python, “Just use sys.getsizeof” is not a complete answer. It does work for builtin objects directly, but it does not account for what those objects may...