GithubHelp home page GithubHelp logo

sdudent-telegram-bot's Introduction

SDUdent telegram bot

This is self learning project aimed to make life of students of my university easier. Bot solves problems that I met during my student life. It has 2 main functionalities:

  1. Notify about new grades

    Problem:After passing midterm exams students everytime enters to portal to check, if there is new grade or not

    Solution: Get student's authorization data(student number & password) , parse his/her grades data from portal, save it in database, continuously parse it and check for difference with grades in database,if there is a difference,tell him/her, update grades in database each time .

    Pseudocode:

    while True:
       for user in database.users:
           new_grades = get_grades_from_portal(user['username'],user['password'])
           old_grades = user['semester_data']
           difference = old_grades - new_grades
           if difference:
               notify_user(chat_id = user['chat']
               update_grade_in_database()
    
  2. Find sdudent by photo

    Problem: You liked/need someone but don't know his/her name and program,but have a photo?

    Solution: Use pretrained deep-learning model to get feature vector of user photo. User photo can be found in portal .

    This is how our portal looks like,from this page get user's photo,full name,program . Pass user's photo through pretrained model and get feature vector , data(feature_vector,full_name,program) in database.

    When another user calls /find_user command and send photo, get feature vector of sent photo and compare with all other user's photo's feature vector by cosine similarity

    Pseudocode:

    photo = user.message.photo.get_file()
    current_feature_vector = pretrained_model(photo)
    #shape = [1,512]
    max_sim = 0
    for user in database.users:
         similarity = cos_sim(current_feature_vector,user['feature']
     if max_sum < similarity:
         max_sim = similarity
    
     send message about user with highest similarity
    

Built With

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Acknowledgements

Help, feedback or suggestions?

Feel free to contact me on Telegram for discussions, news & announcements about bot & other projects.

sdudent-telegram-bot's People

Contributors

yerlantemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdudent-telegram-bot's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.