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
ok, so `\((.*)\)`
2019-03-29T13:57:03.281400
Clemmie
pythondev_help_Clemmie_2019-03-29T13:57:03.281400
1,553,867,823.2814
15,821
pythondev
help
yup
2019-03-29T13:57:12.281600
Clemmie
pythondev_help_Clemmie_2019-03-29T13:57:12.281600
1,553,867,832.2816
15,822
pythondev
help
`'[u|o](\.{3})'` I think
2019-03-29T13:58:08.282300
Clemmie
pythondev_help_Clemmie_2019-03-29T13:58:08.282300
1,553,867,888.2823
15,823
pythondev
help
ill try it
2019-03-29T13:58:15.282500
Freeda
pythondev_help_Freeda_2019-03-29T13:58:15.282500
1,553,867,895.2825
15,824
pythondev
help
hugeee
2019-03-29T13:58:17.282700
Freeda
pythondev_help_Freeda_2019-03-29T13:58:17.282700
1,553,867,897.2827
15,825
pythondev
help
damnit i missed the regex question
2019-03-29T13:58:53.283100
Claudine
pythondev_help_Claudine_2019-03-29T13:58:53.283100
1,553,867,933.2831
15,826
pythondev
help
hmm didn't work
2019-03-29T13:58:53.283200
Freeda
pythondev_help_Freeda_2019-03-29T13:58:53.283200
1,553,867,933.2832
15,827
pythondev
help
sorry - this [u|o](.{3})
2019-03-29T13:59:00.283400
Clemmie
pythondev_help_Clemmie_2019-03-29T13:59:00.283400
1,553,867,940.2834
15,828
pythondev
help
`[u|o](.{3})`
2019-03-29T13:59:07.283600
Clemmie
pythondev_help_Clemmie_2019-03-29T13:59:07.283600
1,553,867,947.2836
15,829
pythondev
help
lets gooo
2019-03-29T13:59:25.283900
Freeda
pythondev_help_Freeda_2019-03-29T13:59:25.283900
1,553,867,965.2839
15,830
pythondev
help
if you need the upper cases also - `[u|U|o|O](\.{3})`
2019-03-29T13:59:37.284300
Clemmie
pythondev_help_Clemmie_2019-03-29T13:59:37.284300
1,553,867,977.2843
15,831
pythondev
help
I’m steeling your thunder :wink:
2019-03-29T13:59:52.284700
Clemmie
pythondev_help_Clemmie_2019-03-29T13:59:52.284700
1,553,867,992.2847
15,832
pythondev
help
anyway to toss in an exception? sometimes there's only one unit after the u|o and I'm picking up the first parenttheses
2019-03-29T14:00:09.285300
Freeda
pythondev_help_Freeda_2019-03-29T14:00:09.285300
1,553,868,009.2853
15,833
pythondev
help
Thought about pinging you - didn’t want to pull you away from something
2019-03-29T14:00:15.285400
Clemmie
pythondev_help_Clemmie_2019-03-29T14:00:15.285400
1,553,868,015.2854
15,834
pythondev
help
next time i’ll just say “REGEX” first
2019-03-29T14:00:25.285600
Clemmie
pythondev_help_Clemmie_2019-03-29T14:00:25.285600
1,553,868,025.2856
15,835
pythondev
help
how do you even learn this regex stuff? I guess it would help to read the descriptions of stuff on this regex101 site haha
2019-03-29T14:01:00.286700
Freeda
pythondev_help_Freeda_2019-03-29T14:01:00.286700
1,553,868,060.2867
15,836
pythondev
help
`[u|U|o|O]\(?(.{3})` if you are only worried about a paren
2019-03-29T14:01:18.287100
Clemmie
pythondev_help_Clemmie_2019-03-29T14:01:18.287100
1,553,868,078.2871
15,837
pythondev
help
>how do you even learn this regex stuff? By using regexes at every opportunity, even when they aren't called for
2019-03-29T14:01:49.287800
Claudine
pythondev_help_Claudine_2019-03-29T14:01:49.287800
1,553,868,109.2878
15,838
pythondev
help
all the lookups are in the docs <https://docs.python.org/3/library/re.html>
2019-03-29T14:01:51.288000
Clemmie
pythondev_help_Clemmie_2019-03-29T14:01:51.288000
1,553,868,111.288
15,839
pythondev
help
its still returning that parentheses
2019-03-29T14:01:54.288100
Freeda
pythondev_help_Freeda_2019-03-29T14:01:54.288100
1,553,868,114.2881
15,840
pythondev
help
oh sweet
2019-03-29T14:02:02.288300
Freeda
pythondev_help_Freeda_2019-03-29T14:02:02.288300
1,553,868,122.2883
15,841
pythondev
help
It shouldn’t have the paren - unless you have multiple
2019-03-29T14:03:25.288800
Clemmie
pythondev_help_Clemmie_2019-03-29T14:03:25.288800
1,553,868,205.2888
15,842
pythondev
help
what is the string that is failing?
2019-03-29T14:03:30.289000
Clemmie
pythondev_help_Clemmie_2019-03-29T14:03:30.289000
1,553,868,210.289
15,843
pythondev
help
u6 (+102)
2019-03-29T14:03:38.289200
Freeda
pythondev_help_Freeda_2019-03-29T14:03:38.289200
1,553,868,218.2892
15,844
pythondev
help
but the '\' is a hard-match right?
2019-03-29T14:03:56.289600
Freeda
pythondev_help_Freeda_2019-03-29T14:03:56.289600
1,553,868,236.2896
15,845
pythondev
help
and what do you want to get?
2019-03-29T14:03:56.289700
Clemmie
pythondev_help_Clemmie_2019-03-29T14:03:56.289700
1,553,868,236.2897
15,846
pythondev
help
just the 6
2019-03-29T14:04:02.290100
Freeda
pythondev_help_Freeda_2019-03-29T14:04:02.290100
1,553,868,242.2901
15,847
pythondev
help
just 6? not 3 chars?
2019-03-29T14:04:16.290500
Clemmie
pythondev_help_Clemmie_2019-03-29T14:04:16.290500
1,553,868,256.2905
15,848
pythondev
help
sometimes it's 3
2019-03-29T14:04:21.290700
Freeda
pythondev_help_Freeda_2019-03-29T14:04:21.290700
1,553,868,261.2907
15,849
pythondev
help
could be 5.5 could be 6.5
2019-03-29T14:04:29.290900
Freeda
pythondev_help_Freeda_2019-03-29T14:04:29.290900
1,553,868,269.2909
15,850
pythondev
help
is it always followed by a paren?
2019-03-29T14:04:46.291200
Clemmie
pythondev_help_Clemmie_2019-03-29T14:04:46.291200
1,553,868,286.2912
15,851
pythondev
help
a space and parentheses, yes
2019-03-29T14:04:55.291400
Freeda
pythondev_help_Freeda_2019-03-29T14:04:55.291400
1,553,868,295.2914
15,852
pythondev
help
`[u|U|o|O](.*) \(`
2019-03-29T14:06:51.292100
Clemmie
pythondev_help_Clemmie_2019-03-29T14:06:51.292100
1,553,868,411.2921
15,853
pythondev
help
will capture everything between u or o and space(
2019-03-29T14:07:20.292700
Clemmie
pythondev_help_Clemmie_2019-03-29T14:07:20.292700
1,553,868,440.2927
15,854
pythondev
help
ahh
2019-03-29T14:09:05.294500
Freeda
pythondev_help_Freeda_2019-03-29T14:09:05.294500
1,553,868,545.2945
15,855
pythondev
help
better than picking # of digits
2019-03-29T14:09:14.294900
Freeda
pythondev_help_Freeda_2019-03-29T14:09:14.294900
1,553,868,554.2949
15,856
pythondev
help
very good
2019-03-29T14:09:16.295200
Freeda
pythondev_help_Freeda_2019-03-29T14:09:16.295200
1,553,868,556.2952
15,857
pythondev
help
if you want to limit it to single integers and integers with single decimals `[u|U|o|O]([0-9]\.?[0-9]?) \(`
2019-03-29T14:09:17.295300
Clemmie
pythondev_help_Clemmie_2019-03-29T14:09:17.295300
1,553,868,557.2953
15,858
pythondev
help
solidd
2019-03-29T14:09:41.295900
Freeda
pythondev_help_Freeda_2019-03-29T14:09:41.295900
1,553,868,581.2959
15,859
pythondev
help
i'll have to get more use on this
2019-03-29T14:09:45.296100
Freeda
pythondev_help_Freeda_2019-03-29T14:09:45.296100
1,553,868,585.2961
15,860
pythondev
help
thanks <@Clemmie>
2019-03-29T14:09:51.296300
Freeda
pythondev_help_Freeda_2019-03-29T14:09:51.296300
1,553,868,591.2963
15,861
pythondev
help
<@Freeda> :taco: for working through it, and asking good questions
2019-03-29T14:10:12.296900
Clemmie
pythondev_help_Clemmie_2019-03-29T14:10:12.296900
1,553,868,612.2969
15,862
pythondev
help
BTW, I think you want `[uUoO]` at the start instead of with the pipe characters, since it's a character class instead of an 'or' pattern.
2019-03-29T14:10:45.297600
Sasha
pythondev_help_Sasha_2019-03-29T14:10:45.297600
1,553,868,645.2976
15,863
pythondev
help
<@Sasha> is correct - they both work, but that is cleaner and gets more to what you want
2019-03-29T14:11:17.298000
Clemmie
pythondev_help_Clemmie_2019-03-29T14:11:17.298000
1,553,868,677.298
15,864
pythondev
help
thanks <@Clemmie> and <@Scarlett>
2019-03-29T14:26:28.298600
Freeda
pythondev_help_Freeda_2019-03-29T14:26:28.298600
1,553,869,588.2986
15,865
pythondev
help
interesting stuff
2019-03-29T14:26:32.298800
Freeda
pythondev_help_Freeda_2019-03-29T14:26:32.298800
1,553,869,592.2988
15,866
pythondev
help
lol
2019-03-29T14:44:58.298900
Claudine
pythondev_help_Claudine_2019-03-29T14:44:58.298900
1,553,870,698.2989
15,867
pythondev
help
is there a standard way to pass options to a setuptools build? like an optional '--cythonize' flag?
2019-03-29T14:45:45.299800
Hildegard
pythondev_help_Hildegard_2019-03-29T14:45:45.299800
1,553,870,745.2998
15,868
pythondev
help
i'm parsing a dictionary with nested objects, and sometimes the top object is empty and then the script fails. what's the cleanest way to not try to get the nested value if the top value is none? ``` [{ id: 1, options: { color: blue, size: L } }, { id: 2, options: {} }] ``` ``` for dict in dicts: id = dict.get('id', None) color = dict.get('options', None).get('color', None) ``` ---&gt; color errors on second dict now i'm trying just with if dict.get('options') is not None: but i have the feeling there would be a cleaner way
2019-03-29T15:50:42.303500
Dawn
pythondev_help_Dawn_2019-03-29T15:50:42.303500
1,553,874,642.3035
15,869
pythondev
help
Instead of `None` as the default for `'options'`, you could have `{}`, so it could make it to the next step.
2019-03-29T15:52:26.304400
Sasha
pythondev_help_Sasha_2019-03-29T15:52:26.304400
1,553,874,746.3044
15,870
pythondev
help
ah it wouldn't see that as none?
2019-03-29T15:52:49.304800
Dawn
pythondev_help_Dawn_2019-03-29T15:52:49.304800
1,553,874,769.3048
15,871
pythondev
help
interesting
2019-03-29T15:52:55.305000
Dawn
pythondev_help_Dawn_2019-03-29T15:52:55.305000
1,553,874,775.305
15,872
pythondev
help
but it's still emtpy then
2019-03-29T15:53:00.305200
Dawn
pythondev_help_Dawn_2019-03-29T15:53:00.305200
1,553,874,780.3052
15,873
pythondev
help
An empty dict is different from `None`.
2019-03-29T15:53:26.305800
Sasha
pythondev_help_Sasha_2019-03-29T15:53:26.305800
1,553,874,806.3058
15,874
pythondev
help
cool. sometimes the solution is so simple
2019-03-29T15:53:43.306100
Dawn
pythondev_help_Dawn_2019-03-29T15:53:43.306100
1,553,874,823.3061
15,875
pythondev
help
thanks
2019-03-29T15:53:44.306400
Dawn
pythondev_help_Dawn_2019-03-29T15:53:44.306400
1,553,874,824.3064
15,876
pythondev
help
On a debian platform
2019-03-29T16:22:40.306600
Elmira
pythondev_help_Elmira_2019-03-29T16:22:40.306600
1,553,876,560.3066
15,877
pythondev
help
None
2019-03-29T16:25:01.307100
Freeda
pythondev_help_Freeda_2019-03-29T16:25:01.307100
1,553,876,701.3071
15,878
pythondev
help
It must be in the parameters/what I'm attempting to pass into the function
2019-03-29T16:25:34.307800
Freeda
pythondev_help_Freeda_2019-03-29T16:25:34.307800
1,553,876,734.3078
15,879
pythondev
help
If I can get some help with this I should be able to figure out my remaining functions as the core idea of them are very similar
2019-03-29T16:27:28.308300
Freeda
pythondev_help_Freeda_2019-03-29T16:27:28.308300
1,553,876,848.3083
15,880
pythondev
help
can you describe the issue? is there an error/stacktrace, specific outputs that you're expecting vs actually getting
2019-03-29T16:58:03.309500
Kelley
pythondev_help_Kelley_2019-03-29T16:58:03.309500
1,553,878,683.3095
15,881
pythondev
help
None
2019-03-29T17:11:41.310000
Freeda
pythondev_help_Freeda_2019-03-29T17:11:41.310000
1,553,879,501.31
15,882
pythondev
help
And it's just not doing the function. The purpose is to evaluate a few columns against each other and output the result in a new column within the dataframe. The columns to be evaluated are; team_home_score, team_away_score, ou_total which will decide what happens with ou_units and ou_line. The return of ou_units and ou_line will be in the new column ou_pnl
2019-03-29T17:12:59.311800
Freeda
pythondev_help_Freeda_2019-03-29T17:12:59.311800
1,553,879,579.3118
15,883
pythondev
help
I'm just not good at functions so I feel like I'm doing something wrong with the setup
2019-03-29T17:13:23.312200
Freeda
pythondev_help_Freeda_2019-03-29T17:13:23.312200
1,553,879,603.3122
15,884
pythondev
help
can you post the stacktrace?
2019-03-29T17:14:29.312700
Jorge
pythondev_help_Jorge_2019-03-29T17:14:29.312700
1,553,879,669.3127
15,885
pythondev
help
what's a stacktrace?
2019-03-29T17:14:59.313500
Freeda
pythondev_help_Freeda_2019-03-29T17:14:59.313500
1,553,879,699.3135
15,886
pythondev
help
when your program fails, it will print out the last 5 or so lines that were run, including the file locations + functions the last line will have the specific error/exception that caused your program to fail
2019-03-29T17:16:38.315300
Jorge
pythondev_help_Jorge_2019-03-29T17:16:38.315300
1,553,879,798.3153
15,887
pythondev
help
gotcha
2019-03-29T17:17:14.316100
Freeda
pythondev_help_Freeda_2019-03-29T17:17:14.316100
1,553,879,834.3161
15,888
pythondev
help
now i'm just getting that indentation error
2019-03-29T17:17:21.316500
Freeda
pythondev_help_Freeda_2019-03-29T17:17:21.316500
1,553,879,841.3165
15,889
pythondev
help
if its an indentation error, you should just check to make sure your code is formatted correctly. 1 tab or 4 spaces for each line, each "block" of code gets another 4 spaces/1 tab
2019-03-29T17:17:33.316800
Jorge
pythondev_help_Jorge_2019-03-29T17:17:33.316800
1,553,879,853.3168
15,890
pythondev
help
AGH
2019-03-29T17:19:42.317500
Freeda
pythondev_help_Freeda_2019-03-29T17:19:42.317500
1,553,879,982.3175
15,891
pythondev
help
I commented a line under a with above the function
2019-03-29T17:19:50.317800
Freeda
pythondev_help_Freeda_2019-03-29T17:19:50.317800
1,553,879,990.3178
15,892
pythondev
help
whoops
2019-03-29T17:19:51.318000
Freeda
pythondev_help_Freeda_2019-03-29T17:19:51.318000
1,553,879,991.318
15,893
pythondev
help
Okay, back at the ValueError
2019-03-29T17:20:08.318100
Freeda
pythondev_help_Freeda_2019-03-29T17:20:08.318100
1,553,880,008.3181
15,894
pythondev
help
think it's because there are zeros in the column?
2019-03-29T17:24:34.319200
Freeda
pythondev_help_Freeda_2019-03-29T17:24:34.319200
1,553,880,274.3192
15,895
pythondev
help
it says 'occurred at index 0', first line is a zero, maybe that's the cause
2019-03-29T17:25:29.319900
Freeda
pythondev_help_Freeda_2019-03-29T17:25:29.319900
1,553,880,329.3199
15,896
pythondev
help
can you share sample data?
2019-03-29T17:25:43.320500
Raguel
pythondev_help_Raguel_2019-03-29T17:25:43.320500
1,553,880,343.3205
15,897
pythondev
help
Should I set zeros to np.nan? or maybe there's an exception to fix this error
2019-03-29T17:25:45.320600
Freeda
pythondev_help_Freeda_2019-03-29T17:25:45.320600
1,553,880,345.3206
15,898
pythondev
help
This is the column I want to apply the function to
2019-03-29T17:26:30.320800
Freeda
pythondev_help_Freeda_2019-03-29T17:26:30.320800
1,553,880,390.3208
15,899
pythondev
help
I believe it is throwing error because of this line `if df[df['overunder'].str.contains('u')]:` as this line returns a whole dataframe, and if statement doesn't know what to evaluate it to
2019-03-29T17:31:35.321700
Raguel
pythondev_help_Raguel_2019-03-29T17:31:35.321700
1,553,880,695.3217
15,900
pythondev
help
your `if` statement needs to evaluate to some `boolean` form here
2019-03-29T17:32:15.322500
Raguel
pythondev_help_Raguel_2019-03-29T17:32:15.322500
1,553,880,735.3225
15,901
pythondev
help
This link should give you a solid grasp of what I mean with git remotes. <https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes>
2019-03-29T17:36:32.322600
Carmen
pythondev_help_Carmen_2019-03-29T17:36:32.322600
1,553,880,992.3226
15,902
pythondev
help
I had a hunch that may be it so I removed the outside df[ ] wrapper but it didnt work
2019-03-29T17:37:14.323200
Freeda
pythondev_help_Freeda_2019-03-29T17:37:14.323200
1,553,881,034.3232
15,903
pythondev
help
threw the same error... wouldn't df['overunder'] just return that column?
2019-03-29T17:37:35.323800
Freeda
pythondev_help_Freeda_2019-03-29T17:37:35.323800
1,553,881,055.3238
15,904
pythondev
help
So this is what I have now...
2019-03-29T17:38:18.324000
Freeda
pythondev_help_Freeda_2019-03-29T17:38:18.324000
1,553,881,098.324
15,905
pythondev
help
And this is actually a great tutorial on setting up everything I meant (with a little extra): <https://gist.github.com/Nilpo/8ed5e44be00d6cf21f22>
2019-03-29T17:45:15.325200
Carmen
pythondev_help_Carmen_2019-03-29T17:45:15.325200
1,553,881,515.3252
15,906
pythondev
help
I don't do the separate git working directory with the post-receive hook that does a checkout, but that's actually a great way to avoid exposing your `.git` directory accidentally.
2019-03-29T17:46:05.325700
Carmen
pythondev_help_Carmen_2019-03-29T17:46:05.325700
1,553,881,565.3257
15,907
pythondev
help
There should be multiple lines above the ValueError you pasted which I hope points to the exact line where the error occurred
2019-03-29T17:46:15.326000
Kelley
pythondev_help_Kelley_2019-03-29T17:46:15.326000
1,553,881,575.326
15,908
pythondev
help
Also, based on the fact that you don't use the `row` argument anywhere in the function, I think you're misunderstanding the purpose of `df.apply`
2019-03-29T17:48:07.327200
Kelley
pythondev_help_Kelley_2019-03-29T17:48:07.327200
1,553,881,687.3272
15,909
pythondev
help
maybe you actually want to do `df['ou_pnl'] = evaluate_overunder(df)`
2019-03-29T17:49:48.327900
Kelley
pythondev_help_Kelley_2019-03-29T17:49:48.327900
1,553,881,788.3279
15,910
pythondev
help
either that or you should be referencing `row` somewhere in the function
2019-03-29T17:50:53.328500
Kelley
pythondev_help_Kelley_2019-03-29T17:50:53.328500
1,553,881,853.3285
15,911
pythondev
help
<@Henrietta> Did you ever get an answer to this? I've done precisely this for a client project (specifically generating PHP files), so I'd be willing to offer some guidance and help if you still need it.
2019-03-29T18:09:07.328600
Carmen
pythondev_help_Carmen_2019-03-29T18:09:07.328600
1,553,882,947.3286
15,912
pythondev
help
My new notebook: <https://github.com/paulgureghian/Visualizing_Trends_in_a_Time_Series/blob/master/Visualize_Trends.ipynb>
2019-03-29T19:06:55.329100
Clayton
pythondev_help_Clayton_2019-03-29T19:06:55.329100
1,553,886,415.3291
15,913
pythondev
help
<#C3GFPUBGF|show_and_tell> might be a more relevant place for this?
2019-03-29T19:07:39.329300
Hiroko
pythondev_help_Hiroko_2019-03-29T19:07:39.329300
1,553,886,459.3293
15,914
pythondev
help
<@Freeda> similar to what mbarkhau said...you're not using `row` in your function. Not sure it'll work, but have you tried changing your function to use row['column'] instead of df['column'] ? Like this.
2019-03-29T22:07:06.333400
Marth
pythondev_help_Marth_2019-03-29T22:07:06.333400
1,553,897,226.3334
15,915
pythondev
help
Need some help integrating powerbi embedded reports into my django site, i need somehow a way to login into powerbi from the site without user intervwntion, adal is not being helpful
2019-03-29T22:07:26.334000
Sharika
pythondev_help_Sharika_2019-03-29T22:07:26.334000
1,553,897,246.334
15,916
pythondev
help
Can anyone help me to invoke channel consumer(background task) from views.py, please?
2019-03-30T01:11:32.335200
Elenore
pythondev_help_Elenore_2019-03-30T01:11:32.335200
1,553,908,292.3352
15,917
pythondev
help
its not calling calculate_profile_percentage function
2019-03-30T01:19:02.335800
Elenore
pythondev_help_Elenore_2019-03-30T01:19:02.335800
1,553,908,742.3358
15,918
pythondev
help
What is wrong with line 11? What happens here is that `'agder_energi'` is passed here, when you can see that my attempt is explicitly exclude `'agder_energi'` and rather have it run on the else statement
2019-03-30T02:13:14.336600
Conchita
pythondev_help_Conchita_2019-03-30T02:13:14.336600
1,553,911,994.3366
15,919
pythondev
help
<@Conchita> You need `key in ('eidsva' , 'glitre_energi' , 'haugaland_nett')`
2019-03-30T02:17:01.337500
Valeri
pythondev_help_Valeri_2019-03-30T02:17:01.337500
1,553,912,221.3375
15,920