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
ARG base_image=centos:7 | |
FROM $base_image | |
ARG jdk_version=8 | |
ARG jdk_arch=x64 | |
ARG jdk_platform=linux | |
ARG sbt_version=1.9.8 | |
# setup java | |
ADD ./install_jdk.sh . |
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
class Array | |
def scan(init, &op) | |
res = Array.new(self.length) | |
m = init | |
self.each_with_index do |x, i| | |
acc = op.call(m, x) | |
res[i] = acc | |
end | |
res | |
end |
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
# Provides the implementation of Affinity Propagation | |
class AffinityPropagation | |
DEFAULT_DAMPFACT = 0.9 | |
DEFAULT_CONVERGENCE_ITERATION = 10 | |
DEFAULT_MAX_ITERATION = 2000 | |
attr_reader :preference, :min_similarity, :max_similarity, :med_similarity | |
def initialize( | |
dampfact = DEFAULT_DAMPFACT, |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Paiza | |
{ | |
static class Program | |
{ | |
public static void Main(string[] args) | |
{ |
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
require 'bundler/setup' | |
Bundler.require(:default, :assets) | |
require 'rake/sprocketstask' | |
Rake::SprocketsTask.new do |t| | |
root = File.join(Dir.pwd, 'app') | |
env = Sprockets::Environment.new(root) | |
env.append_path 'assets/javascripts' | |
env.append_path 'assets/stylesheets' | |
env.append_path 'assets/images' |
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
def rate(x) | |
case x | |
when 0..120 | |
x * 18.10 + 790 | |
when 121..250 | |
120 * 18.10 + (x - 120) * 24.25 + 790 | |
else | |
120 * 18.10 + 130 * 24.25 + (x - 250) * 27.45 + 790 | |
end | |
end |
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
.assembly extern mscorlib {} | |
.assembly extern System.Core {} | |
.assembly 'Fuji Safari Park' {} | |
.field static unsigned int8[] a // prm | |
.field static unsigned int8[] b // flg | |
.field static unsigned int8[] c // scr | |
.method public static void critical_line(string) | |
{ |
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
/********************************************************************** | |
string.c - | |
$Author$ | |
created at: Mon Aug 9 17:12:58 JST 1993 | |
Copyright (C) 1993-2007 Yukihiro Matsumoto | |
Copyright (C) 2000 Network Applied Communication Laboratory, Inc. | |
Copyright (C) 2000 Information-technology Promotion Agency, Japan |
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
require 'oauth' | |
require 'yaml' | |
require 'yajl' | |
# UserStream takes events or statuses from UserStreaming API. | |
class UserStream | |
# The default value of User-Agent. | |
DEFAULT_USER_AGENT = 'RbUserStreamClient/1.0' | |
def initialize(provider, cred, screen_name, ca_file_path, user_agent = DEFAULT_USER_AGENT) |
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
// Diva | |
// See the definition of Inst, supported instructions. | |
open FParsec | |
type Parser<'a> = Parser<'a, unit> | |
let test p str = | |
match run p str with | |
| Success(result, _, _) -> printfn "Success: %A" result |
NewerOlder