Find the best tutors and institutes for Python Training

Find Best Python Training classes

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

Facebook Analytics

03/09/2019 0 0

Assume how the Facebook application will store the millions of customer's record in real-time:

facebook = {
'jose': {
'name': 'jose', 'age': 33,
'hobby': ['cricket', 'python'], # cricket,football
'mobile': 1111111111, 'email': 'joset@gmail.com',
'pages': {
'python': {'sudha', 'priyanka'},
'BusinessMantra': {'sudha', 'oviya'}
'sudha': {
'name': 'sudha', 'age': 32, 'hobby': ['Khabadi', 'Movies', chess'],
'mobile': 2222222222, 'email': 'sudha.ram@gmail.com',
'python':{'sudha', 'lok'},
'furnitures': {'chris', 'priyanka'}
'lok': {
'name': 'lok', 'age': 26, 'hobby': ['python','football'],
'mobile': 3333333333, 'email': 'lok123@gmail.com',
'python':{'chris', 'priyanka', 'jose'}
'priyanka': {
'name': 'priyanka', 'age': 26, 'hobby': 'football',
'mobile': 4444444444, 'email': 'pravi@gmail.com',
'pages':{'python':{'chris', 'jose'}}
'chris': {
'name': 'chris', 'age': 35, 'hobby': 'football',
'mobile': 5555555555, 'email': 'christopher.e@gmail.com',


If you look closely, the above stores 5 persons information in a structured form. Moreover, we can have any value as any type as to learn as much as of python-datatypes, in other terms, the main motive of storing in this structure is to learn all the data-types of python.

Assignment I(Store data):

  1. You have to allow fb-customer to enter multiple hobbies with comma separator(,) and you have to store them as a list in db.
    Ex: 'jose': {'name': 'jose', 'age': '33', 'hobby': ['cricket', 'python']
  2. Sync Contacts: Basically facebook(Messenger) will sync all your contacts to it's database. Here, the user will enter all his contacts(mobile numbers) with comma separator, that you have to store as a list like below,
    input: '6666666666,3333333333,4444444444' and store it in db like the below,
  3. Validate the input of mobile number as 10-digit(Ex:9876543210), ask repeatedly if they enter invalid input.
    Ex: Enter you mobile number:88 (if the user entered non 10-digit number, ask them correct mobile number until the valid input)
    Enter valid mobile number: 9876543210
  4. Validate the Email-id with the format of Gmail account
  5. Get the Age and Mobile number as integer input
  6. A customer can run any number of pages, add an item as the above sample into their database with the pages and it's followers(set datatype)

Assignment II(Read operation):

  1. Find the person who has the hobby same as I am looking: List all the customer who has cricket as hobby
  2. Find the Target group for digital advt: A customer approaching FB to promote his page. How will they find the intended audience for the page-suggestion?
    Ex: I wants to promote my 'Python Development&Automation' page, then how will you pick the right person for my page among the millions of user-profile exist in the fb db.
  3. Suggest Friend: We usually get friend suggestion from facebook analytics. Have you ever wonder how does it work..? Let's simulate this.
    As you know the pattern of stored data(facebook), you can classify the category like(same School/Company/Community/Birthplace/CurrentLocation/Contacts)
  4. When the customer posting a status on their page, we have to let this know to all the followers
    Ex: sudha wants to post the status in his ‘furnitures’ page, notify this to all it's followers


0 Dislike
Follow 2

Please Enter a comment


Other Lessons for You

Coding for Children: Scratch
What is coding? Coding has become a must-have skill in this 21st century. Coding, or computer programming, is how we communicate with Devices. Code mentions the machine what moves to make, and composing...

File Handling in Python - Basic Concept
File (Flat) Handling in Python Types of files in python: 1: Text file: Stores data in the form of characters. Customarily used to store text/string data. 2: Binary file: Stores data in the form of bytes....

Manoj S. | 21 Jul

0 0

Java Advantages
In this video, learn about Java and its advantages. Also, check out the difference between Java and C++, Java development kit, Java Run Time Environment (JRE) with a proper demonstration program for better clarity.

Ranjit Singh | 06 Jul

0 0

Lambda Expressions in Java
A lambda expression, introduced in Java 8 is similar to a block of code resembling an anonymous function that can be passed to constructors or methods for execution as an argument. Examples: a)() ->...

DBMS - SQL - Any/All
All - Operator SELECT empno, sal FROM emp WHERE sal > ALL (1999, 2999, 3999); Output of Above query is same as below query SELECT empno, sal FROM emp WHERE sal > 1999 AND sal > 2999...

Radhe Shyam | 02 Apr

0 0

Looking for Python Training Classes?

Find best tutors for Python Training Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for Python Training Classes?

Find best Python Training Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more