Quantcast
Browsing all 9596 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Import Python: Using Spectrum - Standalone Logging Server with Python. Review

import python blog Using Spectrum - Standalone Logging Server with Python. Review Posted on July 7, 2016 Debugging, Logging and Software Development “ If debugging is the process of removing software...

View Article


Image may be NSFW.
Clik here to view.

Bluemix: Where Python and Watson are in a Dialog

Right now I am working on a side project to hook up the Watson Dialog Service on Bluemix with dashDB and DB2. The idea is to dynamically feed data from DB2 into a conversation bot. To register and...

View Article


uTidylib 0.3

Several years ago I'vecomplained about uTidylib not being maintained upstream. Since that time I've occasionally pushed some fixes to my GitHub repository with uTidylib code , but without any clear...

View Article

Image may be NSFW.
Clik here to view.

Best practices for logging computational systems in R and Python

As is the case with most quant software, it’s a bit different from run-of-the-mill software. The somewhat prosaic world of logging is one such place where there are some differences. What’s different...

View Article

Python 3 Testing: An Intro to unittest

The unittest module is actually a testing framework that was originally inspired by JUnit. It currently supports test automation, the sharing of setup and shutdown code, aggregating tests into...

View Article


Israel Fruchter: KISS - Keep it shorter short

Today on work on a python related mailing list someone sent this snippet of code he didn’t wrote. and that was causing some of the server he worte/manged some troubles. Here’s the code: def...

View Article

OctBlog: Yet another blog system powered by Flask and MongoDB

About OctBlog OctBlog is almost the same withMayBlog except that it is powered by Flask and MongoDB rather than Django and SQL Databases. And as my customary, I named it OctBlog as OctBlog was started...

View Article

Contributing to the world of snaps

Zygmunt Krynicki wrote about the availability of bite-sized bugs for the snapd project. I took this as an opportunity to go through the snapcraft bugs as well and tag a few as bitesize myself....

View Article


Image may be NSFW.
Clik here to view.

电影里的代码之《机械姬》:python筛法求质数

今天看了《机械姬》,探讨人工智能话题的电影,豆瓣评分7.5,还是蛮不错的一部电影。影片1:09:29处出现了一段python代码,细看了一下,发现是筛法求质数的python代码,写得非常简练的。先贴个电影的截图: 影片里的代码略微有点模糊,我重新打一遍,是下面这个样子的 代码的最后打印出来下面这个很奇怪的东西,目测是一本书的ISBN,上豆瓣查了一下,是Embodiment and the Inner...

View Article


Image may be NSFW.
Clik here to view.

How to build and deploy a simple Facebook Messenger bot with Python and Flask

How to build and deploy a Facebook Messenger bot with python and Flask, a tutorial 02 Jun 2016 This is my log of how I built a simple Facebook Messenger bot. The functionality is really simple, it’s an...

View Article

[Python]更加Pythonic的多个List合并和Python的安利

原题:https://segmentfault.com/q/1010000005904259 问题: 倘若存在 L=[ [1,2,3],[4,5,6],[7,8,9]] 这样的列表,如何把合并成[1,2,3,4,5,6,7,8,9]呢? 最直接的方法(By:松林) ret = []for x in L: ret += xprint(x) 使用标准库中的itertools模块(By:dokelung)...

View Article

Image may be NSFW.
Clik here to view.

Python验证码识别--利用pytesser识别简单图形验证码

一、探讨 识别图形验证码可以说是做爬虫的必修课,涉及到计算机图形学,机器学习,机器视觉,人工智能等等高深领域…… 简单地说,计算机图形学的主要研究内容就是研究如何在计算机中表示图形、以及利用计算机进行图形的计算、处理和显示的相关原理与算法。图形通常由点、线、面、体等几何元素和灰度、色彩、线型、线宽等非几何属性组成。计算机涉及到的几何图形处理一般有...

View Article

Image may be NSFW.
Clik here to view.

Release of IPython 5.0

Ipython 5.0-LTS is out! We are pleased to announce the release of IPython 5.0 LTS (or Long Term Support). IPython is the Python kernel for Jupyter and the interactive Python shell; it provides a rich...

View Article


Image may be NSFW.
Clik here to view.

Debugging in Python (using PyCharm) Part 3

This post is part 3 of a multi-part series of postsintended to provide discussion of some basic debugging tools that I have found to be helpful in developing a pure python simulation model using a...

View Article

Defconflicting Swift-Proxy with FreeIPA

Port 8080 is a popular port. Tomcat uses it as the default port for unencrypted traffic. FreeIA, installs Dogtag which runs in Tomcat. Swift proxy also chose that port number for its traffic. This...

View Article


Image may be NSFW.
Clik here to view.

从源码编译 Python

尝试通过源码自己编译 python,使用的系统是 Ubuntu14.04 LTS。 首先去官网下载源码,地址: 源码下载 。下载完成之后,解压源码: tar -zxvf Python-2.7.12.tgz 可以看到目录结构如下: . ├── aclocal.m4 ├── config.guess ├── config.sub ├── configure ├── configure.ac ├──...

View Article

Image may be NSFW.
Clik here to view.

通过 Docker 在几分钟内将 IPython Notebook 部署在 Bluemix 上

IBM Bluemix 上的 Docker 容器服务是 IBM Containers 。该服务目前处于测试阶段,我很幸运能够访问它。您可以在上面给出的 Bluemix 主页上注册参加测试。 创建 Docker 容器 要使用此服务,必须先将 IBM Containers Extension (ice) 安装在我们本地的 Docker...

View Article


简单掌握Python中glob模块查找文件路径的用法

glob使用UNIX...

View Article

Python的shutil模块中文件的复制操作函数详解

copy()chutil.copy(source, destination)shutil.copy() 函数实现文件复制功能,将 source 文件复制到 destination 文件夹中,两个参数都是字符串格式。如果 destination 是一个文件名称,那么它会被用来当作复制后的文件名称,即等于 复制 + 重命名。举例如下: >> import shutil >>...

View Article

Image may be NSFW.
Clik here to view.

Python模拟登陆淘宝并统计淘宝消费情况的代码实例分享

支付宝十年账单上的数字有点吓人,但它统计的项目太多,只是想看看到底单纯在淘宝上支出了多少,于是写了段脚本,统计任意时间段淘宝订单的消费情况,看那结果其实在淘宝上我还是相当节约的说。脚本的主要工作是模拟了浏览器登录,解析“已买到的宝贝”页面以获得指定的订单及宝贝信息。使用方法见代码或执行命令加参数-h,另外需要BeautifulSoup4支持,BeautifulSoup的官方项目列表页:https:/...

View Article
Browsing all 9596 articles
Browse latest View live