@wim I guess you changed to a deque to avoid using a list, but deque.remove is pretty slow if the item's in the middle. Of course that won't matter for very small k, and as you say your algorithm itself is slow for large k. FWIW, I have seen that user before. I'm hazy on details, but I seem to remember their code being a bit cumbersome.
@wim I see, I seriously feel stupid, because I have been using requests now for over an year, and I have always had to deal with the encoding/decoding issues due to using r.content, and now I find out theres a simpler solution, damnnnnn xD
@wim Also its strange my response header shows content type is utf-8 but it fails to decode it
was recently trying to use microsoft graph api to retreive my profile photo (via javascript not python), and I was struggling sooo much to decode the returned binary data for the photo, that I just had to give up xD
@Aran-Fey Nope there not, microsoft returns them as binary, and was struggling to try get it to render on the webpage.. tried all sorts of solutions, such as converting to base64, using blob urls etc.. but after a week of trying just gave up.
@PM2Ring Cheers, for the first time today i think I properly looked at the requests module guide online @ docs.python-requests.org/en/master, and I am learning alot of things I never new about it
@SShah Response encoding info isn't necessarily reliable. The HTML <meta> data may be more accurate, but it can also be science fiction, e.g. clawi
@SShah Response encoding info isn't necessarily reliable. The HTML <meta> data may be more accurate, but it can also be science fiction, e.g. claiming the file is iso latin1 when it's actually a Microsoft variant.
@PM2Ring Yup I agree, thats why I say I always hate having to encode/ decode anything, because I often run into issues which can get annoying to fix. xD
From en.m.wikipedia.org/wiki/ISO/IEC_8859-1 It is very common (on the Internet) to mislabel Windows-1252 text with the charset label ISO-8859-1. Most modern web browsers and e-mail clients treat the media type charset ISO-8859-1 as Windows-1252 to accommodate such mislabeling.
> Google Maps JavaScript API error: RefererNotAllowedMapError https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error Your site URL to be authorized: https://stackoverflow.com/users/edit/1222951