« first day (1660 days earlier)      last day (3274 days later) » 
00:00 - 19:0019:00 - 23:00

12:02 AM
i guess so
 
 
1 hour later…
1:31 AM
>>> edit: Forgot to mention I know python and java, but not html.
wtf
 
 
1 hour later…
2:57 AM
@ZeroPiraeus 11 score within the bounty period
so utterly useless
 
 
1 hour later…
4:41 AM
why oh why
I read 20 topmost questions
and all of them were utterly awful :D
 
cause its Sunday, so all the questions are homework ones?
 
0
Q: Very Basic SymPy Error

Nate Cook3I'm trying to learn SymPy. I've written the following and its throwing an error. I haven't even gotten to anything complicated... from sympy.solvers import solve from sympy import Symbol string = "10x+4=7" #equation = raw_input("Enter an equation") left, right = string.split('=') string = left...

typo if any
I guess if you'd read a tutorial you'd notice that...
 
4:56 AM
It will fail, -1 returned from PyList_Size means that an exception was thrown and you must handle it orderly. — Antti Haapala 50 secs ago
 
 
1 hour later…
6:12 AM
Cabbage
 
6:31 AM
Cabbage
 
-1
Q: python http requests; browser not detected

MortezaLSCI want to login to my account with the following structure: import requests session=requests.Session() resp=session.get('https://mywebsite.com/login') cont=resp.content post_data={'user':'username', 'pass':'password'} post_response=session.post(url='https://mywebsite.com/login', data=post_data} ...

grr :d
 
7:29 AM
0
Q: using joblib: ValueError: too many values to unpack

gladys0313I am using joblib parallel to run codes on several cores. The thing is that when I try to run NN50_cell = Parallel(n_jobs=10)(delayed(find_cell)(coord, area_transfer) for coord in coords_pool) it works well, and I get a list NN50_cell which contains 10816 elements However, when I try to run ...

"i just copied this code and it doesn't work"
 
Hey up
 
1
Q: How to implement a counter for each element of a python list?

James WilsonI've got a way that works, but I think there might be a better way. I want to have a list with a method expand() which chooses a random element from the list, but every time that element is chosen, a counter is incremented. I tried subclassing str to be able to add attributes but it didn't work. ...

stupid me, edit and approve the incoming edit :d
 
 
1 hour later…
8:56 AM
bwaa stupid HTMLParser
I need to get the line on which an attribute was specified
 
lol
stupid stupid stupid HTMLParser
 
@vaultah \o/ Github has a block user feature.
 
@MartijnPieters know any html parser that would give out linenumbers for attributes :D
 
9:15 AM
Mornin'
 
total headache, guess I need to fork the Python html parser
or
sth
hmhm
 
lulz
 
Will see if GH's report abuse feature is any good c:
 
9:30 AM
@AnttiHaapala: nope, sorry.
 
@Intrepid you in the office again?
 
Yep
How can you tell? ;)
Damnit! UKIP are running for a seat in my constituency
 
@Intrepid ta. Yeah UKIP are running in mine too. Still not sure on who to vote.
Apparently Bath is now a marginal seat, rather than a safe lid-dem seat.
 
Hopefully this'll help :)
Every Lib-Dem seat is a marginal seat
 
Hah :P
If it's a marginal seat, makes it more tempted to just spoil my ballet :P
 
9:52 AM
o0
That don't make no sense
 
It makes all of the sense. I don't particularly like any political party, so spoiling my ballot in a marginal seat is an extra "F*ck you, buddy!"
 
haha
Fair enough
What about the candidates themselves?
 
I want the Lib Dem and Conservative nominees pawing over my ballot at 3am to check it's not really for them, when all it will say is "CABBAGE!" scrawled across it.
I don't agree with voting for the candidate. The candidate's parties can do a lot more damage than the candidates themselves. Plus there's every possibility that I could be moving from here within a few months.
As such, I'd rather vote for the party than the local seat as I may be more affected by the party.
 
I think that is a fair point. It'd be rubbish if you had the deciding vote and then was like: "see-ya!"
I demand that you spoil your ballot with CABBAGE
 
If I knew I'd be staying here for the next 5 years I'd definitely consider the candidates themselves more.
 
10:02 AM
I was going to go raj bananas at you, but you made a valid point.
 
:D
Come at me, brah.
And, to be perfectly honest, I prefer thinking about parties than candidates :P (feel free to tell me why I'm wrong)
 
I don't think I need to, but ultimately in the G.E you don't elect the party, you elect a someone to represent you. The fact that people only look at the parties explain why so many raging wankers have gotten in power over the years.
 
But the parties have a whip, surely? And so the candidates will vote the party line (unless it's a matter of conscience OR they're a rebel without a cause)
So it always struck me as naive to say "I will vote for Bob because he's a good egg, he's lovely, and will take care of the constituency. Oh btw he's UKIP and believes in white supremacy."
 
Oh most certainly, but the whip is far, far, far from infalliable. If that was the case, there would be no need for the Tories to appease their party by threatening a EU in/out referendum
The party affiliation should form a part of who your candidate is, it's not completely ignored and back-bench rebellion happens all the time
 
I suppose the whip only has real power if the rebel is on the front bench.
 
10:09 AM
Yep
 
As they can be sacked from cabinet position.
 
And you'll tend to find that people will toe the party line if they're generally indifferent
The MP Recall Bill is an example of "things working as they should"
All the parties went all over the place
 
I am doing this often, but I would like to get your opinion. What do you guys feel about the last edit which I made here?
I got to know the actual problem from the OP in comments and I included that in the question. Is that okay?
 
I'm probably not the right person to answer - but as long as the OP doesn't throw a shit-fit, I can't see why it wouldn't be okay
 
When I did that here, one guy felt that I changed the meaning of the question.
 
10:16 AM
If the OP has given the info then there's no harm in doing it.
 
Cool, thanks guys :-)
 
Just never make assumptions about what the OP is doing.
 
Best top answer ever: "what the actual fuck"?
 
Yup, I confirm what the actual intention is, from the comments.
 
TypeError: AST identifier must be of type str
stupid ast :d
it is not of type str, just the subclass, but no.
this is ridiculous
I got bronze in C++
@MartijnPieters I got it done... no forking necessary, it is ugly though
it basically uses the HTMLParser.get_start_tag(), and reruns the attrfinding regex on it
 
10:48 AM
Hello
I wanna ask regarding one of the details about the single source shortest paths algorithm.
Let's imagine I have A->B->C, how does A know that it can go to C through B?
 
Can I ask one favor, thefourtheye? — user3573552 7 mins ago
Hmmm, I got a bad feeling...
 
I think it's an interesting election, because I totally agree with Intrepid, but with it so marginal I've more reservations about voting "locally" or on a handful of issues. Seems like each vote is more important than ever in securing a majority.

Also UKIP nearly ~ 2*LD in opinion polls, which crazy, interesting, and I hope they can use it to become more serious after this GE - some of them actually seem pretty switched on, and speak well. Would love to see them lose the more extreme (read racist) and become a serious "3rd/4th party" contender.
@AhmedAl-haddad Which algorithm? Dijkstra's? Generally - you compute B distance to C first, then A distance to C is A->B + D(B).
 
11:04 AM
It is dijkstra. Do you mean A->B+C(B)?
:23061553
 
@AhmedAl-haddad Well, it doesn't matter what you call the function. Sure, C(B).
 
@OllieFord I'm not a fan of UKIP, with or without the racist elements. They're just too far right wing on the economic scale for me to be comfortable with. They basically would want to turn us into a mini-USA. That being said, these conversations do need to happen, even if it's just to confirm that we were right when we made decision X a while ago
 
hi
4
Q: Multikey Multivalue Non Deterministic python dictionary

stackitThere is already a multi key dict in python and also a multivalued dict. I needed a python dictionary which is both example: d['red','blue','green']= "baloon" or "car" or "toy" (probabilistically select any one) Probability of d['red']==d['green'] is high and Probability of d['red']!=d['red...

are there any rule based data structures other then dict in python?
like a probabilistic decision tree?
 
@OllieFord Oh alright. So to recap; if we have A->B->C->D->F, thne our distance will be A=A[0]+B[A]+C[B]+D[C]+F[D] right? But then how will F know that there's a connection between it and A in the first place in the abstract level?
 
11:20 AM
1
A: Multikey Multivalue Non Deterministic python dictionary

Andy Hayden the single output value should be probabilistically determined (fuzzy) based on a rule from keys eg:in above case rule could be if keys have both "red" and "blue" then return "baloon" 80% of time if only blue then return "toy" 15% of time else "car" 5% of time. Bare in mind your case analysi...

100 bounty on above question
 
Not quite. Start at the "sink" or "end" node, it has S(F)=0. Then move back to each of it's neighbours in turn (only D in this case): S(D)= |D->F| + S(F)

Keep moving back a stage, at each one you're splitting the problem into 'here to there' and 'shortest from there to end'.

I recommend looking at an example in a tutorial, or Khan Academy / MIT OCW or something - -it's kind of contrived if there's only one path A->B->C like this.
@IntrepidBrit I would never want a majority for sure, just that it seems LD have slipped left, and Cons have diversified (both directions). I'd just like to see a not-insignificant party on both sides keeping the majority in check.
 
LD were always left, just a different kind of left from Labour. They've become the only party that seriously pursues political reform in the UK other than "token" reform. (Police commissioners anyone?)
Mind you, they had their hand in that too
 
11:39 AM
dawedar]
 
class.coursera.org/algo/lecture/57 I actually watched and the following video around two timese but idk why I am still not getting it T_T
Oh wait, start from the end!?!?! That's new to me, but how do I reach for A or the source then?
 
11:59 AM
I doubt that I can explain better than that video, but simply by working backwards. If you have nodes in stages 1, 2, 3 where all directed edges move in the direction of increasing stage, then the shortest path from nodes in 3 to the end is the weight of the single edge that takes them there.

Shortest path from nodes in 2 to the end is the minimum of paths that go into 3, plus the shortest from that node in 3 to the end.

Do that agin from 1, and then find the minimum of A->node in 1 + shortest to end from that node. That's your shortest path.
 
this is what you get when you use a templating language written by a Python 3 hater ;) </troll>
 
@OllieFord I am trying really hard to visualize this, but maybe I will take a bit of rest and come back again to it :/ thanks a lot
The thing is that I actually already found solutions to my problem, and I mean ready made codes but I wanna learn and write my own code :< but my intention alone does not seem very helpful atm :'(
 
12:29 PM
lol
basically jinja2 can crash a system on Python 3 on big endian environment :P
 
12:47 PM
hm
 
1:03 PM
any body suggest a good book for django..
 
The tutorial, followed by the DjangoBook
It's out of date, but some of it is still good for understanding more of what's going on
 
1:20 PM
How should be the approach while learning django
 
No one can answer that. Depends entirely on how you work.
 
Hello.
 
i'm want to learn gui programming in python and i really like tkinter because i feel it's great for starters but i'm bothered that it dosen
 
@danidee Have you seen PyQt ?
 
dosen't have a table widget i searched google about it and i found tkintertable, i really don't know how effective it is
 
1:32 PM
My favorite platform for building GUI with python..
 
@l0oky yes i have but i also found out that PyQt is not free for commercial applications but there is a cross compatible alternative Pyside, but i can't seem to find a book or video tutorial online that teaches Pyside gui programming
except the docs, which to me looks long and boring...i only use the docs of any software for references, i've never learnt any new technology using the documentation....is this bad? i'm just so used to videos and books
 
cabbage everybody
 
2
A: Formatting an exception in python to include all but the last 'n' traceback frames

vaultahStarting from Python 3.5, functions from the traceback module support negative limits (the original proposal was inspired by your question and approved by Guido): import traceback n = 2 try: a() except: traceback.print_exc(limit=-n) # `n` last traceback entries outputs Traceback (mo...

The patch based on my patch got accepted C:
This is my first (big) contribution to CPython
 
@l0oky it looks nice because it contains many "how to" examples, i guess i don't like documentations that just talk about a bunch of API's
 
1:46 PM
@danidee To be honest I do not know much about PySide either.. Your best bet would be to ask a specific question.
 
cbg
@vaultah Congratulations !!!!
 
Thanks :p
 
Add a comment to the OP stating the changes made
 
Python 3.5 isn't stable yet (current version is 3.5.0 alpha 4), I'll wait until it's stable...
 
That ques did not receive a lot of attention
Your bad
 
2:10 PM
ok, thanks for the ebook link, also do you guys know of any indepth link or book that shows how to use qtdesigner, basically i can just create buttons and textviews based on my existing knowlege on visual basic, but it has so many widgets that look overwhelming
 
@vaultah Nice dude.
@Ajay please don't EVER link to a website like that again. People can buy books, like everyone else, not illegally download them.
 
does class example(): and class example(object) the same thing in python
 
@Ffisegydd thanks mate :)
@danidee in Python 3, yes.
 
whoops
Closed the tab
 
;_;
 
2:17 PM
Do you think it is a good idea to read a code in C++ and then try to implement it in Python given not much experience in C++?
 
No.
 
@Ffisegydd Thank you :)
 
Finally found an alternative to Ninja's beautiful answer
Took 1 hr
:(
 
Ah. Charming
 
Uff. I can now go and rest
Aha @MartijnPieters What an entry
:D
Was discussing your answer
 
2:25 PM
:-P
 
how come your question received negative votes :/?
 
@AhmedAl-haddad 1. It is a bad question 2. It is not any of ours :D
 
@AhmedAl-haddad what question?
The one Bhargav and I answered? That question showed no effort of their own.
 
@Martijn Can ya think of a way using map and filter there, without using lambda
 
@BhargavRao But you are lucky you know, you spent one hour but I have been trying to understand dijkstra for a few days now :/
 
2:28 PM
:D
 
@Martijn I've had to disable Issues on all sopython projects due to the Issues being opened by you-know-who :/
 
ah, no, as we are producing a tuple.
 
We need more people reporting this.
 
so, no, not without a lambda.
 
lambda makes it twice slow :(
 
2:30 PM
reporting what?
 
I'm firing an issue to GH to see what can be done.
 
Same
 
already reported the user.
I don't get any notifications for the things that loon is doing anyway.
Doesn't even realise the messages they found are from months back.
 
shakes head
So, back to our lives?
When're we releasing CabbageOS?
 
I have made a python script that uses requests to do http stuff. I works. But when I make an executable of my script using py2exe to distribute the application to another computer and try to run It on other computer requests returns error 10061 even when requesting google.com Any clues what may be the problem here?
 
2:36 PM
Would smell like an OS level error to me. Are you on a proxy or have any other network shenanigans going on?
 
Not that I know of..
It's a computer on my network.. the same network I used my laptop to make this script.
The executable worked great on my laptop..
 
Can you run the script fine on the remote machine? Directly from source, not from the .exe
 
Remote machine doesn't have python.. I would need to bother and install python on that machine. I wouldn't want to distribute my app like that.
 
MAybe you can try to burn your app on a cd and see if it works there
 
Yes. But since you're planning to deploy your code, you should also test the deployment process in stages?
 
2:41 PM
Can you elaborate your question?
 
Basically. Sure, I get that you don't want to deploy your code by requiring them to install python on all machines.
 
Is it a big deal?
I think so.
 
But you want to test your code? So you should try to see if the problem occurs just because you're running from somewhere else on the network, or a different machine's configuration. If it has similar problems, then it's nothing to do with the py2exe process
Keep stepping through and try to isolate the source of the problem.
 
I am guessing py2exe missed something..
because the .exe works on my laptop ( the requests thing ) and It doesnt on another machine
 
Why don't you find out for sure? Rather than trying to fix a bug that may, or may not, be there
 
2:44 PM
My laptop has python the remote doesnt
Maybe that has something to do with it :/
 
Possibly. Why don't you isolate something and find out for sure?
 
Btw if I extract a portion of a python code and ask about a part that I don't understand its meaning here, is it allowed?
 
I don't want to distribute my application with user having to install python. Not practical for my case.
 
... I give up.
@AhmedAl-haddad Depends on what you're asking. But I would recommend sticking it in a pastebin (or similar) if the code is more than a few lines
 
Can't I just stuff python into exe and run it off there
 
2:47 PM
Well, clearly not because something is going wrong?
 
@AhmedAl-haddad gist.github.com
 
So try to find out if it's py2exe that's causing the problem, or something else
And I suspect it's because the connection is being refused at the remote machine
But that's a guess
 
Exactly.. a guess. Request at google.com returns 10061.. I turn up my browser go to google it works..
10061 Is a No connection because it is actively refused ...
 
Well, since I have not looked at your source code that's all I can do? And I'm not particularly inclined to do so now
 
Oh, actually I don't really know what this gist thing is, what should I do with it?
 
2:51 PM
The stuff is pretty simple.. the only code that may be interesting is py2exe setup.py
@AhmedAl-haddad It's better then pastebin :D
 
@l0oky What's pastebin?
 
It's place where you can paste code. Instead of clogging up the chat window
 
A website where you paste your text and it is stored there with a link to it. :D
I preffer gist for that stuff .. :D
 
Oh, thanks a lot
 
why am I getting so many emails from SOPython?
 
2:56 PM
When I want to use heaps with dijkstra, does that mean that I need to extract the neighbor nodes to a list before using the heap to extract the min value?
 
Corvid - Someone keeps posting issues. Fizzy has disabled issues for the time being
 
what's his deal?
 
@corvid same thing here. I woke up, looked at my phone, and thought to myself "I have 36 emails. What did I do to piss off the internet?"
 
looks like someone is irrationally angry at a repository of python code...
 
2:58 PM
I'm going to have to leave the office in a minute
But it's someone that the Python chat room has had problems with in the past. Before my time shrugs
 
If you read the first couple issues it looks like he's a self-important troll who goes looking for something to rage about
 
I wonder how many outdated answers do I have... Just (accidentally) noticed the change in os.walk stackoverflow.com/a/22386629/2301450
Guys, did you know you can edit titles of GH issues? xD
 
I did, but it's not worth the effort, he'll just make new ones. Ignore him.
 
there's a python 3.5+ now?
 
3:47 PM
@AhmedAl-haddad I'm pretty sure we've already linked the rules to you, please follow them. sopython.com/chatroom
 
Oh my bad, I saw some guys doing it and forgot it's against the rules. Thanks :D
@vaultah Thank you sir
 
@AhmedAl-haddad I don't think anyone did this recently
 
And if they did, it might have been a question older than 24 hours (which is okay)
 
@vaultah You are right, the questions are not by the ones whom asked the questions, but there's a 2 month old question and another that was solved by one the members here. That's why I got confused :) It happened within the last two hours
 
3:58 PM
In [19]: nums
Out[19]: [1, 8, 2, 23, 7, -4, 18, 23, 42, 37, 2, 100, 5]
In [21]: heapq.heapify(nums)

In [22]: nums
Out[22]: [-4, 2, 1, 23, 7, 2, 18, 23, 42, 37, 8, 100, 5]
heapify should sort the numbers ...I guess these are sorted as per binary tree
the parent being the least num
is there a module which shows these trees or should do it from scratch..
 
?
Are you asking me? If I know how to do them then it is good because that means I understand exactly all the bits of my program, otherwsie I understand heaps
But I didn't know how to link heaps with dicts
@Ajay btw, what is this in/out?
 
it's ipython shell
 
Oh
like Windows PowerShell
 
Is there any visual representation for these data structures?
I need a module .I've already checked visual algo(site)
 
4:05 PM
Oh, you can draw them from the dictionary
 
@AhmedAl-haddad if you obviously don't understand what's going on, it might be better to stay out of the conversation. IPython is not like PowerShell, and he wasn't asking you in particular.
 
@davidism Thanks for clarifying, I thought he was talking to me!
 
i would have used @AhmedAl-haddad if it were to you
 
@Ajay did you get my message earlier? I want to reiterate strongly that posting links to websites where you can download illegal content is beyond inappropriate for chat, please don't ever do that again.
 
yea buddy got it
 
4:29 PM
Hey
 
Yo
 
I'm wondering about distribution of package: I just uploaded a package on PyPi and it's not available through pip, is it normal?
 
cabbage
why this salad languagge and whose idea was it?
 
letuce
 
4:32 PM
Jon Clements and Inbar Rose
 
@AlexisBenoist link?
 
I'm a gr33n b3@n
 
vaultah@base:~/cpython$ sudo pip install ERAlechemy
[sudo] password for vaultah:
Downloading/unpacking ERAlechemy
  Downloading ERAlechemy-0.0.4-py2-none-any.whl
Typo?
 
where is it?
 
4:33 PM
note that you've spelled "alchemy" wrong
 
oh :)
 
ERAlechemy has an extra e, which at first I thought was a clever way to say that the package had something to do with beer.
 
I prefer Alechemy. Makes me think of alchemy and ale.
 
I'd leave it :p
 
Really
It was a reference to SQLAlchemy
(It's always like the worst errors to find)
 
4:35 PM
I'd change it to Alchemy if you want it to be a serious package :P
 
I just did it :)
 
hi @MarkusUnterwaditzer
 
5:26 PM
@MartijnPieters see trello, there's a new entry
 
cbg all
 
cbg @JGreenwell :)
 
cbg ^
 
so weird not having homework or work on a Sunday....throwing me off my game
 
@JGreenwell got loads of work here if you wanna do it and not get paid? :p
 
5:43 PM
sorry, done my fair share of internships ;P
 
oh darn it - you would have gotten a free takeaway from it at least :)
 
5:59 PM
cbg
My answer has a terrible flaw here stackoverflow.com/a/30015295/4099593, However if I change it, it will be same as the other
So shall I delete it?
?
@vaultah Why did you delete your answer?
It was perfect
 
It wasn't good enough and I didn't feel like improving it :)
 
Why?
What was wrong in that?
 
There was no explanation, plus the question is effectively "gimme the codes" (and isn't a question actually)
 
Argh!! You wasted my vote then :(
 
Feel free to copy my answer, I'll upvote it ;)
 
6:15 PM
Lol! :D
 
This answer is/was licensed under CC0 :P
 
CC2C - A film in Bollywood!
 
cabbage
 
cbg Ajay
 
Cabbage
 
6:20 PM
list is hashable and dict is not why?
 
Errr? list is not hashable
 
list isn't hashable
 
i said the reverse
8
Q: what do you mean by hashable in python

user1755071I tried searching internet but could not find the meaning of hashable. When they say objects are hashable or hashable objects what does it mean

sorry i got it
 
6:33 PM
rbrb
dinner time
:)
 
Lol. Saw @BhargavRao dinner time comment and about freaked out at seeing it was 1930
Then I remembered I set this VM to London time cause the last time I used it, I was working for a London contractor
 
6:56 PM
just brilliant ;)
 
00:00 - 19:0019:00 - 23:00

« first day (1660 days earlier)      last day (3274 days later) »