workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
there is a project that has pretty much the same layout and it does `from facenet.src.align import detect_face` and i guess it works(?)
2019-05-07T09:57:13.272600
Leida
pythondev_help_Leida_2019-05-07T09:57:13.272600
1,557,223,033.2726
22,321
pythondev
help
there are `__init__.py` files in src, facenet, facenet/src, facenet/align
2019-05-07T09:58:33.273500
Leida
pythondev_help_Leida_2019-05-07T09:58:33.273500
1,557,223,113.2735
22,322
pythondev
help
i tired adding `__init__.py` to app too to no avail
2019-05-07T09:59:44.274200
Leida
pythondev_help_Leida_2019-05-07T09:59:44.274200
1,557,223,184.2742
22,323
pythondev
help
What does your import look like?
2019-05-07T10:05:56.275100
Ashley
pythondev_help_Ashley_2019-05-07T10:05:56.275100
1,557,223,556.2751
22,324
pythondev
help
Hello everyone. ``` In [35]: df['emails'][0:5] Out[35]: 0 <mailto:[email protected]|[email protected]> 1 NaN 2 <mailto:[email protected]|[email protected]> 3 <mailto:[email protected]|[email protected]> 4 <mailto:[email protected]|[email protected]> Name: emails, dtype: object ``` How to use pandas remove all lines from pandas data frame if email is `nan` None? If other column data in these rows None all good. I want to remove only such lines if the email is None. Thank you.
2019-05-07T10:06:12.275300
Jung
pythondev_help_Jung_2019-05-07T10:06:12.275300
1,557,223,572.2753
22,325
pythondev
help
i tried `from facenet.src import facenet` and `from .facenet.src import facenet` and `from ..facenet.src import facenet`
2019-05-07T10:07:08.276300
Leida
pythondev_help_Leida_2019-05-07T10:07:08.276300
1,557,223,628.2763
22,326
pythondev
help
added `__init__.py` to app to make it a module and tried a few variations and still didnt get it right xD
2019-05-07T10:07:37.277700
Leida
pythondev_help_Leida_2019-05-07T10:07:37.277700
1,557,223,657.2777
22,327
pythondev
help
<https://stackoverflow.com/questions/14057464/relative-importing-modules-from-parent-folder-subfolder> seems to explain it but i fail to wrap my brain around it
2019-05-07T10:07:54.278600
Leida
pythondev_help_Leida_2019-05-07T10:07:54.278600
1,557,223,674.2786
22,328
pythondev
help
So the other package is able to do an absolute import because python understands it's all a package. It sounds like that won't work for you because you don't have an actual package yet that Python would recognize
2019-05-07T10:08:54.279800
Ashley
pythondev_help_Ashley_2019-05-07T10:08:54.279800
1,557,223,734.2798
22,329
pythondev
help
When you do `from .facenet`, you're saying "from my current package level", but there is no facenet package inside facenet/src
2019-05-07T10:10:23.280900
Ashley
pythondev_help_Ashley_2019-05-07T10:10:23.280900
1,557,223,823.2809
22,330
pythondev
help
You don't need to reference the facenet package though. You just need to get to a namespace that has what you want. So you just need to go another level up with `..`
2019-05-07T10:11:48.282400
Ashley
pythondev_help_Ashley_2019-05-07T10:11:48.282400
1,557,223,908.2824
22,331
pythondev
help
but that returns ``` from ..facenet.src import facenet ValueError: attempted relative import beyond top-level package ```
2019-05-07T10:13:40.283000
Leida
pythondev_help_Leida_2019-05-07T10:13:40.283000
1,557,224,020.283
22,332
pythondev
help
what is the path of the script you are in, and the path of what you are importing? Please indicate the top level that has `__init__.py`
2019-05-07T10:15:38.284400
Clemmie
pythondev_help_Clemmie_2019-05-07T10:15:38.284400
1,557,224,138.2844
22,333
pythondev
help
i have played around having init in app and not having it
2019-05-07T10:16:06.284900
Leida
pythondev_help_Leida_2019-05-07T10:16:06.284900
1,557,224,166.2849
22,334
pythondev
help
the example im looking at does not have init in the main app folder
2019-05-07T10:16:20.285500
Leida
pythondev_help_Leida_2019-05-07T10:16:20.285500
1,557,224,180.2855
22,335
pythondev
help
the script is in `app/src`
2019-05-07T10:17:10.286800
Leida
pythondev_help_Leida_2019-05-07T10:17:10.286800
1,557,224,230.2868
22,336
pythondev
help
im running it from `app`
2019-05-07T10:17:17.287300
Leida
pythondev_help_Leida_2019-05-07T10:17:17.287300
1,557,224,237.2873
22,337
pythondev
help
<@Jung> I think you're looking to do something like `df2 = df.dropna(subset=['emails'])`
2019-05-07T10:17:32.287900
Marth
pythondev_help_Marth_2019-05-07T10:17:32.287900
1,557,224,252.2879
22,338
pythondev
help
as `python src/application.py args`
2019-05-07T10:17:33.288100
Leida
pythondev_help_Leida_2019-05-07T10:17:33.288100
1,557,224,253.2881
22,339
pythondev
help
so in python3 you don’t always need an `init` but the time you do/don’t are fairly confusing
2019-05-07T10:17:49.288400
Clemmie
pythondev_help_Clemmie_2019-05-07T10:17:49.288400
1,557,224,269.2884
22,340
pythondev
help
ah, i just reread the file names
2019-05-07T10:18:31.288600
Ashley
pythondev_help_Ashley_2019-05-07T10:18:31.288600
1,557,224,311.2886
22,341
pythondev
help
I also forgot about the implicit namespace packages
2019-05-07T10:21:21.289100
Ashley
pythondev_help_Ashley_2019-05-07T10:21:21.289100
1,557,224,481.2891
22,342
pythondev
help
looks like the only time you need the `__init__.py` is if it wouldn't be empty
2019-05-07T10:25:56.289700
Ashley
pythondev_help_Ashley_2019-05-07T10:25:56.289700
1,557,224,756.2897
22,343
pythondev
help
<@Leida> try running that command from another directory up (with the right file location)
2019-05-07T10:26:32.290500
Ashley
pythondev_help_Ashley_2019-05-07T10:26:32.290500
1,557,224,792.2905
22,344
pythondev
help
with which import?
2019-05-07T10:26:56.290800
Leida
pythondev_help_Leida_2019-05-07T10:26:56.290800
1,557,224,816.2908
22,345
pythondev
help
from ..facenet.src import ...
2019-05-07T10:27:17.291000
Ashley
pythondev_help_Ashley_2019-05-07T10:27:17.291000
1,557,224,837.291
22,346
pythondev
help
``` File "app/src/application.py", line 11, in &lt;module&gt; from ..facenet.src import facenet ValueError: attempted relative import beyond top-level package ```
2019-05-07T10:28:21.291300
Leida
pythondev_help_Leida_2019-05-07T10:28:21.291300
1,557,224,901.2913
22,347
pythondev
help
hmmmm
2019-05-07T10:28:39.291500
Ashley
pythondev_help_Ashley_2019-05-07T10:28:39.291500
1,557,224,919.2915
22,348
pythondev
help
with ```python app/src/application.py args```
2019-05-07T10:28:54.291900
Leida
pythondev_help_Leida_2019-05-07T10:28:54.291900
1,557,224,934.2919
22,349
pythondev
help
is the `__init__.py` in app/?
2019-05-07T10:28:59.292100
Ashley
pythondev_help_Ashley_2019-05-07T10:28:59.292100
1,557,224,939.2921
22,350
pythondev
help
removed right now
2019-05-07T10:29:20.292500
Leida
pythondev_help_Leida_2019-05-07T10:29:20.292500
1,557,224,960.2925
22,351
pythondev
help
try adding it and running it again
2019-05-07T10:29:31.292900
Ashley
pythondev_help_Ashley_2019-05-07T10:29:31.292900
1,557,224,971.2929
22,352
pythondev
help
same result
2019-05-07T10:29:46.293400
Leida
pythondev_help_Leida_2019-05-07T10:29:46.293400
1,557,224,986.2934
22,353
pythondev
help
hmmm
2019-05-07T10:29:51.293600
Ashley
pythondev_help_Ashley_2019-05-07T10:29:51.293600
1,557,224,991.2936
22,354
pythondev
help
try removing any cache files
2019-05-07T10:30:05.293900
Ashley
pythondev_help_Ashley_2019-05-07T10:30:05.293900
1,557,225,005.2939
22,355
pythondev
help
including in facenet?
2019-05-07T10:30:59.294200
Leida
pythondev_help_Leida_2019-05-07T10:30:59.294200
1,557,225,059.2942
22,356
pythondev
help
removing from app/src left with the same result
2019-05-07T10:31:12.294500
Leida
pythondev_help_Leida_2019-05-07T10:31:12.294500
1,557,225,072.2945
22,357
pythondev
help
i have a bunch of `facenet` folders around the app folder tho
2019-05-07T10:31:46.295000
Leida
pythondev_help_Leida_2019-05-07T10:31:46.295000
1,557,225,106.295
22,358
pythondev
help
like ```../facenet/facenet/facenet/src/ ../app/facenet/src```
2019-05-07T10:32:52.295900
Leida
pythondev_help_Leida_2019-05-07T10:32:52.295900
1,557,225,172.2959
22,359
pythondev
help
everywhere in app/
2019-05-07T10:32:54.296200
Ashley
pythondev_help_Ashley_2019-05-07T10:32:54.296200
1,557,225,174.2962
22,360
pythondev
help
oh, not those
2019-05-07T10:33:16.297100
Ashley
pythondev_help_Ashley_2019-05-07T10:33:16.297100
1,557,225,196.2971
22,361
pythondev
help
i have a similar project in the folder outside of app folder
2019-05-07T10:33:17.297300
Leida
pythondev_help_Leida_2019-05-07T10:33:17.297300
1,557,225,197.2973
22,362
pythondev
help
you might want to rethink your naming - that is going to get (is?) really confusing
2019-05-07T10:33:20.297400
Clemmie
pythondev_help_Clemmie_2019-05-07T10:33:20.297400
1,557,225,200.2974
22,363
pythondev
help
I mean `__pycache__` folders
2019-05-07T10:33:22.297600
Ashley
pythondev_help_Ashley_2019-05-07T10:33:22.297600
1,557,225,202.2976
22,364
pythondev
help
also, yeah
2019-05-07T10:33:34.297900
Ashley
pythondev_help_Ashley_2019-05-07T10:33:34.297900
1,557,225,214.2979
22,365
pythondev
help
the naming is sorta wip xD
2019-05-07T10:33:36.298100
Leida
pythondev_help_Leida_2019-05-07T10:33:36.298100
1,557,225,216.2981
22,366
pythondev
help
problem is i pulled a project that wraps facenet and is called facenet which has a module of facenet xD
2019-05-07T10:33:58.298700
Leida
pythondev_help_Leida_2019-05-07T10:33:58.298700
1,557,225,238.2987
22,367
pythondev
help
you can use the `__init__.py` to clean that up nicely
2019-05-07T10:34:30.299300
Ashley
pythondev_help_Ashley_2019-05-07T10:34:30.299300
1,557,225,270.2993
22,368
pythondev
help
dont see any more `__pychache__` folders using find in app folder
2019-05-07T10:35:13.300200
Leida
pythondev_help_Leida_2019-05-07T10:35:13.300200
1,557,225,313.3002
22,369
pythondev
help
in the `__init__.py` in the top level of `facenet/`, you can basically control what the namespace is of the `facenet` package
2019-05-07T10:35:56.300700
Ashley
pythondev_help_Ashley_2019-05-07T10:35:56.300700
1,557,225,356.3007
22,370
pythondev
help
so if you do `import facenet`, you don't have to do `facenet.src.facenet.thing`. You can just do `facenet.thing`
2019-05-07T10:36:47.301600
Ashley
pythondev_help_Ashley_2019-05-07T10:36:47.301600
1,557,225,407.3016
22,371
pythondev
help
any cache folders in any of the subdirectories?
2019-05-07T10:37:00.301900
Ashley
pythondev_help_Ashley_2019-05-07T10:37:00.301900
1,557,225,420.3019
22,372
pythondev
help
hmm using tree i did find some chaches, ill remove em
2019-05-07T10:38:08.302300
Leida
pythondev_help_Leida_2019-05-07T10:38:08.302300
1,557,225,488.3023
22,373
pythondev
help
<@Marth> :taco: thanks
2019-05-07T10:38:42.302500
Jung
pythondev_help_Jung_2019-05-07T10:38:42.302500
1,557,225,522.3025
22,374
pythondev
help
still same result
2019-05-07T10:40:08.302900
Leida
pythondev_help_Leida_2019-05-07T10:40:08.302900
1,557,225,608.3029
22,375
pythondev
help
some problem with pyenv maybe?
2019-05-07T10:40:38.303200
Leida
pythondev_help_Leida_2019-05-07T10:40:38.303200
1,557,225,638.3032
22,376
pythondev
help
im in a pyenv but the vim i run uses a different version of python for linting for example
2019-05-07T10:41:25.303800
Leida
pythondev_help_Leida_2019-05-07T10:41:25.303800
1,557,225,685.3038
22,377
pythondev
help
ah
2019-05-07T10:42:05.304400
Ashley
pythondev_help_Ashley_2019-05-07T10:42:05.304400
1,557,225,725.3044
22,378
pythondev
help
try this
2019-05-07T10:42:06.304600
Ashley
pythondev_help_Ashley_2019-05-07T10:42:06.304600
1,557,225,726.3046
22,379
pythondev
help
activate your venv (if it isn't already active), and run `pip freeze`
2019-05-07T10:42:28.305100
Ashley
pythondev_help_Ashley_2019-05-07T10:42:28.305100
1,557,225,748.3051
22,380
pythondev
help
that shouldn't reveal any problems, but doesn't hurt to check
2019-05-07T10:43:31.305800
Ashley
pythondev_help_Ashley_2019-05-07T10:43:31.305800
1,557,225,811.3058
22,381
pythondev
help
you mean to check if there are any facenets in there?
2019-05-07T10:43:57.306300
Leida
pythondev_help_Leida_2019-05-07T10:43:57.306300
1,557,225,837.3063
22,382
pythondev
help
yeah, or any other oddities
2019-05-07T10:44:07.306500
Ashley
pythondev_help_Ashley_2019-05-07T10:44:07.306500
1,557,225,847.3065
22,383
pythondev
help
None
2019-05-07T10:44:56.307300
Leida
pythondev_help_Leida_2019-05-07T10:44:56.307300
1,557,225,896.3073
22,384
pythondev
help
hmm
2019-05-07T10:46:02.308400
Ashley
pythondev_help_Ashley_2019-05-07T10:46:02.308400
1,557,225,962.3084
22,385
pythondev
help
so just to be clear, you basically have this going on, right? ``` app/ __init__.py facenet/ __init__.py src/ __init__.py something.py align/ __init__.py detect_face.py src/ __init__.py application.py ```
2019-05-07T10:46:17.308800
Ashley
pythondev_help_Ashley_2019-05-07T10:46:17.308800
1,557,225,977.3088
22,386
pythondev
help
yep thats it
2019-05-07T10:47:05.309100
Leida
pythondev_help_Leida_2019-05-07T10:47:05.309100
1,557,226,025.3091
22,387
pythondev
help
altho facenet is the whole of the facenet repo so there are more thing in there
2019-05-07T10:47:23.309800
Leida
pythondev_help_Leida_2019-05-07T10:47:23.309800
1,557,226,043.3098
22,388
pythondev
help
and you're in the parent directory of `app/`, correct?
2019-05-07T10:47:36.310000
Ashley
pythondev_help_Ashley_2019-05-07T10:47:36.310000
1,557,226,056.31
22,389
pythondev
help
currently one up from that
2019-05-07T10:47:53.310400
Leida
pythondev_help_Leida_2019-05-07T10:47:53.310400
1,557,226,073.3104
22,390
pythondev
help
so if you `ls`, you wont see `app/`?
2019-05-07T10:48:18.310700
Ashley
pythondev_help_Ashley_2019-05-07T10:48:18.310700
1,557,226,098.3107
22,391
pythondev
help
ah sry misread
2019-05-07T10:48:34.311000
Leida
pythondev_help_Leida_2019-05-07T10:48:34.311000
1,557,226,114.311
22,392
pythondev
help
yes parent of `app/`
2019-05-07T10:48:41.311400
Leida
pythondev_help_Leida_2019-05-07T10:48:41.311400
1,557,226,121.3114
22,393
pythondev
help
ok cool
2019-05-07T10:48:44.311600
Ashley
pythondev_help_Ashley_2019-05-07T10:48:44.311600
1,557,226,124.3116
22,394
pythondev
help
and your venv is active?
2019-05-07T10:48:51.311900
Ashley
pythondev_help_Ashley_2019-05-07T10:48:51.311900
1,557,226,131.3119
22,395
pythondev
help
pyenv but not venv
2019-05-07T10:49:10.312400
Leida
pythondev_help_Leida_2019-05-07T10:49:10.312400
1,557,226,150.3124
22,396
pythondev
help
venv is just short for virtual environment
2019-05-07T10:49:24.312700
Ashley
pythondev_help_Ashley_2019-05-07T10:49:24.312700
1,557,226,164.3127
22,397
pythondev
help
there's a bunch of tools for managing one
2019-05-07T10:49:42.313100
Ashley
pythondev_help_Ashley_2019-05-07T10:49:42.313100
1,557,226,182.3131
22,398
pythondev
help
but same concept
2019-05-07T10:49:48.313400
Ashley
pythondev_help_Ashley_2019-05-07T10:49:48.313400
1,557,226,188.3134
22,399
pythondev
help
also, you're running `python app/src/application.py some args`?
2019-05-07T10:50:06.314000
Ashley
pythondev_help_Ashley_2019-05-07T10:50:06.314000
1,557,226,206.314
22,400
pythondev
help
i installed a separate python version before starting to mess with the project and i set that python version in the pyenv, so i can use the same packages jumping from one project to another
2019-05-07T10:50:31.314500
Leida
pythondev_help_Leida_2019-05-07T10:50:31.314500
1,557,226,231.3145
22,401
pythondev
help
some args yes
2019-05-07T10:50:34.314800
Leida
pythondev_help_Leida_2019-05-07T10:50:34.314800
1,557,226,234.3148
22,402
pythondev
help
the args are paths to files outside of the project tho
2019-05-07T10:51:49.316100
Leida
pythondev_help_Leida_2019-05-07T10:51:49.316100
1,557,226,309.3161
22,403
pythondev
help
didnt copy over my test data, rather gave them as inputs to my script with extra relative pathing
2019-05-07T10:52:15.317100
Leida
pythondev_help_Leida_2019-05-07T10:52:15.317100
1,557,226,335.3171
22,404
pythondev
help
just a heads up regarding the virtual envs, they install a duplicate of the python binary you tell them, and that duplicate will point to it's own site-packages folder (so it has it's own set of packages "installed" there, and it doesn't utilize any pacakges from the copy of python it was duplicated from)
2019-05-07T10:52:31.317500
Ashley
pythondev_help_Ashley_2019-05-07T10:52:31.317500
1,557,226,351.3175
22,405
pythondev
help
so you don't have to go out of your way to install another copy of python yourself
2019-05-07T10:52:45.318200
Ashley
pythondev_help_Ashley_2019-05-07T10:52:45.318200
1,557,226,365.3182
22,406
pythondev
help
it bassically does that for you
2019-05-07T10:52:51.318400
Ashley
pythondev_help_Ashley_2019-05-07T10:52:51.318400
1,557,226,371.3184
22,407
pythondev
help
not sure if that's what you meant though
2019-05-07T10:53:03.318700
Ashley
pythondev_help_Ashley_2019-05-07T10:53:03.318700
1,557,226,383.3187
22,408
pythondev
help
but anyway, it sounds like that should work then
2019-05-07T10:53:23.319300
Ashley
pythondev_help_Ashley_2019-05-07T10:53:23.319300
1,557,226,403.3193
22,409
pythondev
help
ok, well i guess ill create a virtualenv for that porject, try with only the needed packages and see what happens
2019-05-07T10:53:53.320000
Leida
pythondev_help_Leida_2019-05-07T10:53:53.320000
1,557,226,433.32
22,410
pythondev
help
worth a shot
2019-05-07T10:54:04.320200
Ashley
pythondev_help_Ashley_2019-05-07T10:54:04.320200
1,557,226,444.3202
22,411
pythondev
help
I'll try my own little experiment to see what it does
2019-05-07T10:54:13.320500
Ashley
pythondev_help_Ashley_2019-05-07T10:54:13.320500
1,557,226,453.3205
22,412
pythondev
help
thanks alot for taking your time walking me through this <@Ashley> :taco:
2019-05-07T10:55:01.321200
Leida
pythondev_help_Leida_2019-05-07T10:55:01.321200
1,557,226,501.3212
22,413
pythondev
help
no problem
2019-05-07T10:57:39.321400
Ashley
pythondev_help_Ashley_2019-05-07T10:57:39.321400
1,557,226,659.3214
22,414
pythondev
help
also, I can recreate it
2019-05-07T10:57:48.321800
Ashley
pythondev_help_Ashley_2019-05-07T10:57:48.321800
1,557,226,668.3218
22,415
pythondev
help
so you're not alone
2019-05-07T10:57:51.322000
Ashley
pythondev_help_Ashley_2019-05-07T10:57:51.322000
1,557,226,671.322
22,416
pythondev
help
I'm guessing that because you're passing python `app/src/application.py`, it only cares about `application.py`'s immediate folder
2019-05-07T10:58:40.323000
Ashley
pythondev_help_Ashley_2019-05-07T10:58:40.323000
1,557,226,720.323
22,417
pythondev
help
I'm gonna try something
2019-05-07T10:59:34.323300
Ashley
pythondev_help_Ashley_2019-05-07T10:59:34.323300
1,557,226,774.3233
22,418
pythondev
help
there was something about trying to run the file as a module somewhere on stackexchange but i didnt get far with it
2019-05-07T11:00:11.323900
Leida
pythondev_help_Leida_2019-05-07T11:00:11.323900
1,557,226,811.3239
22,419
pythondev
help
interesting
2019-05-07T11:04:09.324100
Ashley
pythondev_help_Ashley_2019-05-07T11:04:09.324100
1,557,227,049.3241
22,420