Head First Python, 2nd Edition
出版时间:2016.11 官网链接: O’Reilly 下载地址: 百度网盘(PDF) 内容简介: Want to learn the python language without slogging your way through how-to manuals? With Head First Python, you’ll quickly grasp Python’s fundamentals,...
View ArticleMicropython开发板DIY智能温控小风扇
实验目的 1.学习在PC机系统中扩展简单I/O接口的方法。 2.进一步学习编制数据输出程序的设计方法。 3.学习DS18B20的接线方法,并利用DS18B20检测当前温度。 4.学习三极管9014的用法。 5.通过18B20智能控制直流电机驱动小风扇。 详细例程: http://www.micropython.net.cn/support/example/260.html 所需元器件...
View ArticlePython Tutorial - Guessing Game
Transcript Hello, this is NanoDano at DevDungeon.com with the next lesson in this series of python Cookbook tutorials. In this lesson we're going to make a game. Personally, I really love game...
View Article浅析如何用Python从头开始实现一个中文拼音输入法?
众所周知,中文输入法是一个历史悠久的问题,但也实在是个繁琐的活,不知道这是不是网上很少有人分享中文拼音输入法的原因,接着这次NLP Project的机会,我觉得实现一发中文拼音输入法,看看水有多深,结果发现还挺深的,但是基本效果还是能出来的,而且看别的组都做得挺好的,这次就分 享一下我们做的结果吧。 (注:此文假设读者已经具备一些隐马尔可夫模型的知识) 任务描述 实现一个中文拼音输入法。...
View Article从零开始学Python06作业源码(仅供参考)
python Version 2.7x 一,bin目录:程序启动入口 SelectLesson_start.py 1 #!usr/bin/env python 2 # -*- coding:utf-8 -*- 3 # auther:Mr.chen 4 # 描述: 5 6 7 import sys 8 sys.path.append('..') 9 from src import...
View ArticleLintel Technologies: Asynchronous DB Operations in Twisted
Twisted is an asynchronous networking framework. Other Database API Implementations have blocking interfaces. For this reason, twisted.enterprise.adbapi was created. It is a non-blocking...
View ArticlePython Logging模块的简单使用
前言 日志是非常重要的,最近有接触到这个,所以系统的看一下python这个模块的用法。本文即为Logging模块的用法简介,主要参考文章为Python官方文档,链接见参考列表。 另外,Python的 HOWTOs文档 很详细,连日志该怎么用都写了,所以有英文阅读能力的同学建议去阅读一下。 Logging模块构成 组成 主要分为四个部分: Loggers:提供应用程序直接使用的接口...
View ArticleTransitioning to Python 3
The python language, which is not new but continues to gain momentum and users as if it were, has changed remarkably little since it first was released. I don't mean to say that Python hasn't changed;...
View ArticlePython之路【第十八章】:Django基础篇
Django基本配置 python的WEB框架有Django、Tornado、Flask 等多种,Django相较与其他WEB框架其优势为:大而全,框架本身集成了ORM、模型绑定、模板引擎、缓存、Session等诸多功能 1、安装 # windows 直接用pip进行安装 pip install django # 生成的django文件加入到系统环境变量 C:\Python35\Scripts...
View ArticleRepresentative Line: Off in the Distance
Drew Wgot called in to track down a bug. Specifically, their application needed to take a customer’s location, and measure the distance to the nearest National Weather Service radar station. It knew...
View ArticleFlask 系列 - 蓝图
在开始学 Flask 的时候,我们习惯把代码写在单一的文件里面,虽然看起来很方便,但也只是供学习的时候用用而已,真正在一个实际项目中,是不应该这样做的,为什么呢? 我们还是从 hello world 开始讲起,新建一个脚本文件,比如 hello.py 。 $ cat hello.py # -*- coding: utf-8 -*- fromflaskimportFlask app =...
View ArticleEfficiency vs expressiveness
The ideal code is both efficient and expressive but they’re often at odds with one another. Last week I was working on a simple script to parse and visualize a detailed AWS bill across a variety of...
View ArticleTidy Data in Python
I recently came across a paper named Tidy Data by Hadley Wickham. Published back in 2014, the paper focuses on one aspect of cleaning up data, tidying data: structuring datasets to facilitate...
View Article3: Using Python IDLE
3: Using pythonIDLE December 6, 2016 Leave a comment Book ref: Project 4 (pg 84ff) Python 2.7: Same See also: Python 3/Project 4 post You have started this new batch of tutorials working with the...
View Articlepython模块的管理 Sam's Note
在python中,一个.py文件就构成一个模块。最近写多个程序的时候时不时需要调用自己之前写模块,每次都是粘贴复制,最大的问题,就是有的自己写的模块最后修改了,都不知道修改的是哪一个,既然出现了这样的问题,那么我们就来看一下模块应该如何管理。 官网详解: 一 引入模块 我们先写一个first.py文件,内容如下: def laugh(): print 'HaHaHaHa'...
View ArticlePython爬虫-用Scrapy框架实现漫画的爬取
在之前一篇抓取漫画图片的文章里,通过实现一个简单的python程序,遍历所有漫画的url,对请求所返回的html源码进行正则表达式分析,来提取到需要的数据。 本篇文章,通过 scrapy 框架来实现相同的功能。 scrapy 是一个为了爬取网站数据,提取结构性数据而编写的应用框架。关于框架使用的更多详情可浏览 官方文档 ,本篇文章展示的是爬取漫画图片的大体实现过程。 scrapy环境配置 安装...
View Article实例讲解基于 Flask+React 的全栈开发和部署
简介 我有时在 Web 上浏览信息时,会浏览 Github Trending , Hacker News 和 稀土掘金 等技术社区的资讯或文章,但觉得逐个去看很费时又不灵活。后来我发现国外有一款叫 Panda 的产品,它聚合了互联网大多数领域的信息,使用起来确实很不错,唯一的遗憾就是没有互联网中文领域的信息,于是我就萌生了一个想法:写个爬虫,把经常看的网站的资讯爬下来,并显示出来。...
View ArticleBasics of using the readline library
Did it ever happen to you to find a program that provides a shell / REPL-like interface that doesn't support basic features like line editing, command history and completion? I personally find it...
View ArticleDataCamp: Python Data Visualization: Bokeh Cheat Sheet
Bokeh distinguishes itself from other python visualization libraries such as Matplotlib or Seabornin the fact that it is aninteractive visualization library that is ideal for anyone who would like to...
View ArticleWeird behavior in Class methods vs StaticMethods in Pyspark
Note, using Spark 2.0.0 with python 2.7 I just found a very weird behavior in PySpark. I will show it with an example. Who knows, maybe this can help someone else. I am processing a list of text files...
View Article