Programming

Facebook Twitter

CUDA

Git / svn / make / scons / waf / deploying. Www / http / https. Www. DB / SQL. GUI / OpenGL / Shaders. CLI. Python. Untitled - Stypi. The Julia Language. Testing / profiling. Crypto. D,Vala,Go,Python,Java,C++ Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot.

A side-by-side reference sheet sheet one: grammar and invocation | variables and expressions | arithmetic and logic | strings | regexes | dates and time | arrays | dictionaries | functions | execution control | exceptions | concurrency sheet two: file handles | files | file formats | directories | processes and environment | option parsing | libraries and namespaces | objects | polymorphism | reflection | net and web | unit tests | debugging and profiling | java interop sheet two: file handles | files | directories | processes and environment | option parsing | libraries and namespaces | objects | polymorphism | reflection | net and web | unit tests | debugging and profiling | deployment versions used The versions used for testing code in the reference sheet. show version How to get the version. php: The function phpversion() will return the version number as a string. python: The following function will return the version number as a string: import platform platform.python_version() ruby: <?

Interpreted Languages: PHP, Perl, Python, Ruby (Sheet One) - Hyperpolyglot

Repl. Cheat Sheets. TimeTransitionsImage (PNG Image, 524 × 455 pixels) PHP: a fractal of bad design - fuzzy notepad. (This article has been translated into Thanks!)

PHP: a fractal of bad design - fuzzy notepad

Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us have the slightest clue what we’re doing. This is not the same. PHP is the lone exception. PHP is an embarrassment, a blight upon my craft. But I’ve got to get this out of my system. An analogy I just blurted this out to Mel to explain my frustration and she insisted that I reproduce it here. I can’t even say what’s wrong with PHP, because— okay. Design Patterns In Python (@Testing Perspective)  Dynamic State Machines. I was talking with my coworkers Jeff and Randy yesterday about some work Randy was doing implementing a finite state machine in django, and I was reminded of a pattern I've previously used to implement state machines using Python's dynamic typing to do it.

Dynamic State Machines

In more static languages, an object is forever bound to its type, and implementing state-dependent behavior often requires using supporting classes which can be switched out to implement the variable behavior of different states. Python's dynamic nature makes this much simpler. Implementing state with dynamic typing In python, an object's type is determined simply by looking at the value of it's __class__ attribute.

Conveniently, but also rather frighteningly, this attribute is mutable. This pattern is very powerful, and could easily be abused, but it expresses what is happening clearly and effectively, and matches the problem domain straightforwardly. A Blue morpho butterfly (Morpho menelaus) The life-cycle of a Butterfly Happy coding! Monkey patching in Python. Дерево ван Эмде Боаса / Алгоритмы. Всем доброго времени суток!

Дерево ван Эмде Боаса / Алгоритмы

Сегодня я расскажу вам об одной интересной структуре данных, про которую слышали лишь немногие и про которую очень незаслуженно мало написано в рунете, да и в англоязычном информации, в общем-то, тоже негусто. Решено было исправить ситуацию и поделиться с общественностью в доступной форме этой достаточно экзотической структурой данных. Дерево ван Эмде Боаса (van Emde Boas tree) — ассоциативный массив, который позволяет хранить целые числа в диапазоне [0; U), где U = 2k, проще говоря, числа, состоящие не более чем из k бит. Казалось бы, зачем нужно еще какое-то дерево, да еще позволяющее хранить только целые числа, когда существует множество различных сбалансриованных двоичных деревьев поиска, позволяющих выполнять операции вставки, удаления и прочие за O(log n), где n — количество элементов в дереве?

Advanced Bash-Scripting Guide.

IDE / vim

VIM.