Problem Solving with Algorithms and Data Structures

Few chapter wise pickings from Problem Solving with Algorithms and Data Structures by Brad Miller, David Ranum.

Continue reading

#python, #reading

Dive into Python

Few chapter wise pickings from Dive into Python by Mark Pilgrim.

Objects in Python

  • Everything in Python is an object. Strings are objects. Lists are objects. Functions are objects. Even modules are objects. Almost everything has attributes and methods. All functions have a built-in attribute __doc__, which returns the doc string defined in the function’s source code.
  • Different programming languages define “object” in different ways. In some, it means that all objects must have attributes and methods; in others, it means that all objects are subclassable. In Python, the definition is looser; some objects have neither attributes nor methods, and not all objects are subclassable. But everything is an object in the sense that it can be assigned to a variable or passed as an argument to a function.

Continue reading

#dive-into-python, #python

Scrapping with Scrapy : Part 3

This is the third part of the series Scrapping with Scrapy.

In this post I will covering how to use selenium with scrapy, how to change the template, that gets loaded when a new Scrapy project is created. You may need to read part 1 and part 2 of this series to understand more.

Continue reading

#code, #parsers, #parsing, #python, #scrapy, #selenium, #tutorial, #web-crawling

Scraping With Scrapy : Part 1

This post is having the instructions to install Scrapy and starting your first project.

Continue reading

#crawler, #programming, #python, #scrapy, #web-crawler

Making An API using Python and Flask

I created a Horoscope API, using pyhoroscope package.

I used Flask and hosted it on Heroku. Heroku is free and price you, as you grow. It provides, for free 1 dyno. A dyno is an instance of your application running and responding to requests. Continue reading

#git, #heroku, #herokuapp, #horoscope-api, #programming, #python

Publishing Your Package to PyPI


PyPI — the Python Package Index

The Python Package Index is a repository of software for the Python programming language. There are currently 48101 packages here.

Continue reading

#package, #programming, #pyhoroscope, #pypi, #python, #python-package-index


This blog post is about some scripts, that I have been writing for tasks that can be easily automated.

Continue reading

#code, #programming, #python, #scripts