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
yes
2017-11-09T06:29:02.000253
Georgeann
pythondev_help_Georgeann_2017-11-09T06:29:02.000253
1,510,208,942.000253
99,903
pythondev
help
so one of your columns has data that looks like an array?
2017-11-09T06:29:28.000344
Vada
pythondev_help_Vada_2017-11-09T06:29:28.000344
1,510,208,968.000344
99,904
pythondev
help
<@Georgeann> This. Do this. Don't use `eval`.
2017-11-09T06:31:10.000019
Fabiola
pythondev_help_Fabiola_2017-11-09T06:31:10.000019
1,510,209,070.000019
99,905
pythondev
help
<@Vada> I think json.loads solved my problem
2017-11-09T06:32:07.000010
Georgeann
pythondev_help_Georgeann_2017-11-09T06:32:07.000010
1,510,209,127.00001
99,906
pythondev
help
:+1:
2017-11-09T06:32:34.000025
Vada
pythondev_help_Vada_2017-11-09T06:32:34.000025
1,510,209,154.000025
99,907
pythondev
help
why `eval` is evil?
2017-11-09T06:37:45.000181
Georgeann
pythondev_help_Georgeann_2017-11-09T06:37:45.000181
1,510,209,465.000181
99,908
pythondev
help
Because it is arbitrary code execution
2017-11-09T06:37:55.000050
Vada
pythondev_help_Vada_2017-11-09T06:37:55.000050
1,510,209,475.00005
99,909
pythondev
help
```s = 'os.system("rm -rf /pretend/home/*")'```
2017-11-09T06:38:19.000247
Suellen
pythondev_help_Suellen_2017-11-09T06:38:19.000247
1,510,209,499.000247
99,910
pythondev
help
:slightly_smiling_face:
2017-11-09T06:38:21.000051
Suellen
pythondev_help_Suellen_2017-11-09T06:38:21.000051
1,510,209,501.000051
99,911
pythondev
help
If you don't know what is going into the string you are analysing, someone could inject malicious code without you knowing.
2017-11-09T06:38:41.000216
Vada
pythondev_help_Vada_2017-11-09T06:38:41.000216
1,510,209,521.000216
99,912
pythondev
help
you are analysing CSVs so this is very much the case
2017-11-09T06:38:52.000085
Vada
pythondev_help_Vada_2017-11-09T06:38:52.000085
1,510,209,532.000085
99,913
pythondev
help
Needs an import
2017-11-09T06:39:05.000152
Vada
pythondev_help_Vada_2017-11-09T06:39:05.000152
1,510,209,545.000152
99,914
pythondev
help
<@Georgeann> just so you know, _do not_ actually try the code <@Suellen> just wrote with eval :slightly_smiling_face:
2017-11-09T06:39:25.000182
Vada
pythondev_help_Vada_2017-11-09T06:39:25.000182
1,510,209,565.000182
99,915
pythondev
help
my system will be deleted?
2017-11-09T06:40:04.000245
Georgeann
pythondev_help_Georgeann_2017-11-09T06:40:04.000245
1,510,209,604.000245
99,916
pythondev
help
modified it just in case someone is copypasting stuff into their terminal
2017-11-09T06:40:13.000053
Suellen
pythondev_help_Suellen_2017-11-09T06:40:13.000053
1,510,209,613.000053
99,917
pythondev
help
:stuck_out_tongue:
2017-11-09T06:40:23.000145
Vada
pythondev_help_Vada_2017-11-09T06:40:23.000145
1,510,209,623.000145
99,918
pythondev
help
I was worried for a second that people would get all "Oh what does this do?" and try it
2017-11-09T06:40:39.000263
Vada
pythondev_help_Vada_2017-11-09T06:40:39.000263
1,510,209,639.000263
99,919
pythondev
help
haha, you really want to have a complete example here? :stuck_out_tongue:
2017-11-09T06:40:44.000274
Suellen
pythondev_help_Suellen_2017-11-09T06:40:44.000274
1,510,209,644.000274
99,920
pythondev
help
_for science_
2017-11-09T06:40:54.000063
Vada
pythondev_help_Vada_2017-11-09T06:40:54.000063
1,510,209,654.000063
99,921
pythondev
help
Nah :stuck_out_tongue:
2017-11-09T06:40:56.000301
Vada
pythondev_help_Vada_2017-11-09T06:40:56.000301
1,510,209,656.000301
99,922
pythondev
help
<@Georgeann> yeah the original would delete everything
2017-11-09T06:41:33.000353
Vada
pythondev_help_Vada_2017-11-09T06:41:33.000353
1,510,209,693.000353
99,923
pythondev
help
json.loads parses it as if it is meant to be a json struture, which the example you gave is.
2017-11-09T06:41:48.000137
Vada
pythondev_help_Vada_2017-11-09T06:41:48.000137
1,510,209,708.000137
99,924
pythondev
help
but, if I have windows?
2017-11-09T06:41:56.000245
Georgeann
pythondev_help_Georgeann_2017-11-09T06:41:56.000245
1,510,209,716.000245
99,925
pythondev
help
so you get validation (fails if not an appropriate entry)
2017-11-09T06:42:06.000003
Vada
pythondev_help_Vada_2017-11-09T06:42:06.000003
1,510,209,726.000003
99,926
pythondev
help
and protection against injection :slightly_smiling_face:
2017-11-09T06:42:14.000142
Vada
pythondev_help_Vada_2017-11-09T06:42:14.000142
1,510,209,734.000142
99,927
pythondev
help
<@Georgeann> they could write a windows specific command as well
2017-11-09T06:42:42.000031
Vada
pythondev_help_Vada_2017-11-09T06:42:42.000031
1,510,209,762.000031
99,928
pythondev
help
<@Georgeann> <https://stackoverflow.com/questions/9383740/what-does-pythons-eval-do#9383764> `eval` runs the string as python code. If the string is not written by you, someone could write malicious code and if would be run on your system.
2017-11-09T06:45:19.000209
Fabiola
pythondev_help_Fabiola_2017-11-09T06:45:19.000209
1,510,209,919.000209
99,929
pythondev
help
I used single quotes and it works now ...
2017-11-09T07:53:01.000436
Jeanette
pythondev_help_Jeanette_2017-11-09T07:53:01.000436
1,510,213,981.000436
99,930
pythondev
help
<@Fabiola> :taco: <@Vada> :taco:
2017-11-09T08:04:13.000208
Georgeann
pythondev_help_Georgeann_2017-11-09T08:04:13.000208
1,510,214,653.000208
99,931
pythondev
help
Anyone with experience in making pdf-reports in python? I've tried the rst to pdf route (rst2pdf a hassle and not maintained) and looked into pylatex and reportlab lately, but I have no idea how any of them perform. Any feelings and opinions would be appreciated!
2017-11-09T08:54:09.000359
Scot
pythondev_help_Scot_2017-11-09T08:54:09.000359
1,510,217,649.000359
99,932
pythondev
help
I know there is something to do html -&gt; pdf
2017-11-09T08:55:42.000368
Ciera
pythondev_help_Ciera_2017-11-09T08:55:42.000368
1,510,217,742.000368
99,933
pythondev
help
Like pandoc or similar? Pandoc is nice and all but it does not make for easy customization
2017-11-09T08:56:49.000157
Scot
pythondev_help_Scot_2017-11-09T08:56:49.000157
1,510,217,809.000157
99,934
pythondev
help
<https://github.com/qoda/python-wkhtmltopdf>
2017-11-09T08:56:49.000172
Ciera
pythondev_help_Ciera_2017-11-09T08:56:49.000172
1,510,217,809.000172
99,935
pythondev
help
<https://wkhtmltopdf.org/>
2017-11-09T08:57:06.000138
Ciera
pythondev_help_Ciera_2017-11-09T08:57:06.000138
1,510,217,826.000138
99,936
pythondev
help
Thanks, I'll look into what it can do
2017-11-09T08:58:11.000167
Scot
pythondev_help_Scot_2017-11-09T08:58:11.000167
1,510,217,891.000167
99,937
pythondev
help
I should be able to convert any html to pdf in headless mode. A coworker user it
2017-11-09T08:58:44.000014
Ciera
pythondev_help_Ciera_2017-11-09T08:58:44.000014
1,510,217,924.000014
99,938
pythondev
help
<https://github.com/Kozea/WeasyPrint> is nice too
2017-11-09T09:02:54.000198
Tamekia
pythondev_help_Tamekia_2017-11-09T09:02:54.000198
1,510,218,174.000198
99,939
pythondev
help
I'm a bit worried that by going through html I might lose some of the control of the final pdf, as i experienced with using rst. It was hell getting the desired effect in the pdf from python-&gt;rst-&gt;pdf
2017-11-09T09:08:18.000176
Scot
pythondev_help_Scot_2017-11-09T09:08:18.000176
1,510,218,498.000176
99,940
pythondev
help
I'm not after generating pdf's of webpages which seems to be a highlight of both of these packages
2017-11-09T09:09:29.000140
Scot
pythondev_help_Scot_2017-11-09T09:09:29.000140
1,510,218,569.00014
99,941
pythondev
help
problem is the pdf standard
2017-11-09T09:09:51.000053
Meg
pythondev_help_Meg_2017-11-09T09:09:51.000053
1,510,218,591.000053
99,942
pythondev
help
we use it to generate invoices. We just template them as html
2017-11-09T09:09:53.000184
Ciera
pythondev_help_Ciera_2017-11-09T09:09:53.000184
1,510,218,593.000184
99,943
pythondev
help
its a PITA dumpster fire from beginning to end
2017-11-09T09:09:59.000417
Meg
pythondev_help_Meg_2017-11-09T09:09:59.000417
1,510,218,599.000417
99,944
pythondev
help
<@Meg> Mye, good point
2017-11-09T09:10:20.000315
Scot
pythondev_help_Scot_2017-11-09T09:10:20.000315
1,510,218,620.000315
99,945
pythondev
help
html gave you a lot of control IMO
2017-11-09T09:10:40.000248
Ciera
pythondev_help_Ciera_2017-11-09T09:10:40.000248
1,510,218,640.000248
99,946
pythondev
help
and there is a lot of tools built to generate some
2017-11-09T09:11:16.000697
Ciera
pythondev_help_Ciera_2017-11-09T09:11:16.000697
1,510,218,676.000697
99,947
pythondev
help
<@Scot> I like using pandoc, and these are Python bindings. Not sure if that's useful for you. <https://github.com/bebraw/pypandoc>
2017-11-09T09:11:38.000066
Fabiola
pythondev_help_Fabiola_2017-11-09T09:11:38.000066
1,510,218,698.000066
99,948
pythondev
help
CSS is also supported
2017-11-09T09:11:39.000420
Ciera
pythondev_help_Ciera_2017-11-09T09:11:39.000420
1,510,218,699.00042
99,949
pythondev
help
<@Fabiola> I did use pandoc for my rst conversions but I never quite got the effect I wanted
2017-11-09T09:12:40.000569
Scot
pythondev_help_Scot_2017-11-09T09:12:40.000569
1,510,218,760.000569
99,950
pythondev
help
I think I'll just do some testing with both html and latex and see where I end up. Thank you for all the inputs!
2017-11-09T09:13:09.000475
Scot
pythondev_help_Scot_2017-11-09T09:13:09.000475
1,510,218,789.000475
99,951
pythondev
help
Hi, I'm trying to make script compatible with multiple versions of the application. The newest version adds delete method to one of the classes. So I've created a fallback function that accepts the instance of that class and manually perform the actions. I am thinking of using it this way ``` delete_func = getat...
2017-11-09T09:29:37.000509
Mirian
pythondev_help_Mirian_2017-11-09T09:29:37.000509
1,510,219,777.000509
99,952
pythondev
help
`delete_func(foo)`
2017-11-09T09:32:03.000109
Ciera
pythondev_help_Ciera_2017-11-09T09:32:03.000109
1,510,219,923.000109
99,953
pythondev
help
I believe would work
2017-11-09T09:32:29.000309
Ciera
pythondev_help_Ciera_2017-11-09T09:32:29.000309
1,510,219,949.000309
99,954
pythondev
help
in both cases, right?
2017-11-09T09:32:41.000649
Mirian
pythondev_help_Mirian_2017-11-09T09:32:41.000649
1,510,219,961.000649
99,955
pythondev
help
if `self` is the first arg yeah
2017-11-09T09:32:53.000335
Ciera
pythondev_help_Ciera_2017-11-09T09:32:53.000335
1,510,219,973.000335
99,956
pythondev
help
actually not, when the method is found it complains that it `takes 1 positional argument but 2 were given`
2017-11-09T09:33:44.000295
Mirian
pythondev_help_Mirian_2017-11-09T09:33:44.000295
1,510,220,024.000295
99,957
pythondev
help
but works for the fallback function
2017-11-09T09:33:59.000713
Mirian
pythondev_help_Mirian_2017-11-09T09:33:59.000713
1,510,220,039.000713
99,958
pythondev
help
hmm yeah my bad
2017-11-09T09:34:30.000276
Ciera
pythondev_help_Ciera_2017-11-09T09:34:30.000276
1,510,220,070.000276
99,959
pythondev
help
`_fallback_delete_function` is not part of the class ?
2017-11-09T09:34:45.000185
Ciera
pythondev_help_Ciera_2017-11-09T09:34:45.000185
1,510,220,085.000185
99,960
pythondev
help
pure function with one argument
2017-11-09T09:35:01.000566
Mirian
pythondev_help_Mirian_2017-11-09T09:35:01.000566
1,510,220,101.000566
99,961
pythondev
help
the lazy way would be `delete_func(instance=foo)` and in `delete` just discard `instance`
2017-11-09T09:35:44.000073
Ciera
pythondev_help_Ciera_2017-11-09T09:35:44.000073
1,510,220,144.000073
99,962
pythondev
help
of do an `if` / `else` with `delete_func(foo)` `delete_foo()` depending of the case
2017-11-09T09:36:27.000093
Ciera
pythondev_help_Ciera_2017-11-09T09:36:27.000093
1,510,220,187.000093
99,963
pythondev
help
I'd rather go with the second option, because it would not require changes in that class
2017-11-09T09:37:02.000819
Mirian
pythondev_help_Mirian_2017-11-09T09:37:02.000819
1,510,220,222.000819
99,964
pythondev
help
thanks for the help <@Ciera> :taco:
2017-11-09T09:37:14.000462
Mirian
pythondev_help_Mirian_2017-11-09T09:37:14.000462
1,510,220,234.000462
99,965
pythondev
help
thanks :slightly_smiling_face:
2017-11-09T09:37:46.000347
Ciera
pythondev_help_Ciera_2017-11-09T09:37:46.000347
1,510,220,266.000347
99,966
pythondev
help
<@Mirian> &amp; <@Ciera> Could wrap that in a `try: ... except AttributeError: ...` too?
2017-11-09T09:47:50.000101
Fabiola
pythondev_help_Fabiola_2017-11-09T09:47:50.000101
1,510,220,870.000101
99,967
pythondev
help
yeah. Even more pythonic <@Fabiola> :taco:
2017-11-09T09:48:33.000409
Ciera
pythondev_help_Ciera_2017-11-09T09:48:33.000409
1,510,220,913.000409
99,968
pythondev
help
thanks :slightly_smiling_face: :taco: <@Fabiola>
2017-11-09T09:48:58.000443
Mirian
pythondev_help_Mirian_2017-11-09T09:48:58.000443
1,510,220,938.000443
99,969
pythondev
help
Is there a way to take a string representing a date and convert it into an output like you would with strftime without first having to call strptime to then pass to strftime?
2017-11-09T12:31:51.000119
Lory
pythondev_help_Lory_2017-11-09T12:31:51.000119
1,510,230,711.000119
99,970
pythondev
help
...regex?
2017-11-09T12:34:35.000706
Frieda
pythondev_help_Frieda_2017-11-09T12:34:35.000706
1,510,230,875.000706
99,971
pythondev
help
<https://blog.codinghorror.com/regular-expressions-now-you-have-two-problems/>
2017-11-09T12:38:07.000506
Antionette
pythondev_help_Antionette_2017-11-09T12:38:07.000506
1,510,231,087.000506
99,972
pythondev
help
Mostly kidding, it could work
2017-11-09T12:38:47.000184
Antionette
pythondev_help_Antionette_2017-11-09T12:38:47.000184
1,510,231,127.000184
99,973
pythondev
help
Although is there any reason you don't want to parse it into a date first?
2017-11-09T12:38:59.000058
Antionette
pythondev_help_Antionette_2017-11-09T12:38:59.000058
1,510,231,139.000058
99,974
pythondev
help
yeah, i'd say to just make it a date first
2017-11-09T12:39:35.000726
Frieda
pythondev_help_Frieda_2017-11-09T12:39:35.000726
1,510,231,175.000726
99,975
pythondev
help
<@Lory> inspiration or solution. <http://arrow.readthedocs.io/en/latest/#quickstart>
2017-11-09T13:42:56.000331
Seema
pythondev_help_Seema_2017-11-09T13:42:56.000331
1,510,234,976.000331
99,976
pythondev
help
How to invite new members to this group?
2017-11-09T13:45:40.000198
Carter
pythondev_help_Carter_2017-11-09T13:45:40.000198
1,510,235,140.000198
99,977
pythondev
help
<https://pyslackers.com/slack/>
2017-11-09T13:48:38.000249
Meg
pythondev_help_Meg_2017-11-09T13:48:38.000249
1,510,235,318.000249
99,978
pythondev
help
Thanks <@Meg>
2017-11-09T13:52:43.000605
Carter
pythondev_help_Carter_2017-11-09T13:52:43.000605
1,510,235,563.000605
99,979
pythondev
help
Thanks for the help guys, just sat back down with the problem, I think I am going to take kenneth's suggestion...not sure how I didn't think of using regex's
2017-11-09T14:14:59.000372
Lory
pythondev_help_Lory_2017-11-09T14:14:59.000372
1,510,236,899.000372
99,980
pythondev
help
I have the following list generator and form somewhere a list like ` [[], ''],` is being added
2017-11-09T22:45:38.000172
Jazmine
pythondev_help_Jazmine_2017-11-09T22:45:38.000172
1,510,267,538.000172
99,981
pythondev
help
Fixed it with: ``` if current_qa and current_ans: current_qa_list[1].append([current_qa, current_ans]) ```
2017-11-09T22:56:22.000027
Jazmine
pythondev_help_Jazmine_2017-11-09T22:56:22.000027
1,510,268,182.000027
99,982
pythondev
help
Hello, Let me ask you one question about ProcessPoolExecutor def perform_task(atom): time_consuming_task… def main(): atom_list = [,,,,,] #around 10000 items list with ProcessPoolExecutor(max_workers=12) as executor: executor.map(perform_task, atom_list) I’d like to handling over 10,000 task i...
2017-11-10T03:27:12.000296
Usha
pythondev_help_Usha_2017-11-10T03:27:12.000296
1,510,284,432.000296
99,983
pythondev
help
<@Hubert> if you have 10k processes then you're doing something wrong. In the snipped above you have `max_workers=12` which means there can be only 12 processes
2017-11-10T03:30:58.000334
Collette
pythondev_help_Collette_2017-11-10T03:30:58.000334
1,510,284,658.000334
99,984
pythondev
help
each process is going to perform the task on 10000/12 items from the list
2017-11-10T03:31:22.000166
Collette
pythondev_help_Collette_2017-11-10T03:31:22.000166
1,510,284,682.000166
99,985
pythondev
help
Can you show us the exact body of `perform_task` function?
2017-11-10T03:31:45.000290
Collette
pythondev_help_Collette_2017-11-10T03:31:45.000290
1,510,284,705.00029
99,986
pythondev
help
Thanks <@Collette> . perform_task is performing some machine learnings about bio informatics.. def perform_task(atom): 19 # Initiate virtual screening pipeline 20 21 f_exist = os.path.isfile(‘dock/%s_docked.csv’%atom) 22 if (f_exist == True): 23 print(‘file already exist :’,atom) 24 e...
2017-11-10T03:36:01.000002
Usha
pythondev_help_Usha_2017-11-10T03:36:01.000002
1,510,284,961.000002
99,987
pythondev
help
even though it’s defined as max_workers=12 , there are a lot of python process in htop command in ubuntu.
2017-11-10T03:38:08.000015
Usha
pythondev_help_Usha_2017-11-10T03:38:08.000015
1,510,285,088.000015
99,988
pythondev
help
can you use three backticks ``` around your code
2017-11-10T03:38:40.000044
Cammy
pythondev_help_Cammy_2017-11-10T03:38:40.000044
1,510,285,120.000044
99,989
pythondev
help
``` def perform_task(atom): # Initiate virtual screening pipeline using 8 CPUs f_exist = os.path.isfile('dock/%s_docked.csv'%atom) if (f_exist == True): print('file already exist :',atom) else: pipeline = vs() # # Load ligand from a mol2 file pipeline.load_ligands('pd...
2017-11-10T03:41:37.000037
Usha
pythondev_help_Usha_2017-11-10T03:41:37.000037
1,510,285,297.000037
99,990
pythondev
help
<@Hubert> lots of system tools are written in python in ubuntu, are you sure all python processes you see belong to your program?
2017-11-10T04:38:27.000090
Collette
pythondev_help_Collette_2017-11-10T04:38:27.000090
1,510,288,707.00009
99,991
pythondev
help
Also, how `atom_list` looks like?
2017-11-10T04:38:56.000028
Collette
pythondev_help_Collette_2017-11-10T04:38:56.000028
1,510,288,736.000028
99,992
pythondev
help
I have been trying to extract data from a file since a few days but am always failing. If some one helped me figure it out it'd be cool.
2017-11-10T04:49:55.000239
Jazmine
pythondev_help_Jazmine_2017-11-10T04:49:55.000239
1,510,289,395.000239
99,993
pythondev
help
I want to get question and options in one part and answer in another part. All the data has to be grouped by year maybe in dicts
2017-11-10T04:51:07.000288
Jazmine
pythondev_help_Jazmine_2017-11-10T04:51:07.000288
1,510,289,467.000288
99,994
pythondev
help
Here is the code, I tried
2017-11-10T04:51:16.000143
Jazmine
pythondev_help_Jazmine_2017-11-10T04:51:16.000143
1,510,289,476.000143
99,995
pythondev
help
The data is full of errors
2017-11-10T04:53:29.000293
Jazmine
pythondev_help_Jazmine_2017-11-10T04:53:29.000293
1,510,289,609.000293
99,996
pythondev
help
My code is too buggy
2017-11-10T04:53:38.000530
Jazmine
pythondev_help_Jazmine_2017-11-10T04:53:38.000530
1,510,289,618.00053
99,997
pythondev
help
<@Collette> as you said, external tools are called from python.. I am also guessing the root cause is from them.
2017-11-10T05:21:37.000142
Usha
pythondev_help_Usha_2017-11-10T05:21:37.000142
1,510,291,297.000142
99,998
pythondev
help
<@Hubert> the root cause of what?
2017-11-10T05:30:05.000149
Collette
pythondev_help_Collette_2017-11-10T05:30:05.000149
1,510,291,805.000149
99,999
pythondev
help
I mean memory consumption
2017-11-10T05:30:57.000296
Usha
pythondev_help_Usha_2017-11-10T05:30:57.000296
1,510,291,857.000296
100,000
pythondev
help
atom_list is just the list of string.
2017-11-10T05:31:40.000041
Usha
pythondev_help_Usha_2017-11-10T05:31:40.000041
1,510,291,900.000041
100,001
pythondev
help
Hey people - Sorry for the noob question. I just want to make sure I'm on the right path. I have a bunch of small scripts that read from CSV, and enter into a sqlite database. My end goal here is a website (on a local network) that is dashboard style key performance indicators - So I have all the data that I can retrie...
2017-11-10T09:16:35.000230
Blanche
pythondev_help_Blanche_2017-11-10T09:16:35.000230
1,510,305,395.00023
100,002