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
a=*$<.map{|s|s.scan /[a-z]+/i} | |
a[0]+=x=[i=0] | |
a.map{n=*x | |
a.map{|b|(b&x)[0]&&n+=b} | |
exit p i if(["Erdos"]&x=n)[0] | |
i+=1} | |
puts"Inf" |
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 break_if_enough divisible, divisor, to_return = nil | |
q, r = {{divisible}}.divmod {{divisor}} | |
{% if to_return %} | |
return false if r == 0 | |
return true if q <= {{divisor}} | |
{% else %} | |
break false if r == 0 | |
break true if q <= {{divisor}} | |
{% 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
macro break_if_enough divisible, divisor, to_return = nil | |
q, r = {{divisible}}.divmod {{divisor}} | |
{% if to_return %} | |
return false if r == 0 | |
return true if q <= {{divisor}} | |
{% else %} | |
break false if r == 0 | |
break true if q <= {{divisor}} | |
{% 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
#include <stdio.h> | |
#include <assert.h> | |
#include <math.h> | |
struct prime { | |
int32_t value; | |
prime* next; | |
}; | |
prime primes = { 2, NULL }; | |
prime* tail = ℙ |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKOJygfeqxk6yVuQdEdarz7BRtYKOa15NpzVhWdt9BltQY3y9R74UpEbYAd3/C3Fax+mQp4kJy7eBO4wxRBUl0/EIkMq691dwAajLK3U0nZylWRZDUjNpXMhZ8W1W95xv3/Li3o4ssi3Ns9Dkny7/aQOVPl/ggUFIG4jVebkxcv0b0b84Aq6jEGwIV8Og1Ps2FjoHvUw1SlAoNj2wRQfMW6BzbzOkyCeTwzl7gk2D1f8XysyY0WeJGQn3m3WnTAY8oSDLCCSzUNbP/swekdGf5j9M3ldhlf9OJb39/aq+dYCDItteu/KQj5av8btn4ntmv8Gf+y5O+n3AuXD7VQwh7 nakilon@nakibook.local |
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
‐=!ϐ=ʚ=‐ | |
ʚ.define_singleton_method(:<<){|∣|@∣=∣} | |
ʚ.define_singleton_method(:-){|∣|∣ if-1<@∣-=1} | |
ʚ << 4 | |
until ϐ==ʚ-‐ | |
puts "he" | |
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
source "https://rubygems.org" | |
gem "net_http_utils", ?0, gist: "97549ceb58d21e1fcbc0e6cdaf92fce8" | |
gem "nokogiri" | |
gem "byebug" |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKOJygfeqxk6yVuQdEdarz7BRtYKOa15NpzVhWdt9BltQY3y9R74UpEbYAd3/C3Fax+mQp4kJy7eBO4wxRBUl0/EIkMq691dwAajLK3U0nZylWRZDUjNpXMhZ8W1W95xv3/Li3o4ssi3Ns9Dkny7/aQOVPl/ggUFIG4jVebkxcv0b0b84Aq6jEGwIV8Og1Ps2FjoHvUw1SlAoNj2wRQfMW6BzbzOkyCeTwzl7gk2D1f8XysyY0WeJGQn3m3WnTAY8oSDLCCSzUNbP/swekdGf5j9M3ldhlf9OJb39/aq+dYCDItteu/KQj5av8btn4ntmv8Gf+y5O+n3AuXD7VQwh7 nakilon@nakibook.local |
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
# either run it in irb or .join some thread to prevent program exit | |
i = 0 | |
Thread.new do | |
puts i while sleep 1 | |
end | |
Thread.new do | |
loop{ i += 1 } | |
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
ENV["GCLOUD_KEYFILE"] = "./key.json" | |
require "gcloud" | |
GV = Gcloud.new("my_app").vision | |
GV.annotate( | |
GV.image("./google_vision/temp.jpg"), | |
labels: true, | |
).gapi.to_h | |
OlderNewer