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
macro := { | |
rule infix { $obj $([ $key ] ...) | $rval:expr } => { | |
$obj = mori.assoc_in($obj, [$key (,) ...].reverse(), $rval) | |
} | |
} | |
macro hash_map { | |
rule {{ $($key : $value) (,) ... }} => { | |
mori.hash_map($($key, $value) (,) ...) | |
} |
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
# Always ignore one run | |
x = 0 | |
@elapsed for i in 1:100_000_000 | |
x += 1 | |
end # => 3.330939854 | |
# Second time is more accurate |
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 | |
# -*- coding: utf-8 -*- | |
from flask import Flask | |
from flaskext.sqlalchemy import SQLAlchemy | |
from werkzeug.security import generate_password_hash | |
from werkzeug.security import check_password_hash | |
from sqlalchemy.orm.exc import NoResultFound | |
app = Flask(__name__) |
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
(flycheck-define-checker julia-lint | |
"A Julia syntax checker using Lint.jl." | |
:command ("julia" "-e" | |
"using Lint; lintfile(ARGS[1])" source-inplace) | |
:error-patterns | |
((info line-start | |
(zero-or-more blank) | |
(file-name) " " | |
(one-or-more (not digit)) | |
line " INFO" (one-or-more blank) (message) line-end) |
NewerOlder