One week in 2007, two friends (Dean and Bill) independently told me they were amazed at Google's spelling correction. Type in a search like [speling] and Google instantly comes back with Showing results for: spelling. I thought Dean and Bill, being highly accomplished engineers and mathematicians, would have good intuitions about how this process works. But they didn't, and come to think of it, wh
X-Translator: Yoshinari Takaoka <reversethis -> gro tod umumum ta umumum> はじめに¶ この文書は Python の標準ライブラリに含まれているPythonコードのコーディング規約です。CPython に含まれるC言語のコードについては、対応するC言語のスタイルガイドを記した PEP を参照してください。 この文書と PEP 257 (Docstring 規約) は、Guido が書いたオリジナルのPythonスタイルガイドのエッセイと、 Barry のスタイルガイドに少し追記したものをまとめたものです。 [2] このスタイルガイドは、追加の規約が必要だとわかったり、Pythonの言語自体が変更されることで過去の規約が時代遅れになった時に徐々に改訂されてゆきます。 多くのプロジェクトには、自分たちのコーディングスタイル
Python modules provide powerful building blocks for extending Python’s functionality across various programming domains. This list of Python modules covers the core categories of Python modules, focusing on system operations, data processing, web development, databases, user interfaces, and multimedia tools. You’ll learn about built-in modules from the standard library and popular third-party pack
Dec 27, 2014I made this project about a year ago. At that time, I just started it for The GitHub Data Challenge II. So, it was very simple and concise implementaion for proof of concept. I've been aggregated convention data for a year. However, It is not analyze conventions of our codes deeply. I think therefore it's meaningless to keep aggregating more data. Finally, I decided to stop aggregating
In some programming languages, the idea of “reflection” is somewhat exotic, and takes a while to learn. In Python (and Ruby, for that matter), the language is both dynamic and open, allowing you to poke around in the internals of just about any object you might like. Reflection is a natural part of working with these languages, which lends itself to numerous things that you might want to do. Refl
2016-12-09追記 「Pythonクローリング&スクレイピング」という本を書きました! Pythonクローリング&スクレイピング -データ収集・解析のための実践開発ガイド- 作者: 加藤耕太出版社/メーカー: 技術評論社発売日: 2016/12/16メディア: 大型本この商品を含むブログを見る 2015年6月21日 追記: この記事のクローラーは動かなくなっているので、Scrapy 1.0について書いた新しい記事を参照してください。 2014年1月5日 16:10更新: デメリットを修正しました。 以下の記事が話題になっていたので、乗っかってPythonの話を書いてみたいと思います。 Rubyとか使ってクローリングやスクレイピングするノウハウを公開してみる! - 病みつきエンジニアブログ 複数並行可能なRubyのクローラー、「cosmicrawler」を試してみた - プログラマにな
Ever wonder how Google Chrome knows the language of a web page and offers to translate it when the page is written in a foreign language? Or how Facebook offers to translate your friends’ posts in a foreign language? Detecting languages is surprisingly easy, and it can be used to improve user interfaces without having the user do any work. I stumbled across this ActiveState recipe for a language d
What is SCons? SCons is an Open Source software construction tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software. What makes SCons better? Configuration files are Python scripts--use the p
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default mod
前回は Python で文書の類似度判定を行うプログラムのアルゴリズムについて紹介しました。 今回の話は、前回の類似度判定を行うプログラムの使い方と、前回の記事のアルゴリズムを用いた文書の類似度検索を行うプログラムの設計と類似度判定プログラムの実装について紹介します。 また、作成したプログラムのコードは github [1] に上げました。 まずは使い方。github からコードをダウンロードして、以下のコマンドを叩きます (argparse を使っているので python2.7 以降じゃないと動かないです、あと形態素解析に “MeCab” [2] を使っているので、そっちもインストールしてください) 。
個人的に Python が熱いです。以前にも同じような事を言った気がしますが。多分デジャブです。 Python といえば、アリエルには言わずと知れた Python 界隈の大物が御座しますが。そんな大物の縄張りで、僕のようなチンピラがこれまた安っちい記事を書くのはかなり恐縮ですが。その辺りは気にせず、図太い精神で書いてこうと思います。 Python は、再帰の途中で内部状態を維持しつつ途中結果を返すジェネレータだったり、(mutable ながら)リストに対して map とか filter とか出来ちゃうところで Lisp を感じられる辺り、かなりオモロい言語です。 せっかくだし何か書きたいなという事で、ベクトル空間モデル [1] を使った類似文書検索プログラムを作ってみました。 出来たものだけ見せると、以下のように動作します。 入力文書は標準入力から受け取ってます。4 行目の「国会図書館は…
はじめに こんにちは、Python界の情弱です。情弱ながらPyCon JP 2012で1セッション持たせてもらえることになりました。予め資料を公開しておきますので、当日は色々と質問・意見して頂ければと思います。 各トピックは各トピックでの総論になっていますので、細かい部分は本文最後の参照にあるリンクを見るとより理解が深まります。 「なおここに書いてある内容は所属する団体とは関係のない、私個人の見解ですので、予めご了承下さい。」テンプレ終わり。 イベント PyCon JP 2012 発表日時 2012-09-16 11:00-11:45 作者 @ymotongpoo URL http://2012.pycon.jp/program/sessions.html#session-16-1100-room357-ja スライド (追記: 2012/09/16 23:50:00) 発表の24:00頃
To work with lists many c/c++ programmer use a simple for-loop. I will try to explain how this can be made a little bit easier. For that I use the self-explaining script language python. Here is a simple example to filter all odd integers from a list in simple python 2.x syntax. def filter_odd(myList): result = [] # initialize the result list for num in myList: # iterate over the list if num % 2 =
Line counts disclude comments and blanks and lines with only single braces/parentheses. Speed measurements were done on a Core2-Duo Mac, using the roomfront (non-sun) model. They are just rough indications. ‘Paths’ actually also send a ‘shadow ray’ at each node – so twice the paths-per-second would give general basic ray-traces/intersections-per-second. C was faster than C++ probably mostly becaus
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く