(March 2, 2011) Armin Rigo discusses the research he has done to implement Python in Python. The new project, titled PyPy, can increase the speed at which programs run, as well as reduce the total memory that they use. He hopes that it can help advance the field of computer science as we move deeper into the 21st century. Stanford University: http://www.stanford.edu/ School of Engineering: htt
Welcome!¶ Supporting Python 3 doesn’t have to be daunting. This book guides you through the process of adding Python 3 support, from choosing a strategy to solving your distribution issues. Using plenty of code examples, it guides you across the hurdles and shows you the new Python features. 2016-10-23: The first release of the community version!¶ After almost a year of delay, the community versio
前回は基調講演とカンファレンスの全体像について紹介しました。今回と次回ではPythonそのものの講演について紹介したいと思います。 今回はCPythonというC言語で実装されたPythonの講演(一般的にPythonというときはCPythonを指します)について紹介します。 CPython CPythonの講演で紹介するのは、すべてRaymond Hettinger氏が発表されたことについてです。Raymond氏の講演は、Pythonでコーディングする上でのテクニックや考え方など、どれも示唆に富む内容で筆者にとっては興味深かった内容でした。 Raymond Hettinger氏 ※ 特に注記がない場合、サンプルコードはPython 2.7.2で実行しています。 Advanced Python: 高度なPythonテクニック 「Advanced Python」というハンズオントレーニングでは
前回に続き、Pythonそのものの講演について紹介したいと思います。今回は、PyPyというPythonで実装されたPythonの講演を紹介します。 本カンファレンスに一緒に参加した池さん(@rokujyouhitoma)がPyPyというプロジェクトにとても興味をもたれたという話を受け、以下のPyPyの講演のレポートは池さんに執筆していただきました。 PyPy(執筆:池さん) PyPy IN PRODUCTION PyPyのセッションは、メインコミッター、設計者であるAntonio Cuni氏とArmin Rigo氏が講演されました。 Armin Rigo氏 大学にてプログラミング言語および言語実装を研究。PyPyプロジェクトのリーダー。CPythonのJITコンパイラであるPsycoの作者。Antonio Cuni氏らとPyPyに関する論文を共著。 Antonio Cuni氏 2006年よ
Python Mock Library Comparison¶ This is a side-by-side comparison of how to accomplish some basic tasks with popular Python mocking libraries and frameworks. The libraries are: mock flexmock mox Mocker Dingus fudge Some mocking tools are intentionally omitted: python-mock (last release in 2005) pmock (last release in 2004 and doesn’t import in modern Pythons). Other mocking frameworks are not yet
この間、会社で少し大きくなって、利用するツールが少し増えつつありますので、 ユーザー管理を統一するために、LDAPサーバーを使うようになりました。 思ったより面倒だったんですが、LDAPを使うと色なサービスで同じ ユーザー名とパスワードが使えるので便利です。今のところ、 Redmine サーバー、 Wiki、社内ライブラリのリポジトリーサーバー などに使っています。 ただし、LDAPは同じユーザー名とパスワードが使えますが、ユーザーが 自分でパスワードを変更させるには何か用意しないといけません。 というわけで、Flask のLDAPパスワード変更アプリを作ってみた。 Flask は Python で当然ながら、WSGI に普通に対応していますので、 かなり便利です。 さって、どうやるのか。 Python プロジェクトなので、当然ながら、 virtualenv を使います。仮想環境に Fla
Pythonでコマンドツールを作ってて、パイプでつなげたりするときに色々はまったのでメモ。 WindowsXPでPython2.7。 # coding: utf-8 def main(): print u"テスト" # PYTHONIOENCODINGでエンコードされる print "テスト" # このファイルの文字コード(utf-8) print u"テスト".encode('cp932') # cp932にエンコードされる if __name__ == '__main__': main() これをコマンドプロンプトから実行するとこうなる。 >python test.py テスト 繝・せ繝 テストこの出力を、文字化けがない状態でファイルに書き出したい。 ちなみに、出力をリダイレクトしようとするとエラーになる。 >python test.py > test.txt Traceback (m
GUI 操作の自動化は AutoIt や UWSC などを使うと可能ですが、選択肢として Python + pywinauto もありかもしれません。 Python はウェブ開発やスクリプト、PySide などを利用した GUI 開発にも使えます。そのため Python を使えば GUI の自動化以外にも様々な開発を行うことができるようになります。 インストール Python 2.7.1 公式の Python でも ActivePython でも OK。 先々の面倒を考えると ActivePython が便利かもしれない ctypes が利用できる Python 2.5 以上を使うこと C:\Python27 にパスを通す distribute か pip を入れておくと便利。しかし今回は使わない pywinauto 0.4.0 easy_install だと古いバージョンが入ってしまうの
Stay organized with collections Save and categorize content based on your preferences. App Engine offers you a choice between two Python language environments. Both environments have the same code-centric developer workflow, scale quickly and efficiently to handle increasing demand, and enable you to use Google’s proven serving technology to build your web, mobile and IoT applications quickly and
High Performance Python Tutorial v0.1 (from my 4 hour tutorial at EuroPython 2011) UPDATE – the v0.2 High Performance Python tutorial is now available. I enjoyed running a 4 hour tutorial on High Performance Python at EuroPython last week (great event guys!). The class was limited to 40 people and I’d love for more people to benefit from the several weeks of work that went into it so I’ve written
The type for this book is set in 18px / 1.5 Adobe Serif, Sans, and Code. Buy Learn Python the Hard Way, 5th Edition When you buy Learn Python the Hard Way, 5th Edition directly from the author, Zed A. Shaw, you'll get access to the digital content for all 60 exercises, plus all 60+ videos that are normally sold separately. You'll also have access to direct help from Zed via Discord chat and live s
この前のエントリで、Hadoopを使って統計処理を行なう際に、データのサンプリングを行って高速化する方法について検討しました。 Hadoopを使ってサンプリングを行なうには - nokunoの日記 今回は、並列化とかややこしいことは考えずにPythonでデータのサンプリングを行なう方法を検証してみました。 重複を許すサンプリング重複を許すサンプリングの実装は簡単です。配列のサイズの中から必要な数だけランダムにインデックスをサンプリングすれば良いのです。 #!/usr/bin/env python import random def sampling(a, n): result = [] for i in range(n): index = random.randint(0,len(a)-1) result.append(a[index]) return result if __name_
PyHP 1.0.0 - alpha 2 has been released! The new alpha has been released. This version simply fix some issues and adds the PyHP PDF Manual for reference. PyHP is an Apache module which embeds the Python language inside web pages. It is inspired by the PHP module to permit quick and easy dynamic web pages creation with Python. The web developer using PyHP will find inside his/her pages a new Pyt
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く