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 there can be multiple `{'10.01.2005': {'issue': ['important1', 'important2'], 'url': ['url1', '<http://google.com>']}}` ?
2017-07-02T11:22:52.831205
Deedee
pythondev_help_Deedee_2017-07-02T11:22:52.831205
1,498,994,572.831205
83,903
pythondev
help
all. tired better not to sit at the computer. go to the beach.
2017-07-02T11:23:23.833359
Georgeann
pythondev_help_Georgeann_2017-07-02T11:23:23.833359
1,498,994,603.833359
83,904
pythondev
help
so if important3 and url3 came in, there are different "10.01.2005" that it can go into?
2017-07-02T11:23:33.833974
Deedee
pythondev_help_Deedee_2017-07-02T11:23:33.833974
1,498,994,613.833974
83,905
pythondev
help
append, it list.
2017-07-02T11:23:40.834473
Georgeann
pythondev_help_Georgeann_2017-07-02T11:23:40.834473
1,498,994,620.834473
83,906
pythondev
help
`z[date]["issue"].append(df["issue"][i])` everything is very easy.))
2017-07-02T11:25:02.840347
Georgeann
pythondev_help_Georgeann_2017-07-02T11:25:02.840347
1,498,994,702.840347
83,907
pythondev
help
I don't think you can use a dictionary for this. Hopefully someone else can confirm, but I think you're looking at using a list instead.
2017-07-02T11:34:16.882325
Deedee
pythondev_help_Deedee_2017-07-02T11:34:16.882325
1,498,995,256.882325
83,908
pythondev
help
z[date]['issue'] is probably a list
2017-07-02T11:38:26.899961
Suellen
pythondev_help_Suellen_2017-07-02T11:38:26.899961
1,498,995,506.899961
83,909
pythondev
help
Exactly :)
2017-07-02T13:19:48.367417
Georgeann
pythondev_help_Georgeann_2017-07-02T13:19:48.367417
1,499,001,588.367417
83,910
pythondev
help
In PyCharm, can you have the project run kick off a bunch of things at once? For example, I want to run Django, Celery Workers, and Celery Beat
2017-07-02T15:36:48.023198
Beula
pythondev_help_Beula_2017-07-02T15:36:48.023198
1,499,009,808.023198
83,911
pythondev
help
If you find out that share it with me. I have to open like 5 command windows to get started
2017-07-02T15:46:40.067721
Mariano
pythondev_help_Mariano_2017-07-02T15:46:40.067721
1,499,010,400.067721
83,912
pythondev
help
`subprocess.open` at the start of the script ? :smile:
2017-07-02T15:48:08.074203
Ciera
pythondev_help_Ciera_2017-07-02T15:48:08.074203
1,499,010,488.074203
83,913
pythondev
help
haha, no kidding. I guess if you don't need a bunch of workers you can run beat and the worker: ``` celery -A &lt;your proj&gt; worker --beat -l debug --scheduler django ```
2017-07-02T15:48:09.074291
Beula
pythondev_help_Beula_2017-07-02T15:48:09.074291
1,499,010,489.074291
83,914
pythondev
help
Is that it?
2017-07-02T15:48:21.075096
Suellen
pythondev_help_Suellen_2017-07-02T15:48:21.075096
1,499,010,501.075096
83,915
pythondev
help
I think those block before starting
2017-07-02T15:48:43.076822
Beula
pythondev_help_Beula_2017-07-02T15:48:43.076822
1,499,010,523.076822
83,916
pythondev
help
`&amp;`
2017-07-02T15:49:01.078203
Suellen
pythondev_help_Suellen_2017-07-02T15:49:01.078203
1,499,010,541.078203
83,917
pythondev
help
<@Beula> i use honcho to do that now.
2017-07-02T15:49:30.080389
Johana
pythondev_help_Johana_2017-07-02T15:49:30.080389
1,499,010,570.080389
83,918
pythondev
help
I tried to run the worker and beat with django-beat and it didn't seem to work
2017-07-02T15:49:33.080659
Mariano
pythondev_help_Mariano_2017-07-02T15:49:33.080659
1,499,010,573.080659
83,919
pythondev
help
<https://github.com/nickstenning/honcho>
2017-07-02T15:49:51.081927
Johana
pythondev_help_Johana_2017-07-02T15:49:51.081927
1,499,010,591.081927
83,920
pythondev
help
And running django in a docker container involves too much hacking. I prefer to just run postgres and redis in it
2017-07-02T15:50:04.082973
Mariano
pythondev_help_Mariano_2017-07-02T15:50:04.082973
1,499,010,604.082973
83,921
pythondev
help
but you can use it as a library.
2017-07-02T15:50:08.083270
Johana
pythondev_help_Johana_2017-07-02T15:50:08.083270
1,499,010,608.08327
83,922
pythondev
help
Looks like celery got rid of the `--autoreload` option :cry:
2017-07-02T15:50:50.086309
Beula
pythondev_help_Beula_2017-07-02T15:50:50.086309
1,499,010,650.086309
83,923
pythondev
help
you don’t necessarily need the Procfile
2017-07-02T15:50:53.086552
Johana
pythondev_help_Johana_2017-07-02T15:50:53.086552
1,499,010,653.086552
83,924
pythondev
help
Yeah <@Mariano> I have docker running postgres and redis
2017-07-02T15:51:26.088868
Beula
pythondev_help_Beula_2017-07-02T15:51:26.088868
1,499,010,686.088868
83,925
pythondev
help
I wrote it on version 3 because i'm a cool kid
2017-07-02T15:52:38.094257
Mariano
pythondev_help_Mariano_2017-07-02T15:52:38.094257
1,499,010,758.094257
83,926
pythondev
help
thanks <@Johana> I will look at that
2017-07-02T15:52:44.094677
Beula
pythondev_help_Beula_2017-07-02T15:52:44.094677
1,499,010,764.094677
83,927
pythondev
help
What's new in v3?
2017-07-02T15:52:48.094941
Beula
pythondev_help_Beula_2017-07-02T15:52:48.094941
1,499,010,768.094941
83,928
pythondev
help
It changes the version field to `3`
2017-07-02T15:53:00.095808
Mariano
pythondev_help_Mariano_2017-07-02T15:53:00.095808
1,499,010,780.095808
83,929
pythondev
help
idk what else
2017-07-02T15:53:06.096205
Mariano
pythondev_help_Mariano_2017-07-02T15:53:06.096205
1,499,010,786.096205
83,930
pythondev
help
haha
2017-07-02T15:53:17.097035
Beula
pythondev_help_Beula_2017-07-02T15:53:17.097035
1,499,010,797.097035
83,931
pythondev
help
time to update...
2017-07-02T15:53:21.097394
Beula
pythondev_help_Beula_2017-07-02T15:53:21.097394
1,499,010,801.097394
83,932
pythondev
help
<@Beula> good example here: <https://github.com/hypothesis/h/blob/master/h/cli/commands/devserver.py#L60-L89>
2017-07-02T15:54:07.100820
Johana
pythondev_help_Johana_2017-07-02T15:54:07.100820
1,499,010,847.10082
83,933
pythondev
help
`os.environ[‘PYTHONUNBUFFERED’] = ‘true’`
2017-07-02T15:54:27.102350
Suellen
pythondev_help_Suellen_2017-07-02T15:54:27.102350
1,499,010,867.10235
83,934
pythondev
help
sorry about that paste
2017-07-02T15:54:57.104711
Johana
pythondev_help_Johana_2017-07-02T15:54:57.104711
1,499,010,897.104711
83,935
pythondev
help
:sweat: Now we are on docker-compose 3 too :wink:
2017-07-02T15:55:07.105495
Beula
pythondev_help_Beula_2017-07-02T15:55:07.105495
1,499,010,907.105495
83,936
pythondev
help
the example is the click cli that hypothesis (pyramid app) uses. then you can put this in your make file. <https://github.com/hypothesis/h/blob/master/Makefile#L30>
2017-07-02T15:56:02.109887
Johana
pythondev_help_Johana_2017-07-02T15:56:02.109887
1,499,010,962.109887
83,937
pythondev
help
Oh nice - I'll keep that in my back pocket. I like keeping things stupid simple as long as I can
2017-07-02T15:56:07.110250
Beula
pythondev_help_Beula_2017-07-02T15:56:07.110250
1,499,010,967.11025
83,938
pythondev
help
with flask, webpack, and react it’s nice.
2017-07-02T15:56:41.112808
Johana
pythondev_help_Johana_2017-07-02T15:56:41.112808
1,499,011,001.112808
83,939
pythondev
help
Yeah - that totally makes sense
2017-07-02T15:57:23.116020
Beula
pythondev_help_Beula_2017-07-02T15:57:23.116020
1,499,011,043.11602
83,940
pythondev
help
wow that's handy
2017-07-02T15:58:11.119584
Suellen
pythondev_help_Suellen_2017-07-02T15:58:11.119584
1,499,011,091.119584
83,941
pythondev
help
Yep, honcho is great. already in love
2017-07-02T16:36:37.291225
Beula
pythondev_help_Beula_2017-07-02T16:36:37.291225
1,499,013,397.291225
83,942
pythondev
help
glad you likez. :smile:
2017-07-02T16:46:41.334876
Johana
pythondev_help_Johana_2017-07-02T16:46:41.334876
1,499,014,001.334876
83,943
pythondev
help
are there any good channels like this for javascript? im having a small bug
2017-07-02T17:56:05.635327
Sherry
pythondev_help_Sherry_2017-07-02T17:56:05.635327
1,499,018,165.635327
83,944
pythondev
help
try <#C45V5EJ15|javascript> or <#C07EYDP25|webdev>
2017-07-02T17:57:05.639576
Mariano
pythondev_help_Mariano_2017-07-02T17:57:05.639576
1,499,018,225.639576
83,945
pythondev
help
Hi, all. I have three pandas data frame. Challenge them to unite and write the result to a file. The first two has common headers. a third plug on the left. ```len(frames) Out[1]: 3 result = pd.concat(frames) result.to_csv("file_name.csv", sep='\t', encoding='utf-8', index=False)``` Everything is good, except a wrong result, not beautiful. <http://imgur.com/VIoHXnel.png> this problem <http://imgur.com/cdUxjkrl.png> - so it looks in the editor and need <http://imgur.com/gmY8UtKl.png> <http://imgur.com/1e4fRKnl.png> I hope for your help, just don't know what I'm doing wrong. Thank you.
2017-07-03T03:41:00.462949
Georgeann
pythondev_help_Georgeann_2017-07-03T03:41:00.462949
1,499,053,260.462949
83,946
pythondev
help
Looks like you need `merge`, not `concat`.
2017-07-03T03:53:26.703334
Suellen
pythondev_help_Suellen_2017-07-03T03:53:26.703334
1,499,054,006.703334
83,947
pythondev
help
<@Suellen> the first two data frame which has common columns normally unites, the problem with the third. the third has no common poles with the first two. the `merge` would be for the first and second if I understand correctly. But why? And so they're fine.
2017-07-03T04:05:42.956185
Georgeann
pythondev_help_Georgeann_2017-07-03T04:05:42.956185
1,499,054,742.956185
83,948
pythondev
help
Due to having no common columns and no index, the third df is just appended to the end
2017-07-03T04:07:23.990292
Suellen
pythondev_help_Suellen_2017-07-03T04:07:23.990292
1,499,054,843.990292
83,949
pythondev
help
df.merge will merge the third df and the big one despite no common data between them
2017-07-03T04:07:58.002050
Suellen
pythondev_help_Suellen_2017-07-03T04:07:58.002050
1,499,054,878.00205
83,950
pythondev
help
nothing happens. first two should be together? Then the two third?
2017-07-03T04:20:52.274301
Georgeann
pythondev_help_Georgeann_2017-07-03T04:20:52.274301
1,499,055,652.274301
83,951
pythondev
help
```f = pd.merge(frames[0], frames[1]) g = pd.merge(f, frames[2]) Traceback (most recent call last): File "/home/cat/.virtualenvs/mof/local/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2882, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "&lt;ipython-input-2-2943dd979cc4&gt;", line 1, in &lt;module&gt; g = pd.merge(f, frames[2]) File "/home/cat/.virtualenvs/mof/local/lib/python2.7/site-packages/pandas/core/reshape/merge.py", line 53, in merge copy=copy, indicator=indicator) File "/home/cat/.virtualenvs/mof/local/lib/python2.7/site-packages/pandas/core/reshape/merge.py", line 553, in __init__ self._validate_specification() File "/home/cat/.virtualenvs/mof/local/lib/python2.7/site-packages/pandas/core/reshape/merge.py", line 928, in _validate_specification raise MergeError('No common columns to perform merge on') MergeError: No common columns to perform merge on ```
2017-07-03T04:24:44.359291
Georgeann
pythondev_help_Georgeann_2017-07-03T04:24:44.359291
1,499,055,884.359291
83,952
pythondev
help
[silly] question for the slack bot experts: in many examples I keep seeing a variable named BOT_ID, what is this ID? All I get from slack is the bot token
2017-07-03T07:54:29.587457
Caitlyn
pythondev_help_Caitlyn_2017-07-03T07:54:29.587457
1,499,068,469.587457
83,953
pythondev
help
that's not a silly question. It's the id of your bot that slack return when you use <https://api.slack.com/methods/rtm.connect>
2017-07-03T07:57:38.644476
Ciera
pythondev_help_Ciera_2017-07-03T07:57:38.644476
1,499,068,658.644476
83,954
pythondev
help
or `rtm.start` it's useful to filter message coming from your bot
2017-07-03T07:58:21.658066
Ciera
pythondev_help_Ciera_2017-07-03T07:58:21.658066
1,499,068,701.658066
83,955
pythondev
help
but normally they shouldn't need it as they can easily retrieve it for you
2017-07-03T07:58:53.667702
Ciera
pythondev_help_Ciera_2017-07-03T07:58:53.667702
1,499,068,733.667702
83,956
pythondev
help
this is a pretty basic questions - but when an exception is thrown the rest of the code after where the exception occurred is not executed unless it was handled in a `try` `except`?
2017-07-03T09:09:51.201023
Susann
pythondev_help_Susann_2017-07-03T09:09:51.201023
1,499,072,991.201023
83,957
pythondev
help
I'm deciding whether I should test code with a context manager of an object that throws an exception, although I don't think I am correct in the what happens
2017-07-03T09:10:38.220468
Susann
pythondev_help_Susann_2017-07-03T09:10:38.220468
1,499,073,038.220468
83,958
pythondev
help
yes. you can add a `finally` if you want a piece of code to always be executed
2017-07-03T09:10:42.222475
Ciera
pythondev_help_Ciera_2017-07-03T09:10:42.222475
1,499,073,042.222475
83,959
pythondev
help
it depends on the what but in some case it can overlapp yes
2017-07-03T09:11:47.248863
Ciera
pythondev_help_Ciera_2017-07-03T09:11:47.248863
1,499,073,107.248863
83,960
pythondev
help
so let's say that's the code and we're expecting a new_object to be created based on the paramteters, but an exception can occur like a URLError or something
2017-07-03T09:12:40.271046
Susann
pythondev_help_Susann_2017-07-03T09:12:40.271046
1,499,073,160.271046
83,961
pythondev
help
what I'm trying to do is test the correct exception is thrown/handled
2017-07-03T09:12:52.275601
Susann
pythondev_help_Susann_2017-07-03T09:12:52.275601
1,499,073,172.275601
83,962
pythondev
help
so I was thinking...
2017-07-03T09:12:56.277393
Susann
pythondev_help_Susann_2017-07-03T09:12:56.277393
1,499,073,176.277393
83,963
pythondev
help
`as new_object` looks strange to me
2017-07-03T09:15:32.341793
Suellen
pythondev_help_Suellen_2017-07-03T09:15:32.341793
1,499,073,332.341793
83,964
pythondev
help
If you are testing code I believe both pytest and unitest have special context manager to test errors
2017-07-03T09:15:48.348469
Ciera
pythondev_help_Ciera_2017-07-03T09:15:48.348469
1,499,073,348.348469
83,965
pythondev
help
just do ``` with self.assertRaises(URLError): new_object = NewObject(param_to_cause_exception) ```
2017-07-03T09:15:54.351171
Suellen
pythondev_help_Suellen_2017-07-03T09:15:54.351171
1,499,073,354.351171
83,966
pythondev
help
yah that is unittest
2017-07-03T09:15:59.353128
Susann
pythondev_help_Susann_2017-07-03T09:15:59.353128
1,499,073,359.353128
83,967
pythondev
help
also, don't test anything else in this function
2017-07-03T09:16:03.355190
Suellen
pythondev_help_Suellen_2017-07-03T09:16:03.355190
1,499,073,363.35519
83,968
pythondev
help
you're testing only the fact that wrong URL causes an exception
2017-07-03T09:16:17.360894
Suellen
pythondev_help_Suellen_2017-07-03T09:16:17.360894
1,499,073,377.360894
83,969
pythondev
help
in that case if the assert is correct the test will continue as expected
2017-07-03T09:16:33.367359
Ciera
pythondev_help_Ciera_2017-07-03T09:16:33.367359
1,499,073,393.367359
83,970
pythondev
help
with the `as new_object` I can pass it through the rest of the code as an exception object which I found here<https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertRaises>
2017-07-03T09:16:36.368569
Susann
pythondev_help_Susann_2017-07-03T09:16:36.368569
1,499,073,396.368569
83,971
pythondev
help
but <@Suellen> make a good point
2017-07-03T09:16:41.370825
Ciera
pythondev_help_Ciera_2017-07-03T09:16:41.370825
1,499,073,401.370825
83,972
pythondev
help
oh ok. You want to test what is in the exception ?
2017-07-03T09:17:03.379866
Ciera
pythondev_help_Ciera_2017-07-03T09:17:03.379866
1,499,073,423.379866
83,973
pythondev
help
thanks <@Suellen> that does make sense
2017-07-03T09:17:04.380404
Susann
pythondev_help_Susann_2017-07-03T09:17:04.380404
1,499,073,424.380404
83,974
pythondev
help
right
2017-07-03T09:17:08.381833
Susann
pythondev_help_Susann_2017-07-03T09:17:08.381833
1,499,073,428.381833
83,975
pythondev
help
and how the rest of the code responds to that <@Ciera> if that makes sense
2017-07-03T09:17:25.388958
Susann
pythondev_help_Susann_2017-07-03T09:17:25.388958
1,499,073,445.388958
83,976
pythondev
help
both object have the same name that's a little confusing
2017-07-03T09:17:45.397414
Ciera
pythondev_help_Ciera_2017-07-03T09:17:45.397414
1,499,073,465.397414
83,977
pythondev
help
you can interact with the exception after the `with` like any other object. For example to check what's inside
2017-07-03T09:18:21.412151
Ciera
pythondev_help_Ciera_2017-07-03T09:18:21.412151
1,499,073,501.412151
83,978
pythondev
help
right, check error codes and such
2017-07-03T09:18:39.419348
Susann
pythondev_help_Susann_2017-07-03T09:18:39.419348
1,499,073,519.419348
83,979
pythondev
help
I think I was incorrectly thinking of how the object would be handled if an exception was thrown (not under test)
2017-07-03T09:19:07.431535
Susann
pythondev_help_Susann_2017-07-03T09:19:07.431535
1,499,073,547.431535
83,980
pythondev
help
in my test I am asserting the correct exception is thrown given a bad parameter
2017-07-03T09:19:31.441423
Susann
pythondev_help_Susann_2017-07-03T09:19:31.441423
1,499,073,571.441423
83,981
pythondev
help
I think I've got it from here thanks guys <@Suellen> :taco: <@Ciera> :taco:
2017-07-03T09:20:20.461799
Susann
pythondev_help_Susann_2017-07-03T09:20:20.461799
1,499,073,620.461799
83,982
pythondev
help
I think I just gave you guys 2 tacos each but you guys were great so keep 'em
2017-07-03T09:20:59.478376
Susann
pythondev_help_Susann_2017-07-03T09:20:59.478376
1,499,073,659.478376
83,983
pythondev
help
thanks good luck :slightly_smiling_face:
2017-07-03T09:22:09.508017
Ciera
pythondev_help_Ciera_2017-07-03T09:22:09.508017
1,499,073,729.508017
83,984
pythondev
help
Best way to order a list based on another list?
2017-07-03T09:42:13.039564
Mariano
pythondev_help_Mariano_2017-07-03T09:42:13.039564
1,499,074,933.039564
83,985
pythondev
help
there is something like `sorted()`
2017-07-03T09:44:53.110885
Ciera
pythondev_help_Ciera_2017-07-03T09:44:53.110885
1,499,075,093.110885
83,986
pythondev
help
and I guess you can pass like a lambda to do custom sort
2017-07-03T09:45:13.120118
Ciera
pythondev_help_Ciera_2017-07-03T09:45:13.120118
1,499,075,113.120118
83,987
pythondev
help
``` &gt;&gt;&gt; order = ['b', 'c', 'a'] &gt;&gt;&gt; sorted(['a', 'b', 'c'], key=order.index) ['b', 'c', 'a'] &gt;&gt;&gt; ```
2017-07-03T09:49:16.231300
Suellen
pythondev_help_Suellen_2017-07-03T09:49:16.231300
1,499,075,356.2313
83,988
pythondev
help
yeah <@Vada> helped me on the django channel. btw have a :taco:
2017-07-03T09:49:31.238066
Mariano
pythondev_help_Mariano_2017-07-03T09:49:31.238066
1,499,075,371.238066
83,989
pythondev
help
<@Suellen> :taco: I missed that you could just provide order.index instead of a full on lambda. This will be much better
2017-07-03T09:51:03.279211
Vada
pythondev_help_Vada_2017-07-03T09:51:03.279211
1,499,075,463.279211
83,990
pythondev
help
:heart:
2017-07-03T09:51:12.283312
Suellen
pythondev_help_Suellen_2017-07-03T09:51:12.283312
1,499,075,472.283312
83,991
pythondev
help
Do you have a specific question about dns ?
2017-07-03T13:55:31.161611
Ciera
pythondev_help_Ciera_2017-07-03T13:55:31.161611
1,499,090,131.161611
83,992
pythondev
help
<@Ciera> I'm using namecheap
2017-07-03T13:58:53.224193
Suellen
pythondev_help_Suellen_2017-07-03T13:58:53.224193
1,499,090,333.224193
83,993
pythondev
help
Does this record look alright?
2017-07-03T13:59:00.226477
Suellen
pythondev_help_Suellen_2017-07-03T13:59:00.226477
1,499,090,340.226477
83,994
pythondev
help
Or should it be the whole domain name?
2017-07-03T13:59:16.231327
Suellen
pythondev_help_Suellen_2017-07-03T13:59:16.231327
1,499,090,356.231327
83,995
pythondev
help
this will point `www.my_awesome_website` to the same IP as `c.storage....`
2017-07-03T13:59:55.243267
Ciera
pythondev_help_Ciera_2017-07-03T13:59:55.243267
1,499,090,395.243267
83,996
pythondev
help
no you don't need to put the whole name
2017-07-03T14:00:06.247203
Ciera
pythondev_help_Ciera_2017-07-03T14:00:06.247203
1,499,090,406.247203
83,997
pythondev
help
so this should work :confused:
2017-07-03T14:00:15.250585
Suellen
pythondev_help_Suellen_2017-07-03T14:00:15.250585
1,499,090,415.250585
83,998
pythondev
help
yes
2017-07-03T14:00:21.252414
Ciera
pythondev_help_Ciera_2017-07-03T14:00:21.252414
1,499,090,421.252414
83,999
pythondev
help
if you do `dig www.my_awesome_website` you should see the result
2017-07-03T14:00:44.260521
Ciera
pythondev_help_Ciera_2017-07-03T14:00:44.260521
1,499,090,444.260521
84,000
pythondev
help
yep
2017-07-03T14:02:16.290077
Suellen
pythondev_help_Suellen_2017-07-03T14:02:16.290077
1,499,090,536.290077
84,001
pythondev
help
kinda...
2017-07-03T14:02:32.294934
Suellen
pythondev_help_Suellen_2017-07-03T14:02:32.294934
1,499,090,552.294934
84,002