mateus-mannes / musicanalysis Goto Github PK
View Code? Open in Web Editor NEWAn web project to analyze data from Spotify about the music world.
Home Page: https://musicanalysis.azurewebsites.net/
An web project to analyze data from Spotify about the music world.
Home Page: https://musicanalysis.azurewebsites.net/
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:
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.
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 ?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.