You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
This is a bit of a niche topic, but I figured there might be one or two people out there who would find this useful (including my future self)... today I managed to implement a simple Python object which exposes the buffer protocol. If that means nothing to you, you may want to stop reading and instead browse this gallery of puppy gifs. But if you're the kind of person who becomes mildly excited a
rcviz is a small python module for recursive call graph visualisation, which i wrote a few weekends ago. It differs from regular call graph visualisations because i) it shows the recursion tree with each invocation of the function as a different node ii) it also shows the args and return values at each node, and iii) it allows you track and graph the execution of just the function/s you are int
Parallelising Python with Threading and Multiprocessing Parallelising Python with Threading and Multiprocessing One aspect of coding in Python that we have yet to discuss in any great detail is how to optimise the execution performance of our simulations. While NumPy, SciPy and pandas are extremely useful in this regard when considering vectorised code, we aren't able to use these tools effectivel
Tweepyの2.3.0が出ました。 「Tweepy が Application-only Authentication に対応します」僕のprも取り込まれていて、 Application-only Authentication が標準で使えるようになりました。 というわけで、早速遊んでみます。 Application-only Authenticationで遊ぶ 使い方は「tweepyでApplication-only Authenticationしてみた」のときとほぼ同じ。 Tweepy本体に取り込んでもらったので、名前空間がちょこっと変わったくらいです。 Consumer Key と Consumer Secretだけ設定すればいいので、簡単に使えます。 #!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy impor
Welcome to Python for you and me¶ This is a simple book to learn Python programming language, it is for the programmers who are new to Python. You can find the latest version of the book here. If you are new to command line in Linux, you can read lym. Contents: pym is a book to learn Python. It targets people who are completely new to the language. Feedback is greatly appreciated. If you have any
OSが管理するスレッドと違って,ユーザのプログラムによって管理されるスレッドのことをグリーンスレッドといいます.他にもマイクロスレッドとか軽量スレッドとかいったりすることもあるようです.ネイティブスレッド(OSが管理するスレッド)と比較したときのグリーンスレッドの特徴として. ・スケジューリングをユーザプログラム自身がおこなう ・一般にスレッドの切り替えコストはネイティブスレッドより低い ・一つのプログラム内において実行されるグリーンスレッドは一つ (マルチコアでも,OSから見るとあくまでユーザプログラムは一つなので,グリーンスレッドが並列実行されることがない)などが上げられます. greenletとは,PythonのC言語実装であるCPythonにおけるグリーンスレッドの実装の一つです.(2014/4/29現在,greenletはpython2.xのみをサポートしています.また,以下での
A syntactic parser describes a sentence’s grammatical structure, to help another application reason about it. Natural languages introduce many unexpected ambiguities, which our world-knowledge immediately filters out. A favourite example: They ate the pizza with anchovies A correct parse links “with” to “pizza”, while an incorrect parse links “with” to “eat”: The Natural Language Processing (NLP)
Write your first compiler Introduction This time, we will play with an awesome thing in computer science: the theory of compilation. Of course, I think you not read this post to found another academyc paper. Therefore, we will make a little compiler that it will translate this: a = 0; a = a + 5; while (a-10) { print a; a = a+1; } In this: PUSH 0.0 SET a PUSH a PUSH 5.0 ADD SET a JMP cond1 body1: P
Welcome to Click¶ Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary. It’s the “Command Line Interface Creation Kit”. It’s highly configurable but comes with sensible defaults out of the box. It aims to make the process of writing command line tools quick and fun while also preventing any frustration caused by the inability
Be as the reed, not the oak tree. Green threads are just threads. … that which is hard and stiff is the follower of death that which is soft and yielding is the follower of life … the Tao Te Ching, chapter 76 Problem: Threads Are Bad As we know, threads are a bad idea, (for most purposes). Threads make local reasoning difficult, and local reasoning is perhaps the most important thing in software d
プログラマーのための確率プログラミングとベイズ推定¶PythonとPyMCの使い方¶ベイズ推定(Bayesian method)は,確率推論のためのもっとも適切なアプローチであるにもかかわらず,書籍を読むとページ数も数式も多いので,あまり積極的に読もうとする読者は少ないのが現状である.典型的なベイズ推定の教科書では,最初の3章を使って確率の理論を説明し,それからベイズ推論とは何かを説明する.残念ながら多くのベイズモデルは解析的に解くことが困難であるため,読者が目にするのは簡単で人工的な例題ばかりになってしまう.そのため,ベイス推論と聞いても「だから何?」と思ってしまうのである.実際,著者の私がそう思っていたのだから. 最近の機械学習のコンテストで良い成績を収めることができたので,私はこのトピックを復習しようと思い立った. 私は数学には強い方である.しかしそれでも,例題や説明を読んで頭の中で
Published April 15th, 2014, 7 min read, In a past version of this blog I used Pandoc to convert Markdown to HTML. It's by far the best and most powerful markdown converter, but it has one, albeit little weakness: Its syntax highlighting is based highlighting-kate, which is less good and supports less languages than the Python library Pygments, the de-facto standard highlighter used by Github and o
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く