New Leadership for IronPython
Leadership of the community run Ironpython project has been passed to Alex Earl and Benedikt Eggers. Jeff Hardy, the previous leader, has been running the project since Microsoft ceased active...
View ArticleAndrew Dalke: Reading ASCII file in Python3.5 is 2-3x faster as bytes than...
[previous | next ] /home/ writings / diary / archive / 2016 / 08 /03/bytes_and_unicode_read_performance Reading ASCII file in python3.5 is 2-3x faster as bytes than string I'm porting chemfp from...
View ArticleDataJoy
我有个习惯:Google Drive里有个名为“blog”的文件夹。一旦有题材可以写成博客,我就甩进去个文件,以题材为文件名,闲时再细写。 去年夏天,我收到一封来自 ShareLaTeX.com 的邮件。这是个LaTeX在线排版和协作的网站,我以前注册过。来信里说,他们新开发了名为 DataJoy 的项目,是个在线的python和R编辑器。跟ShareLaTeX类似,只要访问 DataJoy.com...
View ArticlePython 3 Concurrency The concurrent.futures Module
The concurrent.futures module was added in python 3.2. According to the Python documentation it provides the developer with a high-level interface for asynchronously executing callables. Basically...
View Article[原]算法研究:利用Python解决数学计数原理问题
最近数学修行到“计数原理”部分,前几天做作业时遇到这样一道数学题: 用四种不同颜色给三棱柱六个顶点涂色,要求每个点涂一种颜色,且每条棱的两个端点涂不同颜色,则不同的涂色方法有多少种? 当我看完题目后,顿时不知所措。于是我拿起草稿纸在一旁漫无目的地演算了一下,企图能找到解决方法。结果一无所获。今天终于等到放假了,于是打算通过程序算法解决这个问题。经过2个多小时的研究,终于完成了代码,并求得了答案。...
View ArticleWhy Django?
With the release of our firstDjango course, Try Django, this month, you may be wondering if Django is for you. Django is a python framework that allows you to get a fully functioning web app up and...
View ArticleDon't be snobbish about WordPress (A Python/Django perspective)
Probably more than any other software in the world, WordPress has done a magnificent job making web content management not just available, but easy and effective too,for a huge number of people. The...
View ArticlePython 中的「全局变量」的小细节
前几天被同学问了一个问题,为什么自己修改修改了全局变量但是没有生效,例子如下 # File: foo.py l = 10 defbar(): globall l = 20 #----------------------------- # File: main.py fromfooimportl, bar if__name__ =='__main__': printl bar() printl 输出:...
View ArticleText Generation With LSTM Recurrent Neural Networks in Python with Keras
Recurrent neural networks can also be used as generative models. This means that in addition to being used for predictive models (making predictions) they can learn the sequences of a problem and then...
View Article‘Got multiple values for argument’ error with keyword arguments in Python...
This is a quick post to brief describe a problem I ran into the other day when trying to debug someone’s code the answer may be entirely obvious to you, but it took me a while to work out, so I thought...
View Articlepython网络爬虫3 使用BeautifulSoup解析网页
在第一节演示过如何使用正则表达式截取网页内容。不过html是比正则表达式更高一级的语言,仅仅使用正则表达式来获取内容还是有些困难的。 这次会使用一个新的工具:python的BeautifulSoup库,BeautifulSoup是用来从HTML或XML文件中提取数据的工具。 BeautifulSoup需要先安装才能使用。关于BeautifulSoup安装和使用可以参考这份文档:...
View ArticleThe Twisted Desktop
It’s been a little while since we’ve seen JonRedcorn2 's customized desktops, but this one was so striking we couldn’t look away―and we had to feature it. Here’s how to get the same look for your...
View ArticleJava,Python和C依然是主流开发语言
Java,python和C依然是主流开发语言 一点号CSDN2小时前 很多开发者热衷于新兴的编程语言,例如Swift,Rust和Scala等。但是他们的雇主依然倾向于使用比较成熟的语言,例如Java。Python变得越来越流行,很多项目开始使用这种编程语言。...
View ArticleLinux发行版活学活用 : 使用Pyenv拯救Ubuntu混乱的Python版本
Ubuntu本身是带有两个python版本的,因此容易出现不少令人头疼的问题。 pip问题 例如,使用 pip 进行软件包安装的时候,如果存在缓存,可能导致 pip2 和 pip3 的缓存混用,导致出现无法安装的问题。 此外,如果使用 virtualenv 来建立独立的 Python 环境,对于新手而言也是及其不友好,需要较为长的命令指定一个 Python 版本,非常不便。 软链接修改 如果喜欢...
View ArticleDaemon is not daemon, but what is it?
"daemon thread" 是一个困扰了我很久的概念。 官方文档 是这么说的: A thread can be flagged as a “daemon thread”. The significance of this flag is that the entire python program exits when only daemon threads are left....
View ArticleNotes: Python and Packet Headers
Some notes taken from Vivek Ramachandran’s course on Penetration Testing with python Network Packets Packets are layered in encapsulated data like so: > Ethernet > IP > TCP > Application...
View Article使用Python进行科学计算:NumPy入门
使用python进行科学计算:NumPy入门 一点号编程派9小时前 本文由Python 翻译组最新翻译出品,原作者为Jamal Moir,译者为cystone,并由编程派作者EarlGrey校对。这是使用 Python 进行科学计算的系列文章,上一篇可点此查看:Matplotlib 快速入门。 译者简介:cystone, 成都信息工程大学,计算机学院学生。擅长领域:图像处理,机器学习。 你可以用...
View ArticleBuilding an Excel file dump service in Django
Namaste Everyone. I recently wrote an excel dump service as part of my work and wants to share that experience with you. Initially, I irritated a lot because creating excel in python is fairly easy...
View ArticleGSoC Week 12
This week my main work was on Featherstone’s articulated body algorithm. I started by prototyping what I thought his algorith might look like in python code (the algorithm was pulled from chapter 7 of...
View ArticleCalendar Functions in Python | Set 2(monthrange(), prcal(), weekday()…)
Some of calendar functions are discussed in the Set 1 1. monthrange(year, month):- This function returns two integers, first, the starting day number of week(0 as monday) , second, the number of days...
View Article