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 | Or index for single values `[1]`. | 2019-02-28T18:54:58.169300 | Sasha | pythondev_help_Sasha_2019-02-28T18:54:58.169300 | 1,551,380,098.1693 | 11,521 |
pythondev | help | The "first and third" case is a little tricky to avoid calling the function twice, though. Can be done with a comprehension, I think, but easier to just use an intermediate variable. | 2019-02-28T18:56:32.169500 | Sasha | pythondev_help_Sasha_2019-02-28T18:56:32.169500 | 1,551,380,192.1695 | 11,522 |
pythondev | help | Slice with a step of 2 would probably do for the first and third case. | 2019-02-28T18:57:41.169700 | Carmen | pythondev_help_Carmen_2019-02-28T18:57:41.169700 | 1,551,380,261.1697 | 11,523 |
pythondev | help | Though then you're starting to run into code readability issues and should definitely be more explicit about what's going on. | 2019-02-28T18:58:08.169900 | Carmen | pythondev_help_Carmen_2019-02-28T18:58:08.169900 | 1,551,380,288.1699 | 11,524 |
pythondev | help | Nice, I didn't think of that. | 2019-02-28T18:59:28.170100 | Sasha | pythondev_help_Sasha_2019-02-28T18:59:28.170100 | 1,551,380,368.1701 | 11,525 |
pythondev | help | Thanks a lot, guys. I love this channel! | 2019-02-28T19:04:30.170300 | Jennifer | pythondev_help_Jennifer_2019-02-28T19:04:30.170300 | 1,551,380,670.1703 | 11,526 |
pythondev | help | I haven't had to do this yet, but still learned a lot for future reference. Thanks for asking the question <@Jennifer> and the answers <@Sasha> <@Carmen>! | 2019-02-28T19:46:57.170500 | Marth | pythondev_help_Marth_2019-02-28T19:46:57.170500 | 1,551,383,217.1705 | 11,527 |
pythondev | help | So I'm trying to test this code and getting the following error:
```
tests.py:11: in <module>
from minor_elder_youth import check_func
minor_elder_youth.py:3: in <module>
year = input("Enter your year of birth: ")
venv/lib/python3.6/site-packages/_pytest/capture.py:656: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
---------------------------------------------------------- Captured stdout -----------------------------------------------------------
Enter your year of birth:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================== 1 error in 0.17 seconds =======================================================
``` | 2019-03-01T02:00:39.171900 | Jamey | pythondev_help_Jamey_2019-03-01T02:00:39.171900 | 1,551,405,639.1719 | 11,528 |
pythondev | help | How does one test user input in `pytest` i.e input that is expected from the keyboard? | 2019-03-01T02:02:15.173200 | Jamey | pythondev_help_Jamey_2019-03-01T02:02:15.173200 | 1,551,405,735.1732 | 11,529 |
pythondev | help | Feedback on the code itself (how it can be improved etc) is also welcome :slightly_smiling_face: | 2019-03-01T02:02:50.173900 | Jamey | pythondev_help_Jamey_2019-03-01T02:02:50.173900 | 1,551,405,770.1739 | 11,530 |
pythondev | help | Hi guys. Do anyone of you have a cool project I can do to learn more about python? | 2019-03-01T04:09:58.176000 | Felisha | pythondev_help_Felisha_2019-03-01T04:09:58.176000 | 1,551,413,398.176 | 11,531 |
pythondev | help | <@Jamey> Tests don't expect input from the command line. You could create a file containing the test data and read from there. | 2019-03-01T04:46:35.177800 | Valeri | pythondev_help_Valeri_2019-03-01T04:46:35.177800 | 1,551,415,595.1778 | 11,532 |
pythondev | help | Or you could generally hard code things in the test if there aren't enough variables/data to qualify for creating a different file. | 2019-03-01T04:47:33.179200 | Valeri | pythondev_help_Valeri_2019-03-01T04:47:33.179200 | 1,551,415,653.1792 | 11,533 |
pythondev | help | I'm looking for a React guy if you're interested | 2019-03-01T04:48:38.179300 | Valeri | pythondev_help_Valeri_2019-03-01T04:48:38.179300 | 1,551,415,718.1793 | 11,534 |
pythondev | help | And django maybe | 2019-03-01T04:48:49.179500 | Valeri | pythondev_help_Valeri_2019-03-01T04:48:49.179500 | 1,551,415,729.1795 | 11,535 |
pythondev | help | does anyone used unicorn | 2019-03-01T05:09:01.180300 | Gearldine | pythondev_help_Gearldine_2019-03-01T05:09:01.180300 | 1,551,416,941.1803 | 11,536 |
pythondev | help | I am trying preform using gunicorn | 2019-03-01T05:09:24.180800 | Gearldine | pythondev_help_Gearldine_2019-03-01T05:09:24.180800 | 1,551,416,964.1808 | 11,537 |
pythondev | help | with tornado | 2019-03-01T05:09:36.181100 | Gearldine | pythondev_help_Gearldine_2019-03-01T05:09:36.181100 | 1,551,416,976.1811 | 11,538 |
pythondev | help | to consume all cores of cpu | 2019-03-01T05:09:47.181400 | Gearldine | pythondev_help_Gearldine_2019-03-01T05:09:47.181400 | 1,551,416,987.1814 | 11,539 |
pythondev | help | think there's a config in gunicorn showing the number of workers you can have | 2019-03-01T05:23:01.181900 | Mica | pythondev_help_Mica_2019-03-01T05:23:01.181900 | 1,551,417,781.1819 | 11,540 |
pythondev | help | under `workers` | 2019-03-01T05:23:06.182100 | Mica | pythondev_help_Mica_2019-03-01T05:23:06.182100 | 1,551,417,786.1821 | 11,541 |
pythondev | help | if I use a namedtemporaryfile with delete = False, the file will exist forever unless I delete it myself? | 2019-03-01T06:40:02.182800 | Alvina | pythondev_help_Alvina_2019-03-01T06:40:02.182800 | 1,551,422,402.1828 | 11,542 |
pythondev | help | <@Valeri> thanks for that :taco: | 2019-03-01T06:42:21.183000 | Jamey | pythondev_help_Jamey_2019-03-01T06:42:21.183000 | 1,551,422,541.183 | 11,543 |
pythondev | help | It depends on the operating system. But in general, no. | 2019-03-01T06:49:03.183300 | Jonas | pythondev_help_Jonas_2019-03-01T06:49:03.183300 | 1,551,422,943.1833 | 11,544 |
pythondev | help | They are temporary and may not survive restarts, or may be deleted at any point | 2019-03-01T06:49:26.183500 | Jonas | pythondev_help_Jonas_2019-03-01T06:49:26.183500 | 1,551,422,966.1835 | 11,545 |
pythondev | help | Hi again. I'm getting the following error:
```
=============================================================== ERRORS ===============================================================
_____________________________________________________ ERROR collecting tests.py ______________________________________________________
tests.py:1: in <module>
import minor_elder_youth
minor_elder_youth.py:12: in <module>
year = input("Enter your year of birth: ")
venv/lib/python3.6/site-packages/_pytest/capture.py:656: in read
raise IOError("reading from stdin while output is captured")
E OSError: reading from stdin while output is captured
---------------------------------------------------------- Captured stdout -----------------------------------------------------------
Enter your year of birth:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
====================================================== 1 error in 0.34 seconds =======================================================
``` | 2019-03-01T07:09:06.184700 | Jamey | pythondev_help_Jamey_2019-03-01T07:09:06.184700 | 1,551,424,146.1847 | 11,546 |
pythondev | help | you'll probably need to mock `input` | 2019-03-01T07:11:06.185000 | Karoline | pythondev_help_Karoline_2019-03-01T07:11:06.185000 | 1,551,424,266.185 | 11,547 |
pythondev | help | there's not really a way to have input happen during a test without it | 2019-03-01T07:11:45.185800 | Karoline | pythondev_help_Karoline_2019-03-01T07:11:45.185800 | 1,551,424,305.1858 | 11,548 |
pythondev | help | I thought just importing the function would work. The input is outside the function. | 2019-03-01T07:11:52.186000 | Jamey | pythondev_help_Jamey_2019-03-01T07:11:52.186000 | 1,551,424,312.186 | 11,549 |
pythondev | help | So the tests should (in theory) just work | 2019-03-01T07:12:09.186400 | Jamey | pythondev_help_Jamey_2019-03-01T07:12:09.186400 | 1,551,424,329.1864 | 11,550 |
pythondev | help | ¯\_(ツ)_/¯ | 2019-03-01T07:12:11.186500 | Jamey | pythondev_help_Jamey_2019-03-01T07:12:11.186500 | 1,551,424,331.1865 | 11,551 |
pythondev | help | is `input` inside another function or global to the module (minor_elder_youth.py)? | 2019-03-01T07:12:38.186900 | Karoline | pythondev_help_Karoline_2019-03-01T07:12:38.186900 | 1,551,424,358.1869 | 11,552 |
pythondev | help | It is global | 2019-03-01T07:13:50.187300 | Jamey | pythondev_help_Jamey_2019-03-01T07:13:50.187300 | 1,551,424,430.1873 | 11,553 |
pythondev | help | Here's the module | 2019-03-01T07:14:32.187500 | Jamey | pythondev_help_Jamey_2019-03-01T07:14:32.187500 | 1,551,424,472.1875 | 11,554 |
pythondev | help | Initially I'd put the `input` and `datetime.strptime` stuff at the top but I thought that could be why the test is failing, so I tried moving it lower down to see if that would work. | 2019-03-01T07:15:32.188900 | Jamey | pythondev_help_Jamey_2019-03-01T07:15:32.188900 | 1,551,424,532.1889 | 11,555 |
pythondev | help | yeah so when you import the module, that input fires | 2019-03-01T07:16:05.189500 | Karoline | pythondev_help_Karoline_2019-03-01T07:16:05.189500 | 1,551,424,565.1895 | 11,556 |
pythondev | help | there might be a way to mock stdin with pytest | 2019-03-01T07:16:06.189800 | Jimmy | pythondev_help_Jimmy_2019-03-01T07:16:06.189800 | 1,551,424,566.1898 | 11,557 |
pythondev | help | with something like `expect` | 2019-03-01T07:16:11.190000 | Jimmy | pythondev_help_Jimmy_2019-03-01T07:16:11.190000 | 1,551,424,571.19 | 11,558 |
pythondev | help | And here's the test module for completeness | 2019-03-01T07:16:17.190300 | Jamey | pythondev_help_Jamey_2019-03-01T07:16:17.190300 | 1,551,424,577.1903 | 11,559 |
pythondev | help | you'll want to move the input to something like:
```
if __name__ == '__main__':
year = input('blah blah')
``` | 2019-03-01T07:16:48.191500 | Karoline | pythondev_help_Karoline_2019-03-01T07:16:48.191500 | 1,551,424,608.1915 | 11,560 |
pythondev | help | Hmmm... Is there a way to avoid that? <@Karoline> | 2019-03-01T07:16:52.191900 | Jamey | pythondev_help_Jamey_2019-03-01T07:16:52.191900 | 1,551,424,612.1919 | 11,561 |
pythondev | help | Oh seen your response. My bad :sweat_smile: | 2019-03-01T07:17:12.192700 | Jamey | pythondev_help_Jamey_2019-03-01T07:17:12.192700 | 1,551,424,632.1927 | 11,562 |
pythondev | help | that sort of thing - so that way it only executes that code when the module is run as the main entry point of a program | 2019-03-01T07:17:15.192900 | Karoline | pythondev_help_Karoline_2019-03-01T07:17:15.192900 | 1,551,424,635.1929 | 11,563 |
pythondev | help | Okay cool. Thanks for that. `mock` seemed a bit _much_ for what I'm doing here. Thanks <@Karoline> :taco: | 2019-03-01T07:17:57.193600 | Jamey | pythondev_help_Jamey_2019-03-01T07:17:57.193600 | 1,551,424,677.1936 | 11,564 |
pythondev | help | yeah I think changing the structure will improve the layout of things anyway, so it's good to do. | 2019-03-01T07:18:21.194000 | Karoline | pythondev_help_Karoline_2019-03-01T07:18:21.194000 | 1,551,424,701.194 | 11,565 |
pythondev | help | How do I get only the year in a datetime object so that I can use it in subtraction? | 2019-03-01T07:30:22.194900 | Jamey | pythondev_help_Jamey_2019-03-01T07:30:22.194900 | 1,551,425,422.1949 | 11,566 |
pythondev | help | ```In [2]: dt = datetime.now()
In [3]: dt.year
Out[3]: 2019``` | 2019-03-01T07:37:18.196800 | Hiroko | pythondev_help_Hiroko_2019-03-01T07:37:18.196800 | 1,551,425,838.1968 | 11,567 |
pythondev | help | afaik you should use `timedelta` when subtracting with `datetime` | 2019-03-01T07:38:01.197500 | Jimmy | pythondev_help_Jimmy_2019-03-01T07:38:01.197500 | 1,551,425,881.1975 | 11,568 |
pythondev | help | yep | 2019-03-01T07:40:17.198100 | Hiroko | pythondev_help_Hiroko_2019-03-01T07:40:17.198100 | 1,551,426,017.1981 | 11,569 |
pythondev | help | but also <@Jamey> check the docs for what is available for a datetime object :slightly_smiling_face: | 2019-03-01T07:40:40.198700 | Hiroko | pythondev_help_Hiroko_2019-03-01T07:40:40.198700 | 1,551,426,040.1987 | 11,570 |
pythondev | help | <@Hiroko> I thought I hadn't posted the question :joy: | 2019-03-01T07:41:16.199300 | Jamey | pythondev_help_Jamey_2019-03-01T07:41:16.199300 | 1,551,426,076.1993 | 11,571 |
pythondev | help | :stuck_out_tongue_winking_eye: | 2019-03-01T07:41:24.199600 | Hiroko | pythondev_help_Hiroko_2019-03-01T07:41:24.199600 | 1,551,426,084.1996 | 11,572 |
pythondev | help | Figured it out using StackOverflow and testing it out in the Python interpreter :sunglasses: | 2019-03-01T07:41:47.200100 | Jamey | pythondev_help_Jamey_2019-03-01T07:41:47.200100 | 1,551,426,107.2001 | 11,573 |
pythondev | help | okay, thanks | 2019-03-01T08:15:27.200200 | Alvina | pythondev_help_Alvina_2019-03-01T08:15:27.200200 | 1,551,428,127.2002 | 11,574 |
pythondev | help | using Multiprocessing Pools() - what is the limit to the number of jobs that can run at once? on a 4 core machine I can obviously have less pools than on an 8 core machine? | 2019-03-01T08:22:27.201500 | Alvina | pythondev_help_Alvina_2019-03-01T08:22:27.201500 | 1,551,428,547.2015 | 11,575 |
pythondev | help | I'm reading a large file (many GBs) and compressing every 50MB into a gzip chunk of like 8MB - I'm wondering if I can set the pools to some crazy number to get things done quicker | 2019-03-01T08:24:11.202600 | Alvina | pythondev_help_Alvina_2019-03-01T08:24:11.202600 | 1,551,428,651.2026 | 11,576 |
pythondev | help | Anyone here with experience deploying a static Django app on Heroku? | 2019-03-01T09:06:54.205300 | Conchita | pythondev_help_Conchita_2019-03-01T09:06:54.205300 | 1,551,431,214.2053 | 11,577 |
pythondev | help | Been fondling with it for a couple of hours now, where I think my main issue is the Procfile | 2019-03-01T09:07:34.206100 | Conchita | pythondev_help_Conchita_2019-03-01T09:07:34.206100 | 1,551,431,254.2061 | 11,578 |
pythondev | help | bestplace would be <#C0LMFRMB5|django> or <#C22DMH61M|devops> | 2019-03-01T09:07:59.206500 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:07:59.206500 | 1,551,431,279.2065 | 11,579 |
pythondev | help | and if possible show the procfile | 2019-03-01T09:08:18.206900 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:08:18.206900 | 1,551,431,298.2069 | 11,580 |
pythondev | help | hii devs one small question
which beautiful soup version will be used when i do ``` import bs4 ``` if both 4.6.0 and 4.7.1 are installed | 2019-03-01T09:30:26.209200 | Carissa | pythondev_help_Carissa_2019-03-01T09:30:26.209200 | 1,551,432,626.2092 | 11,581 |
pythondev | help | <@Alvina> There is no hard limit to how many processes you can have in a pool, or even how many pools you can have (though you should probably re-evaluate whether you need more than one or two pools at all). | 2019-03-01T09:31:55.210200 | Carmen | pythondev_help_Carmen_2019-03-01T09:31:55.210200 | 1,551,432,715.2102 | 11,582 |
pythondev | help | The effective limit is how many processes it takes before context switching between them starts to degrade performance more than the multiprocessing enhances performance. | 2019-03-01T09:32:38.211100 | Carmen | pythondev_help_Carmen_2019-03-01T09:32:38.211100 | 1,551,432,758.2111 | 11,583 |
pythondev | help | That's 100% dependent on your workflow and the tasks you're running (CPU bound, IO bound, memory bound, etc.). | 2019-03-01T09:33:07.211700 | Carmen | pythondev_help_Carmen_2019-03-01T09:33:07.211700 | 1,551,432,787.2117 | 11,584 |
pythondev | help | A good rule of thumb to start out is number of cores * 4. | 2019-03-01T09:33:27.212200 | Carmen | pythondev_help_Carmen_2019-03-01T09:33:27.212200 | 1,551,432,807.2122 | 11,585 |
pythondev | help | <@Carissa> you can't have both installed for the same python environment | 2019-03-01T09:34:05.212800 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:34:05.212800 | 1,551,432,845.2128 | 11,586 |
pythondev | help | so the answer is the one installed for that environment | 2019-03-01T09:34:17.213200 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:34:17.213200 | 1,551,432,857.2132 | 11,587 |
pythondev | help | <@Carmen> okay cool. thanks. yeah - there are clear performance gains up to a certain point as I tweak the number of processes and the size of the files I am compressing, i guess I will just play around and monitor it | 2019-03-01T09:36:36.215600 | Alvina | pythondev_help_Alvina_2019-03-01T09:36:36.215600 | 1,551,432,996.2156 | 11,588 |
pythondev | help | no <@Jimmy> i am creating one enviornment where i have downloaded .tar file of beautiful soup and then i call one script which append both versions path in ```sys.path``` and then after i call ``` import bs4 ``` | 2019-03-01T09:37:12.216300 | Carissa | pythondev_help_Carissa_2019-03-01T09:37:12.216300 | 1,551,433,032.2163 | 11,589 |
pythondev | help | my all functionality works fine but i have doubt which version is used | 2019-03-01T09:38:09.217200 | Carissa | pythondev_help_Carissa_2019-03-01T09:38:09.217200 | 1,551,433,089.2172 | 11,590 |
pythondev | help | AFAIK it scan the syspath in order | 2019-03-01T09:38:45.217700 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:38:45.217700 | 1,551,433,125.2177 | 11,591 |
pythondev | help | so the first you append to the sys.path | 2019-03-01T09:38:54.218000 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:38:54.218000 | 1,551,433,134.218 | 11,592 |
pythondev | help | there might be a way to access the bs4 version in code to you are sure | 2019-03-01T09:39:20.218500 | Jimmy | pythondev_help_Jimmy_2019-03-01T09:39:20.218500 | 1,551,433,160.2185 | 11,593 |
pythondev | help | ```In [1]: import bs4
In [2]: bs4.__version__
Out[2]: '4.7.1'
``` | 2019-03-01T09:45:58.218700 | Jonas | pythondev_help_Jonas_2019-03-01T09:45:58.218700 | 1,551,433,558.2187 | 11,594 |
pythondev | help | I’m having a hell of a time trying to get cufflinks to work in my jupyter lab.
I can’t get any cells to run and my browser console is reporting
> Uncaught ReferenceError: define is not defined
> WebSocket connection to ‘<ws://localhost:8888/api/kernels/3efc3481-8b91-4232-90a5-ebf0a9a85228/channels?session_id=b8993fec-6603-4328-97b0-5d56432534d5&token=c1d624364b33baf73d406115c45f981098e6a4d819da9ca7>’ failed: Error during WebSocket handshake: Unexpected response code: 200
Does anyone have any idea? My workflow was:
1. $ virtualenv [DIRECTORY NAME]
2. $ source [DIRECTORY NAME]/bin/activate
3. $ pip3 install jupyter jupyterlab pandas matplotlib cufflinks sqlalchemy mysqlclient
4. $ jupyter labextension install @jupyterlab/plotly-extension | 2019-03-01T13:08:41.220500 | Cammie | pythondev_help_Cammie_2019-03-01T13:08:41.220500 | 1,551,445,721.2205 | 11,595 |
pythondev | help | What's a react guy? | 2019-03-01T13:17:34.221200 | Felisha | pythondev_help_Felisha_2019-03-01T13:17:34.221200 | 1,551,446,254.2212 | 11,596 |
pythondev | help | hello, my pytest setup is using an old pathlib (1.0.1) that is not compatible. How can I force it to use pathlib2?
```
INTERNALERROR> File "/home/circleci/project/.eggs/pytest-4.3.0-py3.7.egg/_pytest/pathlib.py", line 276, in resolve_from_str
INTERNALERROR> root = Path(root)
INTERNALERROR> File "/home/circleci/project/.eggs/pathlib-1.0.1-py3.7.egg/pathlib.py", line 936, in __new__
INTERNALERROR> self = cls._from_parts(args, init=False)
INTERNALERROR> File "/home/circleci/project/.eggs/pathlib-1.0.1-py3.7.egg/pathlib.py", line 613, in _from_parts
INTERNALERROR> drv, root, parts = self._parse_args(args)
INTERNALERROR> File "/home/circleci/project/.eggs/pathlib-1.0.1-py3.7.egg/pathlib.py", line 605, in _parse_args
INTERNALERROR> % type(a))
INTERNALERROR> TypeError: argument should be a path or str object, not <class 'py._path.local.LocalPath'>
``` | 2019-03-01T14:03:06.222900 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:03:06.222900 | 1,551,448,986.2229 | 11,597 |
pythondev | help | was this installed as a dependency of py.test?.. have you tried explicitly installing pathlib2 after py.test? (may be in your requirements file?) | 2019-03-01T14:06:02.223100 | Stan | pythondev_help_Stan_2019-03-01T14:06:02.223100 | 1,551,449,162.2231 | 11,598 |
pythondev | help | let me try. I run setup.py during testing which installs what's listed in setup.py | 2019-03-01T14:15:18.223300 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:15:18.223300 | 1,551,449,718.2233 | 11,599 |
pythondev | help | ok, pytest has this code:
```
from .compat import PY36
if PY36:
from pathlib import Path, PurePath
else:
from pathlib2 import Path, PurePath
``` | 2019-03-01T14:19:13.223500 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:19:13.223500 | 1,551,449,953.2235 | 11,600 |
pythondev | help | for some reason, it's using the PY36 compatibility mode even though it's running under Python 3.7 | 2019-03-01T14:20:07.223800 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:20:07.223800 | 1,551,450,007.2238 | 11,601 |
pythondev | help | I don't have a py setup with me right now, but perhaps you could try `from .compat import PY36` on your python 3.7 interpreter and look into it further | 2019-03-01T14:22:04.224000 | Stan | pythondev_help_Stan_2019-03-01T14:22:04.224000 | 1,551,450,124.224 | 11,602 |
pythondev | help | thanks. I'see if I can debug it | 2019-03-01T14:29:31.224300 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:29:31.224300 | 1,551,450,571.2243 | 11,603 |
pythondev | help | ```
import sys
PY36 = sys.version_info[:2] >= (3, 6)
``` | 2019-03-01T14:30:08.224600 | Deangelo | pythondev_help_Deangelo_2019-03-01T14:30:08.224600 | 1,551,450,608.2246 | 11,604 |
pythondev | help | This isn't necessarily Boto specific but I'm using the Boto3 API to get some metrics for AWS services but the dimensions differ depending on the service, is there any way to handle this without putting the whole call for metric statistics in a if s3 do this else do this?
I tried concatenating with the `+` but it doesn't output correctly:
```
s3_dimen = ""
if using_s3:
s3_dimen = ", { 'Name': 'StorageType', 'Value': 'StandardStorage' }"
metrics = s3_client.get_metric_statistics(
Namespace=str(namespace),
Dimensions=[
{
'Name': str(dimension_name),
'Value': str(resource_id)
} + s3
],
``` | 2019-03-01T15:57:59.225200 | Alethea | pythondev_help_Alethea_2019-03-01T15:57:59.225200 | 1,551,455,879.2252 | 11,605 |
pythondev | help | You shouldn’t have `pathlib` installed at all, it’s old and deprecated, and it’s shadowing the stdlib version. | 2019-03-01T15:58:14.225300 | Letty | pythondev_help_Letty_2019-03-01T15:58:14.225300 | 1,551,455,894.2253 | 11,606 |
pythondev | help | pytest is correctly trying to call the stdlib version of `pathlib` for python 3.6+, not expecting you to have the pypi package installed. | 2019-03-01T15:58:51.225700 | Letty | pythondev_help_Letty_2019-03-01T15:58:51.225700 | 1,551,455,931.2257 | 11,607 |
pythondev | help | Looks like you're trying to concatenate a dictionary and a string? | 2019-03-01T15:59:00.226000 | Lillia | pythondev_help_Lillia_2019-03-01T15:59:00.226000 | 1,551,455,940.226 | 11,608 |
pythondev | help | Can you define a dimensions list and then append to it if you're querying S3? | 2019-03-01T15:59:44.226300 | Lillia | pythondev_help_Lillia_2019-03-01T15:59:44.226300 | 1,551,455,984.2263 | 11,609 |
pythondev | help | Ah, yeah thanks for the suggestions | 2019-03-01T16:01:39.226700 | Alethea | pythondev_help_Alethea_2019-03-01T16:01:39.226700 | 1,551,456,099.2267 | 11,610 |
pythondev | help | <@Letty> yeah, I realize that now. But I don't explicitly install pathlib. I might be coming from another dependency. How do I resolve that in my circle ci pipeline? do I explicitly run a `pip uninstall pathlib`? problem with that is the `python setup.py test` does both install and test | 2019-03-01T17:48:12.227800 | Deangelo | pythondev_help_Deangelo_2019-03-01T17:48:12.227800 | 1,551,462,492.2278 | 11,611 |
pythondev | help | Tough to say, if you’re doing `pip install -r ./requirements.txt` or similar, then anything might be pulling in the dependency.
`pipenv` handles this well, you may be able to do (just once, no need to switch) `pipenv -r ./requirements.txt` and then use `pipenv graph --reverse` to see who pulled it in. | 2019-03-01T17:52:13.228000 | Letty | pythondev_help_Letty_2019-03-01T17:52:13.228000 | 1,551,462,733.228 | 11,612 |
pythondev | help | alternatively, install your requirements.txt one at a time, by hand, and see when `pathlib` is installed by looking for that pahtlib egg directory. | 2019-03-01T17:53:23.228200 | Letty | pythondev_help_Letty_2019-03-01T17:53:23.228200 | 1,551,462,803.2282 | 11,613 |
pythondev | help | ok, good idea | 2019-03-01T17:54:27.228400 | Deangelo | pythondev_help_Deangelo_2019-03-01T17:54:27.228400 | 1,551,462,867.2284 | 11,614 |
pythondev | help | how do I wipe out the current dependencies to observe the process from scratch | 2019-03-01T17:58:01.228600 | Deangelo | pythondev_help_Deangelo_2019-03-01T17:58:01.228600 | 1,551,463,081.2286 | 11,615 |
pythondev | help | because I can't closely watch the CI task (CircleCI or Travis) | 2019-03-01T17:58:37.228800 | Deangelo | pythondev_help_Deangelo_2019-03-01T17:58:37.228800 | 1,551,463,117.2288 | 11,616 |
pythondev | help | found the culprit | 2019-03-01T18:11:19.229200 | Deangelo | pythondev_help_Deangelo_2019-03-01T18:11:19.229200 | 1,551,463,879.2292 | 11,617 |
pythondev | help | ```
openapi-spec-validator==0.2.6
jsonschema==3.0.0
attrs==18.2.0
pyrsistent==0.14.11
six==1.12.0
setuptools==40.8.0
six==1.12.0
pathlib==1.0.1
PyYAML==5.1b3
six==1.12.0
``` | 2019-03-01T18:11:30.229400 | Deangelo | pythondev_help_Deangelo_2019-03-01T18:11:30.229400 | 1,551,463,890.2294 | 11,618 |
pythondev | help | `openapi-spec-validator==0.2.6` | 2019-03-01T18:11:39.229600 | Deangelo | pythondev_help_Deangelo_2019-03-01T18:11:39.229600 | 1,551,463,899.2296 | 11,619 |
pythondev | help | which in turn comes from `connexion==2018.0.dev1` | 2019-03-01T18:12:00.229800 | Deangelo | pythondev_help_Deangelo_2019-03-01T18:12:00.229800 | 1,551,463,920.2298 | 11,620 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.