« first day (1284 days earlier)      last day (3668 days later) » 
00:00 - 17:0017:00 - 23:00

12:02 AM
Hey what is the name of this time format?
2014-04-25T19:00:00.000Z

Hard to google something like that ;p
im trying to do a strptime format but trying to figure out the format str to pass it to parse that datetime format
nvm - found it - ISO 8601 datetime format
 
 
1 hour later…
1:10 AM
cbg
anyone got lucky to attend google IO?
 
 
3 hours later…
4:16 AM
How to convert the timezone string to offset? Eg. 'Asia/Kolkata' to '+05:30'
 
 
2 hours later…
6:40 AM
anyone here?
 
 
2 hours later…
8:19 AM
wzup
 
cbg4all
 
@Jon Clements Sorry for the late reply as I had no internet connection till now but I resolved the issue :)
1
A: Pass form values to the next request

Paolo CascielloTypical solution is to use a caching layer like Flask-Cache and a ¡memcached¡ server to cache recently accessed data. Having an edit form in the page is good. You can have as many forms as you want. Btw the common approach is to have only some sort of "templated" forms hidden that you'll then fi...

 
8:58 AM
Cbg all
 
9:18 AM
@ffisegydd STEWIE!!!!!!!
 
Cabbage
 
Oh hai!
I mean, cbg!
 
Cbg @lime
 
umm in my makefile I write lines like this:
version: $(app_C_OBJECTS) $(app_V_SHADERS) $(app_F_SHADERS)
	$(app_PYTHON) version.py
where app_PYTHON=/usr/local/bin/python3
why did I have to include the full path?
is that mean, that python3 is not added to my PATH?
(when I do "python3 version.py" in the makefile, it gives me "python3 is not a file nor a directory" or something similar error)
(even with $(shell python3 version.py))
 
9:43 AM
In the house of Clements, there is no tea... poor old puppy is un-hap-peeeeeeeeeeee
 
Lets take over the world
 
Can't... no tea :(
 
We need some reason to take over the world and we got that Puppy... Cheer up... :)
 
But.... without tea.... weak.... puppy.... weak.... lays back down on the floor
 
EDM for the win yay :D
I mean, someone please shoot me.
 
9:55 AM
@Terfin give me tea and I'll shoot you?
 
@JonClements That doesn't sound like a very fair deal.
 
Okay, we will shoot you and take the tea.. Sounds fair?
 
@thefourtheye Yup!
 
You asked someone to shoot you... it's strongly against my morals, but if you can provide tea, then I'm sure they're not insurmountable to overcome for a brief period :)
 
Are there best practices in laying out a Python app structure??
 
9:57 AM
@needaname what are you calling a "Python app"? :p
 
@JonClements Something that pulls data out of a database and shows it to the user. Well I'm bad at explaining xD
For context this is the app I'm building github.com/yakamooz/yakamooz
But it looks messy to me :/
 
Probably want a redis implementation in there at some point :)
@needaname I'd be tempted to group "methods" and "views" into separate modules
 
@JonClements Yeah I'm near that point :D still a few commits and will be there..then I'll have to choose between Redis and MongoDB capped collection :/
 
What is this? Using a CSDL (XML based language) to statically define entity types and properties... HOLD ON! IT CAN BE PYTHONIC! OMG I LOVE YOU METAPROGRAMMING.
 
I'd rather not bring another layer of complexity to mantain later
 
10:01 AM
@needaname it's simplifying - not complicating :)
You have posts, comments, notifactions, users...
they're disintinct enough to warrant their own grouped routes, models, views etc... (possibly even templates)
And your route definitions here - you might want to consider there's a 3rd party flask plugin that does restful api stuff, or failing that, you might want to consider flask.Blueprint to write something that extends a common route and does the boilerplate for you
@Peter hahaha... haven't heard this one in ages :)
 
klísudgfb ksuCFNPug sflciwngfuxéz CBFNGSU OVIÉZ Éncfgu éosuz bncoEFTÉxugmfoug
(== please no.)
 
I was going to link you to "Barbie Girl" - you should be thankful :)
 
@JonClements have you heard this cover youtube.com/watch?v=cPURsOK4AsQ ?
 
hangs head in shame... I'm liking it :(
 
(I don't like the tone of the guy's voice)
@JonClements :):):)
 
10:12 AM
can we make small ERP system with python ?
 
@JonClements That makes sense :)

For the templates I think we're there. What do you mean by grouping "methods" and "views" into separate modules? Aren't they already like that? Or you mean like having a separate "view" for each "view" in "views" (as /views/index.py /views/post.py..)?
Didn't know about the 3rd party plugin but will look into it now
:)
So, checking out this one flask-restful.readthedocs.org/en/latest
 
I meant posts/routes.py posts/views.py posts/models.py and users/routes.py users/views.py users/models.py etc...
 
@JonClements Oh, in that way. Now..it looks very easier at the eyes than the mess I have :P
Never thought about that scheme, altough I already used it when I programmed with Php (sorry for swearing :D)
 
Haha... it's a django sort of layout
Keep your config and main in the root, group your other stuff in subdirs that represent a "concept" of the app... (eg, posts/users/comments etc...)
 
Really? Guess I have to check out how the Django guys deploy their baby then
 
10:19 AM
cbg
 
@needaname they've got a default way, and variations thereof... but a separate app per concept that contains the views and models is default...
cbg @Aaღirkhan !
 
@JonClements Understand. You made everything clearer :)
If it was you would you define "methods" as functions or classes?
 
If a function will provide the functionality, then a function :)
If you're doing some cleverer stuff with inheritance/blueprints/whatever... then you might want to look at classes... but that's rarely the case...
 
i am totally new in python.. just willing to know is it possible to make small offline ERP system
 
@Danish given the vagueness of your statement... yes, I'm sure it's possible to make a small offline ERP system :)
I'm fairly surely you could do it in a whole host of languages - not just Python :)
 
10:27 AM
hmm right and it gonna be hard or too hard for me ? my background is just fine in PHP not too good
 
Well, all I know of you is that you're named Danish Iqbal and asked if building a small offline ERP system is possible in Python... I'm certainly not qualified to determine if it'd be easy or hard for you :)
 
haha good saying
 
If you're more familiar with PHP and have no need to learn Python specifically... why not get your work done in PHP and learn Python some other way?
 
i actually thought that bcz where i have to make ERP system they already had my 1 software which i made on VFP9 and they dont care if it take much time then usual
hmm like which other way?
 
@Danish a tutorial ?
 
10:39 AM
hmm but can we learn with tutorial as we can learn with project?
 
I don't know... can you?
 
hmm right
if i gonna learn it with tutorials it gonna be easy to learn
 
Okay then... well, you're the best person to decide that... give it a go if you're happy to do so
 
and with project it gonna be hard way
hmm and what u suggest
through tutorial or project ?
 
10:55 AM
Whatever you're happy with - I can't suggest anything - as I said - I know nothing about you, your capabilities, your passion, your aptitude, the depth of your project etc... This is something only you can work out :)
 
hmm ok then thanks a lot for your help :)
 
11:37 AM
@Jon Briiiiiiiiiiiiiiian!!!
Got intermittent phone signal :(
 
11:50 AM
this question is funny to me. Halfway through, he reveals some detail about the problem and says "(forgot to mention)". And I'm thinking, well, you remembered before submitting the post, so why not just... Go back and revise your introductory sentence so that you do mention it?
Like, if he thought the question was fine as-is, then I wouldn't mind. But clearly he doesn't think that, because why would he then have an apologetic aside there?
Anyway, since he didn't actually ask a question
 
I am doing this online test does anyone know how to solve this problem? snag.gy/Yedga.jpg
and problem 2 snag.gy/PTTBF.jpg
and problem 3 snag.gy/owHzt.jpg
 
I don't really feel comfortable providing help here, since the purpose of codility is to "[filter] out job candidates who cannot write correct programs." Cheating at this would only mislead the recruiters and hurt both them and you, in the end.
 
12:05 PM
I was about to say the same, I don't think this is appropriate :/
 
I found the answer to 1. peter-braun.org/2012/01/…
 
What's the point of doing codility if you can't do the problems by yourself? All you're doing is wasting yours and a recruiters time.
 
cbg
I continue to be amazed at what people are prepared to upvote.
 
Oh yes? Have an example in mind?
this post, I'm guessing
I rather dislike the habit of using a single variable to refer to different data types at different times. In this case, my_time is first a string, and then it's a datetime
 
12:23 PM
Yes, that one springs to mind.
The OP asks for 'what is a good datastructure to represent just time (hours, seconds)'.
The upvoted answer is: use datetime, here is how you parse a string to a datetime.datetime object.
that's all rather nice, but it doesn't address the question, nor does it address the miriad number of use-cases the OP didn't narrow his question down to.
 
I think the reason that guy is using strptime, by the way, is because he considers strptime('%H:%M:%S', '05:43:34') more descriptive than datetime.time(5, 43, 34). The former resembles the way time would be written in real-life; the latter is just numbers.
Not that I consider that strong enough justification to use datetime over time
 
even then, you can use datetime.strptime().time() to extract just the time object.
But again, that depends on the use case.
datetime.time() objects represent a moment in time, a state of a clock.
 
I think if I were terribly concerned about making the arguments understood, I'd just do datetime.time(hour=5, minute=43, second=34)
 
It does not represent a duration or offset.
 
why hello friends
 
12:36 PM
Hi
 
y'all ready for another exciting day of inane and contextless questions?!
 
I just ignore those
I experienced a strange coincidence yesterday. There was a news post on Hacker News, about the danger of leaded gasoline and its connection to the crime rate. Later, on a completely unrelated site, a blog post from three months ago linked to the same gasoline study.
 
I thought we had something special, Kevin...
 
Funny how, of all the zillions of pages on the Internet, I would be pointed to the same one, twice in a day
@Crow, where you have gone, I can no longer help. All flask questions go in one ear and out the other.
 
yeah, today I'm mostly doing setup/deployment stuff
 
12:47 PM
@Kevin It happens all the time, but you usually don't click on all those paired links and notice. :-)
 
Yeah, that explanation is far more sensible than "the cosmos really wants me to learn about leaded gasoline"
 
But if the cabbage wanted you to be aware of such matters then it should be priority of course ;-)
 
It's like how my dad said that he's seeing a lot more trucks on the road than he used to. How coincidental, that this apparent surge would occur just after he decided he wants a truck for himself!
 
Isee a lot more cars on the road when driving... I don't actually see any when indoors
Must be magic or something
 
I drive by a two-story car dealership every day. I wonder how they get cars down from the second floor. Freight elevator, maybe? Seems like a harrowing task.
 
12:58 PM
Cbg all btw
 
@JonClements Cbg!
 
@kevin it's magic - that's all you need to know...
@terfin cbg again!
 
The magic of poorly paid interns.
"I'm going to need you to stay late and dismantle the car upstairs, bring each piece down here, and reassemble it"
 
@Kevin if you ever need a lighter "only header" GL math implementation for graphics instead of GLM: here it is. datenwolf created it, I found him and/or this at SO
 
Hey @PeterVaro, I watched Submarine yesterday.
 
1:06 PM
..aaand?
 
Overall, I liked it.
 
:)
— sigh
 
I worry when I identify with dorky main characters a little too well
 
I like these kind of films exactly of that^ reason
first you think: OMG those characters can't be real
 
I can definitely imagine myself being too anxious to go visit someone in the hospital, even though I know it would hurt them
 
1:08 PM
so surrealistic -- and at the end, you realise
 
And coming up with some lame justification after the fact
 
hey, this is what we are.
okay, then -- what part you didn't like?
 
I didn't really get the resolution of the parents' plot. The father didn't make any grand gestures or anything. His characterization felt a bit flat.
Like, why did they get back together in the end? Was it because of the way the neighbor handled the main character's vandalism?
I guess it's not too endearing to leave an ailing person on someone's doorstep...
But then, I guess that's just a consequence of having a non-omniscient viewpoint. Some plots get resolved, and the narrator doesn't know how. That's how it is in real life, too.
 
umm that's interesting -- for me the whole plot was about the father-son similarity (and actually all men's stoicism) in a similar situation, what men can't handle the most: being loved and not being loved.
for me the father figure was a perfectly "full" character, however the characteristics of him was very simple: he was antisocial
in a lot of ways -- that's why he chose the "sea" and the world of "underwater" (that's why it is Submarine afaik)
and that kind of character will go back -- even what happened with the neighbor and the wife
he will always go back, and he will always hopelessly love his wife
however he will never be able to express his love ever
 
Yeah, the father-son parallel is important, I think. It was a sad moment to see the main character drink the hot lemon-tea, symbolic of the depression he inherited from his dad.
 
1:17 PM
it was, yes
anyway, I think this film has two layers
 
## Delegate access to implementation.
#  @param self The object pointer.
#  @param attr Attribute wanted.
#  @return Attribute
def __getattr__(self, aAttr):
    return getattr(self._iInstance, aAttr)
caaaaaaaancer
 
first it is some kind of a weird comedy -- that's for the folks out there who wants to watch some movie with their girlfriends
 
@ThiefMaster Yuck!
 
the other layer is way deeper, and you have to remove the first layer to make it perfectly valid
so for me, some of the weaknesses of the plot is there because of the first layer
 
Looking at the whole class is even better: gist.github.com/ThiefMaster/b1d7e06035518bad2ca6
 
1:20 PM
if it was all about the second one, probably none of us could watch through the entire movie
 
mm hmm. You can see both layers in the scene where Oliver goes to christmas dinner at his girlfriend's. They're having a touching scene in the background, and he's awkwardly sitting at the table alone
 
that's a very very disturbing scene
 
It's very conflicting. I want to laugh at his discomfort, but I want to cry for the mother
 
exactly
that was the part of the film, when I felt so ashamed of my self, like if I was there, and sitting there like the boy did
those are those awkward moments in life when you really don't want to be there, but you have to, you can't disappear
 
Yep, I felt the same
@ThiefMaster Who does it help to copy-paste @param self The object pointer a zillion times? Honestly, now
 
1:24 PM
anyway, I guess it was worth watching it, the only think I wanted to change about it the ration of the two layers in the film
 
@Kevin nobody, i guess whoever wrote it ~10 years ago was simply stupid
 
for me the first is a bit too much in this film, but at the end I felt this film was a 6.8/10
maybe 7
 
s/10 years/4 years/ m(
 
cbg again
 
It's a very cargo-cultish habit
 
1:27 PM
@JonClements re-cbg
 
Probably picked up from other languages, since no one would ever recommend commenting on what self does if they spent more than an hour with Python
 
cpx
pre-cbg
 
pre-cbg? Is that like a run up to the actual "cbg"?
 
I think it means that @cpx is a time traveller
He cbged you just a bit before you cbged
I have no idea how the hell did I turn a vegetable into a verb, but ok.
 
Or a hipster. Just simply cabbaging is too mainstream.
 
1:31 PM
The philosophy of the cabbage, by @JonClements
 
He's in the room, but not yet mentally prepared to converse. He'll cbg when he's ready to talk.
 
@Kevin That's CDD - Cabbage Driven Development
 
@Terfin verbing weirds language. I'm all for it.
 
Cabbage Driven Development lol
 
Arhghg... 12 upvotes for a range question sighs
 
1:35 PM
@JonClements Me too ;-)
 
it's a sequence type, not a damn iterator :)
 
Didn't expect at all :'(
 
@thefourtheye probably a good answer to add to the sopython.com common questions :)
 
@JonClements Oh, thanks Jon. I just thought it was an iterable object. Updated it.
 
Like you put in your answer, it's an immutable sequence type... and it's odd to find a sequence that isn't iterable :)
 
1:39 PM
I think I better start answering some questions. I dunno why tho.
 
I actually copied that from the docs... :) Digging deeper into the xrange type
 
@Terfin sounds great.... What's your credit card number, pin number, full address, bank details and such... ?
 
Cbg!
 
@Ian cbg!
 
@Jon how goes?
 
1:41 PM
@Ian goes good - yourself? (started new role yet?)
 
@JonClements Are you willing to pay my mortgage then? :P
 
@Jon - good too TY! No, last week in current role \o/
 
Psychic debugging - any idea what that means? Me googles now
 
@Terfin sure... all I need is your passport number, driving licence details and social security number to do so...
 
and don't forget my picture
and a face mold
 
1:43 PM
@thefourtheye the art of being able to identify a problem when someone doesn't provide any form of detail as to what the exact problem could be...? :)
@Terfin finger prints and DNA sample... check... (always forget those)
Probably need a voice print as well
 
true, I will also let you borrow my eye as well
 
@JonClements Oh, that makes complete sense for this answer. Thanks Jon :)
 
@JonClements btw, did you get your tea?
 
@Terfin I did... I now have boxes of tea overflowing from the cupboards
Puppy is now happy
 
brb rebooting into Ubuntu 14.04 :D
 
1:45 PM
Is it just me, or has the "Careers" thing down the side of the main site gone a really strange shade of blue
It's not even the logo for the career site anymore...
Just looks really out of place
 
I haven't got a careers thing at all
They sent me a beta invite long ago, after an answer of mine became popular for the first time. I think I've lost that email since then
 
The ad on the main site... it looks horrible and no longer has branding... only just noticed it
 
Ah, I see it now that adblock is disabled
 
I need to get a job ._.
 
@Crow become a dict specialist :)
 
1:55 PM
not trying to brag or anything, but I can make a list of dictionary tuples
 
Woah! You da man! I fearz you!
 
why would I? Obviously to make a convuluted representation of data, what else?
 
cbg all, finally home :D
 
@Ffisegydd STEWIE!!!!
At 3pm? You slacking off or something? :p
 
@Jon BRIIIIIIIIIIAN!!!!
Just spent 4 hours on a train through mid Wales
 
2:00 PM
Nothing like reading Careers to make me feel inadequate. How can I call myself proficient, if I haven't had 8 years of continuous commercial experience in full-stack django/flask/HTML/postgres/florby/cloud/enterprise solution management?
 
I've never done that... if I were to, I think it'd be safe to say I'd be on the wrong train
@Kevin - if it's any consolation - I've been doing this nearly 20 years now, and I read some of those job ads and think wtf!?
 
Yeah, I think some of these people are asking for the sun & stars
 
Some of them are really taking the proverbial... 10+ years in this, this and this... and we'll pay you £40k.... errr.... no thanks... 10+ years in just one of those is at least £80k
 
His answer is incorrect but he stated he wants one.
Aaand goal reached.
 
Shall we all delete now before he self-deletes evil grin
 
2:09 PM
Too late!
 
Oh well... wouldn't want to be seen as too evil
my cuteness is my only defence from stopping the masses realising their fate shall soon be in my paws!
 
The peasants storm the castle with torches and pitchforks, but only find a nice doggy... They absentmindedly pat their pockets for a biscuit
They go home, feeling rather foolish, and the cycle repeats
 
2:24 PM
I'm not sure if I am doing things right, but they seem to work... hrmph
 
@Crow maybe it's not working, and your understanding of how it should work is flawed such that it's a happy coincidence it appears to work?
 
well, I'm trying to make my app generate some static json, but I think using blueprints might be overkill
 
Why would you generate something that's static ?
 
every 12 hours, make some new jsons because queries ran
 
(well, more than once anyway!)
Why not cache it for 12 hours?
That way your return result is inherently dynamic if it needs to be, but otherwise the cache handles it
 
2:30 PM
because my manager says not to.
 
Okay then... won't go there :)
 
yep hah, therein lies all of the problems. I could get it to work otherwise just as easily
 
@JonClements how bad design is it in C to use global variables/values?
 
Well... it's more excusable that in C++/Python, but still shouldn't really be required for most circumstances
 
it will be in a header file, and it is an array contains file paths ("readonly")
 
2:37 PM
If they're constants - that's okay...
 
okay.. thanks ;)
 
@Martijn well... umm... I can see why the other answer deserves a down vote: )
 
Yeah, and I have a hunch as to why mine was downvoted..
 
Maybe they think that the actual problem is that urllib2 doesn't exist (although I'd expect ImportError in that case, not NameError)
 
2:44 PM
That downvote coincides rather closely with the most recent comment from the competing answerer.
@Kevin Indeed, hence my comments addressing that.
 
I've cast a delete vote anyway
you reckon that other answerer is getting confused with python3?
I don't get this...
Payment planFlexible Plan
change
Users1
CurrencyGBP
CostUK£3.30 per user per month
Est. monthly billUK£3.30 per month
Contract expiresNo contract
 
Looks like CSV, but without the C or S
 
Yet... Google seem to charge me £2.23 (or close to that amount) every 3 ish weeks
 
cabbage peeps!
 
@Games CBG!!!
wags tail
 
2:49 PM
@JonClements How ya been?
 
Good thanks - you?
 
All right, book, exam, job all killing me, but thats life XD
 
Life's a bitch and then you die? :p
 
yea, that sucks, but thats how it is.
btw, how's your niece?
 
Fine... will be seeing her next week
 
2:52 PM
@JonClements thats awesome :) I bet she's grown a lot by now.
does she still pull people's fingers?
 
okay I think my brain is not functioning correctly here, but this should be simple... someone puts www.asite.com/?chart=chart_name. Now I want to grab the thing at root www.asite.com/chart/chart_name. How?
 
@Games Hopefully she's stopped pulling my tail :)
 
@JonClements awww, we should make a meme of that XD
 
@Peter friggin' Ben Pearce - it's all your fault! dammit!
 
still?
 
2:59 PM
It just came on, on random... so that's your fault
 
I see, well shame on me, even if you were the one who showed that to me in the first place. But still, shame - on - me!
 
Exactly!
I hate the paying services time of the month...
Anyway... all done...
 
@JonClements is it a dirty hack to build a struct with "finite" number of int, char* objects and fill the values with stepping memory block to memory block? (where int will be the id the OpenGL returns, and the char* is the path from the OpenGL should load the file which returns the int)
 
Need to look at the Job Board project again in a bit, then sopython and the bot stuff
Do you need the ints, or if it's sufficiently finite and contigious, could you just use an array of char* ?
 
I fill it with values when I initialise, and later on I want to use it as struct->int
(with the proper variable names ofc)
(a bit like a dictionary I guess.. but not that dynamically)
 
3:13 PM
Without fully understanding, yeah... it'll work
 
I know it will :)
my question was: is it a dirty hack I should avoid
or it is perfectly normal..
 
cabbage all
 
I recall seeing the same technique being used elsewhere
and there weren't any apologies in the comments, so those authors at least didn't consider it a hack
 
:P
cbg @Jerry
 
cbg Peter!
 
3:16 PM
cbg @Jerry
 
cbg Jon!
 
3:32 PM
And the Careers ad is now a horrible shade of orange... what's going on with that!?
 
@Jon you're a dog, you're colour blind. Looks fine to me.
 
Okay... it smells wrong?
 
I thought this guy just wasn't passing in enough arguments to his method, but he's getting missing 1 required positional argument instead of takes exactly X arguments (Y given)
 
is out for a bit, rbrb
 
Not sure if I've ever seen the former message before, come to think of it
Ah, it's a 3.X message.
 
3:50 PM
umm @Kevin and how exactly am I supposed to load a value to a struct?
I know the struct pointer let's say it is S
and I know the location i*sizeof(GLuint)
umm.. I'm confused.. is it always true, that datablocks in a struct sits nect to each other in the memory?
 
I want to say "yes", but I don't remember for sure
 
it doesn't have to be necessary true.. I mean, what will the program do, when there is not enough space in a "row"?
my guess is it doesn't matter, since you want to access to the data by a pointer
like: struct->data | so the program will search for an empty block, right?
 
4:09 PM
@Kevin atm I got segfault but that doesn't prove I'm right
so anyway.. how exactly would you assign a value to a calculated pointer. or I should ask: how exactly will you calculate that pointer?
 
Hmm, trying to remember
 
*(GLuint *)(shaders + i*sizeof(GLuint)) = id;
it is working :)
but I am actually terrified if this would work in all circumstances
 
I expect bad things would happen if i goes past the end of the shaders array
 
yeah, it probably will be a segfault
but I can check that to make sure that array I'm iterating through has the same length as many datablock are in my struct
@Kevin I guess this means yes: en.wikipedia.org/wiki/…
 
4:30 PM
yep
 
4:44 PM
how do I get a method that is contained within a blueprint in flask?
 
bbabl all
 
cbg, btw.
I totally timed that to avoid @Jon..
@Crow Blueprints just group routes and associated request handlers and such.
You'd just import the function directly if some other code needed it.
 
I want to use a query string to reference a blueprint
 
00:00 - 17:0017:00 - 23:00

« first day (1284 days earlier)      last day (3668 days later) »