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

Image may be NSFW.
Clik here to view.

Become a Professional Python Programmer for just $11.70 via Neowin Deals

Today's highlighted deal comes from ourOnline Courses section, where you can save 78% off the Become a Professional python Programmer course bundle. Learn this easy-to-understand, extremely versatile...

View Article


Django的日志配置

Django对于日志输出的信息是很完善的,request的信息,setting配置,trackback的信息,一应俱全,足够我们调试了。但是在线上环境,如果让用户看到这些信息,是很不安全的(暴露代码)。所以在线上我们要关闭Debug,但是又不能扔掉这些调试信息,这就要用到logging模块。 logging模块其实是python的模块,在Django中有很多本地化的支持。 理解Logger...

View Article


Image may be NSFW.
Clik here to view.

Extreme IO performance with parallel Apache Parquet in Python

In this post, I show how Parquet can encode very large datasets in a small file footprint, and how we can achieve data throughput significantly exceeding disk IO bandwidth by exploiting parallelism...

View Article

Python and Lambdas

I come from a functional programming background, so I a lot of love for functions and so-called anonymous functions or lambdas. However, I have realised that I don't make use of python's lambda syntax...

View Article

Image may be NSFW.
Clik here to view.

Python Software Foundation: Discovering the Python Community in Zimbabwe at...

On the heels of attending a successful PyCon in Namibiain 2015, a small group of python enthusiasts in Harare, Zimbabwe vowed to organize the first-ever PyCon held in Zimbabwe. After months of...

View Article


Image may be NSFW.
Clik here to view.

Book Review: Murach’s Python Programming

I review books for the i-programmer website from time to time and they recently gave me a copy of Murach’s python Programming by Michael Urban and Joel Murach. This book is long at almost 600 pages...

View Article

Vasudev Ram: tp, a simple text pager in Python

By Vasudev Ram Yesterday I got this idea of writing a simple text file pager in python. Here it is, in file tp.py: ''' tp.py Purpose: A simple text pager. Version: 0.1 Platform: windows-only. Can be...

View Article

Python资源汇总

python资源汇总 基础知识 Python学习笔记 Python Docs Python 3.5.0 documentation Python标准库中文版.pdf 实用代码 简易Web服务 终端输入: python -m http.server 8000 浏览器打开 localhost:8000 即可当FTP使用 获取脚本所在的目录 # 确切地说,__file__是模块所在的文件 #...

View Article


Image may be NSFW.
Clik here to view.

Using Airflow to manage your DevOps ETLs

In this article we will be describing the use Apache’s Airflow project to manage ETL ( Extract, Transform, Load ) processes in a Business Intelligence Analytics environment. First we will describe the...

View Article


Image may be NSFW.
Clik here to view.

【源码】如何用python轻松破解wifi密码

【源码】如何用python轻松破解wifi密码 一点号电子物证昨天 python2.7 凑合的linux 差不多的无线网卡 pywifi模块 弱口令字典 清除系统中的任何wifi连接记录(非常重要!!!) 首先,这个模块在win下有点鸡肋,作者在调用WLANAPI时没有做好WLAN_SECURITY_ATTRIBUTES的封装,所以推荐在linux下跑,我测试所使用的是Kali 2.0...

View Article

Image may be NSFW.
Clik here to view.

Jaime Buelta: $7.11 in four prices and the Decimal type, revisited

I happen to take a look tothis old post in this blog. The post is7 years old, but still presents an interesting problem. “A mathematician purchased four items in a grocery store. He noticed that when...

View Article

Django Unit Test cases with Forms and Views

Test Cases For Forms, Views In this post, we’ll see a brief introduction how to write a unit test cases for any project involved. Having tests for any project will helps you to structure good code,...

View Article

Coercing Objects to Integer, Revisited

Summary I recently wrote a blog post that involved exception handling , and gave short shrift to the part of exception handling I didn’t want to talk about in order to focus on the part I did want to...

View Article


用python写网络爬虫2--数据抓取

让爬虫从每一个下载的网页中抽取一些数据,然后实现一些应用,称为抓取 三种抓取网页的方法 1、正则表达式 通过查看网页源码,使用浏览器工具查看网页的结构,编写相应的正则表达式 例如下面的网页:http://example.webscraping.com/view/United-Kingdom-239 想抓取出国家的面积,代码如下: import urllib2import redef...

View Article

Python-解决Cx_Oracle查询时UnicodeDecodeError的问题

近期在项目中,要对1张100多万条记录的表进行查询,然后进行一些数据的统计,但是在这个过程中,发现只查询出来几条数据就出现了UnicodeDecodeError了。 在这里,我们使用sqlalchemy库进行查询,其内部还是Cx_Oracle来进行对应的操作,使用的python版本为3.5.0,宿主系统为windows 2008 Server,然后进行类似如下的操作: from sqlalchemy...

View Article


Easy to understand intro to Python

Build applications in python the anti-textbook Source Read online Watch Download Code Donate On Github Free on Gitbooks The YouTube series Gitbooks On Github Why donate? The tutorial is available for...

View Article

An Introduction to Regex in Python

Related Course Get Started with javascript for Web Development JavaScript is the language on fire. Build an app for any platform you want including website, server, mobile, and desktop. Code A regular...

View Article


Django - migrating from function based views to class based views

The single most significant advantage in Django class-based views is inheritance. On a large project, it's likely that we will have lots of similar views. Instead of writing the repeated code we can...

View Article

Set Up Travis CI For Django project

Travis CI is a continuous integration service used to build and test applications hosted on GitHub. Travis CI supports integration with other tools such as coverage analyzers. Why use Travis? Travis CI...

View Article

Deploying Your Django app on Heroku

Heroku is a cloud application platform it's a new way of building and deploying web apps, Which makes easy to host your application in the cloud with a simple git push command. Heroku supports several...

View Article
Browsing all 9596 articles
Browse latest View live