« first day (1279 days earlier)      last day (3670 days later) » 

5:05 PM
 
Is there a Py2Exe for 3.4? I can't find it.
 
@JonClements so would you just reference it like return render_template('folder_name/template_name.html'), all the same?
 
@qwertynl long time no see... cabbage...
 
I can't find a working .py to .exe compiler / freezer for 3.4.
 
Yeah, shame on py2exe for only working on Python 2
Get with the program, dudes
 
5:20 PM
They held a meeting and decided that py3exe didn't sound good - so it wasn't going to happen :)
 
Can't they see, they're tearing us apart :'-(
 
I'm so despondent I've gone mostly silent as I just can't face talking about it anymore :*(
 
But seriously, big projects' reluctance to migrate is a real problem, and discourages users from adopting 3.X.
 
;-;
 
Case in point, we're probably at T minus four hours from Iplodman saying "F it, I'll just write my app in 2.7 so I can use an executable maker that actually works"
 
5:35 PM
errrgh WHY does oracle make all their products such a pain to use?
 
Their core mission statement is to cause the suffering of mortals
 
so... in linux, can you use a variable as part of a path? Eg, ln -s $PLACE/blah.txt blah
 
it prints found for every movie which i stored before(that means it didn't delete). although for any new movie which i try to search(never tried before on this app), goes to else, which is expected
what am i missing here?
 
@AjGauravdeep you need to properly indent that... it's very difficult to tell what you're doing...
What would something called insertMoveTuplesInDb try to remove something ?
 
Jon, i tried the stack overflow indent, but didn' t work.
can you remind me how do you do it.
 
5:42 PM
press the fixed font button next to send or highlight it and press ctrl+k
1 message moved to recycle bin
If you can't work it out - put it on a temp gist or pastebin or something :)
(ps: there's some notes on sopython.com/chatroom as well re: this)
 
cool. fixed font worked for me... clt+k didn't
@JonClements so yes, what am i doing wrong here about removing?
 
Could you clarify what you're trying to remove ?
 
from pymongo import MongoClient

client = MongoClient()
db = client.movies_db

movies_coll = db.collection

def insertMovieTuplesInDb(movie_name, adjective):
    posts = db.posts
    movies_coll.remove()

    post = posts.find_one({"name": movie_name})
    if(post):
        print "found" , post
    else:
        post_id = posts.insert({"name": movie_name, "sentiments": adjective})
        print "storing now \n \n \n", posts.find_one({"name": movie_name})
so if you see here, i do insertion whenever post = None.
now for testing purposes, i wanna make sure that this collection is empty when i do my first insertion.
 
You're using different collections... I don't get what else you expect to happen
1 message moved to recycle bin
 
what do you mean different collections.
 
5:51 PM
well, your moves_coll is effectively client.movies_db.collection and you're doing all your stuff with client.movies_db.posts
You're calling remove on the movies_coll, but otherwise you never do anything else with it
 
@Kevin "Case in point, we're probably at T minus four hours from Iplodman saying "F it, I'll just write my app in 2.7 so I can use an executable maker that actually works"" - I'm nearly there.
 
can you help me understand the concept of posts?
 
Getting junk installed and running has always been a trying task for me, so I can relate
 
@AjGauravdeep collections don't have any real names - you could name it anything. But if you don't understand what it's supposed to represent - I really can't help you at all
 
Can anyone recommend a py2exe style thing that FU-... that works with 3.4?
 
5:54 PM
i understand it's like table in relational database.
 
Plz guys ;-;
Halp meh ;-;
Y u do dis cx_freeze?
;-;
 
@Aj right... I assume posts is meant to be what you're trying to store... are you meant to be running remove on that instead of movies_coll? The remove doesn't make much sense anyway...
 
Your tears will not make me any more versed in the subject than I already am (which is to say, none versedness)
 
I don't understand this error...
 
Thanks @JonClements

Your hint seems to work.

I just got rid of one collection and did work there itself.
 
6:03 PM
backwards arguments, I'm dumb
 
I'm not being mean, but this guys, is the perfect example of a cretin. stackoverflow.com/questions/23139141/how-to-do-maths-in-python
 
I think he takes himself a bit seriously!
> I am an expert in maths so please do not make me out to seem stupid!
And also uses too many exclamation points!
 
Dude! No way!
 
I would think a master math(s)ematician would be more rigorous in describing a problem than "it doesn't work for some reason!!"
 
@Kevin I NOTICED HE USED TOO MANY EXCLAMATION MARKS! Also, what are we meant to do with 'It doesn't work for some reason.'.
Le' sigh.
I reckon he just thinks the average of 5 and 5 isn't 5.
 
6:09 PM
From his comment, "I have sorted it now! just had to move some coding around!", I assume his actual problem has absolutely nothing to do with the code he posted.
Because the only possible "moving around" he could do with that code is to switch the order of those lines, which won't help
 
Or, in fact, just get the god damn indentation right.
"just had to move some coding around!" - He had to take the laptop to Norway first.
 
cabbage @Sean
 
I'm starting to suspect a troll, really. 1) Sloppily transcribed code 2) "creative" use of punctuation 3) ignores questions made by commenters 4) takes criticism personally
 
I've submitted a brief edit so the question makes sense based on what he's saying in the code.
I took a single frame from that video of a kid being kicked by a train driver. imgur.com/c8sr3hb
 
what is rpm in linux, exactly?
 
6:22 PM
rotations per minute
 
Revs per minute.
#Honest
 
Assuming we're talking about Linux Brand Flywheels, available at your local hardware store
For Linux the OS, it stands for "RPM Package Manager"
(one of the many recursive acronyms found in the programming community)
 
@JonClements Hows it goin? :-)
 
@qwertynl banana ty - potato?
 
@JonClements eh?
 
6:27 PM
You mean "The Silence" haven't aren't aware of Salad yet? :p
 
releases per microsecond
 
People have been saying a lot of strange things today. Maybe I'm mildly concussed.
 
that's how fast the LINUX community is.
if linux were an automobile, they would be selling you a vehicle that looks like Humvee, drives on all surfaces and goes 1 million miles per gallon of gas and doesn't need any servicing.
Cabbage All.
 
@abhi but because it doesn't look as cute/cool as the Apple made car - no one believes it's actually any good?
 
I agree. Has anyone here read Neal Stephenson's In the beginning was the command line ?
 
6:32 PM
I can't say I have...
 
The Apple car is a beast but yuo can't open the hood.
 
^
So if it needs servicing, it's yammed.
 
It can go about 300 MPH in the right conditions and you can get a decent gas mileage and a decent resale value.
@JonClements let me send you a link.
 
@abhi I did years ago
 
They have it on georgetown.edu
This is a 1999 book.
but the car dealership analogy is right upto the mark.
@Ffisegydd It was a good book. I recently found a copy online.
 
6:38 PM
@Ffisegydd STEWIE!!!!!!!!!!!!!!!!!!!
 
@Jon BRIIIIIIIIIIIIIAN!!!!
@abhi I've enjoyed all his books to date, though the rest of them are sci-fi/fantasy/crazy.
He's written a few other essays on computing I think though.
 
@Ffisegydd I haven't read his other books.
My favorite author is Terry Pratchett
 
Terry Pratchett is amazing.
 
Which one is your favorite?
Mine is Making money where they invent Paper money.
 
I'm a big fan of the Guards books, my favourite is probably The Fifth Elephant (incidentally it was also the first Pratchett book I read)
 
6:42 PM
Yes. I loved Guards Guards as well.
I believe that was his first book.
or are you referring to books where the night guard plays an active role.
 
Can't go wrong with Small Gods
 
Sam Whatshisname..
 
I finished Raising Steam last week - I give it a B-
 
#KarlPilkingtonIsTheMasterAuthor
I love his stuff.
 
Guard, Guards wasn't his first book, it was The Colour Of Magic.
 
6:45 PM
@Ffisegydd it might be the first kind of "sub-genre" with Vimes in it?
 
Are you sure?
Vimes was the name I was looking for.
 
Ah yeah true, Guards, Guards is the first in the kinda "Guards" theme.
Colour of Magic was the first ever Discworld book (which is what I thought you meant)
 
No. I always suspected that Guards Guards was his first book.
So I have been wrong all this while.
 
It'll be a sad day when Pratchett stops writing/isn't able to write/passes away.
 
It'll be a very sad day.
I cannot do without my yearly dose of more Pterry writings.
 
6:56 PM
Guards, Guards was written the year I was born O_o
I never quite realised he's been writing them since 1983.
 
@Ffisegydd 130 to go Stewie..... Stop talking - start repping! :p
 
@Jon pah I'm sat staring at the Newest questions page.
 
Um... don't think you've yet mastered the "staring at the page to make it give you answers" ninja trick...
 
I don't want answers! I want questions I can answer! :P
Does anyone have a canonical answer for mutable default arguments for stackoverflow.com/questions/23141304/…?
nvm got it
 
692
Q: "Least Astonishment" in Python: which scope is the Mutable Default Argument in?

Stefano BoriniAnyone tinkering with Python long enough has been bitten (or torn to pieces) by the following issue: def foo(a=[]): a.append(5) return a Python novices would expect this function to always return a list with only one element: [5]. The result is instead very different, and very astonish...

@Ffisegydd QUICKLY!!!!!
 
7:08 PM
He got it.
 
Hah.
 
I should probably research that answer's actually correct, but have a vote :p
 
I was too busy answering it to answer you Jon :P
 
And with links - very nice... :)
 
Gotta have the links :P just so people can view the mess that is the matplotlib docs for themselves and then cry themselves to sleep.
 
7:17 PM
What would you advise to this developer?
0
Q: Updating string values in a table to be flopped around such as YYYYMMDD string to MMDDYYYY string

Jaron CookI have a table setup for example as CREATE TABLE Test_Table ( ID int, DATES varchar(8) ); and my table looks like this when selecting it | ID | Dates | ------------------------ | 1 | 20140911 | | 2 | 20140101 | | 3 | 20140829 | I'm trying to update my table...

 
Use a date type, not a string
Reading the comments, I'm in good company :-)
 
@Jon 95 left. We need to find a well-known Q/A that doesn't have a canonical answer (like Vader did) and write it up. Then I can get all the reps...
 
@Kevin yes, that's exactly my thought.
a lot of people still insist on using other data types.
i am not sure why they do that.
 
@Ffisegydd wow... sweet... or just a couple more questions like that?
 
If he were paying me, I'd probably propose some kind of substring trick... But I'm not going to perpetuate poor standards of my own volition
 
7:25 PM
 
how do you pass additional information to abort in flask? Eg, if something could have a 400 error for two separate reasons and you want to provide detailed information, what would you do?
 
Just spotted this heap of crap. I'm disappointed in you, community. stackoverflow.com/questions/23134441/…
It's beautiful how bad it is.
No, incredible.
Astonishing.
 
1 rep users that don't get the site culture is the background radiation of the site. It's everywhere, and always has been
 
Yep. Soooo sad. My 9 rep isn't exactly astounding, and I can't ask Q's, yet none of my Q's were ever like that.
*29, my bad.
 
@Iplodman You can't ask questions>?
What do you mean?
 
7:41 PM
Oh look @Kevin - your favourite in a question: if self.betType.upper() == 'STRAIGHT' or 'S':
 
urp. blech. mulph.
 
Ooo... and it gets better: if self.betType.upper() == 'BOX' or 'BOXED' or 'B':
 
rbrb all, signing off
 
@Martijn night night
 
Woo solved another problem for a question that I was struggling with earlier. I think that entitles me to some Baileys chocolate...
 
7:53 PM
Why not? :p
 
Why not have a nice glass of water instead?
Heck, put some ice in there too. May as well splurge!
 
I wouldn't want to go overboard with water...I'll stick with chocolate instead.
 
I need to get in shape... To paraphrase Kevin James, "I just don't want my gut to jiggle while I'm brushing my teeth"
 
@Abhi Sorry, was AFK. Apparently my -4 rep from my 29 rep means I can't ask Q's.
 
It usually takes more than two downvotes to get question banned... Have you ever asked a question, and then deleted it?
 
8:00 PM
if a user with 1 rep can ask a question, so can you
yes. I have done that once
asked a question and then deleted it.
 
See the faq. "One or two bad posts will not cause you to be blocked from using the site. "
 
Hm. That seems false, if you pardon the coding pun.
 
I just got my medical report.
I have passed 3 out of 5 tests
but the ones I failed are collosal failures.
 
D:
 
For example my fasting blood glucose level is 112 mg/dL
 
8:06 PM
That means nothing to me ._.
 
and my HDL Cholesterol is under 20 mg/dL
 
Nor that.
 
Yeah, it means if I don't change my eating habits, I am going to die of either heart disease or diabetes.
That's all folks!
 
:o
 
:-(
 
8:08 PM
Any one doing any project / web development on linux operating system?
I Just need to collect the strace logs of that system.Thanks
 
There must be a better chat room for that than this one.
 
Impossible! We're the best chat room of them all.
9
But no, I'm all Windows
 
^ Ditto.
@Kevin Any edits I could do to my post? stackoverflow.com/questions/23137383/…
 
I am UBUNTU + windows.
@user593908 You could always try asking this question on unix.stackexchange.com
You'll get a faster response, guaranteed
 
Cheers to whoever upvoted my post :3
39 rep - I still can't ask questions.
Ugh.
 
8:15 PM
It's hard to make a good answer to that question, since it's really hard to determine what the OP is trying to do
 
I finally made to to 1K rep in 2014. I hope to make that better by end of this year.
 
The char1[1] stuff is really baffling, so you can't give a satisfactory working answer, without basically rewriting the guy's code
 
@Kevin Yeah, especially from his code. I literally had no idea what the char[1] thing was trying to do at all.
It's a list/dic/Adding a key/value all at once.
Oh. My. God.
I swear.
He's used my answer to fix the code - posted another answer showing his new, working code - and NOT accepted my answer. Not impressed.
-2
Q: File saving error in python

Charlie1995I am having issues with saving my data i get with my code, im not sure how to finish it and i have a deadline approaching, so if someone could point out where i went wrong and assist me in fixing it that would be great. thanks import random char1=str(input('Please enter a name for character 1:...

 
Er, sort of. He doesn't even use strh1 after assigning it, now
 
You posted your answer 25 minutes ago. He posted that new one 6 hours ago.
 
8:21 PM
Really? My bad :P
 
I'm pretty sure this question has been posted at least 3 times today.
Possibly with 3 different account names
Because each time I think it got downvoted to hell and back.
 
Le sigh.
 
@abhi Actually it is not a Question answer.It is more like a survey and collecting the logs of the system
 
Anyone here familiar with cx_freeze?
I have no idea how to go about this.
 
user3444876
8:40 PM
@Iplodman I AM!!!!
 
@Guarav YAY!
What do I do, my lord?
 
When will developers understand joins?
 
user3444876
cx_freeze is unable to locate the module that initializes this program
 
user3444876
so..
 
Sooooo?
 
user3444876
8:43 PM
is this the original directory in which the exe was created?
 
Yep.
 
user3444876
okay
 
user3444876
could I see the setup script
 
I'm using the quickstart batch file.
But sure.
 
user3444876
okay
 
8:46 PM
I'm thinking it may be the system paths.
 
user3444876
Some library dependency may not be getting copied
 
user3444876
Do you have a 'build' folder in your main directory?
 
One sec, imma just re-run the build prcess.
I'm also using the modules tkinter, stmplib and imaplib if that helps.
When naming the exe during the quick-start should I use foo or foo.exe?
(@Guarav)
 
user3444876
foo.exe
 
Cheers.
 
user3444876
8:51 PM
does it work?
 
Just running it now.
Narp.
Same error.
It's worth mentioning that it runs console based apps.
Rather than GUIs.
 
path=%path%; @Iplodman
 
Hm?
 
your executable needs to be in the path of the system path.
that's one way of resolving an issue
 
I'm assuming that path=%path%; gives me the paths?
 
user3444876
8:55 PM
@abhi true
 
Bear in mind I wish to distribute the program.
 
user3444876
@Iplodman I am pretty sure that somewhere a dependency is not being loaded
 
Same.
Could someone tell me what path=%path% does?
 
that is an incomplete command.
PATH=%PATH%;"c:\pathtomyexe" will set the path
 
Ah, thanks.
 
user3444876
8:59 PM
I don't see a smtplib.pyd or a imaplib.pyd in the directory
 
They're in the library zip.
 
user3444876
ah
 
:l
 
user3444876
Maybe it can't find the library zip, you could try explicitly declaring them.
 
How would I go about that?
Also, just tried setting a path there. Didn't work ._.
 
9:03 PM
0
Q: Separating an address line into House Number, Street name, and Apartment in Java or COBOL

Aaron HI am currently trying to figure out the best way to take an address line and separate it out into three fields for a file, house number, street name, and apartment number. Thankfully, the city, state, and zip are already in columns so all I have to parse out is just the three things listed above...

It would be easier to ask two separate questions I suppose.
 
user3444876
@Iplodman basically define a list called include_files which has tuples for each library
 
user3444876
the tuple would be like(path, library)
 
So include_files = ("c:\path", Tkinter)?
 
user3444876
and then put that list in the build_options
 
user3444876
actually... just put the library names in the packages list
 
9:07 PM
buildOptions = dict(packages = ["tkinter", "smtplib", "imaplib"], excludes = [])?
 
user3444876
I believe tkinter is already specified
 
Rhubarb. Time to go home.
 
Cya Abhi.
It can't hurt to re-define it, can it?
Also, nice to see the cx_freeze devs use camel backing.
 
user3444876
next time perhaps try py2exe
 
py2exe isn't supporting python 3.4 ;-;
 
user3444876
9:09 PM
ah right
 
Or 3.x, for that matter.
 
user3444876
Would it be possible just to bundle CPython with your program?
 
cpython being? #CodingScrub
 
user3444876
cpython:The standard implementation of python, written in C
 
Ah, and how would I find that/bundle it?
 
user3444876
9:13 PM
You already probably have CPython if you downloaded it from python.org
 
So I just put CPython and the .exe in a zip?
Also, where can I find CPython?
 
user3444876
@Iplodman you just put python.exe and foo.py in a zip
 
Ah, cheers.
 
user3444876
Or you can have your customers download python, too
 
I'd rather they didn't have to, but it's an idea.
Although as it stands, the .exe still isn't working.
 
user3444876
9:17 PM
sorry, I have to go now
 
Kay, cya :D
 
9:31 PM
so friends. What is going on?
 
9:42 PM
@Crow Cabbage.
Just editing a favicon on tkinter.
Well, trying to.
 
how is tkinter? I've never used it
 
Great, you can see something I've been doing here: dropbox.com/s/t5dp0tafmate4ie/TigaMail2.1.PNG
Just an example.
 
9:57 PM
@Crow Pings
 
I'm being pinged D: all is lots
 
10:19 PM
xD
 
10:49 PM
Hi! a new Python user :)
 
Hi @user3546546 - welcome (or as we say - cabbage!)
 
haha thanks! that's cool
 
Are you new to Python or just new to chat and SO and stuff?
 
Well let's kick the ball for first :P

Because of the many questions that end up being typos (and by my own experience too before I made a checklist and memorized it), would it be of any help a library that had a database of "mispellable" words (regularly updated by the community) that would be checked against your own code? It could make the debugging easier and avoid questions that end up being code "typo-bugs".

Python. I made the switch from Php a week ago :) I feel it's easier and smoother than php, really, I wasted my time this years.
 
Okay - cool... not quite following you on the words thing, but, okay!
 
11:02 PM
I'm actually involved in building a Q&A and halfway done.
thanks
umm let's explain in a more concise way.

Suppose my code is like:

<input type='hidden' vlaue='{{ question.id }}' name='question_id'/>
{% for ans in question.answer_set.all %}
<input type='radio' value='{{ ans }}' name='answer'>{{ ans }} <br/>
{% endfor %}
<input type='submit' value='Submit'>

a debugger won't tell you that "vlaue" is not an html element and it should be "value" instead.

It's a small detail that could go unnoticed for hours pulling your hair like a monkey.

We can have a check like the following, saving us hours of stress:
 
You know that check as it stands is flawed as it isn't doing what you think it is ?
heya @abacus
 
Hey @JonClements
 
@user3546546 also - I believe there's things out there that can validate html and through up invalid attributes...
 
@JonClements Of course, it's a proof of concept, not real code.
Yeah that's what I hope, but didn't found any..
 
I'm running Flask on a website that does tournament statistics. I have a series of SQL tables (SQLAlchemy) that represent a tournament. For the user to access the tournament statistics, he goes to a page, which requests the information. I have functions on server that compile data from the SQL tables into a set of dictionaries, and these get sent to the Javascript clientside which dynamically generates HTML from the dictionaries.
This makes sure that the user always gets the most recent statistics. But my serverside functions take a long time (>15 seconds for large tournaments), so what I w
Or is there another way to do what I want?
 
11:17 PM
@abacus can you post some code?
anyway if I understand what you're doing you must use websockets.
 
climbi.com/b/NXwu38 this is the AJAX request. when the user goes to the /load page, it calls this to the server
climbi.com/b/FIhv2U this is part of the server code online, it takes data from the sql and generates a data structure
 
@abacus sounds a bit like you want AngularJS
 
which is passed back into the round_report function on server to create html
@JonClements I'm actually looking at using AngularJS in the future, but this has to be done by tomorrow (I didn't realize it would take so long to calculate statistics serverside for big tournaments) and I'm not that familiar with AngularJS
@user3546546 I'll look into websockets. Do you think my usecase would be pretty simple to implement?
 
@abacus I'll be impressed if you manage a websocket implementation in a day :)
@Peter youtube.com/watch?v=FcKzmy02Kpo - while I was meeting clients - they were playing a lot of stuff like this... starting to not dislike it so much at the moment...
 
11:38 PM
All right. I'm going to try for a rewrite in Python
I think that'll be better long-term anyway, and hopefully it goes faster now that I know about Jinja2 templating
 
Good luck then
 
Thanks
 
11:49 PM
@abacus well if it's for tomorrow then websockets are no 5 minute solution. If you understand MongoDB I would say go for it as it will be faster than MySQL.

Anyway be sure to profile your code. Here is a good Debugger for Flask https://github.com/mgood/flask-debugtoolbar to couple with the line profiler https://github.com/phleet/flask_debugtoolbar_lineprofilerpanel. I think that your "server" code is the culprit here, debugging it should not take much.
I suspect that rewriting your client code in Python shouldn't change too much in means of performance if you don't look at optimizing your db/server side code
I suspect that rewriting your client code in Python won't change too much in means of performance if you don't look at optimizing your db/server side code first.
 
I have a problem with Django when I upload file with Ajax. They arrive to request.POST, but they should arrive to request.FILES, but it's empty.
Any solution?
 
@edwardoyarzun What's your code that handles file upload?
 
This is the code:
var form_data = new FormData(document.getElementById("form-theme-edit")),
url = "/theme/edit/1";

$.ajax({
"url" : url,
"method" : "POST",
"enctype": "multipart/form-data",
"data" : form_data,
"processData" : false
});
then, when I do a print request.FILES, it's empty
but when I do a print request.POST, there are the files as dataURL
it should be on request.FILES
 

« first day (1279 days earlier)      last day (3670 days later) »