This file contains hidden or 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
ARG cuda_version=9.0 | |
ARG cudnn_version=7 | |
FROM debian:stretch | |
# Install system packages | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
bzip2 \ | |
g++ \ | |
git \ | |
graphviz \ |
This file contains hidden or 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
/** | |
* The dining philosophers implementation of Node.js | |
* | |
* See also: | |
* http://rust-lang-ja.github.io/the-rust-programming-language-ja/1.6/book/dining-philosophers.html | |
* | |
* (c) 2018 Leko | |
*/ | |
const cluster = require('cluster') |
This file contains hidden or 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
class Avatar { | |
constructor (uri) { | |
this.setUri(uri) | |
Object.freeze(this) | |
} | |
setUri (uri) { | |
this.uri = uri | |
} |
This file contains hidden or 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/env bash | |
# Usage: | |
# build-ios <SCHEME> <EXPORT_PLIST> | |
# | |
# SCHEME: | |
# EXPORT_PLIST: | |
set -eu | |
SCHEME=$1 |
This file contains hidden or 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
.env | |
node_modules |
This file contains hidden or 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
node_modules/ |
This file contains hidden or 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
const fallbackSuffixes = { | |
Changed (instance, prop) { | |
return instance.dirties[prop].changed() | |
}, | |
Change (instance, prop) { | |
return instance.dirties[prop].changes() | |
}, |
This file contains hidden or 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
<?php | |
namespace Foundation; | |
class JSONException extends \Exception {} | |
/** | |
* Requirement: PHP >= 5.5.0 | |
*/ | |
class JSON |
This file contains hidden or 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
<?php | |
class SomeClass { | |
public function __destruct () | |
{ | |
echo __FILE__.':'.__LINE__.PHP_EOL; // Not working | |
} | |
} | |
register_shutdown_function(function () { |
This file contains hidden or 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
<?php | |
function bench($name, $fn, array $args = array(), $step = 10000) { | |
$times = array(); | |
while($step--) { | |
$s = microtime(true); | |
call_user_func_array($fn, $args); | |
$e = microtime(true); | |
$times[] = $e - $s; |