« first day (2961 days earlier)      last day (2212 days later) » 

02:24
cbg all
Got this slightly bizzare issue with Sphinx where it finds a file and will build it but then it doesn't seem to actually include it in the toctree. Any tips on how to debug this?
 
1 hour later…
03:27
Turns out I just had to explicitly set the path
 
6 hours later…
09:41
Hi there!
Does any one has any information concerning spaCy NER model dependency on POs tagger?
10:03
I had to plot pie charts on a map using python....example link- stackoverflow.com/questions/10368180/…
How to do it in python??
 
1 hour later…
11:30
@gadia-aayush you can plot maps using matplotlib.basemap. You'll probably have to create individual invisible axes for every pie chart though...
Sam
Sam
Hey all
I have a function which registers a blue print in Python Flask:
def register_blueprints(app):
    from api.auth.views import bp as auth_bp
    app.register_blueprint(auth_bp)
Each of these API resources are stored in sub folders on my disk, but the number of resources in my app is starting to grow. So, I'd like to bundle all my resource sub directories inside a parent directory named 'api'.. I thought I could just create the new 'api' directory and place the above function body inside its __init__.py file
@Sam I don't think I understand your question
That's exactly what the blueprint model allows you to do? And you're already using it to have an auth directory?
Sam
Sam
So ATM I have auth directory which self contains all my code. But, to register the blue print, I have that register_blueprints function as posted above which, using the current app object, registers the blue print. Yeh? \
Yes, you register it in the main __init__
Sam
Sam
But, I have about 10 resources so that function is looking a bit disgusting in my main run.py file.. So I wondered whether it be better to encapsulate all the services into an API directory where they can all be instantiated and then finally created in my run.py file with a single call?
11:43
There's nothing disgusting about it. That's exactly how to structure your app.
Sam
Sam
Ah OK fair enough
Maybe I'm just being pedantic
Take a look at sopython on github
Our own site was made by the Flask maintainer
It makes extensive use of blueprints
Sam
Sam
Ah that is a good repo
It's pretty make the same as my structure I believe
You still have to register the blueprints somewhere :)
Sam
Sam
Yup, fair enough. I'll leave it then
Only difference I believe is that I don't render any views.
12:00
That's a killer statement to leave the conversation on while I have to go driving lol
Presumably it's just an API then rather than a webapp?
Anywho, I have to go. Rbrb
 
2 hours later…
13:46
could someone please tell me why this returns a blank window? paste.pound-python.org/show/OyhVg3VYDH9A2OuLSPsY
14:26
@jamesson you get a window but it's blank?
@Dave yes
I haven't coded with qt or pyside in a long time, take a look and see if there is a "show_all() method instead of just "show". It is possible that show is not propagating through all of the controls on the form. Still looking over code, but that's the first thing I seen. I do most of my work in PyGObject (Gtk) and there is a significant difference between those two methods.
Again not totally sure about the api, but I am not seeing where you actually add the layout to the window. am I just missing that? I see you add a control to the layout, but does the layout actually get added to the window?
Sam
Sam
15:14
@roganjosh Yup that's right
@jamesson Note that import * is strongly... not recommended.
Hello
16:37
yo. quick question: can i run multiple async services with shared event loop? for example 2 async web servers
Sam
Sam
16:47
Shouldn't be a problem as long as they are both self contained right?
user6718998
17:29
Hi there. Anyone worked with schrodinger equations in python before ?
 
1 hour later…
20:25
class Foo(object):
    pass

class Bar(object):
    def __call__(self, arg1):
        print(self)
        print(arg1)

f=Foo()
f.bar = Bar()
f.bar('hello')
in __call__ what's the right way to get a reference to the Foo object we were called from?
i.e. what self would be if we weren't monkey patched in?
I can't for the life of me find an existing question for that, but I'm sure I can't be the first to ask that
Is that even possible? (I mean easily)
that reminds me of getting a reference to the container from an element inside
I don't know, I imagine there's a neat trick
wim
wim
use descriptors instead
class Bar:
    def __get__(self, instance, owner):
        if instance is None:
            return self

        return lambda arg1: print(instance, arg1)

class Foo:
    bar = Bar()

f = Foo()
f.bar('hello')
does that also work if you're monkeypatching Foo?
20:42
nope
 
1 hour later…
21:55
cbg

« first day (2961 days earlier)      last day (2212 days later) »