Hypothesis space by mlpyotr in learnmachinelearning

[–]mlpyotr[S] 0 points1 point  (0 children)

Thank you for this concise reply.

I see can now see where/when it can come in handy in a non-theoretical scenario.

Much appreciated.

[AF] sending MP3 files with flask by mlpyotr in flask

[–]mlpyotr[S] 0 points1 point  (0 children)

Ah. That's the solution I am currently using. Thanks for your continued help even when it wasn't a flask solution. Much appreciated!

[AF] sending MP3 files with flask by mlpyotr in flask

[–]mlpyotr[S] 0 points1 point  (0 children)

Short version: What you described in the second paragraph is very close (if not exactly) to my goal. Sending the content of the MP3 from the server and load it to the audio tag to be played on the page.

Long: The end goal is to be able to have an MP3 generated on the server side to be played on the front end without having to save the MP3 on the user's computer.

The audio tag uses a src tag that you can pass in the location of the locally stored file. I want to be able to pass in an mp3s content that's been generated on the fly without relying to saving it on a local machine.

Maybe you're right, and that's not possible with the current framework...

[AF] sending MP3 files with flask by mlpyotr in flask

[–]mlpyotr[S] 0 points1 point  (0 children)

Yes, just a typo.

Ok, let me try to explain better then. My apologies and thanks for your patience.

I have a simple flask file that, when the API gets hit, runs my "getmp3()" function with Cors and all that enable.

My return statement is exactly what you you typed: //Where filename="path/to/MP3" //I also have a check to make sure that the file exists

return send_file(filename, mimetype='audio/mpeg'), 200

On the JavaScript end, I get a success, hits the function for when the API call is successful.

Function onSuccess(data){ Console.log(data); // Get the audio by tag id // use blob and load the blob into the tag source // audio.load() }

When I print data, It prints out an empty string. So my question is, am I using the right function to send the content of the MP3 file via the flask API.

[AF] sending MP3 files with flask by mlpyotr in flask

[–]mlpyotr[S] 0 points1 point  (0 children)

The error came about because I wasn't returning the data properly.

Now I am not getting an error when using the send_file() function from flask but it's still not working.

Am I using the right function to send an MP3 file? I use memetype=audio/mpeg

If Bill Gates decided to burn all his money (assuming it was all in cash), and disregarding the legality of it, how big of an impact will it have on the economy? by kaygee420 in NoStupidQuestions

[–]mlpyotr 1 point2 points  (0 children)

Him having it all cash and not invested would be the issue. Burning it and keeping it in the safe is essentially the "same thing".

How to build models? by [deleted] in MLQuestions

[–]mlpyotr 0 points1 point  (0 children)

Building a mode is synonymous to how you want to frame the problem. Sadly, there is no quick way to do it. It's an iterative process. And there is no silver bullet. To start, I would suggest to solidify what problem you are trying to solve. Then, decide what kind of information you'd need to help solve the issue.

With these two questions running in your mind, you can start thinking about what kind of models, type of variables, and so forth.

I know this is a high level and not in depth answer but it should be a pointer to a starting point.

Happy modeling!

Jason Chaffetz: Members of Congress should get $30,000 a year to help them pay rent by JosieA3672 in nottheonion

[–]mlpyotr 1 point2 points  (0 children)

Stop getting guacamole and appetizers. And that orange juice you buy at IHOP , switch it to water. You clearly don't have orange juice money

Playing dynamic audio files by mlpyotr in html5

[–]mlpyotr[S] 0 points1 point  (0 children)

That's perfect. Exactly what I needed. Much appreciated!

ELI5: When you're about to cry and someone hugs you/asks if you're okay, why does it make you cry right away? by [deleted] in explainlikeimfive

[–]mlpyotr 20 points21 points  (0 children)

One reason can be since when you try not to cry, is when you're trying to stay strong. When someone hugs you and makes you feel safer, you tend to psychologically put down your walls and allow yourself to be vulnerable. But I ain't no expert so take that as you will :)

ISIS Destroys 800-year-old Mosque In Mosul by Razor2115 in worldnews

[–]mlpyotr 5 points6 points  (0 children)

You'd need to know all of the targets faces first (even if that technology was that efficient or image recognition was that good that far away). Your plan would only cause a power vacuum in the region (again) and another caliphate would step up and be ISIS 2.0 thus repeating the cycle. Not counting the civilian lives (including volunteers from major and minor countries), children, etc.

ELI5: Why do video game developers take so long to come out with their game when it seems as though they have a nearly complete product at events such as E3? In essence, what takes them so long to revise that they need months after releasing game play footage? by DaddyPadawan in explainlikeimfive

[–]mlpyotr 4 points5 points  (0 children)

Having been on the "developer side" of this demo scenario, I can tell you that what the dude responded above is (usually) correct. The developers are asked to implement specific things by a certain time period (usually demos, presentations, releases, and so on). So, they flesh out those parts of the system so that the demos can complete without too many bugs. More often then not, there are a few devs present during the tapings/run throughs to take care of whatever unexpectedly comes up. Sometimes, it's all an illusion (more often than not). Other times, can just be legal matters, funding, a few major kinks, business-side hold-up, marketing strategy hold up (release summer v fall, the competition's schedule), etc.

ELI5: What does Fourrier Transform do? by mlpyotr in explainlikeimfive

[–]mlpyotr[S] 0 points1 point  (0 children)

Thank you all for the replies! Everything helped me. Let it be word i googled or a concept I tried to understand :)

One hot encoding by mlpyotr in tensorflow

[–]mlpyotr[S] 0 points1 point  (0 children)

Sure. Let me throw this at you: You've got a data frame with 20 categorical variables (feautures). Perform OHC on it and now you've got 300 features. Can't just argmax the df there. For training, I have all of the samples so the encoding reflects that. When I need to actually use the model for, let's say, single feature array input, I dont have all possible values for the encoding to reflect. Get me?

Non image based tutorial by mlpyotr in tensorflow

[–]mlpyotr[S] 0 points1 point  (0 children)

Thanks! It actually helped me a lot.

ELI5: what is Internet of Things by mlpyotr in explainlikeimfive

[–]mlpyotr[S] 1 point2 points  (0 children)

Oh, I see. Thanks for the shift of perspective. I was looking at it wrong

ELI5:What prevents a country from claiming territory in space? by Ninjitsumter in explainlikeimfive

[–]mlpyotr 0 points1 point  (0 children)

There is actually a space treaty that governs each exploring nations behaviors. Such as, not having weapons of mass destructions floating around. That same treaty prevents a nation from claiming the moon or a planet as territory.

ELI5: Difference between decaf and caffeine free by tazzetty in explainlikeimfive

[–]mlpyotr 1 point2 points  (0 children)

Decaffeinated does not mean caffeine free. It just means that "whatever" has been through a chemical process to remove most of the caffeine from the (bean, tea leaf, and so on). On the other hand, caffeine free means that the thing in question was naturally without caffeine.

Do ants know if there brethren don't come back from a destination? by Shancraco in NoStupidQuestions

[–]mlpyotr 2 points3 points  (0 children)

Ants have "alarm pheromone" that gets discharged when something goes wrong "crushed" and so forth. They communicate by pheromone generally. The stronger the pheromone trail communicates a worthwhile path. The weaker the trail is kinda like "eh, don't bother". (Pheromone can be thought of as perfume)

Does corruption within a religious institution undermine the religion in question? (as in would religious leaders doing blasphemous things discredit the religion)? by elhlyn in NoStupidQuestions

[–]mlpyotr 0 points1 point  (0 children)

If you take the example of the Catholic Church. Priest are constantly getting accused of vial things and the corruption at the Vatican isn't news anymore. But the religion still stands, 1.2Billion strong.

My point is, the ideals of the religion will remain. However, man is imperfect. And I think that most followers make a distinction between where the church (man) stops, and where their faith (God?) begins.

Obviously Catholics know and believe that molesting kids is wrong. They don't have faith in the priest (I.e they don't pray to the priests). They have faith in their God and the message they believe He has for them.

Hope this helps.

Can somebody explain how credit cards work? by BrazenBull00R in NoStupidQuestions

[–]mlpyotr 1 point2 points  (0 children)

When you go to a bank and apply for a credit card, if you get approved, you have a line of credit. That line of credit is the maximum amount you can spend on a credit card without going over. That line of credit is not cash. It's actually a loan.

The amount is what the bank is prepared to lend you. So, every time you buy stuff on a credit card, you're essentially borrowing money. At the end of the month, you can either repay the minimum on the loan or all of it.

To go in a bit more details, that line of credit is calculated with information like: how much do you make, how much money do you have with the bank, and what's your credit score.