UrbanPro
true

Learn Python Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Facebook Analytics

Logeswaran
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',
'contacts':[6666666666,3333333333,4444444444],
'pages': {
'python': {'sudha', 'priyanka'},
'BusinessMantra': {'sudha', 'oviya'}
}
},
'sudha': {
'name': 'sudha', 'age': 32, 'hobby': ['Khabadi', 'Movies', chess'],
'mobile': 2222222222, 'email': 'sudha.ram@gmail.com',
'contacts':[5555555555],
'pages':{
'python':{'sudha', 'lok'},
'furnitures': {'chris', 'priyanka'}
}
},
'lok': {
'name': 'lok', 'age': 26, 'hobby': ['python','football'],
'mobile': 3333333333, 'email': 'lok123@gmail.com',
'contacts':[3333333333,7777777777],
'pages':{
'python':{'chris', 'priyanka', 'jose'}
}
},
'priyanka': {
'name': 'priyanka', 'age': 26, 'hobby': 'football',
'mobile': 4444444444, 'email': 'pravi@gmail.com',
'contacts':[5555555555,3333333333,4444444444],
'pages':{'python':{'chris', 'jose'}}
},
'chris': {
'name': 'chris', 'age': 35, 'hobby': 'football',
'mobile': 5555555555, 'email': 'christopher.e@gmail.com',
'contacts':[6666666666,3333333333,4444444444]}
}

 

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,
    'contacts':[6666666666,3333333333,4444444444]
  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

Submit

Other Lessons for You

Spring - Dependency Injection (DI)
Spring - Dependency Injection (DI) DI is a framework which provides loose coupling in code. Here loose coupling means no hard coding of the object. Instead of hard coding, we will be injecting these object...

Syntax and example of java
Java syntax: Class Display - - class definition { Void Display() { System.out.println('welcome to Java') ; } Public static void main(String arcs) { Display D=new Display() ;--object creation D. Display } }

Selenium Web Drive Wait Methods
Hi I am Rajesh, Here we have three types of wait methods in Selenium: 1.Implicitly Wait: Wait if required, otherwise, if the accuracy will good program will move to next level In General most of the...

A Python Program to calculate Variance and Standard Deviation
Finding the variance and the standard deviation. Variance and Standard Deviation are related measures of dispersion that tell us more about a list of numbers,like are they...

Difference between Abstract Class and Interface
This is probably one of the most commonly asked questions in any job interview for .Net. Before we look into the differences between the two lets find out the main features. Abstract Class By definition...
X

Looking for Python Training Classes?

The best tutors for Python Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Python Training with the Best Tutors

The best Tutors for Python Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

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