著者 神嶌 敏弘 (Toshihiro Kamishima) リリース 2020-02-17 08:56:35 +0900 ダウンロード用 [ PDF版 ] [ ePub版 ] ソースレポジトリ [ https://github.com/tkamishima/mlmpy ]
pythonbrewによるフレキシブルなPython環境の構築 Vimの設定とかはあまり関係ないですが最強を詠うために最強のPython環境が必要なので構築します。最強の環境とは インストールされているPythonのバージョンが違うことによって不可解なバグが発生しない インストールされているライブラリのバージョンが違うことに不可(ry インストールされているライブラリ同士が干渉して不可解な(ry だと思っています。これらを解決するために pythonbrew という素晴らしいソフトを利用します。 ただこのソフトはシェルが前提となっているのでWindowsをお使いの方は代わりに virtualenv をインストールして先に進んでください。 Pythonには大きく分けて2.x系と3.x系の大きなバージョンがあり、この二つは相容れないものとなっています。 2.x系はずっと使われてきたもので外部ラ
FrontPage / 言語処理100本ノック 3 秒後に NLP 100 Drill Exercises に移動します。 (移動しない場合は、上のリンクをクリックしてください。) © Inui Laboratory 2010-2018 All rights reserved. 研究室紹介/About Us 過去に在籍したメンバー Members 研究室環境 Lab Facilities ↑研究会/Research Meetings 概要 Overview 総合研究会 Research Seminar 意味研究会 SIG Semantics 談話研究会 SIG Discourse 知識獲得研究会 SIG Knowledge Acquisition Embedding研究会 SIG Embedding KIAI Knowledge-Intensive Artificial Intellige
You are or have been a Pythonista? You are or were in love with virtualenv, virtualenwrapper or Buildout? Now you do some Ruby you are looking for the same wonderful tools? You should take a look at RVM or Ruby Version Manager. Oh, well. You are or have been a Rubyist? You are or were in love with RVM? Now you do some Python you are looking for the same wonderful tool? You should take a look at vi
はじめに こんにちは、Python界の情弱です。長らくvirtualenv & virtualenvwrapperでやってきたんですが、そろそろPython2系とPython3系を共存させるに当たってvirtualenvでちまちま環境を切り替えたり細かいオプション設定したりするのにつかれたのでpythonbrewを使うことにしました。 参考 utahta/pythonbrew · GitHub 作者さんのブログ pythonbrewで構築するPython開発環境 | ninxit.blog pythonbrewで構築するPython環境 その2 | ninxit.blog Python3に乗り換える?待ってみる?でも試したいよ、戻れる前提ならね。そんな方法。 - When it’s ready. (a2c.get.diary) 設定 上のエントリにあるとおりに設定すれば済む話ではある。 下
これは、以前に紹介したPythonのサウンドライブラリPyoで、どのように自作クラス(ヴォコーダー)を作るかを説明した文章の翻訳です。 >>>以下本文 原文 http://code.google.com/p/pyo/wiki/createYourOwnAudioObject 自作オーディオ・オブジェクト これは、小さいチュートリアル。サウンド処理のために、君自身のオブジェクトのつくりかた。 序文 この例では、ヴォコーダーを製作していくことにする。とてもシンプルなクラスから始めて、より洗練されたクラスを作るために、徐々に機能を加えていく。できあがったクラスはホンモノのpyoオブジェクトのように振る舞うだろう。 なにはともあれ、メインのスクリプトが読み込む、クラスの置き場所に"vocoder_lib.py"というファイルをつくろう。 ファイル"vocoder_lib.py"と"vocoder_
最近、Mockライブラリ http://www.voidspace.org.uk/python/mock/ を使ってみたのでメモ。 このライブラリは、その性質上、動的にメソッドや属性を作成するケースが多く、普通のPythonライブラリのようにイントロスペクションに頼って使い方を調べるのは難しい。本気で使うならまじめにドキュメントを読み込む必要がある。 関数の置き換え テスト中に呼び出される関数をMockで置き換える例。ここでは、関数 myapp.utils.func1() を置き換える。 from mock import Mock import myapp.utils # myapp.utils.func1 を、常に100を返す関数に置き換える myapp.utils.func1 = Mock(return_value=100) 戻り値が定数でない場合は、Mock()にside_effec
Python Tutor: Visualize Code and Get AI Help for Python, JavaScript, C, C++, and Java Python Tutor is designed to imitate what an instructor in an introductory programming class draws on the blackboard: Instructors use it as a teaching tool, and students use it to visually understand code examples and interactively debug their programming assignments. Quick links: Documentation and unsupported fea
Buy from Publisher (Free ebook!) Buy on Amazon Making Games with Python & Pygame covers the Pygame library with the source code for 11 games. Making Games was written as a sequel for the same age range as Invent with Python. Once you have an understanding of the basics of Python programming, you can now expand your abilities using the Pygame library to make games with graphics, animation, and soun
Chapter 1 Read online: Chapter 1 - Installing Python Videos: Installing Python on Windows Installing Python 3.1 under MacOSX Install Python 3.1 using Linux Chapter 2 Read online: Chapter 2 - The Interactive Shell Chapter 3 Read online: Chapter 3 - Strings Download source: hello.py Copy source to clipboard: Use the online diff tool to find typos in your code: hello.py Chapter 4 Read online: Chapter
ついにやった!ループが自己複製をしている。 ラングトンの日記(1979/10/26) ラングトンの自己複製オートマトンは、ラングトン・ループ(Langton's Loops)と呼ばれます。ライフゲームと同じ二次元のセル・オートマトン空間上でループが増殖していきます。下が増殖の様子を撮影した動画です。もっとよくみたいときは後で掲載するPythonスクリプトを実行してみてください。 この自己複製するループは、クリストファー・ラングトン(Christopher Langton)という人が提案しました。ラングトンは、人工生命(Artificial Life)という研究分野の創始者です。 こういう複製はトップダウンでルールを与えれば簡単にできます。たとえば、腕を10ピクセル伸ばしたら左に90度曲げるを繰り返し、ループが完成したら切り離す。でもこれではまったく面白くない!ラングトンのループのすごいとこ
pytest で初めてテストを書いてみました。 今度こそ帰るー、py.test を使って初めてテストを書いた、評判通りすごく良い 2012-02-07 19:48:52 via TweetDeck @t2y noseと比べた感想とか聴きたいです。 2012-02-07 19:55:04 via web to @t2y @methane @t2y テストがこけたときまともなレポートをはくのがpy.testのいいところ 2012-02-07 19:56:34 via twicca to @methane nose と比べて、データ駆動テスト *1 *2 の違いが大きかったのでまとめてみます。 準備 以下の素数判定を行うテスト対象関数があるとします。 PRIME = {2: True, 3: True, 4: False, 5: True, 6: False, 7: True} def is_p
この記事について この記事は、setuptools - The PEAK Developer's Centerの日本語訳です。まだ途中ですが、先が長いので、ここで一旦公開します。 なお、訳者は翻訳しただけで、記事の内容については確認していません。悪しからずご了承下さい。 setuptoolsを使ったパッケージのビルドと配布 setuptoolsは、Pythonのdistutils(ほとんどのプラットフォームではPython 2.3.5以上に対応します; 64ビットのプラットフォームでは、Python 2.4以上が必要です)を多く拡張します。これにより、Pythonのパッケージをビルドし、配布することが容易になります。他のパッケージに依存しているパッケージでは、とくにそうなります。 setuptoolsを使ってビルドされ、配布されたパッケージは、ユーザにはdistutilsを使った普通のPy
Manual Completo de Referência, 6ª Edição (pre-release). written by Massimo Di Pierro, Alexandre Andrade in Português buy printed pdf Acredito que a capacidade de construir facilmente aplicações web de alta qualidade é de importância crítica para o crescimento de uma sociedade livre e aberta. Isso impede que os maiores players monopolizem o fluxo de informações. Daí eu comecei o web2py projeto em
2011.12.24 pyck is running, I added a few ugens, but I might be facing a problem. I accidentally did a stress test earlier by sporking 7 shreds in parallel, each of them creating a few ugens to play a sound. The result is pretty bad, as it caused many xruns. Obviously, this is caused by the evaluation of python code, which is too slow to fulfill the realtime requirements. I am not sure how this ca
Home Python Sections Python Set Up Introduction Strings Lists Sorting Dicts and Files Regular Expressions Utilities Lecture Videos day1, day2 1.1 Introduction, strings 1.2 Lists and sorting 1.3 Dicts and files 2.1 Regular expr 2.2 Utilities 2.3 Utilities urllib 2.4 Conclusions Python Exercises Basic Exercises Baby Names Exercise Copy Special Exercise Log Puzzle Exercise More Google's Python Clas
Rails vs Web2Py compares the popular web frameworks Ruby on Rails and Web2Py. Some key differences include: - Controllers are defined as classes in Rails and functions in Web2Py. - Routing is defined in a routes.rb file in Rails and routes.py in Web2Py, which supports reversed routing and regex. - Views use ERB templates in Rails and native Python templates in Web2Py. - Web2Py has built-in support
今日質問されて、以前Twitterで書いたのを思い出して、そして検索性が悪くて見つけ出すのに苦労した。こちらに転載しておく。詳細は気が向いたときに埋める。 オプション引数の評価タイミング Rubyではオプション引数は関数が呼ばれるたびに評価される。 def foo() print "foo!" end def bar(x=foo()) end bar #=> foo! と出力される bar #=> foo! bar #=> foo! Pythonでは関数の定義時に1回だけ評価される。 def foo(): print "foo!" def bar(x=foo()): pass #=> foo!と出力される bar() #=> 何も出力されない bar() 「引数が省略されたら今の日時」みたいな毎回評価したい場合はデフォルト値をNoneにしておいて「Noneだったら=省略されていたら」のif
nose tutorial v documentation nose チュートリアル Contents :: nose のインストール » nose チュートリアル¶ Contents: nose のインストール はじめに インストール方法 プラグイン nose の基本的な使い方 はじめに テストの作成 ソースコード テストの補足 テストの実行 nose のsetup/teardown はじめに 役割 書き方 ソースコード nose.tools を使う はじめに 使い方 ソースコード nose plugin の作成 はじめに 役割 書き方 ソースコード 動作結果 nose plugin の実行 はじめに 実行方法 nose plugin のインターフェース はじめに インターフェース おわりに Contents :: nose のインストール » © Copyright 2011, a
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く