9:00にオフィス(Sticky Fingers)
食料品は事前に用意しておく。食べ過ぎない。胃に負担をかけないようにする。
運営の櫛井さんからのメールに従って、サポートチャットと予選ポータルサイトにログインする。
| require 'optparse' | |
| require 'grpc/health/checker' | |
| # NOTE: We must inject module-level logger. | |
| # cf. https://github.com/grpc/grpc/blob/de893acb6aef88484a427e64b96727e4926fdcfd/src/ruby/lib/grpc/logconfig.rb#L43 | |
| # cf. https://github.com/grpc/grpc/blob/49be7a6667ee27be7be44c6307428ace9dbe373b/src/ruby/spec/spec_helper.rb#L42-L44 | |
| module GRPC | |
| class << self | |
| def logger | |
| @logger ||= Servicex.logger |
| module Servicex::Grpc | |
| class << self | |
| # @example | |
| # Servicex::Grpc.stub_for(UsersPb::UserService, UsersApi.base_url) | |
| # @param service_class [Class<Grpc::GeneralService>] | |
| # @param url [String] | |
| # @yield [opts] To modify options for instantiating a Stub | |
| # @yieldparam opts [Hash] Default options | |
| def stub_for(service_class, url) | |
| opts = { |
| syntax = "proto3"; | |
| package resources; | |
| message User { | |
| int32 id = 1; | |
| Profile profile = 2; | |
| } | |
| message Profile { | |
| int32 id = 1; |
| syntax = "proto3"; | |
| package resources; | |
| message User { | |
| int32 id = 1; | |
| Profile profile = 2; | |
| } | |
| message Profile { | |
| int32 id = 1; |
| // Rewrite code with `parser!` macro. | |
| // Target: https://github.com/Marwes/combine/blob/f32fe7c135b8c3104843939b7b505f8b0ea4862e/benches/json.rs | |
| #[macro_use] | |
| extern crate combine; | |
| use std::collections::hash_map::HashMap; | |
| use combine::parser::char::{char, string, digit, spaces}; | |
| use combine::parser::choice::{choice, optional}; |
| #include "stdio.h" | |
| int main(int argc, char** argv) { | |
| printf("Hello, World!\n"); | |
| return 0; | |
| } |
| #include "stdlib.h" | |
| #include "stdio.h" | |
| int fib(int n) { | |
| if (n == 0 || n == 1) { | |
| return 1; | |
| } else { | |
| return fib(n - 1) + fib(n - 2); | |
| } | |
| } |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX_N 100 | |
| typedef struct { | |
| int nodes[MAX_N]; | |
| int size; | |
| } Heap; |
| ## Definition of assert! | |
| class AssertError < RuntimeError; end | |
| def assert!(&block) | |
| raise AssertError.new("Assertion failed!") if !block.call | |
| rescue AssertError => e | |
| print e | |
| code = <<-CODE | |
| require 'pry' | |
| binding.pry | |
| CODE |
9:00にオフィス(Sticky Fingers)
食料品は事前に用意しておく。食べ過ぎない。胃に負担をかけないようにする。
運営の櫛井さんからのメールに従って、サポートチャットと予選ポータルサイトにログインする。