0% found this document useful (0 votes)
119 views113 pages

Intern Project

The document provides instructions and guidelines for students completing a semester-long internship program. It outlines the program requirements, including identifying an internship organization, maintaining attendance and punctuality, following the organization's rules, wearing identification, and communicating regularly with supervisors and faculty guides. Students are expected to set learning objectives, develop job skills, acquire professional competencies, and practice professional communication. The document instructs students to document their weekly activities and evaluations to complete the internship program.

Uploaded by

Baji Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views113 pages

Intern Project

The document provides instructions and guidelines for students completing a semester-long internship program. It outlines the program requirements, including identifying an internship organization, maintaining attendance and punctuality, following the organization's rules, wearing identification, and communicating regularly with supervisors and faculty guides. Students are expected to set learning objectives, develop job skills, acquire professional competencies, and practice professional communication. The document instructs students to document their weekly activities and evaluations to complete the internship program.

Uploaded by

Baji Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 113

PROGRAM BOOK FOR

SEMESTER INTERNSHIP

Name of the student:

Name of the college:

Registration number:

Period of internship: From: To:

Name and address of the intern organization

Address:

ACHARYA NAGARJUNA UNIVERSITY 2024


An Internship Report on

Submitted in accordance with the requirement for the degree of

Under the Faculty Guideship of


_

Department of

Computer Science of Vignan Degree & PG College

Submitted by:

Reg. No:

Department of
Instructions to Students

Please read the detailed Guidelines on Internship hosted on the website of AP State
Council of Higher Education https://apsche.ap.gov.in

1. It is mandatory for all the students to complete Semester internship either in V


Semester or in VI Semester.
2. Every student should identify the organization for internship in consultation with
the College Principal/the authorized person nominated by the Principal.
3. Report to the intern organization as per the schedule given by the College. You
must make your own arrangements for transportation to reach the organization.
4. You should maintain punctuality in attending the internship. Daily attendance is
compulsory.
5. You are expected to learn about the organization, policies, procedures, and
processes by interacting with the people working in the organization and by
consulting the supervisor attached to the interns.
6. While you are attending the internship, follow the rules and regulations of the
intern organization.
7. While in the intern organization, always wear your College Identity Card.
8. If your College has a prescribed dress as uniform, wear the uniform daily, as you
attend to your assigned duties.
9. You will be assigned a Faculty Guide from your College. He/She will be creating a
WhatsApp group with your fellow interns. Post your daily activity done and/or
any difficulty you encounter during the internship.
10. Identify five or more learning objectives in consultation with your Faculty Guide.
These learning objectives can address:
a. Data and Information you are expected to collect about the organization
and/or industry.
b. Job Skills you are expected to acquire.
c. Development of professional competencies that lead to future career
success.
11. Practice professional communication skills with team members, co-interns, and
your supervisor. This includes expressing thoughts and ideas effectively through
oral, written, and non-verbal communication, and utilizing listening skills.

12. Be aware of the communication culture in your work environment. Follow up and
communicate regularly with your supervisor to provide updates on your progress
with work assignments.
13. Never be hesitant to ask questions to make sure you fully understand what you
need to do your work and to contribute to the organization.
14. Be regular in filling up your Program Book. It shall be filled up in your own
handwriting. Add additional sheets wherever necessary.
15. At the end of internship, you shall be evaluated by your Supervisor of the intern
organization.
16. There shall also be evaluation at the end of the internship by the Faculty Guide
and the Principal.
17. Do not meddle with the instruments/equipment you work with.
18. Ensure that you do not cause any disturbance to the regular activities of the
intern organization.
19. Be cordial but not too intimate with the employees of the intern organization and
your fellow interns.
20. You should understand that during the internship programme, you are the
ambassador of your College, and your behavior during the internship programme
is of utmost importance.
21. If you are involved in any discipline related issues, you will be withdrawn from
the internship programme immediately and disciplinary action shall be initiated.

22. Do not forget to keep up your family pride and prestige of your College.

<<@>>
Student’s Declaration
I a student of , Reg.NO.
of the Department
do here by declare that I have completed the
mandatory internship from to in
under the Faculty Guideship
, Department of

(Signature and Date)


Official Certification

This is to certify that Reg.No. has


completed his internship in on
under my supervision
as a part of partial fulfillment of the requirement for the degree of
in the department of

(Signatory with Date and Seal)

Endorsements

Faculty Guide

Head of the Department

Principal
Certificate from Intern Organization

This is to certify that Reg.No of


underwent internship in
from to
.

The overall performance of the intern during his/her internship is found to be

Authorized Signatory with Date and Seal


Acknowledgements
Contents
CHAPTER 1: EXECUTIVE SUMMARY

The internship report shall have a brief executive summary. It shall include five or
more Learning Objectives and Outcomes achieved, a brief description of the sector
of business and intern organization and summary of all the activities done by the
intern during the period.
CHAPTER 2: OVERVIEW OF THE ORGANIZATION
Suggestive contents
A. Introduction of the Organization
B. Vision, Mission, and Values of the Organization
C. Policy of the Organization, in relation to the intern role
D. Organizational Structure
E. Roles and responsibilities of the employees in which the intern is placed.
F. Performance of the Organization in terms of turnover, profits, market reach and market
value.
G. Future Plans of the Organization.
CHAPTER 3: INTERNSHIP PART

Description of the Activities/Responsibilities in the Intern Organization during Internship, which shall include -
details of working conditions, weekly work schedule, equipment used, and tasks performed. This part could end by
reflecting on what kind of skills the intern acquired.
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
WEEKLY REPORT
WEEK :

Objective of the Activity Done:

Detailed Report:
Describe the real time technical skills you have acquired (in terms of the
job- related skills and hands on experience)
Describe the managerial skills you have acquired (in terms of planning,
leadership, team work, behaviour, workmanship, productive use of time, weekly
improvement in competencies, goal setting, decision making, performance
analysis, etc.
Describe how could you could enhance your abilities in group discussions,
participation in teams, contribution as a team member, leading a
team/activity.
Describe the technological developments you have observed and relevant
to the subject area of training (focus on digital technologies relevant to your
job role
Student Self Evaluation of the Long-Term Internship

Student Name: Registration No:

Term of Internship: From: To :

Date of Evaluation:

Organization Name & Address: internship address

Please rate your performance in the following areas:

Rating Scale: Letter grade of CGPA calculation to be provided

1 Oral communication 1 2 3 4 5
2 Written communication 1 2 3 4 5
3 Proactiveness 1 2 3 4 5
4 Interaction ability with community 1 2 3 4 5
5 Positive Attitude 1 2 3 4 5
6 Self-confidence 1 2 3 4 5
7 Ability to learn 1 2 3 4 5
8 Work Plan and organization 1 2 3 4 5
9 Professionalism 1 2 3 4 5
10 Creativity 1 2 3 4 5
11 Quality of work done 1 2 3 4 5
12 Time Management 1 2 3 4 5
13 Understanding the Community 1 2 3 4 5
14 Achievement of Desired Outcomes 1 2 3 4 5
15 OVERALL PERFORMANCE 1 2 3 4 5

Date: Signature of the Student


Evaluation by the Supervisor of the Intern Organization

Student Name: Registration No:

Term of Internship: L From: To :

Date of Evaluation:

Organization Name & Address:

Name & Address of the Supervisor


with Mobile Number

Please rate the student’s performance in the following areas:

Please note that your evaluation shall be done independent of the Student’s self-
evaluation

Rating Scale: 1 is lowest and 5 is highest rank

1 Oral communication 1 2 3 4 5
2 Written communication 1 2 3 4 5
3 Proactiveness 1 2 3 4 5
4 Interaction ability with community 1 2 3 4 5
5 Positive Attitude 1 2 3 4 5
6 Self-confidence 1 2 3 4 5
7 Ability to learn 1 2 3 4 5
8 Work Plan and organization 1 2 3 4 5
9 Professionalism 1 2 3 4 5
10 Creativity 1 2 3 4 5
11 Quality of work done 1 2 3 4 5
12 Time Management 1 2 3 4 5
13 Understanding the Community 1 2 3 4 5
14 Achievement of Desired Outcomes 1 2 3 4 5
15 OVERALL PERFORMANCE 1 2 3 4 5

Date: Signature of the Supervisor


ABSTRACT

The main motive of our project is to detect stress in


the IT professionals using vivid Machine learning and
Image processing techniques. Our system is an upgraded
version of the old stress detection systems which
excluded the live detection and the personal counseling
but this system comprises of live detection and periodic
analysis of employees and detecting physical as well as
mental stress levels in his/her by providing them with
proper remedies for managing stress by providing survey
form periodically. Our system mainly focuses on
managing stress and making the working environment
healthy and spontaneous for the employees and to get
the best out of them during working hours.
INTRODUCTION
Stress management systems play a significant role to
detect the stress levels which disrupts our socio
economic lifestyle. As World Health Organization (WHO)
says, Stress is a mental health problem affecting the life
of one in four citizens. Human stress leads to mental as
well as socio-fiscal problems, lack of clarity in work, poor
working relationship, depression and finally commitment
of suicide in severe cases. This demands counselling to
be provided for the stressed individuals cope up against
stress. Stress avoidance is impossible but preventive
actions helps to overcome the stress. Currently, only
medical and physiological experts can determine
whether one is under depressed state (stressed) or not.
One of thetraditional method to detect stress is based on
questionnaire. This method completely depends on the
answers given by the individuals, people will be
tremulous to say whether they are stressed or normal.
Automatic detection of stressminimizes the risk of health
issues and improves the welfare of the society. This
paves the way for the necessity of a scientific tool, which
uses physiological signals thereby automating the
detection of stress levels in individuals. Stressdetection is
discussed in various literatures as it is a significant
societal contribution that enhances the lifestyle of individuals.
Ghaderi et al. analysed stressusing Respiration, Heart rate (HR),
facial electromyography (EMG), Galvanic skin response (GSR)
foot and GSR hand data with a conclusion that, features
pertaining to respiration process are substantial in stress
detection. Maria Viqueira et al. describes mental stress
prediction using a standalone stress sensing hardware by
interfacing GSR as the only physiological sensor . David Liu et al.
proposed a research to predict stress levels solely from
Electrocardiogram (ECG). Multimodal sensor efficacy to detect
stress of working people is experimentally discussed in . This
employs the sensor data from sensors such as pressure
distribution, HR,Blood Volume Pulse (BVP) and Electrodermal
activity (EDA). An eye tracker sensor is also used which
systematically analyses the eye movements with the stressors
like Stroop word test and information related to pickup
tasks.The authors of performed perceived stress detection by a
set of non-invasive sensors which collects the physiological
signals such as ECG , GSR, Electroencephalography (EEG), EMG,
and Saturation of peripheral oxygen (SpO2). Continuous stress
levels are estimated using the physiological sensor data such as
GSR, EMG, HR, Respiration in. The stress detection is carried
out effectively using Skin conductance level (SCL), HR,
or frustration. Individuals also feel tired, tense, nervous,
irritable, moody, orlonely.
ble changes in a person's behavior are represented
by Behavioral effects of stress. Effects of behavioral
stress are seen such as increased accidents, use of drugs
or alcohol, laughter out of context, outlandish or
argumentative behavior, very excitable moods, and/or
eating or drinking to excess.

and/or hypersensitivity to criticism are some of the effects


of Cognitive stress
IMPLEMENTATION:

MODULES:
• User
• Admin
• Data Preprocess

• Machine Learning
MODULES DESCRIPTION:

User:

The User can register the first. While registering he


required a valid user email and mobile for further
communications. Once the user register then admin can
activate the customer. Once admin activated the
customer then user can login into our system. First user
has to give the input as image to the system. The python
library will extract the features and appropriate emotion
of the image. If given image contain more than one faces
also possible to detect. The stress level we are going to
indicate by facial expression like sad, angry etc.. The
image processing completed the we are going to start
the live stream. In the live stream also we can get the
facial expression more that one persons also. Compare to
tensorlflow live stream the tesnorflow live stream will
fast and better results. Once done the we are loading the
dataset to perform the knn classification accuracy
precession scores.
.
Admin:

Admin can login with his credentials. Once he login he


can activate the users. The activated user only login in
our applications. The admin can set the training and
testing data for the project dynamically to the code. The
admin can view all users
detected results in hid frame. By clicking an hyperlink in
the screen he can detect the emotions of the images. The
admin can also view the knn classification detected
results. The dataset in the excel format. By authorized
persons we can increase the dataset size according the
imaginary values.

Data Preprocess:

Dataset contains grid view of already stored dataset


consisting numerous properties, by Property Extraction
newly designed dataset appears which contains only
numerical input variables as a result of Principal
Component Analysis feature selection transforming to 6
principal components which are Condition (No stress,
Time pressure, Interruption), Stress, Physical Demand,
Performance and Frustration.

Machine Learning:

K-Nearest Neighbor (KNN) is used for classification as


well as regression analysis. It is a supervised learning
algorithm which is used for predicting if a person needs
treatment or not. KNN classifies the dependent variable
based on how similar it is; independent variables are to a
similar instance from the already known data. the Knn
Classification can be called as a statistical model that
uses a binary dependent variable. In classification
analysis, KNN is estimating the parameters of a KNN
model. Mathematically, a binary KNN model has a
dependent variable with two possible value, which is
represented by an indicator variable, where the two
values are labeled "0" and "1".
INPUT AND OUTPUT DESIGN

INPUT DESIGN
The input design is the link between the information system and the user. It
comprises the developing specification and procedures for data preparation and those steps
are necessary to put transaction data in to a usable form for processing can be achieved by
inspecting the computer to read data from a written or printed document or it can occur by
having people keying the data directly into the system. The design of input focuses on
controlling the amount of input required, controlling the errors, avoiding delay, avoiding extra
steps and keeping theprocess simple. The input is designed in such a way so that it provides
security and ease of use with retaining the privacy. Input Design considered the following
things:

➢ What data should be given as input?


➢ How the data should be arranged or coded?
➢ The dialog to guide the operating personnel in providing input.
➢ Methods for preparing input validations and steps to follow when error occur.

OBJECTIVES

1. Input Design is the process of converting a user-oriented description of the input


into a computer-based system. This design is important to avoid errors in the data input process
and show the correct direction to the management for getting correct information from the
computerized system.

2. It is achieved by creating user-friendly screens for the data entry to handle large
volume of data. The goal of designing input is to make data entry easier and to be free from
errors. The data entry screen is designed in such a way that all the data manipulates can be
performed. It also provides record viewing facilities.

3. When the data is entered it will check for its validity. Data can be entered with the
help of screens. Appropriate messages are provided as when needed so that the user will not be
in maize of instant. Thus the objective of input design is to create an input layout that is easy to
follow

OUTPUT DESIGN

A quality output is one, which meets the requirements of the end user and
presents the information clearly. In any system results of processing are communicated to the
users and to other system through outputs. In output design it is determined how the
information is to be displaced for immediate need and also the hard copy output. It is the
most important and direct
source information to the user. Efficient and intelligent output design improves the
system’srelationship to help user decision-making.

1. Designing computer output should proceed in an organized, well thought out


manner; the right output must be developed while ensuring that each output element is designed
so that people will find the system can use easily and effectively. When analysis design computer
output, they should Identify the specific output that is needed to meet the requirements.

2. Select methods for presenting information.

3.Create document, report, or other formats that contain information produced by


the system.

The output form of an information system should accomplish one or more of the
following objectives.

• Convey information about past activities, current status or projections of the


• Future.
• Signal important events, opportunities, problems, or warnings.
• Trigger an action.
• Confirm an action.
REQUIREMENT ANALYSIS

The project involved analyzing the design of few


applications so as to make the application more users
friendly. To do so, it was really important to keep the
navigations from one screen to the other well ordered and
at the same time reducing the amount of typing the user
needs to do. In order to make the application more
accessible, the browser version had to be chosen so that it
is compatible with most of the Browsers.

REQUIREMENT SPECIFICATION

Functional Requirements

▪ Graphical User interface with the User.

Software Requirements

For developing the application the following are the


Software Requirements:
1. Python

2. Django

Operating Systems supported

1. Windows 10 64 bit OS
1
Technologies and Languages used to Develop

1. Python

Debugger and Emulator


▪ Any Browser (Particularly Chrome

Hardware Requirements

For developing the application the following are the


Hardware Requirements:
▪ Processor: Intel i3
▪ RAM: 4 GB
▪ Space on Hard Disk: minimum 1 TB

2
SYSTEM ANALYSIS

EXISTING SYSTEM:

In the existing system work on stress detection is based


on the digital signal processing, taking into consideration
Galvanic skin response, blood volume, pupil dilation and
skin temperature. And the other work on this issue is
based on several physiological signals and visual features
(eye closure, head movement) to monitor the stress in a
person while he is working. However these
measurements are intrusive and are less comfortable in
real application. Every sensor data is compared with a
stress index which is a threshold value used for detecting
the stress level.

DISADVANTAGES OF EXISTING SYSTEM:


➢ Physiological signals used for analysis are often pigeonholed by a Non-
stationary time performance.
➢ The extracted features explicitly gives the stress index of the physiological
signals. The ECG signal is directly assessed by using commonly used peak
j48 algorithm
➢ Different people may behave or express differently under stress and it is
PROPOSED SYSTEM:

The proposed System Machine Learning algorithms like


KNN classifiers are applied to classify stress. Image
Processing is used at the initial stage for detection, the
employee’s image is given by the browser which serves
as input. In order to get an enhanced image or to extract
some useful information from it image processing is used
by converting image into digital form and performing
some operations on it. By taking input as an image and
output may be image or characteristics associated with
that images. The emotion are displayed on the rounder
box. The stress level indicating by Angry, Disgusted,
Fearful, Sad.

ADVANTAGES OF PROPOSED SYSTEM:

➢ Output in which result is altered image or report that is based on image


analysis.
➢ Stress Detection System enables employees with coping up with their issues
leading to stress by preventative stress management solutions.
➢ We will capture images of the employee based on the regular intervals and
then the tradition survey forms will be given to the employees
PYTHON

Python is a general-purpose interpreted, interactive,


object-oriented, and high- level programming language.
An interpreted language, Python has a design
philosophy that emphasizes code readability
(notably using whitespace indentation to delimit code
blocks rather than curly brackets or keywords), and a
syntax that allows programmers to express concepts
in fewer lines of code than might be used in languages
such as C++or Java. It provides constructs that enable
clear programming on both small and large scales.
Python interpreters are available for many
operating systems. CPython, the reference
implementation of Python, is open source software and
has a community-based development model, as do
nearly all of its variant implementations. CPython is
managed by the non-profit Python Software
Foundation. Python features a dynamic type system and
automatic memory management. It supports multiple
programming paradigms, including object- oriented,
imperative, functional and procedural, and has a large
and comprehensive standard library.
Interactive Mode Programming

Invoking the interpreter without passing a script file as


a parameter brings up the following prompt −

$ python
Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more
information.
>>>
Type the following text at the Python prompt and press
the Enter −

>>> print "Hello, Python!"


If you are running new version of Python, then you
would need to use print statement with parenthesis as
in print ("Hello, Python!");. However in Python version
2.4.3, this produces the following result −

Hello, Python!
Command Line Arguments

Many programs can be run to provide you with some


basic information about how they should be run.
Python enables you to do this with -h −

$ python -h
usage: python [option] ... [-c cmd | -m mod |
file | -] [arg] ... Options and arguments (and
corresponding environment variables):
-c cmd : program passed in as string (terminates option
list

-d : debug output from parser (also PYTHONDEBUG=x)


-E : ignore environment variables (such as
PYTHONPATH)
-h : print this help message and exit
You can also program your script in such a way that it
should accept various options. Command Line
Arguments is an advanced topic and should be studied a
bit later once you have gone through rest of the Python
concepts.
Python Lists

The list is a most versatile datatype available in Python


which can be written as a list of comma-separated
values (items) between square brackets. Important
thing about a list is that items in a list need not be of the
same type.

Creating a list is as simple as putting different comma-


separated values betweensquare brackets. For example

list1 = ['physics', 'chemistry', 1997, 2000];


list2 = [1, 2, 3, 4, 5 ];
list3 = ["a", "b", "c", "d"]
Similar to string indices, list indices start at 0, and lists
can be sliced, concatenated and so on.
A tuple is a sequence of immutable Python objects.
Tuples are sequences, just like lists. The differences
between tuples and lists are, the tuples cannot be
changed unlike lists and tuples use parentheses,
whereas lists use square brackets.

Creating a tuple is as simple as putting different comma-


separated values. Optionally you can put these comma-
separated values between parentheses also. For
example −

tup1 = ('physics', 'chemistry', 1997, 2000);


tup2 = (1, 2, 3, 4, 5 );

tup3 = "a", "b", "c", "d";


The empty tuple is written as two parentheses containing
nothing −

tup1 = ();
To write a tuple containing a single value you have to
include a comma, even though there is only one value −

tup1 = (50,);
Like string indices, tuple indices start at 0, and they can
be sliced, concatenated, and so on.

Accessing Values in Tuples


To access values in tuple, use the square brackets for
slicing along with the indexor indices to obtain value
available at that index. For example −

Live Demo
#!/usr/bin/
python
tup1 = ('physics', 'chemistry', 1997, 2000);
tup2 = (1, 2, 3, 4, 5, 6, 7 );

print "tup2[1:5]: ", tup2[1:5];


When the above code is executed, it produces the
following result −

tup1[0]: physics
tup2[1:5]: [2, 3,
4, 5]
Updating Tuples

Accessing Values in Dictionary


To access dictionary elements, you can use the familiar
square brackets alongwith the key to obtain its value.
Following is a simple example −

Live Demo
#!/usr/bin/
python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}


print "dict['Name']: ", dict['Name']
print "dict['Age']: ", dict['Age']
When the above code is executed, it produces the
following result −

dict['Name']:
Zara
dict['Age']:
7
If we attempt to access a data item with a key, which is
not part of the dictionary,we get an error as follows −

Live Demo
#!/usr/bin/
python

dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}


print "dict['Alice']: ", dict['Alice']
When the above code is executed, it produces the
following result −

dict['Alice']:
Traceback (most recent
call last): File "test.py",
line 4, in <module>
print "dict['Alice']: ",
dict['Alice'];KeyError:
'Alice'
Updating Dictionary
You can update a dictionary by adding a new entry or a
key-value pair, modifying an existing entry, or deleting
an existing entry as shown below in the simple example

Live Demo
#!/usr/bin/
python

dict = {'Name': 'Zara', 'Age': 7,


'Class': 'First'} dict['Age'] = 8; #
update existing entry
dict['School'] = "DPS School"; #
Add new entry

print "dict['Age']: ", dict['Age']


print "dict['School']: ", dict['School']
When the above code is executed, it produces the
following result −

dict['Age']: 8
dict['School']: DPS
School Delete
Dictionary
Elements
You can either remove individual dictionary elements or
clear the entire contentsof a dictionary. You can also
delete entire dictionary in a single operation.

To explicitly remove an entire dictionary, just use the


del statement. Following isa simple example −

Live Demo
#!/usr/bin/
python

dict = {'Name': 'Zara', 'Age': 7,


'Class': 'First'} del dict['Name']; #
remove entry with key 'Name'
dict.clear(); # remove
all entries in dictdel dict ;#
delete entire dictionary

print "dict['Age']: ", dict['Age']


print "dict['School']: ", dict['School']
This produces the following result. Note that an
exception is raised because afterdel dict dictionary does
not exist any more −

dict['Age']:
Traceback (most recent
call last): File "test.py",
line 8, in <module>
print "dict['Age']: ",
dict['Age']; TypeError: 'type'
object is unsubscriptable
Note − del() method is discussed in subsequent section.

Properties of Dictionary Keys

Dictionary values have no restrictions. They can be any


arbitrary Python object, either standard objects or user-
defined objects. However, same is not true for the keys.

There are two important points to remember about


dictionary keys −

(a) More than one entry per key not allowed. Which
means no duplicate key is allowed. When duplicate keys
encountered during assignment, the last assignment
wins. For example −

Live Demo
#!/usr/bin/
python
# Following action is not
valid for tuples# tup1[0] =
100;

# So let's create a new


tuple as followstup3 =
tup1 + tup2;
print tup3;
When the above code is executed, it produces the
following result −

(12, 34.56, 'abc', 'xyz')


Delete Tuple Elements
Removing individual tuple elements is not possible.
There is, of course, nothingwrong with putting together
another tuple with the undesired elements discarded.

To explicitly remove an entire tuple, just use the del


statement. For example −

Live Demo
#!/usr/bin/
python

tup = ('physics', 'chemistry',


1997, 2000);print tup;
del tup;
print "After
deleting tup : ";
print tup;
This produces the following result. Note an exception
raised, this is because afterdel tup tuple does not exist
any more −

('physics', 'chemistry',
1997, 2000)After
deleting tup :
Traceback (most recent
call last): File "test.py",
line 9, in <module>
print tup;
NameError: name 'tup' is not defined

DJANGO

Django is a high-level Python Web framework that


encourages rapid development and clean, pragmatic
design. Built by experienced developers, it takes care of
much of the hassle of Web development, so you can
focus on writing your app without needing to reinvent
the wheel. It’s free and open source. Django's primary
goal is to ease the creation of complex, database-driven
websites. Django emphasizes reusabilityand
"pluggability" of components, rapid development, and
the principle of don't repeat yourself. Python is used
throughout, even for settings files and data models.
Django also provides an optional administrative
create, read, update and delete interface that is
generated dynamically through introspection and
configured via admin models

Create a Project

Whether you are on Windows or Linux, just get a


terminal or a cmd prompt and navigate to the place you
want your project to be created, then use this code −

$ django-admin startproject myproject


This will create a "myproject" folder with the following
structure −

myproje
ct/
manag
e.py
myproj
ect/

init

.py
settings
.py urls.py
wsgi.py

The Project Structure

DATABASES = {
'default': {
'ENGINE':

'django.db.backends.sqlite

3','NAME': 'database.sql','USER': '',


'PASSWORD': '',
'HOST': '',
'PORT': '',

}
}

Database is set in the ‘Database’ dictionary. The example above is for


SQLiteengine. As stated earlier,Django also supports −

MySQL (django.db.backends.mysql) PostGreSQL


(django.db.backends.postgresql_psyco
pg2)Oracle
(django_mongodb_engine)

Before setting any new engine, make sure you have thecorrect db driverinstalled.

You can also set others options like: TIME_ZONE,LANGUAGE_CODE,TEMPLATE…

Now that your project is created and configured makesure it's working −

$ python manage.py runserver


You will get something like the following on running theabove code −

Validating models...

0 errors found
September 03, 2015 - 11:41:50 Django version
1.6.11, using settings'myproject.settings'Starting
development server at http://127.0.0.1:8000/ Quit the
serverwith CONTROL-C.

A project is a sum of many applications. Every application has an objective and


can be reused into another project, like the contact form on a website can be an
application, and can be reused for others. See it asa module of your project.

Create an Application
We assume you are in your project folder. In our main

“myproject” folder, the same folder then manage.py −

$ python manage.py startapp myapp


You just created myapp application and like project,
Django create a “myapp” folder with the application

structure −

myapp/
init

.py
admin. py
models.py
tests.py
views.py
init .py − Just to make sure python handles this folderas a package.

admin.py − This file helps you make the app modifiable inthe admin interface.

models.py − This is where all the application models are

stored. tests.py − This is where your unit tests are.

views.py − This is where your application views are.

Get the Project to Know About Your Application


At this stage we have our "myapp" application, now we need to register it with
our Django project "myproject". To do so, update INSTALLED_APPS tuple in the
settings.py file of your project (add your app name) −

INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.aut h',
'django.contrib.cont
enttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
)

Creating forms in Django, is really similar to creating a model. Here again, we


just need to inherit from Django class and the class attributes will be the form
fields. Let's add a forms.py file in myapp folder to contain our app forms.
Wewill create a login form.

myapp/forms.py

#-*- coding: utf-8 -*-


from django import forms

class LoginForm(forms.Form):
user = forms.CharField(max_length = 100)
password = forms.CharField(widget =
forms.PasswordInput())
As seen above, the field type can take "widget" argument for html rendering; in
our case, we want the password to be hidden, not displayed. Many others
widget are present in Django: DateInput for dates, CheckboxInput for
checkboxes, etc.

Using Form in a View


There are two kinds of HTTP requests, GET and POST. In Django, the request
object passed as parameter to your view has an attribute called "method" where
the type of the request is set, and all data passed via POST can be accessed via
the request.POST dictionary.
Let's create a login view in our myapp/views.py −

#-*- coding: utf-8 -*-


from myapp.forms import LoginForm

def login(request): username = "not


logged in"

if request.method ==
"POST":#Get the posted
form
MyLoginForm = LoginForm(request.POST)

if MyLoginForm.is_valid():
username = MyLoginForm.cleaned_data['username']
else:
MyLoginForm = Loginform()

return render(request, 'loggedin.html', {"username" : username})


The view will display the result of the login form posted through the
loggedin.html. To test it, we will first need the login form template. Let's call it
login.html.

<html>
<body>

<form name = "form" action = "{% url "myapp.views.login" %}"method =


"POST"

>{% csrf_token %}
<div style = "max-width:470px;">
<center>
<input type = "text" style = "margin- left:20%;"
placeholder = "Identifiant"name = "username" />
</center>

</div>

<br>

<div style = "max-width:470px;">


<center>
<input type = "password" style = "margin-
left:20%;"placeholder = "password" name =
"password" />
</center>
</div>

def formView(request):if
request.session.has_key('username'):
username = request.session['username']

return render(request, 'loggedin.html',

{"username" : username})else:
return render(request, 'login.html', {})
Now let us change the url.py file to change the url so itpairs with our new view −

from django.conf.urls import patterns, url


from django.views.generic import TemplateView

urlpatterns = patterns('myapp.views', url(r'^connection/','formView', name


= 'loginform'),url(r'^login/', 'login',name = 'login'))
When accessing /myapp/connection, you will get to seethe following page
SOURCE CODE

Remote Views :
from django.shortcuts import render, HttpResponse
from .forms import UserRegistrationForm
from .models import
UserRegistrationModel,UserImagePredictinModel
from django.contrib import messages
from django.core.files.storage import FileSystemStorage
from .utility.GetImageStressDetection import
ImageExpressionDetect
from .utility.MyClassifier import KNNclassifier
from subprocess import Popen, PIPE
import subprocess
# Create your views here.

# Create your views here.


def UserRegisterActions(request):
if request.method == 'POST':
form = UserRegistrationForm(request.POST)
if form.is_valid():
print('Data is Valid')
form.save()
messages.success(request, 'You have been successfully
registered')
form = UserRegistrationForm()
return render(request, 'UserRegistrations.html',
{'form': form})
else:
messages.success(request, 'Email or Mobile
Already Existed')
print("Invalid form")
else:
form = UserRegistrationForm()
return render(request, 'UserRegistrations.html',
{'form': form})

def UserLoginCheck(request):
if request.method == "POST":
loginid = request.POST.get('loginname')
pswd = request.POST.get('pswd')
print("Login ID = ", loginid, ' Password = ', pswd)
try:
check =
UserRegistrationModel.objects.get(loginid=loginid,
password=pswd)
status = check.status
print('Status is = ', status)
if status == "activated":
request.session['id'] = check.id
request.session['loggeduser'] = check.name
request.session['loginid'] = loginid
request.session['email'] = check.email
print("User id At", check.id, status)
else:
messages.success(request, 'Your Account
Not at activated')
return render(request, 'UserLogin.html')
except Exception as e:
print('Exception is ', str(e))
pass
messages.success(request, 'Invalid Login id and
password')
return render(request, 'UserLogin.html', {})

def UserHome(request):
return render(request, 'users/UserHome.html', {})

def UploadImageForm(request):
loginid = request.session['loginid']
data =
UserImagePredictinModel.objects.filter(loginid=logini
d)
return render(request,
'users/UserImageUploadForm.html', {'data': data})

def UploadImageAction(request):
image_file = request.FILES['file']

# let's check if it is a csv file


if not image_file.name.endswith('.jpg'):
messages.error(request, 'THIS IS NOT A JPG
fs = FileSystemStorage()
filename = fs.save(image_file.name, image_file)
# detect_filename = fs.save(image_file.name,
image_file)
uploaded_file_url = fs.url(filename)
obj = ImageExpressionDetect()
emotion = obj.getExpression(filename)
username = request.session['loggeduser']
loginid = request.session['loginid']
email = request.session['email']

UserImagePredictinModel.objects.create(username
=username,email=email,loginid=loginid,filename=fil
ename,emotions=emotion,file=uploaded_file_url)
data =
UserImagePredictinModel.objects.filter(loginid=login
id)
return render(request,
'users/UserImageUploadForm.html', {'data':data})

def UserEmotionsDetect(request):
if request.method=='GET':
imgname = request.GET.get('imgname')
obj = ImageExpressionDetect()
emotion = obj.getExpression(imgname)
loginid = request.session['loginid']
data =
UserImagePredictinModel.objects.filter(loginid=login
'users/UserImageUploadForm.html', {'data': data})

def UserLiveCameDetect(request):
obj = ImageExpressionDetect()
obj.getLiveDetect()
return render(request, 'users/UserLiveHome.html', {})

def UserKerasModel(request):
# p = Popen(["python", "kerasmodel.py --mode display"],
cwd='StressDetection', stdout=PIPE, stderr=PIPE)
# out, err = p.communicate()
subprocess.call("python kerasmodel.py --mode display")
return render(request, 'users/UserLiveHome.html', {})

def UserKnnResults(request):
obj = KNNclassifier()

df,accuracy,classificationerror,sensitivity,Specificity,fsp,preci
sion = obj.getKnnResults()
df.rename(columns={'Target': 'Target', 'ECG(mV)': 'Time
pressure', 'EMG(mV)': 'Interruption', 'Foot GSR(mV)': 'Stress',
'Hand GSR(mV)': 'Physical Demand', 'HR(bpm)':
'Performance', 'RESP(mV)': 'Frustration', }, inplace=True)
data = df.to_html()
return
render(request,'users/UserKnnResults.html',{'data':data,'acc
uracy':accuracy,'classificationerror':classificationerror,

'sensitivity':sensitivity,"Specificity":Specificity,'fsp':fsp,'
precision':precision})
Admin Views :

from django.shortcuts
import render from
django.contrib import
messages
from users.models import
UserRegistrationModel,UserImagePredictinModelfrom
.utility.AlgorithmExecutions import KNNclassifier

# Create your views here.

def
AdminLoginCheck(re
quest):if
request.method ==
'POST':
usrid =
request.POST.get('logini
d')pswd =
request.POST.get('pswd
') print("User ID is = ",
usrid)
if usrid == 'admin' and pswd == 'admin':
return render(request,
'admins/AdminHome.html')elif
usrid == 'Admin' and pswd ==
'Admin':
return render(request,
'admins/AdminHome.html')else:
messages.success(request, 'Please Check Your
Login Details')return render(request,
'AdminLogin.html', {})

def AdminHome(request):
return render(request, 'admins/AdminHome.html')

def ViewRegisteredUsers(request):
data = UserRegistrationModel.objects.all()
return render(request, 'admins/RegisteredUsers.html', {'data':
data})

def
AdminActivaUsers(req
uest):if
request.method ==
'GET':
id =
request.GET.get('uid
')status = 'activated'
print("PID = ", id,
status)
UserRegistrationModel.objects.filter(id=id).update
(status=status) data =
UserRegistrationModel.objects.all()
return render(request, 'admins/RegisteredUsers.html',
{'data': data})
def AdminStressDetected(request):
data = UserImagePredictinModel.objects.all()
return render(request,
'admins/AllUsersStressView.html', {'data': data})
def
AdminKNNResults(re
quest):obj =
KNNclassifier()
df, accuracy, classificationerror, sensitivity,
Specificity, fsp, precision =obj.getKnnResults()
df.rename(
columns={'Target': 'Target', 'ECG(mV)': 'Time
pressure', 'EMG(mV)':'Interruption', 'Foot
GSR(mV)': 'Stress',
'Hand GSR(mV)': 'Physical Demand',
'HR(bpm)': 'Performance','RESP(mV)': 'Frustration',
},
inplace=Tr
ue) data =
df.to_html()
return render(request, 'admins/AdminKnnResults.html',
{'data': data, 'accuracy': accuracy,
'classificationerror':classificationerror,
'sensitivity': sensitivity, "Specificity":
Specificity, 'fsp': fsp,'precision': precision})
obj = KNNclassifier()
df, accuracy, classificationerror, sensitivity,
Specificity, fsp, precision =obj.getKnnResults()
df.rename(
columns={'Target': 'Target', 'ECG(mV)': 'Time
pressure', 'EMG(mV)':'Interruption', 'Foot
GSR(mV)': 'Stress',
'Hand GSR(mV)': 'Physical Demand',
'HR(bpm)': 'Performance','RESP(mV)': 'Frustration',
},
inplace=Tr
ue) data =
df.to_html()
return render(request, 'admins/AdminKnnResults.html',
{'data': data, 'accuracy': accuracy,
'classificationerror':classificationerror,
'sensitivity': sensitivity, "Specificity":
Specificity, 'fsp': fsp,'precision': precision})
SYSTEM TEST

The purpose of testing is to discover errors. Testing is the process of trying to discover every
conceivable fault or weakness in a work product. It provides a way to check the functionality of
components, sub assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system meets its
requirements and user expectations and does not fail in an unacceptable manner. There are
various types of test. Each test type addresses a specific testing requirement.

TYPES OF TESTS
Unit testing
Unit testing involves the design of test cases that validate that the internal
program logic is functioning properly, and that program inputs produce valid outputs. All
decision branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit before
integration. This is a structural testing, that relies on knowledge of its construction and is
invasive. Unit tests perform basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique path of a business
process performs accurately to the documented specifications and contains clearly defined
inputsand expected results.

Integration testing
Integration tests are designed to test integrated software components to
determine if they actually run as one program. Testing is event driven and is more concerned
with the basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically aimed at
exposing the problems that arise from the combination of components.
Functional test
Functional tests provide systematic demonstrations that functions tested are
available as specified by the business and technical requirements, system documentation, and
user manuals.
Functional testing is centered on the following items:

Valid Input : identified classes of valid input must be accepted.

Invalid Input : identified classes of invalid input must be

rejected.Functions : identified functions must be exercised.

Output : identified classes of application outputs must be

exercised.Systems/Procedures : interfacing systems or

procedures must be invoked.

Organization and preparation of functional tests is focused on requirements, key


functions, or special test cases. In addition, systematic coverage pertaining to identify Business
process flows; data fields, predefined processes, and successive processes must be considered
fortesting. Before functional testing is complete, additional tests are identified and the effective
value of current tests is determined.

System Test
System testing ensures that the entire integrated software system meets
requirements. It tests a configuration to ensure known and predictable results. An example of
system testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration points.

White Box Testing


White Box Testing is a testing in which in which the software tester has
knowledge of the inner workings, structure and language of the software, or at least its
purpose.It is purpose. It is used to test areas that cannot be reached from a black box level.
Black Box Testing
Black Box Testing is testing the software without any knowledge of the inner
workings, structure or language of the module being tested. Black box tests, as most other
kinds of tests, must be written from a definitive source document, such as specification or
requirementsdocument, such as specification or requirements document. It is a testing in which
the software under test is treated, as a black box .you cannot “see” into it. The test provides
inputs and responds to outputs without considering how the software works.
Unit Testing

Unit testing is usually conducted as part of a combined code and unit test
phaseof the software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.

Test strategy and approach

Field testing will be performed manually and functional tests will be written in
detail.
Test objectives
• All field entries must work properly.
• Pages must be activated from the identified link.
• The entry screen, messages and responses must not be delayed.

Features to be tested
• Verify that the entries are of the correct format
• No duplicate entries should be allowed
• All links should take the user to the correct page.
Integration Testing

Software integration testing is the incremental integration testing of two or more


integrated software components on a single platform to produce failures caused by interface
defects.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company level
– interact without error.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

Acceptance Testing
User Acceptance Testing is a critical phase of any project and requires significant
participationby the end user. It also ensures that the system meets the functional
requirements.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.
SCREEN SHOTS

Home page:

User Register page:


User Login Form:

User Home Page:


Giving Image as Input:

Upload Image:
Response Image:

Results:
Live Stream:

Deep Learning Page:


Deep Learning Frame

KNN Results:
Dataset View:

Admin Page:
Admin Home Page:

Activate users:
Detected Images:

Admin Side Resuts:


Admin View knn Results:
CONCLUSION

Stress Detection System is designed to predict stress


in the employees by monitoring captured images of
authenticated users which makes the system secure.
The image capturing is done automatically when the
authenticate user is logged in based on some time
interval. The captured images are used to detect the
stress of the user based on some standard
conversion and image processing mechanisms. Then
the system will analyze the stress levels by using
Machine Learning algorithms which generates the
results that are more efficient.
EVALUATION
Internal & External Evaluation for Semester Internship

Objectives:
• Explore career alternatives prior to graduation.
• To assess interests and abilities in the field of study.
• To develop communication, interpersonal and other critical skills in the
future job.
• To acquire additional skills required for the world of work.
• To acquire employment contacts leading directly to a full-time job following
graduation from college.

Assessment Model:
• There shall be both internal evaluation and external evaluation
• The Faculty Guide assigned is in-charge of the learning activities of the students
and for the comprehensive and continuous assessment of the students.

• The assessment is to be conducted for 200 marks. Internal Evaluation for 50


marks and External Evaluation for 150 marks
• The number of credits assigned is 12. Later the marks shall be converted into
grades and grade points to include finally in the SGPA and CGPA.
• The weightings for Internal Evaluation shall be:
o Activity Log 10 marks
o Internship Evaluation 30 marks
o Oral Presentation 10 marks
• The weightings for External Evaluation shall be:
o Internship Evaluation 100 marks
o Viva-Voce 50 marks
• The External Evaluation shall be conducted by an Evaluation Committee
comprising of the Principal, Faculty Guide, Internal Expert and External Expert
nominated by the affiliating University. The Evaluation Committee shall also
consider the grading given by the Supervisor of the Intern Organization.

• Activity Log is the record of the day-to-day activities. The Activity Log is
assessed on an individual basis, thus allowing for individual members within
groups to be assessed this way. The assessment will take into consideration
the individual student’s involvement in the assigned work.
• While evaluating the student’s Activity Log, the following shall be
considered -
a. The individual student’s effort and commitment.
b. The originality and quality of the work produced by the individual
student.
c. The student’s integration and co-operation with the work assigned.
d. The completeness of the Activity Log.
• The Internship Evaluation shall include the following components and based on
Weekly Reports and Outcomes Description
a. Description of the Work Environment.
b. Real Time Technical Skills acquired.
c. Managerial Skills acquired.
d. Improvement of Communication Skills.
e. Team Dynamics
f. Technological Developments recorded.
MARKS STATEMENT
(To be used by the Examiners)
INTERNAL ASSESSMENT STATEMENT

Name Of the Student:


Programme of Study:
Year of Study:
Group:
Register No/H.T. No:
Name of the College:
University:

Sl.No. Evaluation Criterion Maximum Marks


Marks Awarded
1. Activity Log 10
2. Internship Evaluation 30
3. Oral Presentation 10
GRAND TOTAL 50

Date: Signature of the Faculty Guide


EXTERNAL ASSESSMENT STATEMENT

Name Of the Student:


Programme of Study:
Year of Study:
Group:
Register No/H.T. No:
Name of the College:
University:

Maximum Marks
Sl.No Evaluation Criterion
Marks Awarded
1. Internship Evaluation 80
For the grading giving by the Supervisor of
2. 20
the Intern Organization
3. Viva-Voce 50
TOTAL 150
GRAND TOTAL (EXT. 50 M + INT. 100M) 200

Signature of the Faculty Guide

Signature of the Internal Expert

Signature of the External Expert

Signature of the Principal with Seal


ANDHRA PRADESH STATE COUNCIL OF
HIGHER EDUCATION
(A STATUTORY BODY OF THE GOVERNMENT OF ANDHRA PRADESH)
2nd,3rd,4th&5th floors Neeladri towers Sri ram Nagar 6th battalion road
atamakur(v) mangaligiri(m), Guntur, Andhra pradesh,522503
WWW.APSCHE.AP.GOV.IN

You might also like