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

Image may be NSFW.
Clik here to view.

给Python初学者:如何用Django 写一个编程派

给python初学者:如何用Django 写一个编程派 一点号编程派36分钟前 php?url=0ETNv0n9eg" alt="给Python初学者:如何用Django 写一个编程派" />首先需要说明一下,这篇教程是写给初学者的,这里不会有高深的概念、大段难懂的代码,这篇教程的目标是让你读懂每一句话,明白关键步骤背后的核心原理。接下来,我会带着你理解 Django 最核心的 MTV...

View Article


Image may be NSFW.
Clik here to view.

PyCharm: Meet the PyCharm Team at PyCon 2016

May 28th June 5th, the JetBrains PyCharm Team will be in Portland, Oregon for PyCon 2016 . As usual, we sponsor the event and will have a JetBrains PyCharm booth in the Expo Hall during the main...

View Article


AWS S3 setup with Django-storages and Boto

We use many technologies on the Web & backend team here at Raizlabs. Like most projects that involve a user-facing website, we have static files and assets that get served with the page. In cases...

View Article

Bisect Algorithm Functions in Python

python in its definition provides the bisect algorithms using the module “ bisect ” which allows to keep the list in sorted order after insertion of each element . This is essential as this reduces...

View Article

Image may be NSFW.
Clik here to view.

My experience rewriting Enjarify in Rust

Last year I decided to rewrite Enjarify (a command line python application) in Go and take notes in order to get data comparing the languages. Obviously, with a rewrite of an existing project, the...

View Article


Image may be NSFW.
Clik here to view.

Organizing Analyses: Frameworks for managing data, code, and results

Summary: Keep analyses organized with a directory that supports exploratory and production results (scripts, visualizations, and models) and keep data immutable. Use a tool like CookieCutter Data...

View Article

Image may be NSFW.
Clik here to view.

Hands-on: Python 3.6’s speed boost matters

With the first beta release of python 3.6out in the wild, most of the discussion has been about additions like a new string-literal format or the "secrets" module for cryptographically secure tokens....

View Article

Backward incompatible change in handling permalinks with Reeborg coming soon

About two years ago, I implemented a permalink scheme which was intended to facilitate sharing various programming tasks in Reeborg's World. As I added new capabilities, the number of possible items...

View Article


Image may be NSFW.
Clik here to view.

Python微信库:itchat

在论坛上看到了用python登录微信并实现自动签到,才了解到一个新的Python库: itchat 库文档说明链接在这: itchat 我存个档在我网站(主要是我打开很慢),以便以后阅读。 0x01 Start 最简单的回复 通过如下代码,可以完成回复所有文本信息(包括群聊)。 import itchat from itchat.content import TEXT...

View Article


Python 插入排序

插入排序总结: 当前需要排序的元素(array[i]),跟已经排序好的最后一个元素比较(array[i-1]),如果满足条件继续执行后面的程序,否则循环到下一个要排序的元素。 缓存当前要排序的元素的值,以便找到正确的位置进行插入。 排序的元素跟已经排序号的元素比较,比它大的向后移动(升序)。 要排序的元素,插入到正确的位置。 示例代码: array = [3, 4, 1, 6, 2, 9, 7,...

View Article

Image may be NSFW.
Clik here to view.

Use Python and Unity to get your app up and running

With Apple and Samsung releasing game-changing phones this year, it's clear that both the Android and iOS app stores will be seeing a lot of action. If you have an app or game idea floating around,...

View Article

Predict where you are indoors

I just wanted to give a shoutout to a project I think is very awesome: https://github.com/schollz/find “High-precision indoor positioning framework for most wifi-enabled devices.” It used to be in...

View Article

Image may be NSFW.
Clik here to view.

ReSpeaker First Impressions + Simple Offline Voice Recognition

I had the opportunity to get a free ReSpeaker core during theirKickstarter in exchange for an honest review―an offer I couldn’t pass up. You can think of a ReSpeaker as something like an Amazon Echo ,...

View Article


Image may be NSFW.
Clik here to view.

python数据结构之链表(一)

数据结构是计算机科学必须掌握的一门学问,之前很多的教材都是用C语言实现链表,因为c有指针,可以很方便的控制内存,很方便就实现链表,其他的语言,则没那么方便,有很多都是用模拟链表,不过这次,我不是用模拟链表来实现,因为python是动态语言,可以直接把对象赋值给新的变量。...

View Article

PyDev of the Week: Benedikt Eggers

This week we welcome Benedikt Eggers ( @be_eggers ) as our PyDev of the Week. Benedikt is one of the core developers working on the Ironpython project. IronPython is the version of Python that is...

View Article


理解Python中的元类

元类 (metaclass) 是创建类的类,类是元类的实例,只有 type 及其派生类才可能充当元类。正如我们要先创建一个类,然后才能创建实例,我们先要创建元类,然后才能创建类。 好吧上面这段话确实很绕,下面我们一步一步来看 首先在 python 中类也是一个对象 class A(object): pass 由于类也是一种对象(类可以称为类型对象),所以它们也是通过什么东西来生成的。 In [3]:...

View Article

Image may be NSFW.
Clik here to view.

PyCharm: PyCharm 2016.2 EAP is Open

Today we’re excited to announce that the first PyCharm 2016.2 Early Access Preview (EAP) build 162.646 is finally available for download! Head on over to the PyCharm Early Access Preview (EAP) page...

View Article


Dask EC2 Startup Script

This work is supported by Continuum Analytics and the XDATA Program as part of the Blaze Project A screencast version of this post is available here: https://youtu.be/KGlhU9kSfVk Summary Copy-pasting...

View Article

HOW-TO Publish a Pyton Package on PyPi

Create a setup.py file The arguments for setup() are documented here and are non-trivial: a good example is my filecrypt ‘s setup.py file. NOTE Do not confuse setuptools with distutils this is the...

View Article

网络异步请求之gevent

我们知道对于网络请求这种IO bound的场景来说,最怕的就是某个请求阻塞了其余的操作,让并发性大大降低。今天就来介绍一款python下的并发库- gevent 。 首先看一下他自己的介绍: gevent是一个基于libev的并发库。它为各种并发和网络相关的任务提供了整洁的API。 嗯,确实很简洁,很易使用。待会我们就见识到了。 同步IO 首先我们来看看传统的IO请求。 比如我们请求:...

View Article
Browsing all 9596 articles
Browse latest View live