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
Alright, so this is a problem only if the remaining tasks haven't made rate-limited requests yet. Because if they already made requests, then they weren't really rate limited, right? Otherwise the remaining tasks will fail with some exception like `HttpTooManyRequests` - which is fine, because you can re-schedule failed tasks to the next batch
2019-05-14T09:03:13.069100
Chester
pythondev_help_Chester_2019-05-14T09:03:13.069100
1,557,824,593.0691
23,621
pythondev
help
Hello guys I have a small problem. I am having a github repository that I want to restrict people from pushing to it so that they then use PRs. I thought it was five minutes thing but I’m failing. Is the options to enable restrictions a paid feature or what?!
2019-05-14T09:03:21.069300
Linnea
pythondev_help_Linnea_2019-05-14T09:03:21.069300
1,557,824,601.0693
23,622
pythondev
help
But if the remaining tasks have made their requests, and they were not rate limited, then you don't care about them - they are free to go and save data to a db. You don't need to do anything with them, just let them finish
2019-05-14T09:04:02.069400
Chester
pythondev_help_Chester_2019-05-14T09:04:02.069400
1,557,824,642.0694
23,623
pythondev
help
Are you talking about a private repo?
2019-05-14T09:04:31.069700
Chester
pythondev_help_Chester_2019-05-14T09:04:31.069700
1,557,824,671.0697
23,624
pythondev
help
No even a public repo
2019-05-14T09:06:08.070300
Linnea
pythondev_help_Linnea_2019-05-14T09:06:08.070300
1,557,824,768.0703
23,625
pythondev
help
I am following this article
2019-05-14T09:06:20.070700
Linnea
pythondev_help_Linnea_2019-05-14T09:06:20.070700
1,557,824,780.0707
23,626
pythondev
help
<https://help.github.com/en/articles/enabling-branch-restrictions>
2019-05-14T09:08:07.071100
Linnea
pythondev_help_Linnea_2019-05-14T09:08:07.071100
1,557,824,887.0711
23,627
pythondev
help
You're looking at wrong place
2019-05-14T09:08:17.071400
Chester
pythondev_help_Chester_2019-05-14T09:08:17.071400
1,557,824,897.0714
23,628
pythondev
help
By default, nobody can push to your repository except for you.
2019-05-14T09:08:50.071900
Chester
pythondev_help_Chester_2019-05-14T09:08:50.071900
1,557,824,930.0719
23,629
pythondev
help
You can add collaborators with different permissions (basically, "write" and "admin")
2019-05-14T09:10:25.073300
Chester
pythondev_help_Chester_2019-05-14T09:10:25.073300
1,557,825,025.0733
23,630
pythondev
help
So if you don't add anyone to your repo - you're good, others can only try to push their code through PRs
2019-05-14T09:11:01.073900
Chester
pythondev_help_Chester_2019-05-14T09:11:01.073900
1,557,825,061.0739
23,631
pythondev
help
Ooh the repo is having 4 collaborators and I want them to not be able to push but just submit PR
2019-05-14T09:15:35.074900
Linnea
pythondev_help_Linnea_2019-05-14T09:15:35.074900
1,557,825,335.0749
23,632
pythondev
help
yes, how do you reccomend rescheduling failed tasks. `d = await t` should i check the response of `d` and then retry based on that response and is there already a way to retry easily using asyncio?
2019-05-14T09:15:45.075000
Pura
pythondev_help_Pura_2019-05-14T09:15:45.075000
1,557,825,345.075
23,633
pythondev
help
&gt; should i check the response of `d` and then retry based on that response Yep. If there's an exception, you'll need `try`/`except` over `d = await t`
2019-05-14T09:17:11.075300
Chester
pythondev_help_Chester_2019-05-14T09:17:11.075300
1,557,825,431.0753
23,634
pythondev
help
It seems they all have push access by default. There is no place to change permissions for collaborators
2019-05-14T09:18:16.076500
Linnea
pythondev_help_Linnea_2019-05-14T09:18:16.076500
1,557,825,496.0765
23,635
pythondev
help
Why do you have them as collaborators?
2019-05-14T09:18:25.076800
Chester
pythondev_help_Chester_2019-05-14T09:18:25.076800
1,557,825,505.0768
23,636
pythondev
help
ahh okay, ye there is no exception in my fetch_user_objects i have ``` if response['status'] != 200: app.rate_limited = True return {'errors': 'failed job'} ``` so i could look for `d['errors']` or maybe return some status
2019-05-14T09:19:01.076900
Pura
pythondev_help_Pura_2019-05-14T09:19:01.076900
1,557,825,541.0769
23,637
pythondev
help
just make master a protected branch
2019-05-14T09:19:56.077700
Karoline
pythondev_help_Karoline_2019-05-14T09:19:56.077700
1,557,825,596.0777
23,638
pythondev
help
im just not sure how i would go about rescheudling this task then. ``` for task in tasks: res = await task ``` task i believe is the future/co-routine
2019-05-14T09:20:02.077800
Pura
pythondev_help_Pura_2019-05-14T09:20:02.077800
1,557,825,602.0778
23,639
pythondev
help
I'd remove users from collaborators. They will be able to make PRs, and it looks like this is what needed
2019-05-14T09:20:53.079100
Chester
pythondev_help_Chester_2019-05-14T09:20:53.079100
1,557,825,653.0791
23,640
pythondev
help
I have protected the branch and included administrators and it works. It seems Ike the article I have posted above illustrate things that don’t exist. Thank you <@Karoline> <@Chester>
2019-05-14T09:29:36.082200
Linnea
pythondev_help_Linnea_2019-05-14T09:29:36.082200
1,557,826,176.0822
23,641
pythondev
help
I have some data which is multiple lists of tuples with multiple elements like this.
2019-05-14T10:01:06.083500
Adella
pythondev_help_Adella_2019-05-14T10:01:06.083500
1,557,828,066.0835
23,642
pythondev
help
None
2019-05-14T10:01:11.083700
Adella
pythondev_help_Adella_2019-05-14T10:01:11.083700
1,557,828,071.0837
23,643
pythondev
help
The first entry is always the user name, the other values are ordered the same across each tuple. What I would like to do is map / reduce (?) using the user key and sum up each "column" so that the result is like so.
2019-05-14T10:01:16.084100
Adella
pythondev_help_Adella_2019-05-14T10:01:16.084100
1,557,828,076.0841
23,644
pythondev
help
None
2019-05-14T10:01:25.084200
Adella
pythondev_help_Adella_2019-05-14T10:01:25.084200
1,557,828,085.0842
23,645
pythondev
help
Column counts from the input data are always the same. User will always be fist column. How can I achieve this? I've read a bunch on map / reduce and list comprehensions but to be honest I don't understand most of it.
2019-05-14T10:01:32.084600
Adella
pythondev_help_Adella_2019-05-14T10:01:32.084600
1,557,828,092.0846
23,646
pythondev
help
What's the normal approach to show output in real time with `subprocess`?
2019-05-14T10:03:00.085200
Jolynn
pythondev_help_Jolynn_2019-05-14T10:03:00.085200
1,557,828,180.0852
23,647
pythondev
help
A painful one
2019-05-14T10:03:52.085600
Chester
pythondev_help_Chester_2019-05-14T10:03:52.085600
1,557,828,232.0856
23,648
pythondev
help
<https://sarge.readthedocs.io/en/latest/>
2019-05-14T10:04:09.086100
Chester
pythondev_help_Chester_2019-05-14T10:04:09.086100
1,557,828,249.0861
23,649
pythondev
help
Anyone here ever use aws boto3 to do a generate/get_credential_report? I am having problems [reading the CSV](<https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.get_credential_report>) I get errors like this when trying to loop through the csv: `csv.Error: iterator should return strings, not bytes`
2019-05-14T10:38:51.088400
Annabell
pythondev_help_Annabell_2019-05-14T10:38:51.088400
1,557,830,331.0884
23,650
pythondev
help
Here's the code I am working with: <https://paste.ubuntu.com/p/SKtgphWPm5/>
2019-05-14T10:42:47.088600
Annabell
pythondev_help_Annabell_2019-05-14T10:42:47.088600
1,557,830,567.0886
23,651
pythondev
help
make sure that when it is parsing that it only get the string
2019-05-14T11:29:57.089300
Rodrick
pythondev_help_Rodrick_2019-05-14T11:29:57.089300
1,557,833,397.0893
23,652
pythondev
help
can you send the code
2019-05-14T11:30:12.089700
Rodrick
pythondev_help_Rodrick_2019-05-14T11:30:12.089700
1,557,833,412.0897
23,653
pythondev
help
nvm
2019-05-14T11:31:00.089900
Rodrick
pythondev_help_Rodrick_2019-05-14T11:31:00.089900
1,557,833,460.0899
23,654
pythondev
help
<@Annabell> what is the CSV
2019-05-14T11:32:23.090200
Rodrick
pythondev_help_Rodrick_2019-05-14T11:32:23.090200
1,557,833,543.0902
23,655
pythondev
help
I was able to get it to work with this: <https://paste.ubuntu.com/p/d6CdHrBRGw/> I'm not sure if it is the 'best practice' way or not. I was having a hard time because the contents are base64 encoded
2019-05-14T11:33:19.090700
Annabell
pythondev_help_Annabell_2019-05-14T11:33:19.090700
1,557,833,599.0907
23,656
pythondev
help
The error is telling us that its not a string its in bytes which i think is what base64 is
2019-05-14T11:34:34.091400
Rodrick
pythondev_help_Rodrick_2019-05-14T11:34:34.091400
1,557,833,674.0914
23,657
pythondev
help
Correct
2019-05-14T11:34:44.091800
Annabell
pythondev_help_Annabell_2019-05-14T11:34:44.091800
1,557,833,684.0918
23,658
pythondev
help
can you provide the CSV file
2019-05-14T11:34:44.091900
Rodrick
pythondev_help_Rodrick_2019-05-14T11:34:44.091900
1,557,833,684.0919
23,659
pythondev
help
<https://paste.ubuntu.com/p/FGXrCfF4CT/>
2019-05-14T11:37:57.092300
Annabell
pythondev_help_Annabell_2019-05-14T11:37:57.092300
1,557,833,877.0923
23,660
pythondev
help
<@Annabell> you can include that here rather than using links
2019-05-14T11:38:18.092700
Hiroko
pythondev_help_Hiroko_2019-05-14T11:38:18.092700
1,557,833,898.0927
23,661
pythondev
help
Please use the snippet feature, or backticks, when sharing code. You can do so by clicking on the :heavy_plus_sign: on the left of the input box for a snippet. For more information on snippets click <https://get.slack.help/hc/en-us/articles/204145658-Create-a-snippet|here>. For more information on inline code formatting with backticks click <https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages#inline-code|here>.
2019-05-14T11:38:21.092800
Leana
pythondev_help_Leana_2019-05-14T11:38:21.092800
1,557,833,901.0928
23,662
pythondev
help
It looks like there are some non string text in the middle so thats why you are getting the error
2019-05-14T11:38:29.092900
Rodrick
pythondev_help_Rodrick_2019-05-14T11:38:29.092900
1,557,833,909.0929
23,663
pythondev
help
good to know. i thought folks preferred links so it doesnt spam chat. (Maybe i am use to the IRC days)
2019-05-14T11:38:56.093400
Annabell
pythondev_help_Annabell_2019-05-14T11:38:56.093400
1,557,833,936.0934
23,664
pythondev
help
None
2019-05-14T11:39:18.093600
Rodrick
pythondev_help_Rodrick_2019-05-14T11:39:18.093600
1,557,833,958.0936
23,665
pythondev
help
Just for everyone to see :slightly_smiling_face:
2019-05-14T11:39:25.094100
Rodrick
pythondev_help_Rodrick_2019-05-14T11:39:25.094100
1,557,833,965.0941
23,666
pythondev
help
I was able to get it to work with this. Seems ok. Not sure if it is the best solution
2019-05-14T11:41:00.094400
Annabell
pythondev_help_Annabell_2019-05-14T11:41:00.094400
1,557,834,060.0944
23,667
pythondev
help
What data are you trying to get out of it
2019-05-14T11:42:25.094900
Rodrick
pythondev_help_Rodrick_2019-05-14T11:42:25.094900
1,557,834,145.0949
23,668
pythondev
help
I had to do this to get the iam user's passwordlastset field
2019-05-14T11:42:43.095300
Annabell
pythondev_help_Annabell_2019-05-14T11:42:43.095300
1,557,834,163.0953
23,669
pythondev
help
password_last_changed is what it is called here
2019-05-14T11:43:06.095600
Annabell
pythondev_help_Annabell_2019-05-14T11:43:06.095600
1,557,834,186.0956
23,670
pythondev
help
None
2019-05-14T11:43:30.095700
Rodrick
pythondev_help_Rodrick_2019-05-14T11:43:30.095700
1,557,834,210.0957
23,671
pythondev
help
That is his code
2019-05-14T11:43:37.096100
Rodrick
pythondev_help_Rodrick_2019-05-14T11:43:37.096100
1,557,834,217.0961
23,672
pythondev
help
What line are you getting the error one or is there no error
2019-05-14T11:44:20.096500
Rodrick
pythondev_help_Rodrick_2019-05-14T11:44:20.096500
1,557,834,260.0965
23,673
pythondev
help
also, are you using python2 or 3?
2019-05-14T11:46:25.096800
Hiroko
pythondev_help_Hiroko_2019-05-14T11:46:25.096800
1,557,834,385.0968
23,674
pythondev
help
In my original attempts, line 8 threw the error
2019-05-14T11:47:05.097000
Annabell
pythondev_help_Annabell_2019-05-14T11:47:05.097000
1,557,834,425.097
23,675
pythondev
help
python 3.6.7
2019-05-14T11:47:26.097600
Annabell
pythondev_help_Annabell_2019-05-14T11:47:26.097600
1,557,834,446.0976
23,676
pythondev
help
try `print(str(x)) for x in reader`
2019-05-14T11:47:37.098000
Rodrick
pythondev_help_Rodrick_2019-05-14T11:47:37.098000
1,557,834,457.098
23,677
pythondev
help
same error ```python [print(str(x)) for x in reader] Error: iterator should return strings, not bytes (did you open the file in text mode?) ```
2019-05-14T11:48:58.098600
Annabell
pythondev_help_Annabell_2019-05-14T11:48:58.098600
1,557,834,538.0986
23,678
pythondev
help
I should be good to go now. Originally i wasnt sure what to try to get it to work
2019-05-14T11:49:11.099000
Annabell
pythondev_help_Annabell_2019-05-14T11:49:11.099000
1,557,834,551.099
23,679
pythondev
help
?
2019-05-14T11:49:20.099200
Rodrick
pythondev_help_Rodrick_2019-05-14T11:49:20.099200
1,557,834,560.0992
23,680
pythondev
help
You got an error
2019-05-14T11:49:25.099400
Rodrick
pythondev_help_Rodrick_2019-05-14T11:49:25.099400
1,557,834,565.0994
23,681
pythondev
help
yah when running this
2019-05-14T11:50:20.099600
Annabell
pythondev_help_Annabell_2019-05-14T11:50:20.099600
1,557,834,620.0996
23,682
pythondev
help
So it works?
2019-05-14T11:51:19.100000
Rodrick
pythondev_help_Rodrick_2019-05-14T11:51:19.100000
1,557,834,679.1
23,683
pythondev
help
This works
2019-05-14T11:51:49.100100
Annabell
pythondev_help_Annabell_2019-05-14T11:51:49.100100
1,557,834,709.1001
23,684
pythondev
help
Ok
2019-05-14T11:52:16.100500
Rodrick
pythondev_help_Rodrick_2019-05-14T11:52:16.100500
1,557,834,736.1005
23,685
pythondev
help
Thanks for your help on it
2019-05-14T11:52:24.100700
Annabell
pythondev_help_Annabell_2019-05-14T11:52:24.100700
1,557,834,744.1007
23,686
pythondev
help
Yep
2019-05-14T11:54:21.100900
Rodrick
pythondev_help_Rodrick_2019-05-14T11:54:21.100900
1,557,834,861.1009
23,687
pythondev
help
This would probably be confusing to do as a map-reduce or list comprehension, so I'd do it as a more regular loop. The easiest way would probably be to construct a dictionary mapping the user to the values. Something like: ```totals = {} for items in data: for item in items: user = item[0] values = item[1:] if user not in totals: totals[user] = values else: totals[user] = tuple(a + b for a, b in zip(values, totals[user]) newdata = [(user,) + totals[user] for user in totals]``` (Not tested, but hopefully you get the idea.)
2019-05-14T11:59:51.101000
Sasha
pythondev_help_Sasha_2019-05-14T11:59:51.101000
1,557,835,191.101
23,688
pythondev
help
I need help with classes. I want to call a function inside a class that makes a pandas dataframe. I want to call this in other class methods. Should I be doing this with a class method or is there like a wrapper for this?
2019-05-14T12:53:53.103400
Javier
pythondev_help_Javier_2019-05-14T12:53:53.103400
1,557,838,433.1034
23,689
pythondev
help
by `other class methods` do you mean methods in the same class?
2019-05-14T12:54:24.103700
Hiroko
pythondev_help_Hiroko_2019-05-14T12:54:24.103700
1,557,838,464.1037
23,690
pythondev
help
Yes
2019-05-14T13:26:04.104700
Javier
pythondev_help_Javier_2019-05-14T13:26:04.104700
1,557,840,364.1047
23,691
pythondev
help
You can call them as `self.func()`.
2019-05-14T13:26:44.105100
Sasha
pythondev_help_Sasha_2019-05-14T13:26:44.105100
1,557,840,404.1051
23,692
pythondev
help
How do I set that up? Do I not need to make it a class method? Is that good oop design ?
2019-05-14T13:31:26.106300
Javier
pythondev_help_Javier_2019-05-14T13:31:26.106300
1,557,840,686.1063
23,693
pythondev
help
Methods defined in a class are automatically accessible like that, just like member variables: ```class MyClass(): def __init__(self, param): self.data = param def func(self, stuff): print(stuff, self.data) def another_func(self, more_stuff): result = self.func(more_stuff) return result```
2019-05-14T13:36:33.109400
Sasha
pythondev_help_Sasha_2019-05-14T13:36:33.109400
1,557,840,993.1094
23,694
pythondev
help
```class SomeClass(): def method_calls_pandas(self, column): pandas.some_method_that_uses_column_param(column) def method_that_calls_internal_class_method(self): self.method_calls_pandas(4) ```
2019-05-14T13:36:37.109500
Hiroko
pythondev_help_Hiroko_2019-05-14T13:36:37.109500
1,557,840,997.1095
23,695
pythondev
help
So use a method and then call method in the rest of the classes. Thanks!
2019-05-14T13:46:22.110300
Javier
pythondev_help_Javier_2019-05-14T13:46:22.110300
1,557,841,582.1103
23,696
pythondev
help
<@Hiroko> <@Sasha> :taco:
2019-05-14T13:46:39.110600
Javier
pythondev_help_Javier_2019-05-14T13:46:39.110600
1,557,841,599.1106
23,697
pythondev
help
Do you need to return anything in a class method? Should you return properties?
2019-05-14T13:50:09.111300
Javier
pythondev_help_Javier_2019-05-14T13:50:09.111300
1,557,841,809.1113
23,698
pythondev
help
depends
2019-05-14T13:51:19.111600
Hiroko
pythondev_help_Hiroko_2019-05-14T13:51:19.111600
1,557,841,879.1116
23,699
pythondev
help
do you need to explicitly return?
2019-05-14T13:51:28.112100
Hiroko
pythondev_help_Hiroko_2019-05-14T13:51:28.112100
1,557,841,888.1121
23,700
pythondev
help
or are you adding in the method’s results to a passed in data structure?
2019-05-14T13:51:42.112500
Hiroko
pythondev_help_Hiroko_2019-05-14T13:51:42.112500
1,557,841,902.1125
23,701
pythondev
help
I honestly don't know what I should be doing. Imo there's not a reason to access some of this stuff later outside of the class so it doesn't make too much sense to me to use it as a property, but using it as a property might save me from repeating some code
2019-05-14T14:03:15.114600
Javier
pythondev_help_Javier_2019-05-14T14:03:15.114600
1,557,842,595.1146
23,702
pythondev
help
```realtor_dict = {} for realtor_hash in realtor_hashes_from_sheet: mlsId = str(realtor_hash.get('mlsId')) realtor_info = [ str(realtor_hash.get('agentFirstName')), str(realtor_hash.get('agentLastName')), str(realtor_hash.get('email'))] realtor_dict[mlsId] = realtor_info```
2019-05-14T14:13:02.114800
Celesta
pythondev_help_Celesta_2019-05-14T14:13:02.114800
1,557,843,182.1148
23,703
pythondev
help
anyone help me identify why `realtor_dict` is overwritten on each iteration even when `mlsID` is unique?
2019-05-14T14:14:11.115900
Celesta
pythondev_help_Celesta_2019-05-14T14:14:11.115900
1,557,843,251.1159
23,704
pythondev
help
You mean it only has one thing in it?
2019-05-14T14:16:55.116400
Javier
pythondev_help_Javier_2019-05-14T14:16:55.116400
1,557,843,415.1164
23,705
pythondev
help
correct
2019-05-14T14:17:04.116700
Celesta
pythondev_help_Celesta_2019-05-14T14:17:04.116700
1,557,843,424.1167
23,706
pythondev
help
what is `realtor_hashes_from_sheet`? list of dictionaries?
2019-05-14T14:22:22.117500
Raguel
pythondev_help_Raguel_2019-05-14T14:22:22.117500
1,557,843,742.1175
23,707
pythondev
help
n/m. i'm being silly. the key `mlsId` is actually `mlsID` on the sheet i'm pulling it from. thanks for being my rubber duck!
2019-05-14T14:23:26.117600
Celesta
pythondev_help_Celesta_2019-05-14T14:23:26.117600
1,557,843,806.1176
23,708
pythondev
help
None
2019-05-14T14:40:40.118500
Dennise
pythondev_help_Dennise_2019-05-14T14:40:40.118500
1,557,844,840.1185
23,709
pythondev
help
Hey guys, looking for some feedback on this script I wrote today. Thanks :slightly_smiling_face:
2019-05-14T14:40:51.118900
Dennise
pythondev_help_Dennise_2019-05-14T14:40:51.118900
1,557,844,851.1189
23,710
pythondev
help
` QuestionAsked = QuestionAsked.upper()` `AttributeError: 'Entry' object has no attribute 'upper'`
2019-05-14T14:47:32.119300
Rodrick
pythondev_help_Rodrick_2019-05-14T14:47:32.119300
1,557,845,252.1193
23,711
pythondev
help
I get this error when I am runiing this code
2019-05-14T14:47:46.119700
Rodrick
pythondev_help_Rodrick_2019-05-14T14:47:46.119700
1,557,845,266.1197
23,712
pythondev
help
None
2019-05-14T14:48:09.120000
Rodrick
pythondev_help_Rodrick_2019-05-14T14:48:09.120000
1,557,845,289.12
23,713
pythondev
help
means the `Entry` class has no method `upper`
2019-05-14T14:48:10.120300
Hiroko
pythondev_help_Hiroko_2019-05-14T14:48:10.120300
1,557,845,290.1203
23,714
pythondev
help
How would I fix it?
2019-05-14T14:48:49.120600
Rodrick
pythondev_help_Rodrick_2019-05-14T14:48:49.120600
1,557,845,329.1206
23,715
pythondev
help
None
2019-05-14T14:49:13.120800
Rodrick
pythondev_help_Rodrick_2019-05-14T14:49:13.120800
1,557,845,353.1208
23,716
pythondev
help
that is the mainline code
2019-05-14T14:49:20.121400
Rodrick
pythondev_help_Rodrick_2019-05-14T14:49:20.121400
1,557,845,360.1214
23,717
pythondev
help
would start by describing what an Entry object is?
2019-05-14T14:49:29.121700
Hiroko
pythondev_help_Hiroko_2019-05-14T14:49:29.121700
1,557,845,369.1217
23,718
pythondev
help
Entry is the tkinter text box
2019-05-14T14:50:51.122200
Rodrick
pythondev_help_Rodrick_2019-05-14T14:50:51.122200
1,557,845,451.1222
23,719
pythondev
help
ok, so `upper`, I imagine, you think is operating on a string
2019-05-14T14:51:51.122800
Hiroko
pythondev_help_Hiroko_2019-05-14T14:51:51.122800
1,557,845,511.1228
23,720