« first day (2142 days earlier)      last day (2800 days later) » 
00:00 - 20:0020:00 - 00:00

12:00 AM
\o/
You can watch me ramble on about Flask with a couple friends here if you're interested: crowdcast.io/e/flask
 
Do you think it would be appropriate to remove irrelevant code from here? It's currently the first result for "'tuple' object has no attribute 'encode' in mysql connector"
 
Yeah, make it an mcve.
I usually edit down code in a question after I'm certain of the problem.
 
yeah, you got several complaints about that in the past :P
 
Did I? It's really rare if so, no one seems to notice or care most of the time.
 
Can't find the comment, I think it was linked in here some time ago. "why did you change the question to fit your answer" or something
Sorry, I could be wrong. But thanks for the advice, I will reduce the code
 
12:10 AM
Oh yeah, I remember that h.v., that's the exception not the rule. :-)
 
12:21 AM
@dav
@davidism do I have to use a url_for in a static index.html in order for my js files to work ? Because they don't seem to work at all .
the index.html is static
I'm using this to send static files without using url for :
@app.route('/<path:path>')
def static_proxy(path):
# send_static_file will guess the correct MIME type
return app.send_static_file(path)
css is working fine tho
 
The title could be better...
 
 
3 hours later…
user4639281
3:36 AM
Do you guys know of a canonical BEDMAS (mathematical order of operations) question?
 
user4639281
5:52 AM
This room is entirely too active. :P
 
@TinyGiant ...
sleeping
 
user4639281
Sleep chatting?
 
16
Q: What does the term "BODMAS" mean?

GateKillerWhat is BODMAS and why is it useful in programming?

this ^
it is generic
or you can link the q here...
I've got a hammer if there's a dupe
 
user4639281
kk
 
user4639281
i'll try to find it
 
user4639281
6:01 AM
it was a while ago in the socvr
 
user4639281
-1
Q: Find average of list + 2 inputs - python

DavidI need to find the average of 5 assignments = two inputs. I'm getting a result, but its no correct. Here is what I have: def main(): # list of grades x = [] # count of students n = 5 # fill list with grades from console input # using pythonic generator x = [int(input('Ple...

 
user4639281
Wait, wrong link lol
 
@TinyGiant yes, you can use a bedmas dupe for that,
but if you take that to read "how do i calculate the average in python",
 
user4639281
Well... it isn't really a how to question, even though it is kind of phrased that way, it is actually a debugging question, the answer to which is BEDMAS
 
user4639281
Thanks for the reference :)
 
6:30 AM
@TinyGiant I am trying to find a BODMAS q, but only questions that got confused because of the integer division in python 2 pop up
 
user4639281
The one you posted earlier seems good enough, maybe not overly specific, but it explains the concept of BODMAS / BEDMAS / PEMDAS / whatever you want to call it
 
user4639281
it is really just a basic math question anyway
 
user4639281
+1 for answering the larger question of how to achieve the thing
 
it is not really that good dupe target for that
@TinyGiant also: one thing to think about is, you go to google and ask for "find an average of list + 2 inputs", click the link, and find yourself in "What does the term bodmas mean" :D
 
user4639281
Yeah...
 
10:07 AM
Cbg
 
 
1 hour later…
11:24 AM
Hello everyone,
How can I show a flattened image back as a rgb image?
I converted a 32*32*3 image into a 3072 numpy array.! Now I cant re-display it as an image.
How should I do it?
 
Cabbage
 
Happy 25th birthday, #Linux! Here's your f-ing #cake, go ahead and compile it yourself. https://t.co/OCQUDPhlXY
cbg
 
@Hossein You can use PIL (Pillow). PIL.Image.fromarray Disclaimer: I don't know much about Numpy (but I do know a bit about PIL), and I've never used that function. I guess that you may need to reshape your array so PIL can determine the correct width, height, and depth of your image data.
Hi, idjaw.
It's nice when OPs admit that their idea is mad and that they need professional help: unix.stackexchange.com/questions/306061/web-desktop-environment :)
 
hey PM! :)
 
@PM2Ring Thanks, but I'm getting IndexError: tuple index out of range error!
 
11:40 AM
@Hossein Ok. What shape is your array?
 
its a [10000,3072] array, which is 10K 32x32 images. and I am passing
data[0] which would be [3072]
 
@Hossein But what shape is data[0]? Is it just a flat 1D array?
 
user6568562
@PM2Ring Nice, lol
 
user6568562
I would love my OS to rely on the forgiving nature of those languages. Fun times guaranteed
 
11:58 AM
yes it is.
it actually is : (3072L,) when executing data[0].shape
 
@Hossein So you need to reshape it. If b is your flat array, then do:
from PIL import Image
h, w, d = 32, 32, 3
img = Image.fromarray(b.reshape(h, w, d))
img.show()
Where h is height, w is width, and d is depth.
 
@PM2Ring Thank you very much, It now showed something ;)
by the way, does this look like a zca whittened image to you?
I wantto know if I have messed it up or not!
http://i.stack.imgur.com/lWsTU.png
 
I've just been playing with this stuff on my machine. I used this to load the image and convert it to a Numpy array:
import numpy as np
from PIL import Image
img = Image.open(fname)
a = np.asarray(img)
@Hossein No idea, but it does look pretty random. :)
 
12:15 PM
I'm not crazy, this code is a complete mess, right?
I just don't feel like reading through any of that
(well, in general I am crazy...but, yeah..blah blah)
 
These were Cifar10 images, and I used https://github.com/lisa-lab/pylearn2/blob/master/pylearn2/scripts/datasets/make_cifar10_gcn_whitened.py to zca whiten them!. this is the result.
Thats kind of weird to me as well.
Thanks again, you were a great help to me today.
 
Hungover cabbage.
 
whaddup Morgan
 
@idjaw Yeah, it's definitely not great code.
Laying in bed slowly sipping water. You?
 
Waiting for my daughter and wife to wake up so we can get on with the day.
It's really funny how my son turned out like me, and my daughter turned out like my wife
 
12:20 PM
I'm no data scientist, but storing matrices as dictionaries ? Blech!
 
@idjaw Heh, I know how that is. I always wake up way too early.
 
@MorganThrapp Greetings, Morgan. I'd link to Sunday Morning Coming Down, except it'd be a day too early. :)
 
@idjaw early wakeup must be y-linked then :P
 
Hey, I'm willing to pretend it's Sunday. I won't tell. ;)
 
A major Finnish bookshop chain now sells hardcopies of Shakespeare's classics translated into Finnish...
... only... the books have been machine-translated...
 
12:27 PM
@AnttiHaapala Actually, it looks like it might be. en.m.wikipedia.org/wiki/Acetylserotonin_O-methyltransferase
 
Oh man, I wish I could read Finnish. That sounds amazingly terrible.
 
"Opi Color Names Lasten"
 
haha....oh man..

"I did not mean to sleep in that long"
and my daughter just woke up at the same time too.
 
the bookstore chain says: "to offer as wide selection as possible we need to lower the quality expectations"
 
12:28 PM
I have proven the Y-link.
 
this nonsense book costs 12 € :D
 
1. Start yelling crazy things
2. Create Tweeter account to spit out more crazy things
3. You will get enough followers
4. Start a book
5. People will worship you
6. profit
 
... yet there is a PD translation of King Lear from 1883 already on the internet...
 
"Buy our books. They're probably not complete shit".
 
the reader comments that "it is readable but rather dadaistic"...
 
12:31 PM
That the tag line for LPTHW?
 
They're also selling language learning textbooks... whose titles have mistakes in the names of the languages <3
 
Alright, the party has started at home. The Saturday has begun.
 
this must be the beginning of the end...
 
rbrb guys
 
See yah, idjaw.
 
1:03 PM
cbg all
 
user6568562
Can anyone tell me why is it that browsers don't clear ram, at least efficiently, even after closing ram-hungry tabs ? Or is it probably an issue of my own.
 
user6568562
Google results blamed out-of-date plugins (I only have Firebug and it's updated), antivirus (I'm only using separate removal tools for specific problems), Adobe Acrobat (which is nonsensical, I believe, because I killed its automatic update privileges, yet up to date.)
 
user6568562
1.5 Gb of Ram for chat tab, single YT tab, single googling tab, single result checking tab is a lot, I believe. And even after closing all tabs except chat tab and YT tab, it only tilts for a few hundred mbs --> Stays close to 1 Gb
 
1:18 PM
JS library resource requirements (here load all these expensive libraries to let my framework run), Google Services running in background (if your logged into GMAIL or any other Google service), and it just hasn't seemed a priority - I think we had a conversation about why people prefer a dynamic, modern look and accept the "weight" of loading all the libraries
Also, there are a few extensions for lessening the memory that tabs use
 
user6568562
@JGreenwell I see ! Of course. That makes sense. But does that mean that when you enter a website that loads a specific JS library, that library stay loaded even though the tab using it has been closed ?
 
user6568562
The answer to this must be it depends.
 
user6568562
Thanks @JGreenwell [ : I'll check those extensions.
 
yummy... korean bbq for dinner
 
A good test would be to set you homepage as a blank page and then see how much Chrome or Mozilla cost to just load (then use that as base)
 
1:33 PM
very brief cabbage
@randomhopeful don't forget that firefox keeps an extensive history of your closed tabs
complete with their own history, I believe
so I'm not that surprised that it's non-trivial to just close it
when I find that my 150 tabs have gobbled too much memory, I just restart firefox:P
 
actually, clearing the cache and opening a blank page would show a good base
cbg Andras
 
@AndrasDeak only 150?
 
user6568562
@AndrasDeak Also very true. That chain of "Undo close tab" possibilities need to live somewhere. Task manager to the rescue then : P
 
if its only 150, you must not be working on anything right now ;)
 
no MCVE (code as image) stackoverflow.com/questions/39181366/… Only 1 vote to go...
 
user6568562
1:45 PM
I took it upon myself to clean my tab lines. I always* considered it a manifestation of my ADHD
 
at one point I would have looked at a question like that and thought "I'll just edit in the code and it will be fine (has an answer after all)" now I see it and think "Close it so the OP has to edit in their own code to get it re-opened and actually learns"
 
2:03 PM
 
using *sklearn
I know this is very random - but by any chance anyone here knows how to tune in the parameters for a random forest regressor, I search the whole the indices of google till I found it to be useful ;)
 
The answer to that question is going to mostly based on your implementation model as tuning the parameters for a better cross-validate score can run into areas of bias and over-fitting if one is not careful.
but: things like increasing the estimators (depth), ensemble (combine) different-depth tree models, adding some PCA to make more independent variables, and splitting the criteria are some things out of a huge list
so my best direct answer would be: "Find some papers based on models similar to yours and study what they did - then adapt it"
 
2:24 PM
Cabbage Everyone
I got a quick question could you help me out
I make calls to an api wia python, this api have a 30 request / 10 sec per IP limit, currently my server is doing all the requests, and it could at some point reach the limit, I don't want that, should I use an IP proxy server and use the IP of my end user as a host ?
 
2:39 PM
@AnisSouames you should use less requests.
 
I'm using as less as I can
 
@AnttiHaapala I've been keeping my tab problem in check since my tab murder spree in december (I closed 745 tabs in one sitting)
 
There is no way I could lower it
 
@AnisSouames setting a timer to stay below the limit?
I'm sure it can be done
 
@AndrasDeak I don't remember ever having over 300
@AnisSouames then find another API.
 
2:42 PM
@Andras I know, but that would make the UX very bad and slow
 
we are here to discuss Python, not about some imaginary licensing problems.
 
yes, but it's not a matter of ability, it's a matter of willingness:P
 
I was thinking aboyt rewriting the request part in JS
That way I could use the clients IP address
but I'd love if there could be a way to use python in browser, so I don't have to rewrite it in JS, which I'm very bad in .
 
I am not aware of IP-limited APIs
usually nowadays they're either app or user limited with oauth anyway.
 
Can I use python as a frontend scripting language ?
 
2:44 PM
exactly because IP limits are easy to circumvent.
@AnisSouames yes and no.
which in your case most likely means no.
 
what were you researching with 700+ tabs @AndrasDeak? I think my max was 450-ish when I was reference checking and verifying my dissertation (made sure I didn't typo a number somewhere with my Jupyter Notebooks)
 
@JGreenwell who said anything about research?
 
@AndrasDeak @AnttiHaapala what about using a proxy server on the backend ? with random IPs, or a list of IPs (I could find those online, and data is not private so i don't really care about security)
 
well, "research" is a broad term ;)
 
@AnisSouames you can leave me out of this, can't help you
 
2:47 PM
@AndrasDeak [ .... redacted .... ] :d
 
@JGreenwell it's mostly movies, various fun trivia, stuff I want to show the missus, comics, and buttload of SO
@AnttiHaapala ?:D
you can solve this on your own :>
 
ever heard of bookmarks :P ;D
 
@AnttiHaapala ?
 
@JGreenwell sure, I have hundreds of them
 
nvm :P
 
2:52 PM
:D
 
@AnttiHaapala can I use a proxy with random ip addresses ?
 
lol
 
@AnisSouames go ahead, I am not your dad.
 
@Antti are you certain? :p
 
@NinjaPuppy I never can be too certain about that.
 
3:04 PM
Hi guys
 
3:48 PM
@davidism hmm, indeed, are new field instances created for each form?
 
Yeah, the initial field call actually translates to an unbound field which stores the args. Calling the form actually creates the field with the args.
 
4:04 PM
haha need to wait 44 minutes more
perhaps add QuerySelectField(u'Field', query_factory=lambda request: request.session.query(MyModel))?
 
 
2 hours later…
6:09 PM
cbg
Damn, I broke the silence.
 
@BhargavRao haven't seen you in a while - all good?
 
Hmm, What happened to that Jon Clements guy?
You guys have let in a new puppy? o_O
 
Had rabies - had to put 'em down
bit of a shame - think we was not that bad a guy...
 
Dem rabies, Troubling puppies since ages!
 
6:13 PM
So now we need Ninja Puppy for RO!
 
So that the room is NP complete?
 
(Just to make the list an even number :P)
 
@BhargavRao Ninja puppy no can haz italic
 
@AndrasDeak Hah! Exactly
 
hmm
I'd have a looooooooooooooong list of people who'd I want to elect as ROs :d
 
6:14 PM
@AnttiHaapala Yep, Those in blue cannot have their names in italics
 
perhaps I should remove myself as a RO to make space for more :D
 
Yeah agreed
 
after all I've never kicked anyone
ffisegydd naturally agrees :D
 
Yeah - how dare you not have kicked anyone - spend time here hanging out offering good programming advice... you're a complete failure! :p
 
@AnttiHaapala your looming presence is enough to scare the noobs away
 
6:19 PM
I need to calibrate my kick trigger.
 
@AnttiHaapala let's face it - Fizzy and David just beat you to it :)
 
Haha, Antti can't even dream of beating them
 
I am always thinking "OK here's my chance to lose my kick virginity"
 
Don't think, just kick.
 
By that time that particular user would have already been kicked :D
EAFP
 
6:22 PM
yeah that thought is always interrupted.
 
Every time someone posts a message, roll a d20, on 1 kick.
 
and... sigh...
 
@AnttiHaapala you have my permission to kick Fizzy... he deserves it for errr....
... massacring a load of kittens!
Although - I might have just made that reason up...
 
yeah, in fact he hates puppies, not kittens
which is an even better reason
 
"Oh now it happens, now finally I am going to feel the power at my fingertips and kick someone. I'll just need to open that menu, and...." DING! user megan00b has been kicked from room by Fizzygood and cannot return for 525600 minutes.
 
6:27 PM
at least you'll see a bunny with p probability
 
5 mins ago, by Bhargav Rao
By that time that particular user would have already been kicked :D
I was correct!
 
@AnttiHaapala so who's megan and what's 00b?
 
@AnttiHaapala That's one heck of a kick duration :p
 
It's in milliseconds.
 
6:51 PM
hmm...now my avatar seems correct everywhere in chat
I love it that it's not even consistent
my IP might have changed in the mean time, though
 
@AndrasDeak you could just take the gravatar image and set it as a proper image... just saying :)
 
2 days ago, by Andras Deak
But I can't fix my avatar now that I'm involved in the investigation
way ahead of you;)
I just realized that numba is installed on my laptop
 
@AndrasDeak I see green andras
 
I should really learn to use it
@AnttiHaapala \o/
 
... except your chat profile is purple...
 
7:01 PM
@AnttiHaapala ...
 
^purple
 
I see green everywhere
 
I see blue and black.
 
briefly saw purple two days ago before leaving for the countryside
@BhargavRao you should also see doctors:P
 
@BhargavRao your gamma is negative
 
7:02 PM
:D
 
@idjaw :P
well, it turns out we're not that good in Finland after all... a weak cyclone is passing over Finland right now' tens of thousands of households are without power...
sorry, 200k households :P
 
Oh, Damn. Hope all are safe.
 
@BhargavRao we have hurricane-force winds like once in 100 years :P
this isn't even close
 
When will they restore the power supplies?
 
just yesterday I told how much of the cities have underground cabling :P
and increasingly even in rural areas
and now we have 15-20 m/s sustained winds and 25 m/s gusts and 10 % of the country is without electricity
@BhargavRao trees on overhead lines, so it is going to take a while :P
 
7:10 PM
6-8 weeks and all will be back to normalcy
 
:P this is not India
 
Then 2-3 weeks? :P
 
less than 6-8 days, but must be more than 6-8 hours
not really productive to try to go fix things right now.
 
Wow, Everyone is efficient than us
 
147235 households without electricity right now
even on a map
@BhargavRao on thursday we had an unplanned outage in this area, 2200 households affected
first time in 10 years that I noticed anything
30 seconds after the power went out I got an SMS in my phone saying that there's been an unexpected power drop and they're investigating the reason to it and it will be estimated 2 hours.
so 41 minutes later we got the power back, one underground cable had shorted I guess so they rerouted the power...
 
7:15 PM
What's the main source of power in Finland?
 
@AnttiHaapala your wiring is so good you forgot how to fix electric problems
 
@BhargavRao it is distributed...
for example Oulu could be dropped out of the national grid
we've got hydroelectric and combined heat production with peat/wood in the city
 
we are having sporadic power failure here - lost power last night for a bit - due to tropical storm (or depression - not sure it counts as storm yet)
 
@JGreenwell I guess that would be called a superstorm here :P
 
this is also the standard during the summer months here
 
7:20 PM
So you guys have a perennial supply of water for hydroelectricity? That's great!
 
the tsunamis in Japan were always fun - only time I've flown trying to hold on to a sheet
 
I realise that this is very insensitive, and that tropical storms kill people and living with them must be frustrating, but I'd like to see/go through one some day.
 
me too
 
We had a storm here earlier for 30 minutes, was lovely, but yeah I'm sure they're different animals.
 
I am so envious of my little brother, who spent a year in Texas as an exchange student
 
7:23 PM
@AnttiHaapala 9gag.com/gag/avneeRW (The first post that I saw when I opened 9gag)
 
he was in Houston when Rita passed over
 
@BhargavRao that post makes absolutely no sense on 9gag, the ultimate content recycler site
 
> "I've heared that it's concidered very rude in Finnland to kill the Family's dog in a satanistic Ritual. So even if this seems strange, you shouldn't do that."
 
Floridians have a weird pride about surviving tropical storms and hurricanes (especially people in the Keys) so I get the idea of "wanting to experience it once"
 
> Also, never write Finland with two N's
 
I just love rain/storms.
 
@BhargavRao except if you're @poke
@AndrasDeak what, that's confidential, how did our organizational chart get uploaded to imgur
 
at least the divisions have been redacted
 
@AndrasDeak Bah, Everything is just recycled material! :D
I spend some 5-10 mins there
 
Hmm...
"Texas reported the most deaths from the hurricane, where 113 deaths were reported, 107 of which were associated with the evacuation of the Houston metropolitan area."
 
7:28 PM
@BhargavRao except imgur usersub
 
that could be called a failure...
 
@AnttiHaapala something something shot them
 
car accidents are highly likely when evacuating
 
wikipedia says that 70 due to hyperthermia, and 23 died in a bus fire...
 
which is to say "even more likely than the normally high likelihood"
 
7:33 PM
wow...
 
@AndrasDeak ~3 million evacuated...
 
not a bad ratio then
 
but many remained
 
^ I swear I've had people try and turn the first one in
 
@JGreenwell we had a physics laboratory practice in which one of the experiments was set up so bad that we had to fit a line to a trapezoid
the experiment was about measuring elasticity of wooden planks by bending them, but they were already curvy with zero load:D
 
7:41 PM
@JGreenwell hey nice to see you are still here !! No luck with google, can you guide me out with the problem ?
 
@JGreenwell The next time just drop in the xkcd link.
It'll one box with the title text also
 
I always love the responses to my questions on why they didn't try anything else too
usually along the lines "it gave me a high cross-validate score so must be correct" or just "it fit my model"
 
transparent lines in the shape of a kitten etc...
 
your "how do I fit parameters to a random tree model" question?
split the data run chi-square, check for entrophy, check/reduce variance, etc...your question is really broad
First, I'd work on creating an Minimal, Complete, and Verifiable Example of what you are trying to do and make a question
 
@wolframalpha ^
also, doesn't Wolfram have something like FitParametersToRandomTreeModel? ;)
it must be Mathematica then:D
 
7:50 PM
I don't use either of those so no idea (sklearn has some Gradient Boosting stuff and few other things but depends on dataset whether these will help)
 
Wow, The North Korean Gold medalists will be rewarded with cars!
 
I thought not sending them to the gulag would be enough reward
@JGreenwell it was mostly a joke, this is Mathematica
 
lol
 
00:00 - 20:0020:00 - 00:00

« first day (2142 days earlier)      last day (2800 days later) »