You are on page 1of 13

Sachin-Onboarding Helpdesk to Everyone16:50

Please download the Health COV-ER “Back to Campus” app: https://healthcov-


er.wipro.com. It is currently accessible via all devices including desktops and
mobile browsers. Steps to download the Wipro Back to Campus Mobile App
(Android/iOS). 1. Android users – Google Play Store - > Search for “Wipro Back to
Campus” - > Install the app - > Current App Version 3.3.0 2 Internal to Wipro 2.
iOS / Apple Devices- App Store - > Search for “Wipro Back to Campus” - > Installthe
app Daily rostering under ‘Work from Campus Business purpose’ is mandatory. The QR
Code will be valid for a day. To know more about how to download the app, please
view this video: Watch 'Back to campus App Launch' | Microsoft Stream

https://github.com/tbarua1/uy

1. python -m venv venv

2. venv\Scripts\activate (venv\Scripts>activate) (open virtuval enivironment)

3.\python_practice>mkdir templates (separate folder creation in cmd)

npm install ani run chasava?


npm install -g yarn
yarn version
npm rebuild node-sass
yarn cache clean
yarn

yarn run dev

npm i yarn

npm version

node version
yarn version

npx create

npx create-react-app foldername

npm install

npm start

[10:12] Dr. Tarkeshwar Barua (Guest)


sudo apt install docker.io

[10:22] Dr. Tarkeshwar Barua (Guest)


uname

[10:22] Dr. Tarkeshwar Barua (Guest)


uname -r

[10:24] Dr. Tarkeshwar Barua (Guest)


docker --version

[10:26] Dr. Tarkeshwar Barua (Guest)


sudo apt-get update

sudo apt-get install apt-transport-https ca-certificates curl software-properties-


common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

sudo apt-key fingerprint 0EBFCD88

echo "" | sudo tee /etc/apt/sources.list.d/docker.list

sudo apt-get update

sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual

[10:27] Dr. Tarkeshwar Barua (Guest)


sudo apt-get install linux-image-generic-lts-trusty

sudo reboot

sudo apt-get install docker-ce

sudo service docker start

sudo docker run hello-world

docker container run -d --name cassandra -p 9042:9042 cassandra:latest

./mvnw spring-boot:build-image

[10:28] Dr. Tarkeshwar Barua (Guest)


sudo service docker status

[10:28] Dr. Tarkeshwar Barua (Guest)


sudo vice docker startser

[10:29] Dr. Tarkeshwar Barua (Guest)


sudo service docker stop

[10:29] Dr. Tarkeshwar Barua (Guest)


sudo service docker start

[10:31] Dr. Tarkeshwar Barua (Guest)


sudo docker run hello-world

[10:57] Dr. Tarkeshwar Barua (Guest)


./mvnw spring-boot:build-image

1. What is Covarient in java?


1.5 What is different between Method and constructor?
2. What is Check Exception and Uncheck Exceptions in Java?
3. What is Tranisient keyword?
4. Difference between Spring and SpringBoot?
5. How Rest Call happens in SpringBoot?
6. What is Lazy Loading in Hibernate ?
7. What is the Difference between get and Load method?
8. What is the Difference between save and Persist method in Hibernate?
9. What are the scopes in Spring Framework?
10. What is cascading and what are different types of cascading?
11. How to integrate Hibernate and Spring frameworks?
12. Which design patterns are used in Hibernate framework?
13. What is Spring Profile?
14. Describe Singleton and Prototype Design pattern ?
15. What is the difference between Comparator and Comparable interface?
16. What is HashTable ?
17. How many Null keys and Null values are allowed to Store in Hashtable?
18. Difference between Update and Merge mathod in Hibernate?
19. How to Integrate Spring and Hibernate framework?
20. How to Connect Database using Hibernate ?
21. what is the Encapsulation.
22. what is the overriding and overloading.
23. can we override abstract method.
24. can we override static and private method.
25. what is deadlock.
26. what is the syncronization.
27. what is treeset.
28. how can find data in accending order by using streem api.
29. what is the functional interface.
30. what is the optional class.
31. life cycle of multithreading.
32. How can make arraylist as Syncronized.
33. internal flow when we are puting the data in map with duplicate key.
34. what is different between controller and rest conroller.
35. what is the front cntroller.
36. what is the @component and @Controller.
37. what is the jstl tag.
38. how can find only name and id from table using hibernate.
39. what is lembda expression uses of lambda expressions.
40. what is the functional interface.
41. what is the predicate.
42. what spring bean and life cycle of spring bean.
43. what is the ioc container.
44. what is Autowiring.
45. what is the life cycle of hibernate.
46. what is abstraction class?
47. what is polymorphism in java?
48. what is difference between arrayList and LinkedList?
49. difference between list and set?
50. what is difference between hash table and hashmap?
51. How many ways thread can create?
52. what is synchronization?
53. why wait() method in Object class?
54. what is deadlock?
55. What is difference between hibernate and jpa?
56. What is Hibernate cache?
57. what is this,super key word?
58. what is difference between Named Queries and Criteria Queries?
59. What is IOC and Dependency Injection?
60. What is Spring MVC model?
61. @RequestMapping,@Required,@Qualifier,@Autowired annotations
62. @Temporial,@Entity
63. What are the Stereotype annotations?
64. what is Session Management?
65. @RestController and @Controller
65. what is JPA Repository interface?
22.Java8 features
1.- What is static keyword with some real time example.
2.- What is exception handling & thier types.
3.- how inheritance work with exception.
4.- what is wrapper class with some real time example.
5.- what is diffrence between concureent hashmap & hash map.
6.- how hashmap internally works.
7.- diffrence between linklist & Arraylist.
8.- define java 8 feature.what is stream api.
9.- what is functional interface & lamda expression.
10.- what are JDBC step to connect code with database.
11.- diffrence between spring & springBoot.
12.- what is JPA.how it works.
13.- define MVC flow.
14.- define annotation which use in springBoot.
15.- diffrence between restController & controller.
16. Define microservices.
17. what are types of cloning.
18.- Diffrence between application.properties & YML fiile.
19. how you will get response in XML when you work with microservices.
1. What is Covarient?
2. What is Check Exception and Uncheck Exceptions in Java?
3. What is Tranisient keyword?
4. Difference between Spring and SpringBoot?
5. How Rest Call happens in SpringBoot?
6. What is Lazy Loading in Hibernate ?
7. What is the Difference between get and Load method?
8. Wgat is the Difference between save nad Persist method in Hibernate?
9. What are the scopes in Spring Framework?
10. What is cascading and what are different types of cascading?
11. How to integrate Hibernate and Spring frameworks?
12. Which design patterns are used in Hibernate framework?
13. What is Spring Profile?
14. Describe Singleton and Prototype Design pattern ?
15. What is the differnec between Comparator and Comparable interface?
16. What is HashTable ?
17. How many Null keys and Null values are allowed to Store in Hashtable?
18. Difference between Update and Merge mathod in Hibernate?
19. How to Integrate Spring and Hibernate framework?
20. How to Connect Database using Hibernate ?
1.what is the incaptulation.
2.what is the overriding and overloading.
3.can we override abstract method.
4.can we override static and private method.
5.what is deadlock.
6.what is the syncronization.
7.what is treeset.
8.how can find data in accending order by using streem api.
9.what is the functional interface.
10.what is the optional class.
11.life cycle of multithreading.
12.what is the check and unchecked exception.
13.how can make arraylist as Syncronized.
14.internal flow when we are puting the data in map with duplicate key.
15.what is different between controller and rest conroller.
16.what is the front cntroller.
17.what is the @conponent and @Controller.
18.what is the jstl tag.
19.how can find only name and id from table using hibernate.
20.what is lembda expression uses of lambda expressions.
21.what is the functional interface.
22.what is the predicate.
23.what spring bean and life cycle of spring bean.
24.what is the ioc container.
25.what is Autowiring.
26.what is the life cycle of hibernate.
[12:23 PM] Sreelakshmi DONTHIREDDY

Not yet done Tarak Still doing give me some time.


[12:30 PM] Dhilleswara Rao PYLA

1.what is abstraction class?

2.what is polymorphism in java?

3.what is difference between arrayList and LinkedList?

4.difference between list and set?

5.what is difference between hash table and hashmap?

6.How many ways thread can create?

7.what is synchronization?

8.why wait() method in Object class?

9.what is deadlock?

10.What is difference between hibernate and jpa?

11.What is Hibernate cache?

12.what is this,super key word?

13.what is difference between Named Queries and Criteria Queries?

14.What is IOC and Dependency Injection?

15.What is Spring MVC model?

16.@RequestMapping,@Required,@Qualifier,@Autowired annotations

17.@Temporial,@Entity

18.What are the Stereotype annotations?

19.what is Session Management?

20.@RestController and @Controller

21.what is JPA Repository interface?

22.Java8 features

[12:32 PM] Unknown User


Fireflies.ai Notetaker Vikram (Guest) no longer has access to the chat.
[12:46 PM] Ashish KUMAR
1.- What is static keyword with some real time example.
2.- What is exception handling & thier types.
3.- how inheritance work with exception.
4.- what is wrapper class with some real time example.
5.- what is diffrence between concureent hashmap & hash map.
6.- how hashmap internally works.
7.- diffrence between linklist & Arraylist.
8.- define java 8 feature.what is stream api.
9.- what is functional interface & lamda expression.
10.- what are JDBC step to connect code with database.
11.- diffrence between spring & springBoot.
12.- what is JPA.how it works.
13.- define MVC flow.
14.- define annotation which use in springBoot.
15.- diffrence between restController & controller.
16. Define microservices.
17. what are types of cloning.
18.- Diffrence between application.properties & YML fiile.
19. how you will get response in XML when you work with microservices.
1.what is method overloading and method overriding?
2.What is static keyword?
3.immu/table and mutable in string?
4.difference between create statement and prepared statement?
5.what are the Steps involved in jdbc connection?
6.What is checked exception and unchecked exception?
7.Life cycle of thread?
8.wait and notify in thread?
9.What is wrapper class?
10.Difference between Hash set and Hash map?
11.What is fail fast and fail safe?
12.What is spring mvc model?
13.What is dependency injection?
14.What is Junit and annotations used in junit?
15.How many ways of creating the thread
16.What is the difference between arraylist and linked list?
17.Java 1.8 features ?
18.What is synchronization?
19.Design patterns in java?
20.Annotations in springboot?
21.Is Jsp used as controller?
22.What is dispatcher servlet?
23.What is generics in java?
24.How hash map internally works?
@reqbody
@restcontroller
@query
@PathVariable
Hashmap
Maven buildcommands
Optional
Springboot actuator
Difference between equals and ==
Stream api
Functional interface
Java Interface
Lambda expression
List and Arraylist
Difference between list and set
Hashmap internal implementation
Difference between @RestController and @Controller
Difference between string buffer and string builder
What is checked exception and unchecked exception
What is Hibernate
What are annotations in hibernate
Difference between get and load
Hibernate implementation

Hi
currently I'm working as devoleper in python Team , I am not supposed to perform
well at this role
with my coading knowledge .

I have more skill's and knowledge on Devops.


please move to Devops , I'll be in a position to perform well and can be more
productive.

Thanks,

from flask import *


from flask_sqlalchemy import SQLAlchemy
from flask import Flask, request, jsonify, make_response
from werkzeug.security import generate_password_hash, check_password_hash
import os
import jwt
import datetime
from functools import wraps
app = Flask(__name__)
app.config['SECRET_KEY'] = 'your secret key'
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///employes.sqlite3'

db = SQLAlchemy(app)
class employes(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
email = db.Column(db.String(32), unique=True, nullable=False)
password = db.Column(db.String(128))
def __init__(self,email,password):
self.email = email
self.password = password
db.create_all()
@app.route('/signup',methods=['POST'])
def signingpage():
payload=request.json
email=payload['email']
password=payload['password']
employe=employes(email=payload['email'],password=payload['password'])
db.session.add(employe)
db.session.commit()
return "successfully registered"

@app.route('/loging', methods=['post'])
def logingpage():
payload=request.json
email=payload['email']
password=payload['password']
user=employes.query.filter_by(email=email).first()
print(user.password)
if user.password == password:
return "valid password"
else:
return "invalid password"
return "done"

def token_required(f):
@wraps(f)
def decorated(*args, **kwargs):
# import pdb;pdb.set_trace()
token = None
if 'x-access-token' in request.headers:
token = request.headers['x-access-token']
if not token:
return jsonify({'message' : 'Token is missing !!'}), 401

try:
data = jwt.decode(token, app.config['SECRET_KEY'])
users = employes.query.filter_by(id = data['id']).first()
except:
return jsonify({
'message' : 'Token is invalid !!'
}), 401
return f(users, *args, **kwargs)

return decorated

@app.route('/check', methods=['post'])
def page():
try:
# import pdb;pdb.set_trace()
email = request.args.get('email')
password = request.args.get('password')
user = employes.query.filter_by(email=email).first()
if not user:
response = jsonify({'message': 'Invalid login'})
return response
if user.password==password:
token = jwt.encode({'id': user.id, 'exp': datetime.datetime.utcnow()
+datetime.timedelta(minutes=30)},app.config['SECRET_KEY'])
return jsonify({'token': token.decode('utf-8')})
else:
response = jsonify({'message': 'Invalid '})
return response
except:
print("faail")

@app.route('/information', methods=['GET'])
@token_required
def UserDetails(users):
try:
info = dict()
info['id'] = users.id
info['email'] = users.email
info['password'] = users.password
return jsonify(info)
except:
print("no information")
return "valid"

if __name__ =='__main__':
app.run(debug = True, port=5001)

class UpdateUserDetails(Resource):
@auth_token_required
def post(self):
json_data = request.get_json()
user_id = current_user.id
try:
instance = User.query.filter(User.id==user_id)
data=instance.update(dict(json_data))
db.session.commit()
updateddata=instance.first()
msg={"msg":"User details updated
successfully","data":updateddata.serializers()}
code=200
except Exception as e:
print(e)
msg = {"msg": "Failed to update the userdetails! please contact your
administartor."}
code=500
return msg

import enum
from os import name
from re import A
from flask import *
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///health.sqlite3'
app.config['SECRET_KEY'] = 'the random string'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
db = SQLAlchemy(app)
class User(db.Model):
id = db.Column(db.Integer, primary_key = True,autoincrement=True)
name = db.Column(db.Integer,nullable = False)
mobile = db.Column(db.Integer,nullable = False)
email = db.Column(db.String(70),unique = True,nullable = False)
password = db.Column(db.String(80),nullable = False)
class BLOOD_GROUP(enum.Enum):
A = 'A+'
B = 'B+'
AB = 'AB+'
O = 'O+'
class FOOD_NEED(enum.Enum):
fruits = 'fruits'
vegetables = 'vegetables'
rice = 'rice'
class MEDICINE_NEED(enum.Enum):
Fevermedicine = 'Fevermedicine'
Coughandmedicine = 'Coughandmedicine'
Bodypainsmedicine = 'Bodypainsmedicine'
class Health(db.Model):
Firstname = db.Column(db.Integer,nullable = False)
Lastname = db.Column(db.Integer,nullable = False)
Blood = db.Column(db.Enum(BLOOD_GROUP),default=BLOOD_GROUP.none,nullable=False)
Food = db.Column(db.Enum(FOOD_NEED),default=FOOD_NEED.none,nullable=False)
Medicines =
db.Column(db.Enum(MEDICINE_NEED),default=MEDICINE_NEED.none,nullable=False)
db.create_all()
@app.route('/signin',methods=['POST'])
def signingpage():
payload = request.form
name=payload['name']
mobile=payload['mobile']
email=payload['email']
password=payload['password']

details=User(name=payload['name'],mobile=payload['mobile'],email=payload['email'],p
assword=payload['password'])
db.session.add(details)
db.session.commit()
message = "successfully created you account"
return render_template("sign.html",message=message)
@app.route('/login',methods=['POST'])
def loginpage():
payload = request.form
email=payload['email']
password=payload['password']
user=User.query.filter_by(email=email).first()
if user.password == password:
print("valid password")
else:
print("invalid password")
message = "successfully logedin"
return render_template("login2.html",message=message)
@app.route('/userdetails',methods=['POST'])
def healthinformation():
payload = request.form
Firstname=payload['Firstname']
Lastname=payload['Lastname']
Blood=payload['Blood']
Food=payload['Food']
Medicines=payload['Medicines']

information=Health(Firstname=payload['Firstname'],Lastname=payload['Lastname'],Bloo
d=payload['Blood'],Food=payload['Food'],Medicines=payload['Medicines'])
db.session.add(information)
db.session.commit()
message = "successfully details filled"
return render_template("bannerpoc.html",message=message)
if __name__ == "__main__":
app.run(debug = True, port=5001)

import datetime
from flask import *
from functools import wraps
import jwt
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__, template_folder='template')
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///health.sqlite3'
app.config['SECRET_KEY'] = 'the random string'
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True
app.config["SESSION_PERMANENT"] = False
app.config["SESSION_TYPE"] = "filesystem"
db = SQLAlchemy(app)
class User(db.Model):
id = db.Column(db.Integer, primary_key = True,autoincrement=True)
name = db.Column(db.Integer)
phone = db.Column(db.Integer)
email = db.Column(db.String(70),unique = True)
password = db.Column(db.String(70))
passwordrepeat = db.Column(db.String(70))
class Health(db.Model):
id = db.Column(db.Integer, primary_key = True,autoincrement=True)
Firstname = db.Column(db.Integer)
Lastname = db.Column(db.Integer)
Blood = db.Column(db.String)
Bloodtype = db.Column(db.String)
Fooditems = db.Column(db.String(50))
Medicineitems = db.Column(db.String(50))
db.create_all()
@app.route('/')
def loginpage():
return render_template("login.html")
def token_required(f):
@wraps(f)
def decorated(*args, **kwargs):
token = None
if 'x-access-token' in request.headers:
token = request.headers['x-access-token']
if not token:
return jsonify({'message' : 'Token is missing !!'}), 401
try:
data = jwt.decode(token,app.config['SECRET_KEY'])
users = User.query.filter_by(id=data['id']).first()
except:
return jsonify({
'message' : 'Token is invalid !!'
}), 401
return f(users, *args, **kwargs)
return decorated
@app.route('/login',methods=['POST','GET'])
def signingpage():
if request.method == 'POST':
uname=request.form['uname']
passw=request.form['passw']
user = User.query.filter_by(email=uname,password=passw).first()
if user is not None:
if user.password == passw:
session["uname"] = uname
# token = jwt.encode({'id': user.id, 'exp':
datetime.datetime.utcnow() + datetime.timedelta(minutes =
1)},app.config['SECRET_KEY'])
# # return jsonify({'token': token.decode('UTF-8')})
# result = "token"
return redirect(url_for("home"))
else:
return render_template("login.html")
return render_template("login.html")
@app.route('/home')
def home():
if "uname" in session:
return render_template("view.html")
else:
return redirect(url_for("loginpage"))
@app.route('/signin',methods=['POST','GET'])
def health():
if request.method == 'POST':
name=request.form['name']
phone=request.form['phone']
email=request.form['email']
password=request.form['password']
passwordrepeat=request.form['passwordrepeat']

details=User(name=name,phone=phone,email=email,password=password,passwordrepeat=pas
swordrepeat)
db.session.add(details)
db.session.commit()

return render_template("signin.html")
@app.route('/details',methods=['POST','GET'])
def healthinformation():
if request.method == 'POST' and "uname" in session:
Fname=request.form['Fname']
Lname=request.form['Lname']
blood = request.form['blood']
bloodtype = request.form['bloodtype']
foods = request.form.getlist('food')
food = ','.join(foods)
medicine = request.form.getlist('medicines')
medicines = ','.join(medicine)

information=Health(Firstname=Fname,Lastname=Lname,Blood=blood,Bloodtype=bloodtype,F
ooditems=food,Medicineitems=medicines)
db.session.add(information)
db.session.commit()
if information is not None:
return render_template("list.html",health = Health.query.all())
return redirect(url_for("loginpage"))
@app.route("/logout")
def logout():
session.pop("uname",None)
return redirect("/")
if __name__ == "__main__":
app.run(debug = True, port=5000)

You might also like