« first day (1607 days earlier)      last day (3355 days later) » 

5:10 AM
Cbg
 
5:53 AM
Cbg
 
6:20 AM
cbg
 
Cbg
I just noticed something about @Ffisegydd's crystal meth comment: he has a lab! That's cool.
 
We should party there sometime... ;)
 
wtf
I got 100 rep yesterday before going to sleep
I am afraid of "serial upvoting reversed" now :D
19007
python score 966, guess I will get the mjölnir before 20k
and cbg all btw
btw I am not sure, but my python upvotes are 2 on average, while my C and C++ have 3 upvotes...
 
6:37 AM
this means you are more a C/C++ guy than a Python guy :D
 
or an outlier...
 
*python answers have 2 on avg, C, C++ 3 ...
or it could mean that no one ever goes and reads python answers or upvotes them.
 
yea, that too, or the competition is higher in python resulting in people somehow not wanting to upvote other answers but wanting instead to get many upvotes themselves
 
0
Q: How do I fix this SyntaxError? (Pretty Pictures included)

David Andrewon.pitch = event.value+GetParameter('Starting Note'+' 'event.channel)+GetParameter('Number'+' 'event.channel)*12; And the error is: [JS Exception] SyntaxError: Unexpected identifier 'event'. Expected ')' to end a argument list. line:4 Hey guys, can anyone solve this conundrum??? ^^^ DA

 
7:04 AM
lol.
 
whut
 
Haha
 
urllib2.URLError: <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol>
I try to login on a website through my python script. But from last 3 days it is giving me this error. I tried using some of the solutions over the internet. I have made no changes to any of my python version. Can anyone help me out with this
 
hello
can someone helpme out
there is a way to get what properties has a object so I can call its atributes example
people.name
here it is
<__main__.ChatHandler object at 0x10b6e9090>
???
 
import sys
import urllib
import urllib2
import httplib, ssl, socket


class HTTPSConnectionV3(httplib.HTTPSConnection):
def __init__(self, *args, **kwargs):
httplib.HTTPSConnection.__init__(self, *args, **kwargs)

def connect(self):
sock = socket.create_connection((self.host, self.port), self.timeout)
if self._tunnel_host:
self.sock = sock
self._tunnel()
try:
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, ssl_version=ssl.PROTOCOL_SSLv3)
except ssl.SSLError, e:
print("Trying SSLv3.")
 
7:18 AM
@user1977867 why dont you use TORNADO????
its simple
 
@eddwinpaz sorry I didnt get you. I cant find what went wrong to my code
 
use tornado web framework for your sockets.
 
Lol and hello all
 
@eddwinpaz your SO rep is in that strange hinterland - neither so low you're obviously sincere, nor so high you're obviously being ironic
 
@user1977867 why are you trying sslv3 :D
that should be the question
 
7:36 AM
@AnttiHaapala , I think there was some support issue, due to which I made it like that. However v1 and v23 also dont work
 
that is:
no one should be using sslv23 anymore.
only tlsv1
 
@Ffisegydd hey fizzygood :) cbg..
 
https<- s stands for tls :D
 
Yay Ghost avatar
 
7:46 AM
@user1977867 you do realize sslv3 was superseded by tlsv1 in 1999
it should have died 1 decade ago altogether
if you have some server using it, the server is broken :D
if you have a client using it (only) the client is very broken
damn I hate the word supersede
 
Why?
 
bc it has s and precede has c and I always typo supercede
then I need to fix that
 
Yeah it's weird it has an s
 
== §English == === §Etymology === From Middle French superseder (“postpone, defer”), from Latin supersedere, from super (“over”) + sedere (“to sit”). The meaning “to replace” is from 1642, probably by association with unrelated precede – note that ‘c’ instead of ‘s’ (from cedere (“to yield”), not sedere (“to sit”)). As a result, supercede is a common misspelling – see therein for further discussion. === §Pronunciation === IPA(key): /ˌsuːpəˈsiːd/ Rhymes: -iːd === §Verb === supersede (third-person singular simple present supersedes, present participle superseding, simple past and past ...
 
Wow, well there you go
 
7:50 AM
@user1977867 the funny thing is, unless you have been programming for 2 decades, about 100 % of time when you said "SSL" you should have said "TLS"
 
@ncoghlan_dev you know what. If everyone so fucking insecure with Python 3 that this tweet can upset things, then maybe there is a problem.
 
mitsuhiko trolling again
@adiyatmubarak all my old code is 2.x/3.x compatible, new projects currently are 2.x only.
what a troll
 
Boy, he must be hating 3.x so much...
 
What has he made?
 
flask, jinja2
 
8:01 AM
Ah, that is pretty good :)
 
that's why I do not use them :D
 
What do you use?
 
I have no doubt that Armin is very clever but he's being deliberately obtuse there. He has a large following and he was complaining
 
@RobertGrant tonnikala for templates and pyramid for framework
should update readme
 
8:09 AM
can any one suggest me a good book to learn python. I have experience in c and c++
 
Cleaning up (should be retagged to adobe-director, see meta.stackoverflow.com/questions/287798/direct-the-director
 
not really, I haven't read any of the books lately, it should be something for python 3 :D
 
General computing, not programming, question.
 
@MartijnPieters too old to migrate
it really should go to superuser or unixlinux
 
Recommendation
@AnttiHaapala Just vote with the general computing reason.
It probably would be a dupe if migrated anyway.
 
8:16 AM
@Robert and yeah of course I have a lab :p I should take some photos of it before I leave actually
 
Yeah I guess it makes sense; I just didn't think about it :) Also I initially envisaged a personal lab in your home, which probably made me overexcited.
 
General computing (I voted on that ages ago already)
 
@MartijnPieters did
 
@MartijnPieters it was dupe too (see the answer)
the recommendation that is
@MartijnPieters you copied the same link twice? to "flash on linux"
 
8:24 AM
erm, did I?
 
that latest will never be roombaed
yes
cv-pls stackoverflow.com/questions/…
General computing (I voted on that ages ago already)
 
I did.
 
this was the same as above
 
sorry, tab confusion.
 
8:42 AM
Perhaps OT (server setup)? stackoverflow.com/questions/18883497/…
 
Hello, I want to ask a quick question but you are not forced to answer. I convert a picture using OpenCV to grayscale level. I read on internet that grayscale images have only the L channel. But when I check print image_grayscaled.shape I see it has 3 channels. May be someone worked with this in the past and knows why ?
 
@Kabyle This is not about being forced to answer.
It's about cluttering up the channel with question after question.
 
@Kabyle who has told you it's about being forced to answer?
 
Cbg :)
 
@RobertGrant yesterday I was expulsed from this room may be 5 times. My sin ? I asked few questions, for each question a kick. I can not ask them on the website because it says i am asking low level questions.
 
8:48 AM
So, is your answer, "No-one told me it's about me forcing people to answer"
 
@RobertGrant someone told me it is like putting a gun on his head (just before yesterday) here
 
If you want mentoring, you need to go to an appropriate place for that
E.g. codementor.io
The reason people contribute to Stack Overflow is because they believe they can give and receive help, and at the same time build a universally-useful body of knowledge. It's not there to coach people through every little difficulty that they could resolve themselves through study. That's probably why your questions are being closed - they don't fit those criteria.
 
@AnttiHaapala I modified the httplib using this code i found on internet:
class HTTPSConnection(HTTPConnection):
"This class allows communication via SSL."
default_port = HTTPS_PORT

def __init__(self, host, port=None, key_file=None, cert_file=None,
strict=None, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
source_address=None):
HTTPConnection.__init__(self, host, port, strict, timeout,
source_address)
self.key_file = key_file
self.cert_file = cert_file

def connect(self):
"Connect to a host on a given (SSL) port."
 
For example this question is very useful , i did not resolve it for ages (even if i asked it only recently) but website says my questions are so bad and i need to help others first before asking : stackoverflow.com/questions/28928781/continuous-drawing-opencv
 
What are you saying that's an example of?
The site working when you don't ask a silly question?
 
8:56 AM
an example of a good question
 
So you're saying when you ask a good question, you get a response on Stack Overflow?
 
@Kabyle could you please help me. :)
 
@user1977867 I'm sorry, I am really programming right now for an urgent school project
 
@Kabyle no probs mate. Good Luck :)
 
@Kabyle any other thoughts on that?
 
9:03 AM
@RobertGrant Website says I have no right to ask questions because my questions are not well received by the members of the website. it says I must contribute with answers to delete this suspension
 
@Kabyle even what you're saying doesn't seem to make sense here. Why are you telling me that when you ask a good question on SO, you get an answer?
Isn't that what everyone's telling you?
 
@RobertGrant that is what you said. I never said that
 
Why don't you contribute with answers?
 
@Kabyle good grief. Then WHY did you link to that question?
 
just to say that in opposite to what this website thinks (that my questions are bad), my questions are rather good even if people did not upvote them
 
9:07 AM
No, THAT question was good. Your others were presumably rubbish.
That's why I said that's an example of a good question getting an answer, and SO working, not whatever the self-serving thing you turn it into.
 
One day I will create a website where people can ask very low level and rubbish questions. That is kind of discrimination that only very smart people can ask questions here
 
No you won't.
 
I will.
 
Stop being childish and learn that not everything, and everyone's time, is about your immediate problem.
If you want help on simple problems, go to codementor.io.
 
No, excluding stupid people is not discrimination. Or would you ever hire someone stupid for a job that's consists of more than e.g. cleaning your office's floor?
 
9:10 AM
> only very smart people can ask questions here
That is not true
 
@ThiefMaster it's best not to try and use logic on this one.
 
Well that was an illuminating read -_-
 
Feel free to delete anything I said that I shouldn't have :)
 
can someone please help me out :( with my python web login
 
@user1977867 You've asked your question. No one has replied. That either means that no one can or wants to help you, please don't repeatedly ask as it's quite rude.
 
9:21 AM
@AnttiHaapala do you use Waitress with Pyramid?
 
See sopython.com/chatroom for the chatroom rules.
I'd suggest you maybe ask a question on the main site.
 
yes right now
 
Cool. I liked Waitress and got it running on Heroku eventually for something.
 
but it is just a wsgi server :d
it does not matter that much
I've also used mod_wsgi and everything in between
 
Yeah, but it I thought it was a cool concept, doing buffering as well
And pure Python
 
9:24 AM
right now we use waitress for this project because, well, we do not have that many requests
and it is slightly easier cf say apache + mod_wsgi to restart etc
5
Q: mod_wsgi error - class.__dict__ not accessible in restricted mode

Antti HaapalaThis started biting our ass on our production server really hard. We saw this occasionally (for 1 request per week). Back then we found out it is because of mod_wsgi doing some funky stuff in some configs. As we could not track the reason for the bug, we decided that it did not require instant at...

I guess that is only python 2.x problem :D
 
What's not many requests?
 
like, we might have a handful of users simultaneously
compared with say "facebook" :D
 
Oh :)
I think I read this: blog.etianen.com/blog/2014/01/19/gunicorn-heroku-django and was convinced
But then I'm a noob, and anything can convince me
 
I mean, i'd not worry at that level
but we have varnish in front of our server
varnish is really cool :P
 
Yeah that's one I still need to investigate
 
9:30 AM
one can program the cache server in C :D
we did some inline processing there
on our older product
 
Oh wow, I actually thought it was a Python thing or something. Now I read about it, it's way more popular than I realised
(sorry Python)
 
But...wow.
 
Cabbage!
 
Cbg @poke
 
9:33 AM
Although using C isn't something I was planning to get back into, that is pretty clever
 
hehe :P
for example we did sticky session cookies
so varnish would act as a load balancer
bc it did not support it, just added some inline C :P
sub set_sticky {
    unset req.http.x-server-new-sticky-value;
    unset req.http.x-server-sticky;

    set req.http.x-server-sticky = regsub(req.http.cookie, ".*process=([a-z0-9]+).*", "\1");

    if (! (req.http.x-server-sticky ~ "^sticky0[1-4]$")) {
        C{
            char value[16];
            int rand = (random() % 4) + 1;
            snprintf(value, 9, "sticky%02d", rand);
            VRT_SetHdr(sp, HDR_REQ, "\020X-Server-Sticky:", value, vrt_magic_string_end); // 16 chars
        }C
it compiles all this into a C program, then GCC compiles it upon startup and loads as a .so into the executable :D
 
Wow that is quite cool
 
1 problem is that varnish does NOT have an ssl terminator
 
That's weird - do they expect a web server in front of it to handle SSL?
 
no, just that there are enough terminators in front
they are correct of course, for example we use amazon load balancer in front
so it would be pretty useless to reencrypt the traffic within the cloud anyway :D
 
9:49 AM
Actually I think they should do that :)
Well, depending on the traffic I suppose
I quite like the look of the pyramid docs; I'll give them a read. My next $thing was going to be in Flask, but if Pyramid has equivalent stuff then maybe I'll go with that
 
10:03 AM
@RobertGrant I was just talking on #pyramid channel on freenode about pyrmaid vs flask
 
The revolutionary new MacBook looks so fucking beautiful in blue. #TheDress #MacBookLust http://t.co/m8GgsLv42V
 
pyramid is more than flask, everything there is in flask proper is there in pyramid too, but some extensions then are easier to find for flask than for pyramid
 
@AnttiHaapala ssl_version=ssl.PROTOCOL_TLSv1 doesnt work for me either
 
chris mcdonough, the author
@user1977867 why do you even need to change the version?
@RobertGrant chris mcdonough, the author and I think a former colleague of @MartijnPieters launched a slogan for pyramid: "Your second and last web framework"
 
@AnttiHaapala interesting
Too late; I've already tried more than one :)
 
10:05 AM
me too
 
I'd definitely try Pyramid
 
What I'm really keen on is using either Flask/Pyramid with SQLAlchemy, which I feel is a very useful thing to be familiar with
 
"Django: Your last ever web framework, because once you try us, you'll give up web development forever."
 
@AnttiHaapala by your last post i thought ssl_version=ssl.PROTOCOL_SSLv3 was obselete
 
@user1977867 it should be
sslv3 is broken
the httpsconnection should use tls
 
10:07 AM
then what should i be using?
 
@Ffisegydd :) I didn't mind it for what I did (which was pretty simple, and I was learning python) but yeah, it's quite big. Which I wouldn't mind, except I found the community to be a mixture of very reasonable and very unreasonable people
That put me off more.
 
why are you using some code you found from internet
 
How big is Pyramid compared to Django?
 
to me using code "that I found somewhere in the internet" is not a good thing to do with cryptography
 
Smaller minimum size than Django
 
10:08 AM
yes
 
As in, way smaller
 
it is just a web framework, no orm, no templates
no admin
 
Hmm, cool
 
but the parts that are there, are way better than djangos
django uses 100 lines of code to do runtime the same things that pyramid does in 10
 
@AnttiHaapala "why are you using some code you found from internet" is it to me?
 
10:09 AM
The best thing about Django (given that it's already a big framework) is the fact that user management is built in
 
and yet pyramid is more configurable
@user1977867 yes
 
So you can easily have users/groups/registration/etc and it'll all work together nicely because the concepts exist in Django
 
you said "I found this code in the internet somewhere, now I am using it"
yeah, pyramid does not have user management...
 
Security is hard - let's go shopping!
 
but django usermanagement works if your usernames are email addresses within size limit
 
10:10 AM
office cbg
 
if they are not itwill become shit
 
I seem to remember having to do more work to make it work with emails
 
or how was it :D
yes exactlyy
pyramid does not do any such thing
 
Oh, okay
 
but then I have developed sqlalchemy mixins to do mine...
 
10:12 AM
I see what you mean
 
pyramid only provides the database technology agnostic parts of acls
 
Oh, that's fine
 
I just meant it's nice that Django defines the concept, and everything can build on that
 
i tried using requests but it returns status code of 401
 
10:13 AM
Compared to, say, Laravel, which has no built-in concept of groups
 
@user1977867 if it returns 401 then ssl is working.
pyramid does not have a concept of groups either,
it just talks about "effective principals"
you can think those as groups
 
What's nice about groups is you can decorate routes with them for quite slick access control
Okay
I'll have to read :)
 
with pyramid you can do that, with effective_principals={'mygroup'}
 
@AnttiHaapala does that mean a successful login and I must go forward wrting the code to download the content i want after login?
 
@AnttiHaapala ah okay
 
10:15 AM
but then again you also can define acl for each object, say:
(Allow, "sopython-chatroom", "edit")
 
Yeah object-level permissions is cool
Django you need an extra module for that
 
then you can check for the permission edit on the givne object
 
Sentinel or something
 
you can just do:
@view_config(context=MyClass, permission='edit')
 
Yeah, that's nice
 
10:17 AM
if the acl did not grant you with your effective principals the edit permission you get 403
 
Actually (don't kill me) looks a bit like the Django syntax
Possibly even a bit slicker
 
it does but it does not
because pyramid can dispatch by object
 
Yeah that's what I thought was different
 
you can use urlmaps like django but you can also have a traversal system, like
 
I'm talking about Django+object level permissions plugin I used
 
10:19 AM
yeah
in pyramid, they are in core, at low level
 
Yeah, that's actually nicer
I place a lot of stock in permissions systems :)
 
the thing is, if django would be written to be run on pyramid, I'd be happy with it.
 
And I remembered why I do that when I recently helped a mate out on a CodeIgniter project. SO MUCH AUTH CODE IN EVERY FUNCTION.
 
it would be the beginning of end to the Nihhitis that plagues it
the traversal is especially good for CMS systems
 
Sorry, what's the traversal thing?
Pyramid CMS? :)
 
10:21 AM
so, in pyramid, you can use /foo/bar/baz to mean a thing like
root['foo']['bar']['baz']
that is do an arbitrary hierarchical database based on __getitem__
then the leaf object that pyramid finds becomes the "context of the request"
 
Ah, I was about to ask if that's what you meant
 
you can dispatch views based on the class of the context
 
So as in root is an object saved in the database, and it will automatically drill into the db as much as it needs to to get the ['baz'] object and set that as the context?
 
yes, and if you use zodb your db can actually contain dictionaries like that
if you use sqlalchemy, well you can have your model objects implement getitem
so say, that object is an instance of Article
root['foo']['bar']['baz']
so pyramid would look up a default view for context=Article, or any superclasses thereof
if you wanted to edit that object, you could toss /@edit at the end of the url, so it would try to find name='edit', context=Article
and then look the acl permissions for edit.
all this is in pyramid core that "supposedly does less than django"
 
Yeah, that's way more than Django
And what I like about that is it's really useful, reusable stuff, not things like that admin page which is definitely just a nice to have
 
10:27 AM
in addition to this it still contains the regex style url matching, or URL dispatch
you can mix the 2 to your heart's content
so for example evne with sqlalchemy I can use an url like /user/123/ to map into users object
but then when it is as the context, all the subviews can use the Traversal from there on :D
 
Oh, yeah I see
Flip okay I'm convinced. Next project is Pyramid.
 
the thing is, some of the things available are scarce
because the pyramid doctrine is sort of like "it is better to not do a thing than do a thing that is not generic/you will regret about later on"
 
Yeah, I'm going to save this transcript somehow for when I understand the basics and need to revisit this
Yeah well I kind of agree with that, as long as someone's written the functionality as a plugin :)
 
or you can write yourself in 5 lines
 
Yeah, that's fine too :)
One thing I liked about Django was the django-bootstrap3 plugin, so I didn't have to write my own form HTML. I see there's a pyramid equivalent.
 
10:32 AM
for example django middleware is really complicated compared with what one needs to write for pyramid
 
Small thing but really handy that someone else had already done it
I guess it's also cool to be able to contribute to an ecosystem though
 
pypi.python.org/pypi/deform this will be coming
pyramid needs contributors ofc... :D
 
Yeah I was reading about that
 
1 problem with pyramid ecosystem is that it has too little opinions...
so it gives too much choices for a newcomer
then they go to flask because it will give less choices
or django because of absolutely no choices at all :D
 
Yeah true :)
creates a feature on the Flask github page to refactor it to run on top of Pyramid
 
10:35 AM
mhmm?
flask can run within pyramid without much problems
django is a PITA
there was 1 corner case with flask on pyramid:
this might be of interest
 
Thanks
I guess the only thing is, if you use SQLAlchemy instead of Django ORM, do you remove quite a lot of what makes Django Django?
 
actually I believe django orm could be ported in a couple days to run on sqlalchemy
unmodified
apiwise, possible even to do by monkey patching it
 
Hello. When I convert an image from BGR to YUV color space (OpenCV), each time I print the YUV values of a given pixel, I get rather its BGR values (!) . How can I get the YUV values instead ? (print image_in_yuv[i,j,1] # for the U , but I get Green instead)
 
aint no rocket science
 
@AnttiHaapala do it :)
 
10:40 AM
no one would care
 
I think there is something you can install to do it, actually
 
since "django is good enoguh"
 
I just feel like with an asset as strong as SQLAlchemy, why is anyone else in the Python world writing stuff that builds on a different ORM
 
and
another is that "we could not ship django in 1 zip"
 
10:44 AM
@Martijn You around?
 
@Ffisegydd :)
@AnttiHaapala that seems crazy
 
@poke: for a short while.
I have a demo starting in 10, preparing atm.
 
@MartijnPieters bonne chance
 
@Martijn Then I’ll leave you out of this py-internals question for now. Prepare well ;)
 
thanks
Just the bi-weekly end-of-agile-sprint demo to stakeholders about completed stories.
 
10:52 AM
@AnttiHaapala sourceforge.net/p/cls-motu/feature-requests/2 this is the reason i used sslv3
 
But with remote people.
 
@MartijnPieters sprint review?
(I did a course once. Now I'm certified Agile.)
(Take that, gym teacher)
 
11:04 AM
@RobertGrant that is the major reason for django nih
"just 1 zip"
 
cbg
stackoverflow.com/questions/28984751/… : unclear / too broad / too cargo-cult
 
@AnttiHaapala weird in the context of pip and all that, but fair enough :)
 
@RobertGrant django apps scaffolds still do not create a setup.py
 
Oh okay
 
11:20 AM
they are just some lump that you dump in your appdir
 
11:41 AM
@RobertGrant Sprint review.
 
Yes! The training works
@MartijnPieters is your dev done remotely as well?
 
Unless you provide more information, the question might get closed for not being clear. — thefourtheye 23 secs ago
Is it unnecessary?
 
Not at all
 
I think it's cool to give a warning
 
Cool then :) Melons guys :-)
 
11:55 AM
@RobertGrant no, 99% of the time I'm on site.
 
I was worried that, OP has tried something and looks like he really knows what he is doing (PS: Using a generator is not an option, it has to be a list.) but the question might get closed, as there are lot of unknowns. So, I thought that the comment might help him
 

« first day (1607 days earlier)      last day (3355 days later) »