Sunday, July 31, 2016

10+ ways of Running Python Code on the Web browser

10+ online python IDE

There are several ways to run a python script on the desktop. How about on the web browser (local or cloud hosted), how many of such tools do you know?

Today, I present to you 10+ different tools to run a Python Code on your Web browser. They excellent Interactive Python learning platforms.

Lets get started...


How to Install Third-party Python Modules in QGIS (Windows)


-----------------------------------------------------------------------------------------------------
Update: For QGIS 3.x go to this page
-----------------------------------------------------------------------------------------------------



How to Install Third-party Python Modules in QGIS 2.12.3-Lyon (Windows)

If you have installed QGIS, you will see that it bundles its own version of Python in: C:\Program Files\QGIS\apps\Python27. This is the Python that is used when calling python expressions on the QGIS Python Console.

Now we needed to make use of a library called: Python Spatial Analysis Library (PySAL). Then  we entered "import pysal" on the python console but surprisingly, we got an error that the module named pysal doesn't exist. That is TRUE, because it isn't installed with our QGIS python installation! So how do we install this library?

Friday, July 29, 2016

GIS Programming with Python and QGIS - Part 1

Introduction

I will start by introducing the following key words: Programming, Python and QGIS

Programming:
There is high tendency that you as a geospatial professional/graduate/student, you already know what "programming" is all about?
Well, if you don't, here is a brief explanation according to WikiPedia: Computer programming (often shortened to programming) is a process that leads from an original formulation of a computing problem to executable computer programs. The purpose of programming is to find a sequence of instructions that will automate performing a specific task or solving a given problem.

Computer Programming is a much need skill for advanced GIS experts. These days, knowledge and competence in programming is a essential skill set and a critical requirement for most Geospatial job opportunities.  A vast majority of job openings in the Geospatial industry require some expertise in programming, application development and software management.

Some awesome articles I have come across on the web that talked about GIS Programming are listed below (I strongly reccomend you read them);-


Python:
Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than possible in languages such as C++ or Java (Source WikiPedia).

Of all programming languages, many consider python programming language to be the front-runner in the Geospatial industry. Python has been a standard language in GIS because ESRI (ArcGIS) and open source (QGIS) tend to gravitate toward it. Python is very popular with Geospatial professionals working in the ESRI environment and is considered as the primary scripting language for ArcGIS.

Python provides many opportunities for integration within GIS computing systems. Cross-platform capabilities and ease of integration with other languages (C, C++, FORTRAN, and Java) - (CPython, IronPython, Jython, PyPy) mean that Python is most successful in gluing systems together. Because of the fluid language design, the development of large-scale applications is also easily supported. Many libraries and tools have already been developed for working with GIS data in Python. The basics are covered, including the manipulation of shapefiles, grids, and images, as well as more sophisticated stuff such as scripting pyQGIS API and interaction with Web services and databases.

Python can provide you with a complete set of tools for your GIS toolbox. In combination with QGIS, the possibilities are endless. New technologies, such as Web Map Service (WMS), Web Feature Service (WFS), and Web Coverage Service (WCS) are widely supported in Python. There are many online and paper resources to help you when developing Python scripts.

Other programming languages that are being used in the Geospatial industry includes C, C++, C#, Visual Basic.NET, Flex, Java, ActionScript, JavaScript,PHP, VBA for ArcObjects, etc.


QGIS:
QGIS (previously known as Quantum GIS) is a cross-platform free and open-source desktop geographic information system (GIS) application that provides data viewing, editing, and analysis (Source WikiPedia).

Similar to ArcGIS software, QGIS allows users to create maps with many layers using different map projections. Maps can be assembled in different formats and for different uses. QGIS allows maps to be composed of raster or vector layers.

QGIS integrates with other open-source GIS packages, including PostGIS, GRASS, and MapServer to give users extensive functionality. Plugins written in Python or C++ extend QGIS's capabilities. 

Tuesday, July 26, 2016

50+ technologies and the meaning of there names or acronyms

Every human including you is in one way or the order affected by technology. We often interact with technologies that we don't care about the meaning of there names or acronyms.

Here I present to you some 50+ common 21st century technologies and the meaning of there names or acronyms.

1.) *GOOGLE* - Global Organization Of Oriented Group Language Of Earth.
2.) *YAHOO* - Yet Another Hierarchical Officious Oracle.
3.) *WINDOW* - Wide Interactive Network Development for Office work Solution.
4.) *COMPUTER* - Common Oriented Machine Particularly United and used under Technical and Educational Research.
5.) *VIRUS* - Vital Information Resources Under Siege.
6.) *UMTS* - Universal Mobile Telecommunications System.
7.) *AMOLED* - Active-matrix organic light-emitting diode.
8.) *OLED* - Organic light-emitting diode.
9.) *IMEI* - International Mobile Equipment Identity.
10.) *ESN* - Electronic Serial Number.
11.) *UPS* - Uninterruptible power supply.
12. *HDMI* - High-Definition Multimedia Interface.
13.) *VPN* - Virtual private network.
14.) *APN* - Access Point Name.
15.) *SIM* - Subscriber Identity Module.
16.) *LED* - Light emitting diode.
17.) *DLNA* - Digital Living Network Alliance.
18.) *RAM* - Random access memory.
19.) *ROM* - Read only memory.
20.) *VGA* - Video Graphics Array.
21.) *QVGA* - Quarter Video Graphics Array.
22.) *WVGA* - Wide video graphics array.
23.) *WXGA* - Widescreen Extended Graphics Array.
24.) *USB* - Universal serial Bus.
25.) *WLAN* - Wireless Local Area Network.
26.) *PPI* - Pixels Per Inch.
27.) *LCD* - Liquid Crystal Display.
28.) *HSDPA* - High speed down-link packet access.
29.) *HSUPA* - High-Speed Uplink Packet Access.
30.) *HSPA* - High Speed Packet Access.
31.) *GPRS* - General Packet Radio Service.
32.) *EDGE* - Enhanced Data Rates for Globa Evolution.
33.) *NFC* - Near field communication.
34.) *OTG* - On-the-go.
35.) *S-LCD* - Super Liquid Crystal Display.
36.) *O.S* - Operating system.
37.) *SNS* - Social network service.
38.) *H.S* - HOTSPOT.
39.) *P.O.I* - Point of interest.
40.) *GPS* - Global Positioning System.
41.) *DVD* - Digital Video Disk.
42.) *DTP* - Desk top publishing.
43.) *DNSE* - Digital natural sound engine.
44.) *OVI* - Ohio Video Intranet.
45.) *CDMA* - Code Division Multiple Access.
46.) *WCDMA* - Wide-band Code Division Multiple Access.
47.) *GSM* - Global System for Mobile Communications.
48.) *WI-FI* - Wireless Fidelity.
49.) *DIVX* - Digital internet video access.
50.) *APK* - Authenticated public key.
51.) *J2ME* - Java 2 micro edition.
52.) *SIS* - Installation source.
53.) *DELL* - Digital electronic link library.
54.) *ACER* - Acquisition Collaboration Experimentation Reflection.
55.) *RSS* - Really simple syndication.
56.) *TFT* - Thin film transistor.
57.) *AMR*- Adaptive Multi-Rate.
58.) *MPEG* - moving pictures experts group.
59.) *IVRS* - Interactive Voice Response System.
60.) *HP* - Hewlett Packard.


If you know any that is missing from the above list, kindly add it to the comment below...

Tuesday, July 19, 2016

Creating a Digital clock in Python 3 using TkInter GUI library

Hello there,

Have you been thinking of creating your own digital clock on your windows PC?

Today, I will share with you how to go about it using Python 3 TkInter GUI library

Open your command prompt (cmd), enter python interactive prompt and follow me along



Sunday, July 17, 2016

Coding Python on the Web Browser - Introduction to IPython (Jupyter) notebook

Hello there,

I was once asked by a PHP programmer who was trying to lay his hands on Python Programming language that: whether there is a way to program in Python on the Web (browser)? That is using the Web Browser as the editor? 

Since he was used to PHP development on the browser with the likes of PHP content management systems (Joomla, Drupal, WordPress etc), he will also like to learn or code with Python on the browser.

Here I present to you one of the ways to Program with Python language on the Web browser.

Wednesday, July 13, 2016

Useful Web Links for Tech-Savvy individuals


Hello there,

Today, I present to you some useful and important links for computer savvy individuals to learn any technology such as: IT Training, Programming, Web Development, Networking, Data Sceince, GIS, graphics, animation, freelancing, and more



Photoshop and Graphics




Programing and Other IT Projects

15. www.oswd.org 




I hope it helps.

If you know anyone you want to share, list it in the comment box below.
Thanks

Friday, July 8, 2016

Using Python to create and view HTML file

Hello,

This post uses Python to create and view an HTML file. HTML file is a file type that has an extension of .html and you can use any browser to look at its contents.

Here you will learn how to create HTML files with Python scripts, and how to use Python to automatically open an HTML file in any browser of your choice such as Chrome, Firefox, Opera, Safari, Edge, etc.


If you don't know anything about HTML, I recommend that you take some few minutes to study the W3 Schools HTML tutorial before continuing. We’re going to be creating an HTML document using Python, so you will have to know what an HTML document is!

What we’re going to do now is create an HTML file that says “Hello World” in HTML using Python. This is made possible by storing HTML tags in a multi-line Python string and saving the contents to a new file with a .html extension.

Save the below code as "myhtml.py" and execute it.

# Import the webbrowser module, so we cause it to open the created html file in a deafualt browser
import webbrowser

# We create & open the html file using the open() method in write mode and store it in an object (f)
f = open('myhtml.html','w')

# Store our html code in a variable named "message" using mutli-line string 
message = """
    
     HTML file with Python 
    

    
     

Hello World!

Tutorial by www.UmarYusuf.com
""" # Call the writ() method to write the content of the "message" variable into the html file object (f) f.write(message) # we close the file after writting into it f.close() # we now use the webbrowser module to open the created html file in a deafualt web browser webbrowser.open_new_tab('myhtml.html')

The comments within the code explains all the steps we took to create an HTML file that says “Hello World” in HTML using Python and opens it a default web browser on our windows PC.

That is it!
Happy reading.

Wednesday, July 6, 2016

Happy sallah python code (Eid Mubarak!)

Hello there,

Muslims around the world do celebrate Eid al-Fitr or Eid al-Adha/Eid al-Kabir yearly. So if you are a muslim python programmer, how do you use python to wish your colleagues "Happy Eid", "Happy Sallah", "Eid Mubarak!"?

Well this will depend on your creativity and experience.

In this post, I will shear some simple python scripts with you to share with your families and friends on any Eid day.

Option 1

# Happy sallah python program
print ("Happy sallah! \n") * 10 


Option 2

# my Barka Da Sallah for you all
rows=10
for i in range(rows):
    print ('Barka Da Sallah!' + ' '*(rows-i-1) + '*'*(2*i+1))


Option 3

Try some coding on your own as an exercise?


Eid Mubarak!