Sending e-Mail using Python

Python is a powerful language which helps us to do anything which we dream of. In other words we can narrate python as the easiest way to make our dreams come true. In this article we are going to learn on how to send email to any person.

The python code for sending email is as follows:

 

import smtplib   #this imports the smtp library

server=smtplib.SMTP(“smtp.gmail.com”,587)   #we are using the gmail server, its port number for sending our mails

server.starttls()   #it returns an acknowledgement as it is ready to send mails

server.login(<sender_mail>,<sender_password>)   #filling up the authentication details

server.sendmail(<sender_mail>,<receiver_mail>,<your message>)   #sending the mail

server.quit()   #turning off the server

 

By,

Maria Irudaya Regilan J

You can also surf our blog to learn more things on python! Go to search bar and type python for interesting articles.

Advertisements

IMAGE PROCESSING

Introduction

Image processing is method to perform some operation on an image, in order to get an enhanced image or to extract some useful information from it. The analysis and manipulation of a digitized image, especially in order to improve. It’s improve the content and quality of an image and its design to manipulate digital image. Now a days image processing is widely used in many field the theoretical basics of image processing, along with its application, is an extensive topic that cannot be adequately covered here but that has been presented in a number of texts dedicated exclusively to this.

For example: Defence, medical image, bio-imaging, neuro-imaging, computer vision. It analysis the dark image to identify the clear image.

With a minimum investment, one can reality enhance contract, quantify intensity, detect edges, and apply various mathematical operation in this processing. Crop the image to remove unwanted clutter. Improve the visual appearance of images to a human viewer.

Analog Filters for Data Conversion

It is a type of signal processing in which input is an image and output may be image or characteristics/feature association with image. The method used for image processing are analog and digital image processing. Analog or visual techniques of image processing can be used forthehard copies like print out and photographs.

TYPES OF IMAGE PROCESSING:

  • Image to image transformation
  • Image to information transformation
  • Information to image transformation

Processing Image

IMAGE TO IMAGE TRANSFORMATION:

  • Enhancement to make image more useful and pleasing.
  • Restoration to remove the grid.
  • Geometry to scaling, sizing, zooming, morphing one object to another.

Image Processing in Medical

IMAGE TO INFORMATION TRANFORMATION:

  • Image statistics is histogram. Histogram is the fundamental tool for analysis and image processing.
  • Imagecompression.
  • Image analysis is segmentation, feature extraction, patternrecognition.
  • Computer-aided detection and diagnosis(CAD).

INFORMATION TO IMAGE TRANFORMATION:

  • Decompression to compressed image data.
  • Reconstruction of image slices from CT or MRI raw data.
  • Computer graphics, animation and virtual reality(synthetic object).

COMPUTER GRAPHICS:

We don’t often think of computer graphics as image processing because it processing 2D and 3D image definition files rather than the resulting image themselves. It is fine point, but worthy of note. Example include maps, posters, videos and movies.

MEDICAL IMAGING:

This type focuses on processing that helps with issues detection and diagnosis. Example include; Biological (non-invasive visualization of biological processes) and Neuroimaging (visualization of the nervous system).

OVERVIEW OF IMAGE PROCESSING:

Image processing refer to quantitative analysis and/or algorithm applied to digital image data. It allow generation of 3D parametric maps and implies calculation of values that should be ultimate (replication, rater-independent) .
Digital processing techniques help in manipulation of the digital image by computers. As raw data from imaging sensors from satellite platform contains deficiencies.The Three general phases of processing that all types of data have to undergo while using digital technique are pre-processing, enhancement and display, information extraction.

When looking under water with a camera, the user is hampered by low contract, color change and interference. Imagery may undergo a shift in hue with respect to the original scene due to filtering of the water. A color correction and restoring the original color of the scenario as well as possible.

Overview of Image Processing

While PERFORMING this sub-pixel estimation, adaptive image integration reduce temporal noise,which in turn decreases sea snow. A main drawback of such method is that applying only contract enhancement will also amplify camera noise and sea snow. Note that not only is the contract of the contrast of the object enhanced, but the sea snow.

Follow our blog for more articles and ideas on programming language. We also provide cheat sheets for many widely used programming languages!

From,

Jayashree Mohan | ECA at Regins

Jayashree Mohan 🙂

(Executive Content Advisor)

Quantum Computing

What is it?

Quantum computing studies computation systems (quantum computers) that make direct use of quantum-mechanical phenomena, such as superposition and entanglement, to perform operations on data.

quantum computing section.jpg

  • Quantum computers are different from binary digital electronic computers based on transistors. Quantum computation uses quantum bits, which can be in superpositions of states rather than encoding of data into bits.
  • A Quantum Turing machine is a theoretical model of such a computer, and is also known as the universal quantum computer.

qtm.png

  • It takes advantage of the strange ability of subatomic particles to exist in more than one state at any time. Due to the way the tiniest of particles behave, operations can be done much more quickly and use less energy than classical computers.

 How it is useful?

Quantum computers uses qubits which are combination of bits. Consider an electron that either in the position of Stop(0) or on motion(1). This is the principle followed by our computers. But in quantum computers, a new state is introduced called Superposition. It is the state where both 0 and 1 exists  at the same time. Therefore, the cases in which the inputs will be are 00, 01, 10 and 11.

I13-11-qbit.jpg

Now we can see that one qubits can hold information of 2 bits. This is interesting right? Also, another interesting matter between these bits is the concept of Entanglement. It is the concept in which both the classical bits in a single quantum bit is connected. In simple words, two classical bits in a quantum bit is subject to change if one of its pair changes.

download (4).jpg

Why it is not replaced?

Qubits do not make the things work faster but it make multiple things to work faster when combined.

Slide4

The speed of a classical computer and quantum computer is same on opening a MS word document but the speed of quantum computer won’t be slow on editing 50 MS Word documents which makes the classical computers slow.

Is it existing?

Yes. Quantum computers are not different in physical structure but it is a processor.

download (5)          NASA and Google are currently using quantum computers for their research and development purposes. D’ WAVE is the quantum computing company who were in research on making computers to think.images (12)

Quantum computers are made to solve unanswerable question like ‘what is the factorial of 500?’ or ‘Are we alone?’. Next time, when you see a quantum computer just don’t forget to ask a question to it.

Catch up more cool stuffs from our blog. We have some many categories like Programming and Education that may help you. Follow the blog to receive latest updates.

From,

Maria Irudaya Regilan J

 

 

 

 

 

Normalization in DBMS

Normalization

Normalization is the process that improves a database design by generating relations that are of higher normal forms

First Normal Form (1 NF)

1 NF is a property of a relation in a relational database. A relation is in first normal form iff the domain of each attribute contains only atomic values, and the value of each attribute contains only a single value from that domain.

db (2)

Example

Explanation

No two rows of data must contain repeating group of information i.e., each set of column must have a unique value, such that multiple columns cannot be used to fetch the same row. Each row should have a primary key that distinguishes it as unique.

Second Normal Form (2 NF)

2 NF is a normal form used in database normalization. a table that in 1 NF must meet additional criteria if it is to qualify for 2 NF.

db (1)

Example

Explanation

As per 2 NF, there must be not any partial dependency of any column on primary key. It means that for a table has concatenated primary key, each column in the table that is not a part of primary key must depend upon the entire concatenated key for its existence. If any column depends only on one part of the concatenated key, then the table fails 2 NF.

Third Normal Form (3 NF)

A relation is in third NF if it is in 2 NF and no non key attribute is transitively dependant on the primary key.

db (4)

Example

Explanation

3 NF applies that every non prime attribute of table must be dependant on primary or we say that there should not be the case that a non prime attribute is determined by another non prime attribute. So, this transitive dependency should be removed from the table and also the table must be in 2 NF.

Boyce – Codd Normal Form (BCNF)

BCNF is an higher version of 3 NF. This form deals with certain type of anomaly that is not handled by 3 NF. A 3 NF table which does not have multiple overlapping candidate keys. For BCNF, following conditions must be satisfied,

  • Relationship ‘ R ‘ must be in 3 NF
  • for each functional dependency (X -> Y), X should be a super key

Consider the following relationship: R(A, B, C, D) and following dependencies:

A -> BCD

BC -> AD

D -> B

Above relationship is already 3 NF, keys are A and BC. Hence, in the functional dependency, A -> BCD, A is the super key. In the 2nd relationship, BC -> AD, BC is also a key but in D -> B, D is not a key.

Here we can break our relationship R into two relationships R1 and R2:

Breaking table into two tables, one with ADC while other with DB

Fourth Normal Form (4 NF)

4 NF is the level of database normalization where there are no non trivial multivalued dependencies other than a candidate key. It builds on the first three normal forms and BCNF.

db (3)

Example

Explanation

An entity must be in BCNF. If an attribute is based on value, list must be taken out as a separate entity.

Fifth Normal Form (5 NF)

5 NF also known as project join normal form i.e., PJNF is a level of database normalization designed to reduce redundancy in relational databases recording multivalued facts by isolating semantically related multiple relationships.

db 940

Example

Explanation

An entity must be in 4 NF. If an attribute is combined with repeated values then it must be taken out as a separate entity.

 

Check out our categories which includes Computer Science, Programming, Education in our blog.

From,

Maria Irudaya Regilan J

Skype’s Real-Time Code Editor For Coding Interviews

Skype, the most popular video calling platform, recently launched a new preview feature at Skype.com that makes the tiresome task of switching between the interviewer’s call and the code editor more easy and allows to comfortably conduct coding and technical interviews.

The new feature will allow the user to host a video call on top of a code editor that runs in the Microsoft Edge or Chrome browser (version 32 or above). This means that the users need not to download any applications and can access Skype.com on their browsers.

Watch the promotion video made by skype.

The built-in code editor currently supports seven programming languages: C, C++, C#, Java, JavaScript, Python, and Ruby. Syntax highlighting will be included for all these languages, along with a real-time execution feature to help prevent syntactic mistakes during an interview.

Currently, the new interview feature only works for browsers whose default language is set to English. For those interested in trying out the new platform, can go over to Skype’s interviews website and click on “Start Interview,” then invite someone to the call and begin the interview – all with a real-time code editor.

From,

Maria Irudaya Regilan J

How to convert Java file into executables

Previously I have told that learning Java is a magic. Wanna learn more in that magic? Here’s the easy explanation on converting .java file to .exe.

Steps for exporting .jar from .java

Step 1: Create your java file. I recommend you to create your file in eclipse because creating .jar file for your program can be easily done in that. If you do not have eclipse installed in your system, you can find it in here.

Step 2: Now create your project on eclipse and store it in your workspace.

Step 3: Now right click on your project in Project Explorer tab and select Export.

Export.png

Step 4: In Export -> under JAVA folder select jar file and click next.

export tab.png

Step 5: Select the export destination for your .jar file and click Finish

savingfile.png

Steps for creating an executable

Step 1: You should download a setup of JSmooth to your system. You will find it in here.

Step 2: Open JSmooth after instaling in your system.

jsmooth front.png

Step 3: On Skeleton tab, under Skeleton Selection, select console wrapper option from dropdown list to show my console window as output in my application. You also have other suitable options that can be chosen. Under Skeleton Properties, type the message in the text box that shows when an error occurs(mostly when the client doesn’t own a machine where Java installed). Check PressKey checkbox to make the message to stay in the screen until any key is pressed.

jsmooth skeleton.png

Step 4: On Executable tab, Give you Application Name under Executable Binary text box and Give your Application Icon under Executable Icon.

jsmooth executable

Step 5: On Application tab, under Main Class text box, give the class name of your Java program. In my case, it is “Strdisplay“. Check Use an embedded jar check box under Embedded Settings and direct it to your exported .jar file at the beginning.

Jsmooth Application.png

Step 6: Now, Click the gear icon at the top to compile. Save your Jsmooth file with a good name.

jsmooth save

Once, you have compiled successfully, you get compilation dialog box as follows,

jsmooth compilation

Step 7: After a successful compilation you can see an application exists near your Jsmooth file. Double click it and enjoy the execution.

jsmooth output.PNG

 

That’s it. now you can able to develop executable applications in Java. If you want to know how to develop executables in python, click here. Also Catch up Cheat sheets that are available in our blog. You can catch them under our blog categoryProgramming‘.

From,

Maria Irudaya Regilan J