言語処理100本ノックは,実践的な課題に取り組みながら,プログラミング,データ分析,研究のスキルを楽しく習得することを目指した問題集です 実用的でワクワクするような題材を厳選しました 言語処理に加えて,統計や機械学習などの周辺分野にも親しめます 研究やデータ分析の進め方,作法,スキルを修得できます 問題を解くのに必要なデータ・コーパスを配布しています 言語はPythonを想定していますが,他の言語にも対応しています
こんにちは、皆さん。 Python言語の実装に深く踏み込む前に、Pythonの主要な概念を知っておく必要があります。それは非常にシンプルで、 全てがオブジェクトだ ということです。このことは、Pythonの内部構造を学習する際の最初のステップであり、この旅の入り口でもあります。 今回の主なテーマは、Pythonのオブジェクトが実装レベルでどのように扱われているかを理解することです。私たちは、 Python 2.7.8 のCPythonの実装について話をしていきます。 Pythonのソースをダウンロードし、解凍することを想定しているので、ソースコードへの参照は全て、ルートフォルダからの相対的な参照になります。 PyObjectとPyVarObject Pythonでは全てがオブジェクトです。Pythonで使われている以下のものは文字通り、全て C の PyObject です。 関数 スライス
A series of articles on the history of the Python programming language and its community. David Beazley's talk at US PyCon 2018, about parser generators, reminded me I should write a bit about its history. Here's a brief brain dump (maybe I'll expand later). There are actually two pgens. The original, in C, and a rewrite in Python, under lib2to3/pgen2. I wrote both. The original was actually the f
リスト内包表記はPython 2.0で追加された。この機能はGreg Ewingによるパッチを元にして、Skip MontanaroとThomas Woutersらの貢献もあって実現された。私の記憶が正しければ、Tim Petersもこのアイディアをしっかりと保証してくれた。基本的には、リスト内包表記は数学者によって使用されてきた、よく知られた表記法をPythonicに解釈して実現したものである。 {x | x > 10} これは、一般に、10より大きな数の集合と解釈される。数学の世界では、この形式は、例えば全ての実数、全ての整数などを表す普遍集合(universal set)であると、読み手は解釈する。Pythonの2.0には普遍集合の概念はなく、setもなかった。setについてもおもしろい話があるため、将来ブログに投稿することになるだろう。 この概念や、他の状況も踏まえ、次のようなPy
PyInstaller Manual Version: PyInstaller 6.10.0 Homepage: https://pyinstaller.org/ Contact: pyinstaller@googlegroups.com Authors: David Cortesi, based on structure by Giovanni Bajo & William Caban, based on Gordon McMillan’s manual Copyright: This document has been placed in the public domain. PyInstaller bundles a Python application and all its dependencies into a single package. The user can run
「%Y%m%d」をstrptimeで処理すると曖昧になることを今更ながらに知りました。 社内で「201312」を渡すとキモいという話が出て、 Pythonでdatetime.datetime.strptime('201312', '%Y%m%d')がエラーにならず1月2日として成立するの具合悪いと思うの — nekoya (@nekoya) June 7, 2013 ってPostしたら@hirataraさんが「2013129と2013130もキモいぞ」と教えてくれました。 普段は%Y-%-%dを使うんだけど、URLに日付を埋め込む場合はデリミタ無しの方が自然だなーと思ったらご覧の有様だよ。 Python2.7.1 >> datetime.strptime('201312', '%Y%m%d') datetime.datetime(2013, 1, 2, 0, 0) >> datetime.
はじめに こんにちは、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頃
わたし的棚ぼた一万円選書 急に千葉さんに手渡された封筒、開けてみたら1万円札が1枚。何ごとかと思えば、同期の出張を代わったお礼をもらったらしい。 「葵はワンオペで育児してくれたから」と半分わけてくれました。 泡銭の1万円 これはもう、わたし的1万円選書をしろという思し召しなのでは……
Without a doubt, you've seen a clock like this in demos of HTML5 Your browser does not support HTML5 ! However, right click and view the source of this page... It is not Javascript code! Intead, you will find Python code in a script of type "text/python" Brython is designed to replace Javascript as the scripting language for the Web. As such, it is a Python implementation (you can take it for a te
Archived: Unofficial Windows Binaries for Python Extension Packages by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC. This page provides 32 and 64-bit Windows binaries of many scientific open-source extension packages for the official CPython distribution of the Python programming language. A few binaries are available for the PyPy distribution. The files are unofficial (meaning: inform
Live Nation says its Ticketmaster subsidiary was hacked. A hacker claims to be selling 560 million customer records. An autonomous pod. A solid-state battery-powered sports car. An electric pickup truck. A convertible grand tourer EV with up to 600 miles of range. A “fully connected mobility device” for young urban innovators to be built by Foxconn and priced under $30,000. The next Popemobile. Ov
Javaのjarに相当するPythonのファイル形式にeggがあります。eggを使って色々なことが出来るらしいのですが、作るのが難しいです。Pythonのエキスパート清水川さんでさえ「eggの作り方が分からない」と言っているくらいです(2009/07/06 http://www.freia.jp/taka/blog/655/)。 単に複数のPythonファイルを固めて渡したい、ということであれば、Python 2.6以降ならZIPフィアルを直接実行できます。 http://docs.python.org/whatsnew/2.6.html#other-language-changes .pyファイル、または.pycファイル(あるいは両方)をZIPに入れて、エントリーポイントとなる __main__.py というファイルを作るだけです。 いま、次のようなファイル群があったとします。 mypr
みんなのIoT/みんなのPythonの著者。二子玉近く160平米の庭付き一戸建てに嫁/息子/娘/わんこと暮らしてます。月間1000万PV/150万UUのWebサービス運営中。 免責事項 プライバシーポリシー Pythonのモジュールを動的に読み込んでプラグインとして利用するための簡易な方法。 たとえば,以下のような構成のフォルダがあるとして,mod.pyとpack/__init__.pyにはそれぞれfoo()という関数が書かれているとする。 [plugins]--+ | +- mod.py | +- [pack] --+ | +- __init__.py pluginsディレクトリと同じ位置に以下のスクリプトを置くと,pluginsディレクトリ以下にあるPythonのモジュールやパッケージを動的に読み込み,モジュールオブジェクトとしてリストに格納,モジュールのfoo()という関数を呼び出す
Fabric は指定したコマンドを各ホストで実行する実行モデルです。この場合は特にホストの指定がなかったので、全部ローカルで、一回実行することになります。 これは結構つまんないので、本当の例を見ましょう。これは最近、仕事で作ったコマンドです。 nginx サーバーでメンテ画面を出すようなコマンドです。 各ロードバランサーで実行します。 from fabric.api import run, cd, abort, require, sudo, env from fabric.decorators import runs_once, roles from fabric.contrib.console import confirm ... @roles('loadbalancers') def start_maintenance(): """ メンテナンス画面に切り替える """ _produc
「脱初心者を目指したい人にはよい本だと自負しています」「すでに絶版になっており,アマゾンでは中古しか手に入らないのですが,プレミアが付いているようで,需要があるんだなー,と思っています」「出版契約を解除して,オマケでPDFまでいただいてしまったのです。手元にあるPDFをどうしようか,と考えました。電子書籍として有料で流通,という選択肢もあったのですが,無料公開の方がいろいろと利点が多いと判断しました」ということで、なんと定価が税込2604円だった「みんなのPython Webアプリ編」が無料ダウンロード可能になりました。 ダウンロードは以下のページに行けば可能です。ファイルサイズは4.1MBほどなので、すぐにダウンロードは終わります。 クリスマスプレゼント!「みんなのPython Webアプリ編」のPDFを無料公開します | TRIVIAL TECHNOLOGIES on CLOUD ht
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く