« first day (1706 days earlier)      last day (3241 days later) » 

12:00 AM
Add me as an owner and I'll consider my voice acknowledged, and we'll let this drop.
 
In my (obviously biased) opinion we've generally done reasonably well in keeping this place friendly, helpful and drama-free over the two or three years I've been here, so it'd be nice if we could resolve any problems among ourselves – either right here or in meetings as described above. However, there is always the option of taking it to Meta if you feel you have an unresolved grievance.
That said, you appear to be mistaking being a room owner for a symbol of status. To my knowledge, none of the existing ROs think of it that way; we consider ourselves janitors.
As such, demanding to be made an owner is unlikely to convince other owners that you're ideally suited for the responsibility.
 
It's a moderator role. I have the Python gold badge, the Marshall gold badge, and the Copy Editor gold badge. And I have a higher reputation than both you and David. I'm not entitled to it, but I am qualified.
I have also reached 7.2m people, according to StackOverflow.
 
Honestly, none of the things you describe as qualifications strike me as relevant to looking after a chat room.
 
I think, based on yours and David's moderating today, you should both take a vacation from the role.
 
People have been invited to become moderators based on having been around for a while and showing a commitment to the well-being of the room. You'll see if you look that we have ROs of widely varying rep, badges etc.
 
12:15 AM
I think it's time to invite one more.
 
Ok, that's a legitimate complaint. We have out-of-band tools (a Trello board and a slack chat) for admistrative tasks; if you like I can use those to ask ROs who weren't involved in today's incident to consider whether @davidism and I were outof order.
(by "legitimate" I mean that I support your right to complain. As you might imagine I disagree with the complaint itself)
 
I think that's a very opaque process that you suggest. There are absolutely no check or balances.
Provide me with a view. I'm qualified. I will not overstep. Make me an owner.
 
@Aaron honestly, that's not going to happen. This room is not a republic, but a saloon bar. You're getting a much more sympathetic hearing from the bar staff than you would in analogous circumstances in most bars I've ever frequented.
Seriously, I'd drop the demands if you want to be taken seriously. This is sincerely meant as friendly advice.
 
That's a horrible analogy. Too many respectable people write blog posts featured on Hacker News about why they don't contribute on StackOverflow any more. You need to figure out how to listen to stakeholders.
 
Is there any way I can replace my avatar icon for one that is similar but doesn't look like a flower in chat?
Seems like they are randomly generated when you make an account, but I can only upload a new one and not select between them as options :(
 
They're based on a hash of your email address (or IP address if you don't have an email listed, IIRC). So no, you can't select between generated ones.
Well, you could change the aforementioned email / IP address, I suppose.
51
Q: How do I change my profile picture, or avatar?

SLCWhere does the image come from? How do I change my profile picture, or avatar? How do I change my profile picture on all SE sites at once? How can I use different avatars on different SE sites? How do avatars work? How do the SE sites know when I changed my Gravatar? Why do SE sites show a differ...

 
Wow, it's randomly generated based on my email?
 
Technology, huh? :-)
 
12:41 AM
That's definitely more interesting than I was expecting of an answer
 
create one here en.gravatar.com
 
Cool, melon
 
Watermelon
I see that a lot of old questions have answers only for Python2, which is sad
We gotta update them :)
 
Python2 is the future
People will come crawling back, just like with VHS
 
If you consider that time is circular, yes python2 is future and then python-beta is even more in future
 
12:48 AM
Little-known marketing fact: Python 3.6.0 is going to be known as Python 360. After that, we're going back to Python One.
8
 
Genuine Question - Is it worth the effort to add answers to old question to update them?
(I think no)
 
If the highest-voted or accepted answer is Wrong with a capital W, maybe. If you draw attention to it here (and others agree with your assessment) you might get a bit more attention than otherwise.
 
Naw. I just meant that the answer is in Py2 which is incomp with Py3, for e.g map. So in such cases do we add an answer?
 
What's the answer in question?
 
I added an answer along with a comment to the top answerer.
 
12:57 AM
I think that's reasonable. Also, +1.
 
Melons.
Now back to my question, Should we do this to many other questions out there?
 
If you were just going to say "you need to wrap it in list() in 3.x" that could even have been an edit to the accepted answer – since you've said rather more than that, I can see why you made a new one.
 
Ok, I got the point. So my action was accurate. :) Pats self
Melons :)
 
cbg @Jon
Busy day after becoming a mod?
 
1:05 AM
more a busy doing being me... but yes :)
 
One advantage you have there, little pups don't get tired :D
 
1:26 AM
Haha! People reached recalculation puts me at 107k. :)
 
I heard people reached its like golf, lower points is better. So I win
 
Oh I guess it is because of that answer
 
78 people reached flex
 
Nice
 
1:40 AM
rbrb.
 
 
3 hours later…
4:57 AM
Cabbage :-)
 
5:09 AM
cbg
 
5:34 AM
What function is there in Python instead of Val() in VB6?
 
6:01 AM
@siddaramesh it depends on the type of the number.
nothing really corresponds directly, but
>>> int('123')
123
>>> float('123.123')
123.123
>>> float('123')
123.0
>>> int('12 3')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '12 3'
>>> int('12.3')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '12.3'
you'd use int to convert to an integer, float to convert to a float...
or you can use ast.literal_eval to convert and then test that it is of proper type...
 
@AnttiHaapala Val() function in vb6 is different from typecasting.. if u give Val("&Hff") in vb6 it returns 255 in decimal..
 
use ast.literal_eval and check the results
ofc nothing in python will return 255 for "& Hf F"
 
 
1 hour later…
7:16 AM
Hey up
 
Cbg
I hate those partial results in codeeval
Particularly when it's something that's really hard to eyeball, and you have to start painstakingly constructing complicated tests of your own
 
user559633
morning gents
 
@tristan babbage
 
user559633
i'd love to spend a summer making an analytical engine
 
And I've always wanted to dress up like Ada Lovelace
 
user559633
7:19 AM
are you thinking what i'm thinking?
 
I believe I am
Master
 
user559633
oh, i was thinking that i should get a puppy
 
Ah. Me too hahaha
 
user559633
Is there a way to pass a variable to all templates in Flask? e.g. setting a variable to be picked up by a base template that is extended by all others?
 
Use g?
 
user559633
7:32 AM
The template is generated before it switches to the application context
 
Cbg :)
 
user559633
cbg
 
user559633
Neat! Found the answer
 
user559633
@app.context_processor
def inject_site_name():
    return dict(site_name=APP.SITE_NAME)
 
user559633
and then in the template you can just reference site_name
 
7:43 AM
Nice
 
user559633
This rules: coolors.co/app/a54657-582630-f7ee7f-f1a66a-f26157 hit space to generate a color scheme
 
Nice
 
cbg
 
user559633
cbg
 
8:01 AM
cbg
 
c-c-c-combo breaker
cbg
 
Bonjour, mes amis
 
user559633
i'm not your amis, copain
 
Today, I will mostly be conferencing
Easy, tristan.
 
user559633
:)
 
8:18 AM
@BoltClock: Looks like this guy wants to delete his account after all meta.stackoverflow.com/questions/297210/…
 
Mornin'
 
With this (shamelessly bounty hunting but then got interesting) answer, my top tag is python, will it hold the lead over java? stackoverflow.com/questions/30689391/…
 
user559633
That's a cool question.
 
This looks pretty cool ^
 
user559633
8:24 AM
what does a "level 11" look like?
 
Cabbage!
Some people on SO are just weird.
 
Hence Cabbage?
 
Not cabbage-weird but weird-weird
 
user559633
I think some of us in this room are "weird weird" :)
 
8:29 AM
Hides the Ada costume
 
user559633
sweeps hand-written poke fanfiction into desk drawer
 
hides poke costume
 
Person posts an answer in which they detail some comparison between things. I comment that while the comparison is correct, it’s completely irrelevant to the question. Person comments that they agree with me and “have the same opinion”, and edits the answer to add a line “The comparison is not applicable here”…
 
I never found anyone to wear it, anyway
 
@tristan Now I’m curious.
 
user559633
8:31 AM
Okay, but it's in a really rough draft so don't judge too much, okay?
 
user559633
I didn't plan on having it ready until PokeCon
 
morning cabbage
 
8:48 AM
I'm sure it's useful somehow, but the fact that calling map on a list doesn't give me back a list is annoying :)
Maybe it's lazy or something
 
9:01 AM
Can someone tell me what's wrong with this little piece of code and why it produces an error ? (The same code works well if it's just a function and not a class).
http://dpaste.com/0N9EQRB
Once I put it inside a class, it returns the error : NameError : is_exec not defined. Ditto for app_path2 as well.
 
You're doing is_exec(self) which is the wrong way to use it internally.
You should use self.is_exec()
 
@RobertGrant In Python 3, map is a generator :)
 
@Ffisegyd : Thanks, that worked. Another question : Is there a way to call a method of a class without instantiating it into an object ? In the above case, any way to call CurrPathMe2.app_path2() without instantiating to a ?
 
Yes. You can add @classmethod above the method definition to make it a class method.
This is known as decorating
 
....some sort of redecorating joke
 
9:10 AM
cbg
 
Thank you Ffisegydd... @Robert: Is this about the class method, why is it a joke ?
Ffisegydd, that worked..
 
Because decorating is a concept outside of computing as well
 
oh ok. Thanks guys.. as always, SO is lovely.. rhubarb...
 
Bit of a head scratcher
So, I have a venv. Want to run nosetests on some code, but I need to escalate privileges to give access to the RPi hardware.
I could just add nosetests to my global python install, but that feels like cheating
Any thoughts?
Plz help the needful?
 
9:29 AM
Bit of a naive question(since I am a newbie in python). I have a file 'main.py' that has a function 'add'(returns the sum of two nos passed as arguments) and an input file('ip.txt'). Is there any way in python(for WINDOWS) that I can create a separate process for each set of args read from 'ip.txt' and pass them to the function? Can I attach a separate console to each of the processes?
Plz help the needful?
 
9:44 AM
Ah, figured it out
@rahuljain1313 I realise I may regret asking this, but why would you do such a thing?
 
I assume the real function does something else
 
9:59 AM
@IntrepidBrit how did you do it?
 
My computer just made a sound and I have no idea what it was :(
 
It's a box that holds electronics that do calculations
 
Well, I went prodding around in the virtual environment directory, thinking that I would HAVE to find nosetests somewhere in there. And Lo! There it was, in my bin folder. Just ran sudo venv/bin/nosetests-3.4 test-directory
 
Ah okay
 
It was a pressure wave, picked up by sensitive components of your ear
Here to help
 
10:03 AM
@RobertGrant It's kind of obvious when you think about it. Y'see, this is a problem with the Google Era. Offloading my critical thinking to the computers already :(
 
You're just parallel processing, @IntrepidBrit. Then taie best-of-N results
 
But I'm so tired, I'm probably operating at O(2^N)
 
The very best time to set multiple ppotential solutions off and see which returns first.
 
Makes sense in theory, but there's still a single bottlenecked device, and that's the notoriously failable liveware interface
 
Can someone please hack the world and make python 3 search results appear first
I'm pretty adept at changing that 2 to a 3 in the address bar, but still
 
10:16 AM
I feel like it should be a cookie setting
Wow, just wow Intrepid. Go back to bed
 
10:34 AM
@IntrepidBrit It is a part of my project as an intern :P
 
@rahuljain1313 you're saying that's the way they're forcing you to do it?
 
The thing is as a part of my application, this function needs to be continuously running in the background for multiple clients and independent of the invoking process. So i guess threads are ruled out
 
Yeah, fair enough. Someone smarter may be along to assist, but I'd also try solving it yourself as they might want you to do stuff like this without asking for help
 
If it's running on Windows, wouldn't you be better off creating something like a Windows Service anyhow?
 
Nop, i have been asked to do this in python.
Since most of the automation is done in python. This maybe the reason
 
10:46 AM
Well, I recommend using a thread pool and to go from there
 
@Jon/@davidism got sent an email offering us "40 hours of free web dev services" by some company. I've forwarded it onto you for your amusement.
 
user559633
@rahuljain1313 How about Celery?
 
@Ffisegydd I was wondering why I got that one twice
 
Ah I didn't realise it had been sent to you also.
I've removed us from their email list anyway (for what it's worth).
 
10:56 AM
@tristan no external GUI tools like Squish,Celery,tKinter etc..
 
awww... why? Always nice to get emails... shows someone cares etc.... :p
 
user559633
@rahuljain1313 Okay, is this work or homework?
 
Smells like homework
 
work :P
 
user559633
because threads/processes/greenlets
 
10:58 AM
I m still searching
 
user559633
but you said no threads. so that means forking or talking to a queue.
 
yes
but we have different forking mechanisms for windows
 
user559633
okay, so then if it has to break out of the process per your homework's requirements, i guess you have your answer then
 
11:53 AM
One question please : If a module has only one class, should I name the file in lowercase (like module style convention) or the CapWords (like in class style convention) ? Such as this : dpaste.com/3RCFD5N
 
I'd always go for lowercase for the file/module name
 
oaky, wonder, thanks
 
Filenames should always be lowercase.
 
underscores allowed ? because the MixedCase name of the class, say, CurrPathMe, looks okay, but in lower case, curr_path_me is more clear ?
 
> Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
 
11:58 AM
My IDE just crashed with a quote "catastrophic failure" unquote. I feel strangely proud.
3
 
I once did a personality assessment that had the same outcome
 
Sounds like one of them "just uttering one syllable of my true name would liquify your primitive brain" deals
 
No, it was my personality type
 
"underscores can be used if it improves readability... and then they are also discouraged. "At their diplomatic best. Thank you, wonderbolt, guess will go with lowercase for now.
 
Just uttering one syllable of my personality type... No, it doesn't have the same pop.
You are a QNTJ! You do not have clearance to know what the Q stands for.
 
12:01 PM
:)
 
@WhirlMind packages != modules
42
Q: Module vs. Package?

Dark TemplarWhenever I do from 'x' import 'y' I was wondering which one is considered the 'module' and which is the 'package', and why it isn't the other way around?

 
morning everyone
the album I bought came with a comic book about the album
 
"[function name] is not supported by the language". That's a new one.
 
@Kevin What kind of f***ed up IDE are you using? Eclipse?
 
Visual Studio. (I'm working on C# stuff)
 
12:06 PM
@wonderb0lt : in my case, it's clearly a module. I ain't into packages business yet. It's a simple script.
 
@Kevin Which function name?
 
@WhirlMind Alright. I just wanted to clear up that above quote discourages the use of underscores in packages, but not in modules.
 
On another note : Is there a naming convention for aliases of imported modules ? When I say import bigmodulenamehere as bmnh, can I use BMNH instead ?
 
@poke It has since disappeared but IIRC it was getSearchResults
 
What is the most efficient way of populating a 2dimensional array from an array of objects with two arrays? I can't seem to find a way that's less than O(N^2)
 
12:08 PM
@Kevin Oh, so it was a custom method? Weird.
 
Yeah, it wasn't a built-in func or anything
Just something my coworker wrote many moons ago.
 
@WhirlMind That's up to you really. I would use that sparingly. Is BMNH something every new coder immediately knows what it means?
 
@corvid So input is like [obj1(arrA, arrB), obj2(arrC, arrD), obj3(arrE, arrF)]?
 
@wonderb0lt : No. But it's only an alias, no ? Aliases are meant to be quick crypties ? I saw some code that said import xml.ElementTree as ET. so I got the question.
 
Ah, it's back. It's GetSearchResults with a big G. Maybe PascalCase is no longer valid style in VS 2013...?
 
12:11 PM
@poke yeah, but there's also an ID. I want to use arrA and arrB to decide where in the array the objects are put, and then put the id there
 
@WhirlMind If I'm working with XML I'd know what ET is
 
@corvid Can you give an example? Then I’ll tell you whether you can do it better :/
 
@WhirlMind (as someone who's worked with python before)
 
No, more likely it's because it returns a SearchResultBlob class instance, which for some reason isn't visible in this project even though it's fairly straightforwardly defined in the other project which I link to this project.
 
Do you work with different .NET versions?
 
12:12 PM
@WhirlMind Also, in those examples the ET is usually only used once to parse the XML :P
 
if the other projects targets an older version, that might cause the problem
 
@wonderb0lt doesn't it phone home?
 
Maybe. This whole SNAFU started when our office migrated from VS 2010 to VS 2013.
 
sure lemme make a gist real quick
 
okay, @wonderb0lt, understood. Thanks.
 
12:13 PM
@Kevin But the VS version shouldn’t cause this :/ Odd.
 
@WhirlMind :)
 
Even so, it's worth investigating... I'll check the project targets. Thanks for the lead.
 
rhubarb everyone..SO is sweet.
 
rbrb
Another happy customer!
 
12:21 PM
So you have one array with the days that contains arrays of times which contains arrays of ids
 
yeah, pretty much. If it's easier to visualize what's actually happening, it's filling up a card with little wells, so I figure two dimensional arrays are probably the best representation
 
Well, if you iterate over the original array, you can argue that the list of days and times has a constant upper boundary, so it would be still linear
 
The way I am doing it now is really bad. I just go to a spot in the array then do find all in the original data that have that time and that day. That's probably O(N^2), isn't it?
 
var result = [
  [ [], [], [] ], // Sunday
  [ [], [], [] ], // Monday
  [ [], [], [] ], // Tuesday
  [ [], [], [] ], // Wednesday
  [ [], [], [] ], // Thursday
  [ [], [], [] ], // Friday
  [ [], [], [] ] ]; // Saturday

for (let item of data) {
  for (let day of item.days) {
    for (let time of item.times) {
      result[day][time].push(item.id);
    }
  }
}
console.log(result);
 
oh derp... that seems like a way more obvious way to do it
 
12:32 PM
That looks like O(n^3) because of those three loops but it isn’t because you could unroll the inner two loops as they have a constant upper boundary.
So in the end, you only iterate once over the data, which makes it O(n)
 
I wish JS (well, node) had some kind of very simple timeit function to test the best option
 
"Windows explorer has stopped working". I am on a roll today!
 
windows explorer crashes a lot, it's frustrating
 
@Kevin You’re getting them all today, huh?
Don’t remember the last time my windows explorer crashed.
 
12:37 PM
Yeah same; been too long to remember
 
Just like blue screens
And those rare times I did get a blue screen in the past few years, there was some serious hardware issue.
 
Yeah blue screen probably equals memory failing these days
 
btw, thanks for the help poke
 
Sure :)
 
@corvid what version of windows do you have?
 
12:40 PM
@RobertGrant don't use windows any more, after my company paid for a macbook
 
I mean when you experienced Explorer crashing a lot
(Protip: don't use the OSX keychain)
 
I was using windows 8, the problem went away on windows 10 though
 
Fair enough
Or something was no longer installed
 
I'd have thought introducing Windows as a solution to anything was a problem...
 
I dunno, my windows computers tend to only have steam games and firefox. Can't stand programming on windows, especially python
 
12:45 PM
It wiped the "Randomly crash Explorer to convince your boss to get you a Mac" program
 
Last time I checked, the OS's used by most visitors to sopython were linux and mac
 
IIRC, python organization said one problem they were trying to fix was that python tends to be more difficult to use with windows
 
Many flavors of linux come with Python pre-installed, yeah? It's hard to have a more user-friendly installation process than "It's already there"
 
@Kevin I think mac has it pre-installed as well
 
@Kevin The only problem is it's usually version 2.7.1
 
12:49 PM
As long as it's not 2.6.
 
a lot of linux distros now have 3.3 as standard
 
@JonClements I thought they were all 2.x unless they're Ubuntu or a derivative (in which case they're transitioning). Which others have it?
 
I think ubuntu moved to 3.4, no?
 
umm... my default is 2.7.6 it appears
but all the venv's are 3.4
 
Maybe you symlinked to a 3.4 virtualenv
 
12:52 PM
I think they usually come with an executable python3 by default too
 
@corvid certain things can't be installed because they compile code during their install process (I think the postgres driver is one), or they use OS-level stuff directly, but most stuff is okay
 
@RobertGrant Arch has defaulted to the latest version of 3 for some time. Typing python gets me the latest 3.4, and it will upgrade to 3.5 soon.
I'm pretty sure Fedora also uses 3.
 
Oh, fair enough. Didn't know that.
That's very cool, in fact
 
After a few expletives - note to self - don't sit cross legged for an extended period of time, then try to get up and go to the loo.... it appears you hit the floor fairly hard after a leg won't take any weight
 
Isn't one of the biggest appeals of Arch that it tends to be bleeding edge software?
 
1:01 PM
@corvid just like other distros, each package is tested before release, it's just that they don't wait 6 months to release them
So it's "bleeding edge", but it's not unstable.
I'm pretty sure Debian and Ubuntu are switching to the rolling release model at some point.
 
Was originally a "Slack" user, then after a bit switched to Debian, then to Ubuntu
oh - think there was some suse inbetween
 
Mac OS X is best. Most of the good parts of windows and linux
 
I concur.
 
@corvid there's good parts of windows? Where - one needs to know this...
cbg @Ahmad
 
spends most of his time in BeOS these days
It's the future, kids.
 
1:06 PM
You're coming out with some classics today @jon :)
 
Try new Kev OS, coming summer 2030
 
@Robert I just smashed my head on the office floor - expect some more "classics" :p
 
Ah that explains it :)
Your last memory is clearly of using Windows Millennium Edition
 
@JonClements BIMEO GAEMPS!
 
@RobertGrant used to have to use "Windows 3.11 for networking" or whatever it was called along side OS2 systems
 
Tor
1:10 PM
Whoa, forgot about OS/2
 
suddenly has that Eminem bit from "Forgot about Dre" going round and round in his head
 
I am facing problem in converting "Opportunity" to "Quotation" using xmlrpc webservice call
For that i am using Model: crm.make.sale and method as: makeOrder
 
ok...
 
Below are my inputs fro webservice call:
(
Database name,
1,
Password,
crm.make.sale,
makeOrder,
{
id = 21;
"partner_id" = 12;
}
)
In response of webservice i am getting below error:
invalid input syntax for integer: "partner_id"
LINE 2: ... WHERE "crm_make_sale".id IN ('partner_i...
Basically i am developing application for ODOO users in iOS platform.
 
And what language is this? I'm not familiar with this "partner_id" = 12; syntax.
You usually aren't allowed to assign to a string literal in Python
 
The punctuation in that post upsets me.
 
@Kevin you can imagine how I feel right now then :-)
 
Ah, ellipsis. For those with the brain of a marketing executive
 
those aren't even ellipses, they're two dots and a question mark
 
Who has time to type a third period?
(inb4 "if he's so strapped for time, why did he write the first two periods at all?")
 
1:36 PM
Pros patch their keyboard driver so it inserts an ellipsis whenever they stop typing for just the right amount of time. Like … so.
 
So convenient.
 
1:50 PM
@JonClements cabbage! :)
and congrats on the diamond!
 
cbg and melon
 
Tor
@ZeroPiraeus Nowadays everybodywannatalk like they got somethingtodo
but nothing comes out of they fingertips ... and everybody act like they forgot OS/2
 
@ZeroPiraeus That would explain the email I get from one of my clients.
 
Only brooding antiheroes should be allowed to use ellipses.
 
And William Shatner.
 
1:57 PM
Looks like you've just been... Terminated. walks away from exploding warehouse without looking back
 

« first day (1706 days earlier)      last day (3241 days later) »