« first day (1359 days earlier)      last day (3599 days later) » 
04:00 - 17:0017:00 - 00:00

5:02 PM
@PeterVaro except that I mistake in condition overwrite should read not overwrite
 
is it okay to do this in class:
self.__dict__.update(attribute_dict)
 
@davidism if you want to add anything to the Trello for planning what you're doing then knock yourself out.
 
ok, I'll add some plans in a bit
 
I'm back
(sorry I was walking my dog)
@XavierCombelle and which calling in my solution is unnecessary?
and I think removing an extra call is not what we call "premature optimisation"
 
@Jon fyi I've dropped you an email to jon@sopython.com (in case it isn't forwarded/obvious that an email has come through)
 
5:15 PM
@PeterVaro in your source there is two call of setdefault in the overwrite = False case
 
yepp, because we are talking about a nested dict
 
5:28 PM
@XavierCombelle oh, okay, this is what you were talking about:
def set(self, row, col, *values, overwrite=False):
    if overwrite:
        self._row.setdefault(row, {})[col] = data = []
    else:
        data = self._row.setdefault(row, {}).setdefault(col, [])
    self._col.setdefault(col, {})[row] = data
    data.extend(values)
 
5:45 PM
@PeterVaro in self._row.setdefault(row, {}).setdefault(col, []) you call two .selfdefault method in your code in mine only one
I discovered MozRepl quite fun
 
@XavierCombelle look at the code again: you said, you mixed the two when overwrite and when not, now, if your first one is the not overwrite, then you handle the KeyError once and then handle with setdefault; in my solution if not overwrite I handle both with setdefault
aka I don't see any differences at all
 
@PeterVaro ok
 
do you leave this to me, don't you? ;)
 
@PeterVaro yes
 
6:22 PM
@davidism would you like an account on the server? Would that make it easier for you to work? We've already got all of the data in a mongodb and you can always download what else you need using wget insanely quickly.
 
Sure, that would be handy
 
Do you have an email address I can send the username/password/etc details to?
 
davidism@gmail.com
 
ok cool just a sec then
 
argh, no markdown for emails
 
6:24 PM
I think it does with mailto:
 
nope
I know it works in regular markdown, just not chat, haha
 
so I have a flask question now.
 
hmm..
 
github.com/imwilsonxu/fbone/blob/master/fbone/config.py In this, in the testing config, it has SQLALCHEMY_DATABASE_URI = 'sqlite://', what does that do without the path appended?
 
@davidism sent the email
I've already downloaded the Posts data and it's in so_data
 
6:37 PM
got it, password changed, key uploaded
 
Awesome.
What the fuck?
 
lettuce?
 
6:52 PM
I'll not test the attack right now but I'll explain how it works
You take as many urls as you can from a website
add every single link into Google docs with =image(“url”) in cells where url is the url you took from the website
With say 5000> different accounts you refresh Google Docs
 
@stupidtroll I would suggest you not try it at all.
 
you can understand that is time consuming, so I'll wait to speak with a mod/dev about this
 
Are you seriously going to ask a mod if you can perform a DDoS attack on SO?
 
@Ffisegydd I possibly don't want as it's time consuming, but how would resolve this issue if not by testing it and fixing?
 
I would suggest not performing a DDoS attack on Stack Overflow
3
 
6:56 PM
I had good intentions, but I can imagine someone else with bad intentions can cause disasters
Wouldn't it be better to prevent it?
 
Conversations are weird when one party is on my ignore/hide list.
 
@Ffisegydd Ok, let's wait for someone ill-intentioned to do something serious then.
 
Do whatever you want. I've already flagged your initial post to the mods.
@davidism lmao
 
@Ffisegydd Do you even understand what I am trying to say? Good that you flagged it for mod attention, so I can speak with him, but bad because I won't be the "tester" then.
 
davidism, why aren't I on your ignore list? :(
 
6:58 PM
You're on my ignore list @Crow <3
 
awh, I thought you just didn't look at my contextless questions!
 
@Ffisegydd I'm going to eat now, so if you're pleased give me an advice about this issue and I'll act accordingly
 
I understand exactly what you're trying to say. You're saying you want to perform a DDoS attack on Stack Overflow. You claim to be doing this for ethical reasons. And if your test is "successful" and you bring down the SE network? Do you expect to be showered in praise? Did it even occur to you that maybe the SE developers run their own tests and know a lot more than you...
 
@stupidtroll I'm starting to think your username is more of an autobiography.
4
Quit spamming chat rooms with DDoS "threats", well intentioned or not.
<returns to="php" />
 
@Ffisegydd I got your issue and you're 80% right about them. I'll so assume and hope that they also think about this theoretical attack vector. As per my knowledge Google servers aren't in the SE network iptables.
 
7:03 PM
At the risk of feeding the trolls, what makes you think the admins aren't aware of this, since it was all over HackerNews a while ago, and why do you think you need to cause a DOS to test it?
It's not like you've done any original work, you're just applying a known vector.
 
@DanLugg If you're taking it this far let me counteract by saying that my autobiography would apply to you right now. They weren't DDoS "threats", and is good how you're incentivized to help out. My username has a different history than that of autobiography. This is all.
@davidism Please. I won't comment further on your first words. The fact is that many notable websites still seem to be vulnerable and I don't know if SE is in them or not. But well, I'm done, won't help anymore like this.
 
Good. Let's drop the talk of DDoSing SE.
 
@stupidtroll If you're so concerned, ping a mod, start a room with a mod, use the contact form provided, or create a meta post.
 
Alright, I'm good with that @Ffisegydd.
@DanLugg <begin of subject> After this bashing I'm a bit put off and cautious, but I'll look into that, thanks. </ end of subject>
 
No problem boss.
Anyway, have fun pythonians.
 
7:09 PM
Good :)
 
Au revoir phpian :P
 
Where can I find/ping a mod? I've found something else as well
 
Post on meta.SE
 
Ok, I'll do it after finishing eating.
 
has anyone used flask-admin?
 
7:22 PM
@Crow Bottle is better :p
 
what do you want to know @Crow ?
 
kidding. but you can as well make something faster of your own with a config file and a template which loads the conf
 
how does it tell who the admins are in the first place?
 
I imagine from the conf or the database
 
@Crow by default anyone connected from localhost can be admin I believe
 
7:26 PM
oh, so I have to make my own restrict to admin decorator?
 
It depends if you have a conf or not and if it is set up with an account and password
not really anyone in all cases
 
I have a config.py file if that's what you mean
 
I don't use Flask anymore but I'm sure you can set the auth thing in your conf
 
@stupidtroll please stop troll
 
@XavierCombelle What is your problem?
 
7:34 PM
@Crow how to limit to someone is indicated here flask-admin.readthedocs.org/en/latest/django_migration/…
 
@XavierCombelle I think you don't know Flask enough.
 
@XavierCombelle but that just looks like it is saying that the user is logged in, what if there were stratified roles of users where only a few would be admins?
oh wait. There's a little doodad on flask.pocoo.org's snippets. Love those things
 
@XavierCombelle Wait, you're right.. I was actually confused by another plugin I used to add authentication to the conf
 
@Crow you have to replace login.current_user.is_authenticated() by something like login.current_user.whateveryouwant()
 
okay, so like current_user.is_admin()
 
7:41 PM
@Crow yeah
 
@XavierCombelle For your concerns of compression performance posted on your blog you may be able to use lz4 which has a very good performance in compression and discrete in size, while being ultrafast in decompressing.
 
cool cool, thanks for the help. Although, not quite sure an admin view is exactly what I want
 
@Crow what do you want to do
 
@stupidtroll please stop that.
 
@XavierCombelle basically, I want users to schedule a time, then they sign in by QR code on arrival to the place, then an admin can check if they scanned in for their lesson
 
7:46 PM
Stop what you are doing, it does nothing but make you appear unprofessional. Don't be that guy. You can still stop it and be a helpful member of the community. @stupidtroll , also, change your nick back -_-
 
@Crow you just need to have a page with auhtentication like this flask.pocoo.org/snippets/8
 
man. I love those snippets
 
8:21 PM
So, I've found something disturbing in the os module.
 
orly?
 
so if you add a slash, the second path also becomes root
hence os.path.join gets confused
@Ffisegydd yea, take a look
 
how would a database relationship pertaining to a schedule work?
 
9:14 PM
@Ffisegydd fancy some magic?
 
I want to submit an issue to github... but I'm not sure if it's just me being an idiot
 
research it, if it's a genuine issue, I'm sure the guys will appreciate the issue
 
I think it might be a 3.4 support issue. It seems to not have to do with my code, only when I do from flask.ext.admin.contrib.sqla import ModelView
and their .travis.yml doesn't have 3.4 on it...
 
I'm climbing pyside learning curve....any suggestion for finding a good mentor? considering elance....
 
trying to learn python? I'd highly recommend "Python in a Nutshell".
 
9:27 PM
Pyside (or PyQt) not python....
 
derr I am such an idiot...
dateutil doesn't come by default with python?
 
10:02 PM
ugh, forgot I attend court on tues
 
@GamesBrainiac That's by design: "If any component is an absolute path, all previous components (on Windows, including the previous drive letter, if there was one) are thrown away".
 
wb @Zero :)
or do I mean "wotcha" :)
 
Either will do :-)
@JonClements You been a naughty puppy then?
 
well, I wee on the carpet sometimes :(
but no - non-payment from client despite offers from myself to split payments if in hardship
 
Not sure whether that counts as contempt of court or not.
Ah, always fun.
 
10:08 PM
I tried to be nice...
when I'm constantly ignored, that's when I get a peeved off
 
is there a way to show what parameters are available for a class? Kinda like dir()
 
As well you might. In my (limited) experience Small Claims Court is pretty straightforward and hassle-free (if you're on the "gimme my money" end at least).
In fact I don't think I even had to attend court ...
 
Well, it's slightly different than "show me the money"
so sadly it's not just a claims hearing
 
Good luck with it ... if the other party's been ignoring you, d'you reckon there's a chance they won't show up? I understand it's surprisingly common, and the court obviously doesn't take kindly to it.
 
I reckon they're just bankrupt themselves
my more urgent concern is what a director of a subsidiary company has done
 
10:25 PM
Run off to Belize with a briefcase full of cash?
Actually it occurs to me that it may not be altogether wise to draw you into public speculation on a pending court case - sorry 'bout that.
 
@ZeroPiraeus You're not far off... not sure about Belize though
when I find him, he's going to have a broken nose though :)
 
... and a soiled carpet? ;-)
 
flask-admin is actually pretty cool
 
I'll just roll him up in it.... (as long as it's his carpet and not mine)
 
@BenjaminGruenbaum What did I do wrong now? I will stop the act if I know what it is ;) As soon as the system permits I'll change my nick back. If you read my chat history you'll know why I choose that name (and I regret)
Anyway I created the Meta post as suggested, but it was deleted, not even locked! All of this without receiving an answer..
What was wrong with it?
If the concern is that I "have given more people info about an attack vector to exploit" then stay assured that there is no other info in the net to warrant the question removal -_-
This makes me think that they didn't really thought about this attack vector and discarded it as a "work in progress" to compensate for the missing mitigation system while deleting my question ensuring that it wouldn't reach the vaster masses in the meantime that they do their "work".
Ok. Enough!
 
10:38 PM
Hey guys, have problem in Flask does anyone know how to handle 413 Request entitiy too large stackoverflow.com/questions/24600875/…
 
@stupidtroll like @Ffisegydd said the other day, do you really think this name change helps?
 
@JonClements In fact I regret the choice and want to change it back as soon as the system allows me ;)
Wait.. you're also saying that the name change influenced the question deletion? O_o
Heh, to change subject
-20
Q: Does stack overflow have any way of preventing vote trolls?

cluemeinOn three consecutive questions, I have been downvoted into negative values, even though the question was clear. When a reason was provided for the down votes, the reason was nonsense (BS) or simply illustrated lack of understanding of entire concept (meaning they shouldn't have even bothered loo...

Look at the vote count :-)
So, I may change my nick back on Aug 4 at 6:21...
 
What would you change it to then ?
 
No idea.. Pythonicboy?
Pyboy
whatever.. it seems that I have a long time to decide
 
@Ecce_Homo please observe this room's etiquette by not posting your so question until a significant amount of time has passed.
As the first comment on that question suggests, you should add more detail.
 
10:48 PM
on another line.. does only allowing specific ips in iptables (Linux obviously) stop other ips flooding your server in case of a DDoS attempt?
I'm coupling a test app that evaluates "trusty" ips and put them on the allowed list in iptables that then makes the server only available to those trusty ips when a DDoS is attempted
and switches back after a time you set before starting the app
I'm just looking at it from a theoretical standpoint before delving into building the "real" thing
 
@JonClements need something?
 
@bluefeet yes, can we get a private room as it were
 
The flow would be like
client -> server -> client ? in allowed_ip -> ? 0 -> reject
client -> server -> client ? in allowed_ip -> ? 1 -> allow -> process...
This would in theory mean that the server has to be restarted once to disconnect from the malicious DDoSers and ensure that it is still available for the "trusted" ips while avoiding a network saturation or any other issue caused by a DDoS attack
 
11:06 PM
wait. I actually have a functional web app. this is weird
 
also a satisfaction when you build something functional at the end :-)
 
Tim
Is there a website that can explain the meaning of some short Python code? Just like [regex101.com](www.regex101.com) explains any regex you give to it
 
@Tim pythontutor.com visualizes the execution of python code
you need http:// to make it a link
 
Tim
For example, can it tells me what % mean in '%s %s' % ('I', 'am')
pythontutor.com doesn't run the code.
 
it does run the code, but it won't explicitly explain what % means
in this case, %s is a placeholder, and % (tuple) substitutes the values in the tuple for the placeholders
 
Tim
11:21 PM
do you know where the document explains the second meaning of %?
 
Tim
thanks. I am using python 2.7.3
is 2.7.3 already depreciated?
what version of python should I learn?
 
3.4.1 is the newest
 
learn python 3
either is acceptable, but you're missing out on a lot of cool stuff if you stay with 2
2.7.3 should probably be upgraded to 2.7.8, the latest point releases contain security fixes
for the most part, being familiar with one will carry over to the other
 
Tim
what security problems, for example?
 
11:27 PM
bugs are reported and fixed regularly, some of which represent potential security issues. see the changelog for a list of what is fixed in each release
in general, you do not want an old release of 2 or 3
 
Tim
By the way, I paste '%s %s' % ('I', 'am') into the box at pythontutor.com/visualize.html#mode=edit, and hit "Visualize Execution". But it doesn't run the code.
Is there a function which can replace % for its substitution meaning?
 
Because that doesn't do anything, you need to assign it, print it, etc. It won't be very interesting anyway, it's only one line in one frame. pythontutor.com/…
 
@Tim The recent 2.7.x releases contain security fixes relating to Heartbleed ... I think that's only relevant if you're on Windows (Linux/Mac Python builds use the system SSL libs), but regardless of the exact issues, you should always be on the latest point release; the difference between 2.x.y and 2.x.y+1 is only ever bugfixes, so there's no downside.
 
never seen this before... what is it? from flask.ext.testing import TestCase as Base, Twill
the comma after the as, what does it meeeean?
 
the % operator calls __mod__ behind the scenese
 
Tim
11:36 PM
How can I find out what the latest point release is
 
@Tim not to be mean, but you have >9000 rep, are you really having trouble with this?
 
Tim
@davidism isn't _mod_ for taking arithmetic modulo operation? But here % is used for string substitution.
@davidism sorry.
 
the % operator just calls the __mod__ method behind the scenes
 
Tim
is _mod_ for taking arithmetic modulo operation?
 
11:39 PM
@Tim __mod__ (use backticks for code formatting btw) implements the % operator ... it's called mod because for integers that's the modulo operation, but it can be used with any type.
 
'test %s' % ('example',) is equivalent to `'test %s'.__mod__('example')
 
Tim
The link doesn't say it. So where does it say _mod_ means substitution when used with strings?
 
which I linked to you earlier
 
Tim
I miss something here. In both links, I don't find they say that _mod_ means substitution when used with strings.
 
the one about string formatting says you use the % operator, the special method reference says that the % operator is implemented with the special __mod__ method
 
11:44 PM
% is just an operator, like any other - they all have their own magic method, and they do different things with different types: for example + is addition with numeric types and concatenation with sequence types.
 
Tim
thanks.
 
An alternative to percent-formatting is the format() function - originally intended as a replacement for percent-formatting, but the consensus these days is that both have their place, and both will stay in the language for the foreseeable future.
 
wb @ZeroPiraeus and @Ffisegydd :)
 
Tim
@Zero: what is the name for this type of substitution?
 
@JonClements :-)
@Tim uh, what?
 
Tim
11:54 PM
Is this type of string substitution called "format"
e.g. "I %s stupid" can be replaced by "I am stupid"
 
The function is called format ... I'm afraid I don't understand what could be confusing you here.
 
Tim
A string subsitution is usually like this: "I was stupid" becomes "I am stupid", if I specify "was" replaced with "am".
here we discussed examples such as "I %s stupid" can be replaced by "I am stupid", with "%s", we can also replaced with "I ma stupid"
 
whether you use the % style or the new format() style, they are both called string formatting, but each uses it's own syntax
 
Tim
"string formatting" is a kind of substitution that uses wildcard, right?
 
% uses the syntax described here, format() uses the syntax described here
 
11:59 PM
"string formatting" is the formatting of strings. I think you're overthinking this.
 
Tim
matching and replacing using regex is another different kind of string substituion., right?
@ZeroPiraeus Isn't "string formatting" a kind of string substitution?
 
04:00 - 17:0017:00 - 00:00

« first day (1359 days earlier)      last day (3599 days later) »