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
sheet has some formatting which i would like to preserve, so i m keen to figure out how to clear sheet. i see couple of example where people suggested to clear ranges with null values, however is there any pythonic way to clear it in one line code ?
2018-03-07T06:35:14.000332
Refugia
pythondev_help_Refugia_2018-03-07T06:35:14.000332
1,520,404,514.000332
37,724
pythondev
help
by formatting do you mean cell format or row/column formats?
2018-03-07T06:37:13.000096
Floy
pythondev_help_Floy_2018-03-07T06:37:13.000096
1,520,404,633.000096
37,725
pythondev
help
cell conditional formatting. like color based on value, colored header . i know i can code this in python too, but these thing i m using from excel inbuilt feature itself
2018-03-07T06:38:40.000276
Refugia
pythondev_help_Refugia_2018-03-07T06:38:40.000276
1,520,404,720.000276
37,726
pythondev
help
ok. why not see if you can do that in pytho
2018-03-07T06:39:10.000173
Floy
pythondev_help_Floy_2018-03-07T06:39:10.000173
1,520,404,750.000173
37,727
pythondev
help
clear the sheet
2018-03-07T06:39:14.000180
Floy
pythondev_help_Floy_2018-03-07T06:39:14.000180
1,520,404,754.00018
37,728
pythondev
help
apply formatting to specific cells
2018-03-07T06:39:20.000416
Floy
pythondev_help_Floy_2018-03-07T06:39:20.000416
1,520,404,760.000416
37,729
pythondev
help
and then run again?
2018-03-07T06:39:24.000084
Floy
pythondev_help_Floy_2018-03-07T06:39:24.000084
1,520,404,764.000084
37,730
pythondev
help
how do we clear the sheet ?
2018-03-07T06:40:11.000257
Refugia
pythondev_help_Refugia_2018-03-07T06:40:11.000257
1,520,404,811.000257
37,731
pythondev
help
i could find code to delete the sheet, but not clearing it
2018-03-07T06:40:29.000026
Refugia
pythondev_help_Refugia_2018-03-07T06:40:29.000026
1,520,404,829.000026
37,732
pythondev
help
Hi all, are there any vs code users? I am trying to use the ipython console similar to spyder, but I cannot get it to work properly, I have been following this persons instructions; <https://donjayamanne.github.io/pythonVSCodeDocs/docs/jupyter_examples/>
2018-03-07T06:41:06.000449
Milo
pythondev_help_Milo_2018-03-07T06:41:06.000449
1,520,404,866.000449
37,733
pythondev
help
In spyder I am first able to run the file then run a certain block of code, and play around with the variables in the ipython console, does anyone know how to do this with vs code?
2018-03-07T06:42:29.000183
Milo
pythondev_help_Milo_2018-03-07T06:42:29.000183
1,520,404,949.000183
37,734
pythondev
help
then you might have to delete the sheet and recreate it
2018-03-07T06:43:43.000285
Floy
pythondev_help_Floy_2018-03-07T06:43:43.000285
1,520,405,023.000285
37,735
pythondev
help
ohhh
2018-03-07T06:44:44.000382
Refugia
pythondev_help_Refugia_2018-03-07T06:44:44.000382
1,520,405,084.000382
37,736
pythondev
help
is it advised to write couple of line vb script thats mscro behind the excel sheet, and python can call that vb script which would clear the sheet /
2018-03-07T06:45:38.000398
Refugia
pythondev_help_Refugia_2018-03-07T06:45:38.000398
1,520,405,138.000398
37,737
pythondev
help
For example I have a module with these functions in it; ``` from mysql_db import connection as conn import numpy as np import pandas as pd from auxLibs import kUnique, writeMain import requests import bs4 from datetime import date, datetime from Data import timeLimit # find_text#, sources from html_utils import rss, ...
2018-03-07T06:56:24.000011
Milo
pythondev_help_Milo_2018-03-07T06:56:24.000011
1,520,405,784.000011
37,738
pythondev
help
You can start a REPL in vs code and import your function
2018-03-07T07:01:05.000309
Noel
pythondev_help_Noel_2018-03-07T07:01:05.000309
1,520,406,065.000309
37,739
pythondev
help
How can I remove and replace characters until they reach a specific character? For example lets say I have this string: `<https://example.com/1/test/JWKDkjkjkaeljijdiIJ>` (the last part has always a different length) And now I would like to replace the last part of it with my new string, until it reaches the first `/...
2018-03-07T07:12:01.000030
Laila
pythondev_help_Laila_2018-03-07T07:12:01.000030
1,520,406,721.00003
37,740
pythondev
help
<@Laila> I don't want to over-engineer this so you might want to see what this does: '<https://example.com/1/test/JWKDkjkjkaeljijdiIJ>'.rsplit('/', 1)
2018-03-07T07:27:47.000276
Patrick
pythondev_help_Patrick_2018-03-07T07:27:47.000276
1,520,407,667.000276
37,741
pythondev
help
<@Dierdre> Do it twice
2018-03-07T07:57:47.000112
Heath
pythondev_help_Heath_2018-03-07T07:57:47.000112
1,520,409,467.000112
37,742
pythondev
help
filter_dict(dict) filter_dict(dict)
2018-03-07T07:58:06.000332
Heath
pythondev_help_Heath_2018-03-07T07:58:06.000332
1,520,409,486.000332
37,743
pythondev
help
Mutation can easily be taken care of, I'm guessing :sweat_smile:
2018-03-07T07:58:34.000461
Heath
pythondev_help_Heath_2018-03-07T07:58:34.000461
1,520,409,514.000461
37,744
pythondev
help
Depends on if you want to. If it's clear that it changes the dict in place, it's ok :slightly_smiling_face:
2018-03-07T07:59:06.000223
Dierdre
pythondev_help_Dierdre_2018-03-07T07:59:06.000223
1,520,409,546.000223
37,745
pythondev
help
Yes. I'm a 100% affirmative of that.
2018-03-07T07:59:29.000313
Heath
pythondev_help_Heath_2018-03-07T07:59:29.000313
1,520,409,569.000313
37,746
pythondev
help
Let me know if doing it twice works for you <@Dierdre>
2018-03-07T08:01:09.000080
Heath
pythondev_help_Heath_2018-03-07T08:01:09.000080
1,520,409,669.00008
37,747
pythondev
help
I does, but I think it would be better if you could improve it so you only need to call it once :stuck_out_tongue:
2018-03-07T08:02:39.000088
Dierdre
pythondev_help_Dierdre_2018-03-07T08:02:39.000088
1,520,409,759.000088
37,748
pythondev
help
<@Patrick> thanks that helped :wink: :taco:
2018-03-07T08:15:47.000266
Laila
pythondev_help_Laila_2018-03-07T08:15:47.000266
1,520,410,547.000266
37,749
pythondev
help
Yeah. Will look into it.
2018-03-07T08:21:17.000175
Heath
pythondev_help_Heath_2018-03-07T08:21:17.000175
1,520,410,877.000175
37,750
pythondev
help
HI , Anyone worked with scrapy ?
2018-03-07T08:24:08.000025
Rosia
pythondev_help_Rosia_2018-03-07T08:24:08.000025
1,520,411,048.000025
37,751
pythondev
help
<@Rosia> if you have a question about it it’s best to just ask
2018-03-07T08:35:14.000324
Zack
pythondev_help_Zack_2018-03-07T08:35:14.000324
1,520,411,714.000324
37,752
pythondev
help
generic question: if i have to choice to create either list or dictionary, which one is should go for faster access to values inside the structure ?
2018-03-07T08:39:08.000291
Refugia
pythondev_help_Refugia_2018-03-07T08:39:08.000291
1,520,411,948.000291
37,753
pythondev
help
depends on what you’re doing.
2018-03-07T08:41:20.000567
Floy
pythondev_help_Floy_2018-03-07T08:41:20.000567
1,520,412,080.000567
37,754
pythondev
help
if you know the key of what you need, then a dict might be better for retrieval
2018-03-07T08:41:39.000309
Floy
pythondev_help_Floy_2018-03-07T08:41:39.000309
1,520,412,099.000309
37,755
pythondev
help
but if you don’t know the location of what item you need, then a list would be better because it can be sorted and searched
2018-03-07T08:42:15.000353
Floy
pythondev_help_Floy_2018-03-07T08:42:15.000353
1,520,412,135.000353
37,756
pythondev
help
a dict is a hash table, and it maintains its order via insertion order in python 3.6+
2018-03-07T08:42:40.000529
Floy
pythondev_help_Floy_2018-03-07T08:42:40.000529
1,520,412,160.000529
37,757
pythondev
help
the answer might also be dependent on how much data you have in it. as <@Floy> said, it’s all going to depend on what you are doing and the expected conditions
2018-03-07T08:45:05.000472
Zack
pythondev_help_Zack_2018-03-07T08:45:05.000472
1,520,412,305.000472
37,758
pythondev
help
honestly in the general case I wouldn’t give much thought to what is faster. write what feels natural, if performance matters, profile
2018-03-07T08:45:37.000414
Zack
pythondev_help_Zack_2018-03-07T08:45:37.000414
1,520,412,337.000414
37,759
pythondev
help
that said, its very helpful to have a knowledge of data structures, the use cases for them and the O-number of the various operations
2018-03-07T08:48:47.000059
Floy
pythondev_help_Floy_2018-03-07T08:48:47.000059
1,520,412,527.000059
37,760
pythondev
help
yup, very true
2018-03-07T08:49:27.000219
Zack
pythondev_help_Zack_2018-03-07T08:49:27.000219
1,520,412,567.000219
37,761
pythondev
help
<@Laila> you can also try this regex if you want: \/(?:.(?!\/))+$
2018-03-07T09:00:21.000250
Patrick
pythondev_help_Patrick_2018-03-07T09:00:21.000250
1,520,413,221.00025
37,762
pythondev
help
i installed flask_sqlalchemy as well, looks like something is up with my pyenv, I can see with pip list that it's installed but the file I run cant. For now I'm just running it outside of the pyenv
2018-03-07T09:03:31.000405
Elisha
pythondev_help_Elisha_2018-03-07T09:03:31.000405
1,520,413,411.000405
37,763
pythondev
help
can I use notify js with flask flash messages?
2018-03-07T09:30:23.000153
Milo
pythondev_help_Milo_2018-03-07T09:30:23.000153
1,520,415,023.000153
37,764
pythondev
help
Probably best to ask in <#C0LN2AD7T|flask>
2018-03-07T09:32:19.000520
Rafael
pythondev_help_Rafael_2018-03-07T09:32:19.000520
1,520,415,139.00052
37,765
pythondev
help
And make the question more generic: “can I use flask flash messages with JavaScript” - since which library is mostly irrelevant
2018-03-07T09:32:54.000388
Rafael
pythondev_help_Rafael_2018-03-07T09:32:54.000388
1,520,415,174.000388
37,766
pythondev
help
cool thanks will do
2018-03-07T09:35:15.000243
Milo
pythondev_help_Milo_2018-03-07T09:35:15.000243
1,520,415,315.000243
37,767
pythondev
help
<@Milo> What are you trying to do?
2018-03-07T10:05:45.000706
Porsha
pythondev_help_Porsha_2018-03-07T10:05:45.000706
1,520,417,145.000706
37,768
pythondev
help
<#C0LN2AD7T|flask> the convo continued over there
2018-03-07T10:09:47.000705
Rafael
pythondev_help_Rafael_2018-03-07T10:09:47.000705
1,520,417,387.000705
37,769
pythondev
help
managed to sort it out. my boss/friend uses this template; <https://github.com/afourmy/flask-gentelella> and on one of the pages there is a button which as an onlick method to invoke the jquery plugin `pnotify` and he wanted me to integrate that somehow. However I simply just removed this, flashed a message in my view ...
2018-03-07T10:10:01.000376
Milo
pythondev_help_Milo_2018-03-07T10:10:01.000376
1,520,417,401.000376
37,770
pythondev
help
whoops <@Rafael> sorry should have mentioned that first!
2018-03-07T10:10:31.000121
Milo
pythondev_help_Milo_2018-03-07T10:10:31.000121
1,520,417,431.000121
37,771
pythondev
help
No worries :) just trying to avoid multiple threads on the same topic :)
2018-03-07T10:11:23.000037
Rafael
pythondev_help_Rafael_2018-03-07T10:11:23.000037
1,520,417,483.000037
37,772
pythondev
help
Does anybody use/used *pylint* before?
2018-03-07T10:55:48.000754
Ashley
pythondev_help_Ashley_2018-03-07T10:55:48.000754
1,520,420,148.000754
37,773
pythondev
help
What do you think of it?
2018-03-07T10:55:53.000109
Ashley
pythondev_help_Ashley_2018-03-07T10:55:53.000109
1,520,420,153.000109
37,774
pythondev
help
I use flake8 and it's usually :thumbsup: (once I change the line limit :trollface: )
2018-03-07T11:00:51.001035
Micki
pythondev_help_Micki_2018-03-07T11:00:51.001035
1,520,420,451.001035
37,775
pythondev
help
:shame:
2018-03-07T11:02:44.000712
Rafael
pythondev_help_Rafael_2018-03-07T11:02:44.000712
1,520,420,564.000712
37,776
pythondev
help
I am trying to connect to my server's mysql db using the following; ``` mysql -u fonz -h <http://xx.xx.xx.xxx|xx.xx.xx.xxx> -p -P 3306 ``` However I keep receiving the error; ``` ERROR 2003 (HY000): Can't connect to MySQL server on '<http://xx.xx.xx.xxx|xx.xx.xx.xxx>' (110) ``` I thought it might have been to do with...
2018-03-07T12:09:22.000657
Milo
pythondev_help_Milo_2018-03-07T12:09:22.000657
1,520,424,562.000657
37,777
pythondev
help
Is 127.0.0.1 the default and you need to explicitly set it? I’m not sure with mysql but it may be worth checking the doc on that
2018-03-07T12:12:29.000608
Rafael
pythondev_help_Rafael_2018-03-07T12:12:29.000608
1,520,424,749.000608
37,778
pythondev
help
I’d highly doubt their default is to listen on all interfaces though
2018-03-07T12:12:43.000175
Rafael
pythondev_help_Rafael_2018-03-07T12:12:43.000175
1,520,424,763.000175
37,779
pythondev
help
I am trying to connect to it externally, so this is virtual server, but I want to be able to connect to it from another pc
2018-03-07T12:13:16.000057
Milo
pythondev_help_Milo_2018-03-07T12:13:16.000057
1,520,424,796.000057
37,780
pythondev
help
Right, so commenting out the line wouldn’t mean it’s accessible elsewhere
2018-03-07T12:13:44.000496
Rafael
pythondev_help_Rafael_2018-03-07T12:13:44.000496
1,520,424,824.000496
37,781
pythondev
help
It would be a huge security risk for the default address to listen on is “all addresses” (0.0.0.0) and you probably need to uncomment that line and list the ip to listen on
2018-03-07T12:14:27.000188
Rafael
pythondev_help_Rafael_2018-03-07T12:14:27.000188
1,520,424,867.000188
37,782
pythondev
help
sorry bit confused, do you mean change `bind-address` to the ip of the server?
2018-03-07T12:15:29.000626
Milo
pythondev_help_Milo_2018-03-07T12:15:29.000626
1,520,424,929.000626
37,783
pythondev
help
Yes
2018-03-07T12:16:50.000688
Rafael
pythondev_help_Rafael_2018-03-07T12:16:50.000688
1,520,425,010.000688
37,784
pythondev
help
Got a restart error with that unfortunately
2018-03-07T12:22:07.000668
Milo
pythondev_help_Milo_2018-03-07T12:22:07.000668
1,520,425,327.000668
37,785
pythondev
help
You may get more users of mysql in <#C3X4T24LB|databases>
2018-03-07T12:29:38.000493
Rafael
pythondev_help_Rafael_2018-03-07T12:29:38.000493
1,520,425,778.000493
37,786
pythondev
help
cool will check it out, thanks <@Rafael> :taco:
2018-03-07T12:32:50.000198
Milo
pythondev_help_Milo_2018-03-07T12:32:50.000198
1,520,425,970.000198
37,787
pythondev
help
I am trying to convert a dataframe to CSV using df.to_csv(file name) . This does not create a file. I am running my code on <http://repl.it|repl.it>
2018-03-07T13:04:00.000220
Roxanna
pythondev_help_Roxanna_2018-03-07T13:04:00.000220
1,520,427,840.00022
37,788
pythondev
help
it won’t. you need to run it on a machine
2018-03-07T13:09:11.000580
Floy
pythondev_help_Floy_2018-03-07T13:09:11.000580
1,520,428,151.00058
37,789
pythondev
help
not a web IDE
2018-03-07T13:09:22.000474
Floy
pythondev_help_Floy_2018-03-07T13:09:22.000474
1,520,428,162.000474
37,790
pythondev
help
``` import io out_buffer = io.StringIO() df.to_csv(out_buffer) out_buffer.seek(0) print(out_buffer.getvalue()) ```
2018-03-07T13:09:45.000765
Rafael
pythondev_help_Rafael_2018-03-07T13:09:45.000765
1,520,428,185.000765
37,791
pythondev
help
If that helps you at least make sure it's running right
2018-03-07T13:09:52.000001
Rafael
pythondev_help_Rafael_2018-03-07T13:09:52.000001
1,520,428,192.000001
37,792
pythondev
help
not a bad idea, writing to a buffer
2018-03-07T13:10:31.000536
Floy
pythondev_help_Floy_2018-03-07T13:10:31.000536
1,520,428,231.000536
37,793
pythondev
help
but still won’t let you write to a file
2018-03-07T13:10:37.000604
Floy
pythondev_help_Floy_2018-03-07T13:10:37.000604
1,520,428,237.000604
37,794
pythondev
help
True, I am just thinking of a workaround to get the data out
2018-03-07T13:10:50.000117
Rafael
pythondev_help_Rafael_2018-03-07T13:10:50.000117
1,520,428,250.000117
37,795
pythondev
help
Is there a module called PYPERCLIP?
2018-03-07T13:16:02.000470
Yukiko
pythondev_help_Yukiko_2018-03-07T13:16:02.000470
1,520,428,562.00047
37,796
pythondev
help
did you look on <https://pypi.python.org>
2018-03-07T13:17:21.000287
Floy
pythondev_help_Floy_2018-03-07T13:17:21.000287
1,520,428,641.000287
37,797
pythondev
help
easy one.. can somebody just tell me why python is complaining about my dictionary? It's just a case of 'obviously my eyeballs are not working today"
2018-03-07T13:24:13.000157
Concha
pythondev_help_Concha_2018-03-07T13:24:13.000157
1,520,429,053.000157
37,798
pythondev
help
can't find a missing comma or colon
2018-03-07T13:24:35.000640
Concha
pythondev_help_Concha_2018-03-07T13:24:35.000640
1,520,429,075.00064
37,799
pythondev
help
I'm just getting a syntax error
2018-03-07T13:24:39.000224
Concha
pythondev_help_Concha_2018-03-07T13:24:39.000224
1,520,429,079.000224
37,800
pythondev
help
i'm going nuts
2018-03-07T13:24:44.000761
Concha
pythondev_help_Concha_2018-03-07T13:24:44.000761
1,520,429,084.000761
37,801
pythondev
help
Can you show us the error?
2018-03-07T13:25:27.000774
Garrett
pythondev_help_Garrett_2018-03-07T13:25:27.000774
1,520,429,127.000774
37,802
pythondev
help
File "C:/Users/davidkotschessa/Documents/TPI Validation/PLUParser.py", line 82 PLUdecoded = { "Register number" : PLU_reg_num, ^ SyntaxError: invalid syntax
2018-03-07T13:25:36.000753
Concha
pythondev_help_Concha_2018-03-07T13:25:36.000753
1,520,429,136.000753
37,803
pythondev
help
Anything on the line before?
2018-03-07T13:25:48.000658
Garrett
pythondev_help_Garrett_2018-03-07T13:25:48.000658
1,520,429,148.000658
37,804
pythondev
help
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
2018-03-07T13:25:55.000095
Concha
pythondev_help_Concha_2018-03-07T13:25:55.000095
1,520,429,155.000095
37,805
pythondev
help
i could give full traceback if you want. i'm just assuming i'm typing something stupid
2018-03-07T13:26:14.000663
Concha
pythondev_help_Concha_2018-03-07T13:26:14.000663
1,520,429,174.000663
37,806
pythondev
help
Ha, no, I meant before `PLUdecoded` in your script
2018-03-07T13:26:22.000833
Garrett
pythondev_help_Garrett_2018-03-07T13:26:22.000833
1,520,429,182.000833
37,807
pythondev
help
oh
2018-03-07T13:26:26.000745
Concha
pythondev_help_Concha_2018-03-07T13:26:26.000745
1,520,429,186.000745
37,808
pythondev
help
ohhhh
2018-03-07T13:26:49.000652
Concha
pythondev_help_Concha_2018-03-07T13:26:49.000652
1,520,429,209.000652
37,809
pythondev
help
:slightly_smiling_face:
2018-03-07T13:26:52.000299
Grazyna
pythondev_help_Grazyna_2018-03-07T13:26:52.000299
1,520,429,212.000299
37,810
pythondev
help
unclosed paren
2018-03-07T13:27:19.000636
Concha
pythondev_help_Concha_2018-03-07T13:27:19.000636
1,520,429,239.000636
37,811
pythondev
help
good golly ms molly i was losing it. thanks
2018-03-07T13:27:36.000731
Concha
pythondev_help_Concha_2018-03-07T13:27:36.000731
1,520,429,256.000731
37,812
pythondev
help
Generally, if Python just points to a variable and says `SyntaxError`, it's something to do with the line before, not the variable itself
2018-03-07T13:27:46.000389
Garrett
pythondev_help_Garrett_2018-03-07T13:27:46.000389
1,520,429,266.000389
37,813
pythondev
help
That's just the first place Python gets back to "normal"
2018-03-07T13:27:57.000419
Garrett
pythondev_help_Garrett_2018-03-07T13:27:57.000419
1,520,429,277.000419
37,814
pythondev
help
yeah. i have had that happen. It's just that the first few times I had definitely typed a few things wrong..fixed.fixed..fixed
2018-03-07T13:28:23.000399
Concha
pythondev_help_Concha_2018-03-07T13:28:23.000399
1,520,429,303.000399
37,815
pythondev
help
ok thanks
2018-03-07T13:28:48.000629
Concha
pythondev_help_Concha_2018-03-07T13:28:48.000629
1,520,429,328.000629
37,816
pythondev
help
np, glad you found it
2018-03-07T13:29:43.000409
Garrett
pythondev_help_Garrett_2018-03-07T13:29:43.000409
1,520,429,383.000409
37,817
pythondev
help
I'm at the point with Python where I am realizing some background knowledge in C or something might have been useful. :smile:
2018-03-07T13:47:35.000164
Concha
pythondev_help_Concha_2018-03-07T13:47:35.000164
1,520,430,455.000164
37,818
pythondev
help
mostly in terms of reading specs
2018-03-07T13:47:41.000598
Concha
pythondev_help_Concha_2018-03-07T13:47:41.000598
1,520,430,461.000598
37,819
pythondev
help
Hmm, a decade into Python, should I finally learn C?
2018-03-07T13:50:32.000130
Garrett
pythondev_help_Garrett_2018-03-07T13:50:32.000130
1,520,430,632.00013
37,820
pythondev
help
What do you guys use for API Documentation ?
2018-03-07T13:53:21.000613
Josephine
pythondev_help_Josephine_2018-03-07T13:53:21.000613
1,520,430,801.000613
37,821
pythondev
help
Like, to document the API?
2018-03-07T13:53:36.000343
Garrett
pythondev_help_Garrett_2018-03-07T13:53:36.000343
1,520,430,816.000343
37,822
pythondev
help
Docstrings, Sphinx (Read the Docs), maybe something like Swagger?
2018-03-07T13:55:04.000956
Garrett
pythondev_help_Garrett_2018-03-07T13:55:04.000956
1,520,430,904.000956
37,823