SICP Python 描述 1.4 实践指南:函数的艺术
1.4 实践指南:函数的艺术 来源: 1.4 Practical Guidance: The Art of the Function 译者:飞龙 协议: CC BY-NC-SA 4.0 函数是所有程序的要素,无论规模大小,并且在编程语言中作为我们表达计算过程的主要媒介。目前为止,我们讨论了函数的形式特性,以及它们如何使用。我们现在跳转到如何编写良好的函数这一话题。...
View ArticlePython之路-python(set集合、文本操作、字符编码 )
一、集合操作(set) 1、定义: set集合,是一个无序且不重复的元素集合。 集合对象是一组无序排列的可哈希的值,集合成员可以做字典中的键。集合支持用in和not in操作符检查成员,由len()内建函数得到集合的基数(大小), 用 for 循环迭代集合 的成员。但是因为集合本身是无序的,不可以为集合创建索引或执行切片(slice)操作,也没有键(keys)可用来获取集合中元素的值。 2、特性:...
View Article用于解答算法题目的Python3代码框架
前言 最近在实习,任务并不是很重,就利用闲暇时间使用python3在PAT网站上刷题,并致力于使用Python3的特性和函数式编程的理念,其中大部分题目都有着类似的输入输出格式,例如一行读入若干个数字,字符串,每行输出多少个字符串等等,所以产生了很多重复的代码。 Python代码 于是我就利用VS...
View ArticlePython黑帽编程2.5 函数
python 黑帽编程 2.5 函数 写了几节的基础知识,真心感觉有点力不从心。这块的内容说实话,看文档是最好的方式,本人的写作水平,真的是找不出更好的写法,头疼。简单带过和没写一样,写详细了和本系列教程又不搭。思考再三,最后还是决定简明扼要为主,我们把主要的精力投入到核心内容。更详细的资料留给各位同学自行搜索补充和阅读相关书籍和文档。 2.5.1 什么是函数...
View ArticleLong-term forecasting with machine learning models
03 Aug 2016 Time series analysis has been around for ages. Even though it sometimes does not receive the attention it deserves in the current data science and big data hype, it is one of those problems...
View Article学习日记
python 默认参数工作机制 Default values are computed once, then re-used. 默认参数只会计算一次,不会重复使用 class demo_list: def __init__(self, l=[]): self.l = l def add(self, ele): self.l.append(ele)def appender(ele): obj =...
View ArticleSublime Text for Python development ― My 2016 review
Sublime Text for python development ― My 2016 review When you ask for editor recommendations as a Python developer one of the top choices you’ll hear about is Sublime Text. In this post I’ll review the...
View ArticleIns水军来袭--浅谈利用python爬虫批量注册ins
Ins水军来袭--浅谈利用python爬虫批量注册ins 昨天来源:PMidea python偏向脚本语言,是平时完成一些简单项目的很好的工具。今天我发现ins主页注册时,邮箱部分不需要验证,并且正则表达式设置非常简单,随便输入了一串字符dashfjhafjhd再加上@shabi.com都可以注册。所以我决定写一个脚本批量注册ins水军账号,然后再写个批量登陆ins操作一类的脚本,命令他们赞我照片...
View ArticleNikola: Nikola v7.7.6 is out!
On behalf of the Nikola team, I am pleased to announce the immediate availability of Nikola v7.7.6. It fixes some bugs and adds new features. What is Nikola? Nikola is a static site and blog generator,...
View ArticleNew & Upcoming Course Highlights: OAuth Authentication, Spring, Django & ...
Every week, new courses are published to the growing TreehouseLibrary! Here is a short list of what we’ve addedrecently, as well as a few highlights from ourContent Roadmap. Start learning to code...
View ArticleLink Harvesting in Python
I’ve done extensive work with link validation in websites, using a mix of Ruby / Anemone (spidering library) and Watir (web automation library.) In this post I’ll cover a similar approach from the...
View ArticleSentry 8.7.0 发布,Python 实时日志平台
Sentry 8.7.0 发布了,Sentry 是一个实时的事件日志和聚合平台,基于Django 构建。 Sentry 可以帮助你将 python 程序的所有 exception 自动记录下来,然后在一个好用的 UI 上呈现和搜索。处理 exception 是每个程序的必要部分,所以 Sentry 也几乎可以说是所有项目的必备组件。 主要改进如下: Removed "Replay Request"...
View ArticleRequests v2.11.0 发布,Python 的 HTTP 客户端库
Requests v2.11.0 发布了,Requests 是一个 python 的 HTTP 客户端库。 一些提升: Added support for the ALL_PROXY environment variable. Reject header values that contain leading whitespace or newline characters to reduce...
View ArticleIronPython项目有了新负责人
运行Ironpython项目的社区领导职责已经交给了Alex Earl和Benedikt Eggers。之前的负责人Jeff Hardy自 微软在2010年不再积极参与 以来一直负责项目的运行。 Jeff Hardy 写道:...
View ArticleForm Fuzzing with Python and Mechanize
Another module in the python standard library, is that of Mechanize. Mechanize is a Python headless browser. With Mechanize you can interact with web applications. This could allow for headless...
View Articlepython任务执行之线程,进程,与协程
一、 线程 线程为程序中执行任务的最小单元,由Threading模块提供了相关操作,线程适合于IO操作密集的情况下使用 1 #!/usr/bin/env python 2 # -*- coding:utf-8 -*- 3 import threading 4 import time 5 6 def show(arg): 7 time.sleep(1) 8 print...
View Article精通 Oracle+Python,第 3 部分:数据解析
进行数据解析的理由不计其数,相关的工具和技巧也同样如此。但是,当您需要用这些数据做一些新的事情时,即使有“合适的”工具可能也是不够的。这一担心对于异类数据源的集成同样存在。用来做这项工作的合适工具迟早应该是一种编程语言。 Oracle 提供了一些非常强大的实用程序来加载、处理和卸载数据。SQL*Loader、Data Pump、外部表、Oracle...
View ArticleMicroPython:TPYBoard 开发板如何运行第一个脚本?
首先,链接开发板。通过 USB 线连接你的 PC 机(windows,mac,linux皆可)。你不可能搞错因为仅有这么一种连接方式。当连接成功后开发板将上电和进入开机程序,绿色的 LED 灯应该在半秒或更少的时间内亮起,当其熄灭时意味着开机程序已完成。 安装USB驱动 Windows:开发板将作为可移动磁盘出现。Window 将自动弹出窗口界面,或者你自己寻找进入。...
View ArticleTiLDA MKπ, The EMF Camp 2016 Badge
The Scottish Consulate has stamped its last passport, the Dutch fire tower has belched its final flame, and the Gold Members Lounge has followed the Hacienda and the Marquee into clubland oblivion. EMF...
View Article用 Python 进行贝叶斯模型建模
用 python 进行贝叶斯模型建模 昨天来源:伯乐在线 本文由 伯乐在线 - JLee 翻译,sunshinebuel 校稿。未经许可,禁止转载!英文出处:markdregan。欢迎加入翻译组。第1节:估计模型参数在这一节,我们将讨论贝叶斯方法是如何思考数据的,我们怎样通过 MCMC 技术估计模型参数。 from IPython.display import Imageimport...
View Article