« first day (1281 days earlier)      last day (3683 days later) » 
00:00 - 14:0014:00 - 00:00

2:00 PM
'ello 'ello poke
 
Cabbage!
 
@poke cbg!
 
hey poke, quick question, were code blocks in SOPython made with prism.js?
 
no, I don’t think so
 
Right back to writing my plugin...
 
2:03 PM
whatcha writin', Terfin?
 
OData plugin for bottle, tho I think it may just be possible to generalize it to other frameworks as well afterwards, I use bottle as a POC as it is rather simple.
 
very nice. Today I noticed all of my confirmed answers for questions on SO were answered by Martijin
 
morning jon
 
2:27 PM
anyone knows if pymongo has a nice way to get the first item or None from a cursor?
Because this is kind of ugly...
prev_event = db.Event.find({
    'date': {'$lte': event.date},
    '_id': {'$ne': event._id}
}).sort('date', -1).limit(1)
next_event = db.Event.find({
    'date': {'$gte': event.date},
    '_id': {'$ne': event._id}
}).sort('date', 1).limit(1)
prev_event = prev_event.count() and prev_event[0]
next_event = next_event.count() and next_event[0]
 
You're probably better of MR'ing that one
 
is there a way, in flask testing, to easily extract line and block coverage?
 
You're a Crow - use the bar ... see what I did there... hilarious! muhahhaha cough
 
What's MRing?
 
map-reduce
 
2:35 PM
well the database is pretty small so i guess it'd be overkill?
 
Yeah... if it's small, small... just materialise the who lot into a list and do it that way
 
yeah that'd be another option :p i used to do that with the static dummy data before
prev_event = next_event = None
for prev_event, cur_event, next_event in window(itertools.chain([None], EVENTS.itervalues(), [None]), 3):
    if cur_event == event:
        break
 
I'd go that route... it's possible to emit pairs at a time using MR and such, but screw it, I wouldn't bother... if that works - it'll probably be just as quick anyway
heya @Hritso
 
Hi guys. First time being around
 
Cool... welcome to the room :)
Is the web fixed yet - or is there still a couple more apps to go? :p
 
2:43 PM
:D
It's nowhere near being fixed. Working on an app that works with SAP API's, and boy how broken all that is :)
 
is there a way to render github/stash markdown on external websites?
 
@Hristo I know someone that doesn't even like working with SAP datadumps they're so unpredictable at times :)
 
2:58 PM
hey
 
wb @TGM
 
3:27 PM
hello, I need some help with pylab
I am getting an error
the traceback does link to a line in my code
    x, y = self._xy_from_xy(x, y)
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 248, in _xy_from_xy
    raise ValueError("x and y must have same first dimension")
ValueError: x and y must have same first dimension
there is more to the error message but this is
A sample of the x and y list
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]  # x list
[20, 22, 20, 21, 18, 19, 16, 17, 15, 16]  # y list
my code is too long to paste here ~ 35 lines
 
:| why is it that, in stash markup, # seems to be interpreted as header1, even in code blocks?
 
I solved it
x and y list were not the same len
 
how do i access sessionStorage or localStorage from HTML in Django?
 
3:56 PM
bleh, I'm so bad at importing
 
YES! Managed to parse $filter correctly! One OData feature on its way. Only 1 billion features left! Tokenize, I freaking love you!
 
proud of you!
 
meow @poke
 
4:25 PM
woof @copy
 
That was me. :)
 
Ohhhhhhhh, you’re in Germany?
 
Nope, the other way.
 
Ohh, that’s cool too :D
 
Yes, you should come too.
 
4:27 PM
And considering you’re coming to Germany anyway, it’s also fair :P
 
Yeah :)
 
I don’t think I can make it to your place atm :P
 
Well, I'll see you in October anyway.
 
Yup :)
Btw. did you hear anything back yet?
 
Nothing yet, they're taking so long. I think I'll apply for RUB too.
 
4:29 PM
:/
 
I just had a very stupid revelation... how __init__.py files do everything I was having trouble doing before.
 
@BadgerGirl what is RUB?
 
I'll rub you vader ;)
 
@Crow ....okay
 
4:45 PM
@Vader A university.
 
in DE?
 
Yeah
Do you study there too?
 
nope
I might
if I ever hear form uni-assist
 
We'll have a Python room meeting there then.
 
Alright
 
4:48 PM
Why don't you apply directly?
 
I am not applying to RUB, just other unis in DE
 
Do you know any German?
 
ja
 
It should be easy to apply directly there. The process already started in some unis. :)
 
well I wanna be in Berlin
so I applied to TU and FU
 
4:54 PM
For October?
 
WS, yes
why do you want to study in Germany? I am 1/2 German btw.
 
Yeah
 
oh, do you know German?
 
Yeah, some.
 
Hahahahaha.... love that "Mario Goes Beserk" ad.
 
5:00 PM
@BadgerGirl Do you plan on liviing in Germany?
 
Yeah.
 
Where in the US do you live? East/West?
 
I live in Mexico.
 
okay, now it makes sense
I just found it strange that you were so willing to move
not that mexico is bad, but I've heard stories
 
I'm not so willing to move, I'm just moving temporarily to be with my boyfriend. We might relocate to Mexico when we finish studying.
 
5:04 PM
Interesting, It will be tough on him I think
 
@Badger reminded me of a favourite: youtube.com/watch?v=y1oN7S4tZkc
 
@Vader Why?
What country do you live in?
 
Well DE -> MEXICO == big change
USA atm
but I lived in Berlin for 7 yrs
 
Mexico is not bad at all.
 
a friend of mine got mugged there
ofc that is not representative of the entirety of mexico but it is my only experience with mexico.
 
5:21 PM
@BadgerGirl did you apply for a visa?
 
Not yet, I need the acceptance letter first.
 
what is the use of setuptools and fabfiles, precisely?
 
5:41 PM
@BadgerGirl how long have you been waiting
 
5:57 PM
bbiab
 
6:48 PM
hey y'all... I'm wondering if this is a sustainable way to structure a large flask app:
 
7:19 PM
@Vader 3 weeks
 
8:05 PM
@JonClements can you help me for a sec?
 
I can try...
 
this is about pointer and C
:P
if I'm inside a function, and one of my argument is (char *)
 
pointing is rude!
 
@Terfin not if you do it behind their back :)
 
@JonClements 1 == 1
 
8:07 PM
and I want to pass only the first two chars of the string to the strtol(char *str, char **endptr, int base); function
how can I do that?
I tried lot's of ways, but none of them worked so far
 
Errr, endptr is a ** ?
 
it is an stdlib function, yes
string to long integer
 
Oh, I see
 
endptr
> This is the reference to an object of type char*, whose value is set by the function to the next character in str after the numerical value.
 
right... you probably want your "endptr" to be &(ptr + 2)
 
8:09 PM
so for example:
 
Yeah... I get it... make your endptr be 2 after the ptr, then create a pointer to it :)
 
char *x = "FFCC";
strtol(x, &(x + 2), 16);
 
Except it might need to be (char*) &(x + 2) or something
 
how convenient..
check
@JonClements error: cannot take the address of an rvalue of type 'const char *'
 
Ummm.... okay... so errr....
having to think in C.... why do you do this to me!?
 
8:13 PM
:D
 
hhhokay. Does this seem right, in terms of structure, for a web application? Would it be scalable and easy to use? github.com/DarkCrowz/flask_big_app
 
@Peter one sec... lemme just finish something else quickly so I'm not thinking in two different ways
 
okkay, thanks
 
Ahhh... okies... no
it doesn't delimit the value... it merely points to "after" valid numbers
so if you wanted to reuse it... in a a list of strings, eg: '1 2 3 4'
So, strncpy the bit you want to a temp buffer, then strtol your buffer instead
 
since it is only about 6*char values is it easier to use {str[0], str[1], '\0'}; ?
and do this 3 times? 0-1, 2-3, 4-5 ?
 
8:21 PM
Could you scanf ?
 
no
you want me to use %x ?
:)
 
%2d%2d%2d I think might work ?
Can't remember if d takes a width though sighs
I think c does though LOL
sheesh... I'm rusty
 
:)
okay then one last thing
if I do ++i and i++ what is the difference?
for example i atm is 0 and I do array[++i]
which value should I get 0th or 1st?
 
Good old pre vs post increment
 
yepp
 
8:27 PM
Right... think of the ++ as doing something and returning something
So, ++i increments i and returns the new i
while i++ increments i and returns the original i
 
super :D thanks
 
So with i being 1: ++i makes i 2 and returns 2... while i++ makes i 2 but returns 1
Not sure that's the best way to explain, but it's the fundamental difference anyway
 
now I understand it, thanks
 
How do i read a file from cProfile.Profile().dump_stats(...)?
 
Gonna chill out for a bit... laters
 
8:37 PM
Is there something built-in?
 
read a file? In what sense?
 
dump_stats('mystats.profile') stores the file, mystats.profile on my HD; but when i try to open it in notepad, it's garbage. Opening it in IDLE displays nothing.
 
Cabbage all :D
So I finally got round to uploading the new TigaMail version to youtube.
 
8:57 PM
@NoobSaibot which operating system are you using?
 
Anyone got an idea for a project I could do?
I need to get used to the N++ theme I'm using :3
 
@Noob you use pstats with cprofile to look at the stats
 
you could also output to a file, like cProfile('my_method') >> logfile.log (assuming you are on mac os x or linux)
 
This is embarassing
Debit cards no worky - me need to pay... ugh
Fantastic... can't even find a pin reader
 
hrm, seems your only option now is to mug someone
@Iplodman web apps! Web apps are fun
 
9:10 PM
As in Django?
 
Umm... won't ask Stewie... last time he beat the s*t out of me what I was late paying it back by a few hours :)
Iv'e got video evidence of his brutality as well!
 
@Iplodman I'm using flask, it's a lot of fun to explore imo
 
Hm, flask. Is that an in-built module?
 
bbiab
 
@Iplodman nah, but you can install it with pip very easily
 
9:17 PM
Litterally just started it :D
Installed it first time Falls in love with pip
 
pip? Do you use virtualenvs at all? If not it's a good habit to get into
 
Virtualenvs being?
#CodingScrub
 
9:34 PM
which version of python are you using?
 
3.4.
 
you can do pyvenv /path/to/ve to make a ve, then go to that directory and do source bin/activate. Now you have your own separate python instance and you can pip install to that!
 
9:56 PM
As cool as that is, I don't think I'll be using it ;)
 
bah, it's absolutely impossible to conditionally set a html attribute on a field when using wtforms and calling it inside a jinja template
any kwarg that is not True causes the argument to show up with the given value... and jinja doesn't let you modify kwargs in a macro (which makes sense, it would be way too program-y for a template)
{% if field.flags.required %}
    {{ field(required=true, class='form-control', placeholder=field.label.text, **kwargs) }}
{% else %}
    {{ field(class='form-control', placeholder=field.label.text, **kwargs) }}
{% endif %}
almost as ugly as bin laden's mom
 
Rhubarb all :D
 
10:11 PM
@Ffisegydd: Thanks.
 
@ThiefMaster I was having a problem like that today ._. flash is also a weird module
 
10:52 PM
Hi, I can't run Paramiko because it says I haven't got the module ecdsa, even though I have?
 
11:02 PM
is it in your site packages?
 
11:13 PM
No, it doesn't show up
 
11:24 PM
Greeting
I need python to pause... how?
* Google *
Found it
XD
CaBBAGE
hi Ahmad
 
oh hey
 
Oh, Is heartbleed bug in Stackoverflow.com patched?
 
yes
 
At last.
 
why at last?
92
Q: Is Stack Exchange safe from Heartbleed?

Andrew GrimmIs it safe to use passwords on Stack Exchange sites following the announcement of Heartbleed? Currently, http://meta.stackoverflow.com/a/214543/38765 does not list the sites being fixed.

They already did 12 days ago
 
11:36 PM
I stopped using it for two weeks
joined today
-.-
 
why'd you do that? I haven't even changed a password yet. Lol.
 
ah
Love xbvd explantyionm
 
00:00 - 14:0014:00 - 00:00

« first day (1281 days earlier)      last day (3683 days later) »