« first day (1278 days earlier)      last day (3671 days later) » 

2:25 AM
anyone here?
 
@AjGauravdeep hi
 
thank you :)
 
user3444876
Hello @AjGauravdeep
 
i needed some helps regarding Python Django forms
Are you guys aware of those?
Hello @Daи @GauravGhosal
 
@AjGauravdeep only a beginner myself (django), can only do my best
 
2:28 AM
Okay, same here
so i am more of backend guy for python but trying some simple stuff on Front end for testing
class MyModelForm(forms.Form):
form_field1 = forms.CharField(max_length=40, required=True)

def returnTopAdjectivesUsed(request):
form = MyModelForm(request.POST)
name = form.cleaned_data.get('form_field1', 'default1')
lets say in my urls fine i have url(r'^hello/$', hello),
now when i hit localhost:8080/hello/ i wanna see a small textbox and a submit button.. and when i submit something in that textbox, i wanna pring it back
print*
does my question make sense?
 
@AjGauravdeep not entirely
let's start with each thing separately
your model has only one field, right?
 
first question, do i neccesarly need a model?
 
and have you done the tutorial online? because it does this kind of example
@AjGauravdeep that answers my question ;) - you should do the tutorial online
 
@AjGauravdeep do you understand the MVC pattern?
 
2:32 AM
okay..
not really. all i know is model is for data storage/representation, view is to present data to user in some way and controller is for changing data
 
check out this if not. That should answer the 'do i need a model?' question
 
@AjGauravdeep sure, also only put functions/methods for row-level operations in a model itself, but not stuff for views
and use a model manager for table-level operations
once you have a model, you need a view for it
 
i didn't get it
but i guess, i should read up first
 
CRUD forms can be generated pretty easily from that
 
2:35 AM
hmm.
 
so for instance:
you need a model to create a form from, you seem to be commingling the two
 
okay
looking at it
another question, is how do you fetch a url parameter value
i am sure, there is some simple way to do through urllib2
 
96
Q: Capturing url parameters in request.GET

suteeI am currently defining regular expressions in order to capture parameters in a url, as described in the tutorial. How do I access parameters from the url as part the HttpRequest object? My HttpRequest.GET currently returns an empty QueryDict object. I'd like to learn how to do this without a l...

 
from urlparse import parse_qs, urlparse

parse_qs(urlparse(url).query, keep_blank_values=True)
# {'param2': ['2'], 'param1': ['']}
thanks @Daи
 
@AjGauravdeep no prob
 
2:45 AM
i will read the article you gave in a minute.. one i pasted, looks simple to use
 
@AjGauravdeep I know the pain :P
 
by the way, what do you specialize in?
 
@AjGauravdeep nlp/cl
 
Awesome...
that's what i am doing actually
 
@AjGauravdeep I sort of wondered with the adjective method
 
2:46 AM
adjective method?
 
@AjGauravdeep integrating nltk with django?
 
django is used for testing
 
@AjGauravdeep yes this
 
smart !!
yes.
i am trying to work on algorithm which can get human sentiments out of their social behavior
and then use that to build a recommendation engine for general purposes
 
@AjGauravdeep cool, check out this article you might find interesting
might give you some ideas
 
2:49 AM
yes i am reading up few of these
 
@AjGauravdeep or perhaps to get rich :P
 
there are so many problems to get to solution.
 
@AjGauravdeep indeed, I used Twitter to attempt to predict Chicago traffic-related fatalities over the summer but found too many confounding variables for the research to be all that useful
 
word sensing
synonym clustering
stop words
frequent words
in frequent words
efficiency
testing the correctness
comparision of multiple test objectives sentiments and then grouping them
okay, i will read up on it
 
i.e. stronger correlation between fatalities and weather + holidays associated with alcohol consumption
 
2:52 AM
aah okay...why didn't it turn out useful
 
@AjGauravdeep because the strongest correlations were common sense (weather, holidays associated with alcohol consumption)
and twitter didn't help much
much of the sentiment was weather/traffic-related
 
okay.. have you looked into word sensing algorithms
 
which really only served to flag other variables, often weather, sporting events, etc.
 
like.
you talk shit.
i am doing shit

shit having different sense
sorry for using "shit"
 
@AjGauravdeep I follow, yes
 
2:54 AM
you did, huh... that didn't help gathering sense?
which approach did you take?
 
@AjGauravdeep I've done some work using Wikipedia for word sense disambiguation in classification problems
 
okay..
 
word sense disambiguation is one way to do this.
 
just to try it
 
2:56 AM
ok
which language?
 
@AjGauravdeep processed or used for the application? the answers, respectively, are English and Python
 
used..
okay.
 
familiar with yarowsky's bootstrapping and other methods tho
I just wanted to try using it for something to do it
SENSEVAL, etc.
 
okay
from urlparse import parse_qs, urlparse
list =  parse_qs(urlparse(request.full_url).query, keep_blank_values=True)
 
I've dabbled with applications in Spanish and ancient Greek (Perseus project as corpus)
 
3:00 AM
ah.. i am just focusing on solving this for english
 
@AjGauravdeep you?
 
and this problem is far easier when reading reviews
of something
than a book.
2 min break
i am trying to read up on Lin's algorithm, for word sensing
and Ted Pearson's
 
@AjGauravdeep ahh induction
 
yes
but consider me a beginner at it so i am not worth debating with.
 
@AjGauravdeep I presume you're using SenseClusters
 
3:06 AM
i looked at senseclusters but not using them
 
since you use lin and pearsons names together
 
i just wanted to understand their thought process
how would you get url of page opened
i though request.full_url would have it
but says 'WSGIRequest' object has no attribute 'full_url'
 
not sure if we are talking, view, model, urls, what
not sure what you have, and from what you've told me, I would presume you're missing several steps
@AjGauravdeep altho curious - what version of django ru using?
because sometimes putting middleware in different orders causes such errors
but I apologize for not knowing more
I must go to bed tho
 
no dude.. actually, you know i am having dinner
 
good talking to you
 
3:15 AM
i have a fencing class and i am late
it was really nice talking to you too
maybe, meet you soon over her
Django version 1.6.2, using settings 'fb_front_end.settings'
 
 
2 hours later…
5:27 AM
cabbage
 
hey Jerry
 
Potato?
 
any idea how i can get current url using WSGI_request
olive oil :)
never mind
got it.
 
5:46 AM
sorry ^^; I haven't used Django at all
and someone just came to see me about something
 
that's fine :)
url_get = request.GET
movie_name = url_get['name']
this is how you do in case you are interesred
where name is just some query parameter
 
6:04 AM
ahh that looks a bit like html parsing... another thing I don't have much experience in ^^;
thanks :)
 
 
2 hours later…
7:41 AM
cbg all
 
7:58 AM
cbg
 
@Kevin I may have another item for your list of dirty python tricks.
See here and scroll down to "Picking True values from and and or expressions"
You basically get (2 or 3) * (5 and 7) = 14 because of the way and/or work
 
 
1 hour later…
9:16 AM
@Aशwiniचhaudhary, hi please I need to ask you one more question regarding yday's answer
 
9:47 AM
cbg
 
cbg @mamasi
 
10:38 AM
Cabbage all
 
cbg @IntrepidBrit
 
@Ffisegydd How's it going?
 
Fighting with data analysis. Our research group uses some crap software called MathCAD for doing analysis and I keep on trying to get people to switch to Python but they won't listen.
You?
 
Not fighting with data analysis today. But facing similar problems with converting people to unit testing :)
But Python means they'd have to actually understand the theory ;)
 
11:13 AM
@poke - kudos for the starred apple dynamic typing metaphor. Might have to steal it ;)
 
11:24 AM
Cbg
n.do_this("Text", "Text:%s", [user.email,], user=user) % password
I have: not all arguments converted during string formatting
Why?
 
what's n? what's do_this do? why have you got a modulus of password to the output of do_this?
 
@MartijnPieters cbg!
 
The OP for this one seems to have gone: stackoverflow.com/questions/23107968/…
Until they update the question with actual file data, there isn't enough there to diagnose the problem.
so:
 
I would love to but my piddly number of SO points wouldn't allow me to :)
 
11:39 AM
@MartijnPieters Done, BTW are you keeping up the pledge? ;)
 
I am.
Reviewing right now.
 
A man of his word :-)
 
The OP came back and added sample data.
As usual, their interpretation of the data was not correct.
 
@MartijnPieters Sometimes I kind of wish they were forced to pay a £0.01 for website maintenance every-time it was one of those kinds of errors. SO would be millionaires ;)
 
Cabbage!
@IntrepidBrit You’re welcome, and feel free to use it :D
 
11:51 AM
@poke Thanking you kindly
 
12:03 PM
@poke Cabbage :)
 
Hey guys :D
 
@Iplodman Ahoy
 
@InterpidBrit Ahoy.
Just wanted for opinions on this > youtube.com/watch?v=iEcrdL6AQwc
It's an email client I built, and I'm looking for suggestions.
 
@Iplodman First question: why?
Like, why should I use your software?
 
@IntrepidBrit It's not necessarily that you should, it's not open source, nor is it downloadable. It's a project I've been challenging myself with in order to learn tkinter and the smtplib modules.
 
12:14 PM
@Iplodman Never a bad thing, improving your skill set. I don't use tkinter so I can't advise on that. What about cc and bcc?
 
I'm thinking: what about attachments? Push out into mimetype handling.
 
Great ideas guys - I'd have to research these, but if / when I make the inbox and implement them I'll give you guys credit.
@Martijn Attachments seem like a great idea, damned if I know how to though.
 
That can be challenging; take a look at the email package.
 
I've spotted that around but I've never played with it. Could you explain mimetype handling in laymans terms for me?
#CodingScrub
(Also, started about a year ago)
@Kevin Hey again :D
 
Hi
 
12:19 PM
There is an examples page.
MIME takes care of producing email text from various different bits of email data.
 
Cheers.
 
Such as attachments; a mime multipart container then holds your email text and the attachments.
 
I'll have to read into those docs a bit later.
I'm working on an inbox for now though.
 
There is a variant called multipart alternative which can hold alternative representations; the HTML and the plain text version, for example.
 
Hmm... Interesting. I'm assuming it holds them as a 2D array then?
 
12:24 PM
@Kevin Hi?!?! Seriously? ;)
 
Yep
 
Kevin bandwidth is currently limited. He's currently on 1 word/min ;)
 
@Kevin You forgot our Cabbage brotherhood?!? :'(
 
Nah, I've abstained from the start. I'm neutral, baby
 
You are lucky. An yellow puppy is not here now :D
 
12:31 PM
@Iplodman it's a tree structure.
 
Laymans terms please? Sorry, I really am new comparatively.
 
Me not speaking salad is the room's dirty secret... Like that one guy at the family reunion that did something ghastly (ex. wearing black socks with sandals), but they still get invited every year anyway
 
a tree, nested structure. One item inside another inside another.
 
Ah, thanks.
 
@Kevin lol, but I know the secret now ^_^
 
12:44 PM
cbg
 
@Aaღirkhan Cabbage :)
mmm Strange. This is an accepted answer in SO
36
A: What's happening with Arc?

Gordon GuthrieUm, Paul Graham's better half Jessica has had a baby is what's happened to Arc...

 
Well, I've managed to grab the latest email from an inbox.
 
@thefourtheye Interesting
 
Anyway, Imma go now. I'll be on later, cya guys.
 
> The initial version caused some controversy, by only supporting the ASCII character set, and by shipping with a built-in web application library that bases its layout on HTML tables. This, combined with the hype surrounding Arc and its generally slow development pace, has gathered some unfavorable comments.
Interesting.
xD
 
1:00 PM
@thefourtheye Voted to close that post
That's not really an on-topic post anymore; it may have been in 2009 but it is not now.
 
Should we flag it?
 
It's non topic i guess
isn't it?
 
I don’t think we need to flag it. It doesn’t hurt.
 
> back when reddit was interesting
> asked Jan 15 '09
 
lol
 
1:42 PM
While playing with threads and Tkinter: RuntimeError: Calling Tcl from different appartment. Huh? I'm not in an apartment right now. I'm in an office.
you dumdum interpreter, don't you know where you are?
 
@Ahmad so... never?
 
I’m pretty sure reddit is bigger now than it was in ’09.
 
Yeah, probably. Some consider that a bad thing.
As the audience grows, the median IQ approaches 100
when previously it was higher (or so the elitists say)
 
You can see Reddit's content getting dumber and dumber by every day.
This is normal when a social network becomes mainstream
 
Mm hmm. Not too surprising
Please join me in my new website, keddit, which only accepts submissions from people smarter than me.
Be patient, as the validation process involves a full game of Trivial Pursuit.
And a whiteboard exercise involving kd trees and FizzBuzz
 
1:57 PM
lol
 

« first day (1278 days earlier)      last day (3671 days later) »