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
unless they explicitly ask you for support and are willing to pay
2018-01-17T08:56:19.000079
Floy
pythondev_help_Floy_2018-01-17T08:56:19.000079
1,516,179,379.000079
29,424
pythondev
help
yeah I think so. many projects are discussing dropping 2 entirely at this point. and yeah <@Floy> brings up a good point. if a version of python isn’t officially supported I don’t see the argument for you supporting it either, except in extremely odd cases
2018-01-17T08:56:21.000128
Zack
pythondev_help_Zack_2018-01-17T08:56:21.000128
1,516,179,381.000128
29,425
pythondev
help
for example, IE7
2018-01-17T08:56:32.000160
Floy
pythondev_help_Floy_2018-01-17T08:56:32.000160
1,516,179,392.00016
29,426
pythondev
help
as a web application developer, I wouldn’t support that unless I was being paid extra for that
2018-01-17T08:57:00.000266
Floy
pythondev_help_Floy_2018-01-17T08:57:00.000266
1,516,179,420.000266
29,427
pythondev
help
shit. at this point IE10. :stuck_out_tongue:
2018-01-17T08:57:19.000650
Zack
pythondev_help_Zack_2018-01-17T08:57:19.000650
1,516,179,439.00065
29,428
pythondev
help
:smile:
2018-01-17T08:57:35.000107
Floy
pythondev_help_Floy_2018-01-17T08:57:35.000107
1,516,179,455.000107
29,429
pythondev
help
I read an interesting article the other day. It basically said support the version you want to develop on.
2018-01-17T08:59:24.000378
Micki
pythondev_help_Micki_2018-01-17T08:59:24.000378
1,516,179,564.000378
29,430
pythondev
help
morning! can anyone help me figure out how to take an opencv image (numpy array?) and conver it into a base64encoded “something” that is json serializable?
2018-01-17T08:59:39.000324
Shila
pythondev_help_Shila_2018-01-17T08:59:39.000324
1,516,179,579.000324
29,431
pythondev
help
and if people want support on other version they should do it or pay
2018-01-17T08:59:40.000535
Micki
pythondev_help_Micki_2018-01-17T08:59:40.000535
1,516,179,580.000535
29,432
pythondev
help
but if you want your project to be used there is a middle ground I believe
2018-01-17T08:59:57.000565
Micki
pythondev_help_Micki_2018-01-17T08:59:57.000565
1,516,179,597.000565
29,433
pythondev
help
without having to save it to disk first, and reload it…?
2018-01-17T09:00:04.000349
Shila
pythondev_help_Shila_2018-01-17T09:00:04.000349
1,516,179,604.000349
29,434
pythondev
help
That’s probably ideal, although in practice I don’t know how feasible that is
2018-01-17T09:00:21.000501
Zack
pythondev_help_Zack_2018-01-17T09:00:21.000501
1,516,179,621.000501
29,435
pythondev
help
people/organizations are cheap, sadly
2018-01-17T09:00:35.000350
Zack
pythondev_help_Zack_2018-01-17T09:00:35.000350
1,516,179,635.00035
29,436
pythondev
help
uhm, <@Shila> <https://stackoverflow.com/questions/6485790/numpy-array-to-base64-and-back-to-numpy-array-python>
2018-01-17T09:00:40.000611
Floy
pythondev_help_Floy_2018-01-17T09:00:40.000611
1,516,179,640.000611
29,437
pythondev
help
<https://stackoverflow.com/questions/26646362/numpy-array-is-not-json-serializable>
2018-01-17T09:00:51.000424
Micki
pythondev_help_Micki_2018-01-17T09:00:51.000424
1,516,179,651.000424
29,438
pythondev
help
(there is a solution inside from the quick read I did)
2018-01-17T09:01:06.000620
Micki
pythondev_help_Micki_2018-01-17T09:01:06.000620
1,516,179,666.00062
29,439
pythondev
help
well how do you serialize a base64 encoded string anyway?
2018-01-17T09:01:30.000276
Brande
pythondev_help_Brande_2018-01-17T09:01:30.000276
1,516,179,690.000276
29,440
pythondev
help
I wrote some custom json encoder the other day for numpy array so I know this is possible :slightly_smiling_face:
2018-01-17T09:01:43.000387
Sadye
pythondev_help_Sadye_2018-01-17T09:01:43.000387
1,516,179,703.000387
29,441
pythondev
help
But think on users. Mac OSX 10.7 comes with: Python 2.5.6 (r256:Unversioned directory, Aug 25 2013, 00:03:43) Python 2.6.8 (unknown, Aug 25 2013, 00:04:29)
2018-01-17T09:01:45.000019
Tamatha
pythondev_help_Tamatha_2018-01-17T09:01:45.000019
1,516,179,705.000019
29,442
pythondev
help
let me add more info (and thank u for the response so far): im taking the image data and uploading it to google cloud vision api
2018-01-17T09:02:01.000555
Shila
pythondev_help_Shila_2018-01-17T09:02:01.000555
1,516,179,721.000555
29,443
pythondev
help
who uses OSX 10.7 though?
2018-01-17T09:02:19.000216
Zack
pythondev_help_Zack_2018-01-17T09:02:19.000216
1,516,179,739.000216
29,444
pythondev
help
On July 2017 on Sierra 10.12.5, I have versions 2.7.10 and 2.6.9.
2018-01-17T09:02:20.000251
Tamatha
pythondev_help_Tamatha_2018-01-17T09:02:20.000251
1,516,179,740.000251
29,445
pythondev
help
so this code works
2018-01-17T09:02:31.000638
Shila
pythondev_help_Shila_2018-01-17T09:02:31.000638
1,516,179,751.000638
29,446
pythondev
help
Users still use it
2018-01-17T09:02:35.000271
Tamatha
pythondev_help_Tamatha_2018-01-17T09:02:35.000271
1,516,179,755.000271
29,447
pythondev
help
```with open('image2.png', 'rb') as image_file: image_data = base64.b64encode(image_file.read()).decode('utf-8')```
2018-01-17T09:02:38.000028
Shila
pythondev_help_Shila_2018-01-17T09:02:38.000028
1,516,179,758.000028
29,448
pythondev
help
No reason to drop because one function
2018-01-17T09:02:45.000333
Tamatha
pythondev_help_Tamatha_2018-01-17T09:02:45.000333
1,516,179,765.000333
29,449
pythondev
help
<@Tamatha> macOS ships with the versions of python _it_ needs
2018-01-17T09:02:46.000287
Brande
pythondev_help_Brande_2018-01-17T09:02:46.000287
1,516,179,766.000287
29,450
pythondev
help
trying to figure out how to do the same thing with an opencv image
2018-01-17T09:02:53.000039
Shila
pythondev_help_Shila_2018-01-17T09:02:53.000039
1,516,179,773.000039
29,451
pythondev
help
<@Brande>, yes, but think on user. Why i will need say that they need python 2.7 or python 3 without need? I better say: You already can run the tool without install nothing.
2018-01-17T09:03:45.000620
Tamatha
pythondev_help_Tamatha_2018-01-17T09:03:45.000620
1,516,179,825.00062
29,452
pythondev
help
<@Tamatha> As far as I can see your target audience is us, developers. So you can drop 2.6 pretty safely IMO :wink:
2018-01-17T09:03:55.000184
Sadye
pythondev_help_Sadye_2018-01-17T09:03:55.000184
1,516,179,835.000184
29,453
pythondev
help
<@Tamatha> the default python on a path on macOS is 2.7, anyway
2018-01-17T09:04:28.000194
Brande
pythondev_help_Brande_2018-01-17T09:04:28.000194
1,516,179,868.000194
29,454
pythondev
help
and you’re increasing your workload for nothing
2018-01-17T09:05:23.000070
Floy
pythondev_help_Floy_2018-01-17T09:05:23.000070
1,516,179,923.00007
29,455
pythondev
help
is that something your time is well spent on?
2018-01-17T09:05:37.000044
Floy
pythondev_help_Floy_2018-01-17T09:05:37.000044
1,516,179,937.000044
29,456
pythondev
help
<https://wiki.debian.org/Python>
2018-01-17T09:05:45.000814
Tamatha
pythondev_help_Tamatha_2018-01-17T09:05:45.000814
1,516,179,945.000814
29,457
pythondev
help
<@Gayle> how is the google cloud vision API expecting the data?
2018-01-17T09:05:51.000580
Brande
pythondev_help_Brande_2018-01-17T09:05:51.000580
1,516,179,951.00058
29,458
pythondev
help
<@Brande> im not sure
2018-01-17T09:06:10.000339
Shila
pythondev_help_Shila_2018-01-17T09:06:10.000339
1,516,179,970.000339
29,459
pythondev
help
i believe it’s a json object
2018-01-17T09:06:21.000443
Shila
pythondev_help_Shila_2018-01-17T09:06:21.000443
1,516,179,981.000443
29,460
pythondev
help
but not sure of the format
2018-01-17T09:06:25.000523
Shila
pythondev_help_Shila_2018-01-17T09:06:25.000523
1,516,179,985.000523
29,461
pythondev
help
does the sample code i provided lend anything to the question?
2018-01-17T09:06:35.000209
Shila
pythondev_help_Shila_2018-01-17T09:06:35.000209
1,516,179,995.000209
29,462
pythondev
help
reading an image from disk, base64encoding it is sufficient
2018-01-17T09:06:45.000494
Shila
pythondev_help_Shila_2018-01-17T09:06:45.000494
1,516,180,005.000494
29,463
pythondev
help
Embedded system that come with debian for example are shipped with older version.
2018-01-17T09:06:46.000133
Tamatha
pythondev_help_Tamatha_2018-01-17T09:06:46.000133
1,516,180,006.000133
29,464
pythondev
help
<@Tamatha> debian squeeze is out of LTS support as of Feb last year
2018-01-17T09:06:53.000411
Floy
pythondev_help_Floy_2018-01-17T09:06:53.000411
1,516,180,013.000411
29,465
pythondev
help
nope, not sure what the request needs to look like for the API
2018-01-17T09:06:54.000315
Brande
pythondev_help_Brande_2018-01-17T09:06:54.000315
1,516,180,014.000315
29,466
pythondev
help
lenny was out of security support in feb 2012
2018-01-17T09:07:28.000323
Floy
pythondev_help_Floy_2018-01-17T09:07:28.000323
1,516,180,048.000323
29,467
pythondev
help
```Image content, represented as a stream of bytes. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64. A base64-encoded string.```
2018-01-17T09:07:33.000084
Shila
pythondev_help_Shila_2018-01-17T09:07:33.000084
1,516,180,053.000084
29,468
pythondev
help
so, you can support those, but would be irresponsible, IMO
2018-01-17T09:07:42.000004
Floy
pythondev_help_Floy_2018-01-17T09:07:42.000004
1,516,180,062.000004
29,469
pythondev
help
the only thing I know that is keeping python 2.6 is ansible
2018-01-17T09:07:51.000086
Micki
pythondev_help_Micki_2018-01-17T09:07:51.000086
1,516,180,071.000086
29,470
pythondev
help
so if it’s being sent as a json object, it needs to be a base64-encoded string?
2018-01-17T09:08:15.000847
Shila
pythondev_help_Shila_2018-01-17T09:08:15.000847
1,516,180,095.000847
29,471
pythondev
help
<@Gayle> are you using the API or the client?
2018-01-17T09:09:04.000601
Brande
pythondev_help_Brande_2018-01-17T09:09:04.000601
1,516,180,144.000601
29,472
pythondev
help
```from googleapiclient import discovery from googleapiclient import errors from oauth2client.client import GoogleCredentials DISCOVERY_URL = 'https://{api}.<http://googleapis.com/$discovery/rest?version={apiVersion}|googleapis.com/$discovery/rest?version={apiVersion}>' BATCH_SIZE = 10 def detect_text(image_data, num...
2018-01-17T09:09:39.000034
Shila
pythondev_help_Shila_2018-01-17T09:09:39.000034
1,516,180,179.000034
29,473
pythondev
help
so, the google api client
2018-01-17T09:11:32.000138
Shila
pythondev_help_Shila_2018-01-17T09:11:32.000138
1,516,180,292.000138
29,474
pythondev
help
(not the vision api client, which i believe there is one, but i couldn’t get it to work)
2018-01-17T09:11:42.000364
Shila
pythondev_help_Shila_2018-01-17T09:11:42.000364
1,516,180,302.000364
29,475
pythondev
help
<https://googlecloudplatform.github.io/google-cloud-python/latest/vision/>
2018-01-17T09:12:41.000061
Brande
pythondev_help_Brande_2018-01-17T09:12:41.000061
1,516,180,361.000061
29,476
pythondev
help
<https://cloud.google.com/vision/docs/reference/rest/>
2018-01-17T09:13:29.000171
Brande
pythondev_help_Brande_2018-01-17T09:13:29.000171
1,516,180,409.000171
29,477
pythondev
help
thanks <@Brande>
2018-01-17T09:20:04.000287
Shila
pythondev_help_Shila_2018-01-17T09:20:04.000287
1,516,180,804.000287
29,478
pythondev
help
still not sure how to convert the opencv image to something this request likes though :disappointed:
2018-01-17T09:20:14.000416
Shila
pythondev_help_Shila_2018-01-17T09:20:14.000416
1,516,180,814.000416
29,479
pythondev
help
how do u go from opencv to base64 encoded string?
2018-01-17T09:20:22.000523
Shila
pythondev_help_Shila_2018-01-17T09:20:22.000523
1,516,180,822.000523
29,480
pythondev
help
None
2018-01-17T09:20:52.000463
Brande
pythondev_help_Brande_2018-01-17T09:20:52.000463
1,516,180,852.000463
29,481
pythondev
help
ok, sorry to be dense (im still learning python), which line is the one i want?
2018-01-17T09:21:29.000349
Shila
pythondev_help_Shila_2018-01-17T09:21:29.000349
1,516,180,889.000349
29,482
pythondev
help
```import base64 import numpy as np t = np.arange(25, dtype=np.float64) s = base64.b64encode(t) r = base64.decodestring(s) q = np.frombuffer(r, dtype=np.float64) print(np.allclose(q, t))```
2018-01-17T09:21:31.000173
Shila
pythondev_help_Shila_2018-01-17T09:21:31.000173
1,516,180,891.000173
29,483
pythondev
help
which variable holds the base64encoded string?
2018-01-17T09:21:38.000337
Shila
pythondev_help_Shila_2018-01-17T09:21:38.000337
1,516,180,898.000337
29,484
pythondev
help
s?
2018-01-17T09:21:38.000779
Shila
pythondev_help_Shila_2018-01-17T09:21:38.000779
1,516,180,898.000779
29,485
pythondev
help
yes, after the call to `b64encode`, so `s`
2018-01-17T09:22:24.000028
Brande
pythondev_help_Brande_2018-01-17T09:22:24.000028
1,516,180,944.000028
29,486
pythondev
help
ok thanks let me try that now
2018-01-17T09:22:29.000331
Shila
pythondev_help_Shila_2018-01-17T09:22:29.000331
1,516,180,949.000331
29,487
pythondev
help
``` t = np.arange(image_template, dtype=np.float64) TypeError: only size-1 arrays can be converted to Python scalars ```
2018-01-17T09:23:45.000201
Shila
pythondev_help_Shila_2018-01-17T09:23:45.000201
1,516,181,025.000201
29,488
pythondev
help
just use the `b64encode` method on your current numpy array
2018-01-17T09:24:46.000508
Brande
pythondev_help_Brande_2018-01-17T09:24:46.000508
1,516,181,086.000508
29,489
pythondev
help
<@Brande> `TypeError: Object of type 'bytes' is not JSON serializable`
2018-01-17T09:53:40.000461
Shila
pythondev_help_Shila_2018-01-17T09:53:40.000461
1,516,182,820.000461
29,490
pythondev
help
i added `.decode('utf-8')` to the end of it, but then google comes back with an error that says “Bad Image Data”
2018-01-17T09:55:03.000578
Shila
pythondev_help_Shila_2018-01-17T09:55:03.000578
1,516,182,903.000578
29,491
pythondev
help
<https://docs.python.org/3/library/base64.html#base64.b64encode>
2018-01-17T09:55:05.000666
Floy
pythondev_help_Floy_2018-01-17T09:55:05.000666
1,516,182,905.000666
29,492
pythondev
help
you need to convert it to string
2018-01-17T09:55:16.000320
Floy
pythondev_help_Floy_2018-01-17T09:55:16.000320
1,516,182,916.00032
29,493
pythondev
help
how?
2018-01-17T09:55:44.000090
Shila
pythondev_help_Shila_2018-01-17T09:55:44.000090
1,516,182,944.00009
29,494
pythondev
help
Importing external module rom python is working now with: importlib.import_module My another question is about __init__.py file. I need create it on my dynamic module? Because it is working today without it.
2018-01-17T09:56:00.000087
Tamatha
pythondev_help_Tamatha_2018-01-17T09:56:00.000087
1,516,182,960.000087
29,495
pythondev
help
if you want it available for import…
2018-01-17T09:56:21.000486
Floy
pythondev_help_Floy_2018-01-17T09:56:21.000486
1,516,182,981.000486
29,496
pythondev
help
In my case only using dynamic mode
2018-01-17T09:57:18.000939
Tamatha
pythondev_help_Tamatha_2018-01-17T09:57:18.000939
1,516,183,038.000939
29,497
pythondev
help
only with file "ezr_target.py" is working
2018-01-17T09:57:55.000459
Tamatha
pythondev_help_Tamatha_2018-01-17T09:57:55.000459
1,516,183,075.000459
29,498
pythondev
help
it is required?
2018-01-17T09:57:58.000589
Tamatha
pythondev_help_Tamatha_2018-01-17T09:57:58.000589
1,516,183,078.000589
29,499
pythondev
help
i give up…using opencv to save it to a file then reading that file before sending to google
2018-01-17T10:07:06.000051
Shila
pythondev_help_Shila_2018-01-17T10:07:06.000051
1,516,183,626.000051
29,500
pythondev
help
thanks anyways all!
2018-01-17T10:07:08.000721
Shila
pythondev_help_Shila_2018-01-17T10:07:08.000721
1,516,183,628.000721
29,501
pythondev
help
<@Shila> have you read the docs we have linked you? everything is right there
2018-01-17T10:07:52.000494
Brande
pythondev_help_Brande_2018-01-17T10:07:52.000494
1,516,183,672.000494
29,502
pythondev
help
yes, but i still can’t figure it out
2018-01-17T10:08:37.000356
Shila
pythondev_help_Shila_2018-01-17T10:08:37.000356
1,516,183,717.000356
29,503
pythondev
help
i know it’s right in front of me, but i don’t know how to assemble the puzzle pieces to get it to work
2018-01-17T10:08:52.000432
Shila
pythondev_help_Shila_2018-01-17T10:08:52.000432
1,516,183,732.000432
29,504
pythondev
help
im not being defeatist, i promise…i’ve been at this for two days
2018-01-17T10:09:03.000083
Shila
pythondev_help_Shila_2018-01-17T10:09:03.000083
1,516,183,743.000083
29,505
pythondev
help
Hi all, I'm having trouble debugging a Socket GAI Error. When run as a py file the script works fine but when I try to run the executable I made with pyinstaller it throws a socket.gaierror with code 11003 when requesting a url to download a csv file. I get the following error:
2018-01-17T10:48:36.000506
Freddy
pythondev_help_Freddy_2018-01-17T10:48:36.000506
1,516,186,116.000506
29,506
pythondev
help
$ ./dist/casefiles/casefiles.exe Downloading region AAL Traceback (most recent call last): File "site-packages\urllib3\connection.py", line 141, in _new_conn File "site-packages\urllib3\util\connection.py", line 60, in create_connection File "socket.py", line 743, in getaddrinfo socket.gaierror: [Errno 11003] ge...
2018-01-17T10:48:40.000575
Freddy
pythondev_help_Freddy_2018-01-17T10:48:40.000575
1,516,186,120.000575
29,507
pythondev
help
I got a problem ppl: ``` target_module = importlib.import_module('ezored_vendor') do_build = getattr(target_module, 'do_build') print(do_build()) # check address of function do_build() del target_module del do_build ``` I call the first do_build function, delete the function and module and go to the next dependency f...
2018-01-17T10:49:42.000706
Tamatha
pythondev_help_Tamatha_2018-01-17T10:49:42.000706
1,516,186,182.000706
29,508
pythondev
help
any luck with that help, <@Shila>?
2018-01-17T10:53:43.000171
Brande
pythondev_help_Brande_2018-01-17T10:53:43.000171
1,516,186,423.000171
29,509
pythondev
help
I solve it, deleting the module: ```del sys.modules['ezored_vendor']```
2018-01-17T10:55:09.000496
Tamatha
pythondev_help_Tamatha_2018-01-17T10:55:09.000496
1,516,186,509.000496
29,510
pythondev
help
:dizzy_face:
2018-01-17T10:57:42.000328
Barney
pythondev_help_Barney_2018-01-17T10:57:42.000328
1,516,186,662.000328
29,511
pythondev
help
That's right! When in doubt, just rip it out!
2018-01-17T11:01:27.000417
Dominica
pythondev_help_Dominica_2018-01-17T11:01:27.000417
1,516,186,887.000417
29,512
pythondev
help
I bet one taco that it blows up somehow
2018-01-17T11:02:06.000717
Barney
pythondev_help_Barney_2018-01-17T11:02:06.000717
1,516,186,926.000717
29,513
pythondev
help
<https://lh3.googleusercontent.com/-VHV916run58/WC9To_x72tI/AAAAAAAACkE/f59cQ9_9-XY/safe_image_thumb.gif?imgmax=800>
2018-01-17T11:04:14.000002
Henrietta
pythondev_help_Henrietta_2018-01-17T11:04:14.000002
1,516,187,054.000002
29,514
pythondev
help
:D
2018-01-17T11:04:26.000218
Barney
pythondev_help_Barney_2018-01-17T11:04:26.000218
1,516,187,066.000218
29,515
pythondev
help
exactly this
2018-01-17T11:04:27.001010
Barney
pythondev_help_Barney_2018-01-17T11:04:27.001010
1,516,187,067.00101
29,516
pythondev
help
This query gives `0` ```today = datetime.date.today() last_90 = today - datetime.timedelta(days=90) vfr_day = Flight.objects.filter(date__lte=today,date__gte=last_90).aggregate(Sum('landings_day')) if vfr_day.get('landings_day') is None: vfr_day = 0 else: vfr_day...
2018-01-17T14:18:34.000840
Adelina
pythondev_help_Adelina_2018-01-17T14:18:34.000840
1,516,198,714.00084
29,517
pythondev
help
are you sure `last_90` is what it should be?
2018-01-17T14:23:02.000148
Floy
pythondev_help_Floy_2018-01-17T14:23:02.000148
1,516,198,982.000148
29,518
pythondev
help
I just tried `vfr_day = Flight.objects.filter(date__lte=today,date__gte=last_90).aggregate(Sum('landings_day'))` and `vfr_day=16` which sounds right
2018-01-17T14:26:13.000208
Adelina
pythondev_help_Adelina_2018-01-17T14:26:13.000208
1,516,199,173.000208
29,519
pythondev
help
i also fixed the `if xxx is None` ridiculousness and made it `if not xxx:`
2018-01-17T14:26:44.000117
Adelina
pythondev_help_Adelina_2018-01-17T14:26:44.000117
1,516,199,204.000117
29,520
pythondev
help
boom, got it. `landings_day__sum` is the answer
2018-01-17T14:27:48.000059
Adelina
pythondev_help_Adelina_2018-01-17T14:27:48.000059
1,516,199,268.000059
29,521
pythondev
help
thanks for listening :slightly_smiling_face:
2018-01-17T14:28:21.000045
Adelina
pythondev_help_Adelina_2018-01-17T14:28:21.000045
1,516,199,301.000045
29,522
pythondev
help
:thumbsup:
2018-01-17T14:39:14.000361
Floy
pythondev_help_Floy_2018-01-17T14:39:14.000361
1,516,199,954.000361
29,523