问:
Install Python Packages in Azure ML?
Similar question as here but now on Python packages. Currently, the CVXPY is missing in Azure ML. I am also trying to get other solvers such as GLPK, CLP and COINMP working in Azure ML.

How can I install Python packages in Azure ML?

Update about trying to install the Python packages not found in Azure ML.

I did as instructed by Peter Pan but I think the 32bits CVXPY files are wrong for the Anaconda 4 and Python 3.5 in Azure ML, logs and errors are here.

```<code>[Information]         Running with Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)]
</code>```

Update 2 with win_amd64 files (paste here)

```<code>[Information]         Extracting Script Bundle.zip to .\Script Bundle
[Information]         File Name                                             Modified             Size
[Information]         cvxopt-1.1.9-cp35-cp35m-win_amd64.whl          2017-06-07 01:03:34      1972074
[Information]         __MACOSX/                                      2017-06-07 01:26:28            0
[Information]         __MACOSX/._cvxopt-1.1.9-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34          452
[Information]         cvxpy-0.4.10-py3-none-any.whl                  2017-06-07 00:25:36       300880
[Information]         __MACOSX/._cvxpy-0.4.10-py3-none-any.whl       2017-06-07 00:25:36          444
[Information]         ecos-2.0.4-cp35-cp35m-win_amd64.whl            2017-06-07 01:03:40        56522
[Information]         __MACOSX/._ecos-2.0.4-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:40          450
[Information]         numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl   2017-06-07 01:25:02    127909457
[Information]         __MACOSX/._numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl 2017-06-07 01:25:02          459
[Information]         scipy-0.19.0-cp35-cp35m-win_amd64.whl          2017-06-07 01:05:12     12178932
[Information]         __MACOSX/._scipy-0.19.0-cp35-cp35m-win_amd64.whl 2017-06-07 01:05:12          452
[Information]         scs-1.2.6-cp35-cp35m-win_amd64.whl             2017-06-07 01:03:34        78653
[Information]         __MACOSX/._scs-1.2.6-cp35-cp35m-win_amd64.whl  2017-06-07 01:03:34          449
[Information]         [ READING ] 0:00:00
[Information]         Input pandas.DataFrame #1:
[Information]         Empty DataFrame
[Information]         Columns: [1]
[Information]         Index: []
[Information]         [ EXECUTING ] 0:00:00
[Information]         [ WRITING ] 0:00:00
</code>```

where import cvxpy, import cvxpy-0.4.10-py3-none-any.whl or cvxpy-0.4.10-py3-none-any do not work so

How can I use the following wheel files downloaded from here to use the external Python packages not found in Azure ML?

Update about permission problem about importing cvxpy (paste here)

```<code> [Error]         ImportError: No module named 'canonInterface'
</code>```

where the ZIP Bundle is organised a bit differently, the content of each wheel downloaded to a folder and the content having all zipped as a ZIP Bundle.

答:
I will demo Peter Pan's answer here and I show first a working experiment with external package. Building the ZIP Bundle for the external package CVXPY was not that straight-forward but educational.

Demo about external package using ZIP Bundle in Azure ML

This is a working example about using an additional package in Python Script module provided by Smit Shah

https://gallery.cortanaintelligence.com/Experiment/Python-additional-package

where

```[Information]         Extracting Script Bundle.zip to .\Script Bundle
[Information]         File Name                                             Modified             Size
[Information]         adal/__init__.py                               2017-05-01 10:03:04         1822
[Information]         adal/__init__.pyc                              2017-05-01 10:03:12          629
[Information]         adal/adal_error.py                             2017-05-01 10:03:04         1553
[Information]         adal/adal_error.pyc                            2017-05-01 10:03:12          685
[Information]         adal/argument.py                               2017-05-01 10:03:04         2023
[Information]         adal/argument.pyc                              2017-05-01 10:03:12          837
[Information]         adal/authentication_context.py                 2017-05-01 10:03:04        13766
[Information]         adal/authentication_context.pyc                2017-05-01 10:03:12        14198
[Information]         adal/authentication_parameters.py              2017-05-01 10:03:04         8195
[Information]         adal/authentication_parameters.pyc             2017-05-01 10:03:12         4820
[Information]         adal/authority.py                              2017-05-01 10:03:04         6908
[Information]         adal/authority.pyc                             2017-05-01 10:03:12         6091
[Information]         adal/cache_driver.py                           2017-05-01 10:03:04         9773
[Information]         adal/cache_driver.pyc                          2017-05-01 10:03:12         9293
[Information]         adal/code_request.py                           2017-05-01 10:03:04         2744
[Information]         adal/code_request.pyc                          2017-05-01 10:03:12         2225
[Information]         adal/constants.py                              2017-05-01 10:03:04         7359
[Information]         adal/constants.pyc                             2017-05-01 10:03:12         9305
[Information]         adal/log.py                                    2017-05-01 10:03:04         4058
[Information]         adal/log.pyc                                   2017-05-01 10:03:12         3699
[Information]         adal/mex.py                                    2017-05-01 10:03:04        11186
[Information]         adal/mex.pyc                                   2017-05-01 10:03:12         8804
[Information]         adal/oauth2_client.py                          2017-05-01 10:03:04        14196
[Information]         adal/oauth2_client.pyc                         2017-05-01 10:03:12        11619
[Information]         adal/self_signed_jwt.py                        2017-05-01 10:03:04         4823
[Information]         adal/self_signed_jwt.pyc                       2017-05-01 10:03:12         5301
[Information]         adal/token_cache.py                            2017-05-01 10:03:04         4761
[Information]         adal/token_cache.pyc                           2017-05-01 10:03:12         4883
[Information]         adal/token_request.py                          2017-05-01 10:03:04        17703
[Information]         adal/token_request.pyc                         2017-05-01 10:03:12        15096
[Information]         adal/user_realm.py                             2017-05-01 10:03:04         6362
[Information]         adal/user_realm.pyc                            2017-05-01 10:03:12         5325
[Information]         adal/util.py                                   2017-05-01 10:03:04         3567
[Information]         adal/util.pyc                                  2017-05-01 10:03:12         2723
[Information]         adal/wstrust_request.py                        2017-05-01 10:03:04         8402
[Information]         adal/wstrust_request.pyc                       2017-05-01 10:03:12         6816
[Information]         adal/wstrust_response.py                       2017-05-01 10:03:04         8751
[Information]         adal/wstrust_response.pyc                      2017-05-01 10:03:12         5467
[Information]         adal/xmlutil.py                                2017-05-01 10:03:04         2806
[Information]         adal/xmlutil.pyc                               2017-05-01 10:03:12         2309
[Information]         cryptography/__about__.py                      2017-04-27 17:51:38          817
[Information]         cryptography/__about__.pyc                     2017-04-27 17:51:50          892
[Information]         cryptography/__init__.py                       2017-04-27 17:51:38          829
[Information]         cryptography/__init__.pyc                      2017-04-27 17:51:50          962
[Information]         cryptography/exceptions.py                     2017-04-27 17:51:38         1234
[Information]         cryptography/exceptions.pyc                    2017-04-27 17:51:50         3406
[Information]         cryptography/fernet.py                         2017-04-27 17:51:38         4305
[Information]         cryptography/fernet.pyc                        2017-04-27 17:51:50         5670
[Information]         cryptography/hazmat/                           2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/__init__.py                2017-04-27 17:51:38          483
[Information]         cryptography/hazmat/__init__.pyc               2017-04-27 17:51:50          560
[Information]         cryptography/hazmat/backends/                  2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/__init__.py       2017-04-27 17:51:38         2403
[Information]         cryptography/hazmat/backends/__init__.pyc      2017-04-27 17:51:50         1783
[Information]         cryptography/hazmat/backends/commoncrypto/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/commoncrypto/__init__.py 2017-04-27 17:51:38          341
[Information]         cryptography/hazmat/backends/commoncrypto/__init__.pyc 2017-04-27 17:51:50          448
[Information]         cryptography/hazmat/backends/commoncrypto/backend.py 2017-04-27 17:51:38         8840
[Information]         cryptography/hazmat/backends/commoncrypto/backend.pyc 2017-04-27 17:51:50         9402
[Information]         cryptography/hazmat/backends/commoncrypto/ciphers.py 2017-04-27 17:51:38         9362
[Information]         cryptography/hazmat/backends/commoncrypto/ciphers.pyc 2017-04-27 17:51:50         8265
[Information]         cryptography/hazmat/backends/commoncrypto/hashes.py 2017-04-27 17:51:38         2040
[Information]         cryptography/hazmat/backends/commoncrypto/hashes.pyc 2017-04-27 17:51:50         2884
[Information]         cryptography/hazmat/backends/commoncrypto/hmac.py 2017-04-27 17:51:38         2188
[Information]         cryptography/hazmat/backends/commoncrypto/hmac.pyc 2017-04-27 17:51:50         3231
[Information]         cryptography/hazmat/backends/interfaces.py     2017-04-27 17:51:38        10493
[Information]         cryptography/hazmat/backends/interfaces.pyc    2017-04-27 17:51:50        21555
[Information]         cryptography/hazmat/backends/multibackend.py   2017-04-27 17:51:38        19700
[Information]         cryptography/hazmat/backends/multibackend.pyc  2017-04-27 17:51:50        25269
[Information]         cryptography/hazmat/backends/openssl/          2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/openssl/__init__.py 2017-04-27 17:51:38          336
[Information]         cryptography/hazmat/backends/openssl/__init__.pyc 2017-04-27 17:51:50          438
[Information]         cryptography/hazmat/backends/openssl/backend.py 2017-04-27 17:51:38        68646
[Information]         cryptography/hazmat/backends/openssl/backend.pyc 2017-04-27 17:51:50        64293
[Information]         cryptography/hazmat/backends/openssl/ciphers.py 2017-04-27 17:51:38         7665
[Information]         cryptography/hazmat/backends/openssl/ciphers.pyc 2017-04-27 17:51:50         6101
[Information]         cryptography/hazmat/backends/openssl/cmac.py   2017-04-27 17:51:38         2797
[Information]         cryptography/hazmat/backends/openssl/cmac.pyc  2017-04-27 17:51:50         3668
[Information]         cryptography/hazmat/backends/openssl/decode_asn1.py 2017-04-27 17:51:38        29210
[Information]         cryptography/hazmat/backends/openssl/decode_asn1.pyc 2017-04-27 17:51:50        28941
[Information]         cryptography/hazmat/backends/openssl/dh.py     2017-04-27 17:51:38         9945
[Information]         cryptography/hazmat/backends/openssl/dh.pyc    2017-04-27 17:51:50        10966
[Information]         cryptography/hazmat/backends/openssl/dsa.py    2017-04-27 17:51:38        10044
[Information]         cryptography/hazmat/backends/openssl/dsa.pyc   2017-04-27 17:51:50        12467
[Information]         cryptography/hazmat/backends/openssl/ec.py     2017-04-27 17:51:38         9914
[Information]         cryptography/hazmat/backends/openssl/ec.pyc    2017-04-27 17:51:50        12615
[Information]         cryptography/hazmat/backends/openssl/encode_asn1.py 2017-04-27 17:51:38        22285
[Information]         cryptography/hazmat/backends/openssl/encode_asn1.pyc 2017-04-27 17:51:50        22267
[Information]         cryptography/hazmat/backends/openssl/hashes.py 2017-04-27 17:51:38         2532
[Information]         cryptography/hazmat/backends/openssl/hashes.pyc 2017-04-27 17:51:50         3185
[Information]         cryptography/hazmat/backends/openssl/hmac.py   2017-04-27 17:51:38         2980
[Information]         cryptography/hazmat/backends/openssl/hmac.pyc  2017-04-27 17:51:50         3732
[Information]         cryptography/hazmat/backends/openssl/rsa.py    2017-04-27 17:51:38        18610
[Information]         cryptography/hazmat/backends/openssl/rsa.pyc   2017-04-27 17:51:50        17931
[Information]         cryptography/hazmat/backends/openssl/utils.py  2017-04-27 17:51:38          862
[Information]         cryptography/hazmat/backends/openssl/utils.pyc 2017-04-27 17:51:50         1088
[Information]         cryptography/hazmat/backends/openssl/x509.py   2017-04-27 17:51:38        15804
[Information]         cryptography/hazmat/backends/openssl/x509.pyc  2017-04-27 17:51:50        23091
[Information]         cryptography/hazmat/bindings/                  2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/__init__.py       2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/__init__.pyc      2017-04-27 17:51:50          313
[Information]         cryptography/hazmat/bindings/_constant_time.pyd 2017-04-27 17:51:38         8192
[Information]         cryptography/hazmat/bindings/_openssl.pyd      2017-04-27 17:51:38      2754560
[Information]         cryptography/hazmat/bindings/_padding.pyd      2017-04-27 17:51:38         8704
[Information]         cryptography/hazmat/bindings/commoncrypto/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/commoncrypto/__init__.py 2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/commoncrypto/__init__.pyc 2017-04-27 17:51:50          326
[Information]         cryptography/hazmat/bindings/commoncrypto/binding.py 2017-04-27 17:51:38          410
[Information]         cryptography/hazmat/bindings/commoncrypto/binding.pyc 2017-04-27 17:51:50          785
[Information]         cryptography/hazmat/bindings/openssl/          2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/openssl/__init__.py 2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/openssl/__init__.pyc 2017-04-27 17:51:50          321
[Information]         cryptography/hazmat/bindings/openssl/_conditional.py 2017-04-27 17:51:38         8854
[Information]         cryptography/hazmat/bindings/openssl/_conditional.pyc 2017-04-27 17:51:50         8138
[Information]         cryptography/hazmat/bindings/openssl/binding.py 2017-04-27 17:51:38         5067
[Information]         cryptography/hazmat/bindings/openssl/binding.pyc 2017-04-27 17:51:50         5118
[Information]         cryptography/hazmat/primitives/                2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/__init__.py     2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/primitives/__init__.pyc    2017-04-27 17:51:50          315
[Information]         cryptography/hazmat/primitives/asymmetric/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/asymmetric/__init__.py 2017-04-27 17:51:38         1020
[Information]         cryptography/hazmat/primitives/asymmetric/__init__.pyc 2017-04-27 17:51:50         2305
[Information]         cryptography/hazmat/primitives/asymmetric/dh.py 2017-04-27 17:51:38         5093
[Information]         cryptography/hazmat/primitives/asymmetric/dh.pyc 2017-04-27 17:51:50        10298
[Information]         cryptography/hazmat/primitives/asymmetric/dsa.py 2017-04-27 17:51:38         6890
[Information]         cryptography/hazmat/primitives/asymmetric/dsa.pyc 2017-04-27 17:51:50        13468
[Information]         cryptography/hazmat/primitives/asymmetric/ec.py 2017-04-27 17:51:38         9570
[Information]         cryptography/hazmat/primitives/asymmetric/ec.pyc 2017-04-27 17:51:50        18550
[Information]         cryptography/hazmat/primitives/asymmetric/padding.py 2017-04-27 17:51:38         2261
[Information]         cryptography/hazmat/primitives/asymmetric/padding.pyc 2017-04-27 17:51:50         4322
[Information]         cryptography/hazmat/primitives/asymmetric/rsa.py 2017-04-27 17:51:38        10226
[Information]         cryptography/hazmat/primitives/asymmetric/rsa.pyc 2017-04-27 17:51:50        15084
[Information]         cryptography/hazmat/primitives/asymmetric/utils.py 2017-04-27 17:51:38         1704
[Information]         cryptography/hazmat/primitives/asymmetric/utils.pyc 2017-04-27 17:51:50         2984
[Information]         cryptography/hazmat/primitives/ciphers/        2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/ciphers/__init__.py 2017-04-27 17:51:38          574
[Information]         cryptography/hazmat/primitives/ciphers/__init__.pyc 2017-04-27 17:51:50          654
[Information]         cryptography/hazmat/primitives/ciphers/algorithms.py 2017-04-27 17:51:38         3424
[Information]         cryptography/hazmat/primitives/ciphers/algorithms.pyc 2017-04-27 17:51:50         7930
[Information]         cryptography/hazmat/primitives/ciphers/base.py 2017-04-27 17:51:38         7663
[Information]         cryptography/hazmat/primitives/ciphers/base.pyc 2017-04-27 17:51:50        12557
[Information]         cryptography/hazmat/primitives/ciphers/modes.py 2017-04-27 17:51:38         5517
[Information]         cryptography/hazmat/primitives/ciphers/modes.pyc 2017-04-27 17:51:50         9165
[Information]         cryptography/hazmat/primitives/cmac.py         2017-04-27 17:51:38         2235
[Information]         cryptography/hazmat/primitives/cmac.pyc        2017-04-27 17:51:50         3192
[Information]         cryptography/hazmat/primitives/constant_time.py 2017-04-27 17:51:38          798
[Information]         cryptography/hazmat/primitives/constant_time.pyc 2017-04-27 17:51:50         1237
[Information]         cryptography/hazmat/primitives/hashes.py       2017-04-27 17:51:38         5081
[Information]         cryptography/hazmat/primitives/hashes.pyc      2017-04-27 17:51:50         9263
[Information]         cryptography/hazmat/primitives/hmac.py         2017-04-27 17:51:38         2353
[Information]         cryptography/hazmat/primitives/hmac.pyc        2017-04-27 17:51:50         3322
[Information]         cryptography/hazmat/primitives/interfaces/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/interfaces/__init__.py 2017-04-27 17:51:38          884
[Information]         cryptography/hazmat/primitives/interfaces/__init__.pyc 2017-04-27 17:51:50         1961
[Information]         cryptography/hazmat/primitives/kdf/            2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/kdf/__init__.py 2017-04-27 17:51:38          771
[Information]         cryptography/hazmat/primitives/kdf/__init__.pyc 2017-04-27 17:51:50         1473
[Information]         cryptography/hazmat/primitives/kdf/concatkdf.py 2017-04-27 17:51:38         4109
[Information]         cryptography/hazmat/primitives/kdf/concatkdf.pyc 2017-04-27 17:51:50         5908
[Information]         cryptography/hazmat/primitives/kdf/hkdf.py     2017-04-27 17:51:38         3674
[Information]         cryptography/hazmat/primitives/kdf/hkdf.pyc    2017-04-27 17:51:50         4986
[Information]         cryptography/hazmat/primitives/kdf/kbkdf.py    2017-04-27 17:51:38         5017
[Information]         cryptography/hazmat/primitives/kdf/kbkdf.pyc   2017-04-27 17:51:50         5610
[Information]         cryptography/hazmat/primitives/kdf/pbkdf2.py   2017-04-27 17:51:38         2185
[Information]         cryptography/hazmat/primitives/kdf/pbkdf2.pyc  2017-04-27 17:51:50         2813
[Information]         cryptography/hazmat/primitives/kdf/scrypt.py   2017-04-27 17:51:38         2252
[Information]         cryptography/hazmat/primitives/kdf/scrypt.pyc  2017-04-27 17:51:50         2957
[Information]         cryptography/hazmat/primitives/kdf/x963kdf.py  2017-04-27 17:51:38         2363
[Information]         cryptography/hazmat/primitives/kdf/x963kdf.pyc 2017-04-27 17:51:50         3296
[Information]         cryptography/hazmat/primitives/keywrap.py      2017-04-27 17:51:38         3050
[Information]         cryptography/hazmat/primitives/keywrap.pyc     2017-04-27 17:51:50         3136
[Information]         cryptography/hazmat/primitives/padding.py      2017-04-27 17:51:38         5736
[Information]         cryptography/hazmat/primitives/padding.pyc     2017-04-27 17:51:50        10471
[Information]         cryptography/hazmat/primitives/serialization.py 2017-04-27 17:51:38         5288
[Information]         cryptography/hazmat/primitives/serialization.pyc 2017-04-27 17:51:50         8668
[Information]         cryptography/hazmat/primitives/twofactor/      2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/twofactor/__init__.py 2017-04-27 17:51:38          288
[Information]         cryptography/hazmat/primitives/twofactor/__init__.pyc 2017-04-27 17:51:50          607
[Information]         cryptography/hazmat/primitives/twofactor/hotp.py 2017-04-27 17:51:38         2589
[Information]         cryptography/hazmat/primitives/twofactor/hotp.pyc 2017-04-27 17:51:50         3808
[Information]         cryptography/hazmat/primitives/twofactor/totp.py 2017-04-27 17:51:38         1594
[Information]         cryptography/hazmat/primitives/twofactor/totp.pyc 2017-04-27 17:51:50         2637
[Information]         cryptography/hazmat/primitives/twofactor/utils.py 2017-04-27 17:51:38          954
[Information]         cryptography/hazmat/primitives/twofactor/utils.pyc 2017-04-27 17:51:50         1208
[Information]         cryptography/utils.py                          2017-04-27 17:51:38         4130
[Information]         cryptography/utils.pyc                         2017-04-27 17:51:50         6969
[Information]         cryptography/x509/                             2017-04-27 17:51:50            0
[Information]         cryptography/x509/__init__.py                  2017-04-27 17:51:38         6857
[Information]         cryptography/x509/__init__.pyc                 2017-04-27 17:51:50         6944
[Information]         cryptography/x509/base.py                      2017-04-27 17:51:38        23315
[Information]         cryptography/x509/base.pyc                     2017-04-27 17:51:50        31205
[Information]         cryptography/x509/extensions.py                2017-04-27 17:51:38        37228
[Information]         cryptography/x509/extensions.pyc               2017-04-27 17:51:50        59587
[Information]         cryptography/x509/general_name.py              2017-04-27 17:51:38         7519
[Information]         cryptography/x509/general_name.pyc
...
2017-04-27 11:28:02        21986
[Information]         dateutil/relativedelta.pyc                     2017-04-27 11:28:06        17516
[Information]         dateutil/rrule.py                              2017-04-27 11:28:02        61792
[Information]         dateutil/rrule.pyc                             2017-04-27 11:28:06        48786
[Information]         dateutil/tz/                                   2017-04-27 11:28:06            0
[Information]         dateutil/tz/__init__.py                        2017-04-27 11:28:02          145
[Information]         dateutil/tz/__init__.pyc                       2017-04-27 11:28:06          379
[Information]         dateutil/tz/_common.py                         2017-04-27 11:28:02        11744
[Information]         dateutil/tz/_common.pyc                        2017-04-27 11:28:06        13900
[Information]         dateutil/tz/tz.py                              2017-04-27 11:28:02        48924
[Information]         dateutil/tz/tz.pyc                             2017-04-27 11:28:06        44590
[Information]         dateutil/tz/win.py                             2017-04-27 11:28:02        11466
[Information]         dateutil/tz/win.pyc                            2017-04-27 11:28:06        12475
[Information]         dateutil/tzwin.py                              2017-04-27 11:28:02           58
[Information]         dateutil/tzwin.pyc                             2017-04-27 11:28:06          211
[Information]         dateutil/zoneinfo/                             2017-04-27 11:28:06            0
[Information]         dateutil/zoneinfo/__init__.py                  2017-04-27 11:28:02         6810
[Information]         dateutil/zoneinfo/__init__.pyc                 2017-04-27 11:28:06         7654
[Information]         dateutil/zoneinfo/dateutil-zoneinfo.tar.gz     2017-04-27 11:28:02       139671
[Information]         dateutil/zoneinfo/rebuild.py                   2017-04-27 11:28:02         1688
[Information]         dateutil/zoneinfo/rebuild.pyc                  2017-04-27 11:28:06         2239
[Information]         jwt/__init__.py                                2017-06-06 14:51:08          738
[Information]         jwt/__init__.pyc                               2017-06-06 14:51:08         1177
[Information]         jwt/__main__.py                                2017-06-06 14:51:08         3585
[Information]         jwt/__main__.pyc                               2017-06-06 14:51:08         3120
[Information]         jwt/algorithms.py                              2017-06-06 14:51:08        13758
[Information]         jwt/algorithms.pyc                             2017-06-06 14:51:08        14450
[Information]         jwt/api_jws.py                                 2017-06-06 14:51:08         7133
[Information]         jwt/api_jws.pyc                                2017-06-06 14:51:08         7462
[Information]         jwt/api_jwt.py                                 2017-06-06 14:51:08         6547
[Information]         jwt/api_jwt.pyc                                2017-06-06 14:51:08         6842
[Information]         jwt/compat.py                                  2017-06-06 14:51:08         1784
[Information]         jwt/compat.pyc                                 2017-06-06 14:51:08         2253
[Information]         jwt/contrib/                                   2017-06-06 14:51:08            0
[Information]         jwt/contrib/__init__.py                        2017-06-06 14:51:08            0
[Information]         jwt/contrib/__init__.pyc                       2017-06-06 14:51:08          163
[Information]         jwt/contrib/algorithms/                        2017-06-06 14:51:08            0
[Information]         jwt/contrib/algorithms/__init__.py             2017-06-06 14:51:08            0
[Information]         jwt/contrib/algorithms/__init__.pyc            2017-06-06 14:51:08          174
[Information]         jwt/contrib/algorithms/py_ecdsa.py             2017-06-06 14:51:08         1771
[Information]         jwt/contrib/algorithms/py_ecdsa.pyc            2017-06-06 14:51:08         2406
[Information]         jwt/contrib/algorithms/pycrypto.py             2017-06-06 14:51:08         1250
[Information]         jwt/contrib/algorithms/pycrypto.pyc            2017-06-06 14:51:08         2325
[Information]         jwt/exceptions.py                              2017-06-06 14:51:08          841
[Information]         jwt/exceptions.pyc                             2017-06-06 14:51:08         2777
[Information]         jwt/utils.py                                   2017-06-06 14:51:08         2629
[Information]         jwt/utils.pyc                                  2017-06-06 14:51:08         4204
```

<p>so the ZIP bundle has been done in a specific way such that packages' dist-info folders are removed and only the folders having the exact name of the package is included</p>

<p><img src="https://i.stack.imgur.com/mtSFa.png" alt="enter image description here"></p>

<p>by which I was able to run <code>import cvxpy</code>, notice that new packages <code>multiplocess</code> and <code>CVXCanon</code> are included. Yet in solving a problem, I got error with <code>ecos</code> module missing next. So I created a new directory <code>ecos</code> for all files found in the original <code>ecos.*.wheel</code> package so the updated ZIP Bundle looks like this</p>

<p><img src="https://i.stack.imgur.com/tY8UH.png" alt="enter image description here"></p>

<p>by which I was able to solve the following convex optimisation problem with DCP tool called CVXPY.</p>

<p><img src="https://i.stack.imgur.com/on6p4.png" alt="enter image description here"></p>

<p><em>Code inside Python Script module that solves an optimisation problem with CVXPY in Azure ML</em></p>

```import pandas as pd
from cvxpy import *
import numpy

def azureml_main(dataframe1 = None, dataframe2 = None):

    # Problem data.
    m = 30
    n = 20
    numpy.random.seed(1)
    A = numpy.random.randn(m, n)
    b = numpy.random.randn(m)

    # Construct the problem.
    x = Variable(n)
    objective = Minimize(sum_squares(A*x - b))
    constraints = [0 <= x, x <= 1]
    prob = Problem(objective, constraints)

    # The optimal objective is returned by prob.solve().
    result = prob.solve()
    # The optimal value for x is stored in x.value.
    #print x.value
    # The optimal Lagrange multiplier for a constraint
    # is stored in constraint.dual_value.
    #print constraints[0].dual_value

    dataframe1=pd.DataFrame(numpy.zeros(1))
    dataframe1[0][0]=result

    # Return value must be of a sequence of pandas.DataFrame
    return dataframe1,
```

Further reading

Notice that the code creates a Panda DataFrame with size one zero matrix, there may be more elegant way to do it, more in
Python Pandas DataFrame with only a single number stored?

Title: Install Python Packages in Azure ML?

Body:
Similar question as here but now on Python packages. Currently, the CVXPY is missing in Azure ML. I am also trying to get other solvers such as GLPK, CLP and COINMP working in Azure ML.

How can I install Python packages in Azure ML?

Update about trying to install the Python packages not found in Azure ML.

I did as instructed by Peter Pan but I think the 32bits CVXPY files are wrong for the Anaconda 4 and Python 3.5 in Azure ML, logs and errors are here.

[Information]         Running with Python 3.5.1 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)]

Update 2 with win_amd64 files (paste here)

[Information]         Extracting Script Bundle.zip to .\Script Bundle
[Information]         File Name                                             Modified             Size
[Information]         cvxopt-1.1.9-cp35-cp35m-win_amd64.whl          2017-06-07 01:03:34      1972074
[Information]         __MACOSX/                                      2017-06-07 01:26:28            0
[Information]         __MACOSX/._cvxopt-1.1.9-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:34          452
[Information]         cvxpy-0.4.10-py3-none-any.whl                  2017-06-07 00:25:36       300880
[Information]         __MACOSX/._cvxpy-0.4.10-py3-none-any.whl       2017-06-07 00:25:36          444
[Information]         ecos-2.0.4-cp35-cp35m-win_amd64.whl            2017-06-07 01:03:40        56522
[Information]         __MACOSX/._ecos-2.0.4-cp35-cp35m-win_amd64.whl 2017-06-07 01:03:40          450
[Information]         numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl   2017-06-07 01:25:02    127909457
[Information]         __MACOSX/._numpy-1.13.0rc2+mkl-cp35-cp35m-win_amd64.whl 2017-06-07 01:25:02          459
[Information]         scipy-0.19.0-cp35-cp35m-win_amd64.whl          2017-06-07 01:05:12     12178932
[Information]         __MACOSX/._scipy-0.19.0-cp35-cp35m-win_amd64.whl 2017-06-07 01:05:12          452
[Information]         scs-1.2.6-cp35-cp35m-win_amd64.whl             2017-06-07 01:03:34        78653
[Information]         __MACOSX/._scs-1.2.6-cp35-cp35m-win_amd64.whl  2017-06-07 01:03:34          449
[Information]         [ READING ] 0:00:00
[Information]         Input pandas.DataFrame #1:
[Information]         Empty DataFrame
[Information]         Columns: [1]
[Information]         Index: []
[Information]         [ EXECUTING ] 0:00:00
[Information]         [ WRITING ] 0:00:00

where import cvxpy, import cvxpy-0.4.10-py3-none-any.whl or cvxpy-0.4.10-py3-none-any do not work so

How can I use the following wheel files downloaded from here to use the external Python packages not found in Azure ML?

Update about permission problem about importing cvxpy (paste here)

 [Error]         ImportError: No module named 'canonInterface'

where the ZIP Bundle is organised a bit differently, the content of each wheel downloaded to a folder and the content having all zipped as a ZIP Bundle.

Body:
I will demo Peter Pan's answer here and I show first a working experiment with external package. Building the ZIP Bundle for the external package CVXPY was not that straight-forward but educational.

Demo about external package using ZIP Bundle in Azure ML

This is a working example about using an additional package in Python Script module provided by Smit Shah

https://gallery.cortanaintelligence.com/Experiment/Python-additional-package

where

[Information]         Extracting Script Bundle.zip to .\Script Bundle
[Information]         File Name                                             Modified             Size
[Information]         adal/__init__.py                               2017-05-01 10:03:04         1822
[Information]         adal/__init__.pyc                              2017-05-01 10:03:12          629
[Information]         adal/adal_error.py                             2017-05-01 10:03:04         1553
[Information]         adal/adal_error.pyc                            2017-05-01 10:03:12          685
[Information]         adal/argument.py                               2017-05-01 10:03:04         2023
[Information]         adal/argument.pyc                              2017-05-01 10:03:12          837
[Information]         adal/authentication_context.py                 2017-05-01 10:03:04        13766
[Information]         adal/authentication_context.pyc                2017-05-01 10:03:12        14198
[Information]         adal/authentication_parameters.py              2017-05-01 10:03:04         8195
[Information]         adal/authentication_parameters.pyc             2017-05-01 10:03:12         4820
[Information]         adal/authority.py                              2017-05-01 10:03:04         6908
[Information]         adal/authority.pyc                             2017-05-01 10:03:12         6091
[Information]         adal/cache_driver.py                           2017-05-01 10:03:04         9773
[Information]         adal/cache_driver.pyc                          2017-05-01 10:03:12         9293
[Information]         adal/code_request.py                           2017-05-01 10:03:04         2744
[Information]         adal/code_request.pyc                          2017-05-01 10:03:12         2225
[Information]         adal/constants.py                              2017-05-01 10:03:04         7359
[Information]         adal/constants.pyc                             2017-05-01 10:03:12         9305
[Information]         adal/log.py                                    2017-05-01 10:03:04         4058
[Information]         adal/log.pyc                                   2017-05-01 10:03:12         3699
[Information]         adal/mex.py                                    2017-05-01 10:03:04        11186
[Information]         adal/mex.pyc                                   2017-05-01 10:03:12         8804
[Information]         adal/oauth2_client.py                          2017-05-01 10:03:04        14196
[Information]         adal/oauth2_client.pyc                         2017-05-01 10:03:12        11619
[Information]         adal/self_signed_jwt.py                        2017-05-01 10:03:04         4823
[Information]         adal/self_signed_jwt.pyc                       2017-05-01 10:03:12         5301
[Information]         adal/token_cache.py                            2017-05-01 10:03:04         4761
[Information]         adal/token_cache.pyc                           2017-05-01 10:03:12         4883
[Information]         adal/token_request.py                          2017-05-01 10:03:04        17703
[Information]         adal/token_request.pyc                         2017-05-01 10:03:12        15096
[Information]         adal/user_realm.py                             2017-05-01 10:03:04         6362
[Information]         adal/user_realm.pyc                            2017-05-01 10:03:12         5325
[Information]         adal/util.py                                   2017-05-01 10:03:04         3567
[Information]         adal/util.pyc                                  2017-05-01 10:03:12         2723
[Information]         adal/wstrust_request.py                        2017-05-01 10:03:04         8402
[Information]         adal/wstrust_request.pyc                       2017-05-01 10:03:12         6816
[Information]         adal/wstrust_response.py                       2017-05-01 10:03:04         8751
[Information]         adal/wstrust_response.pyc                      2017-05-01 10:03:12         5467
[Information]         adal/xmlutil.py                                2017-05-01 10:03:04         2806
[Information]         adal/xmlutil.pyc                               2017-05-01 10:03:12         2309
[Information]         cryptography/__about__.py                      2017-04-27 17:51:38          817
[Information]         cryptography/__about__.pyc                     2017-04-27 17:51:50          892
[Information]         cryptography/__init__.py                       2017-04-27 17:51:38          829
[Information]         cryptography/__init__.pyc                      2017-04-27 17:51:50          962
[Information]         cryptography/exceptions.py                     2017-04-27 17:51:38         1234
[Information]         cryptography/exceptions.pyc                    2017-04-27 17:51:50         3406
[Information]         cryptography/fernet.py                         2017-04-27 17:51:38         4305
[Information]         cryptography/fernet.pyc                        2017-04-27 17:51:50         5670
[Information]         cryptography/hazmat/                           2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/__init__.py                2017-04-27 17:51:38          483
[Information]         cryptography/hazmat/__init__.pyc               2017-04-27 17:51:50          560
[Information]         cryptography/hazmat/backends/                  2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/__init__.py       2017-04-27 17:51:38         2403
[Information]         cryptography/hazmat/backends/__init__.pyc      2017-04-27 17:51:50         1783
[Information]         cryptography/hazmat/backends/commoncrypto/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/commoncrypto/__init__.py 2017-04-27 17:51:38          341
[Information]         cryptography/hazmat/backends/commoncrypto/__init__.pyc 2017-04-27 17:51:50          448
[Information]         cryptography/hazmat/backends/commoncrypto/backend.py 2017-04-27 17:51:38         8840
[Information]         cryptography/hazmat/backends/commoncrypto/backend.pyc 2017-04-27 17:51:50         9402
[Information]         cryptography/hazmat/backends/commoncrypto/ciphers.py 2017-04-27 17:51:38         9362
[Information]         cryptography/hazmat/backends/commoncrypto/ciphers.pyc 2017-04-27 17:51:50         8265
[Information]         cryptography/hazmat/backends/commoncrypto/hashes.py 2017-04-27 17:51:38         2040
[Information]         cryptography/hazmat/backends/commoncrypto/hashes.pyc 2017-04-27 17:51:50         2884
[Information]         cryptography/hazmat/backends/commoncrypto/hmac.py 2017-04-27 17:51:38         2188
[Information]         cryptography/hazmat/backends/commoncrypto/hmac.pyc 2017-04-27 17:51:50         3231
[Information]         cryptography/hazmat/backends/interfaces.py     2017-04-27 17:51:38        10493
[Information]         cryptography/hazmat/backends/interfaces.pyc    2017-04-27 17:51:50        21555
[Information]         cryptography/hazmat/backends/multibackend.py   2017-04-27 17:51:38        19700
[Information]         cryptography/hazmat/backends/multibackend.pyc  2017-04-27 17:51:50        25269
[Information]         cryptography/hazmat/backends/openssl/          2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/backends/openssl/__init__.py 2017-04-27 17:51:38          336
[Information]         cryptography/hazmat/backends/openssl/__init__.pyc 2017-04-27 17:51:50          438
[Information]         cryptography/hazmat/backends/openssl/backend.py 2017-04-27 17:51:38        68646
[Information]         cryptography/hazmat/backends/openssl/backend.pyc 2017-04-27 17:51:50        64293
[Information]         cryptography/hazmat/backends/openssl/ciphers.py 2017-04-27 17:51:38         7665
[Information]         cryptography/hazmat/backends/openssl/ciphers.pyc 2017-04-27 17:51:50         6101
[Information]         cryptography/hazmat/backends/openssl/cmac.py   2017-04-27 17:51:38         2797
[Information]         cryptography/hazmat/backends/openssl/cmac.pyc  2017-04-27 17:51:50         3668
[Information]         cryptography/hazmat/backends/openssl/decode_asn1.py 2017-04-27 17:51:38        29210
[Information]         cryptography/hazmat/backends/openssl/decode_asn1.pyc 2017-04-27 17:51:50        28941
[Information]         cryptography/hazmat/backends/openssl/dh.py     2017-04-27 17:51:38         9945
[Information]         cryptography/hazmat/backends/openssl/dh.pyc    2017-04-27 17:51:50        10966
[Information]         cryptography/hazmat/backends/openssl/dsa.py    2017-04-27 17:51:38        10044
[Information]         cryptography/hazmat/backends/openssl/dsa.pyc   2017-04-27 17:51:50        12467
[Information]         cryptography/hazmat/backends/openssl/ec.py     2017-04-27 17:51:38         9914
[Information]         cryptography/hazmat/backends/openssl/ec.pyc    2017-04-27 17:51:50        12615
[Information]         cryptography/hazmat/backends/openssl/encode_asn1.py 2017-04-27 17:51:38        22285
[Information]         cryptography/hazmat/backends/openssl/encode_asn1.pyc 2017-04-27 17:51:50        22267
[Information]         cryptography/hazmat/backends/openssl/hashes.py 2017-04-27 17:51:38         2532
[Information]         cryptography/hazmat/backends/openssl/hashes.pyc 2017-04-27 17:51:50         3185
[Information]         cryptography/hazmat/backends/openssl/hmac.py   2017-04-27 17:51:38         2980
[Information]         cryptography/hazmat/backends/openssl/hmac.pyc  2017-04-27 17:51:50         3732
[Information]         cryptography/hazmat/backends/openssl/rsa.py    2017-04-27 17:51:38        18610
[Information]         cryptography/hazmat/backends/openssl/rsa.pyc   2017-04-27 17:51:50        17931
[Information]         cryptography/hazmat/backends/openssl/utils.py  2017-04-27 17:51:38          862
[Information]         cryptography/hazmat/backends/openssl/utils.pyc 2017-04-27 17:51:50         1088
[Information]         cryptography/hazmat/backends/openssl/x509.py   2017-04-27 17:51:38        15804
[Information]         cryptography/hazmat/backends/openssl/x509.pyc  2017-04-27 17:51:50        23091
[Information]         cryptography/hazmat/bindings/                  2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/__init__.py       2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/__init__.pyc      2017-04-27 17:51:50          313
[Information]         cryptography/hazmat/bindings/_constant_time.pyd 2017-04-27 17:51:38         8192
[Information]         cryptography/hazmat/bindings/_openssl.pyd      2017-04-27 17:51:38      2754560
[Information]         cryptography/hazmat/bindings/_padding.pyd      2017-04-27 17:51:38         8704
[Information]         cryptography/hazmat/bindings/commoncrypto/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/commoncrypto/__init__.py 2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/commoncrypto/__init__.pyc 2017-04-27 17:51:50          326
[Information]         cryptography/hazmat/bindings/commoncrypto/binding.py 2017-04-27 17:51:38          410
[Information]         cryptography/hazmat/bindings/commoncrypto/binding.pyc 2017-04-27 17:51:50          785
[Information]         cryptography/hazmat/bindings/openssl/          2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/bindings/openssl/__init__.py 2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/bindings/openssl/__init__.pyc 2017-04-27 17:51:50          321
[Information]         cryptography/hazmat/bindings/openssl/_conditional.py 2017-04-27 17:51:38         8854
[Information]         cryptography/hazmat/bindings/openssl/_conditional.pyc 2017-04-27 17:51:50         8138
[Information]         cryptography/hazmat/bindings/openssl/binding.py 2017-04-27 17:51:38         5067
[Information]         cryptography/hazmat/bindings/openssl/binding.pyc 2017-04-27 17:51:50         5118
[Information]         cryptography/hazmat/primitives/                2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/__init__.py     2017-04-27 17:51:38          246
[Information]         cryptography/hazmat/primitives/__init__.pyc    2017-04-27 17:51:50          315
[Information]         cryptography/hazmat/primitives/asymmetric/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/asymmetric/__init__.py 2017-04-27 17:51:38         1020
[Information]         cryptography/hazmat/primitives/asymmetric/__init__.pyc 2017-04-27 17:51:50         2305
[Information]         cryptography/hazmat/primitives/asymmetric/dh.py 2017-04-27 17:51:38         5093
[Information]         cryptography/hazmat/primitives/asymmetric/dh.pyc 2017-04-27 17:51:50        10298
[Information]         cryptography/hazmat/primitives/asymmetric/dsa.py 2017-04-27 17:51:38         6890
[Information]         cryptography/hazmat/primitives/asymmetric/dsa.pyc 2017-04-27 17:51:50        13468
[Information]         cryptography/hazmat/primitives/asymmetric/ec.py 2017-04-27 17:51:38         9570
[Information]         cryptography/hazmat/primitives/asymmetric/ec.pyc 2017-04-27 17:51:50        18550
[Information]         cryptography/hazmat/primitives/asymmetric/padding.py 2017-04-27 17:51:38         2261
[Information]         cryptography/hazmat/primitives/asymmetric/padding.pyc 2017-04-27 17:51:50         4322
[Information]         cryptography/hazmat/primitives/asymmetric/rsa.py 2017-04-27 17:51:38        10226
[Information]         cryptography/hazmat/primitives/asymmetric/rsa.pyc 2017-04-27 17:51:50        15084
[Information]         cryptography/hazmat/primitives/asymmetric/utils.py 2017-04-27 17:51:38         1704
[Information]         cryptography/hazmat/primitives/asymmetric/utils.pyc 2017-04-27 17:51:50         2984
[Information]         cryptography/hazmat/primitives/ciphers/        2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/ciphers/__init__.py 2017-04-27 17:51:38          574
[Information]         cryptography/hazmat/primitives/ciphers/__init__.pyc 2017-04-27 17:51:50          654
[Information]         cryptography/hazmat/primitives/ciphers/algorithms.py 2017-04-27 17:51:38         3424
[Information]         cryptography/hazmat/primitives/ciphers/algorithms.pyc 2017-04-27 17:51:50         7930
[Information]         cryptography/hazmat/primitives/ciphers/base.py 2017-04-27 17:51:38         7663
[Information]         cryptography/hazmat/primitives/ciphers/base.pyc 2017-04-27 17:51:50        12557
[Information]         cryptography/hazmat/primitives/ciphers/modes.py 2017-04-27 17:51:38         5517
[Information]         cryptography/hazmat/primitives/ciphers/modes.pyc 2017-04-27 17:51:50         9165
[Information]         cryptography/hazmat/primitives/cmac.py         2017-04-27 17:51:38         2235
[Information]         cryptography/hazmat/primitives/cmac.pyc        2017-04-27 17:51:50         3192
[Information]         cryptography/hazmat/primitives/constant_time.py 2017-04-27 17:51:38          798
[Information]         cryptography/hazmat/primitives/constant_time.pyc 2017-04-27 17:51:50         1237
[Information]         cryptography/hazmat/primitives/hashes.py       2017-04-27 17:51:38         5081
[Information]         cryptography/hazmat/primitives/hashes.pyc      2017-04-27 17:51:50         9263
[Information]         cryptography/hazmat/primitives/hmac.py         2017-04-27 17:51:38         2353
[Information]         cryptography/hazmat/primitives/hmac.pyc        2017-04-27 17:51:50         3322
[Information]         cryptography/hazmat/primitives/interfaces/     2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/interfaces/__init__.py 2017-04-27 17:51:38          884
[Information]         cryptography/hazmat/primitives/interfaces/__init__.pyc 2017-04-27 17:51:50         1961
[Information]         cryptography/hazmat/primitives/kdf/            2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/kdf/__init__.py 2017-04-27 17:51:38          771
[Information]         cryptography/hazmat/primitives/kdf/__init__.pyc 2017-04-27 17:51:50         1473
[Information]         cryptography/hazmat/primitives/kdf/concatkdf.py 2017-04-27 17:51:38         4109
[Information]         cryptography/hazmat/primitives/kdf/concatkdf.pyc 2017-04-27 17:51:50         5908
[Information]         cryptography/hazmat/primitives/kdf/hkdf.py     2017-04-27 17:51:38         3674
[Information]         cryptography/hazmat/primitives/kdf/hkdf.pyc    2017-04-27 17:51:50         4986
[Information]         cryptography/hazmat/primitives/kdf/kbkdf.py    2017-04-27 17:51:38         5017
[Information]         cryptography/hazmat/primitives/kdf/kbkdf.pyc   2017-04-27 17:51:50         5610
[Information]         cryptography/hazmat/primitives/kdf/pbkdf2.py   2017-04-27 17:51:38         2185
[Information]         cryptography/hazmat/primitives/kdf/pbkdf2.pyc  2017-04-27 17:51:50         2813
[Information]         cryptography/hazmat/primitives/kdf/scrypt.py   2017-04-27 17:51:38         2252
[Information]         cryptography/hazmat/primitives/kdf/scrypt.pyc  2017-04-27 17:51:50         2957
[Information]         cryptography/hazmat/primitives/kdf/x963kdf.py  2017-04-27 17:51:38         2363
[Information]         cryptography/hazmat/primitives/kdf/x963kdf.pyc 2017-04-27 17:51:50         3296
[Information]         cryptography/hazmat/primitives/keywrap.py      2017-04-27 17:51:38         3050
[Information]         cryptography/hazmat/primitives/keywrap.pyc     2017-04-27 17:51:50         3136
[Information]         cryptography/hazmat/primitives/padding.py      2017-04-27 17:51:38         5736
[Information]         cryptography/hazmat/primitives/padding.pyc     2017-04-27 17:51:50        10471
[Information]         cryptography/hazmat/primitives/serialization.py 2017-04-27 17:51:38         5288
[Information]         cryptography/hazmat/primitives/serialization.pyc 2017-04-27 17:51:50         8668
[Information]         cryptography/hazmat/primitives/twofactor/      2017-04-27 17:51:50            0
[Information]         cryptography/hazmat/primitives/twofactor/__init__.py 2017-04-27 17:51:38          288
[Information]         cryptography/hazmat/primitives/twofactor/__init__.pyc 2017-04-27 17:51:50          607
[Information]         cryptography/hazmat/primitives/twofactor/hotp.py 2017-04-27 17:51:38         2589
[Information]         cryptography/hazmat/primitives/twofactor/hotp.pyc 2017-04-27 17:51:50         3808
[Information]         cryptography/hazmat/primitives/twofactor/totp.py 2017-04-27 17:51:38         1594
[Information]         cryptography/hazmat/primitives/twofactor/totp.pyc 2017-04-27 17:51:50         2637
[Information]         cryptography/hazmat/primitives/twofactor/utils.py 2017-04-27 17:51:38          954
[Information]         cryptography/hazmat/primitives/twofactor/utils.pyc 2017-04-27 17:51:50         1208
[Information]         cryptography/utils.py                          2017-04-27 17:51:38         4130
[Information]         cryptography/utils.pyc                         2017-04-27 17:51:50         6969
[Information]         cryptography/x509/                             2017-04-27 17:51:50            0
[Information]         cryptography/x509/__init__.py                  2017-04-27 17:51:38         6857
[Information]         cryptography/x509/__init__.pyc                 2017-04-27 17:51:50         6944
[Information]         cryptography/x509/base.py                      2017-04-27 17:51:38        23315
[Information]         cryptography/x509/base.pyc                     2017-04-27 17:51:50        31205
[Information]         cryptography/x509/extensions.py                2017-04-27 17:51:38        37228
[Information]         cryptography/x509/extensions.pyc               2017-04-27 17:51:50        59587
[Information]         cryptography/x509/general_name.py              2017-04-27 17:51:38         7519
[Information]         cryptography/x509/general_name.pyc
...
2017-04-27 11:28:02        21986
[Information]         dateutil/relativedelta.pyc                     2017-04-27 11:28:06        17516
[Information]         dateutil/rrule.py                              2017-04-27 11:28:02        61792
[Information]         dateutil/rrule.pyc                             2017-04-27 11:28:06        48786
[Information]         dateutil/tz/                                   2017-04-27 11:28:06            0
[Information]         dateutil/tz/__init__.py                        2017-04-27 11:28:02          145
[Information]         dateutil/tz/__init__.pyc                       2017-04-27 11:28:06          379
[Information]         dateutil/tz/_common.py                         2017-04-27 11:28:02        11744
[Information]         dateutil/tz/_common.pyc                        2017-04-27 11:28:06        13900
[Information]         dateutil/tz/tz.py                              2017-04-27 11:28:02        48924
[Information]         dateutil/tz/tz.pyc                             2017-04-27 11:28:06        44590
[Information]         dateutil/tz/win.py                             2017-04-27 11:28:02        11466
[Information]         dateutil/tz/win.pyc                            2017-04-27 11:28:06        12475
[Information]         dateutil/tzwin.py                              2017-04-27 11:28:02           58
[Information]         dateutil/tzwin.pyc                             2017-04-27 11:28:06          211
[Information]         dateutil/zoneinfo/                             2017-04-27 11:28:06            0
[Information]         dateutil/zoneinfo/__init__.py                  2017-04-27 11:28:02         6810
[Information]         dateutil/zoneinfo/__init__.pyc                 2017-04-27 11:28:06         7654
[Information]         dateutil/zoneinfo/dateutil-zoneinfo.tar.gz     2017-04-27 11:28:02       139671
[Information]         dateutil/zoneinfo/rebuild.py                   2017-04-27 11:28:02         1688
[Information]         dateutil/zoneinfo/rebuild.pyc                  2017-04-27 11:28:06         2239
[Information]         jwt/__init__.py                                2017-06-06 14:51:08          738
[Information]         jwt/__init__.pyc                               2017-06-06 14:51:08         1177
[Information]         jwt/__main__.py                                2017-06-06 14:51:08         3585
[Information]         jwt/__main__.pyc                               2017-06-06 14:51:08         3120
[Information]         jwt/algorithms.py                              2017-06-06 14:51:08        13758
[Information]         jwt/algorithms.pyc                             2017-06-06 14:51:08        14450
[Information]         jwt/api_jws.py                                 2017-06-06 14:51:08         7133
[Information]         jwt/api_jws.pyc                                2017-06-06 14:51:08         7462
[Information]         jwt/api_jwt.py                                 2017-06-06 14:51:08         6547
[Information]         jwt/api_jwt.pyc                                2017-06-06 14:51:08         6842
[Information]         jwt/compat.py                                  2017-06-06 14:51:08         1784
[Information]         jwt/compat.pyc                                 2017-06-06 14:51:08         2253
[Information]         jwt/contrib/                                   2017-06-06 14:51:08            0
[Information]         jwt/contrib/__init__.py                        2017-06-06 14:51:08            0
[Information]         jwt/contrib/__init__.pyc                       2017-06-06 14:51:08          163
[Information]         jwt/contrib/algorithms/                        2017-06-06 14:51:08            0
[Information]         jwt/contrib/algorithms/__init__.py             2017-06-06 14:51:08            0
[Information]         jwt/contrib/algorithms/__init__.pyc            2017-06-06 14:51:08          174
[Information]         jwt/contrib/algorithms/py_ecdsa.py             2017-06-06 14:51:08         1771
[Information]         jwt/contrib/algorithms/py_ecdsa.pyc            2017-06-06 14:51:08         2406
[Information]         jwt/contrib/algorithms/pycrypto.py             2017-06-06 14:51:08         1250
[Information]         jwt/contrib/algorithms/pycrypto.pyc            2017-06-06 14:51:08         2325
[Information]         jwt/exceptions.py                              2017-06-06 14:51:08          841
[Information]         jwt/exceptions.pyc                             2017-06-06 14:51:08         2777
[Information]         jwt/utils.py                                   2017-06-06 14:51:08         2629
[Information]         jwt/utils.pyc                                  2017-06-06 14:51:08         4204

so the ZIP bundle has been done in a specific way such that packages' dist-info folders are removed and only the folders having the exact name of the package is included

by which I was able to run import cvxpy, notice that new packages multiplocess and CVXCanon are included. Yet in solving a problem, I got error with ecos module missing next. So I created a new directory ecos for all files found in the original ecos.*.wheel package so the updated ZIP Bundle looks like this

by which I was able to solve the following convex optimisation problem with DCP tool called CVXPY.

Code inside Python Script module that solves an optimisation problem with CVXPY in Azure ML

import pandas as pd
from cvxpy import *
import numpy

def azureml_main(dataframe1 = None, dataframe2 = None):

    # Problem data.
    m = 30
    n = 20
    numpy.random.seed(1)
    A = numpy.random.randn(m, n)
    b = numpy.random.randn(m)

    # Construct the problem.
    x = Variable(n)
    objective = Minimize(sum_squares(A*x - b))
    constraints = [0 <= x, x <= 1]
    prob = Problem(objective, constraints)

    # The optimal objective is returned by prob.solve().
    result = prob.solve()
    # The optimal value for x is stored in x.value.
    #print x.value
    # The optimal Lagrange multiplier for a constraint
    # is stored in constraint.dual_value.
    #print constraints[0].dual_value

    dataframe1=pd.DataFrame(numpy.zeros(1))
    dataframe1[0][0]=result

    # Return value must be of a sequence of pandas.DataFrame
    return dataframe1,

Further reading

Notice that the code creates a Panda DataFrame with size one zero matrix, there may be more elegant way to do it, more in
Python Pandas DataFrame with only a single number stored?


来源: stackexchange

问:
In scala, can a variable changed in a for-loop be used outside the loop?
I'm updating a variable within a for-loop in scala that I need outside the loop. I tested the code below and got the message "ERROR: undefined". The variable is not empty, inside the loop the values are returned. Thank you.  </p>

```<code>val example=List(0,0,1,0.7,10,2,5,7,4,1,-9,0,0,0,0,3,3,0,0,0,-80,-6.6,-1,0)
var b=scala.collection.mutable.MutableList.empty[Double]
var b_val:Double=0

for (i<-1 to 24) {
    if ( example (i) != 0 ){b_val = b_val + example(i)} else {b_val = 0}
    b += b_val;
}
println(b);
</code>```

答:
I think, you are looking for something like this:

```<code> val b = example.scanLeft(0.0) {
    case (_, 0) => 0
    case (l, r) => l + r
 }
</code>```

If you are going to be writing scala code anyway, learn to do it in scala way. There is no point otherwise.

ContentLicense: CC BY-SA 3.0

Body:
I'm updating a variable within a for-loop in scala that I need outside the loop. I tested the code below and got the message "ERROR: undefined". The variable is not empty, inside the loop the values are returned. Thank you.

val example=List(0,0,1,0.7,10,2,5,7,4,1,-9,0,0,0,0,3,3,0,0,0,-80,-6.6,-1,0)
var b=scala.collection.mutable.MutableList.empty[Double]
var b_val:Double=0

for (i<-1 to 24) {
    if ( example (i) != 0 ){b_val = b_val + example(i)} else {b_val = 0}
    b += b_val;
}
println(b);

Body:
I think, you are looking for something like this:

 val b = example.scanLeft(0.0) {
    case (_, 0) => 0
    case (l, r) => l + r
 }

If you are going to be writing scala code anyway, learn to do it in scala way. There is no point otherwise.


问:
Regex match cookie value and remove hyphens
I'm trying to extract out a group of words from a larger string/cookie that are separated by hyphens.  I would like to replace the hyphens with a space and set to a variable.  Javascript or jQuery.

As an example, the larger string has a name and value like this within it:

```<code>facility=34222%7CConner-Department-Store;
</code>```

(notice the leading "C")

So first, I need to match()/find facility=34222%7CConner-Department-Store; with regex.  Then break it down to "Conner Department Store"

var cookie = document.cookie;
var facilityValue = cookie.match( REGEX );  ??

答:
Ok,
first, you should decode this string as follows:

```<code>var str = "facility=34222%7CConner-Department-Store;"
var decoded = decodeURIComponent(str);
// decoded = "facility=34222|Conner-Department-Store;"
</code>```

Then you have multiple possibilities to split up this string.
The easiest way is to use substring()

var solution1 = decoded.substring(decoded.indexOf('|') + 1, decoded.length)
// solution1 = "Conner-Department-Store;"
solution1 = solution1.replace('-', ' ');
// solution1 = "Conner Department Store;"

As you can see, substring(arg1, arg2) returns the string, starting at index arg1 and ending at index arg2. See Full Documentation here

If you want to cut the last ; just set decoded.length - 1 as arg2 in the snippet above.

```<code>decoded.substring(decoded.indexOf('|') + 1, decoded.length - 1)
//returns "Conner-Department-Store"
</code>```

or all above in just one line:

decoded.substring(decoded.indexOf('|') + 1, decoded.length - 1).replace('-', ' ')

If you want still to use a regular Expression to retrieve (perhaps more) data out of the string, you could use something similar to this snippet:

```<code>var solution2 = "";
var regEx= /([A-Za-z]*)=([0-9]*)\|(\S[^:\/?#\[\]\@\;\,']*)/;
if (regEx.test(decoded)) {
solution2 = decoded.match(regEx);
    /* returns
    [0:"facility=34222|Conner-Department-Store",
    1:"facility",
    2:"34222",
    3:"Conner-Department-Store",
    index:0,
    input:"facility=34222|Conner-Department-Store;"
    length:4] */
solution2 = solution2[3].replace('-', ' ');
// "Conner Department Store"
}
</code>```

I have applied some rules for the regex to work, feel free to modify them according your needs.
facility can be any Word built with alphabetical characters lower and uppercase (no other chars) at any length
= needs to be the char =
34222 can be any number but no other characters
| needs to be the char |
Conner-Department-Store can be any characters except one of the following (reserved delimiters): :/?#[]@;,'

Hope this helps :)

edit:  to find only the part
  facility=34222%7CConner-Department-Store; just modify the regex to
  match facility= instead of ([A-z]*)=:
  /(facility)=([0-9]*)\|(\S[^:\/?#\[\]\@\;\,']*)/

Body:
I'm trying to extract out a group of words from a larger string/cookie that are separated by hyphens.  I would like to replace the hyphens with a space and set to a variable.  Javascript or jQuery.

As an example, the larger string has a name and value like this within it:

facility=34222%7CConner-Department-Store;

(notice the leading "C")

So first, I need to match()/find facility=34222%7CConner-Department-Store; with regex.  Then break it down to "Conner Department Store"

var cookie = document.cookie;
var facilityValue = cookie.match( REGEX );  ??

Body:
Ok,
first, you should decode this string as follows:

var str = "facility=34222%7CConner-Department-Store;"
var decoded = decodeURIComponent(str);
// decoded = "facility=34222|Conner-Department-Store;"

Then you have multiple possibilities to split up this string.
The easiest way is to use substring()

var solution1 = decoded.substring(decoded.indexOf('|') + 1, decoded.length)
// solution1 = "Conner-Department-Store;"
solution1 = solution1.replace('-', ' ');
// solution1 = "Conner Department Store;"

As you can see, substring(arg1, arg2) returns the string, starting at index arg1 and ending at index arg2. See Full Documentation here

If you want to cut the last ; just set decoded.length - 1 as arg2 in the snippet above.

decoded.substring(decoded.indexOf('|') + 1, decoded.length - 1)
//returns "Conner-Department-Store"

or all above in just one line:

decoded.substring(decoded.indexOf('|') + 1, decoded.length - 1).replace('-', ' ')

If you want still to use a regular Expression to retrieve (perhaps more) data out of the string, you could use something similar to this snippet:

var solution2 = "";
var regEx= /([A-Za-z]*)=([0-9]*)\|(\S[^:\/?#\[\]\@\;\,']*)/;
if (regEx.test(decoded)) {
solution2 = decoded.match(regEx);
    /* returns
    [0:"facility=34222|Conner-Department-Store",
    1:"facility",
    2:"34222",
    3:"Conner-Department-Store",
    index:0,
    input:"facility=34222|Conner-Department-Store;"
    length:4] */
solution2 = solution2[3].replace('-', ' ');
// "Conner Department Store"
}

I have applied some rules for the regex to work, feel free to modify them according your needs.
facility can be any Word built with alphabetical characters lower and uppercase (no other chars) at any length
= needs to be the char =
34222 can be any number but no other characters
| needs to be the char |
Conner-Department-Store can be any characters except one of the following (reserved delimiters): :/?#[]@;,'

Hope this helps :)

edit:  to find only the part
  facility=34222%7CConner-Department-Store; just modify the regex to
  match facility= instead of ([A-z]*)=:
  /(facility)=([0-9]*)\|(\S[^:\/?#\[\]\@\;\,']*)/


问:
Incorrect Integer (2147483647) is inserted into MySQL?
Alright, so I've been toying around with the Steam Web API, I have one of the values stored in a variable called $steam64. When I use this code snipper to INSERT it into a mysql database it insert a completley different integer than what is stored in the variable.

$sql_query = "INSERT INTO users_info (steam64) VALUES ('$steam64')";

var_dump($steam64); returns the real int, so does echoing it. Not too sure what is going on here, any help is appreciated.

答:
Agree with the datatype change to BIGINT from INTEGER. Currently building a web app with node.js/sequelize the below refactor solved the phone number post from react-redux form manipulated to '2147483647': </p>

```<code>clientPhone: {
    type: DataTypes.BIGINT,
    allowNull: true
},
</code>```

Body:
Agree with the datatype change to BIGINT from INTEGER. Currently building a web app with node.js/sequelize the below refactor solved the phone number post from react-redux form manipulated to '2147483647':

clientPhone: {
    type: DataTypes.BIGINT,
    allowNull: true
},


问:
How can I output a UTF-8 CSV in PHP that Excel will read properly?
I've got this very simple thing that just outputs some stuff in CSV format, but it's got to be UTF-8. I open this file in TextEdit or TextMate or Dreamweaver and it displays UTF-8 characters properly, but if I open it in Excel it's doing this silly íÄ kind of thing instead. Here's what I've got at the head of my document:

```<code>header("content-type:application/csv;charset=UTF-8");
header("Content-Disposition:attachment;filename=\"CHS.csv\"");
</code>```

This all seems to have the desired effect except Excel (Mac, 2008) doesn't want to import it properly. There's no options in Excel for me to "open as UTF-8" or anything, so … I'm getting a little annoyed.

I can't seem to find any clear solutions to this anywhere, despite a lot of people having the same problem. The thing I see the most is to include the BOM, but I can't exactly figure out how to do that. As you can see above I'm just echoing this data, I'm not writing any file. I can do that if I need to, I'm just not because there doesn't seem like a need for it at this point. Any help?

Update: I tried echoing the BOM as echo pack("CCC", 0xef, 0xbb, 0xbf); which I just pulled from a site that was trying to detect the BOM. But Excel just appends those three characters to the very first cell when it imports, and still messes up the special characters.

答:
I have the same (or similar) problem.

In my case, if I add a BOM to the output, it works:

```<code>header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header('Content-Disposition: attachment; filename=Customers_Export.csv');
echo "\xEF\xBB\xBF"; // UTF-8 BOM
</code>```

I believe this is a pretty ugly hack, but it worked for me, at least for Excel 2007 Windows. Not sure it'll work on Mac.

ContentLicense: CC BY-SA 2.5

Body:
I've got this very simple thing that just outputs some stuff in CSV format, but it's got to be UTF-8. I open this file in TextEdit or TextMate or Dreamweaver and it displays UTF-8 characters properly, but if I open it in Excel it's doing this silly íÄ kind of thing instead. Here's what I've got at the head of my document:

header("content-type:application/csv;charset=UTF-8");
header("Content-Disposition:attachment;filename=\"CHS.csv\"");

This all seems to have the desired effect except Excel (Mac, 2008) doesn't want to import it properly. There's no options in Excel for me to "open as UTF-8" or anything, so … I'm getting a little annoyed.

I can't seem to find any clear solutions to this anywhere, despite a lot of people having the same problem. The thing I see the most is to include the BOM, but I can't exactly figure out how to do that. As you can see above I'm just echoing this data, I'm not writing any file. I can do that if I need to, I'm just not because there doesn't seem like a need for it at this point. Any help?

Update: I tried echoing the BOM as echo pack("CCC", 0xef, 0xbb, 0xbf); which I just pulled from a site that was trying to detect the BOM. But Excel just appends those three characters to the very first cell when it imports, and still messes up the special characters.

Body:
I have the same (or similar) problem.

In my case, if I add a BOM to the output, it works:

header('Content-Encoding: UTF-8');
header('Content-type: text/csv; charset=UTF-8');
header('Content-Disposition: attachment; filename=Customers_Export.csv');
echo "\xEF\xBB\xBF"; // UTF-8 BOM

I believe this is a pretty ugly hack, but it worked for me, at least for Excel 2007 Windows. Not sure it'll work on Mac.


问:
Using Database from SQL Server in Visual Studio
I am doing a C# project in Visual Studio. For the purposes of the project, I need to include a database from SQL Server.

Here is what I have written in SQL Server:

```<code>create table user1 (
    id int primary key identity,
    username varchar(50),
    password varchar(50));
</code>```

Then, in the Visual Studio, I want to make a form that will insert values in the database (reading from the database works good!). Here is my code:

```<code>string sql = "INSERT INTO user1(username, password) VALUES ('"+textBox1.Text + "'+" + textBox2.Text+")";
</code>```

But I get an error message:

System.Data.SqlClient.SqlException: There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

What am I doing wrong?

答:
do it like this:</p>

```<code>string sql = "INSERT INTO user1(username, password) VALUES ('"+textBox1.Text + "','" + textBox2.Text+"')";
</code>```

Body:
I am doing a C# project in Visual Studio. For the purposes of the project, I need to include a database from SQL Server.

Here is what I have written in SQL Server:

create table user1 (
    id int primary key identity,
    username varchar(50),
    password varchar(50));

Then, in the Visual Studio, I want to make a form that will insert values in the database (reading from the database works good!). Here is my code:

string sql = "INSERT INTO user1(username, password) VALUES ('"+textBox1.Text + "'+" + textBox2.Text+")";

But I get an error message:

System.Data.SqlClient.SqlException: There are more columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.

What am I doing wrong?

Body:
do it like this:

string sql = "INSERT INTO user1(username, password) VALUES ('"+textBox1.Text + "','" + textBox2.Text+"')";


问:
Cannot find Application Insights dependency in docker image after dotnet publish
I'm receiving the following error when trying to run my application from a docker image:

```<code>Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '1.0.2', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
</code>```

The docker image is based on microsoft/aspnetcore.

The files where built using dotnet restore and dotnet publish on the docker image microsoft/aspnetcore-build:1.1.0-projectjson

Under "targets" in {app}.deps.json I have:

```<code>  "Microsoft.ApplicationInsights.AspNetCore/1.0.2": {
    "dependencies": {
      "Microsoft.ApplicationInsights": "2.1.0",
      "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
      "Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
      "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.1",
      "Microsoft.Extensions.Configuration": "1.0.0",
      "Microsoft.Extensions.DiagnosticAdapter": "1.0.0",
      "Microsoft.Extensions.Logging.Abstractions": "1.0.0",
      "System.Net.NameResolution": "4.3.0"
    },
    "runtime": {
      "lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
    },
    "compile": {
      "lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
    }
  },
</code>```

I do not have a lib folder in my published output but I do have Microsoft.ApplicationInsights.AspNetCore at the root of my published output.

I feel like i'm missing something obvious. Any help would be appreciated.

Update:

Updating Application Insights to 2.0.0 has no effect.

Removing Application Insights simply moves the problem to another assembly.

Switching to a standalone deployment has no effect.

Added COREHOST_TRACE=1 and received the following output:

```<code>Processing TPA for deps entry [Microsoft.ApplicationInsights.AspNetCore, 2.0.0, lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll]
  Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache/x64]
The hash file is invalid [/packagescache/x64/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
    Skipping... match hash failed
  Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache]
The hash file is invalid [/packagescache/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
    Skipping... match hash failed
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.0.0', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'
</code>```

答:
I solved this issue by executing the application found in the publish folder.  For instance, if you are publishing a .net core 1.1 app in release mode for Ubuntu 16.04, your published files will be in

\bin\release\netcoreapp1.1\ubuntu.16.04-x64

This directory has an executable in it, but that is not the executable you want to use.  You actually need to go one directory deeper and use the executable in

\bin\release\netcoreapp1.1\ubuntu.16.04-x64\publish

Body:
I'm receiving the following error when trying to run my application from a docker image:

Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '1.0.2', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'

The docker image is based on microsoft/aspnetcore.

The files where built using dotnet restore and dotnet publish on the docker image microsoft/aspnetcore-build:1.1.0-projectjson

Under "targets" in {app}.deps.json I have:

  "Microsoft.ApplicationInsights.AspNetCore/1.0.2": {
    "dependencies": {
      "Microsoft.ApplicationInsights": "2.1.0",
      "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
      "Microsoft.AspNetCore.Http.Abstractions": "1.0.0",
      "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.1",
      "Microsoft.Extensions.Configuration": "1.0.0",
      "Microsoft.Extensions.DiagnosticAdapter": "1.0.0",
      "Microsoft.Extensions.Logging.Abstractions": "1.0.0",
      "System.Net.NameResolution": "4.3.0"
    },
    "runtime": {
      "lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
    },
    "compile": {
      "lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll": {}
    }
  },

I do not have a lib folder in my published output but I do have Microsoft.ApplicationInsights.AspNetCore at the root of my published output.

I feel like i'm missing something obvious. Any help would be appreciated.

Update:

Updating Application Insights to 2.0.0 has no effect.

Removing Application Insights simply moves the problem to another assembly.

Switching to a standalone deployment has no effect.

Added COREHOST_TRACE=1 and received the following output:

Processing TPA for deps entry [Microsoft.ApplicationInsights.AspNetCore, 2.0.0, lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll]
  Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache/x64]
The hash file is invalid [/packagescache/x64/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
    Skipping... match hash failed
  Considering entry [Microsoft.ApplicationInsights.AspNetCore/2.0.0/lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll] and probe dir [/packagescache]
The hash file is invalid [/packagescache/Microsoft.ApplicationInsights.AspNetCore/2.0.0/Microsoft.ApplicationInsights.AspNetCore.2.0.0.nupkg.sha512]
    Skipping... match hash failed
Error: assembly specified in the dependencies manifest was not found -- package: 'Microsoft.ApplicationInsights.AspNetCore', version: '2.0.0', path: 'lib/netstandard1.6/Microsoft.ApplicationInsights.AspNetCore.dll'


问:
Visual Studio's "auto-resolve" feature doesn't work for extension methods - what now?
I love the "Resolve" feature in visual studio.

Typical scenario:

Type in Debug

Type .

Notice that no intellisense appears

Right-click

Select Resolve

Choose using System.Diagnostics or System.Diagnostics.Debug

Beautiful. Use it all the time.

Extension method scenario:

Type in var maxNumber = new int[] {1, 2, 3, 4}

Type .

Notice that intellisense brings up array methods but no LINQ extension methods

Manually type Max()

Right-click Max()

No Resolve to be found

Right click on int[]

Still no Resolve to be found

Begrudgingly scroll to the top of the page and enter using System.Linq;*

*assuming you know it by heart, otherwise wrack your brains or try to look it up

Implementation idea:

If this feature were to be invented, one idea would be for the first intellisense item that appears when I type . to read, <extension methods...>, and if I click that item, it brings up a Resolve list of all namespaces that contain extension methods for the class in question.

Couple questions:

Is this feature slated for future editions of Visual Studio?

Any workarounds/tips for finding the extension methods (and the corresponding namespace) that might be available for a particular class?

答:
I really HATE having to "just know" what namespace to use to support any given class.  I mean, there are THOUSANDS OF THEM.  Who knows what namespace you need?  There's no naming convention that can be used as a clue.

It's a shame because I also use Netbeans IDE for Java, and "resolve imports" works flawlessly for everything.


问:
node not running , websocket error
I'm getting an error when I try to run my node.I have installed ws and websocket, but seems that none is working

答: Most likely what is happening is that you are executing your script with an older version of node (more specifically V8) that had restrictions on how/where some ES6 features could be used. Upgrading node (at least to v4.0.0) should fix the problem.

Title: node not running , websocket error


问:
Python’s `str.format()`, fill characters, and ANSI colors
In Python 2, I’m using str.format() to align a bunch of columns of text I’m printing to a terminal.  Basically, it’s a table, but I’m not printing any borders or anything—it’s simply rows of text, aligned into columns.

With no color-fiddling, everything prints as expected.

If I wrap an entire row (i.e., one print statement) with ANSI color codes, everything prints as expected.

However: If I try to make each column a different color within a row, the alignment is thrown off.  Technically, the alignment is preserved; it’s the fill characters (spaces) that aren’t printing as desired; in fact, the fill characters seem to be completely removed.

I’ve verified the same issue with both colorama and xtermcolor.  The results were the same.  Therefore, I’m certain the issue has to do with str.format() not playing well with ANSI escape sequences in the middle of a string.

But I don’t know what to do about it! :(  I would really like to know if there’s any kind of workaround for this problem.

Color and alignment are powerful tools for improving readability, and readability is an important part of software usability.  It would mean a lot to me if this could be accomplished without manually aligning each column of text.

Little help? ☺

答:
This is a very late answer, left as bread crumbs for anyone who finds this page while struggling to format text with built-in ANSI color codes.

byoungb's comment about making padding decisions on the length of pre-colorized text is exactly right. But if you already have colored text, here's a work-around:

See my ansiwrap module on PyPI. Its primary purpose is providing textwrap for ANSI-colored text, but it also exports ansilen() which tells you "how long would this string be if it didn't contain ANSI control codes?" It's quite useful in making formatting, column-width, and wrapping decisions on pre-colored text. Add width - ansilen(s) spaces to the end or beginning of s to left (or respectively, right) justify s in a column of your desired width. E.g.:

```<code>def ansi_ljust(s, width):
    needed = width - ansilen(s)
    if needed > 0:
        return s + ' ' * needed
    else:
        return s
</code>```

Also, if you need to split, truncate, or combine colored text at some point, you will find that ANSI's stateful nature makes that a chore. You may find ansi_terminate_lines() helpful; it "patch up" a list of sub-strings so that each has independent, self-standing ANSI codes with equivalent effect as the original string.

The latest versions of ansicolors also contain an equivalent implementation of ansilen().

Body:
This is a very late answer, left as bread crumbs for anyone who finds this page while struggling to format text with built-in ANSI color codes.

byoungb's comment about making padding decisions on the length of pre-colorized text is exactly right. But if you already have colored text, here's a work-around:

See my ansiwrap module on PyPI. Its primary purpose is providing textwrap for ANSI-colored text, but it also exports ansilen() which tells you "how long would this string be if it didn't contain ANSI control codes?" It's quite useful in making formatting, column-width, and wrapping decisions on pre-colored text. Add width - ansilen(s) spaces to the end or beginning of s to left (or respectively, right) justify s in a column of your desired width. E.g.:

def ansi_ljust(s, width):
    needed = width - ansilen(s)
    if needed > 0:
        return s + ' ' * needed
    else:
        return s

Also, if you need to split, truncate, or combine colored text at some point, you will find that ANSI's stateful nature makes that a chore. You may find ansi_terminate_lines() helpful; it "patch up" a list of sub-strings so that each has independent, self-standing ANSI codes with equivalent effect as the original string.

The latest versions of ansicolors also contain an equivalent implementation of ansilen().


问:
Charles Proxy + Android HTTPS
So here are some similar but outdated answers that might have helped me few years/months ago:

Why can't I see http or https traffic from Chrome Browser for Android on Charles Proxy?

How to get charles proxy work with Android 7 nougat?

I followed all of the instructions, I can read http requests fine, but not https requests. Still can't figure what I am doing wrong. There isn't much of my own to post since I have just followed the above guides.

I think the main issue is how do I force the app I am trying to debug to use my certificate? The manifest modifications don't seem to do the trick.

答:
See this question which has updated answers for Charles 4 and Android 7.

You must install the cert from Charles help menu, and you must use Settings -> Security -> Install from storage on device.

Your app needs a network_security_config.xml

You must use a debuggable app

Title: Charles Proxy + Android HTTPS


问:
trying to do a linq query return on a sub query
I am not even sure how to word the question, if anybody wants to suggest after reading I will update.

The problem from a business perspective is I need to know if any of the stops (deliverys) have had a file generated for them in the past.  When this file is generated a journal entry is created with a record type of 40 and a date along with a matching ID number.

I have a linq query in C# (6) Linq to entities.
I need a field in the return that either counts or just returns true if another query find anything.

Here is part of the query:

```<code>var stopDetails = (from d in dbContext.stop_details
                           join c in dbContext.customers on d.customer_id equals c.id
                           join name in dbContext.driver_details on d.assigned_driver_id equals name.ddp_driver_id
                           join journal in dbContext.stop_journals on d.id equals journal.stop_details_id
                           where (d.verified_ship_date >= startDate && d.verified_ship_date <= endDate)
                           select new
                           {
                               d.ship_date,
                               stopID = d.id,
                               d.verified_ship_date,
                               d.assigned_driver_id,
                               driverName = name.first_name + " " + name.last_name,
                               fullDriverInfo = d.assigned_driver_id + " - "+ name.first_name + " " + name.last_name,
                               d.cust_ref_1_BOL,
                               d.cust_ref_2_OrderNum,
                               d.cust_ref_3_stopID,
                               d.con_name,
                               d.con_address1,
                               d.con_address2
</code>```

What I need to know is if there are any records in the stop_journal for each of the stops that contain a record_type of 45 and a dateTimeRef == the verified_ship_date.

If I cant figure it out in the front end like this I will probably just step through the datagrid (where the results are posted) and update each row that way.

so pseudo code would be something like:
for each row if there is a journal entry with the stop_details_id matching stopID And a dateTimeRef == verified_ship_date And a record_type of 40 then set the FoundFlag = true

Joe

答:
You use .Any() to do if exists, and then just put in your query inside your select:

```<code>FoundFlag = (from j2 in dbContext.stop_journals where j2.stop_details_id == d.id &&
             j2.dateTimeRef == d.verified_ship_date && j2.record_type == 40 select j2).Any()
</code>```

Body:
I am not even sure how to word the question, if anybody wants to suggest after reading I will update.

The problem from a business perspective is I need to know if any of the stops (deliverys) have had a file generated for them in the past.  When this file is generated a journal entry is created with a record type of 40 and a date along with a matching ID number.

I have a linq query in C# (6) Linq to entities.
I need a field in the return that either counts or just returns true if another query find anything.

Here is part of the query:

var stopDetails = (from d in dbContext.stop_details
                           join c in dbContext.customers on d.customer_id equals c.id
                           join name in dbContext.driver_details on d.assigned_driver_id equals name.ddp_driver_id
                           join journal in dbContext.stop_journals on d.id equals journal.stop_details_id
                           where (d.verified_ship_date >= startDate && d.verified_ship_date <= endDate)
                           select new
                           {
                               d.ship_date,
                               stopID = d.id,
                               d.verified_ship_date,
                               d.assigned_driver_id,
                               driverName = name.first_name + " " + name.last_name,
                               fullDriverInfo = d.assigned_driver_id + " - "+ name.first_name + " " + name.last_name,
                               d.cust_ref_1_BOL,
                               d.cust_ref_2_OrderNum,
                               d.cust_ref_3_stopID,
                               d.con_name,
                               d.con_address1,
                               d.con_address2

What I need to know is if there are any records in the stop_journal for each of the stops that contain a record_type of 45 and a dateTimeRef == the verified_ship_date.

If I cant figure it out in the front end like this I will probably just step through the datagrid (where the results are posted) and update each row that way.

so pseudo code would be something like:
for each row if there is a journal entry with the stop_details_id matching stopID And a dateTimeRef == verified_ship_date And a record_type of 40 then set the FoundFlag = true

Joe

Body:
You use .Any() to do if exists, and then just put in your query inside your select:

FoundFlag = (from j2 in dbContext.stop_journals where j2.stop_details_id == d.id &&
             j2.dateTimeRef == d.verified_ship_date && j2.record_type == 40 select j2).Any()