by Randall Munroe, CC BY-NC 2.5 Comments written in Markdown Users can edit or delete own comments (within 15 minutes by default). Comments in moderation queue are not publicly visible before activation. SQLite backend Because comments are not Big Data. Disqus & WordPress Import You can migrate your Disqus/WordPress comments without any hassle. Configurable JS client Embed a single JS file, 65kB (
This will also install Sphinx, feedgen, and Invoke respectively required for building your website, making it look good, generating feeds, and running deploy commands. Getting Started¶ If you are starting a new project, see the ABlog Quick Start guide. If you already have a project, enable blogging by making following changes in conf.py: # 1. Add 'ablog' and 'sphinx.ext.intersphinx' to the list of
Multiple Apps The application context (and its purpose) is indeed confusing until you realize that Flask can have multiple apps. Imagine the situation where you want to have a single WSGI Python interpreter run multiple Flask application. We're not talking Blueprints here, we're talking entirely different Flask applications. You might set this up similar to the Flask documentation section on "Appl
marshmallow¶ Object serialization and deserialization, lightweight and fluffy. Release v4.0.0. (Changelog) marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes. from datetime import date from pprint import pprint from marshmallow import Schema, fields class ArtistSchema(Schema): name = fields.Str() class AlbumSc
Everything you did not want to know about Unicode in Python 3 written on Monday, May 12, 2014 Readers of this blog on my twitter feed know me as a person that likes to rant about Unicode in Python 3 a lot. This time will be no different. I'm going to tell you more about how painful "doing Unicode right" is and why. "Can you not just shut up Armin?". I spent two weeks fighting with Python 3 again a
Human friendly. jrnl has a natural-language interface so you don't have to remember cryptic shortcuts when you're writing down your thoughts. Future-proof. your journals are stored in plain-text files that will still be readable in 50 years when all your fancy iPad apps will have gone the way of the Dodo.
Python’s simple, easy-to-learn syntax can mislead Python developers – especially those who are newer to the language – into missing some of its subtleties and underestimating the power of the language. In this article, Toptal’s Martin Chikilian presents a “top 10” list of somewhat subtle, harder-to-catch mistakes that can trip up even the most advanced Python developer. authors are vetted experts
OverAPI.com is a site collecting all the cheatsheets,all!Sys Variables argv Command line args builtin_module_-names Linked C modules byteorder Native byte order check_-int-erval Signal check frequency exec_p-refix Root directory executable Name of executable exitfunc Exit function name modules Loaded modules path Search path platform Current platform stdin, stdout, stderr File objects for I/O vers
make install で nghttp2 C ライブラリと Python の拡張ライブラリがインストールされます. インストールしたくない場合は, LD_LIBRARY_PATH と PYTHONPATH でそれぞれのディレクトリを指定することもできます. 準備ができましたので早速サーバーを書いてみましょう. 使用するのは nghttp2.HTTP2Server クラスと nghttp2.BaseRequestHandler クラスです. nghttp2.HTTP2Server クラスはコネクションの待ち受け, イベントループの運用といったサーバー機能を提供するクラスです. nghttp2.BaseRequestHandler は 1 ストリーム (HTTP リクエスト) をハンドリングするクラスです. イベント毎に発火するコールバックメソッドがあり, サブクラス化してこれらコールバッ
9章のK-meansをPythonで実装してみます。データx_nをあらかじめ指定したK個のクラスタにわけることを考えます。各クラスタの重心をμ_kとします。K個のデータ平均(means)=重心があるからK-meansですね。さらに、2値指示変数r_nkを用意します。これは、データ点x_nがk番目のクラスタに含まれるとき1、それ以外は0になります。各データx_nはただ1つのクラスタに属するという仮定があるためr[n]のK次元ベクトルは1つだけ1であとは0になります。このとき、最小化したい目的関数Jは(9.1)で与えられます。 上の式は各データ点x_nからその点が所属するクラスタの重心までの距離を最小化することを意味しています。ここでの目的は、Jを最小にするr_nkとμ_kを求めることです。r_nkとμ_kの2つともわからないので、r_nkとμ_kをそれぞれ最適化する2つのステップを交互に何度
We've all heard it before: Python is slow. When I teach courses on Python for scientific computing, I make this point very early in the course, and tell the students why: it boils down to Python being a dynamically typed, interpreted language, where values are stored not in dense buffers but in scattered objects. And then I talk about how to get around this by using NumPy, SciPy, and related tools
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く