« first day (1288 days earlier)      last day (3667 days later) » 
05:00 - 19:0019:00 - 00:00

cpx
5:57 AM
cabg!
 
cbg
 
6:31 AM
cabbage
 
cpx
7:07 AM
cabbage += 1
 
Sup folk?
 
7:26 AM
Egabbac
 
 
2 hours later…
8:57 AM
cbg
 
@Jon BRIIIIIIIAN!#
 
@Ffisegydd STEWIE!!!!!!!!!!
 
@JonClements That's funny, cause I am watching a random family guy episode at the moment. Brian was replaced by this... weird ass dog with weird accent.
 
You're not implying what I could possibly interpret that as implying I hope :)
 
haha no no, seriously, season 12, episode 8.
Or WAIT! The new dog is kinda yellowish. Could you happen to be an imposter?!
 
9:05 AM
heya @GantengX
@Terfin I'm just a cute, weak and completely innocent puppy bent on world domination... don't have time to be "imposting" anything :p
 
yes @JonClements?
 
@JonClements That's stewie's job, world domination!
 
@GantengX I was saying hello - is all :)
 
:D
hello :D
 
@Terfin but he'll be too late by then! muhahahhhhaha muhahahahha muhahahhahah!
 
9:07 AM
@JonClements How's the tea?
 
oh wait... I meant... yes... Stewie is the evil one... I'm just a cute innocent puppy....
 
...
 
(wow... almost let stuff slip there! Think I got away with it)
 
@Ffisegydd He meant err.... ANOTHER STEWIE YES!
 
...@Jon...you have another Stewie? :'(
 
9:09 AM
Darn, look at the mess I did
 
@Ffisegydd well... that whole beating me up bit, and getting me to lick our your nappy stuff... I have kinda been looking on the side for someone that's maybe not so Machiavellian ...
 
(Perfect image is perfect)
 
Awww noooooooooooo...... don't do that :(
 
I am Terfin, the destroyer of families, the bane of dishonest relationships!
 
I can't take it anymore.... @Ffisegydd sorry Stewie!!!!!!!!!! I love you! Please forgive me!
 
9:14 AM
I will consider it...
 
does the puppy eye look at @Ffisegydd - and I have big wonderfully cute blue eyes... just look at 'em stewie...
 
FINE!
 
we're still BFF right!? :p
 
Yes...yes we are...
I've been teaching myself pandas and as my dataset I've been taking data from the SO api. So far I've only been looking at my own reputation data. I've found some slightly interesting results though.
You can tell I get more and more fed up with work as the week progresses as my SO rep goes up for each day :P then I get to Friday where I have to spend over half the day teaching labs and it drops. Then surprisingly I get a lot less done on weekends...
 
@Ffisegydd okay... so you're aiming for 3k now I hope :)
 
9:25 AM
@Jon well I seem to be well on track
 
You're enjoying pandas then :)
 
It's not bad so far, I can definitely see it has potential. There's a lot of methods which I am trying to get my head around. Am also using an ipython notebook to document/work with everything
 
Wow... doing it the "pro" way then :)
 
hmmmz. If what I understood is correct, then OData property types are divided into 2 groups. Primitive types and complex types. That actually makes sense, since, theoretically, you could also say that an entity type is a complex type with a unique key and relationship support. I think that explanation can make some kind of sense.
 
Sounds reasonable thus far...
 
9:38 AM
However... could there be a scenario where you have to use a complex type which is not an entity? I think it is quite possible, if say, you want to join two entity types and create a subset of this join, then return it, instead of returning some irrelevant data along with the join. Or generally, generating subset of entities.
I wonder if this thing can go out of the entity reliant domain as well.
 
Er.... nods sagely....
Hmph... would have expected this to have got some more votes... but oh well...
 
9:57 AM
brb
 
10:13 AM
and... back...
 
10:27 AM
Puppy, do you know anything about the Temple church?
 
Nope... why do you ask ?
 
Just read Da Vinci Code and it says Temple Church is in London
 
Yes... that's kind of what I thought you might have meant... Not seen it myself, but certainly been around the area :)
 
That story is very interesting and convincing...
I would love to visit the places mentioned in that, atleast once before I die
 
Would be a bit late after - let's face it :)
 
10:39 AM
What do you think of that book? Did you like it?
 
It was okay... not a huge Dan Brown fan though
 
This is the second English novel I ever read, (in case you are wondering, the first was Sherlock Holmes) and it really was amazing. Have to read Angels and Demons
BTW, the movie and the book have only the main story line and characters in common
 
Wow... if you want some English reading material I can recommend stuff that isn't Dan Brown :p
 
Will they be as interesting as his works?
 
I don't read boring books :)
Let's see if I can't pick a few bits off the shelf to see if they'll suit
 
10:46 AM
Suggest away :) I like stories with a lot suspenses and twists. And I don't like romance...
 
@thefourtheye what genres do you enjoy?
Hmmm ok
 
indoor bbq with an electric griller. Not as good as an outdoor BBQ, but still better than nothing.
 
@thefourtheye one of my favourites - amazon.com/Richter-10-Mike-McQuay/dp/0553573330
How McQuay writes those characters is fantastic... The relationships between them, and how he integrates it with the plot... I don't know many authors that can do that
wb @Abhishek - potato ?
 
@JonClements Oh, this guy wrote the Space Odyssey... I ll add this to my reading list. Thanks :)
 
@thefourtheye nope
Arthur C Clarke wrote the plot outline... McQuay wrote the book
 
10:59 AM
cbg everyone ! melon @Jon , Potato?
 
@Abhishek banana, melon!
 
@JonClements Oh, combined effort. I find it difficult to read and understand English, as my vocabulary is limited. Let me search the internet more about this book
 
Before protecting software i always read this : blog.wilshipley.com/2005/06/piracy.html
 
11:23 AM
this is fun... moving sopython and all
 
user559633
11:45 AM
cbg all
 
@tristan cbg
 
cbg @tristan
 
user559633
cbg cbg :)
 
user559633
i need to think of a name for my consulting/freelance company
 
"tristan rules" ?
 
user559633
11:53 AM
haha
 
user559633
"givetristanmoneyorhe'llstarveanddie.net"
 
"Tristan's odd jobs shop" ?
 
user559633
I'm a little worried that my skills are a little too niche for what most people want to outsource to freelancers
 
how so ?
I'm turning down work at the moment... if you let me know specifically what you're after, I might be able to throw it your way
 
user559633
Oh, nice.
 
user559633
12:08 PM
I have a lot of experience with systems and linux, so I can do config management/automation help, but I'd like to do API development because it schedules well for milestones
 
Okay... email me jon@sopython.com... include your CV or something, and I'll see what I can do
 
user559633
Great, thanks! :)
 
user559633
I need to update my CV to reflect recent changes, so I'll email you later this weekend
 
that's fine... no promises though... I can probably introduce you, but the rest will be down to you :)
 
user559633
Of course, still appreciated
 
12:12 PM
Remote work rather than office-based stuff I take it?
 
user559633
Definitely, unless it's < a month commitment of being in an office
 
user559633
I feel like more than that and it would quickly turn into a regular job, but without benefits
 
I recently turned down something that was 1 day a month in office... so most of my stuff is remote... so sounds like it works out reasonably okay
 
user559633
I didn't realize you were a remote employee
 
user559633
What kind of stuff do you normally do?
 
12:23 PM
mostly database stuff
 
(where "mostly database stuff" == "chase cars and bark at the sun")
 
My 80 hour weeks do include that - indeed :)
Good couple of hours involved chasing this "tail" thing
 
user559633
~~~only 40s kids will get this~~~
 
Or, as it's the same quartet that did this one maybe Pulp Fiction watchers? :p
 
user559633
smooth sounding
 
12:36 PM
someone's finally put it on youtube! youtube.com/watch?v=tOMEJ82SaAk
 
user559633
i don't even know how to comment on that video
 
How not do do packages...
> The asciitable package was moved into the Astropy project as astropy.io.ascii. This sub-package is being actively developed and contains many new features and bug fixes. Users are encouraged to migrate to astropy.io.ascii
Because everyone wants to install a huge package (which even depends on numpy) just to pretty-print tables on the console!
 
@ThiefMaster you don't get bitter about things at all do you :)
 
I just like to rant about things ;)
 
user559633
6.2MB
 
user559633
12:43 PM
woof
 
@ThiefMaster rant observed and appreciated :)
on a side note, thanks for your help with Kevin's CW thing
 
That seems to have gone over well at least
@tristan thanks for the nightmares.
 
user559633
That's what she said.
 
1 message moved to recycle bin
That was annoying although comical :)
 
Thank you for breaking the hypnotism, I've just spent 10 minute staring into his eyes o.o
 
12:57 PM
rbrb - need to eat
 
Hey @tristan How do you like software infrastructure development?
 
user559633
@Terfin example?
 
user559633
I like most software dev, given it's not Windows-centric (but that's more out of a lack of experience)
 
@tristan frameworks, SQLAlchemy, Django, Beaker, etc.
Altho Beaker is more of a middleware tbh
 
user559633
Oh, yeah, I really like that.
 
1:10 PM
@tristan Well, I can promise no money ofc, but I am currently investing some effort into a new framework that will bring a solution for OData in Python. It is web-centric. I started it around a week ago, no codebase at the moment, I am trying to put as much effort as possible into the design phase. I have learned that software development without any prior design tends to go really messy, really quick, up to the point that it can possibly destroy entire projects.
 
user559633
OData meaning that json + tagging concept?
 
Actually it is much much more than that.
Here take a look:
http://www.odata.org/documentation/odata-version-4-0/
 
user559633
Oh, this is being championed by microsoft?
 
Well yeah, they thought of the protocol (and implemented it in Entity Framework + WCF and Web API), but I used it and I can say that this is actually one of the good things that ever came out of Microsoft. Don't be mistaken, I dislike Microsoft, but I give them the credit for this. It is actually pretty awesome, their own implementation was quite hmmm... some of it was a bit too messy I think.
 
user559633
I'll take a look and contribute a little when you start coding, but I'm not going to help microsoft unless there's money in it from the start
 
1:17 PM
But then again, the SOA implementation (WCF) was probably doomed to be messy. SOA is messy by definition. All those weird XMLs could pop your eyes out.
 
hey y'all, I'm thinking of getting a new laptop for development... what's a good one?
 
user559633
They burned all developer good will a long time ago.
 
user559633
@Crow macbook pro or macbook air
 
I got an air from work and it's pretty cool, but co-op ends in July hah... the pro seems to have a better display
 
I'm considering buying a Macbook Air at the moment for portability (normally work on a PC tower)
Do you need it now? Because the new Macbook Airs may be announced in the summer?
 
user559633
1:18 PM
There's possibly a new air coming out within 2 weeks
 
Within 2 weeks? :o
 
nah need it in July, or as late as september
 
@tristan Oh, I am not designing the protocol, hell no. I am designing the implementation itself. The most I need right now is review of my current progress.
 
user559633
Sure, but implementations and libraries are what make/break a protocol
 
user559633
1:19 PM
see betamax
 
user559633
Well, that wasn't really a protocol and was damned for other reasons. Doesn't really make sense here now that I think about it :P
 
user559633
i'm starting to think i'm helping this guy with some pirated content stackoverflow.com/questions/23311145/…
 
Thing is, I want to make sure I don't botch things up right from the very start. A bad design is a recipe for a bad implementation, regardless of the coder's skill.
 
user559633
Eh, done is better than perfect and you can talk about design until you're blue in the face
 
That's true I suppose.
 
1:45 PM
:\ I hate writing assembly code
 
user559633
What are you writing assembly for @Crow?
 
@tristan Operating systems internals class. Gotta make an operating system
 
user559633
That's...awesome.
 
meh, not a big fan of it. It's... educational, but not my subject
 
2:29 PM
generateDS is insane. It took a 755 lines long xsd and turned it into a 14k lines py file... wat
 
Cabbage!
 
cbg @poke
 
@poke cbg
 
morning poke
 
That's the ugliest py file I've ever seen. All hail super spammy code generation tools.
 
2:39 PM
is there a way to say "if anything in this list is a string within this string" in a simple way? Eg:
 
a substring?
 
comment_strings = ('"""', '/**', '#', '//')
for line in file:
  if anything from comment strings in line:
    # ignore everything past the comment
 
any(i in line for i in comment_strings)
 
if there is no comment string, will that return False? if there is a comment, will it return the character?
 
If no elements of comment_strings is in line then it will return False, if any element is inside it will return True
It won't return the character though
 
2:44 PM
do you know of a way to handle what is in the if statement? I want to split it up to that character
 
What's your use case, you want to parse anything beyond the comment string as a comment?
Try to split it, if you get one string returned you know there were none in there maybe.
If you get multiple then take the 0th element as your "code" and the rest as comments.
 
let's say I am reading a file and come across this line: print('this is a line') # is it really a line though? and I am going to write it to a file. Ultimately, I want to really write print('this is a line')
 
I've got one way so far but it's cumbersome
Also you haven't thought this through as in python
"""This is a comment
is it not boyo, and yet
the lines in the centre will be
"fine" according to your logic"""
 
it's a very large problem, to be honest.
 
Tis ugly and verbose but
file = ['print("Hello World!") # I just printed "Hello World!"', 'print("Goodbye World!")']

comment_strings = ('"""', '/**', '#', '//')
for line in file:
    if not any(i in line for i in comment_strings):
        print(line)
        continue

    for i in comment_strings:
        if i in line:
            splitted = line.partition(i)
            print(splitted[0])
            continue
# print("Hello World!")
# print("Goodbye World!")
 
2:55 PM
how would you tell a for loop to stop executing lines below it and just go back to the conditional?
 
@Crow what do you mean? You mean continue?
 
yeah, I think so
 
continue will cause the for loop to go immediately to the next iteration step
So the final continue in my code (after print(splitted...)) will cause the for loop to go to the next iteration (which is actually the end but nevermind).
 
perfect, yes that's what I want
 
Note that a continue only skips forward the innermost for loop. You can't skip forward outer ones.
 
3:08 PM
Hi guys! I'm trying to populate a select using ajax with data from a django model. I managed to get the data but I'm a bit confused on how to pass them as <li>...</li> with the proper attributes. If you can have a look... I think i'm really close to fixing this but i'm not experienced with ajax and js..
1
Q: Django, ajax populate form with model data

Manolis C.So I got a simple registration form. In this form there are 3 more fields: University Course Module What I'm trying to do is to filter the data. So when the user select a University, the course field(select) will show all the courses that belong to this university. Also when the user select a...

 
3:40 PM
how can you parse a string into a dictionary?
 
Example string?
 
cpx
4:35 PM
is dictionary like a combination of key and value?
In C++, we have std::map
 
@cpx yes a k:v store
 
cpx
nice
 
can you specify multiple possible values to be split on?
 
cpx
4:59 PM
@Ffisegydd do you mean flag the question?
 
@cpx no there was an offensive answer (which has now been removed)
 
Cabbage all!
 
5:22 PM
sigh flask and mod_wsgi
 
@hanleyhansen having fun? :P
 
no lol i have a client in the financial industry who insists i host their flask application on their server. i've been using pythonanywhere so long that the setup has been eating me up lol
0
Q: Running Flask on Apache - CentOS

hanleyhansenI setup a very simple flask application to test a deployment in Apache on CentOS 6 but I'm getting the follow error: [Sat Apr 26 12:44:20 2014] [error] mod_wsgi (pid=29782): Target WSGI script '/var/www/html/sites/rtdsllc/rtdsllc.wsgi' cannot be loaded as Python module. [Sat Apr 26 12:44:20 2014...

@Ffisegydd i've been at it for a few hours already trying different things so i figured i post a question. maybe i'm missing something totally obvious
 
Hi
 
howdy
 
In django, how can I filter a queryset using a ManyToManyField?
 
5:33 PM
@ManolisC. use the double underscore syntax
 
@hanleyhansen I've tried using __in but I'm getting 'ManyRelatedManager' object is not itterable
 
the first part should be the other model
 
Yes I already saw that
But still can't figure it out
 
show me your code
 
I opened a new question. You can find it at this link.
 
5:36 PM
i answered your question. give that a shot and let me know
 
Hmm it gives me this: int() argument must be a string or a number, not 'ManyRelatedManager'
 
paste your line of code here
just that single line
 
modules = Module.objects.filter(course__pk=current_course_modules)
 
where are you defining current_course_modules?
shouldn't it just be current_course?
 
current_course_modules = Course.objects.get(pk=course).modules
 
5:40 PM
that's not the code you have in your sample
 
yes it's just that I keep trying things so I edit variables
 
try this:
current_course = Course.objects.get(pk=course).pk
modules = Module.objects.filter(course__pk=current_course)
 
Sure let me try it
Now it doesn't return an error but it returns empty
I'm 100% that there are data to show up
 
double check the value of current_course
 
So I'm installing Visual Basic. Am I correct in assuming that it's the one that's used for making GUIs?
 
5:46 PM
you can use many things to make GUIs
for python there's wxPython, tkInter, PyGtk, PyQt etc etc...
Visual Basic is a .NET language
 
I think that current_course is correct
 
what's the value of current_course?
 
I cheked in the template, so I checked the course variable. not current_course
 
I've already used Tkinter, but I want to try out VB. What exactly DOES it do?
 
you need to check current_course to make sure that you're filtering with the correct value
 
5:51 PM
Also I did exactly the same thing in another view that works so I'm pretty sure the current_course is correct
 
@Iplodman VB is a totally different language. nothing to do with python.
 
I know that ;)
 
Is there a way to print to console from the view
 
are you using runserver?
 
@hanleyhansen I see your confusion.
 
5:53 PM
yes
with PyCharm IDE
 
what version of python?
 
2.7.5
 
iirc you can set up logging to stdout like so: gist.github.com/hanleyhansen/11326558
in your settings.py
@Iplodman i'm not confused...
 
@hanleyhansen You thought that I thought that VB was a module, no?
 
no. you're asking about a different language in the python chat room.
 
5:56 PM
I inserted ` import pdb; pdb.set_trace()` after current course
 
cpx
To print a hex number without 0x. I'm using hex(255).lstrip('0x').
 
and when typing `current_course` i'm getting `(Pdb) *** NameError: name 'current_course' is not defined
`
 
I know, but the VB chat is dead, and this room isn't ONLY for discussion of Python.
:l
 
cpx
It works till Python 2.5.
 
Ok @hanleyhansen Now I'm getting 1L in pdb instead of 1
 
5:58 PM
Hai @Jerry :D
 
hi!
 
@Iplodman it's implied that in the python chat room the main topic of discussion is python. asking what a completely different language actually does i'm sure is considered off topic
sup jerry
 
@Jerry cbg
 
banana
cbg
 
@hanleyhansen As I said, the main topic is Python, but that's not to say there cannot be a discussion about anything else.
 
6:00 PM
@ManolisC. L is for long which is the type of your variable
 
So that's not a problem?
 
Generally a lot of conversation in this room is off topic :P I think as long as people aren't actively disrupting genuine python conversation then it's fine (spamming questions and the like), but then again don't assume that anyone will answer to off topic talk :)
 
Surely this room was made for those was an interest in Python and for those people, not the topic.
@Ffisegydd ^
I wasn't :P
 
@Iplodman well good luck getting answers
 
@hanleyhansen Uh, cheers I guess.
 
6:01 PM
@ManolisC. shouldn't be. not sure what your issue is then. might be something else.
 
Btw, should the query be about Course since the relationship is in the course model ?
 
no. what you want is modules but you're filtering using a query that spans the relationship between module and course
 
user3444876
Cabbage
 
ffisegydd any ideas on that wsgi?
 
@Guarav Cabbage.
 
6:05 PM
Hmm.. since i'm passing the course shouldn't I use something like this:
def ajax_get_modules(request, course):
modules = Module.objects.filter(course__pk=course)
 
@ManolisC. actually you know what? you are correct
let me rewrite it for you
 
Code flies over my head.
 
current_course = Course.objects.get(pk=course)
modules = Module.objects.filter(course=current_course)
try that
you don't need to use the double underscore
make sure you're getting the full Course object not just the pk
@ManolisC. i've updated my answer to your question as well
your way should work too
 
Let me try it
Aaah still the same. It's empty
 
all 3 ways work
just double check your db
make sure there's actual data
not sure what else it might be
 
6:12 PM
there are data. used pdb current_course=<Course: Computer Science, BSc (Hons)>
 
^ That grammar ;)
 
but modules = []
 
user3444876
@ManolisC. is this a student information system?
 
It's a calendar for universities
my final year project for the university.
 
current_course = Course.objects.get(pk=course)
modules = Module.objects.all().filter(course=current_course)
we keep forgetting the all()
try with that
 
6:13 PM
Delivering in a week so... Can't sleep at night
lol
 
My word of the week: idiosyncracy.
 
i gotta run brb
 
cbg
 
Sure @hanleyhansen! I'll try it now.. thank you for your time!
 
Can someone assist me with trying to find a filepath to a file not relative to the directory from which the script is being exeucted in?
I'm using os.path.abspath, but it cannot go to appdata from documents of course. Yet I'm not sure how to change it. so it navigates from C;\
 
6:18 PM
@hanleyhansen It works!! I feel so stupid... There were items in the database but I forgot to relate them. Recreated the database yesterday and forgot it... So, probably you were right from the begging!
 
6:33 PM
Cinnamon is leaking memory worse than my broken tap leaks water.
 
Works okay for me
 
I gotta kill it every few days or so
restart it I mean
 
Can someone help me with filepaths
 
@terfin Weird...
 
Hi
Implementing bcrypt, I think the password should be encrypted as soon as possible, hence in the GUI.
Is it right or controllers or DAOs is a better place?
 
6:40 PM
@JonClements Yeah, next time I am simply gonna install Mint at the first place and not replace unity with xfce.
 
@Owatch have you looked at the pathlib module?
 
no
I was trying to do it without 3rd party modules
 
it is included in python 3.4
 
Using 3.3.4
If that's it
 
nope 3.4 came after that
 
6:45 PM
eh, nevermind then.
 
@JonClements I've started implementing OData. Doing the EDM right now. It is rather exciting ^^
 
@Owatch, I actually didn't understand your question. Did you want something like docs.python.org/3.4/library/os.path.html#os.path.relpath
 
Yes, the inclusion of a start directory is what I wanted
Sigh
It just finds the path to the script location, then adds the dir you want to the end
to make the 'path'
I need to access AppData
That's all.
But my user name isn't the same as someone else's
So I can't go users/Owatch/ ect
I don't want it to find the path to the script, because I cannot use the script location
My files are stored elsewhere.
 
05:00 - 19:0019:00 - 00:00

« first day (1288 days earlier)      last day (3667 days later) »