PyCon 2016
python in Stumptown I just arrived home from PyCon 2016 . It was a fantastic experience, on parwith the year before. I didn't go alone this time: I brought four of my great co-workers and also ran into...
View ArticlePython 学习笔记 - Memcached
Memcached是一个分布式内存对象缓存系统,他把数据缓存在内存里面来减少对数据库的访问,从而提高动态网页的访问速度。他的基本结构是key/value(键值对)。 首先来安装一下服务器端: [root@sydnagios ~]# yum install memcached Loaded plugins: fastestmirror, langpacks Repodata is over 2...
View ArticleData Mining Coursera for Popular Courses with Python
In a few years, massive open online courses, most commonly referred to as MOOCs, have exploded in popularity. These online courses provide high quality content taught by the best professors in their...
View ArticleUDF to Return a Tuple of Bags in Apache Pig
Typically an user-defined function (UDF) is a scalar function i.e. it returns a single value, and quite often you need to call many UDFs to get different calculations on the same input data. In some...
View Articledjango 1.10 中信号的使用
使用信号功能初衷是为了不重写save(),delete()功能,保持models的干净。 使用信号前,重写了save()和delete()功能 models.py模块里的内容 class owgameserver(models.Model):serverid = models.IntegerField(u"游戏服ID号",primary_key=True)serverhost =...
View ArticleDjango under the hood: custom database backends - Michael Manfre
(One ofmy summaries of a talk at the 2016 django under the hood conference). Tip: watch django in depth by James Bennett. The database backend is right there at the bottom of the lowest level. What...
View ArticleBuilding Dashboards with Django and D3
My workplace recently collaborated with several police departments to build a dashboard showing 911 (also known as Call for Service) data, allowing users to drill down into that data. When I started...
View ArticlePython内置函数(37)――len
英文文档: len ( s ) Return the length (the number of items) of an object. The argument may be a sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or...
View ArticleDjango under the hood: funding open source, the hard way - Nadia Eghbal
(One ofmy summaries of a talk at the 2016 django under the hood conference). You don’t do open source for the money. Django’s projected revenue (the DSF) is 200.000. Instagram’s is 3.200.000.000.......
View ArticlePyCon PL 2016: Personal Impression
Three weeks ago, I together with two other TEONITE developers took part in PyCon PL 2016 , a Polish conference obviously dedicated to everything python-related. Today, three weeks after the...
View ArticleWhite screen problem with Kivy on Raspberry Pi 3 solved
I have developed an application in python which uses the Kivy framework to implement the user interface. When I tried my application on my Raspberry Pi 3 the result wasn’t what I expected. The screen...
View ArticleDjango's models, views and templates
Django loosely follows the MVC design pattern. That stands for Model-View-Controller. Model is the database handling layer defined in models.py, View is the display layer (html files), that is defined...
View ArticlePython标准模块--threading
python标准模块--threading 56分钟前来源:cnblogs threading模块在Python1.5.2中首次引入,是低级thread模块的一个增强版。threading模块让线程使用起来更加容易,允许程序同一时间运行多个操作。...
View ArticleAsynchronous HTTP Requests in Python 3.5+
So you’ve heard that python now supports that fancy async/await syntax. You want to play with it, but asyncio seems intimidating . Well, someone wrote a simpler alternative to asyncio. It’s called...
View ArticleSimple Email Service (SES) Sample Application
I could not find a simple example to send email using SES in python. Turns out it is really easy. If you have a MIME formatted message you can simply call send_raw_message . client =...
View ArticlePython内置函数(51)――property
英文文档: class property ( fget=None , fset=None , fdel=None , doc=None ) Return a property attribute. fget is a function for getting an attribute value. fset is a function for setting an attribute value....
View Article【技术分享】利用Python代码实现Web应用的注入
翻译: WisFree 预估稿费:200RMB(不服你也来投稿啊!) 投稿方式:发送邮件至linwei#360.cn,或登陆 网页版 在线投稿 漏洞概述 如果你的Web应用中存在python代码注入漏洞的话,攻击者就可以利用你的Web应用来向你后台服务器的Python解析器发送恶意Python代码了。...
View ArticleImport module in Python
Import in python is similar to #include header_file in C/C++. Python modules can get access to code from another module by importing the file/function using import. The import statement is the most...
View ArticleHow to Implement Bagging From Scratch With Python
Decision trees are a simple and powerful predictive modeling technique, but they suffer from high-variance. This means that trees can get very different results given different training data. A...
View Article