Python

Room rules: sopython.com/chatroom Code formatting guide: tinyu...
Feb 5, 2019 17:03
there you go
Feb 5, 2019 17:02
At the heart of the execution phase is a Python trace function. This is a function that the Python interpreter invokes for each line executed in a program. Coverage.py implements a trace function that records each file and line number as it is executed.
Feb 5, 2019 17:01
so I guess it is possible somehow
Feb 5, 2019 17:00
coverage somehow does it
Jan 25, 2019 14:50
@aryan for i, (x, y) in enumerate(data):
Jan 25, 2019 14:50
lets just use python 2.8
Jan 25, 2019 14:45
I think first approach is good in this case, especially that past weather data is more accurate I guess
Jan 25, 2019 14:44
imo this feature is not needed
Jan 25, 2019 14:42
while line := fp.readline(): instead of for line in fp:
Jan 25, 2019 14:41
@W.Dodge it depends on how real time it has to be
Jan 25, 2019 14:26
I have ambivalent feelings about this feature
Jan 25, 2019 13:55
I really wont do anything like this, I was just wondering if there is any alternative method to access stuff that is "shadowed"
Jan 25, 2019 13:28
@AndrasDeak sorry people find it hard to understand me all the time.. I've created some basic structure to show what Im asking for, ufile.io/lqbgf, see test.py file, its explained there
Jan 25, 2019 13:02
@AndrasDeak i wont do it like that, just hypothetically im wondering if its possible to import this module
Jan 25, 2019 12:33
acually should be from .A import A
Jan 25, 2019 12:32
please see comments for a structure
Jan 25, 2019 12:32
Jan 25, 2019 12:29
its real life situation, tbh I dont think there is a way to access a module directly anymore in this case, let me prepare a Mcve
Jan 25, 2019 12:27
in the init, there is from A import A, __all__ = ['A'], so init exposes A class only. I would like to import a A module instead of a class
Jan 25, 2019 12:24
hey guys, is it possible to import a module which contains a class with the same name, and the class is referenced in __all__ list in the __init__.py file?
Jan 21, 2019 16:58
and there is no need to deal with multithreading / multiprocessing, which requires more care
Jan 21, 2019 16:57
the benefit is that its lightweight and make io operations asynchronous like, which would work nice in your case
Jan 21, 2019 16:55
don't use multiprocessing, there is no need for you to do that. you could even use threading + requests as GIL won't affect you
Jan 21, 2019 16:54
@Phil you could switch to aiohttp and utilize asyncio module
Jan 21, 2019 10:59
it is a valid password, lol xD
Nov 19, 2018 15:50
that would be a nightmare
Nov 19, 2018 15:50
oh luckily it's not a morning anymore
Nov 14, 2018 11:44
instead of \{
Nov 14, 2018 11:44
sorry, to escape do {{
Nov 14, 2018 11:42
dont forget about escaping closing one as well
Nov 14, 2018 11:41
\{ IP: ...
Nov 14, 2018 11:40
@MatthewSwart you need to escape { character
Nov 13, 2018 11:15
and see whats in there
Nov 13, 2018 11:15
do a git log on the branch
Nov 12, 2018 16:45
although you should be able to run it from command line as well
Nov 12, 2018 16:44
it should work
Nov 12, 2018 16:41
this plac thing should just ask you for parameters
Nov 12, 2018 16:41
oh, running
Nov 12, 2018 16:40
@erotavlas try tunning "python train_ner.py"
Nov 12, 2018 16:28
I see that its pytest in your case so maybe its log_cli option that has to be set
Nov 12, 2018 16:25
it depends on a test runner I think
Nov 12, 2018 16:06
agree
Nov 12, 2018 16:06
yeah I afree
Nov 12, 2018 16:05
maybe he got told to solve it using regex
Nov 12, 2018 16:04
@jpp assuming its not his homework :)
Nov 12, 2018 15:47
or I didn't pay too much attention that might be the case
Nov 12, 2018 15:46
possibly you're right, personally as a "common" SO user I never came over this problem
Nov 12, 2018 15:44
so naturally the best Q/A will get promoted
Nov 12, 2018 15:44
from the other hand, there isn't much harm to have dupes, they will get ordered by popularity by the search engine
Nov 12, 2018 15:38
or a penalty if the question gets closed :p