Quantcast
Browsing all 9596 articles
Browse latest View live

Handling Django choices and migrations

If you are using Django's choices option on a model field, you have probably come across the situation where adding / updating a choice generates a new migration. If you are using choices liberally...

View Article


Image may be NSFW.
Clik here to view.

Python入门(一):爬虫基本结构&简单实例

python入门(一):爬虫基本结构&简单实例 一点号中国统计网4小时前 php?url=0Fen3OITR0" alt="Python入门(一):爬虫基本结构&简单实例"...

View Article


Image may be NSFW.
Clik here to view.

Using Scripting Languages in IoT: Challenges and Approaches

Scripting languages (aka Very High-Level Languages or VHLLs), such as python, php, and javascript are commonly used in desktop, server, and web development. And, their powerful built-in functionality...

View Article

Image may be NSFW.
Clik here to view.

10 Resources to Get Started Learning Python

Last month I discussed why you should learn the python programming language . Today I’m going to show you how to learn Python using ten of my favorite resources. This list includes courses, books...

View Article

Image may be NSFW.
Clik here to view.

Traits and TraitsUI: Reactive User Interfaces for Rapid Application...

The Enthought Tool Suite team is pleased to announce the release of Traits 4.6 . Together with the release of TraitsUI 5.1 last year, these core packages of Enthought’s open-source rapid application...

View Article


Image may be NSFW.
Clik here to view.

使用Python中的tkinter模块作图的方法

python简述:Python是一种解释型、面向对象、动态数据类型的高级程序设计语言。自从20世纪90年代初Python语言诞生至今,它逐渐被广泛应用于处理系统管理任务和Web编程。Python[1]已经成为最受欢迎的程序设计语言之一。2011年1月,它被TIOBE编程语言排行榜评为2010年度语言。自从2004年以后,python的使用率是呈线性增长。tkinter模块介绍tkinter模块(“T...

View Article

Image may be NSFW.
Clik here to view.

Scrapy-redis爬虫分布式爬取的分析和实现

ScrapyScrapy是一个比较好用的python爬虫框架,你只需要编写几个组件就可以实现网页数据的爬取。但是当我们要爬取的页面非常多的时候,单个主机的处理能力就不能满足我们的需求了(无论是处理速度还是网络请求的并发数),这时候分布式爬虫的优势就显现出来。而Scrapy-Redis则是一个基于Redis的Scrapy分布式组件。它利用Redis对用于爬取的请求(Requests)进行存储和调度(S...

View Article

详解python中字典的循环遍历的两种方式

开发中经常会用到对于字典、列表等数据的循环遍历,但是python中对于字典的遍历对于很多初学者来讲非常陌生,今天就来讲一下python中字典的循环遍历的两种方式。注意: python2和python3中,下面两种方法都是通用的。1. 只对键的遍历一个简单的for语句就能循环字典的所有键,就像处理序列一样:d = {'name1' : 'pythontab', 'name2' : '.',...

View Article


python3使用PyMysql连接mysql数据库实例

python语言的3.x完全不向前兼容,导致我们在python2.x中可以正常使用的库,到了python3就用不了了.比如说mysqldb目前MySQLdb并不支持python3.x , Python3.x连接MySQL的方案有:oursql, PyMySQL, myconnpy...

View Article


Python处理文本文件中控制字符的方法

控制字符控制字符(Control...

View Article

关于numpy中np.nonzero()函数用法的详解

np.nonzero函数是numpy中用于得到数组array中非零元素的位置(数组索引)的函数。一般来说,通过help(np.nonzero)能够查看到该函数的解析与例程。但是,由于例程为英文缩写,阅读起来还是很费劲,因此,本文将其英文解释翻译成中文,便于理解。解释nonzero(a)...

View Article

Python脚本实现自动将数据库备份到 Dropbox

最近,正好发生了一件大事,就是 GitLab 的运维同学不小心删除了生产的数据,虽然 GitLab 已经骇人听闻的准备了五种备份机制,但是,仍然导致他们丢失了将近 6 个小时的用户数据,尤其对他们声誉的损失,是根本无法估量的。反思一下,这个博客 Becomin'...

View Article

Image may be NSFW.
Clik here to view.

一张图带我们入门Python基础教程

啄木鸟社区上原始翻译后绘制的,最早这个图是出现在(链接已失效)“这个图太棒了,有编程基础的人一下子就了解 python 的用法了。真正的 30 分钟上手。”Buzz by http://www.google.com/profiles/lanphaday#buzz 赖勇浩http://bit.ly/b1JO1SPython脚本直解!...

View Article


Image may be NSFW.
Clik here to view.

PyCharm 2017.1 EAP 7 (build 171.3224.4)

This week, we’re releasing the 7th build in our Early Access Program (EAP) for PyCharm 2017.1! Get it now from our EAP page New Features SSH Multi-Factor Authentication using Google Authenticator is...

View Article

Image may be NSFW.
Clik here to view.

Learning AI if You Suck at Math ― P4 ― Tensors Illustrated (with Cats!)

Welcome to part four of Learning AI if You Suck at Math. If you missed parts1,2 or3, be sure to check them out. Maybe you’ve downloaded TensorFlow and you’re ready to get started with some deep...

View Article


Image may be NSFW.
Clik here to view.

PyCharm 2017.1 EAP 7 发布,Python IDE

今天我们将为PyCharm 2017.1发布我们的第二个EAP。PyCharm 是一种 python IDE,带有一整套可以帮助用户在使用 Python 语言开发时提高其效率的工具,比如调试、语法高亮、Project 管理、代码跳转、智能提示、自动完成、单元测试、版本控制。此外,该 IDE 提供了一些高级功能,以用于支持 Django 框架下的专业 Web 开发。 新特性: SSH...

View Article

Image may be NSFW.
Clik here to view.

[译] 如何使用深度学习框架查找女Q*资源?

选自xolmon 机器之心编译 参与:Hitomi 情人节过了,单身狗也想飙一把车。在这篇技术博客(资源的真义)中,日本开发者使用深度学习框架实现了根据图片检索 AV 女优的功能。 开发环境: PC: MacBook Air CPU: 1.4 GHz Intel Core i5 内存: 4GB 普通的 MacBook Air 就可以实现这一程序,但是学习速度缓慢,由内存不足导致的各种 Crash...

View Article


《Python 数据结构》中文版

介绍 problem-solving-with-algorithms-and-data-structure-using-python 中文版 目的 数据结构作为计算机从业人员的必备基础,Java, c 之类的语言有很多这方面的书籍,Python 相对较少, 其中比较著名的一本...

View Article

Image may be NSFW.
Clik here to view.

Python 风格指南笔记

函数与方法装饰器 优点:优雅的在函数上指定一些转换,该转换可能减少一些重复代码,保持已有函数不变(enforce invariants) 缺点:装饰器可以在函数的参数或返回值上执行任何操作,这可能导致让人惊异的隐藏行为。而且,装饰器在导入时执行。从装饰器代码的失败中恢复更加不可能。 结论:如果好处很显然,就明智而谨慎的使用装饰器。装饰器应该遵守和函数一样的导入和命名规则。装饰器的 python...

View Article

Flask - cookie and token sessions simultaneously

Dealing with sessions in Flask applications is rather simple! There is plenty of choice in pre-rolled implementations that is more or less plug-and-play. However, sometimes you may want (or need) to...

View Article
Browsing all 9596 articles
Browse latest View live