小编Shu*_*rma的帖子

FutureWarning:不推荐将issubdtype的第二个参数从`float`转换为`np.floating`

更新我之后Numpy,Tensorflow我收到了这些警告.我已经尝试了这些,但没有任何作用,每个建议都将受到赞赏.

FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2018-01-19 17:11:38.695932: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
Run Code Online (Sandbox Code Playgroud)

python numpy tensorflow

46
推荐指数
3
解决办法
5万
查看次数

如何在Python中找到矩阵的维度?

如何在Python中找到矩阵的维度.Len(A)只返回一个变量.

编辑:

close = dataobj.get_data(timestamps, symbols, closefield)
Run Code Online (Sandbox Code Playgroud)

是(我假设)生成一个整数矩阵(不太可能是字符串).我需要找到该矩阵的大小,因此我可以运行一些测试而无需迭代所有元素.就数据类型而言,我假设它是一个数组(或列表列表).

python matrix

27
推荐指数
5
解决办法
18万
查看次数

锁定Auth0 for android在验证时不返回UserProfile

我正在使用Lock在我的Android App中为用户提供登录功能.

这是我的代码:私人锁定锁;

private LocalBroadcastManager broadcastManager;

private BroadcastReceiver authenticationReceiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {
        String idToken = intent.getStringExtra("com.auth0.android.lock.extra.IdToken");
        String tokenType = intent.getStringExtra("com.auth0.android.lock.extra.TokenType");
        Log.i(TAG, "User  logged in with " + idToken + " "+ tokenType);
    }
};

//Not sure use of this callback  though its not being called anytime.
private LockCallback callback = new AuthenticationCallback() {
    @Override
    public void onAuthentication(Credentials credentials) {
        Log.d(TAG, "Authenticated");
    }

    @Override
    public void onCanceled() {
        Log.d(TAG, "Authentication cancelled");
    } …
Run Code Online (Sandbox Code Playgroud)

android locking broadcastreceiver auth0

10
推荐指数
1
解决办法
343
查看次数

如何在Android Studio中将CSV文件解析为数组

我想知道如何解析CSV文件,只是将内容存储到数组中.我的csv文件看起来像这样:

1,bulbasaur,1,7,69,64,1,1
2,ivysaur,2,10,130,142,2,1
Run Code Online (Sandbox Code Playgroud)

我只想要名字,所以第二个字段.我想将csv中的所有这些项存储到数组或字符串的arraylist中.

任何想法如何做到这一点?

任何帮助将不胜感激!

java csv arrays parsing android

8
推荐指数
2
解决办法
1万
查看次数

ValueError:int() 的无效文字,基数为 10:'196.41'

我不明白为什么它适用于不同的场景,但不适用于这个场景。基本上,一些绅士在这里帮助我改进了我的代码以刮取天气,这非常有效。然后我尝试做同样的事情来刮取 span 标签中的 ETH 值<span class="text-large2" data-currency-value="">$196.01</span>。所以,我在代码中采用了相同的技术,替换了字段,并希望它能够工作。

代码在这里:

import requests
from BeautifulSoup import BeautifulSoup
import time

url = 'https://coinmarketcap.com/currencies/litecoin/'

def ltc():
    while (True):
        response = requests.get(url)
        soup = BeautifulSoup(response.content)
        price_now = int(soup.find("div", {"class": "col-xs-6 col-sm-8 col-md-4 text-left"}).find(
        "span", {"class": "text-large2"}).getText())
        print(u"LTC price is: {}{}".format(price_now))
        # if less than 150
        if 150 > price_now:
            print('Price is Low')
        # if more than 200
        elif 200 < price_now:
            print('Price is high')

if __name__ == "__main__":
    ltc()
Run Code Online (Sandbox Code Playgroud)

输出如下所示:

Traceback (most …
Run Code Online (Sandbox Code Playgroud)

python beautifulsoup web-scraping data-science valueerror

6
推荐指数
1
解决办法
4万
查看次数

将用户帐户注入mySQL

在这里解决一个奇怪的场景.

我们使用专有的工作站管理应用程序,它使用mySQL来存储其数据.在应用程序中,它们提供了大量报告,例如哪些用户在哪个时间登录到哪台计算机,所有安装在受监控计算机上的软件产品,依此类推.我们希望执行一组不同的报告,但是,它们不支持自定义报告.

由于他们的数据存储在mySQL中,我收集我可以手动执行报告.我没有有效的凭据来连接到mySQL服务器.无论如何我在mySQL服务器上创建用户帐户?我不想重置根密码或可能存在的任何帐户,因为它可能会破坏应用程序.


我可以完全访问Windows 2003服务器.我可以停止并重启服务,包括mySQL服务器.对于实际的mySQL服务器,我只能通过软件提供的GUI进行基本访问.我无法通过CLI或其他工具直接连接到它(由于缺少凭据).


如果它好像我试图未经授权访问mySQL服务器,我道歉.我已经联系了这家软件公司,截至今天已经有两周时间没有得到他们的回复.我需要了解数据.我可以完全访问物理盒,我有管理员权限.

mysql account

5
推荐指数
1
解决办法
857
查看次数

在执行 pip install mod_wsgi 时失败

我正在尝试将我的 django 站点放在 apache 上,并且我正在遵循这些教程,在此处输入链接描述 通过这些命令执行这些操作

set "MOD_WSGI_APACHE_ROOTDIR=C:\xampp\apache
pip install mod_wsgi
Run Code Online (Sandbox Code Playgroud)

我收到这些错误。

wsgi_apache.obj : error LNK2001: unresolved external symbol __imp_apr_conv_utf8_to_ucs2
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_shared_make
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_shared_copy
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_free
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_alloc
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_shared_destroy
wsgi_buckets.obj : error LNK2001: unresolved external symbol __imp_apr_bucket_shared_split
wsgi_interp.obj : error LNK2001: unresolved external symbol __imp_ap_show_mpm
wsgi_interp.obj : error …
Run Code Online (Sandbox Code Playgroud)

python django mod-wsgi pip visual-c++

5
推荐指数
1
解决办法
2848
查看次数

g++ 不可用,如果使用 conda:`conda install m2w64-toolchain`

在学习这些神经网络教程期间,在运行 test.py 文件时,我收到了这些异常和警告。我已经尝试过以前的建议,但没有任何效果。

WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
C:\ProgramData\Anaconda3\lib\site-packages\theano\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
  warnings.warn("DeprecationWarning: there is no c++ compiler."
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx …
Run Code Online (Sandbox Code Playgroud)

python g++ theano conda tensorflow

4
推荐指数
1
解决办法
2万
查看次数

ValueError:在预处理数据时,输入包含NaN,无穷大或对于dtype('float64')而言太大的值

我有两个CSV文件(训练集测试集).由于有可见NaN的一些列(值status,hedge_value,indicator_code,portfolio_id,desk_id,office_id).

我通过将NaN值替换为与列对应的一些巨大值来启动该过程.然后我正在LabelEncoding删除文本数据并将其转换为数字数据.现在,当我尝试对OneHotEncoding分类数据进行处理时,我得到了错误.我尝试将输入逐个输入到OneHotEncoding构造函数中,但是每个列都会出现相同的错误.

基本上,我的最终目标是预测返回值,但由于这个原因,我被困在数据预处理部分.我该如何解决这个问题?

我使用Python3.6PandasSklearn进行数据处理.

import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

test_data = pd.read_csv('test.csv')
train_data = pd.read_csv('train.csv')

# Replacing Nan values here
train_data['status']=train_data['status'].fillna(2.0)
train_data['hedge_value']=train_data['hedge_value'].fillna(2.0)
train_data['indicator_code']=train_data['indicator_code'].fillna(2.0)
train_data['portfolio_id']=train_data['portfolio_id'].fillna('PF99999999')
train_data['desk_id']=train_data['desk_id'].fillna('DSK99999999')
train_data['office_id']=train_data['office_id'].fillna('OFF99999999')

x_train = train_data.iloc[:, :-1].values
y_train = train_data.iloc[:, 17].values

# =============================================================================
# from sklearn.preprocessing import …
Run Code Online (Sandbox Code Playgroud)

python machine-learning pandas scikit-learn data-science

2
推荐指数
1
解决办法
1万
查看次数