This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Test do | |
@moduledoc """ | |
Tested with: | |
Erlang/OTP 19 [erts-8.1] [source-e7be63d] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] | |
Elixir 1.3.4 | |
Output: | |
len = 10 | |
map: 0.6671 µs | |
count: 2.5472 µs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Use Python formatting in Linux shell | |
import sys | |
print sys.argv[1].format(*sys.argv[2:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from south import db as db_module | |
from south.migration.migrators import Migrator, DryRunMigrator | |
def with_db(run_migration): | |
def run_migration_with_db(self, migration, database): | |
migration_db = getattr(migration._migration.Migration, | |
'database', None) | |
if migration_db is not None: |