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, your credentials are wrong
2019-01-19T17:28:55.806000
Jonas
pythondev_help_Jonas_2019-01-19T17:28:55.806000
1,547,918,935.806
3,121
pythondev
help
error:Exception has occurred: AttributeError module 'numpy' has no attribute '__version__'
2019-01-19T18:20:02.806100
Candi
pythondev_help_Candi_2019-01-19T18:20:02.806100
1,547,922,002.8061
3,122
pythondev
help
What exactly is the problem?
2019-01-19T18:20:55.807200
Jonas
pythondev_help_Jonas_2019-01-19T18:20:55.807200
1,547,922,055.8072
3,123
pythondev
help
I am not able to understand the issue as numpy is installed when I do pip list it says numpy 1.16.0 is installed
2019-01-19T18:21:54.807900
Candi
pythondev_help_Candi_2019-01-19T18:21:54.807900
1,547,922,114.8079
3,124
pythondev
help
Ok, then 1.16.0 is installed
2019-01-19T18:22:15.808400
Jonas
pythondev_help_Jonas_2019-01-19T18:22:15.808400
1,547,922,135.8084
3,125
pythondev
help
I am on linux using vscode
2019-01-19T18:22:15.808500
Candi
pythondev_help_Candi_2019-01-19T18:22:15.808500
1,547,922,135.8085
3,126
pythondev
help
you can still use Numpy, perhaps they removed `__version__` in version 1.16
2019-01-19T18:22:33.809100
Jonas
pythondev_help_Jonas_2019-01-19T18:22:33.809100
1,547,922,153.8091
3,127
pythondev
help
I know there are other changes they made
2019-01-19T18:22:38.809400
Jonas
pythondev_help_Jonas_2019-01-19T18:22:38.809400
1,547,922,158.8094
3,128
pythondev
help
You know 1.16 is installed, there is no need to use `__version__`
2019-01-19T18:22:58.809900
Jonas
pythondev_help_Jonas_2019-01-19T18:22:58.809900
1,547,922,178.8099
3,129
pythondev
help
okay I ran this code and the error is Exception has occurred: AttributeError module 'numpy' has no attribute 'arange'
2019-01-19T18:24:51.810200
Candi
pythondev_help_Candi_2019-01-19T18:24:51.810200
1,547,922,291.8102
3,130
pythondev
help
can you run `print(np)` and paste the results here?
2019-01-19T18:26:27.810700
Jonas
pythondev_help_Jonas_2019-01-19T18:26:27.810700
1,547,922,387.8107
3,131
pythondev
help
I think numpy v1.16 changed a lot of things
2019-01-19T18:27:52.811200
Jonas
pythondev_help_Jonas_2019-01-19T18:27:52.811200
1,547,922,472.8112
3,132
pythondev
help
error:
2019-01-19T18:27:57.811400
Candi
pythondev_help_Candi_2019-01-19T18:27:57.811400
1,547,922,477.8114
3,133
pythondev
help
try running `pip install "numpy<1.16.0"`
2019-01-19T18:28:00.811800
Jonas
pythondev_help_Jonas_2019-01-19T18:28:00.811800
1,547,922,480.8118
3,134
pythondev
help
Exception has occurred: AttributeError module 'numpy' has no attribute 'array'
2019-01-19T18:28:21.812100
Candi
pythondev_help_Candi_2019-01-19T18:28:21.812100
1,547,922,501.8121
3,135
pythondev
help
is it because I am using vscode instead of anaconda and jupiter?
2019-01-19T18:28:59.812900
Candi
pythondev_help_Candi_2019-01-19T18:28:59.812900
1,547,922,539.8129
3,136
pythondev
help
None
2019-01-19T18:29:10.813000
Jonas
pythondev_help_Jonas_2019-01-19T18:29:10.813000
1,547,922,550.813
3,137
pythondev
help
<module 'numpy' from '/home/kewal/Desktop/python_practice/numpy/numpy.py'> <module 'numpy' from '/home/kewal/Desktop/python_practice/numpy/numpy.py'>
2019-01-19T18:31:10.813200
Candi
pythondev_help_Candi_2019-01-19T18:31:10.813200
1,547,922,670.8132
3,138
pythondev
help
this is the output of import numpy as np and then print
2019-01-19T18:31:58.814100
Candi
pythondev_help_Candi_2019-01-19T18:31:58.814100
1,547,922,718.8141
3,139
pythondev
help
ok
2019-01-19T18:32:07.814800
Jonas
pythondev_help_Jonas_2019-01-19T18:32:07.814800
1,547,922,727.8148
3,140
pythondev
help
Do you happen to have a local Python file named "numpy"? In your folder?
2019-01-19T18:32:08.815000
Marita
pythondev_help_Marita_2019-01-19T18:32:08.815000
1,547,922,728.815
3,141
pythondev
help
so you have a python file called `numpy`
2019-01-19T18:32:14.815300
Jonas
pythondev_help_Jonas_2019-01-19T18:32:14.815300
1,547,922,734.8153
3,142
pythondev
help
rename this
2019-01-19T18:32:16.815500
Jonas
pythondev_help_Jonas_2019-01-19T18:32:16.815500
1,547,922,736.8155
3,143
pythondev
help
the reason behind the error may be a bit too deep, but I can explain it if you wish
2019-01-19T18:32:27.815900
Jonas
pythondev_help_Jonas_2019-01-19T18:32:27.815900
1,547,922,747.8159
3,144
pythondev
help
rename `numpy` to anything else
2019-01-19T18:32:36.816100
Jonas
pythondev_help_Jonas_2019-01-19T18:32:36.816100
1,547,922,756.8161
3,145
pythondev
help
so the python scripts name is numpy.py
2019-01-19T18:32:54.816600
Candi
pythondev_help_Candi_2019-01-19T18:32:54.816600
1,547,922,774.8166
3,146
pythondev
help
I have namespace = 'dev' and i execute execute_remote_command("mkdir -p {}".format(namespace), False)
2019-01-19T18:33:16.816900
Lanelle
pythondev_help_Lanelle_2019-01-19T18:33:16.816900
1,547,922,796.8169
3,147
pythondev
help
now if i introduce a list
2019-01-19T18:33:21.817100
Lanelle
pythondev_help_Lanelle_2019-01-19T18:33:21.817100
1,547,922,801.8171
3,148
pythondev
help
namespace = ['stage', 'prod']
2019-01-19T18:33:27.817400
Lanelle
pythondev_help_Lanelle_2019-01-19T18:33:27.817400
1,547,922,807.8174
3,149
pythondev
help
how can i rewrite the execute_remote_command
2019-01-19T18:33:33.817900
Lanelle
pythondev_help_Lanelle_2019-01-19T18:33:33.817900
1,547,922,813.8179
3,150
pythondev
help
yes, rename it to anything other than `numpy` <@Candi>
2019-01-19T18:33:36.818000
Jonas
pythondev_help_Jonas_2019-01-19T18:33:36.818000
1,547,922,816.818
3,151
pythondev
help
<@Jonas> and <@Marita> it worked thank you somuch
2019-01-19T18:35:09.818800
Candi
pythondev_help_Candi_2019-01-19T18:35:09.818800
1,547,922,909.8188
3,152
pythondev
help
<@Jonas> can you explain the reason
2019-01-19T18:35:47.819400
Candi
pythondev_help_Candi_2019-01-19T18:35:47.819400
1,547,922,947.8194
3,153
pythondev
help
When you run `import numpy` Python does a few things
2019-01-19T18:36:27.819700
Jonas
pythondev_help_Jonas_2019-01-19T18:36:27.819700
1,547,922,987.8197
3,154
pythondev
help
it looks for a *thing* called `numpy` and imports it
2019-01-19T18:36:42.820100
Jonas
pythondev_help_Jonas_2019-01-19T18:36:42.820100
1,547,923,002.8201
3,155
pythondev
help
the way it searches for these things is by looking first for a file in the current directory
2019-01-19T18:37:01.820700
Jonas
pythondev_help_Jonas_2019-01-19T18:37:01.820700
1,547,923,021.8207
3,156
pythondev
help
then for things you have installed
2019-01-19T18:37:06.820900
Jonas
pythondev_help_Jonas_2019-01-19T18:37:06.820900
1,547,923,026.8209
3,157
pythondev
help
(this isn’t totally correct but it’s close enough)
2019-01-19T18:37:16.821200
Jonas
pythondev_help_Jonas_2019-01-19T18:37:16.821200
1,547,923,036.8212
3,158
pythondev
help
so when you had a file called numpy
2019-01-19T18:37:23.821500
Jonas
pythondev_help_Jonas_2019-01-19T18:37:23.821500
1,547,923,043.8215
3,159
pythondev
help
and you did `import numpy`
2019-01-19T18:37:26.821700
Jonas
pythondev_help_Jonas_2019-01-19T18:37:26.821700
1,547,923,046.8217
3,160
pythondev
help
it imported *your file*, not numpy that you installed
2019-01-19T18:37:37.822100
Jonas
pythondev_help_Jonas_2019-01-19T18:37:37.822100
1,547,923,057.8221
3,161
pythondev
help
because things you install are just a bunch of python scripts in a specific place
2019-01-19T18:38:16.822500
Jonas
pythondev_help_Jonas_2019-01-19T18:38:16.822500
1,547,923,096.8225
3,162
pythondev
help
imagine `pip install numpy` installed a file called `numpy.py` in a specific folder on your machine
2019-01-19T18:38:40.823100
Jonas
pythondev_help_Jonas_2019-01-19T18:38:40.823100
1,547,923,120.8231
3,163
pythondev
help
when you ran `import numpy` how does python know which `numpy.py` to load?
2019-01-19T18:38:54.823500
Jonas
pythondev_help_Jonas_2019-01-19T18:38:54.823500
1,547,923,134.8235
3,164
pythondev
help
How do I form a loop to print all ids' from a json dump when the root object's name is not specified, like so: ```[{"id":258205385,"title":"inbox","owner_type":"user","owner_id":24392120.....```
2019-01-19T18:51:35.825000
Jackie
pythondev_help_Jackie_2019-01-19T18:51:35.825000
1,547,923,895.825
3,165
pythondev
help
It's not completely clear what kind of data you have. Is it a list of dicts, each of which has an "id" field?
2019-01-19T18:58:52.825600
Sasha
pythondev_help_Sasha_2019-01-19T18:58:52.825600
1,547,924,332.8256
3,166
pythondev
help
yes, there are more objects with begin with the same variables, starting with id:
2019-01-19T18:59:46.826100
Jackie
pythondev_help_Jackie_2019-01-19T18:59:46.826100
1,547,924,386.8261
3,167
pythondev
help
Then you just need:
2019-01-19T19:00:47.826200
Sasha
pythondev_help_Sasha_2019-01-19T19:00:47.826200
1,547,924,447.8262
3,168
pythondev
help
Jesus christ, it's that simple. How was I not able to find it anywhere online
2019-01-19T19:02:44.827100
Jackie
pythondev_help_Jackie_2019-01-19T19:02:44.827100
1,547,924,564.8271
3,169
pythondev
help
thanks!
2019-01-19T19:02:47.827300
Jackie
pythondev_help_Jackie_2019-01-19T19:02:47.827300
1,547,924,567.8273
3,170
pythondev
help
None
2019-01-19T21:26:44.827600
Hai
pythondev_help_Hai_2019-01-19T21:26:44.827600
1,547,933,204.8276
3,171
pythondev
help
how should i use '==' in pandas?
2019-01-19T21:28:48.828300
Hai
pythondev_help_Hai_2019-01-19T21:28:48.828300
1,547,933,328.8283
3,172
pythondev
help
Your question isn't very clear. What is `a` in your example?
2019-01-19T21:31:54.828700
Sasha
pythondev_help_Sasha_2019-01-19T21:31:54.828700
1,547,933,514.8287
3,173
pythondev
help
it is the error what it is showing
2019-01-19T21:32:15.829100
Hai
pythondev_help_Hai_2019-01-19T21:32:15.829100
1,547,933,535.8291
3,174
pythondev
help
<@Sasha> <https://code.i-harness.com/en/q/233625f>
2019-01-19T21:33:03.829300
Hai
pythondev_help_Hai_2019-01-19T21:33:03.829300
1,547,933,583.8293
3,175
pythondev
help
Oh, I think I see. You need indents for your `if` blocks. I'm surprised you don't get an interpreter error.
2019-01-19T21:35:18.830200
Sasha
pythondev_help_Sasha_2019-01-19T21:35:18.830200
1,547,933,718.8302
3,176
pythondev
help
<@Sasha> in which line should i give indents?
2019-01-19T21:36:10.830800
Hai
pythondev_help_Hai_2019-01-19T21:36:10.830800
1,547,933,770.8308
3,177
pythondev
help
Lines 8 and 10 in the above example. Anything you want to only execute if the `if` is true.
2019-01-19T21:36:44.831300
Sasha
pythondev_help_Sasha_2019-01-19T21:36:44.831300
1,547,933,804.8313
3,178
pythondev
help
yeahh got it i will try and let you know
2019-01-19T21:37:11.831600
Hai
pythondev_help_Hai_2019-01-19T21:37:11.831600
1,547,933,831.8316
3,179
pythondev
help
<@Sasha> still shows the same error
2019-01-19T21:37:41.832000
Hai
pythondev_help_Hai_2019-01-19T21:37:41.832000
1,547,933,861.832
3,180
pythondev
help
Can you post the traceback to identify the line throwing the error?
2019-01-19T21:39:21.833200
Sasha
pythondev_help_Sasha_2019-01-19T21:39:21.833200
1,547,933,961.8332
3,181
pythondev
help
Note that this function overwrites the `file` global, so if you use it elsewhere, it may be getting confused.
2019-01-19T21:39:58.833700
Sasha
pythondev_help_Sasha_2019-01-19T21:39:58.833700
1,547,933,998.8337
3,182
pythondev
help
well actually my script is containrized so my script reads a json file. I want to use this container in different environments each envionrment has its own file so while running the container i need to give a file name so it should pickup the file name and run that file
2019-01-19T21:43:09.836000
Hai
pythondev_help_Hai_2019-01-19T21:43:09.836000
1,547,934,189.836
3,183
pythondev
help
for that purpose, i need to write a if elif for environment variables
2019-01-19T21:44:19.836800
Hai
pythondev_help_Hai_2019-01-19T21:44:19.836800
1,547,934,259.8368
3,184
pythondev
help
That's fine. The error is likely coming from elsewhere, once you have a Dataframe.
2019-01-19T21:45:51.837300
Sasha
pythondev_help_Sasha_2019-01-19T21:45:51.837300
1,547,934,351.8373
3,185
pythondev
help
ohh okay
2019-01-19T21:46:35.837500
Hai
pythondev_help_Hai_2019-01-19T21:46:35.837500
1,547,934,395.8375
3,186
pythondev
help
None
2019-01-19T21:47:06.837600
Hai
pythondev_help_Hai_2019-01-19T21:47:06.837600
1,547,934,426.8376
3,187
pythondev
help
<@Sasha> is that possible?
2019-01-19T21:47:16.838100
Hai
pythondev_help_Hai_2019-01-19T21:47:16.838100
1,547,934,436.8381
3,188
pythondev
help
You asked this before, and it's not possible as described. What would `myexpecteddata['apple']` be equal to?
2019-01-19T21:48:13.838800
Sasha
pythondev_help_Sasha_2019-01-19T21:48:13.838800
1,547,934,493.8388
3,189
pythondev
help
okay
2019-01-19T21:48:54.839000
Hai
pythondev_help_Hai_2019-01-19T21:48:54.839000
1,547,934,534.839
3,190
pythondev
help
actually those keys and values are column name and rows
2019-01-19T21:49:16.839400
Hai
pythondev_help_Hai_2019-01-19T21:49:16.839400
1,547,934,556.8394
3,191
pythondev
help
but api only accepts which has has the key should be {"type":"column name":"value":"row name"}
2019-01-19T21:50:11.840400
Hai
pythondev_help_Hai_2019-01-19T21:50:11.840400
1,547,934,611.8404
3,192
pythondev
help
It sounds like the API might be expecting something which is "JSON-ish", but not strictly standards-compliant JSON. In which case you might need to construct things a little more manually by appending JSON pieces together or something.
2019-01-19T21:51:56.841600
Sasha
pythondev_help_Sasha_2019-01-19T21:51:56.841600
1,547,934,716.8416
3,193
pythondev
help
yes you are right. I got an idea I will try and let you know
2019-01-19T21:52:57.842400
Hai
pythondev_help_Hai_2019-01-19T21:52:57.842400
1,547,934,777.8424
3,194
pythondev
help
Thanks! Will go through both of them!
2019-01-19T23:41:55.842700
Conchita
pythondev_help_Conchita_2019-01-19T23:41:55.842700
1,547,941,315.8427
3,195
pythondev
help
Thanks Dan, will go through this and Rhodes' video
2019-01-19T23:42:20.842900
Conchita
pythondev_help_Conchita_2019-01-19T23:42:20.842900
1,547,941,340.8429
3,196
pythondev
help
Hi Everyone, I am trying to create a sublist which uses a while loop to return a sublist of the input list. The sublist should contain the same values of the original list up until it reaches the number 5 (it should not contain the number 5). I am able to acheive that using the below code but getting Index Error: List ...
2019-01-20T00:42:33.843800
Billie
pythondev_help_Billie_2019-01-20T00:42:33.843800
1,547,944,953.8438
3,197
pythondev
help
That code looks good, and it works for me when I run it (after adding appropriate indents). Are there any differences between what you've posted and what you're testing?
2019-01-20T00:47:32.845000
Sasha
pythondev_help_Sasha_2019-01-20T00:47:32.845000
1,547,945,252.845
3,198
pythondev
help
(I would expect that error if the input did not contain 5 anywhere.)
2019-01-20T00:49:38.845400
Sasha
pythondev_help_Sasha_2019-01-20T00:49:38.845400
1,547,945,378.8454
3,199
pythondev
help
```def afunc(): return 1, 2 def anewfunc(a, b): anewfunc(afunc())```
2019-01-20T10:42:17.848500
Bernita
pythondev_help_Bernita_2019-01-20T10:42:17.848500
1,547,980,937.8485
3,200
pythondev
help
how come this doesnt work, my `afunc` returns two arguments. my newfunc wants two arguments
2019-01-20T10:43:01.849500
Bernita
pythondev_help_Bernita_2019-01-20T10:43:01.849500
1,547,980,981.8495
3,201
pythondev
help
Well, you’re telling the second function it needs two params
2019-01-20T10:50:47.850700
Hiroko
pythondev_help_Hiroko_2019-01-20T10:50:47.850700
1,547,981,447.8507
3,202
pythondev
help
And in your recursive call, you’re only passing one
2019-01-20T10:51:20.851400
Hiroko
pythondev_help_Hiroko_2019-01-20T10:51:20.851400
1,547,981,480.8514
3,203
pythondev
help
You should use *args instead of naming the parameters
2019-01-20T10:51:55.852400
Hiroko
pythondev_help_Hiroko_2019-01-20T10:51:55.852400
1,547,981,515.8524
3,204
pythondev
help
```def afunc(): return 1, 2 def anewfunc(a, b): here * args right anewfunc(afunc())```
2019-01-20T10:53:09.852900
Mercy
pythondev_help_Mercy_2019-01-20T10:53:09.852900
1,547,981,589.8529
3,205
pythondev
help
something like that, yeah. the original question is hard to understand
2019-01-20T10:54:20.853300
Hiroko
pythondev_help_Hiroko_2019-01-20T10:54:20.853300
1,547,981,660.8533
3,206
pythondev
help
ahh, ok. so, you’re returning a tuple from `afunc`
2019-01-20T10:56:27.854000
Hiroko
pythondev_help_Hiroko_2019-01-20T10:56:27.854000
1,547,981,787.854
3,207
pythondev
help
<@Bernita>, afunc returns a *tuple*
2019-01-20T10:56:29.854200
Jonas
pythondev_help_Jonas_2019-01-20T10:56:29.854200
1,547,981,789.8542
3,208
pythondev
help
but its not unpacking automatically
2019-01-20T10:56:36.854400
Hiroko
pythondev_help_Hiroko_2019-01-20T10:56:36.854400
1,547,981,796.8544
3,209
pythondev
help
ah oke, so is there a way unpack and call the newfunc?
2019-01-20T10:58:32.855500
Bernita
pythondev_help_Bernita_2019-01-20T10:58:32.855500
1,547,981,912.8555
3,210
pythondev
help
or should i make a line, unpack and call the function with the unpacked values
2019-01-20T10:58:53.856000
Bernita
pythondev_help_Bernita_2019-01-20T10:58:53.856000
1,547,981,933.856
3,211
pythondev
help
`anewfunc(*afunc())`
2019-01-20T10:59:10.856400
Jonas
pythondev_help_Jonas_2019-01-20T10:59:10.856400
1,547,981,950.8564
3,212
pythondev
help
`*` unpacks the tuple into arguments
2019-01-20T10:59:18.856600
Jonas
pythondev_help_Jonas_2019-01-20T10:59:18.856600
1,547,981,958.8566
3,213
pythondev
help
yeah, but that still doesn’t work. ```In [14]: def newfunc(*args): ...: newfunc(afunc(*args)) ...: In [15]: newfunc(1, 2) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;ipython-input-15-06cb7e242da...
2019-01-20T11:00:03.857000
Hiroko
pythondev_help_Hiroko_2019-01-20T11:00:03.857000
1,547,982,003.857
3,214
pythondev
help
where `afunc` is defined as ```In [2]: def afunc(): ...: return 1, 2```
2019-01-20T11:00:30.857300
Hiroko
pythondev_help_Hiroko_2019-01-20T11:00:30.857300
1,547,982,030.8573
3,215
pythondev
help
Those names are super confusing. `*` unpacks tuples, so a function `def func(a, b)` will work with `func(*(1, 2))`
2019-01-20T11:01:57.858400
Jonas
pythondev_help_Jonas_2019-01-20T11:01:57.858400
1,547,982,117.8584
3,216
pythondev
help
I may be interpreting it wrong, but <@Bernita> seems to want `anewfunc` to be a recursive call to itself
2019-01-20T11:02:20.858900
Hiroko
pythondev_help_Hiroko_2019-01-20T11:02:20.858900
1,547,982,140.8589
3,217
pythondev
help
yeah maybe not the best names for an example
2019-01-20T11:02:50.859200
Bernita
pythondev_help_Bernita_2019-01-20T11:02:50.859200
1,547,982,170.8592
3,218
pythondev
help
let me give it a quick try <@Jonas>
2019-01-20T11:03:02.859500
Bernita
pythondev_help_Bernita_2019-01-20T11:03:02.859500
1,547,982,182.8595
3,219
pythondev
help
ahh, ok. <@Jonas> I see what you did
2019-01-20T11:04:29.859800
Hiroko
pythondev_help_Hiroko_2019-01-20T11:04:29.859800
1,547,982,269.8598
3,220