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
yeah, ignore editor configs, compiled files, build artifacts, all that stuff
2018-01-29T18:43:06.000062
Garrett
pythondev_help_Garrett_2018-01-29T18:43:06.000062
1,517,251,386.000062
31,824
pythondev
help
I'm just curious. How does one ship out code, if the interpreter isn't bundled with it?
2018-01-29T18:44:27.000144
Rena
pythondev_help_Rena_2018-01-29T18:44:27.000144
1,517,251,467.000144
31,825
pythondev
help
well, as far as open source is concerned, the people who will be downloading and using your code also have the interpreter
2018-01-29T18:44:54.000052
Garrett
pythondev_help_Garrett_2018-01-29T18:44:54.000052
1,517,251,494.000052
31,826
pythondev
help
But they won't have the site-packages because that's ignored?
2018-01-29T18:45:34.000196
Rena
pythondev_help_Rena_2018-01-29T18:45:34.000196
1,517,251,534.000196
31,827
pythondev
help
That goes in your requirements.txt file
2018-01-29T18:45:51.000111
Porsha
pythondev_help_Porsha_2018-01-29T18:45:51.000111
1,517,251,551.000111
31,828
pythondev
help
you can include a file that tells them what packages to install
2018-01-29T18:45:53.000116
Garrett
pythondev_help_Garrett_2018-01-29T18:45:53.000116
1,517,251,553.000116
31,829
pythondev
help
generally this is called `requirements.txt` but the name isn't a required one
2018-01-29T18:46:05.000167
Garrett
pythondev_help_Garrett_2018-01-29T18:46:05.000167
1,517,251,565.000167
31,830
pythondev
help
And does the interpreter version also get mentioned in the requirements.txt? Ie py2 vs py3
2018-01-29T18:46:41.000276
Rena
pythondev_help_Rena_2018-01-29T18:46:41.000276
1,517,251,601.000276
31,831
pythondev
help
nope. generally you tell people what they need for that
2018-01-29T18:47:15.000468
Garrett
pythondev_help_Garrett_2018-01-29T18:47:15.000468
1,517,251,635.000468
31,832
pythondev
help
also, avoid legacy python (python 2.7 and below) if you can
2018-01-29T18:47:27.000051
Garrett
pythondev_help_Garrett_2018-01-29T18:47:27.000051
1,517,251,647.000051
31,833
pythondev
help
if your project is installable (has a `setup.py`) you can specify python version in there, i think
2018-01-29T18:48:43.000475
Garrett
pythondev_help_Garrett_2018-01-29T18:48:43.000475
1,517,251,723.000475
31,834
pythondev
help
How can python be installable if it's interpreted?
2018-01-29T18:49:26.000308
Rena
pythondev_help_Rena_2018-01-29T18:49:26.000308
1,517,251,766.000308
31,835
pythondev
help
Or am I mixing up two different things?
2018-01-29T18:49:48.000232
Rena
pythondev_help_Rena_2018-01-29T18:49:48.000232
1,517,251,788.000232
31,836
pythondev
help
installable as a package. like when you do `pip install something`
2018-01-29T18:49:53.000131
Garrett
pythondev_help_Garrett_2018-01-29T18:49:53.000131
1,517,251,793.000131
31,837
pythondev
help
Ahhh. You mean if it's a library as opposed to an app that someone actually uses?
2018-01-29T18:50:35.000231
Rena
pythondev_help_Rena_2018-01-29T18:50:35.000231
1,517,251,835.000231
31,838
pythondev
help
not exactly but close enough
2018-01-29T18:51:06.000062
Garrett
pythondev_help_Garrett_2018-01-29T18:51:06.000062
1,517,251,866.000062
31,839
pythondev
help
:taco: <@Garrett> <@Porsha> much appreciated!
2018-01-29T18:52:39.000209
Rena
pythondev_help_Rena_2018-01-29T18:52:39.000209
1,517,251,959.000209
31,840
pythondev
help
that's the "fun" thing about learning to program. the rabbit hole has no bottom and an infinite number of equally-long offshoots
2018-01-29T18:55:58.000025
Garrett
pythondev_help_Garrett_2018-01-29T18:55:58.000025
1,517,252,158.000025
31,841
pythondev
help
That brings me to my question, at what point does one say: enough?
2018-01-29T18:58:01.000332
Rena
pythondev_help_Rena_2018-01-29T18:58:01.000332
1,517,252,281.000332
31,842
pythondev
help
When you’ve built a solid base of knowledge in your little corner of it all. :slightly_smiling_face:
2018-01-29T18:59:11.000071
Zack
pythondev_help_Zack_2018-01-29T18:59:11.000071
1,517,252,351.000071
31,843
pythondev
help
When it's 5am in the morning and you haven't slept yet and need to be up in a few hours?
2018-01-29T18:59:13.000345
Rigoberto
pythondev_help_Rigoberto_2018-01-29T18:59:13.000345
1,517,252,353.000345
31,844
pythondev
help
And that’s not to say it’s “enough” and you should stop learning - that’s how you become a dinosaur. But you can relax a little at least. :stuck_out_tongue:
2018-01-29T19:00:02.000017
Zack
pythondev_help_Zack_2018-01-29T19:00:02.000017
1,517,252,402.000017
31,845
pythondev
help
seems like it's usually more "that's enough for now" and not "that's enough, period"
2018-01-29T19:00:08.000083
Garrett
pythondev_help_Garrett_2018-01-29T19:00:08.000083
1,517,252,408.000083
31,846
pythondev
help
Excellent paradigm shift
2018-01-29T19:02:09.000300
Rena
pythondev_help_Rena_2018-01-29T19:02:09.000300
1,517,252,529.0003
31,847
pythondev
help
you also get to a point where you don't need to actively learn about day-to-day things
2018-01-29T19:02:41.000096
Garrett
pythondev_help_Garrett_2018-01-29T19:02:41.000096
1,517,252,561.000096
31,848
pythondev
help
so you can rest your learning-cap and save it for when things take a turn
2018-01-29T19:02:54.000497
Garrett
pythondev_help_Garrett_2018-01-29T19:02:54.000497
1,517,252,574.000497
31,849
pythondev
help
also, there will come a point when you should start aiming for depth rather than breadth, if that makes sense
2018-01-29T19:02:56.000529
Zack
pythondev_help_Zack_2018-01-29T19:02:56.000529
1,517,252,576.000529
31,850
pythondev
help
How does one judge that point?
2018-01-29T19:04:16.000367
Rena
pythondev_help_Rena_2018-01-29T19:04:16.000367
1,517,252,656.000367
31,851
pythondev
help
it’s not easy, and I suppose it’s more of a seesaw rather than a hard pivot
2018-01-29T19:04:43.000166
Zack
pythondev_help_Zack_2018-01-29T19:04:43.000166
1,517,252,683.000166
31,852
pythondev
help
i think, for many people, it's a natural point. you stop finding things you don't know how to do and you start finding things you don't know how to do _easily_
2018-01-29T19:05:16.000451
Garrett
pythondev_help_Garrett_2018-01-29T19:05:16.000451
1,517,252,716.000451
31,853
pythondev
help
I’d say it’s rarely a bad time to do a deep dive on something, although some people do stunt their breadth by spending too much time on depth
2018-01-29T19:05:21.000093
Zack
pythondev_help_Zack_2018-01-29T19:05:21.000093
1,517,252,721.000093
31,854
pythondev
help
so then you dive into that particular thing
2018-01-29T19:05:25.000090
Garrett
pythondev_help_Garrett_2018-01-29T19:05:25.000090
1,517,252,725.00009
31,855
pythondev
help
yeah that’s a good way to put it.
2018-01-29T19:05:34.000195
Zack
pythondev_help_Zack_2018-01-29T19:05:34.000195
1,517,252,734.000195
31,856
pythondev
help
In other words, get it working, then optimize?
2018-01-29T19:06:22.000298
Rena
pythondev_help_Rena_2018-01-29T19:06:22.000298
1,517,252,782.000298
31,857
pythondev
help
it’s hard to give universal advice though, I’ve known some people that just can’t seem to stop deep diving on things, and some that just skim the surface of everything, and both are bad, IMO
2018-01-29T19:06:24.000166
Zack
pythondev_help_Zack_2018-01-29T19:06:24.000166
1,517,252,784.000166
31,858
pythondev
help
that’s good advice generally, but I think it’s something slightly different
2018-01-29T19:06:47.000079
Zack
pythondev_help_Zack_2018-01-29T19:06:47.000079
1,517,252,807.000079
31,859
pythondev
help
I was just borrowing a programming concept I learned about
2018-01-29T19:07:23.000048
Rena
pythondev_help_Rena_2018-01-29T19:07:23.000048
1,517,252,843.000048
31,860
pythondev
help
there's a saying: make it work, make it good/clean, make it fast
2018-01-29T19:07:31.000464
Garrett
pythondev_help_Garrett_2018-01-29T19:07:31.000464
1,517,252,851.000464
31,861
pythondev
help
learning can be _kinda_ like that
2018-01-29T19:07:41.000429
Garrett
pythondev_help_Garrett_2018-01-29T19:07:41.000429
1,517,252,861.000429
31,862
pythondev
help
<@Zack> yeah, the problem I see most is people that have to know _exactly how this thing works_ before they can move on to the next thing
2018-01-29T19:08:45.000235
Garrett
pythondev_help_Garrett_2018-01-29T19:08:45.000235
1,517,252,925.000235
31,863
pythondev
help
it's cool that you want to know how lists allocate memory, but can we talk about appending to them first?
2018-01-29T19:08:57.000190
Garrett
pythondev_help_Garrett_2018-01-29T19:08:57.000190
1,517,252,937.00019
31,864
pythondev
help
That's me!
2018-01-29T19:09:11.000278
Rena
pythondev_help_Rena_2018-01-29T19:09:11.000278
1,517,252,951.000278
31,865
pythondev
help
ha, yeah. I think maybe the key is understanding where the functional boundries are
2018-01-29T19:09:17.000153
Zack
pythondev_help_Zack_2018-01-29T19:09:17.000153
1,517,252,957.000153
31,866
pythondev
help
I started out like that. You quickly learn that you can't master every single thing.. Even if you want to
2018-01-29T19:09:25.000469
Porsha
pythondev_help_Porsha_2018-01-29T19:09:25.000469
1,517,252,965.000469
31,867
pythondev
help
It's a slippery slope if you do
2018-01-29T19:10:02.000113
Porsha
pythondev_help_Porsha_2018-01-29T19:10:02.000113
1,517,253,002.000113
31,868
pythondev
help
Is there anything wrong with deleting a directory from `site-packages` as opposed to using `pip uninstall some_package`?
2018-01-29T19:23:05.000137
Rena
pythondev_help_Rena_2018-01-29T19:23:05.000137
1,517,253,785.000137
31,869
pythondev
help
depends on if the package has any external stuff it installs like local scripts
2018-01-29T19:24:39.000244
Noel
pythondev_help_Noel_2018-01-29T19:24:39.000244
1,517,253,879.000244
31,870
pythondev
help
so technically no but pip uninstall is very good to use anyways
2018-01-29T19:24:58.000123
Noel
pythondev_help_Noel_2018-01-29T19:24:58.000123
1,517,253,898.000123
31,871
pythondev
help
if there's a non-manual way to do something, generally use that
2018-01-29T19:27:07.000312
Garrett
pythondev_help_Garrett_2018-01-29T19:27:07.000312
1,517,254,027.000312
31,872
pythondev
help
Automate All The Things!
2018-01-29T19:28:19.000148
Noel
pythondev_help_Noel_2018-01-29T19:28:19.000148
1,517,254,099.000148
31,873
pythondev
help
there's few things in life less fun than figuring out how to fix your python installation because you nuked something that your linux distro needs to reinstall software in your site-packages :disappointed:
2018-01-29T19:29:53.000107
Noel
pythondev_help_Noel_2018-01-29T19:29:53.000107
1,517,254,193.000107
31,874
pythondev
help
yet another issue avoided by using virtualenvs :smile:
2018-01-29T19:30:14.000013
Garrett
pythondev_help_Garrett_2018-01-29T19:30:14.000013
1,517,254,214.000013
31,875
pythondev
help
Would you mind explaining?
2018-01-29T19:31:34.000146
Rena
pythondev_help_Rena_2018-01-29T19:31:34.000146
1,517,254,294.000146
31,876
pythondev
help
Spent the weekend doing a clean install from scratch and rebuilding things using proper setup and virtualenvs. Big improvement in organization and reduction in errors.
2018-01-29T19:31:51.000064
Nohemi
pythondev_help_Nohemi_2018-01-29T19:31:51.000064
1,517,254,311.000064
31,877
pythondev
help
<@Rena> For instance, I have a package called `flake8` for checking python code installed in my local python installation, which means it has both a site package in `/usr/local/lib/python2.7/site-packages/pyflakes`, as well as a script installed in `/usr/local/bin/flake8`. If I just remove the site-packages directory, ...
2018-01-29T19:37:48.000019
Noel
pythondev_help_Noel_2018-01-29T19:37:48.000019
1,517,254,668.000019
31,878
pythondev
help
Ahhh. Excellent!
2018-01-29T19:38:40.000039
Rena
pythondev_help_Rena_2018-01-29T19:38:40.000039
1,517,254,720.000039
31,879
pythondev
help
<@Noel> and then comes the fun of doing `pip3 install flake8` and now which one do you get in `/usr/local/bin`?
2018-01-29T19:40:13.000401
Garrett
pythondev_help_Garrett_2018-01-29T19:40:13.000401
1,517,254,813.000401
31,880
pythondev
help
I have a trick for that!
2018-01-29T19:41:04.000168
Noel
pythondev_help_Noel_2018-01-29T19:41:04.000168
1,517,254,864.000168
31,881
pythondev
help
```pip3 install flake8 Could not find an activated virtualenv (required).```
2018-01-29T19:41:10.000019
Noel
pythondev_help_Noel_2018-01-29T19:41:10.000019
1,517,254,870.000019
31,882
pythondev
help
:smile:
2018-01-29T19:41:12.000228
Noel
pythondev_help_Noel_2018-01-29T19:41:12.000228
1,517,254,872.000228
31,883
pythondev
help
ha
2018-01-29T19:41:56.000220
Garrett
pythondev_help_Garrett_2018-01-29T19:41:56.000220
1,517,254,916.00022
31,884
pythondev
help
luckily I only install very few global packages, which is generally just to make vs code happy when i'm doing code reviews, all my actual code these days is python2/3 + tox + virtualenv
2018-01-29T19:42:23.000284
Noel
pythondev_help_Noel_2018-01-29T19:42:23.000284
1,517,254,943.000284
31,885
pythondev
help
yeah, that's pretty much me, too
2018-01-29T19:45:02.000425
Garrett
pythondev_help_Garrett_2018-01-29T19:45:02.000425
1,517,255,102.000425
31,886
pythondev
help
Tox?
2018-01-29T19:56:56.000036
Rena
pythondev_help_Rena_2018-01-29T19:56:56.000036
1,517,255,816.000036
31,887
pythondev
help
tox is a tool that lets you run things against multiple versions of python
2018-01-29T19:59:27.000234
Noel
pythondev_help_Noel_2018-01-29T19:59:27.000234
1,517,255,967.000234
31,888
pythondev
help
you don't need tox at this point :smile:
2018-01-29T20:00:41.000222
Garrett
pythondev_help_Garrett_2018-01-29T20:00:41.000222
1,517,256,041.000222
31,889
pythondev
help
Anyone have a solution for this kind of problem?
2018-01-29T20:16:48.000181
Kelsey
pythondev_help_Kelsey_2018-01-29T20:16:48.000181
1,517,257,008.000181
31,890
pythondev
help
```given two non-negative integers A and B, returns the number of bits set to 1 in the binary representation of the number A * B for example given a = 3 and b = 7 the function should return 3, because the binary representation of a ** b = 3 * 7 = 21 is 10101 and it contains bits set to 1 ```
2018-01-29T20:16:52.000271
Kelsey
pythondev_help_Kelsey_2018-01-29T20:16:52.000271
1,517,257,012.000271
31,891
pythondev
help
`def solution (A, B):`
2018-01-29T20:17:05.000031
Kelsey
pythondev_help_Kelsey_2018-01-29T20:17:05.000031
1,517,257,025.000031
31,892
pythondev
help
I am kind of stumped
2018-01-29T20:17:09.000239
Kelsey
pythondev_help_Kelsey_2018-01-29T20:17:09.000239
1,517,257,029.000239
31,893
pythondev
help
break it down into steps. what's the first thing you need to do to `a` and `b`?
2018-01-29T20:18:35.000262
Garrett
pythondev_help_Garrett_2018-01-29T20:18:35.000262
1,517,257,115.000262
31,894
pythondev
help
im assuming ``` if A and B &lt; 0: raise exception` than bit = 0 while (A) : bit_set = A &amp; 1```
2018-01-29T20:22:37.000127
Kelsey
pythondev_help_Kelsey_2018-01-29T20:22:37.000127
1,517,257,357.000127
31,895
pythondev
help
`if A and B &lt; 0:` doesn't check that `A` is greater than 0
2018-01-29T20:23:21.000292
Garrett
pythondev_help_Garrett_2018-01-29T20:23:21.000292
1,517,257,401.000292
31,896
pythondev
help
it simply checks that `A` is truthy
2018-01-29T20:23:33.000009
Garrett
pythondev_help_Garrett_2018-01-29T20:23:33.000009
1,517,257,413.000009
31,897
pythondev
help
`if A &lt; 0 and B &lt; 0`
2018-01-29T20:23:54.000086
Kelsey
pythondev_help_Kelsey_2018-01-29T20:23:54.000086
1,517,257,434.000086
31,898
pythondev
help
I meant
2018-01-29T20:23:56.000077
Kelsey
pythondev_help_Kelsey_2018-01-29T20:23:56.000077
1,517,257,436.000077
31,899
pythondev
help
raise exception
2018-01-29T20:24:04.000326
Kelsey
pythondev_help_Kelsey_2018-01-29T20:24:04.000326
1,517,257,444.000326
31,900
pythondev
help
ok. so you know A and B are both non-negative integers (couldn't they be 0, though?)
2018-01-29T20:24:16.000235
Garrett
pythondev_help_Garrett_2018-01-29T20:24:16.000235
1,517,257,456.000235
31,901
pythondev
help
true yea they could be
2018-01-29T20:24:28.000026
Kelsey
pythondev_help_Kelsey_2018-01-29T20:24:28.000026
1,517,257,468.000026
31,902
pythondev
help
crap
2018-01-29T20:24:29.000128
Kelsey
pythondev_help_Kelsey_2018-01-29T20:24:29.000128
1,517,257,469.000128
31,903
pythondev
help
`&gt;= 0`
2018-01-29T20:24:34.000366
Garrett
pythondev_help_Garrett_2018-01-29T20:24:34.000366
1,517,257,474.000366
31,904
pythondev
help
lol
2018-01-29T20:24:37.000211
Kelsey
pythondev_help_Kelsey_2018-01-29T20:24:37.000211
1,517,257,477.000211
31,905
pythondev
help
alright, so A and B are non-negative integers. what's the next thing you need?
2018-01-29T20:24:57.000279
Garrett
pythondev_help_Garrett_2018-01-29T20:24:57.000279
1,517,257,497.000279
31,906
pythondev
help
return the number of bit sets to 1 in the binary representation of the number A * B
2018-01-29T20:26:48.000104
Kelsey
pythondev_help_Kelsey_2018-01-29T20:26:48.000104
1,517,257,608.000104
31,907
pythondev
help
you jumped way ahead :smile:
2018-01-29T20:27:23.000137
Garrett
pythondev_help_Garrett_2018-01-29T20:27:23.000137
1,517,257,643.000137
31,908
pythondev
help
the next step is to figure out `A * B`, right?
2018-01-29T20:27:34.000016
Garrett
pythondev_help_Garrett_2018-01-29T20:27:34.000016
1,517,257,654.000016
31,909
pythondev
help
ok so just multiple the 2 values and store in a var?
2018-01-29T20:28:59.000352
Kelsey
pythondev_help_Kelsey_2018-01-29T20:28:59.000352
1,517,257,739.000352
31,910
pythondev
help
`var = A * B`
2018-01-29T20:29:16.000098
Kelsey
pythondev_help_Kelsey_2018-01-29T20:29:16.000098
1,517,257,756.000098
31,911
pythondev
help
sure
2018-01-29T20:29:21.000063
Garrett
pythondev_help_Garrett_2018-01-29T20:29:21.000063
1,517,257,761.000063
31,912
pythondev
help
alright, so `var` is now a number. let's go back to the example text. `A == 3`, `B == 7`, `var == 21`, right?
2018-01-29T20:29:48.000137
Garrett
pythondev_help_Garrett_2018-01-29T20:29:48.000137
1,517,257,788.000137
31,913
pythondev
help
right
2018-01-29T20:30:00.000043
Kelsey
pythondev_help_Kelsey_2018-01-29T20:30:00.000043
1,517,257,800.000043
31,914
pythondev
help
so var is now an int
2018-01-29T20:30:04.000084
Kelsey
pythondev_help_Kelsey_2018-01-29T20:30:04.000084
1,517,257,804.000084
31,915
pythondev
help
yep
2018-01-29T20:30:25.000087
Garrett
pythondev_help_Garrett_2018-01-29T20:30:25.000087
1,517,257,825.000087
31,916
pythondev
help
now, do you know how to get the binary representation of an integer?
2018-01-29T20:30:38.000282
Garrett
pythondev_help_Garrett_2018-01-29T20:30:38.000282
1,517,257,838.000282
31,917
pythondev
help
no that i am not sure
2018-01-29T20:30:46.000019
Kelsey
pythondev_help_Kelsey_2018-01-29T20:30:46.000019
1,517,257,846.000019
31,918
pythondev
help
ok. what does google tell you?
2018-01-29T20:31:02.000052
Garrett
pythondev_help_Garrett_2018-01-29T20:31:02.000052
1,517,257,862.000052
31,919
pythondev
help
there's a built-in function that you probably want to use for this
2018-01-29T20:31:31.000038
Garrett
pythondev_help_Garrett_2018-01-29T20:31:31.000038
1,517,257,891.000038
31,920
pythondev
help
interesting this actually works? `print "{0:b}".format(i)`
2018-01-29T20:32:18.000159
Kelsey
pythondev_help_Kelsey_2018-01-29T20:32:18.000159
1,517,257,938.000159
31,921
pythondev
help
i did not know that
2018-01-29T20:32:25.000088
Kelsey
pythondev_help_Kelsey_2018-01-29T20:32:25.000088
1,517,257,945.000088
31,922
pythondev
help
that'll work but there's a potentially faster way
2018-01-29T20:32:42.000213
Garrett
pythondev_help_Garrett_2018-01-29T20:32:42.000213
1,517,257,962.000213
31,923