Pravar Agrawal Technology & Travel

Python Learning Part 5

Continuing from my last post on handling exceptions in Python, I’ll be ndiscussing on Classes today. Classes, are a level of abstraction in Python which can be used to give structure to our programme. Which in-turn results in neat and clean definition of functions inside it. In Python, we define a class in the following way, >>>class ClassName(parent_class): statement 1 statement 2 statement 3 In the statements, we can define any variables or class methods for example,

Python Learning Part 4

In our last post we have discussed about looping techniques, data structures in Python. In this post we’ll take a look at Functions, File Handling and Exceptions in Python. Functions, are a block of code which are reusable throught our programme and can be called upon whenever required. We need to define functions to use them like, >>> def function_name(): print("This is just a function") >>> call_function = function_name() This is just a function Functions can be with or wihtout parameters.

Python Learning Part 3

In our last post, we left while discussing looping techinques in Python. Today, we’ll continue with discussing on For loops and their uses in Python programming language. In Python, the for statement works differently then in C. Here for statement, iterates over a sequence of items which can be a list or a string. Like, >>> x = ['Ball', 'Bat', 'Cat'] >>> for i in x: print(i) We also have continue statements in Python, which skips the execution of code after it and goes back to the start.

Python Learning Part 2

In last post we discussed on some features of Python and getting started with it. Continuing from last time, we’ll look at some more super cool features of Python today. Python gives us feasibility to assign multiple variables in a single line. Following example explains it better, >> a, b = 45, 54 This single line assignment of multiple variables is based upon a data-type called tuple in Python. We use comma to create a tuple.

Python Learning Part-1

I will be posting a series of posts as part of my learning on Python in coming few days. I’m undergoing training under Dgplug summer training and currently learning pym module. The pym book is quite handy when learning python from scratch. Although I’ve been working in Python for quite a few years, this has come as a good refresher to me. Python, which has become one of the most popular and widely used language in the community - is an interpreted language.

Add Remote Repository

While working with more than one teams in a project I’ve always faced few generic issues. How do I contribute to the upstream project? Is creating a new branch in the main repository the preferred way? If not then what to do otherwisw? And like always, git to the rescue. In this post we’ll take a look at some of the similar issues and how to resolve them. I’ve been using Git for quite some time now both at work and during my own fiddling.

Git Essentials

My last post was about Version Control and one of Distributed VCS tool, Git. I’ve been using Git for quite some time now in my daily office work, managing tasks as part of OBM and some other fiddling. Here are few commands which have helped me as a beginner in working with Git. Begining with creating a source code repository where all the developers and other members in our team can collaborate we use,

Version Control & Git

Working on a project with a distributed team becomes a hassle especially when multiple releases, bug fixes, patches are to be carried out. The most impacted resource here is the source code repository which is being grinded, twisted, updated and what not. Who’s to the rescue? Of course, Version Control. “Version Control is a system that records changes to a file or set of files over time so that you can recall specific versions later”, as stated on the introductory page of Git version control.

Journey So Far

Writing has always come as an interest to me rather than just finishing off on things. Ever since I completed my high school in the year 2010, haven’t had much chance to write or publish something on my own. I’ve always had a keen interest in computers ever since my father bought our first home PC, when I was 10 years old. But, I always feared whether I’ll be able to gather enough knowledge to express myself in this particular field or not.