« first day (1283 days earlier)      last day (3663 days later) » 

Sab
12:00 AM
@crow Take a look at the code
 
Sab
Here
I'm sure there is a prettier/simpler way of doing it, but I still need to figur it out
 
you can probably make it a little more concise using this library: docs.python.org/2.7/library/operator.html
 
Goodnight people
 
Sab
Night
Thanks @Crow looking into it now
 
12:04 AM
@ExoticBirdsMerchant nvm...you made a typo in chat instead...heh
 
@Code-Guru yes sorry
@Code-Guru this is my first day on git
 
Sab
Numpy is a useful library, but I can't use it in assignments
 
i dunno why it does not run probably it needs to do some extra stuff i dunno
 
@ExoticBirdsMerchant can you copy and paste the lines from GitBash into a pastebin?
 
Sab
Night peeps. Need some rest.
 
 
2 hours later…
2:33 AM
How do I compare the two following types for equality?
I have a pandas.tslib.Timestamp
and a <class 'pandas.tseries.index.DatetimeIndex'>
In [120]: df.index
Out[120]:
<class 'pandas.tseries.index.DatetimeIndex'>
[2014-03-31]
Length: 1, Freq: None, Timezone: None

In [121]: dt
Out[121]: Timestamp('2014-03-31 00:00:00', tz=None)

In [122]: type(dt)
Out[122]: pandas.tslib.Timestamp
 
3:06 AM
had to update pandas problem solved xD
 
 
4 hours later…
7:09 AM
Cbg all
 
@Ffisegydd Stewie.... Cabbage :)
 
7:37 AM
Hello
 
7:52 AM
cbg
 
I have a problem
"cannot import name Question"
it appears in admin.py when I import my models
This is my "admin.py" content:
from django.contrib import admin
from formular.models import Question, Choice

class ChoiceInline(admin.TabularInline):
model = Choice
extra = 5

class QuestionAdmin(admin.ModelAdmin):
fieldsets = [
('Core Information', {'fields': ['question_text']}),

]
# inlines = [ChoiceInline]
# search_fields = ['question_text']
# list_display = ['question_text']

class ChoiceAdmin(admin.ModelAdmin):
search_fields = ['choice_tag']
list_display = ('choice_tag', 'choice_value', 'choice_category')

admin.site.register(Question, QuestionAdmin)
Am I doing something wrong?
 
Sab
8:47 AM
Apple everyone :D
 
You can't just make up Salad language @Sab. You'll be burned as a witch!
 
Sab
I'm building my own compiler for salad language.
 
Compiler!?
 
Sab
It's gonna be called Fruit-Salad
shakes head
Was a bad metaphor I guess. Fails
 
A translator maybe?
 
Sab
8:51 AM
Nop. I just wanted to tell you, using a metaphor about programming, that I can make up Salad Language. :|
 
Victory! ;)
 
Sab
Wow! (y)
 
@PeterVaro It just says Image not found
 
really? for me it loads..
 
Sab
It loads here as well.
 
9:00 AM
@thefourtheye try this: cl.ly/image/3g22451m060o
oh, btw beautiful cabbage morning to all of you!
 
Sab
Cabbage!
"Pycasso" though. :D
 
@PeterVaro It looks like a Firewall problem...
 
Sab
Pun of the day!
 
@thefourtheye probably.. this is through the cloudapp -- which is hosted on amazon servers.. so..
 
Sab
Can someone explain this Cabbage morning?
 
Sab
I invented Apple morning earlier today. :}
 
> Metasyntactic Use
Much like the Smurfs, chat members will occasionally use “cabbage” as a placeholder word in circumstances where it would normally make no sense. For example, the motto of the room is “The productive programming cabbage”. Here, “cabbage” means “language”.
 
Sab
That's awesome I didn't know about it. I thought everyone was using cabbage at random and I decided to use Apple. lol
3
 
that's a nice response :):)
 
I loved this (and the theme tune): youtube.com/watch?v=aFZKlfRrGbw
 
9:10 AM
@Jon BRIIIIIIIIIIIIIIIIIAN!!!
 
@Ffisegydd STEWIE!!!!!!!!!!!!!!!!!!!!!!
 
cbg all
 
Sab
Cbg
 
@Ffisegydd wow, you've been smashing the review queue
 
cbg @JonClements @Terfin
 
9:11 AM
:P
 
Sab
@JonClements You know the music is good when you get the shivers listen to it.
 
@JonClements this is my newest fav: youtube.com/watch?v=UN8BCBZshZU
 
@Peter do I want to click on that... I'm very wary you're out for revenge :)
 
:D:D
you should it has super awesome tunes and lyrics.. really.
 
Sab
There was a cool vid on this vid. yesterday Peter
DO you have the vid?
xD
 
9:13 AM
yeah, that was a COUB based on the IceKing from Adventure Time, that's how I found this song
 
^ yeah that's what I posted the other day :)
 
Sab
It's so simple it's funny lmao
 
so @JonClements what do you think?
 
Gah, this is freaking annoying. I am trying to decide whether to treat the plugin I am currently developing (non-profit, completely open source, bottle plugin) as if it was a project I develop for a client, regarding stuff like ALM (Application Lifecycle Management)
 
9:17 AM
why is it annoying?
 
Cause the answer will decide how much effort will I put into preparations like requirements lists, specifications, etc.
 
@Peter just listening now... was doing an invoice
@Peter interesting lyrics... something you not telling us? :p
 
Thing is, I am working on this alone. I am not sure if any ALM methodology is even applicable when you work alone. On the other hand, I am afraid that not working with at least a kind of methodology will throw my development into the pit of chaos.
 
@JonClements yeah.. it's a hidden coming-out..
@Terfin umm, I think the real question is: are you planning working on this always alone or will you invite others later on? because if it is the latter, then I think a good and maintainable project management design will be repaid.
 
Sab
dictionary update sequence element #0 has length 3; 2 is required
Why this error?
countedVotes = {}
 
9:25 AM
@Terfin Unless you're planning to throw it away - try to stick to as best a practice as you're happy working with
 
Sab
countedVotes.update({party[0] , countParty})
I get this error when trying to add something in the dictionary :S
 
@Sab you're trying to add a set...
 
Sab
Yea
I want the dictionary to have each party with it's count
 
Well, a set is considered an iterable of single items... so that's why that won't work
what does your actual data look like that you're trying to add
 
Sab
countedVotes.update({party[0] , countParty})
Basically party[0] is a string
and countParty is an int
 
9:29 AM
@PeterVaro I also thought of that possibility. I am not sure tbh. How do you treat github forks in that matter?
 
well, I have only a few.. but I read them, test them, before I merge them
 
Sab
Managed to get it work using countedVotes[party[0]] = countParty
However, I'm not sure why the previous one didn't work @JonClements
 
@Sab I said why it didn't work...
 
Sab
I didn't quite understand it.
Can you please give some more light.
 
@Sab what does the documentation say that dict.update requires?
 
Sab
9:34 AM
2 dictionaries
What it does is add a dictionary to another.
 
Try reading it again :)
 
Yeah... I'd ditch those - or at least read the official docs on top
 
Sab
Oh I see!
Basically I was doing dict.update{party[0], count}
notice the ","
It wasn't a key value pair
 
Hence my sentence
12 mins ago, by Jon Clements
@Sab you're trying to add a set...
 
Sab
9:39 AM
Ya, I got it now :)
Thanks
 
Aight thanks @PeterVaro.
I think that I will create a public repo and host the codebase there. But first I am going to break down the OData protocol into requirements and their specifications, before I continue any further with the development.
 
Sab
How do I order the dictionary keys in alphabetical order?
 
for key in sorted(my_dictionary):
 
@Sab shame @Crow isn't here... he knows everything about dicts... has a certain fondness for them :)
 
Sab
Thanks fourth
Dictionaries are useful, but I just started learning them
 
9:52 AM
Ahh... must remember to pay Google this week.
Umm... can never understand the billing on Digital Ocean
But sopython.com seems to still be up so :)
 
mooorning
 
Sab
Cbg
Well, my python dictionary is not working
for key,value in sorted(votes.items()):
print(votes[key], votes[value])
builtins.KeyError: 1
votes = {'a': 2, 'b': 1, 'ONE': 1}
 
Because you're trying to look up the key on the dict, which will work (and give you the value), then lookup the value on the dict, which won't...
just print(key, value) as you've already got what you're after
 
Sab
10:08 AM
Ah. I see
Thanks
Yus! Now let me add some formats :D
Rhubarb guys. :)
 
rbrb
 
10:43 AM
Hi everyone o/
 
hi @needaname - do we get to pick a name for you? :p
 
CBG all!
I'm unable to get mechanize working
 
cbg @ufo
on GAE again is this? :)
 
@JonClements Not necessarily but choosing a name is the most difficult thing for me :)
 
import mechanize

br = mechanize.Browser()
br.open("https://aptransport.in/CFSTONLINE/Reports/VehicleRegistrationSearch.aspx")

for f in br.forms():
print f
 
10:45 AM
Coding helps nonetheless :P
 
@JonClements Can you help me
It's not on GAE
It's on my Linux PC
 
@ufoguy ahh okies... and your now removed message of "it gives me errors" - shall I grab my crystal ball, light some candles and do some incantation to the dark gods of errors, or can we save some time, and you let everyone know what those errors are? :p
 
./Test mechanize.py: line 3: syntax error near unexpected token `('
./Test mechanize.py: line 3: `br = mechanize.Browser()'
@JonClements Sorry
 
Wow guess I'm doing it wrong..no answer so far :D
I think it would be doable with a request context
 
@Ufo well - something's going on there... have you got funny chars in the line before... (also, how are you running it... that output looks odd)
 
10:50 AM
I just copied and pasted the url from the browser
@JonClements
 
but it would end up being like this site.com/post/this-is-a-test-post/…;
and that's crazy :/
wouldn't it possible to pass the previous values to the next page without actually exposing them in the url?
This is the question I didn't get answer on, for context.
1
Q: Pass form values to the next request

needanameSo, I did some benchmarks to see how many requests the app could handle. It turns out that when a database operation is involved, no more than 500-560 requests/sec can be handled before timing out subsequent requests, whereas without the database layer it easily comes to a whopping 1000-1100 requ...

 
@JonClements
Please help me
\
 
@Ufo not enough info. to help you "I just copied and pasted the url from the browser" does not in anyway look like a response to: "have you got funny chars in the line before... (also, how are you running it... that output looks odd)"...
 
I'm running it like an ex3ecutable
./Test script
In the terminal
 
and that's the complete script is it ?
 
11:00 AM
Yes
 
Okay, then you need a shebang line to indicate your terminal should use Python then...
bash is trying to process it as a shell script - hence your syntax errors
 
Ok
I see my mistake now thanks
 
or use python script.py directly
 
@JonClements Can you give some hint? Should I leave this and let it load from the database? As I said in the question, removing the db call doubles the req/sec of the page
 
Yes I'm doing that from now o0n
@JonClements
 
11:02 AM
@Ffisegydd where's that brandy again!!!? :p
 
Does any body have any idea how I can develop for Kindle paperewhite using python
Gnu chess has been ported
 
You drank it all last night then passed out after trying to set up a conga line with your own tail.
 
And some other apps like leafpad have been ported. But I want to develop something my self,
 
@Ffisegydd oh... :*(
@Ffisegydd any vodka left?
 
I'm able to run python scripts using the terminal app Kterm
 
11:04 AM
@needaname why not just add another hidden field ?
 
There is some sloe gin...
 
Ooo, how old is it?
 
@JonClements I already use the hidden fields to submit a comment :/ Otherwise would it be possible to have two POST in a page (one to submit comments and the other to submit the values to the edit page)?
 
Unopened
 
You can have multiple forms per page with multiple actions, but if it's related, why not just put another hidden field in the comment form (if applicable) and ignore it if not needed
 
11:07 AM
@JonClements Now I'm getting the following error
File "Test mechanize.py", line 5
for f in br.forms()
^
SyntaxError: invalid syntax
 
You're missing a :
 
OK thanks
 
Yeah I'll get the sloe gin now...
 
@Ffisegydd yup... I think I'll have to pop down the offy later by the looks of it :)
 
Cabbage all.
 
11:18 AM
The more I read the OData protocol, the more I think that there is a very good reason why it hasn't been implemented in Python so far, or actually in dynamic languages in general.
It seems like the most unpythonic thing one could possibly think of. Types, types everywhere gah.
 
@JonClements I'm getting this message when I print all forms. Now I want to know how to submit the form with some data
<aspnetForm POST https://aptransport.in/CFSTONLINE/Reports/VehicleRegistrationSearch.aspx application/x-www-form-urlencoded
<HiddenControl(__VIEWSTATE=/wEPDwUKMTE0MzI5ODM0MGRkdB0g7u2Z+Eg+a4Wr8QLkE1lzgSU=) (readonly)>
<SelectControl(ctl00$OnlineContent$ddlInput=[*R, E, C, T])>
<TextControl(ctl00$OnlineContent$txtInput=)>
<SubmitControl(ctl00$OnlineContent$btnGetData=Get Data) (readonly)>
<SubmitControl(ctl00$OnlineContent$BtnClear=Clear) (readonly)>>
...............
....................
 
@Ufo have you read a tutorial?
Seems like a fantastic starting point to me :)
 
br.form['ctl00$OnlineContent$txtInput'] = "Ap364012"
br.form['ctl00$OnlineContent$ddlInput'] = '*R'
............................
But I get error
................................................................................‌​......
Traceback (most recent call last):
File "Test mechanize.py", line 18, in <module>
br.form['ctl00$OnlineContent$txtInput'] = "Ap364012"
TypeError: 'NoneType' object does not support item assignment
@JonClements Can you point me to a good tut
Gooogle is not being friendly
 
Nope - neved used/needed to use it... just use requests and beautifulsoup if I need it
 
Ok.
This post request has some wierd info. That is why I'm trying mechanize
 
user559633
11:41 AM
cbg all
 
cbg @tristan
 
user559633
How was the weekend?
 
user559633
What's on tap for the week?
 
@tristan brandy I hope...
 
user559633
haha yikes
 
user559633
11:44 AM
brandy pints
 
Mind you - thinking about it - much prefer whiskey... can we get some of that instead @Ffisegydd? :)
I'm hoping Stewie hasn't put the footage of me after having consumed a bottle of brandy, trying to form a congo-line with my own tail... (To my shame, I remember none of this...)
 
why good morning friends
 
user559633
:)
 
user559633
morning
 
@Crow I missed you crow!
 
11:48 AM
I missed me more ;)
 
But then, apparently, according to @Ffisegydd I was fairly drunk on brandy, so my aim would have been awful... and probably even forgot to load the shotgun...
 
user559633
My last day at my current company is wednesday
 
@Jon the footage is already #3 on Youtube
 
user559633
going to be unemployed :D
 
@tristan not for long though, right?
 
user559633
11:51 AM
hopefully for months :D
 
user559633
Writing my application to this: hackerschool.com right now and I have some side projects that I want to turn into a full time thing.
 
Fingers crossed it all works out "cool" :)
 
user559633
Thanks
 
user559633
I saved up some money and the girlfriend gave it her stamp of approval
 
why are you leaving company tristan?
 
user559633
12:00 PM
Not working on interesting projects
 
ah, yeah that is always very lame
 
user559633
Yeah -- the work environment is pretty awful too. It's one big open floor, so it's so loud that it's impossible to focus.
 
what kind of stuff do you like working on?
 
user559633
Great for administrative folks and people that can do their jobs while talking, terrible for anyone that needs to think about logic.
 
user559633
I really like writing web APIs and system utilities
 
12:05 PM
@tristan I've worked in one of those environments, whereby the sales team want their "motivational music"...
 
user559633
Haha, oh god.
 
user559633
It's abysmal when sales people or management just see the people that create the product as worker drones
 
@tristan thankfully, never had the misfortune to work for a company like that
 
user559633
I have (and it's my current one).
 
@tristan Sounds pretty familiar... I was at an interview in such a company. Those companies usually have the same traits. They do not promote creativity, of any kind. They abuse their workers instead of investing in them, so they could produce a better product. The managers have an extremely stuck up approach, you are garbage in their eyes, even worse.
I went to an interview in such a company, the evilness could be smelled in the air, luckily I wasn't accepted.
 
user559633
12:12 PM
Hah, my company has just drifted to its current state over time.
 
user559633
It was a new project and I've been there since the near beginning.
 
the boss at my job can be quite annoying... "well, looks like we didn't understand the technology well on the first iteration. To prevent this problem in the future, let's make the second iteration on a completely different library!"
 
@Crow Sometimes it is necessary, but if he does that every time... that hints that he has no idea whatsoever regarding what the heck he's doing.
 
user559633
If we don't throw the baby out with the bathwater, the baby will get cold ;__;
 
@Terfin eh, I made something in flask. It had its problems, but now he is completely opposed to using flask for anything for any reason, ever. Which is weird because half the team uses and supports it
 
12:15 PM
Too bad a lot of managers get to their management positions through ass licking and not through professionalism... that's kinda sad.
@Crow Is he your team leader? Project manager? I certainly hope he's not the architect or the CTO.
 
user559633
@Crow what is he suggesting to use then?
 
@Terfin nah, he's still an engineer. What bothered me is I showed him a completely, 100% fixed version in flask, and he said to throw it away because he didn't want to see ANY flask for any reason.
 
@tristan just don't put the baby in the bath? :p
 
user559633
then the baby will get all dirty :/
 
Just don't have a baby to start with ?
 
user559633
12:19 PM
+1
 
We've solved it guys! To avoid any issues with projects - don't have a project.
 
@Crow It sounds retarded in too many ways. Does he have any explanation for why he doesn't want flask?
 
user559633
Haha, @JonClements i'm going to get that printed on a plaque
 
user559633
"Avoid problems, don't do anything"
 
@JonClements Indeed!
 
12:20 PM
@Terfin I think his reason was that he didn't like the first iteration. Admittedly, I didn't know what I was doing. But now that I have experience, it seems stupid to move to a completely new technology.
 
user559633
So what is he suggesting?
 
user559633
Django?
 
It amazes me. There's supposed to be people that are experts in PM and all that stuff. Yet - we - as a random collective in the Python room have solved the issue in 5 minutes...
 
user559633
Engineers make the best managers.
 
@tristan javascript and nothing but javascript
 
12:21 PM
Now... let's focus on important matters such as what colour different flavour crisp packets should be... that's been annoying me for years
 
So he wants node.js now?
 
user559633
Ah yes, a client-centric approach
 
Salt and Vinegar should be blue!
 
user559633
@JonClements orange, red, or yellow if you want people to get hungry when they see the packets.
 
@Ffisegydd yes... what the hell is it with being GREEN!
 
12:22 PM
I remember back in the good old days when it was blue...at least McCoys still have it right.
 
It does beg the question what colour cheese and onion should be...
 
@Terfin nope, just javascript with no extensions.
 
I think yellow would make sense... as neither blue/green do...
 
user559633
Green for cheese and onion.
 
I don't think I get it. He wants JS aye? But that sounds like client side JS. What does he intend to use on the server side?
 
12:23 PM
But then, doesn't yellow get used for "Roast Chicken" ?
 
user559633
And trick question. All crisps should be salt and vinegar.
 
@Terfin nothing, he never really said anything about that.
 
@Crow I think that I don't see the whole picture. What was Flask's job in the first iteration, if I may ask?
 
@Terfin basically the app's goal is to manipulate data and make interactive statistics. Flask parsed the data, made the urls, and manipulated the database
 
@Crow I see. I think I understand what he plans to do. Well good luck with that. JS can be fun too :P
 
12:34 PM
@Terfin what does he plan to do?
 
Right... stuff to do all... bb this evening at some point
(although probably be on intermittently via phone)
 
@Crow If my guess it right, the DB is a NoSQL DB with no built in MapReduce facilities, right? I bet he plans to use a MR component, quite possibly a JS based one and I think that he will still pick node.js to do the rest of the logic and as a presentation layer.
 
@Terfin nope. Oracle database
 
Meh xD
I was completely off
Ah well, then I have no idea what he plans to do
 
user559633
12:52 PM
I know what he plans on doing
 
user559633
Cashing paychecks
 

« first day (1283 days earlier)      last day (3663 days later) »