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 not sure | 2017-12-16T18:26:45.000031 | Myong | pythondev_help_Myong_2017-12-16T18:26:45.000031 | 1,513,448,805.000031 | 104,303 |
pythondev | help | This one matches everything except the string on the end it gives nothing
`re.findall('(\[.*?\])|(\].*?)', l[0])` | 2017-12-16T18:34:50.000050 | Myong | pythondev_help_Myong_2017-12-16T18:34:50.000050 | 1,513,449,290.00005 | 104,304 |
pythondev | help | Just need to figure out what to put instead of `|` to match the other string on the end | 2017-12-16T18:36:42.000028 | Myong | pythondev_help_Myong_2017-12-16T18:36:42.000028 | 1,513,449,402.000028 | 104,305 |
pythondev | help | Will the string always be in the same format? | 2017-12-16T18:38:01.000022 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:38:01.000022 | 1,513,449,481.000022 | 104,306 |
pythondev | help | `r"\[\w{3}\-\w{2}\]\[\w\]\w+"` | 2017-12-16T18:39:05.000002 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:39:05.000002 | 1,513,449,545.000002 | 104,307 |
pythondev | help | The thing about it is this is a type | 2017-12-16T18:40:45.000041 | Myong | pythondev_help_Myong_2017-12-16T18:40:45.000041 | 1,513,449,645.000041 | 104,308 |
pythondev | help | so typo | 2017-12-16T18:40:51.000054 | Myong | pythondev_help_Myong_2017-12-16T18:40:51.000054 | 1,513,449,651.000054 | 104,309 |
pythondev | help | so if its in the correct format I dont need to touch it | 2017-12-16T18:41:00.000009 | Myong | pythondev_help_Myong_2017-12-16T18:41:00.000009 | 1,513,449,660.000009 | 104,310 |
pythondev | help | I need to separate them | 2017-12-16T18:41:34.000055 | Myong | pythondev_help_Myong_2017-12-16T18:41:34.000055 | 1,513,449,694.000055 | 104,311 |
pythondev | help | You want them as separate groups? | 2017-12-16T18:41:45.000066 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:41:45.000066 | 1,513,449,705.000066 | 104,312 |
pythondev | help | yeah | 2017-12-16T18:41:55.000011 | Myong | pythondev_help_Myong_2017-12-16T18:41:55.000011 | 1,513,449,715.000011 | 104,313 |
pythondev | help | `\[.*?\]|\]` this works | 2017-12-16T18:42:08.000012 | Myong | pythondev_help_Myong_2017-12-16T18:42:08.000012 | 1,513,449,728.000012 | 104,314 |
pythondev | help | in `re.findall` | 2017-12-16T18:42:15.000025 | Myong | pythondev_help_Myong_2017-12-16T18:42:15.000025 | 1,513,449,735.000025 | 104,315 |
pythondev | help | and is this the entire string? `'[usa-az][h]paypal'` | 2017-12-16T18:42:15.000033 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:42:15.000033 | 1,513,449,735.000033 | 104,316 |
pythondev | help | Yeah that will be the input | 2017-12-16T18:42:21.000045 | Myong | pythondev_help_Myong_2017-12-16T18:42:21.000045 | 1,513,449,741.000045 | 104,317 |
pythondev | help | with the quote marks? | 2017-12-16T18:42:29.000021 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:42:29.000021 | 1,513,449,749.000021 | 104,318 |
pythondev | help | no quotes sorry | 2017-12-16T18:42:35.000067 | Myong | pythondev_help_Myong_2017-12-16T18:42:35.000067 | 1,513,449,755.000067 | 104,319 |
pythondev | help | `\[.*?\]` finds the two strings with brackets | 2017-12-16T18:42:51.000045 | Myong | pythondev_help_Myong_2017-12-16T18:42:51.000045 | 1,513,449,771.000045 | 104,320 |
pythondev | help | so it returns `['[usa-az]', '[h]']` | 2017-12-16T18:43:01.000004 | Myong | pythondev_help_Myong_2017-12-16T18:43:01.000004 | 1,513,449,781.000004 | 104,321 |
pythondev | help | oops | 2017-12-16T18:43:10.000030 | Myong | pythondev_help_Myong_2017-12-16T18:43:10.000030 | 1,513,449,790.00003 | 104,322 |
pythondev | help | And what do you want it to return? | 2017-12-16T18:44:00.000049 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:44:00.000049 | 1,513,449,840.000049 | 104,323 |
pythondev | help | But I cant figure out how to find the string on the end so basically `]paypal` bit dont include the closing bracket | 2017-12-16T18:44:12.000025 | Myong | pythondev_help_Myong_2017-12-16T18:44:12.000025 | 1,513,449,852.000025 | 104,324 |
pythondev | help | I want the two previous strings plus `paypal` | 2017-12-16T18:44:23.000010 | Myong | pythondev_help_Myong_2017-12-16T18:44:23.000010 | 1,513,449,863.00001 | 104,325 |
pythondev | help | `['[usa-az]', '[h]', 'paypal']` | 2017-12-16T18:44:45.000024 | Myong | pythondev_help_Myong_2017-12-16T18:44:45.000024 | 1,513,449,885.000024 | 104,326 |
pythondev | help | `(?P<group_1>\[\w{3}\-\w{2}\])\[\w\](?P<group_2>\w+$)` | 2017-12-16T18:45:15.000063 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:45:15.000063 | 1,513,449,915.000063 | 104,327 |
pythondev | help | doesn't find the `[h]` | 2017-12-16T18:45:57.000025 | Myong | pythondev_help_Myong_2017-12-16T18:45:57.000025 | 1,513,449,957.000025 | 104,328 |
pythondev | help | I thought you said you didnt want the h? | 2017-12-16T18:46:10.000053 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:46:10.000053 | 1,513,449,970.000053 | 104,329 |
pythondev | help | oh ok sorry i just saw | 2017-12-16T18:46:22.000053 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:46:22.000053 | 1,513,449,982.000053 | 104,330 |
pythondev | help | No worries | 2017-12-16T18:46:26.000010 | Myong | pythondev_help_Myong_2017-12-16T18:46:26.000010 | 1,513,449,986.00001 | 104,331 |
pythondev | help | The only thing though, not sure if it will always be 3 character a dash then two characters, what can I use to match any number of character? Just `\w` | 2017-12-16T18:47:12.000001 | Myong | pythondev_help_Myong_2017-12-16T18:47:12.000001 | 1,513,450,032.000001 | 104,332 |
pythondev | help | ? | 2017-12-16T18:47:19.000012 | Myong | pythondev_help_Myong_2017-12-16T18:47:19.000012 | 1,513,450,039.000012 | 104,333 |
pythondev | help | Or + | 2017-12-16T18:48:02.000099 | Myong | pythondev_help_Myong_2017-12-16T18:48:02.000099 | 1,513,450,082.000099 | 104,334 |
pythondev | help | What are the possible combinations? | 2017-12-16T18:48:02.000112 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:48:02.000112 | 1,513,450,082.000112 | 104,335 |
pythondev | help | This should work | 2017-12-16T18:48:33.000028 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:48:33.000028 | 1,513,450,113.000028 | 104,336 |
pythondev | help | `r"(?P<group_1>\[\w{1,3}\-\w{1,3}\])(?P<group_2>\[\w\])(?P<group_3>\w+$)"` | 2017-12-16T18:48:50.000052 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:48:50.000052 | 1,513,450,130.000052 | 104,337 |
pythondev | help | Got it! | 2017-12-16T18:49:12.000024 | Myong | pythondev_help_Myong_2017-12-16T18:49:12.000024 | 1,513,450,152.000024 | 104,338 |
pythondev | help | ```import re
test_str = "[usa-az][h]paypal"
regex = r"(?P<group_1>\[\w{1,3}\-\w{1,3}\])(?P<group_2>\[\w\])(?P<group_3>\w+$)"
compiled_r = re.compile(regex)
match = re.search(compiled_r, test_str)
if match:
print(match["group_1"])
print(match["group_2"])
print(match["group_3"])``` | 2017-12-16T18:51:18.000054 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:51:18.000054 | 1,513,450,278.000054 | 104,339 |
pythondev | help | Worked for me | 2017-12-16T18:51:46.000005 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:51:46.000005 | 1,513,450,306.000005 | 104,340 |
pythondev | help | Yep same here | 2017-12-16T18:51:51.000055 | Myong | pythondev_help_Myong_2017-12-16T18:51:51.000055 | 1,513,450,311.000055 | 104,341 |
pythondev | help | woo | 2017-12-16T18:51:57.000015 | Corrinne | pythondev_help_Corrinne_2017-12-16T18:51:57.000015 | 1,513,450,317.000015 | 104,342 |
pythondev | help | There are so many ways people could make mistakes in the title this is gonna be fun | 2017-12-16T19:04:53.000014 | Myong | pythondev_help_Myong_2017-12-16T19:04:53.000014 | 1,513,451,093.000014 | 104,343 |
pythondev | help | how do you mean? | 2017-12-16T19:05:40.000066 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:05:40.000066 | 1,513,451,140.000066 | 104,344 |
pythondev | help | So basically the title format is `[location]` then `[h]` then whatever else followed by `[w]` and other stuf | 2017-12-16T19:06:20.000085 | Myong | pythondev_help_Myong_2017-12-16T19:06:20.000085 | 1,513,451,180.000085 | 104,345 |
pythondev | help | But in some cases people do or dont include spaces | 2017-12-16T19:06:29.000041 | Myong | pythondev_help_Myong_2017-12-16T19:06:29.000041 | 1,513,451,189.000041 | 104,346 |
pythondev | help | And it can be mixed and matches | 2017-12-16T19:06:43.000039 | Myong | pythondev_help_Myong_2017-12-16T19:06:43.000039 | 1,513,451,203.000039 | 104,347 |
pythondev | help | matched | 2017-12-16T19:06:46.000037 | Myong | pythondev_help_Myong_2017-12-16T19:06:46.000037 | 1,513,451,206.000037 | 104,348 |
pythondev | help | Where is the data coming from? | 2017-12-16T19:06:51.000010 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:06:51.000010 | 1,513,451,211.00001 | 104,349 |
pythondev | help | Reddit | 2017-12-16T19:06:55.000035 | Myong | pythondev_help_Myong_2017-12-16T19:06:55.000035 | 1,513,451,215.000035 | 104,350 |
pythondev | help | It's submission titles | 2017-12-16T19:06:59.000043 | Myong | pythondev_help_Myong_2017-12-16T19:06:59.000043 | 1,513,451,219.000043 | 104,351 |
pythondev | help | Just building a notifier for /r/hardwareswap | 2017-12-16T19:07:12.000038 | Myong | pythondev_help_Myong_2017-12-16T19:07:12.000038 | 1,513,451,232.000038 | 104,352 |
pythondev | help | It works but cant deal with badly formatted titles | 2017-12-16T19:07:24.000001 | Myong | pythondev_help_Myong_2017-12-16T19:07:24.000001 | 1,513,451,244.000001 | 104,353 |
pythondev | help | hmm, probably better to make the regex more flexible | 2017-12-16T19:07:36.000036 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:07:36.000036 | 1,513,451,256.000036 | 104,354 |
pythondev | help | Yeah | 2017-12-16T19:07:44.000026 | Myong | pythondev_help_Myong_2017-12-16T19:07:44.000026 | 1,513,451,264.000026 | 104,355 |
pythondev | help | are all of the submissions inside square brackets? | 2017-12-16T19:07:49.000037 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:07:49.000037 | 1,513,451,269.000037 | 104,356 |
pythondev | help | Yes they have to be | 2017-12-16T19:07:54.000088 | Myong | pythondev_help_Myong_2017-12-16T19:07:54.000088 | 1,513,451,274.000088 | 104,357 |
pythondev | help | ok that helps | 2017-12-16T19:08:00.000057 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:08:00.000057 | 1,513,451,280.000057 | 104,358 |
pythondev | help | so if they're not they get taken down and im not worried about that | 2017-12-16T19:08:02.000062 | Myong | pythondev_help_Myong_2017-12-16T19:08:02.000062 | 1,513,451,282.000062 | 104,359 |
pythondev | help | So the reason I'm doing this is to check if the item you are looking for is being sold or is wanted | 2017-12-16T19:08:27.000002 | Myong | pythondev_help_Myong_2017-12-16T19:08:27.000002 | 1,513,451,307.000002 | 104,360 |
pythondev | help | I only want stuff being sold | 2017-12-16T19:08:31.000022 | Myong | pythondev_help_Myong_2017-12-16T19:08:31.000022 | 1,513,451,311.000022 | 104,361 |
pythondev | help | So I check if the index of the item is between the indexes of [h] and [w] that way I know it's being sold | 2017-12-16T19:08:57.000055 | Myong | pythondev_help_Myong_2017-12-16T19:08:57.000055 | 1,513,451,337.000055 | 104,362 |
pythondev | help | I see | 2017-12-16T19:09:11.000018 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:09:11.000018 | 1,513,451,351.000018 | 104,363 |
pythondev | help | It only becomes an issue if the item is in the format like `[h]1070 gtx[w]...` | 2017-12-16T19:09:38.000074 | Myong | pythondev_help_Myong_2017-12-16T19:09:38.000074 | 1,513,451,378.000074 | 104,364 |
pythondev | help | But there's no kind of validation | 2017-12-16T19:09:39.000017 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:09:39.000017 | 1,513,451,379.000017 | 104,365 |
pythondev | help | Still think there's a way with regex to filter it | 2017-12-16T19:10:07.000007 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:10:07.000007 | 1,513,451,407.000007 | 104,366 |
pythondev | help | Yeah | 2017-12-16T19:10:16.000088 | Myong | pythondev_help_Myong_2017-12-16T19:10:16.000088 | 1,513,451,416.000088 | 104,367 |
pythondev | help | I can always just grab the item the person wants | 2017-12-16T19:10:24.000059 | Myong | pythondev_help_Myong_2017-12-16T19:10:24.000059 | 1,513,451,424.000059 | 104,368 |
pythondev | help | and see if the starting point of the string is between the start of the want and have tag | 2017-12-16T19:10:35.000040 | Myong | pythondev_help_Myong_2017-12-16T19:10:35.000040 | 1,513,451,435.00004 | 104,369 |
pythondev | help | that might be easier | 2017-12-16T19:10:38.000053 | Myong | pythondev_help_Myong_2017-12-16T19:10:38.000053 | 1,513,451,438.000053 | 104,370 |
pythondev | help | Lol | 2017-12-16T19:10:40.000017 | Myong | pythondev_help_Myong_2017-12-16T19:10:40.000017 | 1,513,451,440.000017 | 104,371 |
pythondev | help | Instead of splitting it up | 2017-12-16T19:11:25.000010 | Myong | pythondev_help_Myong_2017-12-16T19:11:25.000010 | 1,513,451,485.00001 | 104,372 |
pythondev | help | But then I have to check if the string occurs both before and after, but in that case it doesn't matter I can just grab the first occurence | 2017-12-16T19:11:55.000029 | Myong | pythondev_help_Myong_2017-12-16T19:11:55.000029 | 1,513,451,515.000029 | 104,373 |
pythondev | help | I'm not sure how the input is received | 2017-12-16T19:12:48.000069 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:12:48.000069 | 1,513,451,568.000069 | 104,374 |
pythondev | help | <https://stackoverflow.com/questions/32430620/python-string-search-starting-from-a-specific-position-within-a-string> | 2017-12-16T19:12:55.000083 | Myong | pythondev_help_Myong_2017-12-16T19:12:55.000083 | 1,513,451,575.000083 | 104,375 |
pythondev | help | It's received as a simple string | 2017-12-16T19:13:02.000046 | Myong | pythondev_help_Myong_2017-12-16T19:13:02.000046 | 1,513,451,582.000046 | 104,376 |
pythondev | help | I split it | 2017-12-16T19:13:05.000019 | Myong | pythondev_help_Myong_2017-12-16T19:13:05.000019 | 1,513,451,585.000019 | 104,377 |
pythondev | help | On the r/hardware site now | 2017-12-16T19:13:05.000051 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:13:05.000051 | 1,513,451,585.000051 | 104,378 |
pythondev | help | Ok so people just put it in the title | 2017-12-16T19:13:53.000045 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:13:53.000045 | 1,513,451,633.000045 | 104,379 |
pythondev | help | `[USA-FL] [H] Paypal [W] Dell u2718q, Cablemods (black and white) for EVGA PSU` | 2017-12-16T19:13:58.000002 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:13:58.000002 | 1,513,451,638.000002 | 104,380 |
pythondev | help | Yup | 2017-12-16T19:14:04.000034 | Myong | pythondev_help_Myong_2017-12-16T19:14:04.000034 | 1,513,451,644.000034 | 104,381 |
pythondev | help | Ok the good thing is they all look formatted in a similar way | 2017-12-16T19:14:50.000054 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:14:50.000054 | 1,513,451,690.000054 | 104,382 |
pythondev | help | Yeah the only thing is the spaces | 2017-12-16T19:15:08.000037 | Myong | pythondev_help_Myong_2017-12-16T19:15:08.000037 | 1,513,451,708.000037 | 104,383 |
pythondev | help | does the [h] mean payment method right? | 2017-12-16T19:17:53.000024 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:17:53.000024 | 1,513,451,873.000024 | 104,384 |
pythondev | help | It differentiates between have and want | 2017-12-16T19:18:14.000072 | Myong | pythondev_help_Myong_2017-12-16T19:18:14.000072 | 1,513,451,894.000072 | 104,385 |
pythondev | help | they all seem to be formatted like `[h]paypal` | 2017-12-16T19:18:32.000049 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:18:32.000049 | 1,513,451,912.000049 | 104,386 |
pythondev | help | or in this case `[H] Paypal, Local Cash [W] Used 1080/1080Ti` | 2017-12-16T19:19:14.000010 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:19:14.000010 | 1,513,451,954.00001 | 104,387 |
pythondev | help | This should take care of any white spaces.. | 2017-12-16T19:39:52.000078 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:39:52.000078 | 1,513,453,192.000078 | 104,388 |
pythondev | help | ```import re
test_str = "[USA-MD] [H] Paypal [W] Bluetooth mouse"
regex = r"\[(?P<country>\w+)\-(?P<state>\w+)\]\s?\[H\](?P<payment_methods>.*)\[W\]\s?(?P<wants>.*$)"
compiled_r = re.compile(regex)
match = re.search(compiled_r, test_str)
if match:
print(f"Country: {match['country']}")
... | 2017-12-16T19:39:57.000043 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:39:57.000043 | 1,513,453,197.000043 | 104,389 |
pythondev | help | Thank you | 2017-12-16T19:41:32.000033 | Myong | pythondev_help_Myong_2017-12-16T19:41:32.000033 | 1,513,453,292.000033 | 104,390 |
pythondev | help | No worries, good practice for me :slightly_smiling_face: | 2017-12-16T19:41:55.000016 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:41:55.000016 | 1,513,453,315.000016 | 104,391 |
pythondev | help | Getting a `Runtime Error: dictionary changed size during iteration` | 2017-12-16T19:54:20.000067 | Myong | pythondev_help_Myong_2017-12-16T19:54:20.000067 | 1,513,454,060.000067 | 104,392 |
pythondev | help | Basically iterating through the dictionary and popping off keys that dont pass a certain `if` statement | 2017-12-16T19:54:40.000105 | Myong | pythondev_help_Myong_2017-12-16T19:54:40.000105 | 1,513,454,080.000105 | 104,393 |
pythondev | help | I tried to create a temp dict but didnt work | 2017-12-16T19:54:47.000035 | Myong | pythondev_help_Myong_2017-12-16T19:54:47.000035 | 1,513,454,087.000035 | 104,394 |
pythondev | help | I made a list comprehension that does the same thing | 2017-12-16T19:55:56.000071 | Myong | pythondev_help_Myong_2017-12-16T19:55:56.000071 | 1,513,454,156.000071 | 104,395 |
pythondev | help | lets see if it works | 2017-12-16T19:55:59.000025 | Myong | pythondev_help_Myong_2017-12-16T19:55:59.000025 | 1,513,454,159.000025 | 104,396 |
pythondev | help | Could you create a new dict with the keys `not in`? | 2017-12-16T19:56:26.000030 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:56:26.000030 | 1,513,454,186.00003 | 104,397 |
pythondev | help | Got it to work | 2017-12-16T19:56:47.000046 | Myong | pythondev_help_Myong_2017-12-16T19:56:47.000046 | 1,513,454,207.000046 | 104,398 |
pythondev | help | Rather than pop as you iterate | 2017-12-16T19:56:47.000063 | Corrinne | pythondev_help_Corrinne_2017-12-16T19:56:47.000063 | 1,513,454,207.000063 | 104,399 |
pythondev | help | Was thjis | 2017-12-16T19:57:20.000014 | Myong | pythondev_help_Myong_2017-12-16T19:57:20.000014 | 1,513,454,240.000014 | 104,400 |
pythondev | help | now `return {k: v for k, v in match_dict.items() if have_index < v < want_index}` | 2017-12-16T19:57:27.000014 | Myong | pythondev_help_Myong_2017-12-16T19:57:27.000014 | 1,513,454,247.000014 | 104,401 |
pythondev | help | No issues so far lets see if this beast works | 2017-12-16T19:57:36.000047 | Myong | pythondev_help_Myong_2017-12-16T19:57:36.000047 | 1,513,454,256.000047 | 104,402 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.