« first day (1512 days earlier)      last day (3440 days later) » 

5:19 AM
I know Python, but not as a statistics workbench. Moving from R, how do you do basic stuff like find out the dimension of your dataset, subset your dataset, etc.
Is that part of base Python, or part of a package?
 
 
1 hour later…
6:32 AM
@Heisenberg http://www.gregreda.com/2013/10/26/intro-to-pandas-data-structures/
http://pandas.pydata.org/pandas-docs/version/0.15.1/
 
6:56 AM
@Swordy I have googled a bunch and found out that numpy's array seems very similar to R's data frame / matrix / vector
how does panda add to numpy?
 
 
2 hours later…
8:28 AM
@Heisenberg numpy arrays are general N dimensional arrays. I suspect you want pandas Dataframes. They allow the features you'll want.
Named columns. Pivoting. Groupby. Etc.
Pandas is built using numpy I believe. They're both members of the so called 'scipy-stack' which is a set of packages built for this kind of stuff that all work with each other.
 
8:57 AM
@Heisenberg if you have any questions about it then ping me with @Ffisegydd. I'll be around most of today.
 
 
2 hours later…
11:21 AM
cbg
Library recommendation request.
 
11:42 AM
Unclear what they are asking.
 
12:09 PM
@Ffisegydd u have an account on asana?
 
No
I don;t know what Asana is
 
Asana is like a task manager..
You add tasks on projects
that will come in handy for kaggle-forest
 
Or we could use Issues on Github, cos then it'll all be on GH.
 
yeah github takes care of the code part.. this will take care of objectives..
just check it out and let me know
 
So you can create Issues/Tasks/Etc. Add labels to them etc.
 
12:12 PM
ohk no probem then
 
For example what we should probably do first is get the code ready to read in the data
 
12:23 PM
I haven't yet looked at the data yet.. :P . And where could we discuss issues related to it? i mean a live chat kind of thing..
 
Are you on Google+?
Could use Google Chat
 
yes. u mean hangouts?
 
Yeah
 
u have my email , ping me there
 
I lost your email, you can add me at kjpizzey@gmail.com
Or you can copy yours here and quickly remove it again
 
12:27 PM
i pinged u myself..
u were already in my google + circles
 
Cool
 
1:11 PM
So painfully mortal
 
Wuh?
 
(hungover)
 
Oh I see.
Hair of the dog?
 
It'll have to do, whether I want to or not. 2 birthday parties tonight
It's going to be a long weekend
Please tell me about your idyllic day, where ambulances don't reduce you to tears?
 
I am playing WoW, watching HIMYM, and writing some Python.
 
1:28 PM
that's impressive multitasking
 
I was thinking that
 
Dual screens.
 
hehe.. about dual screens
my new setup is dual 27" => 5120 * 1440 :)
 
lucky! I just... commandeered this monitor from somewhere
 
actually I'm dreaming of having this setup at home
but that have to wait
 
1:40 PM
Someone should invent those hologram monitors that are in futuristic movies
 
well, I believe the future is stuff like the oculus rift
we have 4 of those at my workplace
and that is just amazing
 
buh? What kind of stuff does your company do?
 
and if combine them with a brain-wave-sensor
@corvid trying to build innovative stuffs?
:)
we are building a mind-controlled ping-pong game right now
 
How does that work? Is it like a EEG?
 
one sec.. I forgot the name of the device we are using..
 
1:44 PM
Hello
Any one is here ?
 
nope, no one is here
 
Hello Corvid
 
'ello 'ello
 
@corvid we are using Emotive EEG EPOC
 
derp nevermind completely different, that thing looks awesome though
Your job sounds cool, Peter
 
1:46 PM
actually it is awesome :)
@corvid thanks -- hopefully I will stay here for a long time
although right now, my particular task is "kinda regular" => I'm building a git and wiki based project management and documenting system
 
I am Python programmer having little experience with web development. And right now I am looking for contributing to some opensource projects. From where I can start ? Any guideline ?
 
@Fledgling I guess, before you contribute, you should have a bit more than "little experience"
 
I feel like that's every job. My brother works in video games, and most of the tasks seem somewhat mundane, like fixing tiny little bugs
 
you should try to build some projects on your own; read others codes; watch and learn from videos and tutorials and documentations
 
@PeterVaro Thanks, any links ?
 
1:50 PM
it's hard to tell if other's code is good, when you're looking at something you're unfamiliar with
 
@corvid well, I guess that is, what programming is all about => slicing the big problems into smaller ones, and repeating that task, until you have atomic problems/solutions and then you have to implement that
:)
 
programming / all engineering and problem solving
it's a universal skill to be able to break a problem into component parts, fix component parts, then merge them back into the original pieces
 
cannot agree more
 
Anything else ?
 
@Fledgling Django or Flask?
 
you can start with this tutorial, it's a good "up and running" kind of start. He also wrote a book, the result of which is in this git repository. Bit of fair warning: with flask you can do stuff quite differently than how he chose to do it.
 
Django
 
Django has an official tutorial, that's probably the de facto starting place
 
@corvid Thanks, I have gone through it. I have also developed 3 web application with django
 
can you contribute to Django or any Django-based extensions you use frequently?
 
2:00 PM
Yes
 
I am not sure if my question is too stupid to ask on SO :\
 
@Fledgling: check out the bug trackers for the projects. Find something you think you can fix, and submit a patch for it. Chip away.
 
@MartijnPieters
 
hey Martijin, quick question, is it possible to have a PHP page work on a flask app? Is that a stupid question to begin with?
 
2:15 PM
@corvid Ick. Ni!
I suppose you can call the php command line with subprocess.
or host it on a web server and use requests to retrieve the output.
 
It's on heroku, so that might effect it
 
@corvid I have no idea what limitations Heroku puts in place, TBH. But I'd not expect a php command line executable to be available..
 
if you do render template with a php file, I presume it should not work as intended?
 
@corvid You can render PHP code, but that doesn't mean it'll be executed.
Python won't execute PHP code.
 
hmm okay, excuse my lack of knowledge of how PHP works
I feel like it might just be easier to make a PHP app to begin with and move everything over
 
cbg @Zero
@Ffisegydd thinks you're an orangutan: chat.stackoverflow.com/transcript/message/20308154#20308154
 
Ook, finally my outspokenness is recognised!
And, er what?
;-)
 
apparently there was a bug with the job that gave out that badge, so a bunch of us just got it: meta.stackoverflow.com/questions/278596/…
 
@Zero not a Discworld fan?
 
2:37 PM
Yes, absolutely ... my "what?" was pre-link-following. I approve :-)
What did @Intrepid do to get saddled with Nobbydom?
 
I practiced shaking hands with their front doors.
 
That ... I don't even want to know if there's some implied euphemism there.
 
I'm pretty sure I butchered ad-libbed one of Nobby's favourite past times, breaking and entering
 
I thought Nobby fit you very well.
 
3:05 PM
what's the linux equivilent to Mac's cat file.txt | pbcopy?
 
3:20 PM
cbg python people
 
85
Q: How can I copy the output of a command directly into my clipboard?

LegendHow can I pipe the output of a command into my clipboard and paste it back when using a terminal? For instance: cat file | clipboard

 
4:05 PM
cbg
 
@JonClements cbg
 
Turning out to be a busier day than I expected... sighs
 
quiet today. I've received all of 6 votes, and 4 accepts, after posting 5 answers.
with all but one of those votes on those answers as well.
Presumably people are enjoying their holidays or something..
grump grump grump
 
poor Martijn :p
 
4:22 PM
6 answers..
vote and accept count unchanged.
I think my Meta.SO and Meta.SE votes outstrip SO today.
grump grump grump grump grump
 
@Martijn you're "grump"ing like it's the end of the world as we know it :)
 
 
2 hours later…
5:55 PM
No code posted for a 'why doesn't this work' question.
 
Well, didn't get the bounty for that question because my answer was posted before the bounty and the op never awarded it. Poof, 100 rep disappear into the ether.
 
Ah yeah I had that issue with a bounty too.
 
6:11 PM
@MartijnPieters a-m-a-z-i-n-g:
(as almost everything from the last two decades from mehldau)
 
More Triage Queue feedback:
2
Q: Closing questions should be easier in the Triage queue

davidismAfter using the Triage queue for a few days, I've marked many questions unsalvageable. However, I've always used a close reason; I have not run into anything that should be flagged. Right now, voting to close requires five steps: Click Unsalvageable Find "Should be closed for another reason" ...

 
@PeterVaro I'll have to listen to that another time, I don't have headphones with me (and need headphones here).
@davidism already voted, wholeheartedly agree.
 
(you also need headphones for the fine details too -- I can accept that :))
 
@PeterVaro this is great. Need more. (And I'm listening on headphones.)
 
search for Mehliana -- Taming the Dragon
or any of Brad Mehldau's albums, however, the previous ones were almost 100% pure acoustic
Mehldau is one of the greatest pianists in the contemporary scene, and I'm dare to say, probably all time
an amazing composer, soloist and improviser as well
you should search for his Smells like Teen Spirit cover too
(this was an amazing concert/performance)
since I'm also a huge fan of Kurt Rosenwinkel and Joshua Redman, you also should search for their "all star" quintet with Brad Mehldau
 
6:34 PM
@Ffisegydd I'll get my broom.
 
:D
 
6:48 PM
teaching my 7-year-old about iterators today :)
 
6:58 PM
Hrmz, seems someone is slowly serial voting my Meta answers. Weird.
 
7:18 PM
never mind. It's still a "debug my code plz" question, though...
 
7:33 PM
@MattDMo that's definitely turned in a stream of comments of "Oh, that's also something I accidentally removed..." :)
SO rubber ducking it appears :)
 
@Jon, yeah, that's why I cut it off and suggested he go it alone for a while. If you go back to the original revision of the post you can see his full code dump - there are a bunch of try/except blocks that he can get rid of to debug properly, or at least make more specific, but it shouldn't be too difficult a job for someone with the ability that he's demonstrated by writing the code in the first place.
 
7:52 PM
Just the newbie - wrote a load of code without understanding quite how it all works, then a bit stuck as ways to fix it as too much is borked in one go... we've all been there :)
Wow... a 3gb compressed SQL dump... this'll be fun
I was expecting 30k rows from a specific table... I'm guessing someone couldn't be bothered to just dump that single table :(
Wonder why linux is choosing to use 17mb of swap, when it's still got 15gb of physical spare... seems a slightly bit odd
 
8:17 PM
this is the worst website ever :|
 
Wow... these sausages are awesome... pork with welsh cheese and herbs... these are going on the "get again" list
@MartijnPieters surprised by your lines = information.read().splitlines() there
 
@JonClements The OP wants all lines in a list with no newlines. That method does that.
 
8:32 PM
Indeed... at the cost of having to hold the file and the split list in memory simultaneously...
 
isn't there a readlines() method?
 
@corvid yes - but it doesn't strip automatically
 
8:48 PM
@corvid For the love of Guido PLEASE take my advice on the question you just posted a few minutes ago about running PHP from Python on Heroku. Those mysql_* methods should be folded, spindled, mutilated, and destroyed, as there are major security issues with them. Even though you're not getting user input or anything, you still shouldn't use them. Generating a PDO object will take slightly longer (code-wise, not time-wise), or you can use mysqli_* methods.
 
@MattDMo it's just for a class, though, and the teacher himself did it
 
then your teacher should be reprimanded - just send him a link to the docs and ask him to read the lovely pink box at the top :)
for the most part I think you can just add an i after mysql in the methods you're calling. He might not even notice, and if he does you can diplomatically explain that he's a chowderhead.
 
@MattDMo I had to downgrade a php install because I ported it to one system and it had mysql_* everywhere - I wasn't being paid to fix that, so I wasn't spending time on changing them all to PDO
 
just add an i you say? Because it does seem to not be working
 
sorry, @Jon. And people wonder why we still have SQL injection exploits through PHP, god knows how many years after the issues were first publicized...
 
9:03 PM
@MattDMo well - it got re-written in Python anyway... 3,000 files and about 300k lines, down to about 40 files and 9k lines
much easier to maintain now :)
 
very nice
 
although remarkably painful to do at the time as it wasn't even well written PHP... more just lots of unrelated stuff smashed together and copy/pasted into other files with a couple of bits changed and... sighs
/me mutters to himself... don't think about it... don't want nightmares again, don't want nighmares!
 
That's one of the major reasons I've tried to stay as far away from PHP as possible - it's just too easy to write everything declaratively, and mash 100 unrelated things together. Of course, having your logic embedded in your presentation code and template contributes to this. Then there's the "user-contributed notes" in the docs, with no moderation system or reply-to capability. And then there's...
continue ranting for hours without running out of steam...
 
LOL - this didn't even use a template or routing framework... loads of .htaccess re-writing urls, html building dynamically and embedded CSS, no centralised SQL, it got repeated in several places including connection strings etc.. etc.. etc...
 
9:19 PM
two words - MAGIC QUOTES
 
@corvid: teachers are not exempt from stupidity.
@corvid: I note that Tomasso is telling you to run PHP exactly the way I expected you'd have to do it..
 
9:48 PM
does render_template remove characters sometimes, or interpret characters differently than what they are?
 
@Ffisegydd interesting :)
heya @JohnY - how goes it?
 
Suppose he needs something to do. God forbid that he got a real job.
 
Cabbage, all!
 
cbg John
 
10:00 PM
It goes OK, I guess. I was hoping to get some work done for work, but I'm on a laptop which I can't really do real work on. (I basically inherited this computer from my wife, and her user input sensibilities are vastly different than mine.)
 
Ahhh... sounds like me when I boot up an old windows laptop - that short of typing a document or flicking through SO - isn't really good for much and it's frustrating...
 
Right. I happen to like Windows, but I'm sure you are understanding the feeling I am trying to convey.
 
Indeed I do
 
10:16 PM
@Ffisegydd Not really fair ... the typical MP works very hard and takes a lot of abuse for a much lower salary than they could get elsewhere, out of a belief in public service. Whatever your opinion of Salmond's politics, I've never seen him accused of laziness.
 
@MartijnPieters already nuked :)
 
@MartijnPieters not even sure if it's working :\ it just keeps spinning at one line
 
10:57 PM
@JonClements: can I ask for a re-dupe?
 
Sure...
 
I duped stackoverflow.com/questions/27337393/… but the other post I found answers it better.
The OP was right, it was not about extracting text but about finding an element by text.
 
done
 
Thanks!
 
wow... got the data uploaded... plenty of coffee on stand by... going to be a long night :)
 
11:03 PM
time for QI XL
Rhubarb all!
 
@MartijnPieters enjoy... rbrb
 
11:23 PM
(lovely talk from 2007)
 
cbg @Peter
 
heya @JonClements
howdy?
(long time no talk ;))
 
fine.,.. not long started what's going to be an all nighter... howdy?
 
ahh.. I'm all right.. working my bottom off, also learning a lot -- and pimping my arch system -- so I guess: same old, same old :P
so what's the all nighter about?
 
migrating some DBs and stuff
hehe... like the sound of that: "pimping my arch system" :p
 
11:31 PM
actually I'm in love with my new system -- I almost have everything I ever wanted
I have bit-perfect music playing for example
 
ahhh... didn't you have some trouble with that being somewhat erratic occasionally?
 
yeah -- with the on-board sound-card
but I finally ordered the same DAC I have at home
and now it is working extremely well
almost plug-and-play like => I only had to do minor changes in some conf files, to make it bit-perfect
but hey, you are still reading all the backlogs, aren't you?
 
Not so much recently
cbg @davidism
 
cbg
 
cbg @davidism and @MartijnPieters
btw @davidism thanks for the wtforms reply earlier
although I'm still confused about them
are you using them, like "always"?
or only in special cases? (like login inputs?)
 
11:42 PM
I use them in all places I want an HTML form.
 
...and the reason is?
 
So that I don't have to render the inputs/values/errors manually, and don't have to coerce/validate the data manually in many cases.
I also don't have to generate/validate CSRF protections, it's added automatically.
 
hmm.. fair enough.. I will do my homework then :P
 

« first day (1512 days earlier)      last day (3440 days later) »