Coder Social home page Coder Social logo

mateus-mannes / musicanalysis Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 86.4 MB

An web project to analyze data from Spotify about the music world.

Home Page: https://musicanalysis.azurewebsites.net/

Python 23.45% HTML 48.22% CSS 20.61% JavaScript 7.66% Procfile 0.05%
python flask flask-application flask-web music music-player spotify spotify-api spotify-web-api spotify-playlist

musicanalysis's People

Contributors

marianamannes avatar mateus-mannes avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

musicanalysis's Issues

logo image not working in playlist template

hi @marianamannes, in the profile page I've add an option to choose a playlist to analyze. After clicking in a playlist you are going to be redirected to the route "/playlist/<playlist_id>" where i've started to build the template. But as you are going to see, the logo image in the navbar ir not working:
image
with the erro: 127.0.0.1 - - [26/Sep/2020 08:41:32] "GET /playlist/static/logo.png HTTP/1.1" 404 -
this just happens with this route of the application and I dont now why. If you discover some think, or this erro is not happening with you, return to me.

User checker not working

Hi @marianamannes , I have added the template in #2. But the function that you've made for check if the user name inputed exists didn't work for me. it just returns an HTTP error and pass through the try/except block:
HTTP Error for GET to https://api.spotify.com/v1/users/mariana Mannes returned 400 due to Invalid username 127.0.0.1 - - [30/Aug/2020 13:54:14] "POST /look%20users HTTP/1.1" 200 -
I maybe i've caused this, because I remember using it and it was working. Can you test it ?

Making faster Playlist class methods

I've commited the changes in the "pegar_generos" function that we've made Sunday (in the lookup branch). That made our "lookup for users" feature 60% faster, but It is still slow. I belive there many other things we can do to make the code faster. For example:

--- AVOIDING USING API FUNCTIONS
*** In the init function we use "user_playlists(user, limit=5)" to get the playlists of the shearched user, and for the current user we use "me()" to get the current user id and then pass it through "user_playlists()". Doing that we are calling the Web Api two times to get the current user playlists, and we could use It just one time by opting for the "current_user_playlists(limit=50, offset=0)" function.

--- REFACTORING
***We are repeating ourselves in the code. For example, we are getting the artists of the playlists musics in "pegar_generos" and "pegar_artistas", moreover, we are repeating the "moda" calculation in those methods. I think we should refactor all methods in small functions, and use better names for variables, functions, etc .... (all in English).

What do you think ? I really belive that refactoring the code like I said is the most important thing to make it faster.

ps: I've made this repostorio public.

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.