fann

RSA加密

心已入冬 提交于 2020-11-08 07:53:22
今天头疼了一下午心情非常不美好,所以什么都不想干,找点好玩的RSA加密嘻嘻嘻。。。就找到了一个视频 HASH算法: 特点:对于相同的数据加密结果是一样的,不同的数据加密的长度是一样的,没有办法进行逆运算。 也被称为数据指纹。 通过散列碰撞解密, 企业级的开发中:用户密码服务器保存的是密码的HASH值。这个老师讲的不太好,用户密码加严, 可以对每一个用户加一个随机key然后再加密,有一个随机hash算法是hmac,对每一个密码都有一个key进行加密 用户注册账号密码客户端会把密码转换成hash值然后上传服务器,服务器保存,在传递的过程中账号和hash值, 黑客可以抓包拦截数据包,呃,30分钟的视频20分钟没有说到说好的RSA加密算法,行吧,还是自己看吧 费马小定理:假设a是一个整数,p是一个素数,a的p次方减去a一定是p的倍数,验证方式杨辉三角。 RSA算法是一个关于素数的应用, 欧拉φ函数又称为欧拉总计函数,φ(n)其中n是正整数,φ(n)表示在小于或者等于n的正整数当中,与n互素的数的个数。 互素也叫互质,如果两个整数的最大公约数是1则称为它们互素。如果n是一个素数,那么φ(n)=n-1,是这个函数的一个基本性质。 用python 实现一下吧 class RSA: """ RSA加密算法 """ def __init__(self): self.__create_key()

苹果收购热门天气App:用AI精准预测天气,还能制作风暴动画

自古美人都是妖i 提交于 2020-04-24 12:44:46
近期,CNN等多家媒体报道了苹果公司对天气应用Dark Sky的收购,称苹果计划在7月前把该款App从安卓平台下架。这是苹果首次收购第三方天气应用。 粗略统计,仅与iOS13系统兼容的天气App就有100多个,苹果自家也有天气应用。在这种前提下,Dark Sky凭借什么优势得到科技巨头苹果的青睐?被纳入到iOS闭环生态之中? 传统天气预报播报未来24小时天气,不够准确也已过时,而在开源的世界里,播报未来10分钟的天气变化并不是难题。 Dark Sky正是一款以分钟级别准确预测用户所在地未来一小时降雨情况的应用。 随时随地,只要用户打开应用,它会迅速基于用户定位播报天气。比如,当前地区5分钟后有强降雨、将持续15分钟等。 正如其所标榜的那样,Dark Sky是目前“最准确的超本地化天气信息来源”App。 有趣的是,Dark Sky并不是基于气象学方法做出天气预测,而是别出心裁地只采用了大数据分析模型。 Dark Sky的主创团队也十分“特别”。三位创始人中,Adam Grossman是物理学出身,Jay LaPorte和Jack Turner研究计算机科学。团队其他成员则是网络开发人员和后端工程师。换句话说,整个团队都没有气象学背景。 就是这样一群半路出家的“气象工作者”,做出了这款倍受好评的天气应用。 ▲Dark Sky联合创始人:Jay LaPorte(左),Adam

FANN XOR training

为君一笑 提交于 2019-12-23 05:25:06
问题 I am developing a piece of software that uses FANN, the Fast Artificial Neural Network library. I have tried after numerous failed attempts at writing my own ANN code to compile a FANN sample program, here the C++ XOR approximation program. Here is the source. #include "../include/floatfann.h" #include "../include/fann_cpp.h" #include <ios> #include <iostream> #include <iomanip> using std::cout; using std::cerr; using std::endl; using std::setw; using std::left; using std::right; using std:

Link errors using FANN

荒凉一梦 提交于 2019-12-11 22:05:02
问题 I'm trying to build a basic FANN (Fast Artificial Neural Network) project on Windows with MinGW. However, whenever I try to link the executable, I run into a bunch of undefined reference to errors. Interestingly, if I don't link the library at all, I get more errors, implying that at least some of the library is working. The code for the file I'm trying to compile and link is: #include "doublefann.h" int main() { const unsigned int num_input_neurons = 9; const unsigned int num_output_neurons

Training on a fitness function

↘锁芯ラ 提交于 2019-12-11 16:35:06
问题 I am looking at FANN (Fast Artificial Neural Network) to create a neural network to drive a car around a track in a simulation. It's possible to train on a fixed data set, but this isn't suitable for training a car to drive. I would like to use a fitness function to train my NN. Is this possible? Is it possible to tell FANN to use a fitness function rather than a fixed data set to train a NN? 回答1: I would like to use a fitness function to train my NN. Is this possible? Fitness functions judge

What is the purpose of bit fail in FANN?

寵の児 提交于 2019-12-10 12:38:41
问题 im having a response like below from fann Epochs 1. Current error: 0.2500066161. Bit fail 4. Epochs 58. Current error: 0.0000930788. Bit fail 0. what does Bit fail mean here? 回答1: The bit fail limit is the maximum difference between the expected and actual output neuron value that is allowed.The default bit fail limit is 0.35. If the difference between the expected and actual output neuron value is more that the bit fail limit, this counts as 1 bit fail. In the sample output you gave, at 58

Error “undefined reference to `sin'” when compiling (with -lm)

本秂侑毒 提交于 2019-12-10 09:22:36
问题 I've downloaded and compiled: http://leenissen.dk/fann/wp/ cmake version 2.8.11.2 gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1 Command used to compile: cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr . Installation: sudo make && sudo make install Then I go to examples/ directory inside fann project and try to compile examples by running: make all I'm getting an error: gcc -O3 xor_train.c -o xor_train -lfann -lm /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libfann.so: undefined reference to `sin'

Error “undefined reference to `sin'” when compiling (with -lm)

三世轮回 提交于 2019-12-05 17:15:23
I've downloaded and compiled: http://leenissen.dk/fann/wp/ cmake version 2.8.11.2 gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1 Command used to compile: cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr . Installation: sudo make && sudo make install Then I go to examples/ directory inside fann project and try to compile examples by running: make all I'm getting an error: gcc -O3 xor_train.c -o xor_train -lfann -lm /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libfann.so: undefined reference to `sin' /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib/libfann.so: undefined reference to `exp' /usr/lib/gcc

FANN - I get incorrect results (near 0) at simply task [closed]

99封情书 提交于 2019-12-02 22:46:53
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year . #include "doublefann.h" #include "fann_cpp.h" #include <iostream> using namespace std; int main() { FANN::neural_net* sth = new FANN::neural_net(); sth->create_standard(3, 1, 2, 1); double inputs[1] = {0.000005}; double outputs[1] = {0.8}; double *wynik; for(int i = 0; i < 1000; i++) { sth->train

What is the format of training data in pyfann?

送分小仙女□ 提交于 2019-12-01 07:01:28
What is the format of thraining data in pyfann? Concretely I would like to use the init_weight function of pyfann, but it does not take a range, but finds the range from traning data. Therefore I would like to create a small fake dataset, which has the lowest and the highes value of what can be expected in the programm. Frist Line, 3 arguments: number of data to train, number of inputs, number of outputs from there, goes one line of inputs and one of outputs e.g. (AND logic matrix): 4 2 1 1 1 1 0 1 0 0 0 0 1 0 0 Above: 4 datas to train: 1 AND 1 = 1 0 AND 1 = 0 0 AND 0 = 0 1 AND 0 = 0 2 inputs