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

2016 week 47 in programming

Programmers are having a huge discussion about the unethical and illegal things they’ve been asked to do Dozens of people have already been killed by faulty software in cars, while hundreds of people...

View Article


Python Release 2.7.12

Release Date:2016-06-25 python 2.7.12 is a bugfix release in the Python 2.7.x series. Full Changelog Files Version Operating System Description MD5 Sum File Size GPG Gzipped source tarball Source...

View Article


Image may be NSFW.
Clik here to view.

分布式任务队列Celery的介绍

在程序运行过程中,要执行一个很久的任务,但是我们又不想主程序被阻塞,常见的方法是多线程。可是当并发量过大时,多线程也会扛不住,必须要用线程池来限制并发个数,而且多线程对共享资源的使用也是很麻烦的事情。还有就是前面几篇介绍过的协程,但是协程毕竟还是在同一线程内执行的,如果一个任务本身就要执行很长时间,而不是因为等待IO被挂起,那其他协程照样无法得到运行。本文要介绍一个强大的分布式任务队列Celery,...

View Article

Image may be NSFW.
Clik here to view.

Python爬虫抓取 python tutorial中文版,保存为word

看到了中文版的python tutorial,发现是网页版的,刚好最近在学习爬虫,想着不如抓取到本地 首先是网页的内容 查看网页源码后发现可以使用BeautifulSoup来获取文档的标题和内容,并保存为doc文件。 这里需要使用 from bs4 import BeautifulSoup 来导入该模块 具体代码如下: # 输出所在网址的内容 from bs4 import...

View Article

Image may be NSFW.
Clik here to view.

Santa's New HAT (Explorer HAT Fun!)

Santa always wears a funky red hat when delivering presents across the globe, but the HAT we are looking at in this post is not that. Rather it is a funky board called the Explorer HAT Pro from...

View Article


Inverted Index Project

I haven't spoken much about the class I've been teaching this semester. It's an intro CS course - a programming heavy intro. I decided to use python with a transition at the end to C++. The transition...

View Article

Django的使用记录

=Start= 缘由: 总结以往经验,方便以后参考 正文: 1. 编译安装 python 2.7 2. 安装 Python 2.7 对应的 PIP 3. 利用 PIP 安装一些模块 $ pipinstallDjango==1.8.16 mysql-pythonvirtualenvvirtualenvwrapper 4. 使 VirtualENV 立即生效 $ vim ~/.bashrc...

View Article

Django的使用记录_2

=Start= 缘由: 记录在使用Django的过程中碰到的各种问题,方便以后参考。 正文: 1.碰到「CSRF verification failed. Request aborted.」怎么办? $.ajax({ data: { somedata: 'somedata', moredata: 'moredata', csrfmiddlewaretoken: '{{ csrf_token }}'...

View Article


Django Channels: Using Custom Channels

In my earlier blog post - Introduction to Django Channels , I mentioned that we can create our own channels for various purposes. In this blog post, we would discuss where custom channels can be...

View Article


如何编写 Python 文档生成器【已翻译10%】

如何编写 python 文档生成器【已翻译10%】 昨天来源:开源中国 在我刚开始接触Python的日子里,我最喜欢做的事情之一是坐在解释器旁使用内置help功能来检查类和方法,决定下一个要敲的内容。这个功能导入一个对象,遍布它的成员,取出文档注释,生成一个类似manpage的输出,从而帮助你找到如何使用正在检查的对象的方法。

View Article

Image may be NSFW.
Clik here to view.

那些Python意想不到的对象

那些python意想不到的对象 昨天来源:CSDN 引言:Python 不只是一门支持面向对象范式的语言。在多范式的外表下,Python 用对象来构建它的大框架。因此,我们可以及早切入面向对象编程,从而了解Python的深层魅力。 本文选自《从Python开始学编程》,我们来看看Python那些意想不到的对象。 php?url=0F3eWZNM0y" alt="那些Python意想不到的对象"...

View Article

Image may be NSFW.
Clik here to view.

大数据时代,python竟是最好的语言?

大数据时代,python竟是最好的语言? 一点号超级数学建模昨天 php?url=0F3oBdCf9z" alt="大数据时代,python竟是最好的语言?"...

View Article

Image may be NSFW.
Clik here to view.

Python Basics Part 1

Let’s start with python basics, with the help of program .Theory part in posts is just enough to understand the program. Python Data Type: Numbers Strings List Tuple Dictionary Numbers : Int 1...

View Article


Image may be NSFW.
Clik here to view.

Toolsmith - GSE Edition: Scapy vs CozyDuke

In continuation of observations from my GIAC Security Expert re-certification process, I'll focus here on a GCIA -centric topic: Scapy. Scapy is essential to the packet analyst skill set on so many...

View Article

This Week I Learned #4: Is Python 3 dead?

Hello again there! This week, Zed A. Shaw, the author of Learn python the Hard Way , wrote a blog post that sparked quite a conversation . He urges that anyone who is learning to code, should avoid...

View Article


A look into functools implementation from CPython

As someone who's still relatively new to python, I'm on a quest to get a better understanding of the language and it's tools. As part of that, I decided to take a look under the hood at how some of...

View Article

Image may be NSFW.
Clik here to view.

008 -Pure, Functional, Financial Python Katas

The previous kata explained that there are very few mathematical concepts used in finance. This series of katas has so far only used one concept in python, which is the lambda. Unfortunately while...

View Article


Image may be NSFW.
Clik here to view.

Python Must for Network Engineer

Automation is need of Time.We as network engineers have to go with automation to simplify major chunk of the work done by us.We can not escape from automation.I will be having series of python posts...

View Article

Getting started with pytest

Pytest is my preferred python testing library. It makes simple tests incredibly easy to write, and is full of advanced features (and tons of plugins) that help with more advanced testingscenarios. To...

View Article

Image may be NSFW.
Clik here to view.

Django, fast: part 2

Django, fast: part2 Inpart 1 I went through some of the best practices in making sure your application runs as smoothly as possible. This time I’ll make some practical use of that knowledge. It’s very...

View Article
Browsing all 9596 articles
Browse latest View live