随笔分类 -  Python

1
摘要:#!/usr/bin/env pythonimport osimport sysfrom svm import *from svm import __all__ as svm_all__all__ = ['evaluations', 'svm_load_model',... 阅读全文
posted @ 2018-12-18 14:27 yuerspring 阅读(278) 评论(0) 推荐(0)
摘要:------------------------------------- Python interface of LIBSVM -------------------------------------Table of Contents===============... 阅读全文
posted @ 2018-12-18 11:23 yuerspring 阅读(247) 评论(0) 推荐(0)
摘要:图像处理的几种方法 1.使用skimage name details name details name details astronaut 宇航员图片 coffee 一杯咖啡图片 lena lena图片... 阅读全文
posted @ 2018-12-17 09:10 yuerspring 阅读(1576) 评论(0) 推荐(0)
摘要:Python 生成均值为2 ,标准差为3 的一维正态分布样本500 import numpy as npimport scipy.stats as st import matplotlib.pyplot as plts=np.random.normal(2, 3, 5... 阅读全文
posted @ 2018-12-04 16:02 yuerspring 阅读(3050) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-11-26 09:09 yuerspring 阅读(92) 评论(0) 推荐(0)
摘要:The most important parameters of spark env when you using spark run data thingsIn my memory I always confused by these parameters ,s... 阅读全文
posted @ 2018-11-02 16:40 yuerspring 阅读(176) 评论(0) 推荐(0)
摘要:以前所有的Hive 函数都是 Java 或是 Scala 语言写的 ,Python 没有弄个 ,看到Python 格式的 code 懵逼了 ,非常懵逼 今天在看 Python 正则表达式偶遇 Python udf 的一个 case ,不过 Python 484... 阅读全文
posted @ 2018-10-31 18:06 yuerspring 阅读(330) 评论(0) 推荐(0)
摘要:import numpyimport skimage.ioimport matplotlib.pyplot as pltfrom keras.models import Sequentialfrom keras.layers import Densefrom kera... 阅读全文
posted @ 2018-03-08 20:52 yuerspring 阅读(369) 评论(0) 推荐(0)
摘要:本脚本是训练keras 的mnist 数字识别程序 ,以前发过了 ,今天把 预测实现了,# Larger CNN for the MNIST Dataset# 2.Negative dimension size caused by subtracting 5 from... 阅读全文
posted @ 2018-03-08 20:49 yuerspring 阅读(1003) 评论(0) 推荐(0)
摘要:Python 线程和 redis 简单读写操作应用1. python 线程 & 线程池的概念python 中使用线程的两种方式: 函数或是用类包装线程对象函数:调h用thread 模块中的start_new_thread()函数生成新线程,thread.start_n... 阅读全文
posted @ 2017-09-19 13:38 yuerspring 阅读(400) 评论(0) 推荐(0)
摘要:#-*- coding: UTF-8 -*-import osimport shutilAllFiles=[]NameFiles=[]def findFie(filePath): pathDir = os.listdir(filePath) for all... 阅读全文
posted @ 2017-09-08 17:42 yuerspring 阅读(637) 评论(0) 推荐(0)
摘要:难点是版本变化后 方法不再匹配 ,同时每个方法具体意义需要揣摩# Larger CNN for the MNIST Dataset# 2.Negative dimension size caused by subtracting 5 from 1 for 'conv2... 阅读全文
posted @ 2017-08-29 20:41 yuerspring 阅读(310) 评论(0) 推荐(0)
摘要:想在windows 下 ,搭建一个spark kafka 的 最简单的实时流计算:python 随机生成0-100 的随机数据,发送给spark 进行统计scala 2.11python 3.5java 1.8kafka_2.11-0.11.0.0.tgzzooke... 阅读全文
posted @ 2017-08-19 13:54 yuerspring 阅读(221) 评论(0) 推荐(0)
摘要:要点:数据分割数据集成stringId='DMDM_SUM_FACT_PATTERN_CHANLLAGE_POC_MQT'print stringId.capitalize()stringList = stringId.split('_')stringListAfte... 阅读全文
posted @ 2017-08-10 12:10 yuerspring 阅读(381) 评论(0) 推荐(0)
摘要:C:\Users\IBM_ADMIN>python -VPython 2.7.13查Python 工资的网站 :http://www.jobui.com/salary/%E5%8C%97%E4%BA%AC-python%E5%B7%A5%E7%A8%8B%E5%B8%... 阅读全文
posted @ 2017-08-09 21:15 yuerspring 阅读(141) 评论(0) 推荐(0)
摘要:这个模块还需要更多时间了解import randomimport curses'''By wumi 2017-7-23https://www.youtube.com/watch?v=rbasThWVb-cCurses 使用介绍:http://www.cnblogs.c... 阅读全文
posted @ 2017-07-23 15:52 yuerspring 阅读(414) 评论(0) 推荐(0)
摘要:#! /usr/bin/env python# coding:utf-8import random"""Guesser number ,by wumi ,2017-07-22"""def main(): print "guess a number between... 阅读全文
posted @ 2017-07-22 21:14 yuerspring 阅读(119) 评论(0) 推荐(0)
摘要:重点是什么是质数,以及怎么求质数#!/usr/bin/python# -*- coding:UTF-8 -*-'''Findprime number判断101-200之间有多少个素数,并输出所有素数。何为素数:质数(外文名prime number)又称素数,有无限个。... 阅读全文
posted @ 2017-07-18 23:23 yuerspring 阅读(201) 评论(0) 推荐(0)
摘要:#!/usr/bin/python# -*- coding:UTF-8 -*-import time"""pause for 2 seconds and format the timestamp"""def pause(n): for x in range(1... 阅读全文
posted @ 2017-07-18 22:35 yuerspring 阅读(182) 评论(0) 推荐(0)
摘要:两层数据嵌套#!/usr/bin/python# -*- coding:UTF-8 -*-""""print (9 9 ) --> Multiplication Table"""for x in range(1,10): print for k in r... 阅读全文
posted @ 2017-07-18 22:25 yuerspring 阅读(369) 评论(0) 推荐(0)

1