« first day (1464 days earlier)      last day (3488 days later) » 
05:00 - 16:0016:00 - 22:00

5:47 AM
cbg
 
 
3 hours later…
8:37 AM
Is there a python function that copies a directory into another directory?
There are a couple of functions that move a directory tree to another location.
 
@PaoloCasciello Doesn't that just move the tree?
"The destination directory, named by dst, must not already exist"
Doesn't sound like a copy into thingy.
 
it looks as a copy to me
or maybe are you trying to merge and not copy?
 
@PaoloCasciello I'm not sure what a merge is. The idea is to copy directory 1 into directory 2.
 
so copytree is good at that :)
shutil.copytree('/tmp/dir1', '/tmp/dir2') will create a dir2 directory with all the files from dir1. sounds like a copy to me :D
 
8:47 AM
@PaoloCasciello Hmm, I guess I could specify the destination subdirectory explicitly.
Yes, that works. Thanks.
 
9:10 AM
Cbg
 
9:36 AM
cbg @Ffisegydd
 
9:53 AM
Cbg again.
 
10:14 AM
Cbg
 
10:59 AM
Cabbage folks
Why are you fellow denizens in today?
 
@Ffisegydd Woo! I got the Github pack!
 
Jealous! Wish GitHub was around when I was in Uni
 
Well, or secondary school :D
 
11:17 AM
cbg !
I got my github pack too :D micro plan ... and a load of other benefits !
 
@user3197452 I worked it out and there's about $5000 of free stuff :o
I'll definitely be showing this to my CS teacher >:)
 
@KeremZaman Cabbage!
 
11:44 AM
@Iplodman haha yea :D
 
@Iplodman Cabbage ? why? what does mean other than a kind of vegetable?
 
@KeremZaman cabbage! potato?
 
@vaultah Banana melon. Potato?
 
Bananas :D
 
12:02 PM
@Iplodman bananas, melon :D
 
@KeremZaman Banana!
@JonClements I have a Salad Language Enhancement Proposal. The addition of cress to mean 'and'.
 
Do we really need a word for 'and'?
 
How am I supposed to chain my salad based compliments otherwise?
 
Not sure if I support this particular SEP
 
What is flawed with such a SEP?
 
12:16 PM
We don't want too many salad words.
 
Do we not?
 
No.
 
Ah.
Well then.
 
It becomes too much.
Too silly.
 
Of course!
How do I install ModernCV, may I ask?
 
12:23 PM
You shouldn't need tp
You can just use it and it'll automatically download it
 
guys, I am trying to use phonon in pyqt. How can I install it to my computer?
 
@Ffisegydd \usepackage{moderncv} raises ! LaTeX Error: File moderncv.sty not found...
 
Hmm no idea then. On my installation whenever I try to use something it automatically installs it
 
Same here, usually.
 
Google around?
 
12:26 PM
Yep, doing that now.
Fixed it! It was just me being a twerp and using \secondname{} instead of \familyname{}`.
 
12:54 PM
How do I determine if I have basic/intermediate/advanced skills in a language?
I can't decide if I have basic or intermediate Python skills.
 
@user3197452 I hate you guys :P
 
;)
@IntrepidBrit Would you mind helping me out a little?
 
Depends on what it is mate :)
 
I have no clue how I would rate my Python skills out of basic/intermediate/advanced.
 
You're asking the wrong guy there. I love Python, but I don't get loads of chances to code in it. I'm an intermediate at best
 
1:00 PM
Damn.
 
My question would be: "why would it matter?"
 
I'm trying to write a CV.
 
Then why let them know you're not quite as proficient as you should be
I list my programming languages I'm familiar with
I don't mention how competent I am in each particular one
But I'm self-employed, so I might not be the best person to ask for employment advice in that regard
 
Because I want to be truthful ;) No point lying, only for them to find out I'm useless a month later.
 
But don't say you're proficient in something you're not. You can guarantee it'll be the first thing they ask ;)
Mate, you're 14? They're not going to think you're as good as Martijn in any language
If you're intermediate in any language, they'll consider that a win
 
1:02 PM
Ahaha xD
But I don't know if I'm intermediate x_x
I want to say I am, but I'm not sure.
 
Besides, you're young and pick things up faster. By the time someone is reading your CV and considering you for a role, then you'll have improved
 
So should I say intermediate, then? I'll ask @PatrickBassut later, because he knows me and my skillset pretty well.
 
I would still say you shouldn't. Maybe list your languages in order of proficiency? shrugs
But yeah, ask him :)
 
@IntrepidBrit That's a good workaround >:)
 
How about you ask people about some of their favourite features of the language, and if there's certain things you don't know how to use then read up on them
Some of the other guys will probably love obscure parts of the language
 
1:06 PM
You see, you don't get free stuff from Github, but you sure as hell know what you're talking about.
 
Well, I like to think so :P; but nobody is telling me the contrary. Ask around though. Can't hurt to get a few opinoons
 
Will do :D
 
My favourite things about Python? Lambda expressions, list comprehension, kwargs (and passing them around) and the maintainability
The C programmer in me is relishing writing C in Python, as well as being able to hack around the internals of the language -> but I've not had the pleasure of getting stuck into it yet
 
I think the only one I don't know of those is list comprehension. Could you explain it briefly?
 
Nice compact way of handling lists
rather doing something like:
for a in list_of_as:
    print a.message
you can do:
[print a.message for a in list_of_as]
 
1:12 PM
Oh, right!
I do know that, just not the technical name.
 
actually
sorry
That's a terrible example
 
Is it?
 
a_messages = []
for a in list_of_as:
   a_messages.append(a.message)
you can do:
a_messages = [a.message for a in list_of_as]
 
Ah, same difference ;)
 
Yeah, my first one is kind of abusing list comprehension for the sake of "nice" code. The latter one is using list comprehension to build a list
[There's also dictionary comprehension in 2.7.x onwards...]
@ZeroPiraeus silently judges from the recesses of the room
 
1:15 PM
I prefer to not use list comprehension for neatness. I prefer readability.
 
@IntrepidBrit :-)
 
When your for loops get more complicated, I personally find the list comprehension more readable
 
I was just thinking you should invent IntrepidScript, so you could have that printy listcomp ;-)
Worth mentioning set comprehensions to complete the trifecta, and generator expressions for whatever the thing that's similar to one of the trifecta but not is called.
 
(IntrepidScript would end up resembling Malbolge...)
 
Wow, I really can't type this morning.
 
1:18 PM
One guy asked why people favor 2.7 over 3.x in Quora and another guy replied saying, print statement's syntax changed and it broke compatibility. So, people didn't move..
 
That's EXACTLY why I haven't moved across -- edit :P to show sarcasm
(in case people thought I was being serious)
Isn't there even a tool that converts Python 2.x programs to Python 3.x?
 
Quora's Python topic's quality goes down day by day
 
@IntrepidBrit 2to3, although the received wisdom these days is that it's better to write polylingual code than maintain two codebases.
 
@ZeroPiraeus I'm looking forward to when this project finishes. Going to drag all my Python projects kicking and screaming into Python 3 compatibility
 
@IntrepidBrit It's usually not such a difficult job (unless you were taking advantgage of Python 2.7 letting you do unicode wrong).
 
1:31 PM
To be fair, you're probably right - but it's been my 3rd party libraries/frameworks that "have held me back"
 
Ah, well, yes.
 
1:45 PM
 
2:01 PM
@thefourtheye see this if you have some time .
 
@AvinashRaj When you iterate over a file object, it will give you one line at a time. So, even if the line has nothing but a newline, it will be returned as a separate line.
You might want to apply the RegEx with f.read()
 
how?
could you modify my code? plss
 
import re
with open('/home/avinash/Desktop/r', 'r+') as f:
    print(re.sub(r'\n\n+', r'\n', f.read()))
Here, f.read() will give the entire file contents, with multiple newline characters in between, as a single string. So, your RegEx will work.
 
works . But it prints a blank line at the last.
 
Are you using Python 3.x
 
2:12 PM
2.7
 
Your file doesn't have a new line at the end?
 
yep, there isn't a newline at the last.
 
Stick a comma after your print function?
 
wow.. works..
@IntrepidBrit How it works?
is the comma means termination..
 
The comma after a print function in Python 2.x suppresses the automatic newline that is used in the print function
so if you did:
 
2:16 PM
2
Q: Reading from stdin till EOF python

thefourtheyeI am reading input for my python program from stdin (I have assigned a file object to stdin). The number of lines of input is not known beforehand. Sometimes the program might get 1 line, 100 lines or even no lines at all. import sys sys.stdin = open ("Input.txt") sys.stdout = open ("Output.txt...

 
Actually, look at @thefourtheye 's link.
Concisely put
 
@IntrepidBrit <pedant>s/function/statement</pedant>
 
Anyway, why are you using / picking up Python 2.x anyway @AvinashRaj? You should get rolling with Python 3.x
@ZeroPiraeus I understand the vim correction based pedentary, but I don't understand why it's considered a statement over a function?
Surely it'd be a statement if I just did ye olde "print hello," ?
 
@IntrepidBrit sure.. thanks for your suggestion.
@thefourtheye thanks ....
 
@AvinashRaj No probs da, Enjoy :-)
 
2:20 PM
Good luck!
 
Sorry but I refuse to help with modern version of torture. — Puciek 5 mins ago
 
Bwhahaha
It is a really BIZARRE requirement though
 
@thefourtheye i should ping you if i have doubts in Python.. :)
 
@IntrepidBrit Still Piotr solved it :-)
 
2:23 PM
shakes head Kudos to him though
@ZeroPiraeus aaaaaaaah
 
@AvinashRaj Your blog is not loading da, why?
 
because athu blog ah illa..
 
@ZeroPiraeus docs.python.org/2/library/functions.html - so the print() "function" that I thought I was using in 2.7 is actually some kind of weird reference to the print statement
And not actually the function as I thought it did. Huh. Live and learn :)
 
summa than atha create panninaen.
 
cbg(all)
best invention ever:
 
2:25 PM
TAKE COVER!
 
in C, 2 mins ago, by Peter Varo
;)
 
@AvinashRaj Oh.... Okay okay... I am trying to find you in FB.
 
I mean, Hi @Peter
 
heya @IntrepidBrit have you finished the FC model?
 
@thefourtheye did you got me?
 
2:26 PM
@PeterVaro hahahah! So pointlessly cool
 
@thefourtheye Where did you studied?
 
but I just want one, really ;)
 
@AvinashRaj Too many Avinash Rajs... Did you study in SVC?
 
@PeterVaro I did. It's working as designed - but I feel the new design is inferior to my (older) design.
 
@IntrepidBrit Yeah, it's not a function whether or not you use parentheses in 2.x - for instance, try a bare print().
 
2:27 PM
SVC?? @thefourtheye
 
@IntrepidBrit how's so?
 
Sri Venkateshwara College?
 
where it is located?
I studied in Coimbatore.
 
@ZeroPiraeus Gotcha. I understand that 100% now. Thankfully they've sorted that out in Python 3 then
 
Hindusthan college of Engineering and Technology.
 
2:29 PM
@PeterVaro My one fixed to some small screw holes on either side of the side the handset, so the unit wouldn't rock once in place. The new one just slides down over of the top of the handset and rests on some of the handset plastic - so will tend to rock a bit
 
The use of parens is just a happy workaround for 2.x/3.x compatibility because in most cases they're redundant in 2.x.
 
@AvinashRaj from Melur?
 
@thefourtheye Yep, How did you know?
 
FB :-)
 
link....
 
2:31 PM
Sent Request already
 
wait i'll check..
i didn't get any..
 
KLN Polytechnic?
 
Yep..
 
Then the request has been sent to you only
 
Your name starts with?
S?
 
2:35 PM
Yup :-)
 
@thefourtheye @AvinashRaj a question: there are a surprising (to me anyway) number of programmers from India here in Santiago, and I know nothing about educaional establishments in India. Which ones should I be suitably impressed by if I ask someone where they studied?
 
@ZeroPiraeus IIT :-)
 
yep.
 
Just the one?
 
Indian Institute of Technology - it has more than 12 colleges all over India
 
2:37 PM
Ah, right.
Ta!
 
The Indian Institutes of Technology (IITs) are a group of autonomous public engineering and management institutes of India. The IITs are governed by the Institutes of Technology Act, 1961 which has declared them as "institutions of national importance", and lays down their powers, duties, framework for governance etc. The Institutes of Technology Act, 1961 lists sixteen institutes located at Bhubaneswar, Chennai, Delhi, Gandhinagar, Guwahati, Hyderabad, Indore, Jodhpur, Kanpur, Kharagpur, Mandi, Mumbai, Patna, Ropar, Roorkee and Varanasi. Each IIT is an autonomous institution, linked to the others...
 
Birla Institute of Technology, Indian Institute of Information Tehnology
 
@thefourtheye my connection is too slow. It's still confirming.
 
I understand :-)
 
i done it finally..
 
2:44 PM
Ok next question: I see from that Wikipedia page that "IIT-JEE is conducted only in English and Hindi, making it harder for students where regional languages, like Tamil, Telugu, Kannada, Urdu, Oriya, Bengali, Marathi, Assamese or Gujarati, are more prominent". I know that at least one of my friends is from a muslim family, and another [is/speaks]* gujarati ... are they less likely to hae gone to IIT for the quoted reason?
*not sure whether gujarati is just a language or a cultural identification.
 
@ZeroPiraeus I studied in Tamil medium, so I found it difficult to read and write English at the beginning of my career
And my town had not much exposure, so I never heard of it, till I completed my college course
So, people from village and south india might found it slightly difficult because of the language, I guess
There is also a language called Gujarati :)
 
Yeah, I know that someone I know speaks Gujarati, but wasn't sure whether you could describe someone as being Gujarati in the way you can describe someone as being e.g. Texan.
 
@AvinashRaj Coincidence? ;-)
 
yep,,
again replacing one or more newlines will give the desired output.
 
@ZeroPiraeus I am not sure if I they find it offensive :(
 
2:51 PM
@ZeroPiraeus I didn't know there were a lot of Indians in Chile. But there are a lot of Indians, so I guess they will go wherever.
I imagine most good programmers are self taught, in India or anywhere else.
 
@FaheemMitha Santiago in particular is a centre for IT in South America, and wages are higher here than elsewhere on the continent, so it attracts immigration.
 
I think an Indian education is more of a hindrance than a help when it comes to programming well.
That may be the case more generally, but I've experienced Indian "education" first hand, and so I can speak on that point with some confidence. It's terrible.
 
Oracle is a big employer of Indians here (though it doesn't sound like a pleasant place to work).
 
@ZeroPiraeus I see. This is Chile, right?
 
Yep.
 
2:54 PM
@ZeroPiraeus Oh, really? Why not?
 
Just a nasty corporate environment ... management by fear etc.
 
@ZeroPiraeus I see. Is this based on first hand exprience, or talking to people?
 
Talking to people.
 
Why would Oracle have a big presence in Chile? Outsourcing?
 
If your work visa is tied to your contract, fear is an effective if unpleasant motivator.
 
2:56 PM
Or do they do a lot of local service work, perhaps?
@ZeroPiraeus That's true of lots of other places. The US has terrible immigration rules, for example.
 
TBH I'm not sure what the specialism is. Lots of international companies have their South American centre of operations here though.
 
Ok
@ZeroPiraeus Lots of people want to go to the IITs. Almost entirely because of money. That's the the only thing anyone in India cares about. Aside from religion and family.
I think most Indians have a dim feeling that an education is a good thing to have, but most people don't really understand what that means.
 
@FaheemMitha IME that's not the only thing - my ex-flatmate Shiv seemed to care more about the laydeez than anything else ;-)
 
@ZeroPiraeus Oh, yes, that too, I guess. Sexual repression is a big-time thing in India. I mean, BIG.
 
... and Formula 1.
 
3:00 PM
@ZeroPiraeus Racing? That's more unusual. Usually it's cricket.
 
Utterly obsessed. Can't see the appeal myself.
 
So, how are things in Chile these days?
 
Well, the weather could stand to improve ... it's supposed to be spring ...
 
Ok, well, I meant more generally.
 
Things for me, or things for the country?
 
3:02 PM
When I talk to some people from SA, they say the whole continent is going to hell in a handbasket.
@ZeroPiraeus Either. Both.
Anyone here using scons? I like it, but sometimes it is a little DIY for my taste.
 
@FaheemMitha No, that's definitely not true. Chile has been doing very well economically recently, and the poorer countries have seen significant improvements due to not having governments that just steal everything and give it to their mates lately. Argentina's in trouble, but elsewhere things are looking up.
 
@ZeroPiraeus Good to know.
I think one person I talked to was from Argentina. That's the country that was ruled by Chavez till recently, right?
 
No, that's Venezuela - and to be fair things there are, er, not great right now.
 
@ZeroPiraeus Ah. Excuse my cluelessness.
 
In Argentina it's Kirchner, and they've been having some serious economic problems, but remain #2 in the region.
 
3:07 PM
@ZeroPiraeus I see. What are your personal feelings about Chavez? People have seriously mixed things to say about him.
 
His government dramatically improved the standard of living for the average Venezuelan, especially early on, but he was altered by the attempted US-backed coup in 2002. Became increasingly autocratic, started to conform to the stereotype that was painted of him.
And there's the usual problem when a movement is personified by one individual - he ended up surrounded by yes-men, and as a result there was no good successor around when he died. Maduro is hopeless.
I wouldn't like to live in Venezuela right now. The crime rate is appalling.
 
@ZeroPiraeus Interesting.
@ZeroPiraeus Yes, that's a common problem.
In poor countries, anyway.
Have the reforms that Chavez initiated persisted?
 
Not just poor countries ... every Republican presidency since 1980 has had a Bush on the ticket; that's not good.
 
@ZeroPiraeus Well, the US has big advantages over a place like Venezuela. Dramatically higher literacy rates, for example.
But yes, agreed about the Bushes. India has a Gandhi infestation. In a country of 1.3 billion people. I'm Indian, BTW.
 
@FaheemMitha Well I'm not there, so I can only go by news reports, but while I think the improvements in literacy and access to health will last, corruption seems to be undoing a lot of the early good work these days.
 
3:16 PM
@ZeroPiraeus I see.
@ZeroPiraeus are you a native Chilean, or an expatriate (I think that is the term commonly used).
 
I heard a little about the most recent Congress candidate - by all accounts the guy was an idiot.
I'm British - been in South America about eight years, eighteen months in Chile.
 
3:31 PM
@ZeroPiraeus Congress? What Congress?
@ZeroPiraeus Oh, Ok. You didn't sound South American, somehow.
 
@FaheemMitha Am I getting mixed up? I thought it was the Congress Party that always ran a Gandhi ...
 
@ZeroPiraeus You're right. It is. I wasn't sure if you were talking about India.
There are other Congresses, presumably. I think even the US has an institution called that. :-)
 
And a fine institution it is too (cough).
 
Congress, of course, takes its name from the Indian National Congress. Unfortunately, it now has nothing in common with that earlier institution apart from the name.
@ZeroPiraeus :-)
The INC fought for Indias freedom. These people would sell out India in a heartbeat if the opportunity arose. India, hell. They'd sell their own grandmothers.
 
Yeah ... I'm woefully underinformed on Indian politics, but the impression I got talking to my flatmate was that none of the significant parties there are exactly wonderful at the moment.
 
3:38 PM
@ZeroPiraeus When it comes to power - change is important. No matter how good the person, eventually (for a myriad of reasons) they will become a burden
 
Oh, absolutely. My family is steeped in the Labour movement, but no-one who's seen a city council with 40-year unbroken one-party rule would seriously claim that's a good thing regardless of the party, I don't think.
 
@ZeroPiraeus Unless they're actually crazy. Hence why the Labour party is floundering in the UK. They've basically expected people to stick by them, no matter what. Now they no longer stand for what they used to and people and starting to change
That's exciting. Despite the fact I detest UKIP and the SNP, the fact they're a thing shows that the UK democratic process is alive and working
 
@ZeroPiraeus India is in a very very bad way. The politics is just one manifestation of that. Which is not to say that lots of other places aren't doing badly too.
 
Gotta admit I find UKIP very, very worrying. I'm in favour of more, smaller parties, and of coalition (despite the current lot giving it a bad name), but far-right parties with charismatic leaders scare me to death.
 
@ZeroPiraeus UKIP?
Must be something new. Anti-immigration, I suppose?
 
3:44 PM
@FaheemMitha UK Independance Party
 
1 message moved to Trash
 
They're a little more than that, but yeah
 
@ZeroPiraeus I don't like coalitions. At all. They may not represent the reason why you voted for that party. But ultimately, people forget that they're not voting for a political party. You're voting for a candidate to represent you in government.
 
@OMGtechy Ok. I heard somewhere that Scottish referendum failed to pass, btw.
 
@ZeroPiraeus why the removal? :(
 
3:44 PM
Sorry @OMGtechy - I get the reference, but that's not staying in the room.
 
@OMGtechy I meant, among other things.
 
Mmm k
@FaheemMitha it did, but I think it's good that they got the chance. People still rioted a bit though
 
@OMGtechy noted?
 
If that person tries their best to look after their constituency, that's the best you can hope for ultimately. Otherwise you end up with our current system. People voting red, voting blue because that's what they've always done, despite their local candidate being an absolute dobber
 
@IntrepidBrit indeed, I try to balance a little between local and national politics when I vote, but it's difficult
@FaheemMitha ?
 
3:46 PM
Don't be fooled by UKIP. They're extreme (and failed) Tories that are jumping on an anti-EU bandwagon to push their CRAZY reforms - turning us into an ultra-extreme version of the US
Look how they voted on TTIP - that should be their main rallying call right now - but they're kinda quiet on it (and most didn't even vote on it)
 
@OMGtechy Not sure what you meant by "People still rioted a bit though". Some idiom I'm unfamilar with, I presume.
 
@FaheemMitha Do you know what a riot is?
 
Because it's all to do about UK self-determination (apparently)
 
@OMGtechy yes
@IntrepidBrit TTIP?
 
@FaheemMitha they rioted
 
3:47 PM
@OMGtechy It is - but do the best you can. If there's no candidate you like, you run or encourage someone you know (of) that might be able to do a good job.
 
I think parties are inevitable in any democratic system we've come up with so far ... and given that they exist, coalitions can lead to a closer expression of the average will of the electorate.
 
@OMGtechy Oh, god. I read that as noted, not rioted.
 
@FaheemMitha Leglislation between the EU and the USA. A very USA favourable trade agreement that threatens institutions like the NHS
 
cbg
 
@IntrepidBrit yeah, it seems to be ending up as who is the "least bad" now
 
3:48 PM
hola
 
I'm not saying I could do the job any better FYI
 
@IntrepidBrit Oh.
 
@Jerry allo
 
@FaheemMitha (it's currently in progress)
 
s'up guys?
 
3:49 PM
cbg @Jerry - just solving all the world's problems :-)
 
@IntrepidBrit Sounds nasty. Ok, again, any scons users here?
 
how noble :)
 
@ZeroPiraeus Yes, partyism is enivitable in any democratic environment. Don't disagree there. You either pander to it (and then we should go full PR) or we encourage candidatism (which is what the current system is based on, regardless of how it's currently ran)
I don't like coalitions because you might have voted Lib Dems, but not actually get any of Lib Dems' policies that you liked.
The Lib Dems invested heavily on the voting reform bills that failed as part of the coalition
 
@IntrepidBrit Hahaha yes, that might happen ;-)
 
Some people voted Lib Dems based on their stance on Trident renewal; and were ultimately let down
So the coalition was bad because you don't get a say on which policies the parties will agree on
 
3:53 PM
Hell, I voted Lib Dem last time. Not a mistake I plan to repeat.
 
I voted Lib Dem last time. I will vote Lib Dem again, because my candidate is rocking
Michael Moore did us proud in the Scottish Indy Ref, as well as answering my queries based on his policies and the way he votes
(Poor bugger must be sick of me by this point)
 
I think you can mitigate the party/individual thing with better regionalism; unfortunately the UK has been going the other way in general.
 
What do you mean?
 
Well, apart from the Scottish and Welsh parliaments (which it's quite clear Blair didn't want to do but felt hamstrung), power has been centralised consistently over the past few decades.
City councils have less power, County Councils have been abolished, etc. etc.
 
guys how can I install phonon in Windows?
 
05:00 - 16:0016:00 - 22:00

« first day (1464 days earlier)      last day (3488 days later) »