« first day (1503 days earlier)      last day (3444 days later) » 

12:17 AM
going on an international video game server is the quickest way to learn a language
 
Usually not the best kind of a language though
 
Probably not, hopefully my German doesn't sound completely weird
 
I can always test you :P
 
Alas, ich kann nicht deutsch verstehen weil ich bin ein Katze :(
 
*ich kann Deutsch nicht verstehen, weil ich eine Katze bin.
 
12:20 AM
ein braun Katze. Meow meow :3
 
But apart from ordering, everything is there :P
German meow is “miau” though
But I’m wondering what kind of game that is that people talk about being cats… xD
 
That's just my introduction to say "I'm bad at speaking German" hah
 
Interesting… :P
anyway, I’m out, rhubarb!
 
also direct objects in German... so complicated
 
direct objects?
 
12:26 AM
like when you say "I like the (thing)", how you have to make the article before it. Ein, eine, einen, einem, etc
 
Oh, you mean that nouns have a gender
 
yeah, it's kinda hard to remember all of them
 
or, no, you mean the case.
(grammatical case)
Yeah, German is fun… ^^ – but I’m really out now, rhubarb ^^
 
alright have a good night
 
 
6 hours later…
6:15 AM
Cbg
 
6:47 AM
Cbg
 
7:33 AM
Cbg
 
8:07 AM
I'm finally reading about Flask
I like the fact that Flask-WTF can create forms from SQLAlchemy models, that's awesome
That was one of the big things I thought Django did really well
Just needs centralised config and some standard user/groups/permissions stuff and I'm there!
Hm, Flask-User
 
8:25 AM
Got a basic Nidaba development wiki page together github.com/sopython/nidaba/wiki/Development
Need to add more detail on how to install it for development.
 
8:39 AM
Found an article about centralised and environment-specific config in Flask.
Guys, I'm getting excited about Flask. I'm probably not the first person. Next project: Flask!
 
One thing: anyone have an opinion about SQLAlchemy migrations vs Django migrations?
 
@RobertGrant alembic
 
alembic does autogen
but it "works" depending on your definition of works
 
8:52 AM
In what sense? :)
 
in that most probably it works better than sqlalchemy migrate could possibly work, automatically
since it is written by zzzeek which is one of the greater gods
for example: if you use views in postgresql, then it thinks they are tables...
 
That sounds like a bad thing
 
9:12 AM
But probably wouldn't affect me
 
9:30 AM
We use alembic for sopython
 
As I read about it, it does look cool
I'm just confused about what @AnttiHaapala is saying :)
 
9:50 AM
I'll try it either way
 
10:18 AM
Cabbage folks
 
cabbage
 
@Ffisegydd As per your new wiki page - what's the best way of specifying what (system) libraries need to be installed?
 
@Interpid what do you mean? Non-python libraries?
 
Yeah, stuff like freetype6 (etc)
Especially will be needed for a fresh Ubuntu install (for example ;) )
 
Hmm. No idea. I've never had to deal with it.
Those form part of the requirements of our requirements. As it were.
But may, in time, become our requirements as well.
Such as vowpal_wabbit
 
10:22 AM
Yeah
Aye. I guess for the time being I'll just stick them in the wiki under "Ubuntu package requirements" or summat
 
Yeah okay. Feel free to edit whatever.
I need to sort my vbox out so I can install numpy on it.
 
cbg(Martijn)
 
cbg
 
Wiki stub created
 
10:38 AM
Is asking a question "How does this function work?" appropriate for SO? Not really?
Especially when it's some random function from some random ipython notebook.
 
5 opened tag pages, still can't find anything to answer :|
 
@Ffisegydd - Yes I got it from there. but what does the function doing?? — Elizabeth Susan Joseph 13 mins ago
@Ffisegydd - If it is not a built in function. then Why is it used in the Ipython notebook?? — Elizabeth Susan Joseph 3 mins ago
 
@vaultah maybe u can answer this stackoverflow.com/questions/26991609/…
 
No experience with Django whatsoever
 
@MartijnPieters So I'm curious: how did you find that question? (I went through the flag history, but clearly you didn't)
 
10:59 AM
@Swordy is in my Ignored tags
 
@Flexo Google.
site:stackoverflow.com plus the list of tags in that quote.
@vaultah if you use my browser plugin alerts me.
@Flexo you'd be surprised how helpful Google can be sometimes, including finding already deleted posts.
 
@MartijnPieters I use it for plagiarism flags and certain types of spam quite a bit but I wondered if there was some other route I'd missed
 
11:33 AM
@Flexo nope, sorry, no additional secret sauce here.
 
Can I here for questions without ?
 
@vaultah if you feel that the post would not be closed otherwise, but is an obvious close target. I used it for a post that is a) old, b) a resource request; pushing that into the queue would have taken a long time to close.
I do it rarely, if a question requires some domain knowledge to close then keep it to the appropriate room.
So if it is a JavaScript duplicate, for example, best stick that in the JS room, not here.
 
11:54 AM
@vaultah pseudo-code?
 
is it possible to get both the min and max value comparing the values only once?
something like MIN=min(a, b); MAX=max(a, b)
but instead MIN, MAX = order(a, b)
 
lst = sorted(initial); lst[0], lst[-1]?
@MartijnPieters not sure, the rest of code is (almost) valid Python
 
@vaultah then I have to create a collection
which I can sort
I guess calling min and max is cheaper and probably nicer than creating an iterable
and sort that, and unpack that
 
@vaultah still, pseudo code, futzing over how the stock count is managed.
Matthew worked around that nicely by making up an identifier name that expresses the same.
 
12:46 PM
Cabbage.
 
Ah buggerations. Epic Steam sale is on
 
nooooooooo
Okay, that list is rather short, and nope.
 
I'm on the Steam client, and I can't stop scrolling downwards. It keeps going
 
huh
There’s only one list with ~1 day 6 hours left, and another list with 6 hours left. The rest is the normal offer
 
1:02 PM
Ah gotcha. Well, out of the ones currently on offer, I'd have to say FTL, Don't Starve and The Wolf Among Us are decent.
 
1:13 PM
Battleblock Theater is very fun
 
Agreed - but only if you're a traditional couch & console with mates, hurling abuse at one another...
 
If we have a function which calculates the percentage of letters that are capitalised. What if we pass it an empty string? Obviously it will return ZeroDivisionError, but if we catch this exception, what should we return in its stead? 0? 1?
 
Hi guys can someone plz explain following expression?
0.29 * 100 = 28.999999999999996
shouldn't it be:
0.29 * 100 = 29
 
@Ffisegydd Well, I was working on redoing that code at the weekend. I made the function return a named tuple that gave the ratio of upper/total, lower/total and other/total)
 
1:20 PM
@Ffisegydd thanks man.
 
@Intrepid ah, I've just re-written it to use unicodedata.category as Jon suggested.
 
And if I remember correctly, I returned (0,0,1.0)
That's fine, I hadn't finished what I was doing and Jon's method seemed like a better way of doing it anyhow
 
(the 1.0 on my function was to represent the null/empty char)
 
So now I have something that looks like pastebin.com/Raa2fMp5
But I like the idea of a named tuple of different percentages. So lower/total whitespace/total etc.
 
1:24 PM
Yeah, and just make the function return all the ratios
But I definitely think that returning 0 would be a good way to go. Because the functions that will use that information won't need to differentiate between an empty string and a string that contains no capitalisation
 
Yeah. Well if you're working on it I'll leave it for now. I can always add the unicodedata.catergory bit afterwards if you haven't used it already.
 
I don't mind either way - it's not like I bagsied it. Our RFID modules have come in so I don't have huge gaps of time free during the day (which I wasted, beating Ubuntu into submission)
 
Alright then, I'll see what I can do with namedtuple later this evening.
 
@MartijnPieters thank. Much appreciated.
 
2:29 PM
Stitch / Firefly mashup T-Shirt? how can I say no?
 
2:48 PM
Happy Thanksgiving everyone
 
Happy Thanksgiving @corvid
 
Happy Thanksgiving. You watching the Handegg?
And what do crows eat for Thanksgiving?
 
Carrion, just like every day!
 
Ah. Shame. Was wondering if they made a specific effort to go for game or something
 
-5
A: What are all the namespaces?

AnonymouseOther questions for you... "What is google?" and "what does google return for the FIRST result when searching [C++ namespace]"

Wow
 
3:07 PM
@IntrepidBrit As in "Lilo & ..."? Where?
 
Niiice :-)
 
Pity it's on sale on the wrong side of the pond
(and I like how it's not IN YOUR FACE like so many mashup t-shirts. No - "hai guys, I know all these geeky things. LOOK AT THEM ALL.")
 
3:31 PM
@MartijnPieters is there a better way to extract markup tags from html than this github.com/sopython/nidaba/blob/anand/nidaba/core/…
 
3:45 PM
@Chillar can I ask, why do you want to extract these markup tags anyway? Did you have some particular idea for them?
 
@ChillarAnand hrmz, not sure if that'll work the way you expect it to when there are nested tags.
 
Is there a canonical question about references in Python?
 
Mozilla makes no sense at the moment.
 
4:11 PM
GOOOOOOOOOOOOOOOOONG
 
@Ffisegydd question feature: Ratio of markup tags to text
 
Obviously I could be wrong with this, as I'm just thinking it in my head and have no statistical proof whatsoever, but I can't see that being the best of features. Features should be able to distinguish, in our case, between a good question and a bad question. I can't see the ratio of markup tags to text doing such a thing. I'd imagine it'll be roughly consistent for both. But hey, we can try it.
It's worth a try, as long as it isn't going to stress you out doing the code for it :P
 
cbg davidism
 
cbg
wow, lots of cvs today
@Ffisegydd "I have neither the time, nor the inclination to help." Harsh!
 
4:34 PM
@ChillarAnand That’s not really an argument. Lots of questions come without formatting but get edited to have formatting and are then fine :P
 
Oh, btw, they set mc cookie to 1 to force mobile site to load
 
@vaultah Good observation.
Makes everything a bit more consistent
 
@davidism there was slightly more to it than that :P but yeah maybe a little harsh.
 
5:09 PM
Hello, fine Python programmers.
 
 
1 hour later…
6:55 PM
Hi
can someone please help me with a short cose
code
for i in range(1, (x + 2) / 2, 2):
why it does not work
 
Try (x + 2) // 2 if you're using Py3k, @gbox
 
@vaultah I am using 2.7
 
define "does not work" then
 
7:11 PM
yes my bad
I am generating primes
can I post a code here?
 
If it's too long, paste it on dpaste.de
(otherwise it's okay to post code here)
 
I mange to do it
 
What's the exact problem with this code?
 
but the code does not work well now, its print non-prime too
It is now runs on 2 to (x+2)/2
I wanted to make it faster but checking on odd numbers only
 
Logical operator AND is and in Python, & is a bitwise AND operator
 
7:29 PM
and will make it faster?
 
7:42 PM
Please search on StackOverflow for prime number checks. It’s a very common topic with lots of different approaches, some better than others. But in general, it’s really normal that it takes a lot of time.
 
@po
@poke thanks
 
8:03 PM
@Martijn … You beat me to it.
I had to look up vars, so I lost precious time.
 
@poke Why not stick with self.__dict__ then next time? :-)
 
I had the __dict__ answer, but I knew that there was some better way to access it. I just wasn’t sure what it was called :(
{k: v for k, v in t.__dict__.items() if isinstance(v, A)}
That was mine :P
 
@poke but at least you meant to use .items() there... cough
 
huh?
What do you mean, I “meant”?
 
well - can't pass up an opportunity for when @Martijn makes typoes :)
 
8:10 PM
I’m confused.
 
cbg @Benjamin
@poke never mind - just savouring the moment when one gets to correct Martijn :p
 
Uhm.
Did he do for i in vars(…).items() or what?
 
@JonClements I-didn't-do-it, nobody-saw-me-do-it, can't-prove-anything.
 
@poke he might have done :)
 
Heh :P
 
8:13 PM
Ahh - I was wondering where Kevin was, but I guess it's thanks giving :)
 
We definitely need kesh to fetch edits happening in grace time :P
 
@poke that's the plan... it's what the last one did for post timeline stuff... quite interesting seeing answers in the first 5 mins :)
 
Especially Martijn’s :P
He changes soooo much all the time xD
 
to be fair - he's good at it and almost always ends up with excellent answers... :)
 
Yeah… but I usually polish my answers before posting them :P
 
8:19 PM
by which time Martijn already has a bazillion upvotes and an accept coming his way :)
 
Yes :(
 
8:29 PM
Like pulling teeth. Not sure wether or not to persist.
 
@Martijn I love their comment...
This does not even compile or run correctly — The New Guy 5 mins ago
talk about: "I have no idea what I'm doing or understand my own problem, but you answerer, didn't provide working code!"
 
I've decided to begin leaving amusing messages in the Nidaba source code. Prize will go to whoever has found the most by Christmas.
 
Is camelCase the norm when naming Python functions, or is snake_case preferred?
 
snake_case for functions and objects. PascalCase for Classes.
(I think it's called PascalCase?)
 
Rubyists call it CamelCase. It'll take me a while to learn Python terminology.
 
8:43 PM
Ah I thought this camel case was camelCase
As opposed to PascalCase
 
Interesting. Maybe I'm wrong.
 
We should all use hungarian notation
 
I don't know much python, but pateryn's answer seems wrong. I don't think he's computing the mode at all, and I'm not sure it's computing the mean, either.
 
Umm.... trying to find a film watch to watch... any recommendations anyone?
 
Oh, wait. I get it.
 
8:58 PM
ahhh... a new season of south park is on sky catchup... don't think I've seen any of them...
Um... some interesting offers on Steam
Sods law they'd be 30% off Civ:BE
 
Hi everyone
 
wb @MarkF6
 
Actually, I work with networkx to plot a tree.
I have edgenames in a list, and I'd like to draw all edges and link every edge with each other.
I tried nx.read_edgelist() ; but I think it's not correct :/
does anybody know how to use networkx ?
example for nodes:
node = ["houseA", "houseB", "houseC", "houseD"]
 
@RobertGrant what I meant to say about alembic was that it is not perfect but anything sql tools written by zzzeek at 0.1 is still better than anything django at 2.5 :D
 
9:15 PM
@Intrepid I've put together a function which uses namedtuple
 
9:32 PM
Sigh. Sometimes you don't know where to start with someone. Exhibit A.
 
question: if i've got a list : ["a", "b", "c", "d"]
how can I get a list of tuples : [("a", "b"), ("a", "c"), ("a", "d"), ("b", "c"), ("b", "d"), ("c", "d")]
?
 
You mean all the permutations?
Sorry, combinations.
>>> list(itertools.combinations(["a", "b", "c", "d"], 2))
[('a', 'b'), ('a', 'c'), ('a', 'd'), ('b', 'c'), ('b', 'd'), ('c', 'd')]
 
Exactly
wow, perfect, thanks :)
 
DSM
Long-day cabbage for all.
 
cbg old bean
 
10:26 PM
@Martijn is it just me - or does lists containing "<=50k" seem to be appearing a lot recently... must be some kind of course going on at the moment
 
@JonClements First time I've seen it, or that I noticed.
 
11:03 PM
Nightcabbage all
@Ffisegydd What do you reckon? Works well?
 
ncbg
@IntrepidBrit whats doing up so late
 
11:52 PM
hey my friends, I've got the following code: http://www.codeshare.io/q8cKV
Unfortunately, I get an type error: module object is not callable. why is that and how can I fix this error?
 

« first day (1503 days earlier)      last day (3444 days later) »