Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Python: can't open file get-pip.py error | Solution

 One of the common error python developers (new guys) face

python: can't open file get-pip.py error 

 

when they type python get-pip.py in CMD (command line). Despite the presence of the get-pip file in the Python installation folder like python/tools/scripts, we get the error sometimes. The common solution to the get-pip problem is to add your script's folder path into the Path variable.  

 

 


For Mac or Linux users you first required the command:

curl 'https://bootstrap.pypa.io/get-pip.py' > get-pip.py && sudo python get-pip.py

With this easy solution you won't get the issue again.

OpenCV Basics Part I - How to read Image with OpenCV

  OpenCV (Open Source computer vision library) is one of the popular library for machine learning, image processing and computer vision. It is available for different platforms like Windows, Linux, Mac OS, iOS and Android and it is also available with  C, C++, Python and Java interfaces. Clearly, we are not here to discuss What OpenCV is? and why it used? and if you still insisting me to tell what exactly it is then,  I will recommend you to read and understand this (nvidia guide) or this (Intel guide) or this (a blog).


Background:
The aim of this tutorial series is to teach and learn some basics of the OpenCV as I am not an expert of OpenCV, learning it myself and sharing my learning so that I can grasp this skill. This tutorial assumes you have basic knowledge of python. Remember, I am not a regular or experienced python programmer. My primary language is C# and Unity Game-engine while occasionally I code in JS, PHP, and python. The reason to mention my background is that a beginner python developer can follow this tutorial  (as I am a beginner) and expert of python and OpenCV can correct/imporve this tutorial.
So without further ado, we jump to the code and in this tutorial, we simply learn that how can we read and display an image in OpenCV.

Why did Python become so popular?

             As a programmer, my first experience with python was miserable due to the bracket less syntax of the program , indention based code, lack of knowledge about the Good Python IDE and QGIS environment where I have to code in python and I was already confused with the dozen of features of QGIS and working mechanism (still I don't know about it). Although enjoyed my time and work because I love to work on new technologies and specially on Python due to its growing popularity and acceptance in data science field.
Python is a general purpose language. Recently, Python has become so popular as:


Source: octoverse github



Source: Stackoverflow survey 2017



source: IEEE spectrum


The success of python not only stop here, StackOverflow recent trends are also depicted the  popularity of Python as you can see below graph, Python has already surpassed Java and close to JavaScript.
source: stackoverflow trends
So, in number game python heading towards more popularity but what make him so popular while its first release happened in 1991? This urge me to know the reason of Python popularity and without particular order I have found these facts about python:

Readability:

It resembles with English language and mostly use common English words like in, None, not, def for definition, import etc. It not use curly bracket or special keywords to delimit code blocks instead use white-space indention (but I personally prefer curly brackets). Additionally, it use fewer code to program, like if you want to print Salam World you can write simply
print("Salam World")
But what will happen if you want to write same code  in C# or Java or C/C++?? Developers are  better know about #Include, or System namespace, or Main function etc etc, that are necessary to run single line of code.

Library:

One of my colleague asked me that how to install a package/Library/Framework in python? I told him to write this (pip install yourDesiredPacakgeName) in command line. Then, it took hardly one minutes to complete and my friend yell! This is very simple!. Yes, it simple and there are huge numbers of libraries framework available you can install in a minute. Python provide large number of third party libraries related to data science, web development game dev etc and these libs are super easy to install.

Data-Science Support:

Python has become no 1 choice in data science and recently surpassed it close contender "R". It has great support of libraries including sciPy, NumPy and Pandas.

Other reasons includes:

  1. Mostly use in scientific domain, academic research and most schools/university are adopting it as first place language.
  2. Python has strong, active and huge community and Giant Sponsors.
  3. Python Success in different areas
  4. Great documentation by third party.
  5. Python extensively using in most platform and fields like embedded devices(RaspberryPi App), Web, Desktop, Data science, game (pygame), server configuration etc.
  6. Easy for newcomers, with little efforts they can write working piece of code.
  7. Able to run on Cross platform (windows, Linux, Mac OS)
  8. Google, the corporate backer of the language.

Conclusively, I can say that python is popular due to its simplicity, huge library support, acceptance in research and universities/schools, and finally its immense support and use in data science field.

If I have forget any important aspect of python popularity please inform met, i will be happy to learn and share it.

Free Web & Mobile App Development Training in Karachi


Want to be a world-class Software developer? But
  • You are a novice in programming and want to enter in the arena of software development?
  • You want to be the master of state of the art web technologies?
  • Want to be a master in Software, Web, and Mobile App Development?
  • Searching for well qualified and loyal faculty (skilled teachers in their respective development fields)?
  • Willing to earn the best training and Free. Yes, its Free, Free, Free?
  • You want your own choice of class/practice timing?
  • You have inspired with mobiles and web applications that you are using?
  • You want to be the part of billion-dollar ($,$$$,$$$,$$$) industry?

Important Announcement! Stay at Home but get online admission in PIAIC now - No fee for first quarter

Visit Saylani Mass IT Training Offical Web for Latest News

Welcome To R&P (Research and Program)

This site is specifically designed to share different researches, coding snippets, projects, tuts and articles related to computer science and software engineering. Our aim to provide you some great insight about Computer Science & its Researches, AI, Commercial Drone/UAVs, Programming (C#, Javascript, PHP, Python etc), Game Engine (Unity, Unreal etc) and Databases (SQLServer, MySQL, SQLite, Firebase etc).