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
i think documentation says that you use 3 slashes for relative bath and 4? for absolute
2019-01-30T10:56:22.256900
Leida
pythondev_help_Leida_2019-01-30T10:56:22.256900
1,548,845,782.2569
5,421
pythondev
help
so the question should be what is it relative to
2019-01-30T10:56:38.257300
Leida
pythondev_help_Leida_2019-01-30T10:56:38.257300
1,548,845,798.2573
5,422
pythondev
help
or you could just give it absolute path in the first place
2019-01-30T10:56:48.257600
Leida
pythondev_help_Leida_2019-01-30T10:56:48.257600
1,548,845,808.2576
5,423
pythondev
help
So I changed it to the absolute path(well I think this is right). And it created the file for me. Thats so strange. Thanks guys, literally taken me 5 hours just to find the right answer.. How could I create the file in the same directory without using the absolute path?
2019-01-30T11:07:00.257800
Randal
pythondev_help_Randal_2019-01-30T11:07:00.257800
1,548,846,420.2578
5,424
pythondev
help
hi guys
2019-01-30T11:09:49.258400
Sau
pythondev_help_Sau_2019-01-30T11:09:49.258400
1,548,846,589.2584
5,425
pythondev
help
I have a question about rendering the html to image
2019-01-30T11:09:55.258700
Sau
pythondev_help_Sau_2019-01-30T11:09:55.258700
1,548,846,595.2587
5,426
pythondev
help
I got the error of Qimage out of memorty , ruturning the null image
2019-01-30T11:10:12.259200
Sau
pythondev_help_Sau_2019-01-30T11:10:12.259200
1,548,846,612.2592
5,427
pythondev
help
How could I resolve this
2019-01-30T11:10:18.259400
Sau
pythondev_help_Sau_2019-01-30T11:10:18.259400
1,548,846,618.2594
5,428
pythondev
help
Knowing how to ask a good question is a highly invaluable skill that will benefit you greatly in any career. <https://stackoverflow.com/help/how-to-ask> is a good collection of suggestions and strategies to help you structure and phrase your question to make it easier for those here to understand your problem and help ...
2019-01-30T11:11:49.259600
Leana
pythondev_help_Leana_2019-01-30T11:11:49.259600
1,548,846,709.2596
5,429
pythondev
help
<@Sau> Like the bot says, if you can give a little more overview, maybe we can help
2019-01-30T11:18:45.260500
Elene
pythondev_help_Elene_2019-01-30T11:18:45.260500
1,548,847,125.2605
5,430
pythondev
help
None
2019-01-30T11:19:38.260600
Sau
pythondev_help_Sau_2019-01-30T11:19:38.260600
1,548,847,178.2606
5,431
pythondev
help
Hi <@Elene>
2019-01-30T11:19:42.261000
Sau
pythondev_help_Sau_2019-01-30T11:19:42.261000
1,548,847,182.261
5,432
pythondev
help
I have the code
2019-01-30T11:19:45.261200
Sau
pythondev_help_Sau_2019-01-30T11:19:45.261200
1,548,847,185.2612
5,433
pythondev
help
rendering the html to image
2019-01-30T11:19:55.261600
Sau
pythondev_help_Sau_2019-01-30T11:19:55.261600
1,548,847,195.2616
5,434
pythondev
help
however, I got the error saying that Qimage not null
2019-01-30T11:20:02.261900
Sau
pythondev_help_Sau_2019-01-30T11:20:02.261900
1,548,847,202.2619
5,435
pythondev
help
returning the null image
2019-01-30T11:20:07.262100
Sau
pythondev_help_Sau_2019-01-30T11:20:07.262100
1,548,847,207.2621
5,436
pythondev
help
Can you post the error stacktrace
2019-01-30T11:21:04.262400
Clemmie
pythondev_help_Clemmie_2019-01-30T11:21:04.262400
1,548,847,264.2624
5,437
pythondev
help
I would almost certainly use puppeteer for this, via JS or <https://pypi.org/project/pyppeteer/>
2019-01-30T11:23:01.263000
Jonas
pythondev_help_Jonas_2019-01-30T11:23:01.263000
1,548,847,381.263
5,438
pythondev
help
No messing with xvfb and it actually just works :tm:
2019-01-30T11:23:35.263500
Jonas
pythondev_help_Jonas_2019-01-30T11:23:35.263500
1,548,847,415.2635
5,439
pythondev
help
<@Randal> you could give it a unique name and try some find utility to try and find it on your harddrive
2019-01-30T11:39:32.264400
Leida
pythondev_help_Leida_2019-01-30T11:39:32.264400
1,548,848,372.2644
5,440
pythondev
help
if you know where it ends up on your drive could give a hint why it gets there
2019-01-30T11:39:57.265000
Leida
pythondev_help_Leida_2019-01-30T11:39:57.265000
1,548,848,397.265
5,441
pythondev
help
for this `fd` (<https://github.com/sharkdp/fd>) is amazing
2019-01-30T11:48:09.265400
Jonas
pythondev_help_Jonas_2019-01-30T11:48:09.265400
1,548,848,889.2654
5,442
pythondev
help
I'm trying to find a good resource on how to leverage `map` tasks in celery, but nothing I've found gives practical examples. Does anyone have experience with this?
2019-01-30T11:49:54.266400
Harris
pythondev_help_Harris_2019-01-30T11:49:54.266400
1,548,848,994.2664
5,443
pythondev
help
what exactly are you trying to do?
2019-01-30T11:56:36.266600
Hiroko
pythondev_help_Hiroko_2019-01-30T11:56:36.266600
1,548,849,396.2666
5,444
pythondev
help
I’ve used group and chord, but not map
2019-01-30T11:56:41.266900
Hiroko
pythondev_help_Hiroko_2019-01-30T11:56:41.266900
1,548,849,401.2669
5,445
pythondev
help
but the docs are definitely thin for map
2019-01-30T11:57:20.267700
Hiroko
pythondev_help_Hiroko_2019-01-30T11:57:20.267700
1,548,849,440.2677
5,446
pythondev
help
I'm looking for an elegant syntax for creating a task from each result from a previous task
2019-01-30T11:57:39.268100
Harris
pythondev_help_Harris_2019-01-30T11:57:39.268100
1,548,849,459.2681
5,447
pythondev
help
My assumption was that map was used for this purpose
2019-01-30T11:58:15.268900
Harris
pythondev_help_Harris_2019-01-30T11:58:15.268900
1,548,849,495.2689
5,448
pythondev
help
what about chain?
2019-01-30T11:58:17.269000
Hiroko
pythondev_help_Hiroko_2019-01-30T11:58:17.269000
1,548,849,497.269
5,449
pythondev
help
&gt;&gt;&gt;The linked task will be applied with the result of its parent task as the first argument. In the above case where the result was 64, this will result in mul(4, 16).
2019-01-30T11:58:32.269800
Hiroko
pythondev_help_Hiroko_2019-01-30T11:58:32.269800
1,548,849,512.2698
5,450
pythondev
help
chain would create one task from the prior result
2019-01-30T11:58:32.269900
Harris
pythondev_help_Harris_2019-01-30T11:58:32.269900
1,548,849,512.2699
5,451
pythondev
help
I want to create a group of tasks, one for each result
2019-01-30T11:58:55.270500
Harris
pythondev_help_Harris_2019-01-30T11:58:55.270500
1,548,849,535.2705
5,452
pythondev
help
Here comes <@Hiroko> loving chain! Do you have a quick key combo to type that response? :wink:
2019-01-30T11:59:01.270800
Clemmie
pythondev_help_Clemmie_2019-01-30T11:59:01.270800
1,548,849,541.2708
5,453
pythondev
help
I was already in the docs there :smile:
2019-01-30T11:59:40.271400
Hiroko
pythondev_help_Hiroko_2019-01-30T11:59:40.271400
1,548,849,580.2714
5,454
pythondev
help
FWIW, I’ve spent lots of time in the celery docs
2019-01-30T12:00:00.271800
Hiroko
pythondev_help_Hiroko_2019-01-30T12:00:00.271800
1,548,849,600.2718
5,455
pythondev
help
None
2019-01-30T14:18:50.273500
Alvina
pythondev_help_Alvina_2019-01-30T14:18:50.273500
1,548,857,930.2735
5,456
pythondev
help
how can I make a list format like that for a bash command 'export SOMETHING="test" &amp;&amp;'
2019-01-30T14:19:27.274400
Alvina
pythondev_help_Alvina_2019-01-30T14:19:27.274400
1,548,857,967.2744
5,457
pythondev
help
i'm trying to export my PGPASSWORD as a variable right before executing a bash command
2019-01-30T14:20:14.275100
Alvina
pythondev_help_Alvina_2019-01-30T14:20:14.275100
1,548,858,014.2751
5,458
pythondev
help
what are you using to run the command? `subprocess`?
2019-01-30T14:21:09.275500
Carrol
pythondev_help_Carrol_2019-01-30T14:21:09.275500
1,548,858,069.2755
5,459
pythondev
help
None
2019-01-30T14:24:23.275700
Alvina
pythondev_help_Alvina_2019-01-30T14:24:23.275700
1,548,858,263.2757
5,460
pythondev
help
command starts with ['/bin/bash', '-c',]
2019-01-30T14:24:42.276200
Alvina
pythondev_help_Alvina_2019-01-30T14:24:42.276200
1,548,858,282.2762
5,461
pythondev
help
i just don't want to log the PGPASSWORD so I want to build it up in separate lists
2019-01-30T14:25:07.277000
Alvina
pythondev_help_Alvina_2019-01-30T14:25:07.277000
1,548,858,307.277
5,462
pythondev
help
running it as a string works fine with format strings
2019-01-30T14:25:20.277600
Alvina
pythondev_help_Alvina_2019-01-30T14:25:20.277600
1,548,858,320.2776
5,463
pythondev
help
but the other code I have uses the list format for bash commands
2019-01-30T14:25:32.278300
Alvina
pythondev_help_Alvina_2019-01-30T14:25:32.278300
1,548,858,332.2783
5,464
pythondev
help
so it is just for consistency
2019-01-30T14:25:35.278500
Alvina
pythondev_help_Alvina_2019-01-30T14:25:35.278500
1,548,858,335.2785
5,465
pythondev
help
could you just do `os.environ['POSTGRES_PASSWORD']='something'` and then unset it right after?
2019-01-30T14:25:41.278800
Selene
pythondev_help_Selene_2019-01-30T14:25:41.278800
1,548,858,341.2788
5,466
pythondev
help
you can pass a `env` to `Popen` ``` Popen(command, env={'PGPASSWORD': 'supersecret'}) ```
2019-01-30T14:26:03.279100
Carrol
pythondev_help_Carrol_2019-01-30T14:26:03.279100
1,548,858,363.2791
5,467
pythondev
help
okay, even better
2019-01-30T14:26:17.279400
Selene
pythondev_help_Selene_2019-01-30T14:26:17.279400
1,548,858,377.2794
5,468
pythondev
help
oh, wow I didnt even notice that and I literally have it there
2019-01-30T14:26:33.279800
Alvina
pythondev_help_Alvina_2019-01-30T14:26:33.279800
1,548,858,393.2798
5,469
pythondev
help
env=None
2019-01-30T14:26:36.280000
Alvina
pythondev_help_Alvina_2019-01-30T14:26:36.280000
1,548,858,396.28
5,470
pythondev
help
For something like that, I usually move the logic into the query- ```order_query = select([func.sum(Order.row_price), (func.sum(Order.row_price) * .07).label
2019-01-30T14:35:51.280100
Selene
pythondev_help_Selene_2019-01-30T14:35:51.280100
1,548,858,951.2801
5,471
pythondev
help
```
2019-01-30T14:35:56.280300
Selene
pythondev_help_Selene_2019-01-30T14:35:56.280300
1,548,858,956.2803
5,472
pythondev
help
Blah, :slightly_smiling_face: if you want to know more I can share some code examples.
2019-01-30T14:36:41.280500
Selene
pythondev_help_Selene_2019-01-30T14:36:41.280500
1,548,859,001.2805
5,473
pythondev
help
hi all, got another python question. If I'm trying to reach the args in a nested function, would I need to specify an `**args` or `**kargs` in the outer function for the args targeting the inner function to be picked up by that function?
2019-01-30T15:39:12.282200
Granville
pythondev_help_Granville_2019-01-30T15:39:12.282200
1,548,862,752.2822
5,474
pythondev
help
None
2019-01-30T15:43:13.282400
Granville
pythondev_help_Granville_2019-01-30T15:43:13.282400
1,548,862,993.2824
5,475
pythondev
help
so, `**` means you’re unpacking the kwargs into a dict
2019-01-30T15:44:30.283000
Hiroko
pythondev_help_Hiroko_2019-01-30T15:44:30.283000
1,548,863,070.283
5,476
pythondev
help
so, antthing like `func_1(boat, car, some_param=2o378, ...)` anything after `car` that is named will be packed into a `kwarg` dict`
2019-01-30T15:45:24.284200
Hiroko
pythondev_help_Hiroko_2019-01-30T15:45:24.284200
1,548,863,124.2842
5,477
pythondev
help
now, a single * will pack un-named arguments into a tuple
2019-01-30T15:45:48.284800
Hiroko
pythondev_help_Hiroko_2019-01-30T15:45:48.284800
1,548,863,148.2848
5,478
pythondev
help
hmm. I mean, I could do something like this to reach the args of my function2:
2019-01-30T15:58:22.285600
Granville
pythondev_help_Granville_2019-01-30T15:58:22.285600
1,548,863,902.2856
5,479
pythondev
help
None
2019-01-30T15:58:29.285700
Granville
pythondev_help_Granville_2019-01-30T15:58:29.285700
1,548,863,909.2857
5,480
pythondev
help
My actual code has the functions set for one to call another, not exactly the nested way, but the first function changes its output in a way before going into a second function and I don't see a way of modifying the args of that second function without passing the variables thru the first function if that makes sense
2019-01-30T16:01:44.288200
Granville
pythondev_help_Granville_2019-01-30T16:01:44.288200
1,548,864,104.2882
5,481
pythondev
help
Showing your actual code would help.
2019-01-30T16:03:02.288700
Clemmie
pythondev_help_Clemmie_2019-01-30T16:03:02.288700
1,548,864,182.2887
5,482
pythondev
help
It is hard to debug from a stub and an explanation that the actual code is different
2019-01-30T16:04:36.289200
Clemmie
pythondev_help_Clemmie_2019-01-30T16:04:36.289200
1,548,864,276.2892
5,483
pythondev
help
<@Granville> <https://hackernoon.com/python-functions-args-kwargs-5d2d00f09c74>
2019-01-30T16:05:20.289500
Rolando
pythondev_help_Rolando_2019-01-30T16:05:20.289500
1,548,864,320.2895
5,484
pythondev
help
that might help
2019-01-30T16:05:23.289800
Rolando
pythondev_help_Rolando_2019-01-30T16:05:23.289800
1,548,864,323.2898
5,485
pythondev
help
I am cleaning data. My csv file contains company name and website but for some reason there are url in my name column. So i want to print all the urls in the name column. Above code gives me "'float' object has no attribute 'startswith'" error What to do?
2019-01-30T16:13:28.291500
Candi
pythondev_help_Candi_2019-01-30T16:13:28.291500
1,548,864,808.2915
5,486
pythondev
help
For example, I'm trying to target `flag` in the rest_endpoint() from the get_zoningdata(). I have a ton of get requests like this, so if I add a `get_zoningdata(code='', flag=None)` and add `flag` to the return, it's going to get pretty terrible pretty quick overall.
2019-01-30T16:13:41.292100
Granville
pythondev_help_Granville_2019-01-30T16:13:41.292100
1,548,864,821.2921
5,487
pythondev
help
<@Granville> if you know what the flag needs to be then use `return rest_endpoint(rest_endpoint[1]+code, True)` or whatever the flag is. If on the other hand the flag will be passed to `get_zoningdata` then use ``` def get_zoningdata(code='', **kwargs): return rest_endpoint(rest_endpoint[1]+code, **kwargs) ```
2019-01-30T16:21:41.296000
Clemmie
pythondev_help_Clemmie_2019-01-30T16:21:41.296000
1,548,865,301.296
5,488
pythondev
help
<@Clemmie> Thanks. I'll opt for the `**kwargs` way because these functions are part of a module I'm building
2019-01-30T16:23:21.297100
Granville
pythondev_help_Granville_2019-01-30T16:23:21.297100
1,548,865,401.2971
5,489
pythondev
help
sounds good!
2019-01-30T16:24:35.297300
Clemmie
pythondev_help_Clemmie_2019-01-30T16:24:35.297300
1,548,865,475.2973
5,490
pythondev
help
I am trying to edit someone else's code to add something, and I need to understand this particular function that they created. I can't tell what it's doing, except that it's replacing some text with some other text. Could someone explain what is being done here?
2019-01-30T16:25:37.297500
Francesca
pythondev_help_Francesca_2019-01-30T16:25:37.297500
1,548,865,537.2975
5,491
pythondev
help
I am cleaning data. My csv file contains company name and website but for some reason there are url in my name column. So i want to print all the urls in the name column. Above code gives me "'float' object has no attribute 'startswith'" error What to do?
2019-01-30T16:27:44.298400
Candi
pythondev_help_Candi_2019-01-30T16:27:44.298400
1,548,865,664.2984
5,492
pythondev
help
Quick dumb question: If I have a mongodb collection with indexes I guess is faster to run a query (find) on it than in python using a for, isn't it ?
2019-01-30T16:28:09.299100
Roxanne
pythondev_help_Roxanne_2019-01-30T16:28:09.299100
1,548,865,689.2991
5,493
pythondev
help
<@Candi> That is saying that `x` is a float. I would get rid of the `if..startswith` clause and just `print(x)` to actually see what value you are trying to manipulate. You say you expect names and ebsites, but a float is a number…so something is off
2019-01-30T16:30:18.300500
Clemmie
pythondev_help_Clemmie_2019-01-30T16:30:18.300500
1,548,865,818.3005
5,494
pythondev
help
<@Clemmie> print(x) is giving me the name of the companies
2019-01-30T16:33:16.301300
Candi
pythondev_help_Candi_2019-01-30T16:33:16.301300
1,548,865,996.3013
5,495
pythondev
help
Really? there should be at least one that is a number
2019-01-30T16:33:44.301700
Clemmie
pythondev_help_Clemmie_2019-01-30T16:33:44.301700
1,548,866,024.3017
5,496
pythondev
help
Ok, if the names are mostly good you can do `if str(x).startswith('http'):` (You don’t need the true, startswith evaluates as a boolean)
2019-01-30T16:35:05.302800
Clemmie
pythondev_help_Clemmie_2019-01-30T16:35:05.302800
1,548,866,105.3028
5,497
pythondev
help
are all the urls starting with `http` or are some of them `www` and are there some such as `<http://Amazon.com|Amazon.com>, Inc`?
2019-01-30T16:36:36.303400
Sparkle
pythondev_help_Sparkle_2019-01-30T16:36:36.303400
1,548,866,196.3034
5,498
pythondev
help
```if re.search('^(https?|www\.)', string)```
2019-01-30T16:37:09.304100
Sparkle
pythondev_help_Sparkle_2019-01-30T16:37:09.304100
1,548,866,229.3041
5,499
pythondev
help
<@Clemmie> if str(x).startswith('http'): worked thank you
2019-01-30T16:38:39.304700
Candi
pythondev_help_Candi_2019-01-30T16:38:39.304700
1,548,866,319.3047
5,500
pythondev
help
<@Sparkle> yes they are mixed
2019-01-30T16:39:23.305400
Candi
pythondev_help_Candi_2019-01-30T16:39:23.305400
1,548,866,363.3054
5,501
pythondev
help
crm export? lol
2019-01-30T16:39:34.305600
Sparkle
pythondev_help_Sparkle_2019-01-30T16:39:34.305600
1,548,866,374.3056
5,502
pythondev
help
i work with that kind of data every day
2019-01-30T16:39:41.305900
Sparkle
pythondev_help_Sparkle_2019-01-30T16:39:41.305900
1,548,866,381.3059
5,503
pythondev
help
<@Sparkle> can you explain what this means if re.search('^(https?|www\.)', string)
2019-01-30T16:40:39.307400
Candi
pythondev_help_Candi_2019-01-30T16:40:39.307400
1,548,866,439.3074
5,504
pythondev
help
i am beginner
2019-01-30T16:40:50.307700
Candi
pythondev_help_Candi_2019-01-30T16:40:50.307700
1,548,866,450.3077
5,505
pythondev
help
it just means check if the string starts with either `http`, `https` or `www.` the period is escaped because otherwise `.` matches any character but `\.` matches literal period
2019-01-30T16:41:03.308000
Sparkle
pythondev_help_Sparkle_2019-01-30T16:41:03.308000
1,548,866,463.308
5,506
pythondev
help
oh cool
2019-01-30T16:41:36.308500
Candi
pythondev_help_Candi_2019-01-30T16:41:36.308500
1,548,866,496.3085
5,507
pythondev
help
`https?` the `?` makes the `s` conditional - to shorten it from writing out both
2019-01-30T16:42:01.309300
Sparkle
pythondev_help_Sparkle_2019-01-30T16:42:01.309300
1,548,866,521.3093
5,508
pythondev
help
and how to check for urls such as <http://amazon.com|amazon.com> or <http://amazon.uk|amazon.uk>
2019-01-30T16:42:10.309700
Candi
pythondev_help_Candi_2019-01-30T16:42:10.309700
1,548,866,530.3097
5,509
pythondev
help
i mean you can pass a general pattern to hopefully catch most cases - basically `\S+\.[A-Za-z]{2,3}` usually url regex are more robust - but in the interest of not needing to know about all edge cases and just wanting to flag if the string looks like it might be a url - `\S+` means any consecutive non-spaces, then a l...
2019-01-30T16:44:20.311800
Sparkle
pythondev_help_Sparkle_2019-01-30T16:44:20.311800
1,548,866,660.3118
5,510
pythondev
help
REGEX YOU SAY!?!?!?!
2019-01-30T16:44:38.312400
Claudine
pythondev_help_Claudine_2019-01-30T16:44:38.312400
1,548,866,678.3124
5,511
pythondev
help
so even if its `.<http://co.uk|co.uk>` it would still ring true for `non spaced char, followed by 2 or 3` characters
2019-01-30T16:44:43.312700
Sparkle
pythondev_help_Sparkle_2019-01-30T16:44:43.312700
1,548,866,683.3127
5,512
pythondev
help
you could couple both patterns into: ```if re.search('(^(https?|www\.)|\S+\.[A-Za-z]{2,3})', string)``` to check for either of those cases `|` meaning “or”
2019-01-30T16:47:31.313900
Sparkle
pythondev_help_Sparkle_2019-01-30T16:47:31.313900
1,548,866,851.3139
5,513
pythondev
help
wow just 1 statement can check for all the cases thats awesome
2019-01-30T16:52:09.315100
Candi
pythondev_help_Candi_2019-01-30T16:52:09.315100
1,548,867,129.3151
5,514
pythondev
help
I am trying to edit someone else's code to add something, and I need to understand this particular function that they created. I can't tell what it's doing, except that it's replacing some text with some other text. Could someone explain what is being done here?
2019-01-30T16:56:25.315200
Francesca
pythondev_help_Francesca_2019-01-30T16:56:25.315200
1,548,867,385.3152
5,515
pythondev
help
<@Sparkle> after if re.search('(^(https?|www\.)|\S+\.[A-Za-z]{2,3})',x): its giving expected string or bytes-like object error
2019-01-30T17:00:32.316400
Candi
pythondev_help_Candi_2019-01-30T17:00:32.316400
1,548,867,632.3164
5,516
pythondev
help
<@Clemmie>, I'm not seeing a `return` statement with the `**kwargs` parameter as being valid. Should I post the error message separately?
2019-01-30T17:05:19.316900
Granville
pythondev_help_Granville_2019-01-30T17:05:19.316900
1,548,867,919.3169
5,517
pythondev
help
Yeah, that is the easiest way to get more eyes on it
2019-01-30T17:06:12.317100
Clemmie
pythondev_help_Clemmie_2019-01-30T17:06:12.317100
1,548,867,972.3171
5,518
pythondev
help
okay
2019-01-30T17:08:08.317400
Granville
pythondev_help_Granville_2019-01-30T17:08:08.317400
1,548,868,088.3174
5,519
pythondev
help
<@Clemmie>, getting an error here when attempting to return a `**kwargs` arg to pass to another function
2019-01-30T17:11:42.318300
Granville
pythondev_help_Granville_2019-01-30T17:11:42.318300
1,548,868,302.3183
5,520