[英] 关于面向对象编程语言的对象模型
Carl Friedrich Bolz is a researcher at King's College London and is broadly interested in the implementation and optimization of all kinds of dynamic languages. He is one of the core authors of...
View ArticleDjango的ORM使用记录
=Start= 缘由: 因为团队里现在都在用Django作为Web开发框架(Flask虽然简单、轻量,但并不适合团队协作开发),所以最近我的主要任务之一就是把之前用Flask写的Web应用往Django上迁移,虽然之前用过一段时间的Django,但并不熟悉,这次就想着在迁移的过程中记录一下大体过程,加深印象,也为方便以后参考。 正文: 0.使用mysql数据库...
View ArticlePython import hook
之前写了个私有包叫ituandui,通过pip安装到了本地,然后我试图更改源码,写个单元测试,如下组织结构 [ituandui] tree . ├── __init__.py ├── sstr.py ├── test │ ├── __init__.py │ └── test_sstr.py └── valid.py 在test_sstr.py中写单元测试时, import ituandui...
View ArticleDjango的ORM使用记录_2
=Start= 缘由: 在使用的过程中记录一下Django的ORM知识/技巧,一来可以加深印象,同时也为方便以后参考。 正文: 1.Django中的比较操作 exact iexact contains icontains in gt gte lt lte startswith istartswith endswith iendswith range year month day week_day...
View ArticlePython: 为图片添加水印
添加水印的主要目的是为了版权保护,使自己的图像不被抄袭或者恶意转载。网上有很多制作水印的工具,本帖介绍怎么使用python-Pillow库给图片添加水印。 使用ImageMagick添加图片水印-linux 添加文本水印 在图片右下角添加文字: from PILimport Image, ImageDraw, ImageFont #...
View ArticleHow to Build your own Price Monitoring Tool
Computers are great at repetitive tasks. They don’t get distracted, bored, or tired. Automation is how you should be approaching tedious tasks that are absolutely essential to becoming a successful...
View ArticleUsing IPython on Lego EV3 Robots Running Ev3Dev
In part so I don’t lose the recipe, here are some notes for getting up and running with Ipython on a Lego EV3 brick. The command lines are prefixed to show whether we’re running them on the Mac or the...
View ArticleUser-defined Exceptions in Python with Examples
Prerequisite- This article is an extension to Exception Handling. python throws errors and exceptions, when there is a code gone wrong, which may cause program to stop abruptly. Python also provides...
View ArticleZed Shaw: The End of Coder Influence
I get an email from someone who tells me that Reddit has decided to remove my book from their list of suggested readings for python until I update the book to Python 3. They made this decision about...
View ArticleVasudev Ram: Processing DSV data (Delimiter-Separated Values) with Python
By Vasudev Ram I needed to process some DSV files recently. Here is a python program I wrote for it, with a few changes over the original. E.g. I do not show the processing of the data here; I only...
View ArticlePython3 大型网络爬虫实战 001 --- 搭建开发环境
我使用的电脑: windows 10 64位 前言 开发python爬虫有很多种方式,从程序的复杂程度的角度来说,可以分为:爬虫项目和爬虫文件。 相信有些朋友玩过Python的urllib模块,一般我们可以用该模块写一些爬虫文件,实现起来非常方便,但做大型项目的时候,会发现效率不是太好、并且程序的稳定性也不是太好。...
View Article一个日本人写的一段牛叉代码!
一个日本人写的一段牛叉代码! 一点号w3cschool昨天 一直都知道,印度IT行业非常发达。在硅谷,印度人当领导层的不在少数。那么你见过日本人写的代码吗?下面这段代码,据说很牛叉。 php?url=0F2pu0Jni1" alt="一个日本人写的一段牛叉代码!"...
View ArticleDjango Weekly 14th Issue
Worthy Read Metaprogramming and Django - Using Decorators The article starts of with an introduction snippet to decorators and then goes on to explore some real world examples in context of Django....
View ArticleThe Changelog 229: Python, Django, and Channels with Andrew Godwin
python, Django, and Channels with Andrew Godwin, creator of Django Channels Guests Play Subscribe Sponsor Django core contributor Andrew Godwin joins the show to tell us all about Python and Django. If...
View ArticleDownloading and reading in American Community Survey Data: Python and SPSS
I had a prior blog post on working with American Community Survey data in SPSS . The meta-data format has changed from that example though, and the Census gives out comma separated files and xls...
View ArticlePython Pip 解决问题: Error: Unable to Find vcvarsall.bat
当我给 python3.5 安装 第三方库 charset 时: pip install charset ,出现了错误: D:\WorkSpace\python_ws\python-large-web-crawler\firstdemo>pip install charset Collecting charset Downloading charset-1.0.1.tar.gz...
View ArticlePython实现数值计算----埃尔米特插值问题
当插值的要求涉及到对插值函数导数的要求时,普通插值问题就变为埃尔米特插值问题。拉格朗日插值和牛顿插值的要求较低,只需要插值函数的函数值在插值点与被插函数的值相等,以此来使得在其它非插值节点插值函数的值能接近被插函数。但是有时候要求会更高,不仅要插值函数与被插函数在插值节点函数值相等,而且要求它们的导数相等。...
View ArticleTop 22 Python Programming Books
The AI Optify data team writes about topics that we think modern software engineers will love. AI Optify has affiliate partnerships so we may get a share of the revenue from your purchase. Top python...
View ArticleFabio Zadrozny: Python Import the world Anti-pattern!
I've been recently beaten from that anti-pattern which seems to be way too common in python. Now, what exactly is that " import the world " anti-pattern? This anti-pattern (which I just made up) is...
View ArticlePyPI parser eases path to browsing Python package APIs
Read the Docs, a popular community-supported service for creating easy-to-navigate online documentation for software projects, has unveiled Pydoc , a new service that automatically generates API...
View Article