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
so date as the key
2019-02-15T05:14:19.804900
Waldo
pythondev_help_Waldo_2019-02-15T05:14:19.804900
1,550,207,659.8049
8,921
pythondev
help
Then individual lists for the sku, qty and rev?
2019-02-15T05:14:29.805200
Waldo
pythondev_help_Waldo_2019-02-15T05:14:29.805200
1,550,207,669.8052
8,922
pythondev
help
so a list of lists as the date key value?
2019-02-15T05:15:07.805500
Waldo
pythondev_help_Waldo_2019-02-15T05:15:07.805500
1,550,207,707.8055
8,923
pythondev
help
I'd remove Sales into a separate DF
2019-02-15T05:17:07.806300
Mica
pythondev_help_Mica_2019-02-15T05:17:07.806300
1,550,207,827.8063
8,924
pythondev
help
so you'd have a dict of date:sales_df
2019-02-15T05:17:30.806800
Mica
pythondev_help_Mica_2019-02-15T05:17:30.806800
1,550,207,850.8068
8,925
pythondev
help
slightly confused... how would that look?
2019-02-15T05:18:14.807600
Waldo
pythondev_help_Waldo_2019-02-15T05:18:14.807600
1,550,207,894.8076
8,926
pythondev
help
with sales being `DataFrame.from_dict({MV1-XMNY18_revenue: [], MV1-XMNY18_qty: [], MV1-STL_revenue:[], MV1-STL_qty: [], ...})`
2019-02-15T05:18:34.808100
Mica
pythondev_help_Mica_2019-02-15T05:18:34.808100
1,550,207,914.8081
8,927
pythondev
help
that would be a sales DF
2019-02-15T05:18:45.808300
Mica
pythondev_help_Mica_2019-02-15T05:18:45.808300
1,550,207,925.8083
8,928
pythondev
help
ok
2019-02-15T05:18:49.808600
Waldo
pythondev_help_Waldo_2019-02-15T05:18:49.808600
1,550,207,929.8086
8,929
pythondev
help
then you have a dict with the key (date) pointing to the value (sales DF)
2019-02-15T05:19:02.809000
Mica
pythondev_help_Mica_2019-02-15T05:19:02.809000
1,550,207,942.809
8,930
pythondev
help
acitally wait wait
2019-02-15T05:19:47.809300
Mica
pythondev_help_Mica_2019-02-15T05:19:47.809300
1,550,207,987.8093
8,931
pythondev
help
if you have another column for date you could putthem all in the same DF
2019-02-15T05:19:58.809600
Mica
pythondev_help_Mica_2019-02-15T05:19:58.809600
1,550,207,998.8096
8,932
pythondev
help
that is what I was thinking
2019-02-15T05:20:27.810000
Waldo
pythondev_help_Waldo_2019-02-15T05:20:27.810000
1,550,208,027.81
8,933
pythondev
help
Hence being a bit confused, sorry!
2019-02-15T05:20:34.810300
Waldo
pythondev_help_Waldo_2019-02-15T05:20:34.810300
1,550,208,034.8103
8,934
pythondev
help
None
2019-02-15T05:21:22.810400
Mica
pythondev_help_Mica_2019-02-15T05:21:22.810400
1,550,208,082.8104
8,935
pythondev
help
etc etc.
2019-02-15T05:21:27.810800
Mica
pythondev_help_Mica_2019-02-15T05:21:27.810800
1,550,208,087.8108
8,936
pythondev
help
my bad i was being silly :stuck_out_tongue:
2019-02-15T05:21:33.811100
Mica
pythondev_help_Mica_2019-02-15T05:21:33.811100
1,550,208,093.8111
8,937
pythondev
help
ok so effectively split out each metric as sku_metricname and have lists
2019-02-15T05:22:09.812200
Waldo
pythondev_help_Waldo_2019-02-15T05:22:09.812200
1,550,208,129.8122
8,938
pythondev
help
then you'll have all the data, however you'll be required to convert the nested dicts into a list dict
2019-02-15T05:22:11.812400
Mica
pythondev_help_Mica_2019-02-15T05:22:11.812400
1,550,208,131.8124
8,939
pythondev
help
yup
2019-02-15T05:22:15.812600
Mica
pythondev_help_Mica_2019-02-15T05:22:15.812600
1,550,208,135.8126
8,940
pythondev
help
ok think I am getting it enough to see how that approach works
2019-02-15T05:22:43.813200
Waldo
pythondev_help_Waldo_2019-02-15T05:22:43.813200
1,550,208,163.8132
8,941
pythondev
help
will give it a go now quickly
2019-02-15T05:22:47.813500
Waldo
pythondev_help_Waldo_2019-02-15T05:22:47.813500
1,550,208,167.8135
8,942
pythondev
help
hopefully that all makes sense :stuck_out_tongue:
2019-02-15T05:22:56.813800
Mica
pythondev_help_Mica_2019-02-15T05:22:56.813800
1,550,208,176.8138
8,943
pythondev
help
the tricky part is I do not know what the skus will be in the date range I run the report
2019-02-15T05:23:29.814300
Waldo
pythondev_help_Waldo_2019-02-15T05:23:29.814300
1,550,208,209.8143
8,944
pythondev
help
skus?
2019-02-15T05:24:04.815100
Mica
pythondev_help_Mica_2019-02-15T05:24:04.815100
1,550,208,244.8151
8,945
pythondev
help
Sorry - product codes
2019-02-15T05:24:18.815500
Waldo
pythondev_help_Waldo_2019-02-15T05:24:18.815500
1,550,208,258.8155
8,946
pythondev
help
you could put in default stubs and then update
2019-02-15T05:24:40.815900
Mica
pythondev_help_Mica_2019-02-15T05:24:40.815900
1,550,208,280.8159
8,947
pythondev
help
yup ok
2019-02-15T05:24:49.816100
Waldo
pythondev_help_Waldo_2019-02-15T05:24:49.816100
1,550,208,289.8161
8,948
pythondev
help
also there are more experienced individuals than me in <#C0JB9ATQV|data_science> might get more advanced responses :stuck_out_tongue:
2019-02-15T05:25:37.816700
Mica
pythondev_help_Mica_2019-02-15T05:25:37.816700
1,550,208,337.8167
8,949
pythondev
help
may head over there but thanks a lot <@Mica> :taco:
2019-02-15T05:33:59.817100
Waldo
pythondev_help_Waldo_2019-02-15T05:33:59.817100
1,550,208,839.8171
8,950
pythondev
help
I have installed the `pywin32` library correctly, but each time I run my module it throws the `ModuleNotFoundError`
2019-02-15T07:04:59.819900
Arturo
pythondev_help_Arturo_2019-02-15T07:04:59.819900
1,550,214,299.8199
8,951
pythondev
help
I installed it via `pip install pywin32`
2019-02-15T07:05:16.820300
Arturo
pythondev_help_Arturo_2019-02-15T07:05:16.820300
1,550,214,316.8203
8,952
pythondev
help
I try to run it from both the console and IDE
2019-02-15T07:05:33.820600
Arturo
pythondev_help_Arturo_2019-02-15T07:05:33.820600
1,550,214,333.8206
8,953
pythondev
help
does any one know if there is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests (code here is done using pyspark and sparksql)
2019-02-15T07:07:38.820800
Ji
pythondev_help_Ji_2019-02-15T07:07:38.820800
1,550,214,458.8208
8,954
pythondev
help
code smells you could use something like mypy, black. pep8, isort. etc
2019-02-15T07:09:19.821200
Mica
pythondev_help_Mica_2019-02-15T07:09:19.821200
1,550,214,559.8212
8,955
pythondev
help
as for detecting bugs, you could always run tests in the CI?
2019-02-15T07:09:48.822000
Mica
pythondev_help_Mica_2019-02-15T07:09:48.822000
1,550,214,588.822
8,956
pythondev
help
automatic? no
2019-02-15T07:10:20.822200
Hiroko
pythondev_help_Hiroko_2019-02-15T07:10:20.822200
1,550,214,620.8222
8,957
pythondev
help
run tests in CI, use linting tools to enforce agreed upon convention
2019-02-15T07:10:41.822700
Hiroko
pythondev_help_Hiroko_2019-02-15T07:10:41.822700
1,550,214,641.8227
8,958
pythondev
help
but actual code review? how would that work?
2019-02-15T07:10:59.823000
Hiroko
pythondev_help_Hiroko_2019-02-15T07:10:59.823000
1,550,214,659.823
8,959
pythondev
help
I'd say you haven't installed it correctly then :smile:
2019-02-15T07:11:38.823900
Jonas
pythondev_help_Jonas_2019-02-15T07:11:38.823900
1,550,214,698.8239
8,960
pythondev
help
how would you determine a less than optimimal approach or a possible better structure? suggesting documentation?
2019-02-15T07:11:54.824400
Hiroko
pythondev_help_Hiroko_2019-02-15T07:11:54.824400
1,550,214,714.8244
8,961
pythondev
help
If you paste the command you're running to install it and the output we can give you a hand
2019-02-15T07:11:54.824500
Jonas
pythondev_help_Jonas_2019-02-15T07:11:54.824500
1,550,214,714.8245
8,962
pythondev
help
if you want code analysis, there’s sonarqube
2019-02-15T07:13:00.825000
Hiroko
pythondev_help_Hiroko_2019-02-15T07:13:00.825000
1,550,214,780.825
8,963
pythondev
help
<https://www.sonarqube.org/>
2019-02-15T07:13:01.825200
Hiroko
pythondev_help_Hiroko_2019-02-15T07:13:01.825200
1,550,214,781.8252
8,964
pythondev
help
but not sure how well it would work for dynamic languages like python. I know it works best with static types like java/c#/etc
2019-02-15T07:13:29.826500
Hiroko
pythondev_help_Hiroko_2019-02-15T07:13:29.826500
1,550,214,809.8265
8,965
pythondev
help
I usually run black, pyflakes, and mypy and then there is manual review
2019-02-15T07:14:00.827300
Karoline
pythondev_help_Karoline_2019-02-15T07:14:00.827300
1,550,214,840.8273
8,966
pythondev
help
I am using Sonarqube in golang. But i have not used in pyspark. For python also there is a plugin. I have not tested it
2019-02-15T07:14:03.827400
Ji
pythondev_help_Ji_2019-02-15T07:14:03.827400
1,550,214,843.8274
8,967
pythondev
help
true, but there’s always going to be limitations because of the dynamic nature of the language, particularly if you’re not using typings or mypy
2019-02-15T07:14:38.828000
Hiroko
pythondev_help_Hiroko_2019-02-15T07:14:38.828000
1,550,214,878.828
8,968
pythondev
help
are you using manual code review in addition to this?
2019-02-15T07:15:47.828600
Hiroko
pythondev_help_Hiroko_2019-02-15T07:15:47.828600
1,550,214,947.8286
8,969
pythondev
help
Yes i am doing a manual code review. But sometimes when you write the code you might end up with cognitive complexity.
2019-02-15T07:17:15.829400
Ji
pythondev_help_Ji_2019-02-15T07:17:15.829400
1,550,215,035.8294
8,970
pythondev
help
so i want to highlight such things for later refactor
2019-02-15T07:17:34.829900
Ji
pythondev_help_Ji_2019-02-15T07:17:34.829900
1,550,215,054.8299
8,971
pythondev
help
I don't know how much a tool can really help with that. I mean there's things like mccabe complexity checking - but especially if it's simply advisory and going to be dealt with later I dunno how much having that as an automatic part of a PR would help
2019-02-15T07:20:49.830900
Karoline
pythondev_help_Karoline_2019-02-15T07:20:49.830900
1,550,215,249.8309
8,972
pythondev
help
when i said i would later refactor. it is not left like that. I would address this as soon as possible. you are right using the tool seems useless
2019-02-15T07:23:20.832900
Ji
pythondev_help_Ji_2019-02-15T07:23:20.832900
1,550,215,400.8329
8,973
pythondev
help
If I'm using an automated tool in my PRs it's usually to give me a yes/no answer.
2019-02-15T07:23:29.833200
Karoline
pythondev_help_Karoline_2019-02-15T07:23:29.833200
1,550,215,409.8332
8,974
pythondev
help
especially just because they avoid argument. the worst thing is getting people disagreeing about how important something is and a PR dragging on about what should/shouldn't be fixed.
2019-02-15T07:24:16.834100
Karoline
pythondev_help_Karoline_2019-02-15T07:24:16.834100
1,550,215,456.8341
8,975
pythondev
help
Yes you can use it against every PR but then it becomes an overhead (All PR is done by manual reivew, which is enough). I would rather keep it simple get the things running and then refactor code based on complexity and performance. The main usecase for me is to highlight writing a shitty code gives us pain in the end ...
2019-02-15T07:29:13.837600
Ji
pythondev_help_Ji_2019-02-15T07:29:13.837600
1,550,215,753.8376
8,976
pythondev
help
is that shitty code fairly visible in review or when working on tickets?
2019-02-15T07:30:19.838600
Hiroko
pythondev_help_Hiroko_2019-02-15T07:30:19.838600
1,550,215,819.8386
8,977
pythondev
help
eg, when you’re working on a ticket and you come across X thing that could be done better. why not file a ticket for that, especially if you have a tech debt epic/bucket
2019-02-15T07:31:04.840000
Hiroko
pythondev_help_Hiroko_2019-02-15T07:31:04.840000
1,550,215,864.84
8,978
pythondev
help
and then you can allocate 10-20% of your team’s weekly work to cleaning up those kind of tickets
2019-02-15T07:31:30.840700
Hiroko
pythondev_help_Hiroko_2019-02-15T07:31:30.840700
1,550,215,890.8407
8,979
pythondev
help
I do agree with you <@Hiroko> that is the best approach. But sometime some slip through.
2019-02-15T07:32:11.841700
Ji
pythondev_help_Ji_2019-02-15T07:32:11.841700
1,550,215,931.8417
8,980
pythondev
help
that's going to happen
2019-02-15T07:32:26.841900
Karoline
pythondev_help_Karoline_2019-02-15T07:32:26.841900
1,550,215,946.8419
8,981
pythondev
help
So such tooling which just give me overview helps me catch those
2019-02-15T07:33:09.843200
Ji
pythondev_help_Ji_2019-02-15T07:33:09.843200
1,550,215,989.8432
8,982
pythondev
help
and are you sure you’re going to get a higher signal to noise ratio with thoe tools?
2019-02-15T07:33:17.843700
Hiroko
pythondev_help_Hiroko_2019-02-15T07:33:17.843700
1,550,215,997.8437
8,983
pythondev
help
I believe SonarQube does that
2019-02-15T07:33:19.843900
Ji
pythondev_help_Ji_2019-02-15T07:33:19.843900
1,550,215,999.8439
8,984
pythondev
help
I'd say throw the linters and mccabe at it, and use those to gate new PRs. And anything beyond that is realistically going to have to come from the culture of your dev team
2019-02-15T07:33:26.844100
Karoline
pythondev_help_Karoline_2019-02-15T07:33:26.844100
1,550,216,006.8441
8,985
pythondev
help
and project managers too
2019-02-15T07:33:54.844600
Hiroko
pythondev_help_Hiroko_2019-02-15T07:33:54.844600
1,550,216,034.8446
8,986
pythondev
help
i just want to help dev team :wink: . Project managers are whole different species :smile:
2019-02-15T07:34:49.845700
Ji
pythondev_help_Ji_2019-02-15T07:34:49.845700
1,550,216,089.8457
8,987
pythondev
help
PMs really should help the dev team and be the interface between devs and stakeholders
2019-02-15T07:35:25.846800
Hiroko
pythondev_help_Hiroko_2019-02-15T07:35:25.846800
1,550,216,125.8468
8,988
pythondev
help
I mean they list their "code smells" - <https://rules.sonarsource.com/python/type/Code%20Smell/RSPEC-124>
2019-02-15T07:35:31.847000
Karoline
pythondev_help_Karoline_2019-02-15T07:35:31.847000
1,550,216,131.847
8,989
pythondev
help
if theyre not doing that, there’s a bigger problem
2019-02-15T07:35:37.847500
Hiroko
pythondev_help_Hiroko_2019-02-15T07:35:37.847500
1,550,216,137.8475
8,990
pythondev
help
I'm unimpressed with what it does beyond the normal linter, to be honest
2019-02-15T07:35:45.847700
Karoline
pythondev_help_Karoline_2019-02-15T07:35:45.847700
1,550,216,145.8477
8,991
pythondev
help
files should not have too many lines of code?
2019-02-15T07:36:14.848100
Hiroko
pythondev_help_Hiroko_2019-02-15T07:36:14.848100
1,550,216,174.8481
8,992
pythondev
help
doesn’t really state what the limit is
2019-02-15T07:36:25.848600
Hiroko
pythondev_help_Hiroko_2019-02-15T07:36:25.848600
1,550,216,185.8486
8,993
pythondev
help
Thanks guys i will try to keep it simple and do it with linters for start
2019-02-15T07:36:43.849000
Ji
pythondev_help_Ji_2019-02-15T07:36:43.849000
1,550,216,203.849
8,994
pythondev
help
cognitive complexity… would be interesting how that’s determined
2019-02-15T07:37:02.849500
Hiroko
pythondev_help_Hiroko_2019-02-15T07:37:02.849500
1,550,216,222.8495
8,995
pythondev
help
use the linters and don't make them advisory. fail PRs that linting
2019-02-15T07:37:08.849800
Karoline
pythondev_help_Karoline_2019-02-15T07:37:08.849800
1,550,216,228.8498
8,996
pythondev
help
<@Hiroko> my guess is they just run mccabe
2019-02-15T07:37:28.850100
Karoline
pythondev_help_Karoline_2019-02-15T07:37:28.850100
1,550,216,248.8501
8,997
pythondev
help
<https://www.sonarsource.com/docs/CognitiveComplexity.pdf>
2019-02-15T07:37:33.850300
Hiroko
pythondev_help_Hiroko_2019-02-15T07:37:33.850300
1,550,216,253.8503
8,998
pythondev
help
looks to be built off mccabe
2019-02-15T07:37:50.850600
Hiroko
pythondev_help_Hiroko_2019-02-15T07:37:50.850600
1,550,216,270.8506
8,999
pythondev
help
a lot of this just seems to be built off of the existing linters really
2019-02-15T07:38:26.850900
Karoline
pythondev_help_Karoline_2019-02-15T07:38:26.850900
1,550,216,306.8509
9,000
pythondev
help
another thing I'll add, and I hope I'm not beating a dead horse here, but it's coming a up a lot as I get deeper into the new place I'm at so it's on my mind - anything automated to tell you things that isn't designed to require a response is destined to be ignored. my prediction is if this is just an advisory thing o...
2019-02-15T07:58:28.853300
Karoline
pythondev_help_Karoline_2019-02-15T07:58:28.853300
1,550,217,508.8533
9,001
pythondev
help
worse - they may internalized its continued griping about their "shitty code" and get demoralized.
2019-02-15T07:58:43.853700
Karoline
pythondev_help_Karoline_2019-02-15T07:58:43.853700
1,550,217,523.8537
9,002
pythondev
help
so if you want to integrate tools like this into CI - make failing the tool fail CI
2019-02-15T07:59:21.854200
Karoline
pythondev_help_Karoline_2019-02-15T07:59:21.854200
1,550,217,561.8542
9,003
pythondev
help
Managed to get it working. The import name was wrong
2019-02-15T08:06:29.854300
Arturo
pythondev_help_Arturo_2019-02-15T08:06:29.854300
1,550,217,989.8543
9,004
pythondev
help
Yes you are right people will get demoralised if flagged every single time. In go project which i worked with we used this check (like a good to have), not to flag things as shitty code. Like you said before we sit as a team we take a look into code smell and remove it before moving it into production. I am taking tha...
2019-02-15T08:21:57.861200
Ji
pythondev_help_Ji_2019-02-15T08:21:57.861200
1,550,218,917.8612
9,005
pythondev
help
Yeah it can be especially tough working with data science stuff, the expectations for developers there are often different. I think it's good to do what you are doing though and trying to bring up the code quality
2019-02-15T08:23:10.862000
Karoline
pythondev_help_Karoline_2019-02-15T08:23:10.862000
1,550,218,990.862
9,006
pythondev
help
Funny thing, I just talked to two people from the same department. 1) the pyspark queries were slow so I converted them to use mostly SQL since then only the SQL statements need to be transferred. 2) the codebase was all in pyspark using just SQL statements and was unmaintainable so I converted it to python statements
2019-02-15T09:03:52.865700
Bethany
pythondev_help_Bethany_2019-02-15T09:03:52.865700
1,550,221,432.8657
9,007
pythondev
help
So don't do that
2019-02-15T09:04:04.865900
Bethany
pythondev_help_Bethany_2019-02-15T09:04:04.865900
1,550,221,444.8659
9,008
pythondev
help
Yeah. You'll have to work the problem backwards a little bit. Just look at how it builds the command it wants to run, and try to mimic that process
2019-02-15T09:05:25.868000
Ashley
pythondev_help_Ashley_2019-02-15T09:05:25.868000
1,550,221,525.868
9,009
pythondev
help
I can't imagine a tool will be able to tell you anything helpful beyond Flake8 + mypy + formatter (black/yapf).
2019-02-15T09:05:49.868800
Bethany
pythondev_help_Bethany_2019-02-15T09:05:49.868800
1,550,221,549.8688
9,010
pythondev
help
I’m familiar with the heap data structure, so I’ve chosen to use `heapq`. I’ve having difficulty printing / visualizing the data structure, post `heapify`. Anyone have any idea?
2019-02-15T09:43:27.870100
Cammie
pythondev_help_Cammie_2019-02-15T09:43:27.870100
1,550,223,807.8701
9,011
pythondev
help
what do you mean, printing/visualizing post heapify?
2019-02-15T09:49:33.870900
Hiroko
pythondev_help_Hiroko_2019-02-15T09:49:33.870900
1,550,224,173.8709
9,012
pythondev
help
I want to display the list.
2019-02-15T09:50:40.871100
Cammie
pythondev_help_Cammie_2019-02-15T09:50:40.871100
1,550,224,240.8711
9,013
pythondev
help
I’ve tried printing it `heapq`, i’ve tried casting it to a `list`
2019-02-15T09:50:54.871400
Cammie
pythondev_help_Cammie_2019-02-15T09:50:54.871400
1,550,224,254.8714
9,014
pythondev
help
I can’t find a way to access the `heapq`’s inner list storage
2019-02-15T09:51:15.871900
Cammie
pythondev_help_Cammie_2019-02-15T09:51:15.871900
1,550,224,275.8719
9,015
pythondev
help
well, a heap is a tree
2019-02-15T09:51:19.872000
Hiroko
pythondev_help_Hiroko_2019-02-15T09:51:19.872000
1,550,224,279.872
9,016
pythondev
help
effectively, in shape
2019-02-15T09:51:28.872300
Hiroko
pythondev_help_Hiroko_2019-02-15T09:51:28.872300
1,550,224,288.8723
9,017
pythondev
help
Agreed.
2019-02-15T09:51:43.872500
Cammie
pythondev_help_Cammie_2019-02-15T09:51:43.872500
1,550,224,303.8725
9,018
pythondev
help
but the inner storage is a list.
2019-02-15T09:51:48.872800
Cammie
pythondev_help_Cammie_2019-02-15T09:51:48.872800
1,550,224,308.8728
9,019
pythondev
help
I just need to print it. The list, a tree, whatever.
2019-02-15T09:51:58.873100
Cammie
pythondev_help_Cammie_2019-02-15T09:51:58.873100
1,550,224,318.8731
9,020