import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import numpy as np from skimage.io import imsave import os import s... ...
分类:
其他好文 时间:
2017-09-01 17:43:26
阅读次数:
707
一、 x = np.random.normal(size=100) #随机生成100个高斯分布的数据(均值为0,方差为1) sns.distplot(x,kde=False) #绘制直方图(自动设定轴的区间) #kde=False表示不画出拟合曲线,kde=True表示同时画出拟合曲线 二、根据均值 ...
分类:
其他好文 时间:
2017-08-31 12:40:19
阅读次数:
219
import matplotlib matplotlib.use('Agg') import numpy as np from numpy import array from matplotlib import pyplot from scipy import integrate import ma... ...
分类:
其他好文 时间:
2017-08-28 19:58:07
阅读次数:
291
双调欧几里得旅行商问题是一个经典动态规划问题。《算法导论(第二版)》思考题15-1和北京大学OJ2677都出现了这个题目。 旅行商问题描述:平面上n个点,确定一条连接各点的最短闭合旅程。这个解的一般形式为NP的(在多项式时间内可以求出) J.L. Bentley 建议通过只考虑双调旅程(bitoni ...
分类:
编程语言 时间:
2017-08-25 21:41:17
阅读次数:
267
pandas常用函数整理,作为个人笔记。 仅标记函数大概用途做索引用,具体使用方式请参照pandas官方技术文档。 约定 from pandas import Series, DataFrame import pandas as pd import numpy as np 带.的为Series或者D ...
分类:
其他好文 时间:
2017-08-24 19:57:00
阅读次数:
1213
#! /usr/bin/env/python3 # -*- coding: utf-8 -*- import numpy as np print('hello world!') int_a=3 int_b=int_a print(id(int_a),id(int_b)) int_a=5 print(... ...
分类:
编程语言 时间:
2017-08-24 00:15:51
阅读次数:
185
import os,math os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf import numpy as np import matplotlib.pyplot as plt x_data = np.array([[0... ...
分类:
其他好文 时间:
2017-08-22 20:51:57
阅读次数:
124
题意:给出n,求不大于n的素数有多少个。 算法:先用线性时间复杂度的筛法打素数表,对于每个输入统计不超过的素数个数。 #include int p[100010]; bool np[1000010]; int cntp; void SievePrime(int n) { for (int i = 0... ...
分类:
其他好文 时间:
2017-08-21 18:52:24
阅读次数:
115
pandas a.基本使用 #结构化的数据分析 pip3 install jupyter pip3 install pandas #import pandas as pd #import numpy as np #事例一: #s = pd.Series([1,3,5,np.NaN,8,4]) #s ...
分类:
其他好文 时间:
2017-08-20 21:05:32
阅读次数:
304
一. Numpy 常用操作 a. xxxx import numpy as np print(np.arange(1,11)) #[ 1 2 3 4 5 6 7 8 9 10] print(np.arange(1,11).reshape([2,5])) # [ # [ 1 2 3 4 5] # [ ...
分类:
其他好文 时间:
2017-08-20 18:34:18
阅读次数:
196