« first day (1473 days earlier)      last day (3478 days later) » 

1:15 AM
@davidism Would "Essential SQLAlchemy" be a good book to pick up? It was published way back in 2008.
 
probably outdated at this point, a lot has changed, especially in this final stretch towards 1.0
I think the low and high level tutorials in the documentation do a fair job of introducing everything.
That documentation is some of the most detailed I've come across.
 
No arguments there. The docs are excellent, but I look for books for showing me the "good parts" if you know what I mean :P
Most of the time, in SA, I don't even use the ORM. So, I'd like to know more about it.
 
Yeah, I can't really say because I haven't read it, but 6 years is a long time in sqlalchemy land.
 
Hell yea, looked at your code. Your mixins are pretty cool. Thats what got me interested in finally taking a look at the ORM.
However, I find that the ORM is a little incomplete. I mean with a m2m relationship, you have to create the secondary table yourself, is there any way to get SA to do this for you?
 
You should definitely check out the examples, recipes, and this article.
 
1:23 AM
@davidism Holy shit! Thanks man :)
 
Basically, SQLAlchemy gives you just enough magic to write your own more complicated magic if you want to. I generally like the explicit many-to-many because it is a lot more powerful than Django's equivalent.
 
@davidism Looks like Elixir is something similar, but the project seemed to have died :(
 
yeah, that was from before the orm layer and declarative models were as developed, it's not needed anymore
 
Thanks for everything man. Will get cracking on the ORM.
 
 
3 hours later…
user559633
5:03 AM
i just went and saw sbtrkt and fair warning: the group is terrible live
 
5:19 AM
Brilliant! Can't wait to see the Metropolitan Police erect a cordon around the Square Mile and arrest everyone inside :-)
 
5:40 AM
@davidism I'm still in love with Django's M2M, what's the limitation with it?
 
5:54 AM
@RobertGrant I think @JonClements new blog post will tell you. If PHP hasn't killed him already.
 
6:23 AM
Where's his blog?
Also, cbg
 
6:55 AM
cbg all
please answer this question stackoverflow.com/questions/26602248/…
:P
 
7:06 AM
@RobertGrant Beats me, but he said that he'll write a blog post on django some time soon.
 
7:23 AM
@GamesBrainiac ah okay :)
 
How to convert the contents of a list as raw string?
 
@AvinashRaj Usually with "".join(<your list here>)
 
for example:
 
@AvinashRaj what's a raw string?
 
>>> list = ['C:\\Design\dw\file4.doc']
>>> [re.sub(r'.*\\|\.[^.\\]*', r'', x) for x in list]
['dw\x0cile4']
 
7:27 AM
>>> a = "my name is happy doodles"
>>> a = a.split()
>>> a
['my', 'name', 'is', 'happy', 'doodles']
>>> "".join(a)
'mynameishappydoodles'
>>> " ".join(a)
'my name is happy doodles'
 
see it prints 'dw\x0cile4' instead of file4
>>> list = [r'C:\\Design\dw\file4.doc']
>>> [re.sub(r'.*\\|\.[^.\\]*', r'', x) for x in list]
['file4']
now it prints correctly because the text inside the list is defined as raw string.
 
this is beside your question, never use list as a variable name, because it points to the list data structure.
@AvinashRaj So, what is it that you want exactly?
 
Cbg
 
@AvinashRaj Ahh, I think I get it, you want to turn a normal string into a raw string?
 
raw string means the way it is stored
 
7:32 AM
I think you can avoid this problem entirely if you escape your strings properly
>>> s = 'C:\\Design\\dw\\file4.doc'
>>> s
'C:\\Design\\dw\\file4.doc'
>>> print s
C:\Design\dw\file4.doc
@Ffisegydd cbg mate :D
How ya been?
 
I swear @Avinash you come in here most days around this time and ask questions which could be easily answered if you took the time to actually read documentation and tutorials, rather than being a help vampire. Please respect the users of this room, we are not an infinite resource and eventually you may find people refusing to help you when you really need help.
 
@Ffisegydd Check the other room mate.
 
@Ffisegydd indeed :)
@d-coder I've been reading :) Thanks.
 
@GamesBrainiac i tried , it isn't working for me..
@Ffisegydd for simple questions, answer must be a simple one. I don't know what's wrong with this..
Why you people hate the new comers?
i love to learn from mistakes. Python docs are sooo large, i couldn't able to figure out how. Sorry.
 
@AvinashRaj he didn't mention newcomers. I'm a newcomer. What did he mention instead?
 
7:47 AM
Python newbie..
is this correct?
 
I can't see where he said that, can you?
 
Sorry just got out from the shower, I'll reply now @Avinash.
 
@AvinashRaj We are arguably the most friendly chatroom on the site. As for your questions and comments, they are often incomplete leading the XY Problem.
 
@AvinashRaj I'm also a Python newbie. The difference is I don't treat people as a free tutoring service.
 
1. We are very welcoming to newcomers, whether they are new to Python or not, and I resent strongly your implication that we're not.
2. You say that the Python docs are "sooo large" but this is no excuse at all. For starters, you do not need to read the entire documentation website to answer your question, you just need to read about lists, strings, and regex. Additionally, you can find these chapters individually through taking the time to search via <insert your favourite search engine here>.
3. The people in this room are willing to everyone, as long as those people are willing to help themselves. We expect you to research. We expect you to read the docs first. We are not your personal tutors. We are not code-monkeys who will write your work/answers for you at your behest. Please treat us with respect.
 
7:55 AM
meditating
 
Now I'm heading to work now so will be unable to reply for the next hour or so. If you wish to reply, feel free, either I'll pick it up when I get back or one of the other regulars may be able to reply.
 
Thanks to my new diet I'm extremely regular
Because why go to work on a low note :)
Or, that pushed him over the edge and we'll never see him again
 
@Ffisegydd In many cases we do become personal tutors. But we have the choice to help. You see, if the person you are tutoring is not willing to put in the effort to learn the material, then how can you tutor/teach that person? We offer the best kind of tutoring, the kind that makes you independent.
I asked @davidism about m2m fields in SQLAlchemy. He pointed me to some resources that are super awesome for the purpose. I read them and now I know everything that I wanted to know in the first place.
How has @davidism tutored me? He's saved me time looking for resources, and has given me a select few of the best resources to understand what I'm tackling. Now I'm going to go to those resources again if I need help. Saving him time, me time, as well as making me more independent.
If that isn't tutoring, I don't know what is.
 
@Ffisegydd Ok, did you know the answer?
 
@GamesBrainiac it's more like where you have one on one, detailed teaching time where you can ask any question and the person will coach you through all your problems
I'm sure people do do that on here, but I think pointing you at helpful resources isn't the same thing
 
8:09 AM
@RobertGrant Well that’s counter productive. You will need to keep paying that guy/girl because he/she isn't going to make you an independent learner.
 
@GamesBrainiac agreed, although if you have the right attitude then you will learn at the same time, but either way, at least the tutor is getting paid :)
 
Which doc did i need to follow for this specific case?
 
@AvinashRaj look up raw strings and your use of backslashes, that's where I'd start
 
@JonClements Cbg
WB
 
@AvinashRaj but in general, work through diveintopython3.net, it's excellent
 
8:12 AM
@RobertGrant It’s a bit old though, isn't it?
 
Yeah, but it explains stuff so well. Is it very out of date?
 
Looking at strings.
 
>>> list = 'C:\\Design\dw\file4.doc'
>>> list
'C:\\Design\\dw\x0cile4.doc'
>>> print list
C:\Design\dwile4.doc
@GamesBrainiac Why i need to escape, it's a file path..
 
@AvinashRaj Its not, it’s a string.
 
puncture marks appear on @GamesBrainiac's brain
 
8:19 AM
@RobertGrant Yup. Imma shutup now.
@RobertGrant Well the string chapter isn't outdated.
 
Now I'm wondering to ask a question or not :P
 
It doesn't cover one new feature I think, but the examples certainly don't have a problem.
 
i need to define it as a raw string so that it won't escape the backslashes.
this works perfectly,
>>> list = r'C:\\Design\dw\file4.doc'
>>> print list
C:\\Design\dw\file4.doc
 
I'm gonna pass
 
Hey it turns out that @MartijnPieters answered a similar question stackoverflow.com/questions/18055228/…
 
8:25 AM
@GamesBrainiac :D
@d-coder is it worth chucking it on SO?
 
@Avinash I do know the answer to your question, yes. It is after all simple python and easy to research yourself.
 
wow... I got a cbg from @d-coder on the phone app, but not in chat
 
So, anyone watching something good right now?
@JonClements There's a phone app?
 
not for chat... just over all
 
@JonClements where's your Django blog post? :)
 
8:29 AM
Cool, gotta check it out sometime.
 
@JonClements also cbg
 
I don't blog... I just rant :)
anyway... stuff to do... stuff to pick up... brb
 
>>> L = ['C:\\Design\dw\file4.doc',
'C:\\light\PDF\downloads\list.doc',
'C:\\Design\Dq\file4g.doc',
'C:\\Design\Dq\file4r.doc',
'C:\\Design\Dq\file4k.doc',
'C:\\Design\Dq\ole.doc',
'C:\\GE\easy\file\os_references(9).doc',
'C:\\mate\KLO\Market\BIZ\KP\who\Documents\REF.doc']
>>> [x.replace("\f", "\\f") for x in L]
['C:\\Design\\dw\\file4.doc', 'C:\\light\\PDF\\downloads\\list.doc', 'C:\\Design\\Dq\\file4g.doc', 'C:\\Design\\Dq\\file4r.doc', 'C:\\Design\\Dq\\file4k.doc', 'C:\\Design\\Dq\\ole.doc', 'C:\\GE\\easy\\file\\os_references(9).doc', 'C:\\mate\\KLO\\Market\\BIZ\\KP\\who\\Documents\\REF.
i got that..
thanks @Ffisegydd @RobertGrant @GamesBrainiac
 
8:47 AM
I'm in the office now, cbg again.
 
wb @Ffisegydd
 
wb?
 
Welcome Back.
 
hmm..
 
@AvinashRaj cool
@Ffisegydd I love it when my vote is the closing one. THE RUSH OF POWER!!!11eleven
 
@Robert :D yeah that's always fun.
 
Wut
 
@Robert there's another question there waiting for the 5th vote, have at it.
 
9:33 AM
@Ffisegydd muhahaha... I got it :)
 
Nooo
 
Hello Everybody
 
Hello.
 
10:04 AM
@RobertGrant No. I'm facing the question ban. :)
So I thought of asking it here
 
You need to fix your question ban really.
 
Tell me how and I'll act on asap
 
Answer questions, edit and improve your old questions.
 
I'm answering the questions out of desperation but still it isn't enough.
How can I improve old questions ? Can I edit into completely new question ? :P
 
10:11 AM
cbg
It's really frustrating to face the question ban.
 
@d-coder no don't do that. Edit them until they're of a satisfactory level then leave them be. You'll then have to answer new questions (properly :P ) and see how you go.
Honestly, the question ban is there for a reason.
 
Ok.
 
Harsh as it is, you should not be submitting low-quality questions to SO.
 
I had a question ban on my other account, didn't do anything to resolve it and it disappeared after some time
 
209
Q: What can I do when getting "We are no longer accepting questions/answers from this account"?

ArjanDo not repost the question you were about to ask until you have READ EVERYTHING WE ARE ABOUT TO TELL YOU. While trying to ask a question, one could get: We are no longer accepting questions from this account. See the Help Center to learn more. Likewise, for answers: We are no longe...

 
I'm learning python so you can't expect high quality questions :P
 
Though I agree that I was banned for a reason, @Ffisegydd probably remembers how awful my questions were
 
@d-coder actually we do expect high quality questions, whether you're learning or not.
 
@vaultah I believe almost everyone has been there.
 
10:27 AM
@vaultah nah you've been around longer than I have :P I don't remember what your questions were like as I wasn't here :P
 
@d-coder you don't have to be good at coding to clearly state what you're trying to achieve, what you've tried, what your input and expected output is etc...
 
Jul 3 at 17:49, by Ffisegydd
Damn @frost that's awful :P
 
@Ffisegydd Actually from where I stand it looks like high quality questions but when some people here answer it then I myself feel it was silly question
 
Oh hahahahaha yeah I do remember you sharing those ^_^
 
@JonClements Yes. Very true. I've improved myself on that part.
Can I bribe SO to remove the question ban ?:P
 
10:36 AM
I talked to Brad Larson about the ban, said that "I don't care, I'll create a new account"
 
You can bribe us with good answers...
 
He said they will ban the new account as well if they find out
:(
 
I have two months of experience in python so you can't expect good answers yet not unless it's very easy question.
 
I couldn't understand the question at all :(
 
10:43 AM
cbg!
 
cbg @Paolo
 
@PaoloCasciello long time no see - how're you doing?
 
heya @jon! :) eh.. some business troubles..
 
rbrb
 
@Ffisegydd have you completed your CV? :D
 
10:46 AM
@Paolo I finished the first draft and gave it to Jon for feedback, need to work on the second draft now.
Though I'm busy with the thesis at the moment (more LaTeX, different topic :P)
 
@Ffisegydd good. if you need another pair of eyes let me know. :)
 
can i ask you what does cbg mean?
 
I'll probably make the 2nd draft open for all to comment on who wish to :)
@DeepVinicius sopython.com/salad
 
and can i ask you why? :D
 
Mushrooms
 
10:54 AM
@DeepVinicius there is no why. There is only salad.
But in place of an explanation, there is a history section on the page @Ffisegydd linked you to.
 
@PaoloCasciello Nothing too serious I hope
 
I'll be in that KFC tomorrow at 3pm (same day of a week and time as before) to check if they actually change the playlist :D
 
@JonClements well.. let's say these are difficult months... :/
 
@vaultah that's either dedication or just plain sad... not sure which
 
Btw why is there an extra $1?
 
11:09 AM
That's weird
 
If I choose a linode for $960, they will show $1073...
 
Ooo... go for the $960 one!
Linode 96GB 96 GB 20 Cores 1920 GB SSD
That'd run nidaba quite nicely I'd imagine :)
 
That is a lot of RAM.
 
96gb isn't that much
 
...
It's enough.
 
11:14 AM
Imagine the DataFrame's you could have to run pivot_table on though Stewie!
 
thank you btw
now every strange word i see, i go look up if it's a vegetable name i don't know
 
avi
guys need help with counting inversions problem. here is my code. I am not getting correct answer. Anyone would like to have a look
 
@DeepVinicius welcome to the mad house :)
 
@avi expected output?
 
avi
I should get 38, according to bruteforce... but I am getting 49
 
11:22 AM
What's an inversion?
 
@Ffisegydd this is inversion..
 
avi
@Ffisegydd lets say you have an array [1, 3, 2, 4], you have to find pairs where array[i] > array[j], in this example its 3, 2
where i < j
 
Why are we not using rutabaga yet in the language? That's a wonderful vegetable name, it should be part of Salad.
 
@Martijn now we just need an English word that fits rutabaga...
 
you guys it's almost halloween
 
11:31 AM
@corvid or as we call it, Rutabaga
 
nah.
Salad is for life, not just for Halloween.
 
Salad is life!
 
How about Pythonic?
That code is totally rutabaga!
hrm, on second thought..
 
Rutabaga sounds negative to me.
 
are you guys making your offerings to the Aos Si?
 
11:35 AM
@Ffisegydd almost...scary? Like a scary holiday?
 
Rutabaga deserves a better home. Rutabaga is not just for Halloween!
 
man. I don't get proofs in math
 
11:53 AM
I'm gonna have to scrap my 'SO firsts' section in my About Me.
I can no longer fit things in there. :-/
 
I feel like half of the time I look for answers in the python section on SO, your answers seem like the best solution
 
Before I (re)invent the wheel: is there a built-in variant of max that returns the index of the maximum item in a sequence?
 
@Kevin nope... I just use something like: max(xrange(len(sequence)), key=sequence.__getitem__)
 
Thanks, that helps :-)
 
Feel free to accept by clicking the... (oh poo)
 
11:57 AM
@Kevin numpy has argmax that's about it docs.scipy.org/doc/numpy/reference/generated/numpy.argmax.html (sorry for the pings)
 
Here you go: ✔
 
Cabbage :)
 
morning Ian
 
:)
 
@Kevin yay!!!! Happy puppy!
 
12:03 PM
Ah fine, I just thought it would be a cool name :)
Anyway, has anyone seen this movie
 
That rutabaga looks strangely like a pumpkin to be honest :)
 
Nah, the movie was nothing compared to rutabagacomic.com
 
@JonClements In the end, I went with index_of_max = lambda seq, key=(lambda item:item): max(range(len(seq)), key=lambda idx: key(seq[idx])). Couldn't use __getitem__ since I wanted to permit custom keys.
Semi-tangentially, I wonder if any of the answers for What is the difference between range and xrange should be updated with a warning indicating that xrange doesn't exist in 3.X.
 
@Kevin well... I reckon 3.x users will notice the NameError sooner rather than later
 
@JonClements yeah but it's confusing :)
 
12:17 PM
On one hand, the question is tagged with only, so caveat emptor. On the other hand, who reads question tags?
 
Cabbage.
 
Yo
 
Just how am I supposed to keep up with chat, email, GitHub, Slack, Trello, …
 
Do what I do: ignore every medium of communication except your favorite.
 
Is anything else lazy in Python?
 
12:18 PM
lambdas, sort of
 
The good thing is that everything is automatically reported in Slack I guess.
 
@poke cabbage
 
@Kevin Lambdas are as lazy as functions are, so I wouldn’t call them that way…
 
@RobertGrant Other than generators?
 
funcs = []
for i in range(10):
    funcs.append(lambda: i)
print funcs[5]()
#expected output: 5
#actual output: 9
 
12:19 PM
@GamesBrainiac yeah I was wondering about those
 
@poke This is true.
 
@Kevin That’s not laziness. That’s just how variables are bound in lambda expressions.
 
@Kevin Your function is rather weird :P
 
Errr... what's the address for slack again?
 
@poke Yes, hence my "sort of" suffix as a "cover my ass" attempt.
 
12:20 PM
 
Doesn't recognise either of my emails... @Ffisegydd Stewie!? :p
 
The behavior is the same for regular functions, yes.
funcs = []
for i in range(10):
    def f():
        return i
    funcs.append(f)
print funcs[5]()
#expected output: 5
#actual output: 9
 
@JonClements You need to be invited, but the userlist says you’re in
Your gmail address.
 
Umm... okay
 
Yeah you're in :p
 
12:22 PM
Errr: Sorry, we can't find an account with that email address.
 
There's a slack now?
 
Yup
for sopython development related talk.. I guess
 
It makes sense to use Slack because otherwise the talk is lost in the noise of normal sopython madness. ROs are owners of it so should be able to add people if you want in Games (I'm at lunch at the moment so can't)
 
@Ffisegydd Honestly, I haven't contributed anything to Trello or the sopython project (wish I could though), so its not a big deal.
Thing is, I just discovered slack a few days back. Didn't know it was so popular :D
 
@JonClements oh, you meant "sad" like disorder?
 
12:30 PM
@GamesBrainiac Not sure if “popular” is the right word.
 
Its definitely very good. My team certainly seems to like it.
 
@vaultah Exactly like that... don't forget to write down the play list as well for the record :)
 
how does the javascript room's bot work? Can we have our own bot on the python room?
 
We have a bot, R.A.B.B.I.T., but it is currently resting.
 
@Martijn that's a much nicer way to put it rather than "We had a bot... but Jon lost the code"
 
12:34 PM
We can if someone wants to learn websockets and other mysterious things.
 
@Jon I already remembered it :)
 
@corvid Their bot is really boring. They have a full computer that just runs the chat in a browser with an additional script running on top of it.
 
@poke you've still got your node.js one I take it?
 
@JonClements yup.
 
12:35 PM
@Kevin well - that's more just something I flung together in ~10mins just to see if it was possible :)
 
Looking at it, I assume all it does is sign on and say "testing 123"?
 
The majority of it is just trying to login as a normal user :(
 
So are you going to rewrite it?
(The rabbit)
 
!!rabbit
 
I really like rabbits!
 
12:38 PM
That’s mine.
It’s a pretty stable framework actually.
 
Rabbit will eventually be combined with Nidaba to alert potential poor questions
 
And it can leave without having to timeout ;P
 
!!rabbit
 
@poke well... the working copy in the end did emit a quiet=false or whatever
 
12:39 PM
Sorry Peter
 
@poke you've broken @Peter's heart again... bad poke! bad!
 
my love is not answering..
cbg(folks) #btw
 
Give me a minute.
 
Huh, Nidaba is bigger than I thought it is
 
Bigger in what way?
 
12:40 PM
Or will be
 
You mean ambition wise? Yes it is rather big :p
 
Yep
 
How long have bitbucket supported git repo's for?
 
Ages?
 
@JonClements a while. You can get a free private account, unlike github :)
 
12:42 PM
Nidaba seems to have a huge amount of potential, whenever thinking about it
 
A fact I only discovered after signing up to github
Seduced as I was by their pretty client
 
Bitbucket's UI still is miles behind.
And no code search really is a downer for me.
 
@Peter did I ever mention I'm a huge daft punk fan?
 
so, on pygments, are you expected usually to download a corresponding style sheet for the style you want?
 
12:44 PM
@Ffisegydd I don't know if you ever mentioned that.. but I like them too
don't call myself a fan, but they have some nice tunes
 
ick, from the question title this sounds like 'primarily opinion based', but the body is an unreadable wall of text:
-2
Q: Pika, it is usable or not?

chubakurI have next problem: Some server(CORE) contains much jobs, this jobs should execute distributable. For example CORE has 100 jobs. It means that each job must execute on each worker. Worker represents program (MASTER), each MASTER generates some FORKS(FORK is not master, fork dont generate other f...

 
user559633
bitbucket also doesn't do 2 factor auth
 
user559633
and the company behind bitbucket has some questionable contracts/terms of use for other products
 
VtCed as "Unclear".
 
Atlassian, isn't it?
 
user559633
12:45 PM
yes sir
 
Yeah, Atlassian bought up the site.
 
@JonClements Years.
!!image
 
@Peter Your turn.
 
CEP X: More kittens.
 
12:48 PM
Ooops - wrong window
meant to close the other one... ooopsy daisy
@Martijn you're certainly making use of float('inf') and co in a few answers now aren't you :)
 
!!rabbit
 
I really like rabbits!
 
@JonClements hey, once you learn a trick, you use it whenever you can! :-P
 
yes you do. yes. you. do.
 
12:52 PM
!!image
 
error: Unable to find vcvarsall.bat... I guess I will not be installing Twisted today.
 
@Kevin I have an answer for that!
 
@Kevin well, for rabbit... I want to drop twisted and use asycnio/autobahn instead
 
10
A: error: Unable to find vcvarsall.bat

Martijn PietersYou'll need to install a Microsoft compiler, compatible with the compiler used to build Python. This means you need Visual C++ 2008 (or newer, with some tweaking). Microsoft now supplies a bundled compiler and headers just to be able to compile Python extensions, at the memorable URL: Micro...

 
12:53 PM
I seem to see that error message all over the place.
 
@JonClements I've been looking at that stuff as well, looks cool
 
That's on a question with a 400+ vote answer, but it has received a nice trickle of upvotes since I posted it. You can post a (very) late answer to a popular question and still receive votes.
 
“Microsoft Visual C++ Compiler for Python 2.7” wow, that’s nice of them. Do they have one for 3.4? (I assume 3.4 isn’t built with VS2013 yet, right?)
 
You can get a free copy of VS for Python, I assume that's up to date?
 
I think the main reason for using twisted was that asyncio wasn't finished/live (although tulip was accessible) and originally there was the idea of having RABBIT be able to bridge to IRC channels... but - I don't think we need that any more as we're not bothering running our own irc server any more
 
12:55 PM
I'm now installing Microsoft Visual C++ Compiler, so I can install Twisted, so I can install rabbit. We're getting dangerously close to my maximum recursion depth for installation BS.
 
@Robert It’s less about getting Visual Studio (I’m a .NET dev myself, so that’s no problem), but it’s more about getting the right version (you need the one Python was compiled with)
 
Umm... not noticed this before: Uptime: 272 days(!), 01:06:02
Is the (!) because it's a surprise or something? :p
 
:D
“Look at me! 272 days! Isn’t that amazing?”
 
user559633
from htop?
 
yeah
 
user559633
12:57 PM
haha yeah <3 htop
 
user559633
"hey, you've been up 100 days. are you sure you're up to date?"
 
@Ffisegydd that fella is a life saver for windows users :)
 
He is a f***king hero.
 
He is.
!!image
 
12:59 PM
 
umm... call the RSPCA :)
 
Incidentally stackoverflow.com/questions/2676763/… are the VS versions for the various Pythons.
 
"intolerance for convoluted installation requirements" is one of my many weaknesses.
 

« first day (1473 days earlier)      last day (3478 days later) »