Quantcast
Channel: CodeSection,代码区,Python开发技术文章_教程 - CodeSec
Browsing all 9596 articles
Browse latest View live

Data Analyst

Employment Type: Full-time, permanent Location: London The UK wholesale energy market is going through unprecedented change with rapid development of renewable energy technologies, the introduction of...

View Article


详解 Python 模板引擎工作机制

原文地址: How a template engine works 原文作者: Shipeng Feng 译文出自: 掘金翻译计划 译者: Zheaoli 校对者: Kulbear , hpoenixf 我已经使用各种模版引擎很久了,现在终于有时间研究一下模版引擎到底是如何工作的了。 简介 简单的说,模版引擎是一种可以用来完成涉及大量文本数据的编程任务的工具。一般而言,我们经常在一个 web...

View Article


Python-Day4 Python基础进阶之生成器/迭代器/装饰器/Json & pickle 数据序列化 ...

一、生成器...

View Article

Image may be NSFW.
Clik here to view.

Using Predictive Algorithms to Track Real Time Health Trends

We’ve shown how to use predictive algorithms to track economic development . In this tutorial, we’re going to build a real-time health dashboard for tracking a person’s blood pressure readings, do...

View Article

Django Weblog: Welcome to the new members of the Django Software Foundation

Please welcome our new members. Some were nominated in recognition of their contributions to Django's code, some for their service on Django committees and work in other community organisations, and...

View Article


Image may be NSFW.
Clik here to view.

Python3---filter,map,reduce

filter(func,iter) 只能处理一个参数(iter),仅仅将满足func方法的数值过滤出来 如: a = [1,2,3,4,5] list(filter(lambda x:x>2,a)) 输出结果为: [3,4,5] map(func,iter1,iter2,..) 可以处理多个iter,实现通过func方法对iter1,iter2,..进行处理 如:...

View Article

Image may be NSFW.
Clik here to view.

10 行 Python 代码写的模糊查询

导语: 模糊匹配可以算是现代编辑器(在选择要打开的文件时)的一个必备特性了,它所做的就是根据用户输入的部分内容,猜测用户想要的文件名,并提供一个推荐列表供用户选择。 样例如下: Vim (Ctrl-P) Sublime Text (Cmd-P) ‘模糊匹配’这是一个极为有用的特性,同时也非常易于实现。 问题分析:...

View Article

Image may be NSFW.
Clik here to view.

python自动化运维之路4

装饰器 装饰器(decorator)是一种高级python语法。装饰器可以对一个函数、方法或者类进行加工。 在Python中,我们有多种方法对函数和类进行加工,比如在Python闭包中,我们见到函数对象作为某一个函数的返回结果。 相对于其它方式,装饰器语法简单,代码可读性高。因此,装饰器在Python项目中有广泛的应用。...

View Article


PyCharm 2016.2.2 RC 发布,全新 Python 开发体验

PyCharm 2016.2.2 RC 正式发布了。在该版本中,修复了几个在调试软件和代码分析器中发现的问题。 下面是一些本次的 bug 修复和特性改进列表: Wrong union type is inferred for the reference to a module imported via python 2 implicit relative import Add type...

View Article


My Goal: the lowest possible barrier to entry to learn Deep Learning (in Python)

If you passed high school math and can hack around in python, I want to teach you Deep Learning . Well folks, I've decided to write a Deep Learning book in the same style as my blog, teaching Deep...

View Article

Inplace Operators in Python | Set 1 (iadd(), isub(), iconcat()…)

python in its definition provides methods to perform inplace operations, i.e doing assignment and computation in a single statement using “ operator ” module. For example, x += y is equivalent to x =...

View Article

Image may be NSFW.
Clik here to view.

Python之路:堡垒机实例

堡垒机前戏 开发堡垒机之前,先来学习python的paramiko模块,该模块机遇SSH用于连接远程服务器并执行相关操作 SSHClient 用于连接远程服务器并执行基本命令 基于用户名密码连接: importparamiko # 创建SSH对象 ssh =paramiko.SSHClient() # 允许连接不在know_hosts文件中的主机...

View Article

[Python]-5-元组列表与字典

引言 这篇文章介绍python中的三种组合数据类型,文章后半段会介绍如何在这些组合数据类型中使用"分片"取出数据。 文章目录 0×1.元组 在python中,元组使用中括号来创建,如果括号中仅包含一个元素,需要在元素末尾添加一个逗号(不添加逗号数据会被创建成字符串或数值数据类型),元组在创建后,不能添加删除其中的元素,其值是固定不变的,请看下面的实例:...

View Article


Image may be NSFW.
Clik here to view.

使用Pdb调试Python

简单介绍 python自带 Pdb库,使用 Pdb调试 Python程序还是很方便的。但是远程调试、多线程,Pdb是搞不定的 本文参考的相关文章如下: 《指针和字符串和字符串常量、用gdb来获取非法内存中的内容》 《linux gdb调试器用法全面解析》 《用PDB库调试Python程序》 用Pdb调试有多种方式 使用 Pdb调试 Python的程序的方式主要是下面的三种!下面逐一介绍...

View Article

Image may be NSFW.
Clik here to view.

Accomplishments Aug 2016

As a reminder, a one-page summary of all the courses, books & videos I’ve reviewed in the past year can be found on myJourney Roadmap page. It’s been a summer of incredible transition for me as...

View Article


HTTPie 工具使用入门

HTTPie 是一个 HTTP 的命令行客户端。其目标是让 CLI 和 web 服务之间的交互尽可能的人性化。 其有特点如下: 直观的语法 格式化和色彩化的终端输出 内置 JSON 支持 支持上传表单和文件 HTTPS、代理和认证 任意请求数据 自定义头部 持久性会话 类 Wget 下载 支持 python 2.6, 2.7 和 3.x 支持 linux, Mac OS X 和 windows 插件...

View Article

Python时间

python提供time时间模块需要单独引入 #推迟调用线程的运行,secs指秒数。time.sleep(secs) 时间戳 时间戳都以自从1970年1月1日午夜经过了多长时间来表示,时间间隔是以秒为单位的浮点小数。 import time # 引入time模块print U"当前时间戳:",time.time()输出结果: 当前时间戳: 1471487935.02 当前时间...

View Article


用 Python 和 asyncio 来编写多人在线游戏(二)

本文作者为 Kyrylo Subbotin,是一家 IT 咨询公司的 python 工程师。本文译者为 sleepyjoker,由编程派作者 EarlGrey 校对。 译者简介:sleepyjoker,东南大学电子科学与工程专业大二学生。虽然暂时还是python菜鸟,但喜欢通过代码完成各种有意思的事。 3.编写游戏中的循环...

View Article

Image may be NSFW.
Clik here to view.

用 Python 和 asyncio 来编写多人在线游戏(三)

在这个系列教程中,我们以多人贪吃蛇游戏为例,开发了一个异步 python 应用。前一篇文章主要讲了如何编写游戏循环,第一篇则介绍如何实现异步。 本文作者为 Kyrylo Subbotin,是一家 IT 咨询公司的 Python 工程师。译者:oo7ww,校对:EarlGrey@编程派。 译者简介:oo7ww,北京邮电大学大三学生,计算机科学与技术专业,方向 Python Web。...

View Article

Python时区转换

最近工作中遇到了一个问题:我的server和client不是在一个时区,server时区是EDT,即美国东部时区,client,就是我自己的电脑,时区是中国标准时区,东八区。处于测试需要,我需要向server发送一个时间,使得server在这个时间戳去执行一些动作。这个时间戳通常是当前时间加2分钟或者几分钟。...

View Article
Browsing all 9596 articles
Browse latest View live