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
very beginner question but can someone take a look at my code? I am trying to send a specific function to main() and have it execute there. it's working, but outputting the results + location of said function. (<https://github.com/Plazmuh/exercise/blob/master/test_average_capstone.py>)
2018-01-16T10:48:18.000563
Stewart
pythondev_help_Stewart_2018-01-16T10:48:18.000563
1,516,099,698.000563
29,224
pythondev
help
I'm all set actually
2018-01-16T11:01:02.000506
Theressa
pythondev_help_Theressa_2018-01-16T11:01:02.000506
1,516,100,462.000506
29,225
pythondev
help
is there a Django library to help me deal with microservices?
2018-01-16T11:22:15.000703
Martin
pythondev_help_Martin_2018-01-16T11:22:15.000703
1,516,101,735.000703
29,226
pythondev
help
<@Martin> depends on what yo mean by micro-services. it is somewhat of a buzz-word with different meanings
2018-01-16T11:52:01.000503
Denisha
pythondev_help_Denisha_2018-01-16T11:52:01.000503
1,516,103,521.000503
29,227
pythondev
help
I'm searching for something that help me to make HTTP requests from an Django API to an other Django API
2018-01-16T12:12:20.000170
Martin
pythondev_help_Martin_2018-01-16T12:12:20.000170
1,516,104,740.00017
29,228
pythondev
help
Easily
2018-01-16T12:12:51.000544
Martin
pythondev_help_Martin_2018-01-16T12:12:51.000544
1,516,104,771.000544
29,229
pythondev
help
you can make your own helper util using `requests`
2018-01-16T12:30:18.000029
Floy
pythondev_help_Floy_2018-01-16T12:30:18.000029
1,516,105,818.000029
29,230
pythondev
help
Hey all is anyone clued up with htop? My pc always has two cores running at 100% and I cannot figure out what it is!
2018-01-16T12:54:15.000569
Milo
pythondev_help_Milo_2018-01-16T12:54:15.000569
1,516,107,255.000569
29,231
pythondev
help
<@Milo> can you run `top -b -n 1` and paste the output here?
2018-01-16T12:59:51.000038
Milissa
pythondev_help_Milissa_2018-01-16T12:59:51.000038
1,516,107,591.000038
29,232
pythondev
help
<@Milo> 2316 mayur 20 0 758432 32068 25188 S 100.0 0.4 536:55.28 gnome-software 2398 root 20 0 234008 9960 8736 R 100.0 0.1 537:38.79 fwupd
2018-01-16T13:02:12.000183
Milissa
pythondev_help_Milissa_2018-01-16T13:02:12.000183
1,516,107,732.000183
29,233
pythondev
help
There ya go
2018-01-16T13:02:15.000503
Milissa
pythondev_help_Milissa_2018-01-16T13:02:15.000503
1,516,107,735.000503
29,234
pythondev
help
Cool thank you, do you mind giving me a bit of explanation, as I am new to the terminal
2018-01-16T13:02:58.000875
Milo
pythondev_help_Milo_2018-01-16T13:02:58.000875
1,516,107,778.000875
29,235
pythondev
help
Also would I need to kill these services? If so how?
2018-01-16T13:03:27.000301
Milo
pythondev_help_Milo_2018-01-16T13:03:27.000301
1,516,107,807.000301
29,236
pythondev
help
Ubuntu 16.04?
2018-01-16T13:03:36.000197
Milissa
pythondev_help_Milissa_2018-01-16T13:03:36.000197
1,516,107,816.000197
29,237
pythondev
help
yes
2018-01-16T13:03:39.000173
Milo
pythondev_help_Milo_2018-01-16T13:03:39.000173
1,516,107,819.000173
29,238
pythondev
help
<@Milo> <https://askubuntu.com/questions/789385/software-and-updater-consumes-100-cpu-in-ubuntu-16-04>
2018-01-16T13:04:10.000802
Milissa
pythondev_help_Milissa_2018-01-16T13:04:10.000802
1,516,107,850.000802
29,239
pythondev
help
See if the answers in there help at all. Your issue sounds familiar
2018-01-16T13:04:22.000932
Milissa
pythondev_help_Milissa_2018-01-16T13:04:22.000932
1,516,107,862.000932
29,240
pythondev
help
will have a read through
2018-01-16T13:04:38.000867
Milo
pythondev_help_Milo_2018-01-16T13:04:38.000867
1,516,107,878.000867
29,241
pythondev
help
<@Milo> I'm assuming you'll find something like this error in syslog: `unable to create file '/home/mayur/.cache/dconf/user': Permission denied.`
2018-01-16T13:05:35.000617
Milissa
pythondev_help_Milissa_2018-01-16T13:05:35.000617
1,516,107,935.000617
29,242
pythondev
help
``` Jan 16 08:31:36 ubuntu gnome-session[2107]: gnome-session-binary[2107]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Jan 16 08:31:36 ubuntu gnome-session-binary[2107]: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed Jan 16 08:31:36 ubuntu gnome-sessio...
2018-01-16T13:07:26.000917
Milo
pythondev_help_Milo_2018-01-16T13:07:26.000917
1,516,108,046.000917
29,243
pythondev
help
<@Davina> yes, something like this, but I was looking for some Django native library
2018-01-16T13:07:47.000352
Martin
pythondev_help_Martin_2018-01-16T13:07:47.000352
1,516,108,067.000352
29,244
pythondev
help
that was mainly for <@Nilda> but thanks for checking it out!
2018-01-16T13:08:49.000822
Davina
pythondev_help_Davina_2018-01-16T13:08:49.000822
1,516,108,129.000822
29,245
pythondev
help
<@Davina> F***ing awesome script! Working like a charm! SOmeday I hope code like you:wink:
2018-01-16T13:10:00.000361
Nilda
pythondev_help_Nilda_2018-01-16T13:10:00.000361
1,516,108,200.000361
29,246
pythondev
help
awe, that’s mighty nice but it wasn’t my original script. it’s something i borrowed from a much better pythonista called <@Dustin>. He’s the author of <https://www.oreilly.com/learning/20-python-libraries-you-arent-using-but-should>
2018-01-16T13:16:17.000413
Davina
pythondev_help_Davina_2018-01-16T13:16:17.000413
1,516,108,577.000413
29,247
pythondev
help
i made some changes to the original but not much.
2018-01-16T13:17:22.000314
Davina
pythondev_help_Davina_2018-01-16T13:17:22.000314
1,516,108,642.000314
29,248
pythondev
help
<@Davina> anyway, thank you! helped me a lot
2018-01-16T13:42:09.000595
Nilda
pythondev_help_Nilda_2018-01-16T13:42:09.000595
1,516,110,129.000595
29,249
pythondev
help
n/p
2018-01-16T13:42:21.000113
Davina
pythondev_help_Davina_2018-01-16T13:42:21.000113
1,516,110,141.000113
29,250
pythondev
help
Has anyone ever worked with Kivy webviews? I have my app working, but for some reason it always loads it in landscape orientation when I need it in portrait. Any thoughts would be very much appreciated. Thanks
2018-01-16T14:35:56.000175
Adan
pythondev_help_Adan_2018-01-16T14:35:56.000175
1,516,113,356.000175
29,251
pythondev
help
are you using a boxlayout?
2018-01-16T14:40:47.000666
Floy
pythondev_help_Floy_2018-01-16T14:40:47.000666
1,516,113,647.000666
29,252
pythondev
help
for your topmost box?
2018-01-16T14:40:54.000061
Floy
pythondev_help_Floy_2018-01-16T14:40:54.000061
1,516,113,654.000061
29,253
pythondev
help
<@Floy> Not sure I know what you mean? I just used the sample code from kivy's project and modified the url
2018-01-16T14:45:49.000061
Adan
pythondev_help_Adan_2018-01-16T14:45:49.000061
1,516,113,949.000061
29,254
pythondev
help
whats the link?
2018-01-16T14:47:39.000207
Floy
pythondev_help_Floy_2018-01-16T14:47:39.000207
1,516,114,059.000207
29,255
pythondev
help
The second example here.... <https://github.com/kivy/kivy/wiki/Android-native-embedded-browser>
2018-01-16T14:48:20.000474
Adan
pythondev_help_Adan_2018-01-16T14:48:20.000474
1,516,114,100.000474
29,256
pythondev
help
<https://gist.github.com/rnixx/c60a744576866a7f1a42>
2018-01-16T14:50:28.000075
Floy
pythondev_help_Floy_2018-01-16T14:50:28.000075
1,516,114,228.000075
29,257
pythondev
help
maybe that?
2018-01-16T14:50:31.000624
Floy
pythondev_help_Floy_2018-01-16T14:50:31.000624
1,516,114,231.000624
29,258
pythondev
help
trying to add that into existing app just causes it to crash. Digging deeper. :slightly_smiling_face:
2018-01-16T15:01:21.000313
Adan
pythondev_help_Adan_2018-01-16T15:01:21.000313
1,516,114,881.000313
29,259
pythondev
help
good luck :slightly_smiling_face:
2018-01-16T15:03:31.000807
Floy
pythondev_help_Floy_2018-01-16T15:03:31.000807
1,516,115,011.000807
29,260
pythondev
help
seems like orientation is part of webview
2018-01-16T15:03:39.000825
Floy
pythondev_help_Floy_2018-01-16T15:03:39.000825
1,516,115,019.000825
29,261
pythondev
help
and when you look that up, it takes you straight to android docs
2018-01-16T15:03:57.000231
Floy
pythondev_help_Floy_2018-01-16T15:03:57.000231
1,516,115,037.000231
29,262
pythondev
help
and there is apparently an `onConfigurationChanged` method part of that class
2018-01-16T15:04:14.000158
Floy
pythondev_help_Floy_2018-01-16T15:04:14.000158
1,516,115,054.000158
29,263
pythondev
help
how to use that in kivy, I don’t know
2018-01-16T15:04:25.000584
Floy
pythondev_help_Floy_2018-01-16T15:04:25.000584
1,516,115,065.000584
29,264
pythondev
help
Thanks. I am so new to all this, I feel like a dang old dinosaur.
2018-01-16T15:05:35.000382
Adan
pythondev_help_Adan_2018-01-16T15:05:35.000382
1,516,115,135.000382
29,265
pythondev
help
Now I really feel stupid. It was a obscure setting in buildozer.spec. Thanks for your help <@Floy> I have it working now
2018-01-16T15:12:10.000476
Adan
pythondev_help_Adan_2018-01-16T15:12:10.000476
1,516,115,530.000476
29,266
pythondev
help
np, glad it waas something simple :slightly_smiling_face:
2018-01-16T15:12:27.000170
Floy
pythondev_help_Floy_2018-01-16T15:12:27.000170
1,516,115,547.00017
29,267
pythondev
help
when building an api spec, are there any good alternatives to swagger to auto document the api spec and give the ability to either test the endpoint right in the doc interface, or export to/integrate with Postman?
2018-01-16T17:00:01.000492
Heriberto
pythondev_help_Heriberto_2018-01-16T17:00:01.000492
1,516,122,001.000492
29,268
pythondev
help
Maybe Tavern, though it's new and I haven't played with it
2018-01-16T17:58:52.000052
Monroe
pythondev_help_Monroe_2018-01-16T17:58:52.000052
1,516,125,532.000052
29,269
pythondev
help
<https://pythonbytes.fm/episodes/show/52/call-your-apis-with-uplink-and-test-them-in-the-tavern>
2018-01-16T17:58:53.000239
Monroe
pythondev_help_Monroe_2018-01-16T17:58:53.000239
1,516,125,533.000239
29,270
pythondev
help
<https://taverntesting.github.io/>
2018-01-16T17:59:00.000262
Monroe
pythondev_help_Monroe_2018-01-16T17:59:00.000262
1,516,125,540.000262
29,271
pythondev
help
Orrr.... not, it appears Tavern is a compliment to Postman, similar to but not same
2018-01-16T17:59:49.000147
Monroe
pythondev_help_Monroe_2018-01-16T17:59:49.000147
1,516,125,589.000147
29,272
pythondev
help
we have to be able to run it locally and not go through a service.
2018-01-16T17:59:55.000630
Heriberto
pythondev_help_Heriberto_2018-01-16T17:59:55.000630
1,516,125,595.00063
29,273
pythondev
help
Tavern is a pytest plugin
2018-01-16T18:00:20.000066
Monroe
pythondev_help_Monroe_2018-01-16T18:00:20.000066
1,516,125,620.000066
29,274
pythondev
help
ah.
2018-01-16T18:00:26.000464
Heriberto
pythondev_help_Heriberto_2018-01-16T18:00:26.000464
1,516,125,626.000464
29,275
pythondev
help
cool
2018-01-16T18:00:37.000079
Heriberto
pythondev_help_Heriberto_2018-01-16T18:00:37.000079
1,516,125,637.000079
29,276
pythondev
help
HTH
2018-01-16T18:01:26.000457
Monroe
pythondev_help_Monroe_2018-01-16T18:01:26.000457
1,516,125,686.000457
29,277
pythondev
help
Its ok for python or is a bad practice?
2018-01-16T18:59:31.000023
Tamatha
pythondev_help_Tamatha_2018-01-16T18:59:31.000023
1,516,129,171.000023
29,278
pythondev
help
It is working. I want only a opinion.
2018-01-16T19:00:54.000317
Tamatha
pythondev_help_Tamatha_2018-01-16T19:00:54.000317
1,516,129,254.000317
29,279
pythondev
help
I'd try to avoid doing this and set up a folder structure that meets the needs of your python scripts/modules and or library.
2018-01-16T19:07:29.000375
Shaun
pythondev_help_Shaun_2018-01-16T19:07:29.000375
1,516,129,649.000375
29,280
pythondev
help
If you're really careful though, I don't see anything wrong with it.
2018-01-16T19:09:31.000094
Shaun
pythondev_help_Shaun_2018-01-16T19:09:31.000094
1,516,129,771.000094
29,281
pythondev
help
<@Tamatha> note that your last line `sys.path = sys_path` there is a no-op; you're reassigning the same value
2018-01-16T19:26:57.000147
Dolly
pythondev_help_Dolly_2018-01-16T19:26:57.000147
1,516,130,817.000147
29,282
pythondev
help
<@Dolly>, no man, im reassign the default value before i change, because this lines is inside a loop
2018-01-16T19:42:14.000159
Tamatha
pythondev_help_Tamatha_2018-01-16T19:42:14.000159
1,516,131,734.000159
29,283
pythondev
help
if i dont reassign the default values, the next dependency that i need build will consider the last paths
2018-01-16T19:43:07.000246
Tamatha
pythondev_help_Tamatha_2018-01-16T19:43:07.000246
1,516,131,787.000246
29,284
pythondev
help
that is the same list
2018-01-16T19:43:21.000058
Dolly
pythondev_help_Dolly_2018-01-16T19:43:21.000058
1,516,131,801.000058
29,285
pythondev
help
the dependencies of EzoRed (<http://ezored.com|ezored.com>) is a folder with github repository contents
2018-01-16T19:43:29.000335
Tamatha
pythondev_help_Tamatha_2018-01-16T19:43:29.000335
1,516,131,809.000335
29,286
pythondev
help
sys_path = sys.path =&gt; is the default paths sys.path.insert(0, target.repository.get_vendor_dir()) =&gt; modified sys.path = sys_path =&gt; back to original
2018-01-16T19:44:09.000374
Tamatha
pythondev_help_Tamatha_2018-01-16T19:44:09.000374
1,516,131,849.000374
29,287
pythondev
help
you may have changed the contents of the list, but it is still the same list
2018-01-16T19:44:21.000150
Dolly
pythondev_help_Dolly_2018-01-16T19:44:21.000150
1,516,131,861.00015
29,288
pythondev
help
you are saying that the array is a pointer, yes?
2018-01-16T19:45:09.000057
Tamatha
pythondev_help_Tamatha_2018-01-16T19:45:09.000057
1,516,131,909.000057
29,289
pythondev
help
it is not copying the array but pointing to the same array, is this?
2018-01-16T19:45:23.000275
Tamatha
pythondev_help_Tamatha_2018-01-16T19:45:23.000275
1,516,131,923.000275
29,290
pythondev
help
when you do `sys_path = sys.path`, `sys_path` becomes another name for `sys.path`
2018-01-16T19:46:07.000315
Dolly
pythondev_help_Dolly_2018-01-16T19:46:07.000315
1,516,131,967.000315
29,291
pythondev
help
take a read of <http://bit.ly/pynames>
2018-01-16T19:46:23.000084
Dolly
pythondev_help_Dolly_2018-01-16T19:46:23.000084
1,516,131,983.000084
29,292
pythondev
help
yes, but i think because the type
2018-01-16T19:46:33.000165
Tamatha
pythondev_help_Tamatha_2018-01-16T19:46:33.000165
1,516,131,993.000165
29,293
pythondev
help
array in python is like array in C
2018-01-16T19:46:40.000319
Tamatha
pythondev_help_Tamatha_2018-01-16T19:46:40.000319
1,516,132,000.000319
29,294
pythondev
help
a pointer to the first element
2018-01-16T19:46:45.000233
Tamatha
pythondev_help_Tamatha_2018-01-16T19:46:45.000233
1,516,132,005.000233
29,295
pythondev
help
so you always assign the same thing
2018-01-16T19:46:59.000083
Tamatha
pythondev_help_Tamatha_2018-01-16T19:46:59.000083
1,516,132,019.000083
29,296
pythondev
help
you are correct man, i will check it
2018-01-16T19:47:09.000066
Tamatha
pythondev_help_Tamatha_2018-01-16T19:47:09.000066
1,516,132,029.000066
29,297
pythondev
help
you aren't using an array
2018-01-16T19:47:09.000240
Dolly
pythondev_help_Dolly_2018-01-16T19:47:09.000240
1,516,132,029.00024
29,298
pythondev
help
sys.path = array
2018-01-16T19:47:30.000307
Tamatha
pythondev_help_Tamatha_2018-01-16T19:47:30.000307
1,516,132,050.000307
29,299
pythondev
help
arrays are a different data type to lists
2018-01-16T19:47:38.000171
Dolly
pythondev_help_Dolly_2018-01-16T19:47:38.000171
1,516,132,058.000171
29,300
pythondev
help
yes
2018-01-16T19:50:02.000170
Tamatha
pythondev_help_Tamatha_2018-01-16T19:50:02.000170
1,516,132,202.00017
29,301
pythondev
help
im reading it now
2018-01-16T19:50:05.000053
Tamatha
pythondev_help_Tamatha_2018-01-16T19:50:05.000053
1,516,132,205.000053
29,302
pythondev
help
im new to python, i didnt read about differences between lists and array
2018-01-16T19:50:25.000134
Tamatha
pythondev_help_Tamatha_2018-01-16T19:50:25.000134
1,516,132,225.000134
29,303
pythondev
help
thanks for this
2018-01-16T19:50:27.000263
Tamatha
pythondev_help_Tamatha_2018-01-16T19:50:27.000263
1,516,132,227.000263
29,304
pythondev
help
out of this, have another problem if im using that way to execute external functions?
2018-01-16T19:50:44.000315
Tamatha
pythondev_help_Tamatha_2018-01-16T19:50:44.000315
1,516,132,244.000315
29,305
pythondev
help
Hi, I'm fairly new to Python coming from a JS background. I'm trying to check if a value of a variable is either `None` `0` `"0"` or `""` , is there a clean way of checking this? Not to bring up Javascript here, but all of those values return False with a "loose equals" so I'm trying to find the best way to do this :...
2018-01-16T20:37:35.000265
Delphia
pythondev_help_Delphia_2018-01-16T20:37:35.000265
1,516,135,055.000265
29,306
pythondev
help
the only tricky part of that is that `"0"` has a truthy value of True
2018-01-16T20:44:42.000269
Noel
pythondev_help_Noel_2018-01-16T20:44:42.000269
1,516,135,482.000269
29,307
pythondev
help
```In [8]: bool(None) Out[8]: False In [9]: bool(0) Out[9]: False In [10]: bool("") Out[10]: False In [11]: bool("0") Out[11]: True```
2018-01-16T20:44:51.000025
Noel
pythondev_help_Noel_2018-01-16T20:44:51.000025
1,516,135,491.000025
29,308
pythondev
help
but its relatively easy to compare both values: ``` In [13]: i = "0" In [14]: if i == "0" or not i: ...: print('Falsey') Falsey```
2018-01-16T20:46:08.000119
Noel
pythondev_help_Noel_2018-01-16T20:46:08.000119
1,516,135,568.000119
29,309
pythondev
help
A string “0” is truthy
2018-01-16T21:39:45.000213
Kacie
pythondev_help_Kacie_2018-01-16T21:39:45.000213
1,516,138,785.000213
29,310
pythondev
help
As is “false”
2018-01-16T21:39:54.000252
Kacie
pythondev_help_Kacie_2018-01-16T21:39:54.000252
1,516,138,794.000252
29,311
pythondev
help
Because it’s a string
2018-01-16T21:40:02.000325
Kacie
pythondev_help_Kacie_2018-01-16T21:40:02.000325
1,516,138,802.000325
29,312
pythondev
help
<@Delphia> so the *pythonic* way to do comparisons would be something like
2018-01-16T21:40:53.000124
Kacie
pythondev_help_Kacie_2018-01-16T21:40:53.000124
1,516,138,853.000124
29,313
pythondev
help
if *not* variable:
2018-01-16T21:42:48.000224
Kacie
pythondev_help_Kacie_2018-01-16T21:42:48.000224
1,516,138,968.000224
29,314
pythondev
help
if variable, etc
2018-01-16T21:43:03.000161
Kacie
pythondev_help_Kacie_2018-01-16T21:43:03.000161
1,516,138,983.000161
29,315
pythondev
help
<@Noel> <@Kacie>Thanks! I noticed that about those 4 values and how "0" is a truthy (rightfully so imo lol)
2018-01-16T21:43:27.000167
Delphia
pythondev_help_Delphia_2018-01-16T21:43:27.000167
1,516,139,007.000167
29,316
pythondev
help
Integer 0 is in fact falsely
2018-01-16T21:43:48.000055
Kacie
pythondev_help_Kacie_2018-01-16T21:43:48.000055
1,516,139,028.000055
29,317
pythondev
help
Ah i see I did something like this: ```if my_var and my_var != "0"```
2018-01-16T21:44:02.000119
Delphia
pythondev_help_Delphia_2018-01-16T21:44:02.000119
1,516,139,042.000119
29,318
pythondev
help
Again you’re looking at a string
2018-01-16T21:44:20.000037
Kacie
pythondev_help_Kacie_2018-01-16T21:44:20.000037
1,516,139,060.000037
29,319
pythondev
help
So I guess if you want to do that
2018-01-16T21:44:28.000142
Kacie
pythondev_help_Kacie_2018-01-16T21:44:28.000142
1,516,139,068.000142
29,320
pythondev
help
Having said that what are you trying to do
2018-01-16T21:44:36.000017
Kacie
pythondev_help_Kacie_2018-01-16T21:44:36.000017
1,516,139,076.000017
29,321
pythondev
help
Yeah, I'm not sure if the value coming in will be a string or int but I wanted to stop both &gt;&lt;
2018-01-16T21:45:19.000074
Delphia
pythondev_help_Delphia_2018-01-16T21:45:19.000074
1,516,139,119.000074
29,322
pythondev
help
What do you mean?
2018-01-16T21:45:30.000081
Kacie
pythondev_help_Kacie_2018-01-16T21:45:30.000081
1,516,139,130.000081
29,323