« first day (882 days earlier)      last day (4291 days later) » 
00:00 - 16:0016:00 - 00:00

00:02
Ummm - another one I've had a stab at - but I should probably stop answering now...
1
Q: Find sum of right and left hand of list element in python

TheNoneIs there any way for compare sum of left and right of a selected element in a list? For example: li = [2,3,0,9,6] if selected item is '0', I want to compare sum of 2,3 and 9,6 Thanks in advance

00:15
I didn't grasp the lambda thing yet. I am working with python only a while
index is far more intuitive - but think that's a bit more flexible
yeah,.. i guess
:D
anyway, do you think you could upvote my answer here? ^^ though it is not related to python. Ofcourse, read it first, then vote if you consider it good ;)) stackoverflow.com/questions/207477/…
vote for the formating at least :D lol
@Qwerty I'm afraid I'm not at all well qualified to judge your answer - I am sure you'll get your karma from more knowledgeable people :)
:D :)
umm - it's worth +1 for effort - not sure I agree with it though
00:27
comment, if you have time.
I'll bookmark it - and look again later if that's okay
I did some research on that topic as I myself had similar problem. In my opinion this approach is the better one, but I am opened to anything
sure
I'm off for the night/weekend, take it easy all
have fun @MrE!
cheers :)
00:29
bye ;)
and enjoy
I'm just gonna say, you type too fast Jon ;)
I am still reading Jon Skeet jokes :D
LOL - how ya doing @Volatility ?
a bit miffed at your ninja typing skills, but other than that i'm good
Umm, is it afternoon there?
00:41
actually, it's 11:40am
I'll ask again in 20 mins ;)
00:55
0
Q: Python: List in List which keeps the difference between column position and row position

user2175943Dear all I am new to programming and I am using Python. I have the following code: P=[] i=0 j=0 P=[[0]*5]*5 while i<5: for j in range(0,5): P[i][j]=i-j i=i+1 print(P) And I expect the following output: [[0, -1, -2,-3, -4], [1, 0, -1, -2, -3], [2, 1, 0, -1, -2], [3, 2, 1, ...

Who wants to explain this one again?
It's on sopython.com ToDo's list, but haven't got around to finding a good answer to refer to yet
think it's under there as [ [1, 2, 3] * 5 gotcha or something
oh damn, here it's 2:01 am
here too
should I install python 2.7 or 3.x? <<-don't know why I didn't edit this
should I install and use python 2.7 or 3.x?
mhm, question is ... for what you want to install python?
there still exists several third party libraries which aren't ported to 3 ... so, in this case you have to use 2.7
walking through maze, text based games, calculations (scipy, numpy)
@JonClements done ;)
01:05
mhm, should be possible in both
so I would recommend python 3
@ColinO'Coal I prefer 3 too, I read about it few days ago, but I can't recall now why. Why you, personally, recommend me python 3?
Oh I prefer personally 2.7
^^
but the future is python 3
Then by the time 3.5 is popular or something - we'd be saying that 4.x is the future ;)
hehe yeah
We got a while to go until we catch PHP in version numbers though ;)
01:09
but atm: if we old birds don't stopping developing in 2.7, the jump to next generations will be done never
I hope not Jon.
and why do you prefer 2.7 then?
Now only if the backported the metaclass stuff to 2.7 - I'd be happy
Just a cleaner syntax
I noticed there are significant syntax changes in some functions
But yeah, I constantly play with 3.3 - quite excited about 3.4
3.0 was a flop
Uff, good question. Because I like print "mohuhua" more than print("muhahah")
01:11
haha :D
I prefer print as a function actually :)
Yeah, hate the brackets
brackets are cruel
they're annoying to type
Seven years I learned and programmed with print xy ... and then they killed ;).
01:13
so, help me decide. I am not corrupted by any version yet
Oh sheesh - you guys want def func a, b: and calling functions via a.split or something ;)
Use python 3.x
@JonClements can you explain?
@qwerty if you're just starting out - learn from 3.3
but make sure you're aware of the major differences from 2.7
2.7 isn't going away for a while
and there's still libraries that aren't 3.x compatible yet
brackets are fine for those types of functions
01:14
And many samples in the world wide web based on 2.x syntax.
So, sometimes it's not easy to follow python 3.
yeah, at work, my main focus is to provide interfaces between our C++ main program and python modules which are written by other programators (python 2.7) so I come into contact with it sometimes, but at home I am playing with 3.x.
For example ... outdated libraries can mostly used in python 2.7 further, but won't work in 3.
ok guys, having lunch now
cya
have fun ;)
ciao
lunch? ugh
I should go sleep
01:17
me too, but I am starving, might eat something before sleep
Maybe I should try and install python 3 too ...
there are lots of ways to test multiple interpreter versions.
another question. 64bit over 32bit?
I have a 64 system and use windows. But, I hate compiling python libraries. And because mostly you found pre-bundles in 32 bit ... I'm using 32bit version of python.
01:50
what about ironpython, pypy and jython? are they exactly the same, but they don't use traditional interpreter?
Python is a language spec.
The most common is CPython which runs on top of a C based implementation
to handle bits and bobs
IronPython uses the .NET framework to do that
Jython uses the JRE to do so
and pypy - is actually Python written in Python ;)
so for instance, a list in CPython has the list object implemented in C, while in Jython it'll translate to the JRE framework, or IronPython will use the equiv. of a .NET List<>
I see,... or not. It seems like python itself is a framework to me
It's a language specification
ie - xyz should behave as such...
right, thanks ^^
how that behaviour is actually carried out behind the scenes is completely up to the implementation
01:56
wow
You played with C/C++ ?
who not ;)?
It's the same thing - it's a language spec.
All vendors are free to carry out the behaviour however they want - as long as it meets the spec.
(of course - MS never does honour the spec./standards of anything - but anyway...)
Hope that makes sense
01:59
soo, when I downloaded python-3.3.0.msi from python.org - it's a in C implemented Python?
It would be - yes
it makes sense with python, but it confused me when you mentioned C/C++
Put even more simply - sort as a function
the behaviour of that is well defined
I could make my own Python and use bubblesort
when you said the vendor, it's the compiler who must meet the spec, but do it however they want, right
02:00
great, now I get it
CPython uses TimSort
and IronPython?
will use the underlying .NET library function
Which I think is mergesort
Make sense
anyway, when CPython uses data structures defined in C, why I can't access them in a simpler way than through some API functions?
i mean, when embedding python in C++ app
02:02
use Boost.Python
does a lot of the work for you
.NETS sort algo is "QuickSort"
(I think we've already had this discussion)
riiiiiight, I heard about that before.
yep
I have memory leaks, haha ^^
@ColinO'Coal okay - cool - was either that or mergesort - I took a guess
OT: do you use last.fm?
02:04
msdn.microsoft.com/en-us/library/6tf1f0bc.aspx says: insertion sort, heapsort and if at last quiclk sort
interesting
with last.fm you mean the internet radio?
yeaah, they have a radio, but I meant the scrobbling and the online user Library
oh I see
think my mate's 13 year old uses last.fm
I'm not using it ... my current job doesn't allow to use net privatley ;)
finaly I have no time to use it in my free time too
heya @joschua011
02:12
heyho
Hell'o
okay - also OT - but I'm thinking of buying one of these amazon.co.uk/Asus-Transformer-10-1-inch-Keyboard-Android/dp/…
a tablet
they are awesome i have one of these
02:15
jepp, looks nice
only 1gb though
either that or a Galaxy Nexus 10
I like the idea of a keyboard with a separate battery in it
but it's kinda pricey
and the specs of the nexus are better
keyboard is cool because i sometimes use it to ssh to my servers
02:28
so who is Jon Skeet?
dont worry, dont know him too
but he seems to be the SO legend, with highest points ranking
ok i looked up his profile, it's just no possible for one man to answer that many questions
who says he's a man ;)
a right
02:31
besides - I'm rooting for our resident Legend - aka Martijn Pieters
he is a intelligent network, a swarm
consequently he/she must be an "it" ;)
@JonClements agree
@Volatility feel free to add your answer to that Q on sopython.com/FrontPage
(well - the ToDo bit of it - anyway)
you mean the [[0]*5]*5 answer?
i believe so
02:42
yup
lol, cause the thing linked to my :O answer to "Who is Jon Skeet?"
ok done ;)
thank you muchly ;)
02:59
okay, I am almost sleeping
good night
night mate
hey, my nickname from when I was playing counterstrike was nightmare
haha
I'll remember that ;)
I use to use the name "An Idiot" in duke nukem 3d
lol, your badge makes a whole lot more sense now! ;)
So had mates using names like "DeathBringer" - and it showed up as "DeathBringer" was killed by "An Idiot"
@Volatility Martijn gave me this badge :)
I wear it with pride ;)
03:06
lol
Just seeing a question on scrapy - reminds me...
so, good night
Night night
03:49
heya @TomOffermann didn't see ya sneak in ;)
04:33
@abarnet good - don't feel so bad now ;)
05:09
heya @misterMan - welcome
 
4 hours later…
08:44
Can you believe it
I get 10 upvotes for this:
10
A: print() not working in python

VolatilityYou still have to call the function. def main(): # declaring a function just declares it - the code doesn't run print("boo") main() # here we call the function

 
2 hours later…
10:32
Hey anyone here :D?
Hey Volatility :)
I see you are also a Sydneian
indeed ;)
Where abouts in Sydney are you? Like North, east, west, south
inner west
you?
10:40
Ah, I'm more east, around the airport
Heh, nice 10 upvotes for calling a function :p
yeh, didn't think it'd get that much attention :P
Most I've ever gotten is four :D
I'll get higher one day :)
wow, i just counted i got 62 answers with 4 votes or more
Nice
And you've only been here for 3 months :O
yeah, i was a bit crazy on answering
10:48
Surprised you don't have a gold badge yet
i'm nine days away from getting a fanatic badge
I'm 36 :(
It'll probably be my first, and only gold badge
lol
give it a couple more years, and you'll probably get another one!
So when did you start to learn python?
xD
a couple of years ago, i think
10:51
Oh nice. I started around... September last year?
I've only gotten active with it during this year, especially when I started an account on this site
judging from your answers, your not bad ;)
you even beat me on one
amg where
1
Q: How to compare if an item in a list has the same value AND position as an item in another list? Python 2.7

Ricochet_Bunnyeg. l1 = [a,b,c,d] l2 = [e,b,f,g] A method that would return true when it sees that b is in both l1 and l2, and in position [1] in both lists. Preferably something that I can use in a for loop so that I can compare all the items in the list. Many thanks :)

Heh I remember that
I was happy when I saw three upvotes, I was like "OMG!"
10:54
Hi, can anyone help me with pyfilesystem?
I'm not your man, sorry
me neither
Only modules I pretty much know are BeautifulSoup and some basic ones
So you know about uploading using python?
uploading to where?
10:56
Suppose, mediafire using api
No idea, sorry
I'm a newb at python
11:15
Hmm, looking back at that question @Volatility, wouldn't enumerate be faster :p
only if the op wanted the index though
Morning all - evening @Volatility
Hi Jon
Hi Jon, can you help me with uploading using python?
11:28
Can try...
I am trying to upload to mediafire. That much works fine. But when I uploading large files, how can I keep track of the upload speed?
I posted the question, but didn't get a satisfactory answer
How are you doing the the upload?
You mean the method? Its POST and I am using mediafire api.
Okay - by mediafire api do you mean it's got its own library, or it's own url end points and you're using urllib or similar to access it
11:33
Yes. Not its own library, but some ways to access the online server using api id and username, password and to upload I am using urllib.
Thanks.
Hey guys got a little question
If I had a string "Title: A random title Date: 20 November 1233 Other: Stuff"
How could I split that into a dictionary {'Title':'A random title','Date': '20 November 1233', etc}?
I like that string
Why thank you
11:41
use regex
/me awful at regex
but ty
@JonClements the link you mentioned works for me. Can you help with pyfilesystem?
Sleep time for me. Night everyone
Err - I can try :)
11:54
Ummm - kind of imples it's something to do wiht lack of privileges
I imagine the HTTP version is just a process that's a proxy, while dokan looks like it's more a userspace driver around stuff which doesn't quite have enough priv. to do stuff...
Not a windows user - so just guessing I'm afraid
But I tried a similar code in linus using fuse instead of dokan
It didn't work
In Linus? Was he okay with that? :)
Sorry, i mean linux
not sure - just looks like privliges issue
But I was running linux from administrator account and there the filesystem didn't even mount at the specified folder.
12:01
Okay - but there's no way I can try it / debug it here - so I can't help I'm afraid
wb @colin
Hi there
rest is sleeping?
No idea
One sec - just need to pad down some stuff in the back garden again... So the dog doesn't get too suscipious
12:33
rep capped already - damnit
Morning @mgilson
mornin
we have lunch ^^
ooo - that's nice of you - what've you brought for us? :)
13:05
twieback?
I'll ill ... my lunch is very sparsely at the moment
Umm - I'll wait until you're better
hehe
If you will travel next time to hamburg germany, you're welcome
Well - it'd better be a bloody good lunch then ;)
it will ^^
bloody weekend
13:26
I'll stick with my chicken dijonaiise with sliced roasted potatoes and green beans for lunch then
13:43
sounds great, but dont let talk about food atm
won't mention the banoffee pie then
here in germany the banoffee pie isn't so good
14:03
It is when I make it ;)
(not that I'm biased at all cough)
14:30
arhghggh - don't you just hate it when you look at your bank balance - and you've got cheques that quite haven't cleared yet sigh
14:40
Not normally my taste of music - but this guy looks promising: open.spotify.com/track/4hB5kfacjhbJeKLU4Dt3oW
Hi all. Can someone make a tag for mpmath? mpmath.googlecode.com/svn/trunk/doc/build/index.html#
sound like kermit the frogg ^^
@jon
14:56
What?
oh...
Hi @doubt - if there's a question it can be implied to, then yup
ahh - there's already a tag - have you suggested a wiki entry for it yet?
Well - I've approved johnthexii's wiki suggestions - they look good to me
except one doesn't techincally have attribution I guess sigh
@Doubt no probs - I didn't create it - johnthexii did - and it's currently under going the approval process - might take a bit for enough users
I added the tag to the later question you mentioned
Okay great, thanks Jon
You're welcome - welcome to the room btw :)
You ask questions well - nice ;)
15:13
Thanks x2! See you around
laters
@ColinO'Coal well you can't argue with: open.spotify.com/track/0tRbE57ldKxtHep2R9KQZF
Emeli Sandé is a great artist
clear voice, width tonal skills
*wide
so you're right - I can't argue:)
she's brilliant - I hadn't heard of her until the 2012 olympics ;)
Mhm, I remember, she was in the iTunes festival last year ... awesome performance.
for some reason she reminds me of Grace Jones in that bond film
the one with the blimp
15:20
hehe ... the hairs
yeah
Z something industries that had - umm, was it Christopher Walken?
mhm, don't know, but maybe
ahh - Zorin Industries
A View to a Kill (1985) is the fourteenth spy film of the James Bond series, and the seventh and last to star Roger Moore as the fictional MI6 agent James Bond. Although the title is adapted from Ian Fleming's short story "From a View to a Kill", the film is the fourth Bond film after The Spy Who Loved Me, Moonraker and Octopussy to have an entirely original screenplay. In A View to a Kill, Bond is pitted against Max Zorin, who plans to destroy California's Silicon Valley. The film was produced by Albert R. Broccoli and Michael G. Wilson, who also wrote the screenplay with Richard Mai...
Grace also played besides schwarzenegger, murphy and other actors. Wow, didn't know that.
heya @EdouardThiel
15:43
not many interesting questions this afternoon
and I'm running out of votes as well sigh
bloody sundays
dough ... mean saturdays, saturdays
hmplsrlgls
you just have problems with days ending with 'y' - that's okay
can't remember how to make the markup bold when joined to a word - nevermind
I have problems with many things ;) ... but time isn't my friend especially.
With which day your week is starting on your calendar?
15:59
lol
right, got me
00:00 - 16:0016:00 - 00:00

« first day (882 days earlier)      last day (4291 days later) »