(注記:11/30、いただいた翻訳フィードバックを元に記事を修正いたしました。) 最近、Haskellでも生産性の高い作業ができるほどに、この言語を使いこなせるようになりました。定期的にPythonを使いもしますが、今ではWebプロトタイプ作成のほとんどをHaskellで行っています。それで、時間が経ってしまう前に、この言語の学習経験を通じて考えたことなどをまとめたいなと思っています。 データファースト これはどちらかというと動的言語から静的言語への移行に関しての考えなのですが、Haskellのデータ構造は、ほとんどの場合、データ宣言と型シグネチャで提示されるのに対し、Pythonの場合、おおむねコードによって暗黙に定義されます。 Pythonの関数について私が初めて抱いた考えは、「コードに何が書かれているか?」でしたが、Haskellでは、「データはどう見えるか? この関数は___を受け
In a spell of madness I’ve decided to explain the concept of monads in my own personal way, with a slant towards Python programmers. Syntax as an Interface Think about the case of magic methods in Python. They’re used as programmable ways to get special shorthand from the interpreter; for example object1 + object2 will be interpreted as object1.__add__(object2). This means that if your class imple
最新の人工知能技術として注目を集める「ディープラーニング(深層学習)」。日本のスタートアップであるPreferred Networks(PFN)は2015年6月、ディープラーニングを実現するためのオープンソースソフトウエア(OSS)である「Chainer」を公開した。PFNはOSSを切り札に、米国市場の開拓を目論む。 ディープラーニングは、脳の仕組みを模した「ディープ・ニューラル・ネットワーク」というシステムを使用する機械学習の手法。PFNは2014年10月、米Googleや米Microsoftなどの米大手企業が画像認識や音声認識に活用しているディープラーニングを、より幅広い産業領域に適用することを目指して設立した企業だ(関連記事:PFIが深層学習専業の「Preferred Networks」を設立、NTTが出資しトヨタと共同研究も)。 PFNは、同社に出資するNTT以外にトヨタ自動車やフ
TensorFlowは主に機械学習、特に多層ニューラルネットワーク(ディープラーニング)を実装するためのライブラリになりますが、その基本的な仕組みを理解するのにそうした難しい話は特に必要ありません。 本記事では、TensorFlowの仕組みを、算数程度の簡単な計算をベースに紐解いていきたいと思います。 TensorFlowの特徴 初めに、TensorFlowの特徴についてまとめておきたいと思います。 TensorFlowは、その名前の通りTensor(多次元配列、行列などに相当)のFlow(計算処理)を記述するためのツールです。その特徴としては、以下のような点が挙げられます。 スケーラビリティ PC、サーバー、はてはモバイル端末まで、各マシンのリソースに応じてスケールする。つまり、低スペックなものでもそれなりに動くし、GPUを積んだハイスペックなサーバーであればそのリソースをフルに活用した
この記事はなんなの 「センター試験程度であれば、数式と文章を愚直にプログラムに落としこむことさえできれば、昨今のツールを用いて、何も閃かずとも機械的に問題を解くことが出来る」ということの主張 科学計算ライブラリ(特にSympy)の布教 将来、働き先がなくなったとき、「私、私こういうことができるんです!!」って言えばどこかが拾ってくれないかなあ、という夢 使用するもの Python (3系) Scipy.org に載っている科学計算ライブラリ全て(タグが足りない!!) 共に、2015年6月現時点での最新版を使用します(特に、Scipyは今年1月に実装された最新版の機能を使用するので注意してください)。 数々のライブラリを一つ一つインストールするのはすごく面倒です。面倒なので、有名どころを固めたパッケージのようなものが複数存在します。 個人的にはいつもAnacondaを使ってまとめてインストー
Stop the CNAME chain struggle: Simplified management with Route 53 Resolver DNS Firewall Updated 2 May 2024: I removed the reference to Route53 Alias that was incorrectly referred as a chain Starting today, you can configure your DNS Firewall to automatically trust all domains in a resolution chain (such as aCNAMEor DNAMEchain). Let’s walk through this in nontechnical terms for those unfamiliar wi
みんなのIoT/みんなのPythonの著者。二子玉近く160平米の庭付き一戸建てに嫁/息子/娘/わんこと暮らしてます。月間1000万PV/150万UUのWebサービス運営中。 免責事項 プライバシーポリシー Twitter検索してたら「ジャニーズJrの阿部くんって子がみんなのPython読んでるよ」っていうTweetを発見。「マジか? ホントだったら著者として超自慢できるやんけ」と思ったので,インタビューが載ってる「ダンススクエア」っていう雑誌をアマゾンで購入。 そしたら, 読んでる!!! 本当に読んでるよ!!!! 雑誌に掲載されている阿部亮平くんのインタビューも読んでみた。なんでも,ダンスや歌があまり得意でないらしく,ジャニーズの中での立ち位置について悩んでおり,ジャニーズのお勉強マンとしての地位を確立するため,仕事を半年休んで一般入試で大学(上智らしい)に現役合格した努力家らしい。イケ
Hask is a pure-Python, zero-dependencies library that mimics most of the core language tools from Haskell, including: Full Hindley-Milner type system (with typeclasses) that will typecheck any function decorated with a Hask type signature Easy creation of new algebraic data types and new typeclasses, with Haskell-like syntax Pattern matching with case expressions Automagical function currying/part
山本泰宇です。こんにちは。 運用本部では最近 Python3 への移行を進めています。そちらの話は別途ご紹介する予定ですが、今回は Python3.4 で追加された asyncio モジュールの使いかた(というか落し穴)を解説します。先に結論を書いておくと、Python3.5 の改良を待つのが吉という話です。 サンプルとして複数の SSH を一斉に呼び出してうまいこと処理してくれる passh を GitHub で公開しています。実際に社内で利用しているものをデチューンして使いやすくまとめたものです。 本題の asyncio ですが、Python3 で非同期 I/O 処理を実現するために追加されたイベント駆動処理のフレームワークです。最初に書いておきますが、以下で言及する難ありな点のいくつかは Python3.5 で改良される予定のようです。[PEP-0492, PEP 492 vs. P
The editor is written completely in Python. (There are no C extensions). This makes development a lot faster. It's easy to prototype and integrate new features. We have already many nice things, for instance: Syntax highlighting of files, using the Pygments lexers. Horizontal and vertical splits, as well as tab pages. (Similar to Vim.) All of the functionality of prompt_toolkit. This includes a lo
Deep Learning for Image Recognition in PythonAI-enhanced description The document discusses the application of deep learning for image recognition in Python, specifically focusing on distinguishing between images such as dogs and cats. It highlights the use of pre-trained networks and compares accuracy rates between traditional methods and deep learning, with the latter achieving over 95% accuracy
Your terminal can display color, but most diff tools don't make good use of it. By highlighting changes, icdiff can show you the differences between similar files without getting in the way. This is especially helpful for identifying and understanding small changes within existing lines. Instead of trying to be a diff replacement for all circumstances, the goal of icdiff is to be a tool you can re
Python Decorators vs. Context Managers: Have your cake and eat it! Recently I wrote a decorator that does this: @log_runtime('calling foo') def foo(): do_stuff() Then, deep in some other function, I wanted to do this: with log_runtime('do other stuff'): do_other_stuff() That lead to an important realisations: Conceptually, most real decorators are context managers. I love context managers, so I st
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く