repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
martinos/http_fp
test/http_fn/httpie_test.rb
<filename>test/http_fn/httpie_test.rb require "minitest_helper" require "http_fn" require "http_fn/rack" require "http_fn/httpie" class HttpFn::CurlTest < Minitest::Test include HttpFn def setup @curl = (verb.("GET") >> with_path.("/coucou") >> with_headers.(json_headers) >> with_host.("https://api.github.com") >> with_json.({ user: "martin" }) >> HttpFn::Httpie.req).(empty_req) end def test_should_return_a_curl_command res = <<EOF echo $'{"user":"martin"}' |\\ http GET 'https://api.github.com/coucou?' \\ 'accept: application/json' \\ 'Content-Type: application/json' \\ 'user-agent: paw/3.0.11 (macintosh; os x/10.11.6) gcdhttprequest' EOF assert_equal res.chomp, @curl end end
martinos/http_fp
lib/http_fn/curl.rb
<reponame>martinos/http_fp require "net/http" require "http_fn" module HttpFn::Curl include HttpFn fn_reader :print_curl, :req @@req = -> req { first_part = %{curl -X '#{req[:method]}' '#{HttpFn::to_uri.(req).to_s}' #{req[:header].map(&@@header_to_curl).join(" ")}} if req[:body] && !req[:body].empty? first_part + %{\n\ -d $'#{req[:body].gsub("'", "\'")}'} else first_part end } @@header_to_curl = -> a { "\\\n -H '#{a[0]}: #{a[1]}'" } @@print_curl = -> req { $stdout.puts(to_curl.(req)); req }.curry end
martinos/http_fp
lib/http_fn/utils.rb
<reponame>martinos/http_fp<gh_stars>0 require "json" require "pp" require "yaml" module Utils fn_reader :parse_json, :debug, :at, :retry_fn, :record, :player, :count_by, :cache, :red, :time, :expired, :apply, :and_then, :default, :map, :get, :try @@parse_json = JSON.method(:parse) @@debug = -> print, a, b { print.(a); print.(b.to_s); b }.curry @@at = -> key, hash { hash[key] }.curry @@red = -> a { "\033[31m#{a}\033[0m" } # ( a -> b ) -> a -> b @@try = -> f, a { a.nil? ? nil : f.(a) }.curry @@retry_fn = -> fn, a { begin fn.(a) rescue sleep(1) puts "RETRYING" @@retry_fn.(fn).(a) end }.curry @@record = -> filename, to_save { File.open(filename, "w+") { |a| a << to_save.to_yaml } to_save }.curry @@play = -> filename, _params { YAML.load(File.read(filename)) }.curry # (Float -> String -> Bool) -> String -> (a -> b) -> b @@cache = -> expired, filename, fn, param { if expired.(filename) @@record.(filename).(fn.(param)) else puts "reading from cache" @@play.(filename).(nil) end }.curry @@expired = -> sec, a { !File.exist?(a) || (Time.now - File.mtime(a)) > sec }.curry @@count_by = -> fn, a { a.inject({}) do |res, a| by = fn.(a) res[by] ||= 0 res[by] += 1 res end }.curry # (String -> String) -> String -> ( a -> b ) -> a -> b @@time = -> print, msg, fn, a { start_time = Time.now res = fn.(a) print.("Time duration for #{msg} = #{Time.now - start_time}") res }.curry @@apply = -> method, a { a.send(method) }.curry @@default = -> default, a { a.nil? ? default : a }.curry @@and_then = -> f, a { a.nil? ? nil : f.(a) }.curry @@map = -> f, enum { enum.map(&f) }.curry @@at = -> key, hash { hash; hash[key] }.curry @@get = -> method, obj { obj.send(method) }.curry end
seouri/rails-template
template.rb
git :init git add: "." git commit: "-a -m 'Initial commit'" gem_group :development, :test do gem "bundler-audit", require: false gem "dotenv-rails" gem "pronto-brakeman", require: false gem "pronto-fasterer", require: false gem "pronto-flay", require: false gem "pronto-rails_best_practices", require: false gem "pronto-reek", require: false gem "pronto-rubocop", require: false gem "pronto-simplecov", require: false gem "pronto", require: false gem "pry-rails" gem "ruby_audit", require: false end gem_group :development do gem "bullet" gem "letter_opener_web" end gem_group :test do gem "minitest-ci" gem "simplecov", require: false end gem "ar-uuid" # pry-rails gem file ".pryrc", <<-CODE if defined?(PryRails::RAILS_PROMPT) Pry.config.prompt = PryRails::RAILS_PROMPT end CODE # bullet gem environment nil, env: "development" do <<-CODE config.after_initialize do Bullet.enable = true Bullet.alert = true Bullet.bullet_logger = true Bullet.console = true Bullet.rails_logger = true Bullet.add_footer = true end CODE end # dotenv-rails gem file ".env", "" file ".env.development", "" file ".env.local", "" file ".env.test", "" run "echo '.env.local' >> .gitignore" # minitest-ci gem run "echo '/test/reports' >> .gitignore" # letter_opener_web gem environment "config.action_mailer.delivery_method = :letter_opener_web", env: "development" route <<-CODE mount LetterOpenerWeb::Engine, at: '/sent_emails' if Rails.env.development? CODE file ".rubocop.yml", <<-CODE Metrics/BlockLength: Exclude: - 'config/environments/development.rb' Metrics/LineLength: Max: 130 Style/ClassAndModuleChildren: Exclude: - 'test/test_helper.rb' Style/Documentation: Exclude: - 'app/helpers/application_helper.rb' - 'app/mailers/application_mailer.rb' - 'app/models/application_record.rb' - 'config/application.rb' - 'spec/**/*' - 'test/**/*' - 'vendor/**/*' Style/MixinUsage: Exclude: - 'bin/setup' - 'bin/update' CODE # simplecov gem run "echo 'coverage' >> .gitignore" prepend_to_file "test/test_helper.rb", "require 'simplecov'\n" file ".simplecov", <<-CODE SimpleCov.start 'rails' do # any custom configs like groups and filters can be here at a central place end CODE # rvm file ".ruby-gemset", "#{app_name}" run "rvm gemset create #{app_name}" # CircleCI file ".circleci/config.yml", <<-CODE version: 2 jobs: build: parallelism: 1 docker: - image: circleci/ruby:2.5.1-node-browsers - image: circleci/postgres:9.6.9-alpine-ram environment: RAILS_ENV: "test" PGHOST: "localhost" PGUSER: "postgres" steps: - checkout - restore_cache: keys: - gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }} - gem-cache-{{ checksum "Gemfile.lock" }} - gem-cache # For rugged gem (pronto gem dependency) - run: sudo apt-get install cmake - run: name: Bundle Install command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs=4 --retry=3 - run: name: Ruby Audit command: bundle exec ruby-audit check - run: name: Bundle Audit command: bundle exec bundle-audit check --update - run: name: Brakeman command: bundle exec brakeman - run: name: Rubocop command: bundle exec rubocop # Store bundle cache - save_cache: key: gem-cache-{{ .Branch }}-{{ checksum "Gemfile.lock" }} paths: - vendor/bundle - save_cache: key: gem-cache-{{ checksum "Gemfile.lock" }} paths: - vendor/bundle - save_cache: key: gem-cache paths: - vendor/bundle - run: name: Set up DB command: bundle exec rails db:setup - run: name: Rails Test command: bundle exec rake test - store_test_results: path: test/reports destination: test-results/rails - store_artifacts: path: test/reports destination: test-results/MiniTest - store_artifacts: path: coverage destination: coverage CODE # README file "README.md", <<-CODE ## Getting Started 1. Install [Homebrew](https://brew.sh/): ```sh /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ``` 2. Install OpenSSL libraries: ```sh brew install openssl ``` 3. Install RVM and Ruby: ```sh curl -sSL https://get.rvm.io | bash -s stable # In a new session (restart your terminal or open new tab): rvm install 2.5.1 --default --with-openssl-dir=`brew --prefix openssl` ``` 4. Set up RVM gemset: ```sh rvm gemset create #{app_name} rvm use 2.5.1@#{app_name} gem update --system gem update bundler gem install nokogiri -- --use-system-libraries=true --with-xml2-include=`xcrun --show-sdk-path`/usr/include/libxml2 ``` CODE after_bundle do run "bundle install" rails_command("db:create") rails_command("db:migrate") run "rubocop -a" git add: "." git commit: "-a -m 'Set up development environment'" end
glasner/tweethook
lib/tweethook/result.rb
class Tweethook::Result attr_accessor :user, :tweet, :usrimg, :tid, :tstamp, :unix_tstamp, :is_reply, :is_retweet, :mentions, :source, :sourcelink, :search_query def initialize(args) args.each { |key,value| instance_variable_set("@#{key}",value) } change_boolean_values end def change_boolean_values @is_reply = !@is_reply.zero? @is_retweet = !@is_retweet.zero? end def reply? @is_reply end def retweet? @is_retweet end end
glasner/tweethook
test/test_search.rb
require 'helper' class TestSearch < Test::Unit::TestCase context "instantiating Search with parsed JSON from API" do subject { @search } setup do @json = '{ "id": 12560300, "search": "\"hello world\"", "webhook": "http:\/\/example.com\/webhook.php", "active": "1", "format": "post" }' @parsed_json = JSON.parse(@json) @search = Tweethook::Search.new(@parsed_json) end should 'save id in accessible instance variable' do assert @search.id.eql?(@parsed_json['id']) end should 'save search in accessible instance variable' do assert @search.search.eql?(@parsed_json['search']) end should 'save webhook in accessible instance variable' do assert @search.webhook.eql?(@parsed_json['webhook']) end should 'save active in acessible instance variable as boolean value' do assert @search.active.eql?(true) end end context "instantiating Search with Hash with symbol keys" do subject { @search } setup do @hash = { :id => 1256033, :search => 'hello world', :webhook => 'http://somewhere.com', :active => true, :format => "post" } @search = Tweethook::Search.new(@hash) end should 'save :id in accessible instance variable' do assert @search.id.eql?(@hash[:id]) end should 'save :search in accessible instance variable' do assert @search.search.eql?(@hash[:search]) end should 'save :webhook in accessible instance variable' do assert @search.webhook.eql?(@hash[:webhook]) end end context "saving a new Search record" do subject {@search} setup do @args = {:search => 'monkey', :webhook => 'http://there.com'} @search = Tweethook::Search.new(@args) @search.save end should "have an id" do assert_not_nil @search.id @search.destroy end end context "creating a new Search record" do subject { @search } setup do @query = 'monkey' @args = {:webhook => 'http://there.com'} @search = Tweethook::Search.create(@query,@args) end should "have an id" do assert_not_nil @search.id @search.destroy end end end
glasner/tweethook
lib/tweethook/search.rb
class Tweethook::Search # create a new search at Tweethook # Tweethook::Search.create('monkey', :webhook => 'http://where.com/callback' ) def self.create(search,args) args.merge!({:search => search}) search = new(args) search.save end def self.find(id) response = Tweethook.get('/info.json', :id => id) return nil if response.nil? new(response.first) end def self.list response = Tweethook.get('/list.json') return [] if response.nil? response.map { |hash| Tweethook::Search.new(hash) } end attr_accessor :id, :search, :webhook, :active def initialize(args) # change string keys to symbols if args.any? { |arg| arg.is_a?(String) } args = args.inject({}) { |output,array| key,value = array; output[key.to_sym] = value;output } end # setup instance variable for every arg args.each { |key,value| instance_variable_set("@#{key}",value) } @format ||= 'json' change_active_to_boolean end def change_active_to_boolean # @active defaults to true @active = true if @active.nil? # change @active to boolean value if it's an integer @active = !@active.to_i.zero? if @active.is_a?(String) end def save return modify unless new_record? response = Tweethook.post('/create.json',:search => @search, :webhook => @webhook, :active => @active) return nil if response.nil? @id = response.first['id'] self end def modify response = Tweethook.post('/modify.json', :id => @id, :search => @search, :webhook => @webhook, :active => @active) return nil if response.nil? self end def new_record? not @id.nil? end def start response = Tweethook.post('/start.json', :id => @id) return false if response.nil? @active = true end alias :resume :start def stop response = Tweethook.post('/stop.json', :id => @id) return false if response.nil? @active = false end alias :pause :stop def destroy response = Tweethook.post('/destroy.json',:id => @id) return false if response.nil? self.id = nil if response.first['id'].eql?(@id) end end
glasner/tweethook
test/test_post.rb
<gh_stars>0 require 'helper' require 'time' class TestPost < Test::Unit::TestCase context "instantiating TestPost with valid JSON" do subject { @post } setup do @json = '{ "status_count": 2, "signature": "XXXXXXXXXXXXXXXXXXXXXXXX", "time": 1253055217, "results": [{ "user": "deputy5765", "tweet": "@Lu_Guz You will have to install a Twitter application in Facebook. Log in, search Twitter, install the app, then enter the info #geeksquad", "usrimg": "http:\/\/a3.twimg.com\/profile_images\/107659093\/0_normal.jpg", "tid": 4015703048, "tstamp": "Tue, 15 Sep 2009 22:53:12 +0000", "unix_tstamp": 1253055192, "is_reply": 1, "is_retweet": 0, "mentions": "Lu_Guz", "source": "Tweetie", "sourcelink": "http:\/\/www.atebits.com\/", "search_query": "twitter" }, { "user": "heatherkentart", "tweet": "@k8otomato - Thanks, I will definitely try later. I will also postpone any negative opinions of Twitter. :D", "usrimg": "http:\/\/a3.twimg.com\/profile_images\/417128285\/me_normal.jpg", "tid": 4015703318, "tstamp": "Tue, 15 Sep 2009 22:53:11 +0000", "unix_tstamp": 1253055191, "is_reply": 1, "is_retweet": 0, "mentions": "k8otomato", "source": "web", "sourcelink": "http:\/\/twitter.com\/", "search_query": "twitter" } ]}' @parsed_json = JSON.parse(@json) @post = Tweethook::Post.new(@json) end should "take json payload" do assert subject end should "have the same size as given json['results']" do assert subject.size.eql?(@parsed_json['results'].size) end should "parse json['results'] into hash of Result objects" do assert subject.all? { |element| element.is_a?(Tweethook::Result) } end should "save post signature into accessible instance variable" do assert subject.signature.eql?(@parsed_json['signature']) end should "save post time into accessible instance variable" do assert subject.time.eql?(Time.at(@parsed_json['time'])) end end end
glasner/tweethook
lib/tweethook.rb
$:.unshift File.expand_path(File.dirname(__FILE__)) require 'typhoeus' require 'json' class Tweethook autoload :Search, 'tweethook/search' autoload :Post, 'tweethook/post' autoload :Result, 'tweethook/result' def self.user ENV['TWEETHOOK_API_USER'] end def self.password ENV['<PASSWORD>'] end def self.signature ENV['TWEETHOOK_SIGNATURE'] end def self.post(path,params) response = Typhoeus::Request.post(Tweethook.url(path), :params => params) response.body.empty? ? nil : JSON.parse(response.body) end def self.get(path,*params) params = params.empty? ? nil : params.first response = Typhoeus::Request.get(Tweethook.url(path), :params => params) return nil if response.code.eql?(403) result = JSON.parse(response.body) end def self.url(path) "https://#{Tweethook.user}:#{Tweethook.password}@api.tweethook.com#{path}" end end
glasner/tweethook
lib/tweethook/post.rb
<filename>lib/tweethook/post.rb<gh_stars>0 class Tweethook::Post < Array attr_accessor :signature, :time def initialize(json) hash = json.is_a?(Hash) ? json : JSON.parse(json) @signature = hash['signature'] @time = Time.at(hash['time']) super(hash['results'].map { |result| Tweethook::Result.new(result) }) end def valid? @signature.eql?(Tweethook.signature) end end
alextaylor000/emoji-formatter
spec/test_output_spec.rb
<reponame>alextaylor000/emoji-formatter require "spec_helper" describe EmojiFormatter do describe "demo tests" do 100.times do |i| it "runs test #{i}" do expect(true).to eq([true, true, false].sample) sleep(rand(0.75)) end end xit "is pending" do raise "pending" end it "shows a stack trace" do method_a end def method_a; method_b; end def method_b; method_c; end def method_c; method_d; end def method_e; method_f; end def method f; raise "Oops a failure!"; end end end
alextaylor000/emoji-formatter
lib/emoji_formatter.rb
<reponame>alextaylor000/emoji-formatter require "emoji_formatter/formatter"
alextaylor000/emoji-formatter
lib/emoji_formatter/formatter.rb
<reponame>alextaylor000/emoji-formatter require "rspec/core/formatters/console_codes" class EmojiFormatter PROGRESS_ICONS = { :example_passed => "\u{1f600}", :example_failed => "\u{1f621}", :example_pending => "\u{1f537}" } RSpec::Core::Formatters.register self, :start, :example_passed, :example_failed, :example_pending, :dump_failures, :dump_summary def initialize(output) @output = output end def start(_) @output << "\n" end def example_passed(_) example_result(:example_passed) end def example_failed(_) example_result(:example_failed) end def example_pending(_) example_result(:example_pending) end def dump_failures(notifications) @output << "\n\n" notifications.failure_notifications.each_with_index do |notification, i| data = { i: i + 1, desc: notification.description } @output << "%4<i>s) %<desc>s\n" % data @output << " `bundle exec rspec #{notification.example.location_rerun_argument}`\n\n" notification.colorized_message_lines.each do |line| @output << " #{line}\n" end notification.colorized_formatted_backtrace.each do |line| @output << " #{line}\n" end @output << "\n\n" end end def dump_summary(summary) final_stats = "#{summary.examples.count} examples:\ #{summary.failed_examples.count} #{PROGRESS_ICONS[:example_failed]} \ #{summary.pending_examples.count} #{PROGRESS_ICONS[:example_pending]} " @output << final_stats puts "" # without this we get a % at the end of the output... end private def example_result(type) string = PROGRESS_ICONS[type] @output << "#{string} " end end
seattlerb/omnifocus-rubyforge
lib/omnifocus/rubyforge.rb
<reponame>seattlerb/omnifocus-rubyforge require 'rubyforge' module OmniFocus::Rubyforge VERSION = '1.1.1' RF_URL = "http://rubyforge.org" PREFIX = "RF" def rubyforge unless defined? @rubyforge then @rubyforge = RubyForge.new @rubyforge.configure end @rubyforge end def login_to_rubyforge m, login_url = mechanize, "/account/login.php" m.get("#{RF_URL}#{login_url}").form_with(:action => login_url) do |f| f.form_loginname = rubyforge.userconfig["username"] f.form_pw = rubyforge.userconfig["password"] end.click_button end def populate_rubyforge_tasks home = login_to_rubyforge # nuke all the tracker links on "My Page" after "My Submitted Items" node = home.root.xpath('//tr[td[text() = "My Submitted Items"]]').first loop do prev, node = node, node.next prev.remove break unless node end group_ids = rubyforge.autoconfig["group_ids"].invert rubyforge_tickets = home.links_with(:href => /^.tracker/) rubyforge_tickets.each do |link| if link.href =~ /func=detail&aid=(\d+)&group_id=(\d+)&atid=(\d+)/ then ticket_id, group_id = "#{PREFIX}##{$1}", $2.to_i group = group_ids[group_id] next unless group if existing[ticket_id] then project = existing[ticket_id] bug_db[project][ticket_id] = true next end warn "scanning ticket #{ticket_id}" details = link.click.form_with :action => /^.tracker/ select = details.field_with :name => "category_id" project = select.selected_options.first project = project ? project.text.downcase : group project = group if project =~ /\s/ title = "#{ticket_id}: #{link.text}" url = "#{RF_URL}/#{link.href}" bug_db[project][ticket_id] = [title, url] end end end end
Shopify/annex-29
spec/spec_helper.rb
RSpec.configure do |config| config.expect_with(:rspec) do |expectations| expectations.include_chain_clauses_in_custom_matcher_descriptions = true end config.mock_with(:rspec) do |mocks| mocks.verify_partial_doubles = true end config.disable_monkey_patching! config.example_status_persistence_file_path = "spec/examples.txt" config.shared_context_metadata_behavior = :apply_to_host_groups config.order = :random Kernel.srand(config.seed) end require("annex_29")
Shopify/annex-29
lib/annex_29/word_segmentation.rb
# line 1 "lib/annex_29/word_segmentation.rl" module Annex29 module WordSegmentation # line 170 "lib/annex_29/word_segmentation.rl" # line 13 "lib/annex_29/word_segmentation.rb" class << self attr_accessor :_segmenter_key_offsets private :_segmenter_key_offsets, :_segmenter_key_offsets= end self._segmenter_key_offsets = [ 0, 583, 1943, 2434, 3617, 4091, 4092, 5588, 6866, 8364, 9862, 11344, 11841, 12341, 12820, 13296 ] class << self attr_accessor :_segmenter_trans_keys private :_segmenter_trans_keys, :_segmenter_trans_keys= end self._segmenter_trans_keys = [ 173, 1471, 1479, 1564, 1643, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 917505, 48, 57, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1632, 1641, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1776, 1785, 1840, 1866, 1958, 1968, 1984, 1993, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2406, 2415, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2534, 2543, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2662, 2671, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2790, 2799, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 2918, 2927, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3174, 3183, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3302, 3311, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3430, 3439, 3458, 3459, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4240, 4249, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6277, 6278, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6679, 6683, 6741, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6832, 6846, 6912, 6916, 6964, 6980, 6992, 7001, 7019, 7027, 7040, 7042, 7073, 7085, 7088, 7097, 7142, 7155, 7204, 7223, 7232, 7241, 7248, 7257, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42528, 42537, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43216, 43225, 43232, 43249, 43264, 43273, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43472, 43481, 43504, 43513, 43561, 43574, 43596, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 44016, 44025, 65024, 65039, 65056, 65071, 65296, 65305, 65438, 65439, 65529, 65531, 66422, 66426, 66720, 66729, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69734, 69743, 69759, 69762, 69808, 69818, 69872, 69881, 69888, 69890, 69927, 69940, 69942, 69951, 70016, 70018, 70067, 70080, 70090, 70092, 70096, 70105, 70188, 70199, 70367, 70378, 70384, 70393, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70736, 70745, 70832, 70851, 70864, 70873, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71248, 71257, 71339, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71904, 71913, 72751, 72758, 72760, 72767, 72784, 72793, 72850, 72871, 72873, 72886, 92768, 92777, 92912, 92916, 92976, 92982, 93008, 93017, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 125264, 125273, 917536, 917631, 917760, 917999, 170, 173, 181, 186, 748, 750, 895, 902, 908, 1369, 1471, 1479, 1564, 1648, 1749, 1791, 1808, 1969, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2519, 2620, 2641, 2654, 2677, 2749, 2768, 2809, 2877, 2929, 2946, 2947, 2972, 3024, 3031, 3133, 3200, 3261, 3294, 3389, 3406, 3415, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4239, 4295, 4301, 4696, 4800, 6109, 6313, 6783, 7405, 8025, 8027, 8029, 8126, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11647, 11823, 12293, 43010, 43014, 43019, 43259, 43261, 43471, 43493, 43587, 43696, 43713, 64286, 64318, 65279, 66045, 66272, 67592, 67644, 68096, 68159, 69821, 70003, 70006, 70106, 70108, 70206, 70280, 70461, 70480, 70487, 70855, 71236, 71935, 72768, 94032, 94176, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 879, 880, 884, 886, 887, 890, 893, 904, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1161, 1162, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1523, 1536, 1541, 1552, 1562, 1568, 1610, 1611, 1631, 1646, 1747, 1750, 1757, 1759, 1764, 1765, 1766, 1767, 1768, 1770, 1773, 1774, 1775, 1786, 1788, 1807, 1809, 1810, 1839, 1840, 1866, 1869, 1957, 1958, 1968, 1994, 2026, 2027, 2035, 2036, 2037, 2048, 2069, 2070, 2093, 2112, 2136, 2137, 2139, 2208, 2228, 2230, 2237, 2260, 2307, 2308, 2361, 2362, 2391, 2392, 2401, 2402, 2403, 2417, 2432, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2509, 2524, 2525, 2527, 2529, 2530, 2531, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2672, 2673, 2674, 2676, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2785, 2786, 2787, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2914, 2915, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3169, 3170, 3171, 3201, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3297, 3298, 3299, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3390, 3396, 3398, 3400, 3402, 3405, 3412, 3414, 3423, 3425, 3426, 3427, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3904, 3911, 3913, 3948, 3953, 3972, 3974, 3975, 3976, 3980, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5906, 5908, 5920, 5937, 5938, 5940, 5952, 5969, 5970, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6155, 6158, 6176, 6263, 6272, 6276, 6277, 6278, 6279, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6656, 6678, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6917, 6963, 6964, 6980, 6981, 6987, 7019, 7027, 7040, 7042, 7043, 7072, 7073, 7085, 7086, 7087, 7098, 7141, 7142, 7155, 7168, 7203, 7204, 7223, 7245, 7247, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7400, 7401, 7409, 7410, 7412, 7413, 7414, 7416, 7417, 7424, 7615, 7616, 7669, 7675, 7679, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11503, 11505, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12347, 12348, 12441, 12442, 12549, 12589, 12593, 12686, 12704, 12730, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42607, 42610, 42612, 42621, 42623, 42653, 42654, 42655, 42656, 42735, 42736, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43042, 43043, 43047, 43072, 43123, 43136, 43137, 43138, 43187, 43188, 43205, 43232, 43249, 43250, 43255, 43274, 43301, 43302, 43309, 43312, 43334, 43335, 43347, 43360, 43388, 43392, 43395, 43396, 43442, 43443, 43456, 43520, 43560, 43561, 43574, 43584, 43595, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43754, 43755, 43759, 43762, 43764, 43765, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44003, 44010, 44012, 44013, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66422, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68097, 68099, 68101, 68102, 68108, 68111, 68112, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68325, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69634, 69635, 69687, 69688, 69702, 69759, 69762, 69763, 69807, 69808, 69818, 69840, 69864, 69888, 69890, 69891, 69926, 69927, 69940, 69968, 70002, 70016, 70018, 70019, 70066, 70067, 70080, 70081, 70084, 70090, 70092, 70144, 70161, 70163, 70187, 70188, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70367, 70378, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70497, 70498, 70499, 70502, 70508, 70512, 70516, 70656, 70708, 70709, 70726, 70727, 70730, 70784, 70831, 70832, 70851, 70852, 70853, 71040, 71086, 71087, 71093, 71096, 71104, 71128, 71131, 71132, 71133, 71168, 71215, 71216, 71232, 71296, 71338, 71339, 71351, 71453, 71467, 71840, 71903, 72384, 72440, 72704, 72712, 72714, 72750, 72751, 72758, 72760, 72767, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92880, 92909, 92912, 92916, 92928, 92975, 92976, 92982, 92992, 92995, 93027, 93047, 93053, 93071, 93952, 94020, 94033, 94078, 94095, 94098, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125251, 125252, 125258, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 64318, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 917536, 917631, 917760, 917999, 13, 95, 133, 170, 181, 186, 748, 750, 895, 902, 908, 1369, 1523, 1643, 1749, 1791, 1808, 1969, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2654, 2749, 2768, 2809, 2877, 2929, 2947, 2972, 3024, 3133, 3200, 3261, 3294, 3389, 3406, 3517, 3716, 3722, 3725, 3749, 3751, 3782, 3840, 4295, 4301, 4696, 4800, 6103, 6314, 6618, 8025, 8027, 8029, 8126, 8205, 8239, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 9757, 9977, 11559, 11565, 11631, 11823, 12293, 43259, 43261, 43471, 64285, 64318, 65343, 67592, 67644, 68096, 70006, 70106, 70108, 70280, 70461, 70480, 70855, 71236, 71487, 71935, 72768, 94032, 94176, 110592, 119970, 119995, 120134, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 127877, 128110, 128124, 128170, 128373, 128378, 128400, 128675, 128704, 129318, 129328, 10, 12, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 880, 884, 886, 887, 890, 893, 904, 906, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1632, 1641, 1646, 1647, 1649, 1747, 1765, 1766, 1774, 1775, 1776, 1785, 1786, 1788, 1810, 1839, 1869, 1957, 1984, 1993, 1994, 2026, 2036, 2037, 2048, 2069, 2112, 2136, 2208, 2228, 2230, 2237, 2308, 2361, 2392, 2401, 2406, 2415, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2524, 2525, 2527, 2529, 2534, 2543, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2662, 2671, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2784, 2785, 2790, 2799, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2908, 2909, 2911, 2913, 2918, 2927, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3046, 3055, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3160, 3162, 3168, 3169, 3174, 3183, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3296, 3297, 3302, 3311, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3412, 3414, 3423, 3425, 3430, 3439, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3558, 3567, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3719, 3720, 3732, 3735, 3737, 3743, 3745, 3747, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3784, 3789, 3792, 3801, 3804, 3807, 3872, 3881, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4159, 4160, 4169, 4176, 4239, 4240, 4249, 4250, 4255, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6099, 6108, 6109, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6276, 6279, 6312, 6320, 6389, 6400, 6430, 6470, 6479, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6622, 6623, 6656, 6678, 6688, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6816, 6829, 6917, 6963, 6981, 6987, 6992, 7001, 7043, 7072, 7086, 7087, 7088, 7097, 7098, 7141, 7168, 7203, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8232, 8233, 8255, 8256, 8336, 8348, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 9994, 9997, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12337, 12341, 12347, 12348, 12443, 12444, 12448, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13008, 13054, 13056, 13143, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43216, 43225, 43250, 43255, 43264, 43273, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43472, 43481, 43488, 43503, 43504, 43513, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43600, 43609, 43616, 43714, 43739, 43743, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64287, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65382, 65437, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68112, 68115, 68117, 68119, 68121, 68147, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69635, 69687, 69734, 69743, 69763, 69807, 69840, 69864, 69872, 69881, 69891, 69926, 69942, 69951, 69968, 70002, 70019, 70066, 70081, 70084, 70096, 70105, 70144, 70161, 70163, 70187, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70384, 70393, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70493, 70497, 70656, 70708, 70727, 70730, 70736, 70745, 70784, 70831, 70852, 70853, 70864, 70873, 71040, 71086, 71128, 71131, 71168, 71215, 71248, 71257, 71296, 71338, 71360, 71369, 71424, 71449, 71453, 71467, 71472, 71481, 71482, 71483, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72750, 72784, 72793, 72818, 72847, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92928, 92975, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 124928, 125124, 125184, 125251, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 127462, 127487, 127939, 127940, 127946, 127947, 128066, 128067, 128070, 128080, 128102, 128105, 128112, 128120, 128129, 128131, 128133, 128135, 128405, 128406, 128581, 128583, 128587, 128591, 128692, 128694, 129304, 129310, 129331, 129337, 129340, 129342, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 917536, 917631, 917760, 917999, 10, 39, 44, 46, 59, 95, 170, 173, 181, 186, 748, 750, 894, 902, 908, 1369, 1417, 1471, 1479, 1523, 1564, 1643, 1644, 1648, 1749, 1791, 1808, 1969, 2040, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2519, 2620, 2641, 2654, 2677, 2749, 2768, 2809, 2877, 2929, 2946, 2947, 2972, 3024, 3031, 3133, 3200, 3261, 3294, 3389, 3406, 3415, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4295, 4301, 4696, 4800, 6109, 6313, 7405, 8025, 8027, 8029, 8126, 8228, 8239, 8260, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11647, 11823, 12293, 43010, 43014, 43019, 43259, 43261, 43471, 43493, 43587, 43696, 43713, 64286, 64318, 65040, 65044, 65104, 65106, 65108, 65279, 65287, 65292, 65294, 65307, 65343, 66045, 66272, 67592, 67644, 68096, 68159, 69821, 70003, 70006, 70106, 70108, 70206, 70280, 70461, 70480, 70487, 70855, 71236, 71935, 72768, 94032, 94176, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 879, 880, 884, 886, 887, 890, 895, 904, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1161, 1162, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1548, 1549, 1552, 1562, 1568, 1610, 1611, 1641, 1646, 1747, 1750, 1757, 1759, 1764, 1765, 1766, 1767, 1768, 1770, 1773, 1774, 1775, 1776, 1785, 1786, 1788, 1807, 1809, 1810, 1839, 1840, 1866, 1869, 1957, 1958, 1968, 1984, 1993, 1994, 2026, 2027, 2035, 2036, 2037, 2048, 2069, 2070, 2093, 2112, 2136, 2137, 2139, 2208, 2228, 2230, 2237, 2260, 2307, 2308, 2361, 2362, 2391, 2392, 2401, 2402, 2403, 2406, 2415, 2417, 2432, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2509, 2524, 2525, 2527, 2529, 2530, 2531, 2534, 2543, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2662, 2673, 2674, 2676, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2785, 2786, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2914, 2915, 2918, 2927, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3169, 3170, 3171, 3174, 3183, 3201, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3297, 3298, 3299, 3302, 3311, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3390, 3396, 3398, 3400, 3402, 3405, 3412, 3414, 3423, 3425, 3426, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3903, 3904, 3911, 3913, 3948, 3953, 3972, 3974, 3975, 3976, 3980, 3981, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4239, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5906, 5908, 5920, 5937, 5938, 5940, 5952, 5969, 5970, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6176, 6263, 6272, 6276, 6277, 6278, 6279, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6656, 6678, 6679, 6683, 6741, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6832, 6846, 6912, 6916, 6917, 6963, 6964, 6980, 6981, 6987, 6992, 7001, 7019, 7027, 7040, 7042, 7043, 7072, 7073, 7085, 7086, 7087, 7088, 7097, 7098, 7141, 7142, 7155, 7168, 7203, 7204, 7223, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7400, 7401, 7409, 7410, 7412, 7413, 7414, 7416, 7417, 7424, 7615, 7616, 7669, 7675, 7679, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8216, 8217, 8234, 8238, 8255, 8256, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11503, 11505, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12347, 12348, 12441, 12442, 12549, 12589, 12593, 12686, 12704, 12730, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42606, 42607, 42610, 42612, 42621, 42623, 42653, 42654, 42655, 42656, 42735, 42736, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43042, 43043, 43047, 43072, 43123, 43136, 43137, 43138, 43187, 43188, 43205, 43216, 43225, 43232, 43249, 43250, 43255, 43264, 43273, 43274, 43301, 43302, 43309, 43312, 43334, 43335, 43347, 43360, 43388, 43392, 43395, 43396, 43442, 43443, 43456, 43472, 43481, 43504, 43513, 43520, 43560, 43561, 43574, 43584, 43595, 43596, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43754, 43755, 43759, 43762, 43764, 43765, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44003, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66422, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68097, 68099, 68101, 68102, 68108, 68111, 68112, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68325, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69634, 69635, 69687, 69688, 69702, 69734, 69743, 69759, 69762, 69763, 69807, 69808, 69818, 69840, 69864, 69872, 69881, 69888, 69890, 69891, 69926, 69927, 69940, 69942, 69951, 69968, 70002, 70016, 70018, 70019, 70066, 70067, 70080, 70081, 70084, 70090, 70092, 70096, 70105, 70144, 70161, 70163, 70187, 70188, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70367, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70497, 70498, 70499, 70502, 70508, 70512, 70516, 70656, 70708, 70709, 70726, 70727, 70730, 70736, 70745, 70784, 70831, 70832, 70851, 70852, 70853, 70864, 70873, 71040, 71086, 71087, 71093, 71096, 71104, 71128, 71131, 71132, 71133, 71168, 71215, 71216, 71232, 71248, 71257, 71296, 71338, 71339, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72750, 72751, 72758, 72760, 72767, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92975, 92976, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94033, 94078, 94095, 94098, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125251, 125252, 125258, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 39, 46, 58, 95, 170, 173, 181, 183, 186, 727, 748, 750, 895, 903, 908, 1369, 1471, 1479, 1523, 1524, 1564, 1643, 1791, 2042, 2482, 2519, 2620, 2641, 2654, 2768, 2809, 2929, 2972, 3024, 3031, 3294, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4239, 4295, 4301, 4696, 4800, 6109, 6783, 8025, 8027, 8029, 8126, 8228, 8231, 8239, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11823, 12293, 43259, 43261, 43471, 43493, 43696, 43713, 64286, 64318, 65043, 65106, 65109, 65279, 65287, 65294, 65306, 65343, 66045, 66272, 67592, 67644, 68159, 69821, 70006, 70106, 70108, 70206, 70280, 70480, 70487, 70855, 71236, 71935, 94176, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 884, 886, 887, 890, 893, 902, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1552, 1562, 1568, 1631, 1632, 1641, 1646, 1747, 1749, 1757, 1759, 1768, 1770, 1775, 1776, 1785, 1786, 1788, 1807, 1866, 1869, 1969, 1984, 1993, 1994, 2037, 2048, 2093, 2112, 2139, 2208, 2228, 2230, 2237, 2260, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2524, 2525, 2527, 2531, 2534, 2543, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2662, 2671, 2672, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3299, 3302, 3311, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4240, 4249, 4250, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6656, 6683, 6741, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6832, 6846, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7087, 7088, 7097, 7098, 7155, 7168, 7223, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7414, 7416, 7417, 7424, 7669, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8216, 8217, 8234, 8238, 8255, 8256, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11568, 11623, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12347, 12348, 12441, 12442, 12549, 12589, 12593, 12686, 12704, 12730, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42610, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43264, 43273, 43274, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43472, 43481, 43504, 43513, 43520, 43574, 43584, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65438, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69968, 70003, 70016, 70084, 70090, 70092, 70096, 70105, 70144, 70161, 70163, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70784, 70853, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71248, 71257, 71296, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94032, 94078, 94095, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125258, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 95, 170, 173, 181, 186, 748, 750, 895, 902, 908, 1369, 1471, 1479, 1523, 1564, 1643, 1648, 1749, 1791, 1808, 1969, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2519, 2620, 2641, 2654, 2677, 2749, 2768, 2809, 2877, 2929, 2946, 2947, 2972, 3024, 3031, 3133, 3200, 3261, 3294, 3389, 3406, 3415, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4239, 4295, 4301, 4696, 4800, 6109, 6313, 6783, 7405, 8025, 8027, 8029, 8126, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11647, 11823, 12293, 43010, 43014, 43019, 43259, 43261, 43471, 43493, 43587, 43696, 43713, 64286, 64318, 65279, 65343, 66045, 66272, 67592, 67644, 68096, 68159, 69821, 70003, 70006, 70106, 70108, 70206, 70280, 70461, 70480, 70487, 70855, 71236, 71935, 72768, 94032, 94176, 110592, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 879, 880, 884, 886, 887, 890, 893, 904, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1161, 1162, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1552, 1562, 1568, 1610, 1611, 1631, 1632, 1641, 1646, 1747, 1750, 1757, 1759, 1764, 1765, 1766, 1767, 1768, 1770, 1773, 1774, 1775, 1776, 1785, 1786, 1788, 1807, 1809, 1810, 1839, 1840, 1866, 1869, 1957, 1958, 1968, 1984, 1993, 1994, 2026, 2027, 2035, 2036, 2037, 2048, 2069, 2070, 2093, 2112, 2136, 2137, 2139, 2208, 2228, 2230, 2237, 2260, 2307, 2308, 2361, 2362, 2391, 2392, 2401, 2402, 2403, 2406, 2415, 2417, 2432, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2509, 2524, 2525, 2527, 2529, 2530, 2531, 2534, 2543, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2662, 2671, 2672, 2673, 2674, 2676, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2785, 2786, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2914, 2915, 2918, 2927, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3169, 3170, 3171, 3174, 3183, 3201, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3297, 3298, 3299, 3302, 3311, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3390, 3396, 3398, 3400, 3402, 3405, 3412, 3414, 3423, 3425, 3426, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3903, 3904, 3911, 3913, 3948, 3953, 3972, 3974, 3975, 3976, 3980, 3981, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4240, 4249, 4250, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5906, 5908, 5920, 5937, 5938, 5940, 5952, 5969, 5970, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6176, 6263, 6272, 6276, 6277, 6278, 6279, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6656, 6678, 6679, 6683, 6741, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6832, 6846, 6912, 6916, 6917, 6963, 6964, 6980, 6981, 6987, 6992, 7001, 7019, 7027, 7040, 7042, 7043, 7072, 7073, 7085, 7086, 7087, 7088, 7097, 7098, 7141, 7142, 7155, 7168, 7203, 7204, 7223, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7400, 7401, 7409, 7410, 7412, 7413, 7414, 7416, 7417, 7424, 7615, 7616, 7669, 7675, 7679, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8234, 8239, 8255, 8256, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11503, 11505, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12337, 12341, 12347, 12348, 12441, 12442, 12443, 12444, 12448, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13008, 13054, 13056, 13143, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42606, 42607, 42610, 42612, 42621, 42623, 42653, 42654, 42655, 42656, 42735, 42736, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43042, 43043, 43047, 43072, 43123, 43136, 43137, 43138, 43187, 43188, 43205, 43216, 43225, 43232, 43249, 43250, 43255, 43264, 43273, 43274, 43301, 43302, 43309, 43312, 43334, 43335, 43347, 43360, 43388, 43392, 43395, 43396, 43442, 43443, 43456, 43472, 43481, 43504, 43513, 43520, 43560, 43561, 43574, 43584, 43595, 43596, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43754, 43755, 43759, 43762, 43764, 43765, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44003, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65382, 65437, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66422, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68097, 68099, 68101, 68102, 68108, 68111, 68112, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68325, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69634, 69635, 69687, 69688, 69702, 69734, 69743, 69759, 69762, 69763, 69807, 69808, 69818, 69840, 69864, 69872, 69881, 69888, 69890, 69891, 69926, 69927, 69940, 69942, 69951, 69968, 70002, 70016, 70018, 70019, 70066, 70067, 70080, 70081, 70084, 70090, 70092, 70096, 70105, 70144, 70161, 70163, 70187, 70188, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70367, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70497, 70498, 70499, 70502, 70508, 70512, 70516, 70656, 70708, 70709, 70726, 70727, 70730, 70736, 70745, 70784, 70831, 70832, 70851, 70852, 70853, 70864, 70873, 71040, 71086, 71087, 71093, 71096, 71104, 71128, 71131, 71132, 71133, 71168, 71215, 71216, 71232, 71248, 71257, 71296, 71338, 71339, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72750, 72751, 72758, 72760, 72767, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92975, 92976, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94033, 94078, 94095, 94098, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125251, 125252, 125258, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 34, 39, 46, 58, 95, 170, 173, 181, 183, 186, 727, 748, 750, 895, 903, 908, 1369, 1471, 1479, 1523, 1524, 1564, 1643, 1648, 1749, 1791, 1808, 1969, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2519, 2620, 2641, 2654, 2677, 2749, 2768, 2809, 2877, 2929, 2946, 2947, 2972, 3024, 3031, 3133, 3200, 3261, 3294, 3389, 3406, 3415, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4239, 4295, 4301, 4696, 4800, 6109, 6313, 6783, 7405, 8025, 8027, 8029, 8126, 8228, 8231, 8239, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11647, 11823, 12293, 43010, 43014, 43019, 43259, 43261, 43471, 43493, 43587, 43696, 43713, 64318, 65043, 65106, 65109, 65279, 65287, 65294, 65306, 65343, 66045, 66272, 67592, 67644, 68096, 68159, 69821, 70003, 70006, 70106, 70108, 70206, 70280, 70461, 70480, 70487, 70855, 71236, 71935, 72768, 94032, 94176, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 879, 880, 884, 886, 887, 890, 893, 902, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1161, 1162, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1552, 1562, 1568, 1610, 1611, 1631, 1632, 1641, 1646, 1747, 1750, 1757, 1759, 1764, 1765, 1766, 1767, 1768, 1770, 1773, 1774, 1775, 1776, 1785, 1786, 1788, 1807, 1809, 1810, 1839, 1840, 1866, 1869, 1957, 1958, 1968, 1984, 1993, 1994, 2026, 2027, 2035, 2036, 2037, 2048, 2069, 2070, 2093, 2112, 2136, 2137, 2139, 2208, 2228, 2230, 2237, 2260, 2307, 2308, 2361, 2362, 2391, 2392, 2401, 2402, 2403, 2406, 2415, 2417, 2432, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2509, 2524, 2525, 2527, 2529, 2530, 2531, 2534, 2543, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2662, 2671, 2672, 2673, 2674, 2676, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2785, 2786, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2914, 2915, 2918, 2927, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3169, 3170, 3171, 3174, 3183, 3201, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3297, 3298, 3299, 3302, 3311, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3390, 3396, 3398, 3400, 3402, 3405, 3412, 3414, 3423, 3425, 3426, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3903, 3904, 3911, 3913, 3948, 3953, 3972, 3974, 3975, 3976, 3980, 3981, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4240, 4249, 4250, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5906, 5908, 5920, 5937, 5938, 5940, 5952, 5969, 5970, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6176, 6263, 6272, 6276, 6277, 6278, 6279, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6656, 6678, 6679, 6683, 6741, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6832, 6846, 6912, 6916, 6917, 6963, 6964, 6980, 6981, 6987, 6992, 7001, 7019, 7027, 7040, 7042, 7043, 7072, 7073, 7085, 7086, 7087, 7088, 7097, 7098, 7141, 7142, 7155, 7168, 7203, 7204, 7223, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7400, 7401, 7409, 7410, 7412, 7413, 7414, 7416, 7417, 7424, 7615, 7616, 7669, 7675, 7679, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8216, 8217, 8234, 8238, 8255, 8256, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11503, 11505, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12347, 12348, 12441, 12442, 12549, 12589, 12593, 12686, 12704, 12730, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42606, 42607, 42610, 42612, 42621, 42623, 42653, 42654, 42655, 42656, 42735, 42736, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43042, 43043, 43047, 43072, 43123, 43136, 43137, 43138, 43187, 43188, 43205, 43216, 43225, 43232, 43249, 43250, 43255, 43264, 43273, 43274, 43301, 43302, 43309, 43312, 43334, 43335, 43347, 43360, 43388, 43392, 43395, 43396, 43442, 43443, 43456, 43472, 43481, 43504, 43513, 43520, 43560, 43561, 43574, 43584, 43595, 43596, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43754, 43755, 43759, 43762, 43764, 43765, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44003, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66422, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68097, 68099, 68101, 68102, 68108, 68111, 68112, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68325, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69634, 69635, 69687, 69688, 69702, 69734, 69743, 69759, 69762, 69763, 69807, 69808, 69818, 69840, 69864, 69872, 69881, 69888, 69890, 69891, 69926, 69927, 69940, 69942, 69951, 69968, 70002, 70016, 70018, 70019, 70066, 70067, 70080, 70081, 70084, 70090, 70092, 70096, 70105, 70144, 70161, 70163, 70187, 70188, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70367, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70497, 70498, 70499, 70502, 70508, 70512, 70516, 70656, 70708, 70709, 70726, 70727, 70730, 70736, 70745, 70784, 70831, 70832, 70851, 70852, 70853, 70864, 70873, 71040, 71086, 71087, 71093, 71096, 71104, 71128, 71131, 71132, 71133, 71168, 71215, 71216, 71232, 71248, 71257, 71296, 71338, 71339, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72750, 72751, 72758, 72760, 72767, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92975, 92976, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94033, 94078, 94095, 94098, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125251, 125252, 125258, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 95, 170, 173, 181, 186, 748, 750, 895, 902, 908, 1369, 1471, 1479, 1523, 1564, 1643, 1648, 1749, 1791, 1808, 1969, 2042, 2074, 2084, 2088, 2365, 2384, 2482, 2493, 2510, 2519, 2620, 2641, 2654, 2677, 2749, 2768, 2809, 2877, 2929, 2946, 2947, 2972, 3024, 3031, 3133, 3200, 3261, 3294, 3389, 3406, 3415, 3517, 3530, 3542, 3633, 3761, 3840, 3893, 3895, 3897, 4038, 4239, 4295, 4301, 4696, 4800, 6109, 6313, 6783, 7405, 8025, 8027, 8029, 8126, 8239, 8276, 8305, 8319, 8450, 8455, 8469, 8484, 8486, 8488, 8526, 11559, 11565, 11631, 11647, 11823, 12293, 43010, 43014, 43019, 43259, 43261, 43471, 43493, 43587, 43696, 43713, 64286, 64318, 65279, 65343, 66045, 66272, 67592, 67644, 68096, 68159, 69821, 70003, 70006, 70106, 70108, 70206, 70280, 70461, 70480, 70487, 70855, 71236, 71935, 72768, 94032, 94176, 119970, 119995, 120134, 121461, 121476, 126500, 126503, 126521, 126523, 126530, 126535, 126537, 126539, 126548, 126551, 126553, 126555, 126557, 126559, 126564, 126590, 917505, 48, 57, 65, 90, 97, 122, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 768, 879, 880, 884, 886, 887, 890, 893, 904, 906, 910, 929, 931, 1013, 1015, 1153, 1155, 1161, 1162, 1327, 1329, 1366, 1377, 1415, 1425, 1469, 1473, 1474, 1476, 1477, 1488, 1514, 1520, 1522, 1536, 1541, 1552, 1562, 1568, 1610, 1611, 1631, 1632, 1641, 1646, 1747, 1750, 1757, 1759, 1764, 1765, 1766, 1767, 1768, 1770, 1773, 1774, 1775, 1776, 1785, 1786, 1788, 1807, 1809, 1810, 1839, 1840, 1866, 1869, 1957, 1958, 1968, 1984, 1993, 1994, 2026, 2027, 2035, 2036, 2037, 2048, 2069, 2070, 2093, 2112, 2136, 2137, 2139, 2208, 2228, 2230, 2237, 2260, 2307, 2308, 2361, 2362, 2391, 2392, 2401, 2402, 2403, 2406, 2415, 2417, 2432, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2509, 2524, 2525, 2527, 2529, 2530, 2531, 2534, 2543, 2544, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2662, 2671, 2672, 2673, 2674, 2676, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2784, 2785, 2786, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2914, 2915, 2918, 2927, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3046, 3055, 3072, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3169, 3170, 3171, 3174, 3183, 3201, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3296, 3297, 3298, 3299, 3302, 3311, 3313, 3314, 3329, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3390, 3396, 3398, 3400, 3402, 3405, 3412, 3414, 3423, 3425, 3426, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3520, 3526, 3535, 3540, 3544, 3551, 3558, 3567, 3570, 3571, 3636, 3642, 3655, 3662, 3664, 3673, 3764, 3769, 3771, 3772, 3784, 3789, 3792, 3801, 3864, 3865, 3872, 3881, 3902, 3903, 3904, 3911, 3913, 3948, 3953, 3972, 3974, 3975, 3976, 3980, 3981, 3991, 3993, 4028, 4139, 4158, 4160, 4169, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4240, 4249, 4250, 4253, 4256, 4293, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5906, 5908, 5920, 5937, 5938, 5940, 5952, 5969, 5970, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6068, 6099, 6112, 6121, 6155, 6158, 6160, 6169, 6176, 6263, 6272, 6276, 6277, 6278, 6279, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6479, 6608, 6617, 6656, 6678, 6679, 6683, 6741, 6750, 6752, 6780, 6784, 6793, 6800, 6809, 6832, 6846, 6912, 6916, 6917, 6963, 6964, 6980, 6981, 6987, 6992, 7001, 7019, 7027, 7040, 7042, 7043, 7072, 7073, 7085, 7086, 7087, 7088, 7097, 7098, 7141, 7142, 7155, 7168, 7203, 7204, 7223, 7232, 7241, 7245, 7247, 7248, 7257, 7258, 7293, 7296, 7304, 7376, 7378, 7380, 7400, 7401, 7409, 7410, 7412, 7413, 7414, 7416, 7417, 7424, 7615, 7616, 7669, 7675, 7679, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8031, 8061, 8064, 8116, 8118, 8124, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8207, 8234, 8238, 8255, 8256, 8288, 8292, 8294, 8303, 8336, 8348, 8400, 8432, 8458, 8467, 8473, 8477, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8544, 8584, 9398, 9449, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11503, 11505, 11506, 11507, 11520, 11557, 11568, 11623, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12330, 12335, 12347, 12348, 12441, 12442, 12549, 12589, 12593, 12686, 12704, 12730, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42528, 42537, 42538, 42539, 42560, 42606, 42607, 42610, 42612, 42621, 42623, 42653, 42654, 42655, 42656, 42735, 42736, 42737, 42775, 42783, 42786, 42888, 42891, 42926, 42928, 42935, 42999, 43042, 43043, 43047, 43072, 43123, 43136, 43137, 43138, 43187, 43188, 43205, 43216, 43225, 43232, 43249, 43250, 43255, 43264, 43273, 43274, 43301, 43302, 43309, 43312, 43334, 43335, 43347, 43360, 43388, 43392, 43395, 43396, 43442, 43443, 43456, 43472, 43481, 43504, 43513, 43520, 43560, 43561, 43574, 43584, 43595, 43596, 43597, 43600, 43609, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43744, 43754, 43755, 43759, 43762, 43764, 43765, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43877, 43888, 44002, 44003, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64320, 64321, 64323, 64324, 64326, 64335, 64336, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65345, 65370, 65438, 65439, 65440, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65529, 65531, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66352, 66378, 66384, 66421, 66422, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67594, 67637, 67639, 67640, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68097, 68099, 68101, 68102, 68108, 68111, 68112, 68115, 68117, 68119, 68121, 68147, 68152, 68154, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68325, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 69632, 69634, 69635, 69687, 69688, 69702, 69734, 69743, 69759, 69762, 69763, 69807, 69808, 69818, 69840, 69864, 69872, 69881, 69888, 69890, 69891, 69926, 69927, 69940, 69942, 69951, 69968, 70002, 70016, 70018, 70019, 70066, 70067, 70080, 70081, 70084, 70090, 70092, 70096, 70105, 70144, 70161, 70163, 70187, 70188, 70199, 70272, 70278, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70367, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70460, 70468, 70471, 70472, 70475, 70477, 70493, 70497, 70498, 70499, 70502, 70508, 70512, 70516, 70656, 70708, 70709, 70726, 70727, 70730, 70736, 70745, 70784, 70831, 70832, 70851, 70852, 70853, 70864, 70873, 71040, 71086, 71087, 71093, 71096, 71104, 71128, 71131, 71132, 71133, 71168, 71215, 71216, 71232, 71248, 71257, 71296, 71338, 71339, 71351, 71360, 71369, 71453, 71467, 71472, 71481, 71840, 71903, 71904, 71913, 72384, 72440, 72704, 72712, 72714, 72750, 72751, 72758, 72760, 72767, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92975, 92976, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93952, 94020, 94033, 94078, 94095, 94098, 94099, 94111, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119973, 119974, 119977, 119980, 119982, 119993, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 124928, 125124, 125136, 125142, 125184, 125251, 125252, 125258, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126505, 126514, 126516, 126519, 126541, 126543, 126545, 126546, 126561, 126562, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 127280, 127305, 127312, 127337, 127344, 127369, 917536, 917631, 917760, 917999, 95, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 8239, 8276, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 65343, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 110592, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8255, 8256, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12337, 12341, 12441, 12444, 12448, 12538, 12540, 12543, 12784, 12799, 13008, 13054, 13056, 13143, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65382, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 917536, 917631, 917760, 917999, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3716, 3722, 3725, 3749, 3751, 3782, 3893, 3895, 3897, 4038, 6103, 6313, 6618, 6783, 7405, 11647, 43010, 43014, 43019, 43587, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 71487, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3713, 3714, 3719, 3720, 3732, 3735, 3737, 3743, 3745, 3747, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3784, 3789, 3804, 3807, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4096, 4159, 4176, 4239, 4250, 4255, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6016, 6099, 6108, 6109, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6622, 6623, 6679, 6683, 6688, 6750, 6752, 6780, 6816, 6829, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43488, 43503, 43514, 43518, 43561, 43574, 43596, 43597, 43616, 43714, 43739, 43743, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71424, 71449, 71453, 71467, 71482, 71483, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 917536, 917631, 917760, 917999, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 10084, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 128139, 128488, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 128102, 128105, 917536, 917631, 917760, 917999, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 127995, 127999, 917536, 917631, 917760, 917999, 173, 1471, 1479, 1564, 1648, 1807, 1809, 2492, 2519, 2620, 2641, 2677, 2748, 2876, 2946, 3031, 3260, 3415, 3530, 3542, 3633, 3761, 3893, 3895, 3897, 4038, 4239, 6109, 6313, 6783, 7405, 11647, 43010, 43014, 43019, 43493, 43587, 43696, 43713, 64286, 65279, 66045, 66272, 68159, 69821, 70003, 70206, 70460, 70487, 121461, 121476, 917505, 768, 879, 1155, 1161, 1425, 1469, 1473, 1474, 1476, 1477, 1536, 1541, 1552, 1562, 1611, 1631, 1750, 1757, 1759, 1764, 1767, 1768, 1770, 1773, 1840, 1866, 1958, 1968, 2027, 2035, 2070, 2073, 2075, 2083, 2085, 2087, 2089, 2093, 2137, 2139, 2260, 2307, 2362, 2364, 2366, 2383, 2385, 2391, 2402, 2403, 2433, 2435, 2494, 2500, 2503, 2504, 2507, 2509, 2530, 2531, 2561, 2563, 2622, 2626, 2631, 2632, 2635, 2637, 2672, 2673, 2689, 2691, 2750, 2757, 2759, 2761, 2763, 2765, 2786, 2787, 2817, 2819, 2878, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2914, 2915, 3006, 3010, 3014, 3016, 3018, 3021, 3072, 3075, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3170, 3171, 3201, 3203, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3298, 3299, 3329, 3331, 3390, 3396, 3398, 3400, 3402, 3405, 3426, 3427, 3458, 3459, 3535, 3540, 3544, 3551, 3570, 3571, 3636, 3642, 3655, 3662, 3764, 3769, 3771, 3772, 3784, 3789, 3864, 3865, 3902, 3903, 3953, 3972, 3974, 3975, 3981, 3991, 3993, 4028, 4139, 4158, 4182, 4185, 4190, 4192, 4194, 4196, 4199, 4205, 4209, 4212, 4226, 4237, 4250, 4253, 4957, 4959, 5906, 5908, 5938, 5940, 5970, 5971, 6002, 6003, 6068, 6099, 6155, 6158, 6277, 6278, 6432, 6443, 6448, 6459, 6679, 6683, 6741, 6750, 6752, 6780, 6832, 6846, 6912, 6916, 6964, 6980, 7019, 7027, 7040, 7042, 7073, 7085, 7142, 7155, 7204, 7223, 7376, 7378, 7380, 7400, 7410, 7412, 7416, 7417, 7616, 7669, 7675, 7679, 8204, 8207, 8234, 8238, 8288, 8292, 8294, 8303, 8400, 8432, 11503, 11505, 11744, 11775, 12330, 12335, 12441, 12442, 42607, 42610, 42612, 42621, 42654, 42655, 42736, 42737, 43043, 43047, 43136, 43137, 43188, 43205, 43232, 43249, 43302, 43309, 43335, 43347, 43392, 43395, 43443, 43456, 43561, 43574, 43596, 43597, 43643, 43645, 43698, 43700, 43703, 43704, 43710, 43711, 43755, 43759, 43765, 43766, 44003, 44010, 44012, 44013, 65024, 65039, 65056, 65071, 65438, 65439, 65529, 65531, 66422, 66426, 68097, 68099, 68101, 68102, 68108, 68111, 68152, 68154, 68325, 68326, 69632, 69634, 69688, 69702, 69759, 69762, 69808, 69818, 69888, 69890, 69927, 69940, 70016, 70018, 70067, 70080, 70090, 70092, 70188, 70199, 70367, 70378, 70400, 70403, 70462, 70468, 70471, 70472, 70475, 70477, 70498, 70499, 70502, 70508, 70512, 70516, 70709, 70726, 70832, 70851, 71087, 71093, 71096, 71104, 71132, 71133, 71216, 71232, 71339, 71351, 71453, 71467, 72751, 72758, 72760, 72767, 72850, 72871, 72873, 72886, 92912, 92916, 92976, 92982, 94033, 94078, 94095, 94098, 113821, 113822, 113824, 113827, 119141, 119145, 119149, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 121344, 121398, 121403, 121452, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 125136, 125142, 125252, 125258, 127462, 127487, 917536, 917631, 917760, 917999, 0 ] class << self attr_accessor :_segmenter_single_lengths private :_segmenter_single_lengths, :_segmenter_single_lengths= end self._segmenter_single_lengths = [ 53, 144, 53, 133, 52, 1, 166, 130, 150, 164, 150, 57, 54, 55, 52, 52 ] class << self attr_accessor :_segmenter_range_lengths private :_segmenter_range_lengths, :_segmenter_range_lengths= end self._segmenter_range_lengths = [ 265, 608, 219, 525, 211, 0, 665, 574, 674, 667, 666, 220, 223, 212, 212, 212 ] class << self attr_accessor :_segmenter_index_offsets private :_segmenter_index_offsets, :_segmenter_index_offsets= end self._segmenter_index_offsets = [ 0, 319, 1072, 1345, 2004, 2268, 2270, 3102, 3807, 4632, 5464, 6281, 6559, 6837, 7105, 7370 ] class << self attr_accessor :_segmenter_indicies private :_segmenter_indicies, :_segmenter_indicies= end self._segmenter_indicies = [ 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 1, 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 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 1, 3, 3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 10, 10, 10, 11, 11, 10, 10, 3, 10, 1, 3, 10, 10, 3, 10, 10, 3, 1, 3, 10, 3, 10, 3, 10, 1, 3, 10, 3, 3, 10, 3, 10, 3, 3, 10, 3, 10, 3, 10, 1, 3, 10, 3, 3, 3, 3, 3, 10, 10, 10, 3, 3, 10, 1, 3, 10, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 3, 1, 10, 3, 10, 3, 3, 3, 3, 3, 3, 10, 10, 10, 3, 10, 1, 10, 3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 3, 3, 10, 1, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 1, 10, 3, 3, 3, 3, 10, 10, 10, 10, 3, 3, 10, 1, 10, 3, 3, 3, 3, 3, 10, 10, 10, 10, 3, 10, 1, 3, 10, 3, 3, 3, 10, 10, 10, 3, 3, 10, 1, 3, 10, 3, 3, 3, 3, 10, 10, 1, 10, 10, 10, 1, 10, 10, 10, 1, 10, 1, 10, 3, 3, 10, 10, 3, 10, 10, 10, 1, 10, 10, 10, 10, 10, 10, 1, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3, 3, 10, 10, 1, 10, 1, 3, 3, 10, 3, 3, 3, 10, 10, 1, 1, 3, 10, 10, 10, 1, 1, 10, 10, 3, 10, 3, 1, 10, 10, 3, 10, 3, 1, 3, 10, 3, 10, 1, 3, 1, 3, 3, 10, 10, 3, 10, 3, 10, 3, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 10, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 15, 3, 10, 15, 15, 15, 3, 3, 3, 15, 15, 15, 3, 3, 3, 3, 1, 3, 3, 10, 10, 3, 10, 3, 10, 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 1, 10, 3, 1, 3, 10, 3, 10, 3, 10, 3, 10, 1, 1, 3, 10, 3, 10, 1, 10, 10, 10, 10, 3, 10, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 1, 3, 3, 3, 3, 3, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 3, 10, 10, 10, 10, 3, 3, 1, 3, 3, 15, 10, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 10, 3, 3, 3, 10, 3, 3, 3, 3, 10, 3, 3, 3, 3, 3, 3, 3, 10, 3, 10, 1, 10, 3, 10, 3, 1, 10, 3, 10, 1, 3, 10, 3, 10, 3, 10, 1, 3, 3, 10, 3, 3, 3, 3, 3, 10, 1, 10, 3, 3, 3, 3, 3, 3, 10, 10, 10, 3, 10, 10, 10, 3, 10, 3, 1, 3, 10, 3, 1, 3, 10, 10, 3, 10, 3, 10, 1, 3, 10, 1, 10, 1, 3, 1, 3, 3, 3, 10, 10, 1, 3, 10, 10, 3, 3, 3, 3, 3, 3, 3, 1, 3, 10, 3, 10, 3, 1, 3, 3, 3, 10, 10, 3, 3, 3, 3, 3, 10, 10, 10, 10, 10, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 10, 10, 10, 10, 10, 10, 10, 10, 10, 3, 10, 3, 10, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 10, 10, 17, 5, 6, 4, 4, 10, 3, 11, 3, 4, 3, 4, 3, 3, 3, 4, 3, 3, 11, 11, 3, 4, 11, 1, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 11, 3, 11, 3, 3, 3, 3, 3, 11, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 11, 3, 11, 11, 11, 11, 3, 11, 11, 11, 11, 11, 3, 3, 3, 3, 11, 11, 11, 11, 3, 3, 3, 3, 4, 4, 10, 10, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 11, 11, 11, 3, 3, 3, 11, 11, 11, 11, 11, 4, 4, 4, 11, 4, 4, 4, 10, 11, 11, 3, 3, 3, 11, 11, 11, 3, 3, 3, 11, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 1, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 11, 11, 11, 11, 11, 11, 11, 3, 11, 1, 3, 11, 11, 3, 11, 11, 3, 1, 3, 11, 3, 11, 3, 11, 1, 3, 11, 3, 3, 11, 3, 11, 3, 3, 11, 3, 11, 3, 11, 1, 3, 11, 3, 3, 3, 3, 3, 11, 11, 11, 3, 3, 11, 1, 3, 11, 3, 3, 3, 3, 3, 3, 3, 11, 11, 11, 3, 1, 11, 3, 11, 3, 3, 3, 3, 3, 3, 11, 11, 11, 3, 11, 1, 11, 3, 3, 3, 3, 3, 3, 11, 11, 11, 11, 3, 3, 11, 1, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 11, 1, 11, 3, 3, 3, 3, 11, 11, 11, 11, 3, 3, 11, 1, 11, 3, 3, 3, 3, 3, 11, 11, 11, 11, 3, 11, 1, 3, 11, 3, 3, 3, 11, 11, 11, 3, 3, 11, 1, 3, 11, 3, 3, 3, 3, 11, 11, 1, 11, 11, 11, 1, 11, 11, 11, 1, 11, 1, 11, 3, 3, 11, 11, 3, 11, 11, 11, 1, 11, 11, 11, 11, 11, 11, 1, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 11, 3, 11, 3, 3, 11, 11, 1, 11, 1, 3, 3, 11, 3, 3, 3, 11, 11, 1, 1, 3, 11, 11, 11, 1, 1, 11, 11, 3, 11, 3, 1, 11, 11, 3, 11, 3, 1, 3, 11, 3, 11, 1, 3, 1, 3, 3, 11, 11, 3, 11, 3, 11, 3, 11, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 4, 11, 10, 11, 11, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 3, 11, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 11, 11, 3, 11, 3, 11, 3, 3, 3, 3, 3, 11, 3, 11, 3, 11, 1, 11, 3, 1, 3, 11, 3, 11, 3, 11, 3, 11, 1, 1, 3, 11, 3, 11, 1, 11, 11, 11, 11, 3, 11, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 1, 3, 3, 3, 3, 3, 11, 11, 11, 11, 11, 11, 3, 3, 3, 3, 3, 11, 11, 10, 10, 3, 3, 1, 3, 3, 11, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 11, 11, 11, 3, 3, 3, 11, 3, 3, 3, 3, 11, 3, 3, 3, 3, 3, 3, 3, 11, 3, 11, 1, 11, 3, 11, 3, 1, 11, 3, 11, 1, 3, 11, 3, 11, 3, 11, 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15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 10, 10, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 17, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 7, 7, 17, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 7, 14, 14, 17, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 7, 16, 16, 17, 0 ] class << self attr_accessor :_segmenter_trans_targs private :_segmenter_trans_targs, :_segmenter_trans_targs= end self._segmenter_trans_targs = [ 3, 6, 0, 7, 1, 2, 10, 4, 3, 5, 8, 9, 12, 13, 14, 11, 15, 3 ] class << self attr_accessor :_segmenter_trans_actions private :_segmenter_trans_actions, :_segmenter_trans_actions= end self._segmenter_trans_actions = [ 1, 2, 0, 2, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 0, 0, 0, 6 ] class << self attr_accessor :_segmenter_to_state_actions private :_segmenter_to_state_actions, :_segmenter_to_state_actions= end self._segmenter_to_state_actions = [ 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] class << self attr_accessor :_segmenter_from_state_actions private :_segmenter_from_state_actions, :_segmenter_from_state_actions= end self._segmenter_from_state_actions = [ 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] class << self attr_accessor :_segmenter_eof_trans private :_segmenter_eof_trans, :_segmenter_eof_trans= end self._segmenter_eof_trans = [ 1, 1, 1, 0, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18 ] class << self attr_accessor :segmenter_start end self.segmenter_start = 3; class << self attr_accessor :segmenter_first_final end self.segmenter_first_final = 3; class << self attr_accessor :segmenter_error end self.segmenter_error = -1; class << self attr_accessor :segmenter_en_main end self.segmenter_en_main = 3; # line 173 "lib/annex_29/word_segmentation.rl" class << self def call(input) data = input.each_char.map(&:ord) eof = data.length words = [] # line 2816 "lib/annex_29/word_segmentation.rb" begin p ||= 0 pe ||= data.length cs = segmenter_start ts = nil te = nil act = 0 end # line 181 "lib/annex_29/word_segmentation.rl" # line 2828 "lib/annex_29/word_segmentation.rb" begin testEof = false _klen, _trans, _keys = nil _goto_level = 0 _resume = 10 _eof_trans = 15 _again = 20 _test_eof = 30 _out = 40 while true if _goto_level <= 0 if p == pe _goto_level = _test_eof next end end if _goto_level <= _resume case _segmenter_from_state_actions[cs] when 4 then # line 1 "NONE" begin ts = p end # line 2852 "lib/annex_29/word_segmentation.rb" end # from state action switch _keys = _segmenter_key_offsets[cs] _trans = _segmenter_index_offsets[cs] _klen = _segmenter_single_lengths[cs] _break_match = false begin if _klen > 0 _lower = _keys _upper = _keys + _klen - 1 loop do break if _upper < _lower _mid = _lower + ( (_upper - _lower) >> 1 ) if data[p].ord < _segmenter_trans_keys[_mid] _upper = _mid - 1 elsif data[p].ord > _segmenter_trans_keys[_mid] _lower = _mid + 1 else _trans += (_mid - _keys) _break_match = true break end end # loop break if _break_match _keys += _klen _trans += _klen end _klen = _segmenter_range_lengths[cs] if _klen > 0 _lower = _keys _upper = _keys + (_klen << 1) - 2 loop do break if _upper < _lower _mid = _lower + (((_upper-_lower) >> 1) & ~1) if data[p].ord < _segmenter_trans_keys[_mid] _upper = _mid - 2 elsif data[p].ord > _segmenter_trans_keys[_mid+1] _lower = _mid + 2 else _trans += ((_mid - _keys) >> 1) _break_match = true break end end # loop break if _break_match _trans += _klen end end while false _trans = _segmenter_indicies[_trans]; end if _goto_level <= _eof_trans cs = _segmenter_trans_targs[_trans]; if _segmenter_trans_actions[_trans] != 0 case _segmenter_trans_actions[_trans] when 2 then # line 1 "NONE" begin te = p+1 end when 5 then # line 10 "lib/annex_29/word_segmentation.rl" begin te = p+1 begin words << data[ts...te].pack("U*") end end when 6 then # line 10 "lib/annex_29/word_segmentation.rl" begin te = p p = p - 1; begin words << data[ts...te].pack("U*") end end when 1 then # line 10 "lib/annex_29/word_segmentation.rl" begin begin p = ((te))-1; end begin words << data[ts...te].pack("U*") end end # line 2941 "lib/annex_29/word_segmentation.rb" end # action switch end end if _goto_level <= _again case _segmenter_to_state_actions[cs] when 3 then # line 1 "NONE" begin ts = nil; end # line 2952 "lib/annex_29/word_segmentation.rb" end p += 1 if p != pe _goto_level = _resume next end end if _goto_level <= _test_eof if p == eof if _segmenter_eof_trans[cs] > 0 _trans = _segmenter_eof_trans[cs] - 1; _goto_level = _eof_trans next; end end end if _goto_level <= _out break end end end # line 182 "lib/annex_29/word_segmentation.rl" words end end end end
Shopify/annex-29
spec/word_segmentation_spec.rb
<gh_stars>1-10 RSpec.describe(Annex29.method(:segment_words)) do class << self def parse_sample(sample) sample = sample.sub(/^\s*÷/, "").sub(/÷\s*$/, "") source = sample.split(/[÷×]/).map do |code_point| code_point.strip.hex end.pack("U*") expected = sample.split("÷").map do |fragment| fragment.split("×").map do |code_point| code_point.strip.hex end.pack("U*") end [source, expected] end def each_samples tests = Set.new file_name = Pathname.new("data").join("WordBreakTest.txt") File.open(file_name).each_line do |line| next unless match = line.match(/^(?<sample>[^#]+)#(?<description>.*)/) sample, expected = parse_sample(match["sample"]) description = match["description"].strip next if tests.include?(sample) tests.add(sample) yield sample, expected, description end end end each_samples do |sample, expected, description| it "segments #{description}" do expect( Annex29.segment_words(sample), ).to eq(expected) end end end
Shopify/annex-29
annex_29.gemspec
<gh_stars>1-10 Gem::Specification.new do |spec| spec.name = "annex_29" spec.version = "0.1.1" spec.date = "2016-10-18" spec.summary = "Unicode annex 29 compliant word segmentation" spec.authors = ["<NAME>"] spec.email = "<EMAIL>" spec.files = %w( lib/annex_29.rb lib/annex_29/word_segmentation.rb ) spec.homepage = "https://github.com/Shopify/annex-29" spec.license = "Apache-2.0" spec.add_development_dependency("rake", "~> 11.3") spec.add_development_dependency("rspec", "~> 3.5") end
Shopify/annex-29
lib/annex_29.rb
module Annex29 require("annex_29/word_segmentation") class << self def segment_words(input) Annex29::WordSegmentation.call(String(input)) end end end
MainShayne233/command_mine
lib/command_mine.rb
<reponame>MainShayne233/command_mine require "command_mine/version" module CommandMine def self.say_hi begin `say hi` rescue e => Exception `espeak hi` end end end
shepeliev/webrtc-kmp
webrtc-kmp.podspec
<reponame>shepeliev/webrtc-kmp<gh_stars>10-100 version = '0.89.6' Pod::Spec.new do |s| s.name = 'webrtc-kmp' s.version = version s.summary = 'WebRTC Kotlin Multiplatform' s.homepage = 'https://github.com/shepeliev/webrtc-kmp' s.license = 'Apache 2.0' s.author = 'https://github.com/shepeliev/webrtc-kmp/graphs/contributors' s.source = { :git => '<EMAIL>:shepeliev/webrtc-kmp.git', :tag => "v#{s.version}" } s.requires_arc = true s.platforms = { :ios => '11.0', :osx => '10.13' } s.preserve_paths = 'ios/**/*' s.source_files = 'ios/**/*.{h,m}' s.libraries = 'c', 'sqlite3', 'stdc++' s.framework = 'AudioToolbox','AVFoundation', 'CoreAudio', 'CoreGraphics', 'CoreVideo', 'GLKit', 'VideoToolbox' s.ios.vendored_frameworks = 'framework/WebRTC.xcframework' s.macos.vendored_frameworks = 'framework/WebRTC.xcframework' end
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/pipeline.rb
redis = Redis.new # @type ivar @set: Redis::Future[String] # @type ivar @incr: Redis::Future[Integer] redis.pipelined do |redis| @set = redis.set "foo", "bar" @incr = redis.incr "baz" end # => ["OK", 1] @set.value # => "OK" @incr.value # => 1
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/ssl.rb
<reponame>POPPIN-FUMI/gem_rbs_collection<filename>gems/redis/4.2/_test/ssl.rb<gh_stars>10-100 # @type const OpenSSL: untyped # @type const OpenSSL::X509: untyped # @type const OpenSSL::X509::Certificate: untyped # @type const OpenSSL::PKey::RSA: untyped # @type const OpenSSL::PKey: untyped redis = Redis.new( :url => "rediss://:p4ssw0rd@10.0.1.1:6381/15", :ssl_params => { :ca_file => "/path/to/ca.crt" } ) redis = Redis.new( :url => "rediss://:p4ssw0rd@10.0.1.1:6381/15", :ssl_params => { :ca_file => "/path/to/ca.crt", :cert => OpenSSL::X509::Certificate.new(File.read("client.crt")), :key => OpenSSL::PKey::RSA.new(File.read("client.key")) } )
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/sentinels.rb
redis = Redis.new( url: "redis://mymaster", sentinels: [{ host: "127.0.0.1", port: 26380 }, { host: "127.0.0.1", port: 26381, password: "<PASSWORD>" }], role: :master )
POPPIN-FUMI/gem_rbs_collection
gems/activestorage/6.0/_test/test.rb
class User < ActiveRecord::Base has_one_attached :one_image has_many_attached :many_image end user = User.new one = ActiveStorage::Attached::One.new("one_image", user) one.url
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/initialize.rb
<gh_stars>10-100 redis = Redis.new redis = Redis.new(host: "10.0.1.1", port: 6380, db: 15) redis = Redis.new(url: "redis://:p4ssw0rd@10.0.1.1:6380/15") redis = Redis.new(path: "/tmp/redis.sock") redis = Redis.new(password: "<PASSWORD>")
POPPIN-FUMI/gem_rbs_collection
gems/listen/3.2/_test/test.rb
<gh_stars>10-100 listener = Listen.to('dir/to/listen', 'dir/to/listen2') do |modified, added, removed| puts "modified absolute path: #{modified}" puts "added absolute path: #{added}" puts "removed absolute path: #{removed}" end listener.start # not blocking sleep
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/multi.rb
<filename>gems/redis/4.2/_test/multi.rb redis = Redis.new redis.multi do redis.set "foo", "bar" redis.incr "baz" end # => ["OK", 1]
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/number.rb
Parallel.each(1..5) { |i| puts "#{i}: #{Parallel.worker_number / 2.0}" } puts Parallel.physical_processor_count.even? puts Parallel.processor_count.odd?
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/reconnect.rb
Redis.new( :reconnect_attempts => 10, :reconnect_delay => 1.5, :reconnect_delay_max => 10.0, )
POPPIN-FUMI/gem_rbs_collection
gems/rack/2.2.2/_test/test.rb
require "rack" require 'rack/lobster' Rack::Server.start(app: Rack::ShowExceptions.new(Rack::Lint.new(Rack::Lobster.new)), Port: 9292)
POPPIN-FUMI/gem_rbs_collection
gems/protobuf/3.10.3/_test/enum.rb
module Enum class States < ::Protobuf::Enum define :ALABAMA, 1 define :CALIFORNIA, 2 define :HOGE, 1 end States::ALABAMA States::ALABAMA.to_i States::ALABAMA.tag States::ALABAMA.name States.fetch(1).___error___ States.fetch(0) States.enums.___error___ States.all_tags.___error___ end
POPPIN-FUMI/gem_rbs_collection
gems/sidekiq/6.2/_test/test_3.rb
# Test error handling # Taken from: https://github.com/mperham/sidekiq/wiki/Error-Handling Sidekiq.configure_server do |config| config.error_handlers << proc { |ex,ctx_hash| puts "#{ex} exception: #{ctx_hash} context" } end class LessRetryableWorker include Sidekiq::Worker sidekiq_options retry: 5 # Only five retries and then to the Dead Job Queue def perform end end class NonRetryableWorker include Sidekiq::Worker sidekiq_options retry: false # job will be discarded if it fails def perform end end class NoDeathWorker include Sidekiq::Worker sidekiq_options retry: 5, dead: false # will retry 5 times and then disappear def perform end end class WorkerWithCustomRetry include Sidekiq::Worker sidekiq_options retry: 5 # The current retry count and exception is yielded. The return value of the # block must be an integer. It is used as the delay, in seconds. A return value # of nil will use the default. sidekiq_retry_in do |count, exception| case exception when Object 10 * (count + 1) # (i.e. 10, 20, 30, 40, 50) end end def perform end end class FailingWorker include Sidekiq::Worker sidekiq_retries_exhausted do |msg, ex| Sidekiq.logger.warn "Failed #{msg['class']} with #{msg['args']}: #{msg['error_message']}" end def perform raise "or I don't work" end end # this goes in your initializer Sidekiq.configure_server do |config| config.death_handlers << -> (job, ex) do puts "Error!" end end
POPPIN-FUMI/gem_rbs_collection
gems/rainbow/3.0/_scripts/gen_x11_colors.rb
<filename>gems/rainbow/3.0/_scripts/gen_x11_colors.rb require "rainbow" existing_names = Rainbow::Presenter.public_instance_methods(false) x11_color_names = Rainbow::X11ColorNames::NAMES.keys - existing_names case ARGV[0] when "sig" puts x11_color_names.sort.map { |method| " def #{method}: () -> instance\n" }.join when "test" puts x11_color_names.sort.map { |method| "Rainbow('Hi').#{method}\n" }.join else abort "usage: #{__FILE__} <sig|test>" end
POPPIN-FUMI/gem_rbs_collection
gems/ulid/1.3/_test/ulid_test.rb
require 'ulid' p ULID.generate.bytes p ULID.generate(Time.now).bytes p ULID.generate_bytes.bytes p ULID.generate_bytes(Time.now).bytes
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/error_handling.rb
redis = Redis.new begin redis.ping rescue StandardError => e e.inspect # => #<Redis::CannotConnectError: Timed out connecting to Redis on 10.0.1.1:6380> e.message # => Timed out connecting to Redis on 10.0.1.1:6380 end
POPPIN-FUMI/gem_rbs_collection
gems/regexp_trie/1.0/_test/test.rb
<filename>gems/regexp_trie/1.0/_test/test.rb require "regexp_trie" p RegexpTrie.union('foo', 'bar', 'baz') # From https://github.com/gfx/ruby-regexp_trie#readme # like Regexp.union() p RegexpTrie.union(%w(foobar fooxar foozap fooza)) # /foo(?:bar|xar|zap?)/ p RegexpTrie.union(%w(foobar fooxar foozap fooza), option: Regexp::IGNORECASE) # /foo(?:bar|xar|zap?)/i # or object-oriented interface rt = RegexpTrie.new %w(foobar fooxar foozap fooza).each do |word| rt.add(word) end p rt.to_regexp # /foo(?:bar|xar|zap?)/
POPPIN-FUMI/gem_rbs_collection
gems/chunky_png/1.4.0/_test/test_5.rb
png = ChunkyPNG::Image.new(128, 128, ChunkyPNG::Color::TRANSPARENT) datastream = png.to_datastream datastream.chunks.map { |x| x.type } datastream.each_chunk { |chunk| chunk } # Snippet taken from Gem's GitHub Wiki image = ChunkyPNG::Image.from_file('clock.png') image.change_theme_color!(ChunkyPNG::Color.from_hex('#bb1234'), ChunkyPNG::Color.from_hex('#cc3244'), ChunkyPNG::Color('white'), 5) b, m = image.extract_mask(ChunkyPNG::Color.from_hex('#bb1234'), ChunkyPNG::Color('white'), 5) m.change_mask_color!(ChunkyPNG::Color.from_hex('#cc3244')) image.replace(b.compose(m))
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/mset_mget.rb
<filename>gems/redis/4.2/_test/mset_mget.rb redis = Redis.new(cluster: %w[redis://127.0.0.1:7000]) redis.mget('key1', 'key2') #=> Redis::CommandError (CROSSSLOT Keys in request don't hash to the same slot) redis.mget('{key}1', '{key}2') #=> [nil, nil]
POPPIN-FUMI/gem_rbs_collection
gems/chunky_png/1.4.0/_test/test_2.rb
<reponame>POPPIN-FUMI/gem_rbs_collection<gh_stars>10-100 # Loading Data - Datastream/StreamImport image = ChunkyPNG::Image.from_rgba_stream(128, 128, File.read('pixeldata.rgba')) image = ChunkyPNG::Image.from_rgb_stream(128, 128, File.read('pixeldata.rgb')) image = ChunkyPNG::Image.from_file('file.png') File.open('file.png', 'rb') { |io| image = ChunkyPNG::Image.from_io(io) } image = ChunkyPNG::Image.from_blob(File.read('file.png'))
POPPIN-FUMI/gem_rbs_collection
gems/sidekiq/6.2/_test/test_4.rb
# Test advanced configurations # Taken from: https://github.com/mperham/sidekiq/wiki/Advanced-Options class ImportantWorker include Sidekiq::Worker sidekiq_options queue: 'critical', retry: true, dead: true, backtrace: false, tags: ['important', 'test'] def perform puts "Doing critical work" end end Sidekiq.default_worker_options = { 'backtrace' => true } ImportantWorker.set(queue: :critical).perform_async('name', 15)
POPPIN-FUMI/gem_rbs_collection
gems/chunky_png/1.4.0/_test/test_1.rb
# Basic API usage - Color, Dimension png = ChunkyPNG::Image.new(128, 128, ChunkyPNG::Color::TRANSPARENT) png[1, 1] = ChunkyPNG::Color.rgba(10, 20, 30, 128) png[2, 1] = ChunkyPNG::Color('black @ 0.5') png[3, 1] = ChunkyPNG::Color.rgb(255, 0, 128) png.metadata['title'] = 'Test image' puts png.metadata['title'] puts png.dimension.height.to_s puts png.dimension.width.to_s
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/control.rb
<reponame>POPPIN-FUMI/gem_rbs_collection puts Parallel.map([1, 2, 3]) { |x| raise Parallel::Break, x if x == 2 } == 2 puts Parallel.map([1, 2, 3]) { |x| raise Parallel::Break.new(x) if x == 2 } == 2 Parallel.map([1, 2, 3]) do |x| if x == 1 sleep 0.1 puts 'DEAD' raise Parallel::Kill elsif x == 3 sleep 10 else x end end
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/all.rb
<filename>gems/parallel/1.20/_test/all.rb Parallel.all?(['a','b','c']) { |item| item.size == 1 } Parallel.all?(['a','b','c'], in_processes: 2) { |item| item.size == 1 } Parallel.all?(['a','b','c'], in_threads: 2) { |item| item.size == 1 } Parallel.all?(['a','b','c'], progress: 'Running...') { |item| item.size == 1 } Parallel.all?(['a','b','c'], start: ->(item, index) { puts "Start: #{item * (index + 1)}" }) { |item| item.size == 1 } Parallel.all?(['a','b','c'], finish: ->(item, index, result) { puts "Finish: #{item * (index + 1)}, #{result.inspect}" }) { |item| item.size == 1 } Parallel.all?('a'..'c') { |item| item.size == 1 } items = [1,2,3] Parallel.all?(-> { items.pop || Parallel::Stop }) { |item| item.size == 1 } puts Parallel.all?(['a','b','c']) { |item| item.size == 1 } & false
POPPIN-FUMI/gem_rbs_collection
gems/activerecord/6.0/_test/activerecord-generated.rb
<reponame>POPPIN-FUMI/gem_rbs_collection<gh_stars>10-100 class User < ActiveRecord::Base end user = User.new
POPPIN-FUMI/gem_rbs_collection
gems/sidekiq/6.2/_test/test_5.rb
<gh_stars>10-100 # Test logging configuration # Taken from: https://github.com/mperham/sidekiq/wiki/Logging class YourWorker include Sidekiq::Worker def perform logger.info "Things are happening." logger.debug "Here's some info: #{hash.inspect}" end end Sidekiq.logger.level = Logger::ERROR Sidekiq.configure_server do |config| config.logger = Sidekiq::Logger.new($stdout, level: Logger::INFO) end Sidekiq.configure_server do |config| config.logger.level = Logger::WARN end Sidekiq.configure_server do |config| config.log_formatter = Sidekiq::Logger::Formatters::JSON.new end
POPPIN-FUMI/gem_rbs_collection
gems/retryable/3.0/_test/test.rb
<filename>gems/retryable/3.0/_test/test.rb<gh_stars>10-100 require "retryable" Retryable.retryable(tries: 0) str = Retryable.retryable do "foo" end str&.ascii_only? Retryable.retryable do |retries, exception| retries.bit_length exception&.backtrace end Retryable.retryable( ensure: ->(retries) { retries.bit_length }, exception_cb: ->(exception) { exception.backtrace }, log_method: ->(retries, exception) { [retries.bit_length, exception.backtrace] }, matching: [/foo/, "bar"], not: [ArgumentError], on: StandardError, sleep: 10, sleep_method: ->(n) { n ** 1 }, tries: 3 ) do puts "foo" end Retryable.configuration.tap do |config| config.contexts.keys config.ensure.call(1) config.exception_cb.call(RuntimeError.new) config.log_method.call(1, RuntimeError.new) config.matching config.not config.on config.sleep config.tries.integer? config.enabled config.enabled? config.enable config.disable config[:tries] config.to_hash config.merge({ sleep: 1 }) end Retryable.configuration = Retryable.configuration Retryable.configure do |config| config.contexts[:foo] = { on: [ArgumentError], sleep: 10, tries: 5 } config.ensure = ->(retries) { retries.bit_length } config.exception_cb = ->(exception) { exception.backtrace } config.log_method = ->(retries, exception) { [retries.bit_length, exception&.backtrace] } config.matching = /foo/ config.matching = "bar" config.matching = [/foo/, "bar"] config.not = ArgumentError config.not = [ArgumentError] config.on = ArgumentError config.on = [ArgumentError] config.sleep = 1 config.sleep = 0.5 config.sleep = ->(retries) { retries ** 2 } config.sleep_method = ->(n) { sleep(n.to_int + 1.5) } config.tries = 3 end Retryable.with_context(:foo) Retryable.with_context(:foo, { sleep: 10 }) str = Retryable.with_context(:foo, { sleep: 10, tries: 3 }) do |retries, exception| retries.bit_length exception&.backtrace "foo" end str&.ascii_only? Retryable.retryable_with_context(:faulty_service)
POPPIN-FUMI/gem_rbs_collection
gems/chunky_png/1.4.0/_test/test_3.rb
<reponame>POPPIN-FUMI/gem_rbs_collection # Operations - Manipulating images image = ChunkyPNG::Image.from_file('filename.png') new_image = ChunkyPNG::Canvas.from_canvas(image) image[0, 0] = ChunkyPNG::Color.rgba(255, 0,0, 128) image.line(1, 1, 10, 1, ChunkyPNG::Color.from_hex('#aa007f')) image.flip_horizontally!.rotate_right! image.compose(ChunkyPNG::Image.new(16, 16, ChunkyPNG::Color.rgba(10, 10, 10, 128))) image.rect(0, 0, 16, 16) ChunkyPNG::Canvas.adam7_extract_pass(4, image) image.steps_residues(3,6) image.resample_nearest_neighbor!(6,6) image = ChunkyPNG::Image.from_file('filename.png') image.pixels.map! { |pixel| ChunkyPNG::Color.r(pixel) < 0 ? -1 : 0 }
POPPIN-FUMI/gem_rbs_collection
gems/listen/3.2/_test/test3.rb
listener = Listen.to('dir/path/to/listen', ignore: /\.txt/) { |modified, added, removed| } listener.start listener.ignore! /\.pkg/ # overwrite all patterns and only ignore pkg extension. listener.ignore /\.rb/ # ignore rb extension in addition of pkg. sleep
POPPIN-FUMI/gem_rbs_collection
gems/listen/3.2/_test/test2.rb
<reponame>POPPIN-FUMI/gem_rbs_collection listener = Listen.to('dir/path/to/listen') { |modified, added, removed| puts 'handle changes here...' } listener.start listener.paused? # => false listener.processing? # => true listener.pause # stops processing changes (but keeps on collecting them) listener.paused? # => true listener.processing? # => false # listener.unpause # resumes processing changes ("start" would do the same) listener.stop # stop both listening to changes and processing them
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/each.rb
<gh_stars>0 Parallel.each(['a','b','c']) { |item| puts item } Parallel.each(['a','b','c'], in_processes: 2) { |item| puts item * 2 } Parallel.each(['a','b','c'], in_threads: 2) { |item| puts item * 3 } Parallel.each(['a','b','c'], progress: 'Running...') { |item| puts item * 4 } Parallel.each(['a','b','c'], start: ->(item, index) { puts "Start: #{item * (index + 1)}" }) { |item| puts item * 5 } Parallel.each(['a','b','c'], finish: ->(item, index, result) { puts "Finish: #{item * (index + 1)}, #{result.inspect}" }) { |item| item * 6 } Parallel.each('a'..'c') { |item| puts item * 7 } items = [1,2,3] puts Parallel.each(-> { items.pop || Parallel::Stop }) { |item| puts item }.call puts Parallel.each(['a','b','c']) { |item| item }.map(&:ascii_only?).count puts Parallel.each_with_index(['a','b','c']) { |item, index| puts item * index }.count items = [1,2,3] puts Parallel.each_with_index(-> { items.pop || Parallel::Stop }) { |item, index| puts item * index }.call
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/expert-mode-options.rb
Redis.new(inherit_socket: true)
POPPIN-FUMI/gem_rbs_collection
gems/scanf/1.0/_test/test.rb
# Write Ruby code to test the RBS. # It is type checked by `steep check` command. require 'scanf' # String#scanf and IO#scanf take a single argument, the format string "123ac".scanf("%d%s") File.open('test.rb', "rb").scanf("%d%s") # Kernel#scanf reads from STDIN scanf("%d%s")
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/get_set.rb
redis = Redis.new redis.set("mykey", "hello world") # => "OK" redis.get("mykey") # => "hello world"
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/map.rb
puts Parallel.map(['a','b','c']) { |item| item * 1 }.at(0) puts Parallel.map(['a','b','c'], in_processes: 2) { |item| item * 2 }.at(0) puts Parallel.map(['a','b','c'], in_threads: 2) { |item| item * 3 }.at(0) puts Parallel.map(['a','b','c'], progress: 'Running...') { |item| item * 4 }.at(0) puts Parallel.map(['a','b','c'], start: ->(item, index) { puts "Start: #{item * (index + 1)}" }) { |item| item * 5 }.at(0) puts Parallel.map(['a','b','c'], finish: ->(item, index, result) { puts "Finish: #{item * (index + 1)}, #{result.inspect}" }) { |item| item * 6 }.at(0) puts Parallel.map('a'..'c') { |item| item * 2 }.at(0) items = [1,2,3] puts Parallel.map(-> { items.pop || Parallel::Stop }) { |item| item / 2.0 }.at(0) puts Parallel.map_with_index(['a','b','c'], in_threads: 2) { |item, index| item * index }.at(0) puts Parallel.map_with_index('a'..'c', in_processes: 2) { |item, index| item * index }.at(0) items = [1,2,3] puts Parallel.map_with_index(-> { items.pop || Parallel::Stop }) { |item, index| item * index }.at(0) puts Parallel.flat_map(['a','b','c']) { |item| [item] }.at(0) puts Parallel.flat_map('a'..'c') { |item| [item] }.at(0)
POPPIN-FUMI/gem_rbs_collection
gems/graphql/1.12/_test/test.rb
<gh_stars>10-100 require "graphql" # generated codes module Types class BaseObject < GraphQL::Schema::Object end class BaseEdge < Types::BaseObject end class BaseConnection < Types::BaseObject include GraphQL::Types::Relay::ConnectionBehaviors end class BaseArgument < GraphQL::Schema::Argument end class BaseField < GraphQL::Schema::Field argument_class Types::BaseArgument end class BaseObject < GraphQL::Schema::Object edge_type_class(Types::BaseEdge) connection_type_class(Types::BaseConnection) field_class Types::BaseField end class BaseEdge < Types::BaseObject include GraphQL::Types::Relay::EdgeBehaviors end class BaseEnum < GraphQL::Schema::Enum end class BaseInputObject < GraphQL::Schema::InputObject argument_class Types::BaseArgument end module BaseInterface include GraphQL::Schema::Interface edge_type_class(Types::BaseEdge) connection_type_class(Types::BaseConnection) field_class Types::BaseField end class BaseScalar < GraphQL::Schema::Scalar end class BaseUnion < GraphQL::Schema::Union edge_type_class(Types::BaseEdge) connection_type_class(Types::BaseConnection) end module NodeType include Types::BaseInterface include GraphQL::Types::Relay::NodeBehaviors end # sample query class QueryType < Types::BaseObject include GraphQL::Types::Relay::HasNodeField include GraphQL::Types::Relay::HasNodesField field :ping, String, null: false, description: "ping" def ping = context[:ping].pong end end module Mutations class BaseMutation < GraphQL::Schema::RelayClassicMutation argument_class Types::BaseArgument field_class Types::BaseField input_object_class Types::BaseInputObject object_class Types::BaseObject end # sample mutation class Ping < BaseMutation description "ping" argument :arg1, String, required: true, description: "arg1" argument :arg2, Boolean, required: true, description: "arg2" end end # sample schema class MySchema < GraphQL::Schema rescue_from(StandardError) do |err| raise "error!" end end
POPPIN-FUMI/gem_rbs_collection
gems/parallel/1.20/_test/queue.rb
<filename>gems/parallel/1.20/_test/queue.rb queue = Queue.new queue.push 1 queue.push 2 queue.push 3 queue.push Parallel::Stop puts Parallel.map(queue, in_threads: 2) { |i| "ITEM-#{i}" }
POPPIN-FUMI/gem_rbs_collection
gems/rainbow/3.0/_test/rainbow_test.rb
rainbow = Rainbow("hello") rainbow.color(:pink) rainbow.reset .italic .bold .underline .blink .inverse .hide .black .red .green .yellow .blue .magenta .cyan .white Rainbow.enabled Rainbow.enabled = false Rainbow.uncolor("a string") # X11 color names Rainbow('Hi').aliceblue Rainbow('Hi').antiquewhite Rainbow('Hi').aqua Rainbow('Hi').aquamarine Rainbow('Hi').azure Rainbow('Hi').beige Rainbow('Hi').bisque Rainbow('Hi').blanchedalmond Rainbow('Hi').blueviolet Rainbow('Hi').brown Rainbow('Hi').burlywood Rainbow('Hi').cadetblue Rainbow('Hi').chartreuse Rainbow('Hi').chocolate Rainbow('Hi').coral Rainbow('Hi').cornflower Rainbow('Hi').cornsilk Rainbow('Hi').crimson Rainbow('Hi').darkblue Rainbow('Hi').darkcyan Rainbow('Hi').darkgoldenrod Rainbow('Hi').darkgray Rainbow('Hi').darkgreen Rainbow('Hi').darkkhaki Rainbow('Hi').darkmagenta Rainbow('Hi').darkolivegreen Rainbow('Hi').darkorange Rainbow('Hi').darkorchid Rainbow('Hi').darkred Rainbow('Hi').darksalmon Rainbow('Hi').darkseagreen Rainbow('Hi').darkslateblue Rainbow('Hi').darkslategray Rainbow('Hi').darkturquoise Rainbow('Hi').darkviolet Rainbow('Hi').deeppink Rainbow('Hi').deepskyblue Rainbow('Hi').dimgray Rainbow('Hi').dodgerblue Rainbow('Hi').firebrick Rainbow('Hi').floralwhite Rainbow('Hi').forestgreen Rainbow('Hi').fuchsia Rainbow('Hi').gainsboro Rainbow('Hi').ghostwhite Rainbow('Hi').gold Rainbow('Hi').goldenrod Rainbow('Hi').gray Rainbow('Hi').greenyellow Rainbow('Hi').honeydew Rainbow('Hi').hotpink Rainbow('Hi').indianred Rainbow('Hi').indigo Rainbow('Hi').ivory Rainbow('Hi').khaki Rainbow('Hi').lavender Rainbow('Hi').lavenderblush Rainbow('Hi').lawngreen Rainbow('Hi').lemonchiffon Rainbow('Hi').lightblue Rainbow('Hi').lightcoral Rainbow('Hi').lightcyan Rainbow('Hi').lightgoldenrod Rainbow('Hi').lightgray Rainbow('Hi').lightgreen Rainbow('Hi').lightpink Rainbow('Hi').lightsalmon Rainbow('Hi').lightseagreen Rainbow('Hi').lightskyblue Rainbow('Hi').lightslategray Rainbow('Hi').lightsteelblue Rainbow('Hi').lightyellow Rainbow('Hi').lime Rainbow('Hi').limegreen Rainbow('Hi').linen Rainbow('Hi').maroon Rainbow('Hi').mediumaquamarine Rainbow('Hi').mediumblue Rainbow('Hi').mediumorchid Rainbow('Hi').mediumpurple Rainbow('Hi').mediumseagreen Rainbow('Hi').mediumslateblue Rainbow('Hi').mediumspringgreen Rainbow('Hi').mediumturquoise Rainbow('Hi').mediumvioletred Rainbow('Hi').midnightblue Rainbow('Hi').mintcream Rainbow('Hi').mistyrose Rainbow('Hi').moccasin Rainbow('Hi').navajowhite Rainbow('Hi').navyblue Rainbow('Hi').oldlace Rainbow('Hi').olive Rainbow('Hi').olivedrab Rainbow('Hi').orange Rainbow('Hi').orangered Rainbow('Hi').orchid Rainbow('Hi').palegoldenrod Rainbow('Hi').palegreen Rainbow('Hi').paleturquoise Rainbow('Hi').palevioletred Rainbow('Hi').papayawhip Rainbow('Hi').peachpuff Rainbow('Hi').peru Rainbow('Hi').pink Rainbow('Hi').plum Rainbow('Hi').powderblue Rainbow('Hi').purple Rainbow('Hi').rebeccapurple Rainbow('Hi').rosybrown Rainbow('Hi').royalblue Rainbow('Hi').saddlebrown Rainbow('Hi').salmon Rainbow('Hi').sandybrown Rainbow('Hi').seagreen Rainbow('Hi').seashell Rainbow('Hi').sienna Rainbow('Hi').silver Rainbow('Hi').skyblue Rainbow('Hi').slateblue Rainbow('Hi').slategray Rainbow('Hi').snow Rainbow('Hi').springgreen Rainbow('Hi').steelblue Rainbow('Hi').tan Rainbow('Hi').teal Rainbow('Hi').thistle Rainbow('Hi').tomato Rainbow('Hi').turquoise Rainbow('Hi').violet Rainbow('Hi').webgray Rainbow('Hi').webgreen Rainbow('Hi').webmaroon Rainbow('Hi').webpurple Rainbow('Hi').wheat Rainbow('Hi').whitesmoke Rainbow('Hi').yellowgreen
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/timeout.rb
Redis.new(:timeout => 1) Redis.new( :connect_timeout => 0.2, :read_timeout => 1.0, :write_timeout => 0.5 )
POPPIN-FUMI/gem_rbs_collection
gems/sidekiq/6.2/_test/test_1.rb
<reponame>POPPIN-FUMI/gem_rbs_collection<gh_stars>0 # Test fundamental APIs # Taken from: https://github.com/mperham/sidekiq/wiki/Getting-Started class HardWorker include Sidekiq::Worker def perform(name, count) puts "Performing #{name} #{count} times" end end HardWorker.perform_async('bob', 5) HardWorker.perform_at(Time.now + 5*60, 'bob', 5)
POPPIN-FUMI/gem_rbs_collection
gems/redis/4.2/_test/cluster.rb
# @type var nodes: Array[Redis::node] nodes = (7000..7005).map { |port| "redis://127.0.0.1:#{port}" } redis = Redis.new(cluster: nodes) nodes = (7000..7005).map do |port| # @type block: Redis::node { host: '127.0.0.1', port: port } end redis = Redis.new(cluster: nodes)
POPPIN-FUMI/gem_rbs_collection
gems/ast/2.4/_test/test.rb
require 'ast' def String!(_) end def Symbol!(_) end def Array!(_) end def Node!(_) end def Bool!(_) end # AST::Node node1 = AST::Node.new(:x) node2 = AST::Node.new(:x, [:foo, 42]) AST::Node.new(:x, [:foo, 42], { y: 1 }) Array! node1.children String! node1.hash Symbol! node1.type Bool! node1 == node2 Node! node1.append 42 Node! node1.concat [1, 2, 3] Node! node1.dup Bool! node1.eql? node2 String! node1.inspect Node! node1.to_ast String! node1.to_sexp Array! node1.to_sexp_array Node! node1.updated Node! node1.updated(:foo) Node! node1.updated(:foo, []) Node! node1.updated(:foo, [], {}) # AST::Processor p = AST::Processor.new n = p.process(node1) Node! n if n p.process(nil) Array! p.process_all([node1, node2]) # AST::Sexp class X extend AST::Sexp end Node! X.s(:foo, 1, 2, 3) Node! X.s('foo', 1, 2, 3)
POPPIN-FUMI/gem_rbs_collection
gems/httpclient/2.8/_test/test.rb
require "httpclient" client = HTTPClient.new res = client.get("http://example.com", query: {"q" => "v"}) if res.status == 200 puts res.body end resnil = client.get("http://example.com") { |chunk| chunk.gsub(//) } unless resnil.body puts 'ok' end conn = client.post_async("http://example.com", body: { "name" => "ksss" }, header: { "Token" => "Yo" }) puts conn.pop.body.read
POPPIN-FUMI/gem_rbs_collection
gems/protobuf/3.10.3/_test/services.rb
module Services class UserService rpc :find, UserRequest, UserList end end
POPPIN-FUMI/gem_rbs_collection
gems/protobuf/3.10.3/_test/messages.rb
module Messages ::Protobuf::Optionable.inject(self) { ::Google::Protobuf::FileOptions } class User < Protobuf::Message; end class Address < Protobuf::Message; end class User optional :string, :first_name, 1 optional :string, :last_name, 2 optional ::Messages::Address, :address, 3 optional :bool, :is_active, 4 end class Address optional :string, :street, 1 optional :string, :city, 2 optional ::Enum::States, :state, 3 optional :int32, :zip_code, 4 end user = User.new user.field?(:first_name) user.field?(:address) user.field?(:last_name) user.respond_to_has_and_present?(:last_name) user.encode user.encode_to(STDERR) user.encode_to([]) user.encode_to(30) User.decode("") User.decode_from(STDIN) User.decode_from("") user.to_hash.___error___ user.to_json.___error___ end
POPPIN-FUMI/gem_rbs_collection
gems/chunky_png/1.4.0/_test/test_4.rb
<gh_stars>10-100 image = ChunkyPNG::Image.from_rgba_stream(128, 128, File.read('pixeldata.rgba')) # or image.save('filename.png', :best_compression) File.open('newfile.png', 'wb' ) { |io| image.write(io) } png_data = image.to_blob(:fast_rgba) image.save('filename.png', :color_mode => ChunkyPNG::COLOR_INDEXED, :compression => Zlib::NO_COMPRESSION, :interlace => true)
readeldj/cheers_take3
cheers.rb
#!/usr/bin/env ruby require_relative 'lib/cheer' # This file is for I/O, and delegates logic to our tested classes (in lib). puts "Hello, what's your name?" name = gets puts Cheer.for_person(name) puts "Hey #{name}, what's your birthday? (mm/dd)" birthday_string = gets puts Cheer.for_birthday(birthday_string)
readeldj/cheers_take3
lib/birthday_parser.rb
class BirthdayParser def self.parse(birthday) next_birthday = Date.parse(birthday) today = Date.today if next_birthday < today next_birthday = next_birthday >> 12 end next_birthday end end
readeldj/cheers_take3
lib/cheer.rb
require_relative 'birthday_parser' class Cheer AN_LETTERS = "HALFNORSEMIX" def self.for_birthday(birthday) today = Date.today # puts today next_birthday = BirthdayParser.parse(birthday) difference = (next_birthday - today).to_i case difference when 0 # Today is their birthday "Awesome! Your birthday is today! Happy Birthday!" when 1 #Use the singular? "Awesome! Your birthday is in 1 day! Happy Birthday in advance!" else #Use the plural? "Awesome! Your birthday is in #{difference} days! Happy Birthday in advance!" end end def self.for_person(name) name.chomp! adjusted_name = name.upcase.gsub(/[^A-Z]*/,'') raise ArgumentError if adjusted_name.empty? output = "" adjusted_name.each_char do |char| article = (AN_LETTERS.include? char) ? "an.." : "a..." output << "Give me #{article} #{char}!\n" end output + "#{name}'s just GRAND!" end end # def self.for_person(name) # cheer_name = name.upcase.gsub(/[^A-Z]/, "") # cheer_name.each_char do |char| # if "HALFNORSEMIX".include? char # puts "Give me an.. #{char}" # else # puts "Give me a.. #{char}" # end # puts "#{name}’s just GRAND!" # end # end
ninjudd/deep_clonable
test/test_helper.rb
<gh_stars>1-10 require 'rubygems' require 'test/unit' require 'shoulda' require 'mocha/setup' require 'deep_clonable' class Test::Unit::TestCase end
ninjudd/deep_clonable
test/deep_clonable_test.rb
require File.dirname(__FILE__) + '/test_helper' class TestClass deep_clonable attr_reader :num, :hash, :array def initialize(num, hash, array) @num = num @hash = hash @array = array end clone_method :+, :add! def add!(other) @num += other.num @hash.merge!(other.hash) @array.concat(other.array) end clone_method :invert def invert! @num = -(@num) @hash = @hash.invert @array.reverse! end end class DeepClonableTest < Test::Unit::TestCase should 'clone method' do a = TestClass.new(10, {:a => 1}, [1,2,3]) b = a.invert assert_equal(10, a.num) assert_equal({:a => 1}, a.hash) assert_equal([1,2,3], a.array) assert_equal(-10, b.num) assert_equal({1 => :a}, b.hash) assert_equal([3,2,1], b.array) end should 'clone method with rename' do a = TestClass.new(10, {:a => 1}, [1]) b = TestClass.new(20, {:b => 2}, [2,3]) c = a + b assert_equal(10, a.num) assert_equal({:a => 1}, a.hash) assert_equal([1], a.array) assert_equal(20, b.num) assert_equal({:b => 2}, b.hash) assert_equal([2,3], b.array) assert_equal(30, c.num) assert_equal({:a => 1, :b => 2}, c.hash) assert_equal([1,2,3], c.array) end should 'return a frozen object when cloning a frozen object' do a = TestClass.new(10, {:a => 1}, [1,2,3]).freeze assert_raises(TypeError) do a.invert! end b = a.invert assert_equal(10, a.num) assert_equal({:a => 1}, a.hash) assert_equal([1,2,3], a.array) assert_equal(-10, b.num) assert_equal({1 => :a}, b.hash) assert_equal([3,2,1], b.array) assert a.frozen? assert b.frozen? assert a.clone.frozen? end should 'unfreeze an object when duping' do a = TestClass.new(10, {:a => 1}, [1,2,3]).freeze b = a.dup assert a.frozen? assert !b.frozen? b.invert! assert_equal(10, a.num) assert_equal({:a => 1}, a.hash) assert_equal([1,2,3], a.array) assert_equal(-10, b.num) assert_equal({1 => :a}, b.hash) assert_equal([3,2,1], b.array) end end
ninjudd/deep_clonable
lib/deep_clonable.rb
class Class def deep_clonable include DeepClonable::InstanceMethods extend DeepClonable::ClassMethods end end module DeepClonable module InstanceMethods def clone cloned_object = dup yield(cloned_object) if block_given? frozen? ? cloned_object.freeze : cloned_object end def dup cloned_object = super() cloned_object.update_vars(deep_vars, :dup) cloned_object end alias old_freeze freeze def freeze update_vars(deep_vars, :freeze) old_freeze end # You can override deep_vars in your class to specify which instance_variables should be deep cloned. # As it is, all Arrays and Hashes are deep cloned. def deep_vars instance_variables.select do |var| value = instance_variable_get(var) value.kind_of?(Array) or value.kind_of?(Hash) or value.kind_of?(DeepClonable::InstanceMethods) end end def update_vars(vars, method) vars.each do |var| value = instance_variable_get(var) instance_variable_set(var, value.send(method)) end end end module ClassMethods # Use this to define cloning version of the given in-place methods. # # This method supports a common idiom where you create in-place and # cloning versions of most operations. This method allows you to # define only the in-place version (with the trailing bang (!), # that part is important) and specify the cloning versions by name # using this method. def clone_method(clone_method_name, method_name = nil) clone_method_name = clone_method_name.to_s.gsub(/\!$/,'') method_name ||= "#{clone_method_name}!" class_eval %{ def #{clone_method_name}(*args, &block) self.clone do |object| object.#{method_name}(*args) block ? block.call(object) : object end end } end end end
localytics/stager-client
lib/stager.rb
<filename>lib/stager.rb require File.expand_path "stager/version", File.dirname(__FILE__) require "thor" require "httparty" require "configliere" require "launchy" require File.expand_path "auth_strategy", File.dirname(__FILE__) module Stager class Command < Thor Dir[File.expand_path("auth_strategies/*.rb", File.dirname(__FILE__))].each {|f| require f} no_commands do def auth_strategy return @auth_strategy if @auth_strategy return nil unless Settings['auth_strategy'] && !Settings['auth_strategy'].empty? strategy = Stager.const_get(Settings['auth_strategy']).new return nil unless strategy.kind_of? Stager::AuthStrategy @auth_strategy = strategy.for_cli(self) end def apply_request_overrides(options) options[:verify] = false if Settings.key?('verify_ssl') && Settings['verify_ssl'] == 'false' options end def request_options(image_name, container_name) options = {body: {image_name: image_name, container_name: container_name}} return options unless auth_strategy auth_strategy.sign_request_options(options) apply_request_overrides(options) end def endpoint unless Settings['endpoint'] && !Settings['endpoint'].empty? raise "No endpoint configured. Run stager configure endpoint=https://your-stager-host" end Settings['endpoint'] end def save_settings Settings.save!('~/.stager-cli') end end desc 'configure OPTIONS', "Saves configuration options for stager cli to ~/.stager-cli \n" << "eg: stager configure endpoint=https://stager.io auth_strategy=GithubAuthentication" def configure(*args) args.each do |a| k, v = a.split('=') if v && !v.empty? Settings[k.to_s] = v else Settings.delete(k.to_s) end end save_settings end desc 'show_config', 'Displays current configuration' def show_config puts Settings.to_yaml end desc 'launch IMAGE_NAME CONTAINER_NAME', "Launches a container with specified name, using specified image \n" << 'Passing in a container name which points to a running container will cause that container to be re-launched' def launch(image_name, container_name) r = HTTParty.post("#{endpoint}/launch", request_options(image_name, container_name)) if r.body =~ URI::regexp sleep 2 Launchy.open(r.body) else puts r.body end end desc 'kill IMAGE_NAME CONTAINER_NAME', 'Kills a container running specified image with specified name' def kill(image_name, container_name) r = HTTParty.post("#{endpoint}/kill", request_options(image_name, container_name)) puts r.body end Settings.read('~/.stager-cli') end end
localytics/stager-client
lib/auth_strategies/github.rb
require "launchy" module Stager class Github < Stager::AuthStrategy def token return Settings['github_token'] if Settings['github_token'] and !Settings['github_token'].empty? gh_state = Digest::MD5.hexdigest("#{(36**8).to_s(36)}#{Time.now.to_i}") oauth_url = HTTParty.post("#{@cli.endpoint}/event_receiver", body: {action: 'get_oauth_url', gh_state: gh_state}).body puts "No oauth token configured, please log into Github when prompted. Press ENTER to continue." STDIN.gets Launchy.open(oauth_url) puts "Press ENTER to continue once web authentication flow is complete" STDIN.gets Settings['github_token'] = HTTParty.post("#{@cli.endpoint}/event_receiver", body: {action: 'get_github_token', gh_state: gh_state}).body @cli.save_settings Settings['github_token'] end def sign_request_options(options) options[:body][:github_token] = token end end end
localytics/stager-client
lib/auth_strategies/basic.rb
require 'io/console' module Stager class Basic < Stager::AuthStrategy def saved_user Settings[:username] end def user_saved? saved_user && !saved_user.empty? end def save_user puts "No user configured for basic auth" print "Please enter username: " username = STDIN.gets.chomp puts "\n Saving username to config" Settings[:username] = username @cli.save_settings end def sign_request_options(options) save_user unless user_saved? print "Please enter password for user #{saved_user}: " password = STDIN.noecho { |i| i.gets.chomp } print "\n" options[:basic_auth] = {username: saved_user, password: password} end end end
localytics/stager-client
lib/auth_strategy.rb
<reponame>localytics/stager-client module Stager class AuthStrategy def for_cli(cli) @cli = cli self end def sign_request_options(options) raise NotImplementedError end end end
oklas/gem-json-rpc
lib/JsonRpcHttpServer.rb
require 'eventmachine' require 'evma_httpserver' require 'json' class JsonRpcHttpServer < EM::Connection include EM::HttpServer def post_init super no_environment_strings end def id 1 end def process_http_request err = nil response = EM::DelegatedHttpResponse.new(self) response.status = 200 response.content_type 'application/json' begin req = JSON.parse( @http_post_content ) method = req['method'] unless self.respond_to? method err = {"code": -32601, "message": "Method not found"} raise end self.method(method).call( *req['params'] ) do |err,res| err = err.nil? ? nil : { "code": -32600, "message": err } res = err.nil? ? { jsonrpc: "2.0", result: res, id: id } : { jsonrpc: "2.0", error: err, id: id } response.content = res.to_json response.send_response end rescue Exception => e if err.nil? err = { "code": -32600, "message": e.message } end end unless err.nil? res = { jsonrpc: "2.0", error: err, id: id } response.content = res.to_json response.send_response end end end
oklas/gem-json-rpc
gem-json-rpc.gemspec
<reponame>oklas/gem-json-rpc Gem::Specification.new do |s| s.name = 'gem-json-rpc' s.license = 'MIT' s.version = '0.1.0' s.date = '2017-02-21' s.summary = "em json rpc" s.description = "eventmachine based simplificators of json-rpc in ruby" s.authors = ["<NAME>"] s.email = '<EMAIL>' s.files = ["lib/JsonRpcHttpServer.rb", "lib/JsonRpcHttpClient.rb"] s.homepage = 'http://github.com/oklas' s.add_dependency 'formtastic' s.add_dependency 'eventmachine' s.add_dependency 'json-rpc-client' s.add_dependency 'eventmachine_httpserver'#, :require => 'evma_httpserver' end
oklas/gem-json-rpc
lib/gem-json-rpc.rb
require 'JsonRpcHttpServer' require 'JsonRpcHttpClient'
oklas/gem-json-rpc
lib/JsonRpcHttpClient.rb
<reponame>oklas/gem-json-rpc require 'eventmachine' require 'json-rpc-client' require 'fiber' class JsonRpcHttpClient def initialize(url) @url = url end def _rpc_call(method, *args) err = nil res = nil EventMachine.run do # To use the syncing behaviour, use it in a fiber. fiber = Fiber.new do rpc = JsonRpcClient.new( @url, {asynchronous_calls: false} ) begin res = rpc.send(method, *args) rescue Exception => e err = e.message end EventMachine.stop end fiber.resume end [err,res] end def method_missing(method, *args) _rpc_call method, *args end end
rapid7/rex-core
lib/rex/core/version.rb
module Rex module Core VERSION = "0.1.19" end end
johngrimes/bigcharger
lib/bigcharger/utils.rb
<filename>lib/bigcharger/utils.rb require 'logger' class BigCharger private def set_request_defaults @client.verbose = false @client.url = @endpoint @client.headers['Content-Type'] = 'text/xml' end def wrap_in_envelope(&block) envelope = Nokogiri::XML::Builder.new do |xml| xml.Envelope('xmlns:soap' => SOAP_NAMESPACE, 'xmlns:man' => SERVICE_NAMESPACE) { xml.parent.namespace = xml.parent.namespace_definitions.find { |ns| ns.prefix == 'soap' } xml['soap'].Header { xml['man'].eWAYHeader { xml['man'].eWAYCustomerID @credentials[:customer_id] xml['man'].Username @credentials[:username] xml['man'].Password @credentials[:password] } } xml['soap'].Body { yield xml } } end end def post(envelope, action_name) @client.headers['SOAPAction'] = "#{SERVICE_NAMESPACE}/#{action_name}" record_request(@client, envelope.to_xml) @client.http_post @last_request[:body] log_last_request record_response(@client) log_last_response check_last_response_for_faults check_last_response_for_errors return @last_response[:body_document] end def record_request(request, body) @last_request = {} @last_request[:headers] = request.headers.clone @last_request[:body] = body end def record_response(response) @last_response = {} @last_response[:header_string] = response.header_str.clone @last_response[:body] = response.body_str.clone @last_response[:body_document] = Nokogiri::XML(response.body_str) end def log_operation(name, *args) log_string = "BigCharger##{name} called with: " log_string << args.map { |x| x.inspect }.join(', ') @logger.debug log_string end def log_last_request header_output = @last_request[:headers].map { |k,v| "#{k}: #{v}" }.join("\n") log_string = "BigCharger - Request sent to eWAY server\n" log_string << "#{header_output}\n#{@last_request[:body]}" @logger.debug log_string end def log_last_response body_output = @last_response[:body_document].serialize(:encoding => 'UTF-8') do |config| config.format.as_xml end log_string = "BigCharger - Response received from eWAY server\n" log_string << "#{@last_response[:header_string]}\n#{body_output}" @logger.debug log_string end def check_last_response_for_faults faults = @last_response[:body_document].xpath('//soap:Fault', { 'soap' => SOAP_NAMESPACE }) unless faults.empty? fault = faults.first fault_code = fault.xpath('faultcode').first.text fault_message = fault.xpath('faultstring').first.text raise Error, "eWAY server responded with \"#{fault_message}\" (#{fault_code})" end end def check_last_response_for_errors status_info = @last_response[:header_string].match(/HTTP\/[\d\.]+ (\d{3}) ([\w\s]+)[\r\n]/) status_code, status_reason = status_info[1].strip, status_info[2].strip unless ['200', '100'].include? status_code raise Error, "eWAY server responded with \"#{status_reason}\" (#{status_code})" end end def node_to_hash(node) hash = {} node.children.each do |node| if node.type == Nokogiri::XML::Node::ELEMENT_NODE hash[node.name] = node.text.empty? ? nil : node.text end end return hash end def node_collection_to_array(node) array = [] node.children.each do |node| if node.type == Nokogiri::XML::Node::ELEMENT_NODE array << node_to_hash(node) end end return array end end
johngrimes/bigcharger
lib/bigcharger/config.rb
<filename>lib/bigcharger/config.rb class BigCharger SOAP_NAMESPACE = 'http://schemas.xmlsoap.org/soap/envelope/' SERVICE_NAMESPACE = 'https://www.eway.com.au/gateway/managedpayment' ENDPOINT = 'https://www.eway.com.au/gateway/ManagedPaymentService/managedCreditCardPayment.asmx' TEST_ENDPOINT = 'https://www.eway.com.au/gateway/ManagedPaymentService/test/managedCreditCardPayment.asmx' # List of fields (with significant ordering as per WSDL) for customer # requests CUSTOMER_REQUEST_FIELDS = [ 'Title', 'FirstName', 'LastName', 'Address', 'Suburb', 'State', 'Company', 'PostCode', 'Country', 'Email', 'Fax', 'Phone', 'Mobile', 'CustomerRef', 'JobDesc', 'Comments', 'URL', 'CCNumber', 'CCNameOnCard', 'CCExpiryMonth', 'CCExpiryYear' ] end
johngrimes/bigcharger
lib/bigcharger.rb
<filename>lib/bigcharger.rb require File.dirname(__FILE__) + '/bigcharger/config' require File.dirname(__FILE__) + '/bigcharger/utils' require File.dirname(__FILE__) + '/bigcharger/ops' class BigCharger attr_accessor :logger def initialize(customer_id, username, password, test_mode = false, logger = Logger.new('/dev/null')) @credentials = { :customer_id => customer_id, :username => username, :password => password } @client = Curl::Easy.new @endpoint = test_mode ? TEST_ENDPOINT : ENDPOINT @logger = logger set_request_defaults end class Error < Exception; end end
johngrimes/bigcharger
spec/spec_helper.rb
require 'rubygems' require 'bundler' Bundler.setup(:default, :development) require 'webmock/rspec' require 'simplecov' WebMock.disable_net_connect! SimpleCov.start module BigChargerSpecHelpers def message(name) file = File.open(File.join(File.dirname(__FILE__), "./messages/#{name.to_s}.xml"), 'rb') return file.read end def request_document Nokogiri::XML(@request.body) end def spec_document(name) Nokogiri::XML(message(name)) end end
johngrimes/bigcharger
bigcharger.gemspec
Gem::Specification.new do |s| s.name = 'bigcharger' s.version = '0.1.0' s.description = 'A lightweight Ruby library for interfacing with the eWAY Token Payments API.' s.summary = s.description s.authors = ['<NAME>'] s.email = '<EMAIL>' s.homepage = 'http://github.com/johngrimes/bigcharger' s.require_paths = ['lib'] s.extra_rdoc_files = [ 'LICENSE', 'README.markdown' ] s.files = Dir['{lib,spec,tasks}/**/*'] s.test_files = Dir['{spec}/**/*'] s.required_rubygems_version = Gem::Requirement.new('>= 1.3.6') if s.respond_to? :required_rubygems_version= s.add_dependency 'nokogiri', '~> 1.5.0' s.add_dependency 'curb', '~> 0.8.0' s.add_development_dependency 'rspec', '~> 2.7.0' s.add_development_dependency 'rake', '~> 0.14.6' s.add_development_dependency 'webmock', '~> 1.7.10' s.add_development_dependency 'simplecov', '~> 0.5.4' s.add_development_dependency 'yard', '~> 0.7.5' s.add_development_dependency 'redcarpet', '~> 2.1.0' end
johngrimes/bigcharger
spec/bigcharger_spec.rb
<gh_stars>1-10 require File.dirname(__FILE__) + '/spec_helper' require File.dirname(__FILE__) + '/../lib/bigcharger' describe BigCharger do include BigChargerSpecHelpers before(:all) do @customer_id = '87654321' @username = '<EMAIL>' @password = '<PASSWORD>' @test_customer_id = '9876543211000' @test_customer_ref = 'Test 123' @client = BigCharger.new(@customer_id, @username, @password) @endpoint = BigCharger::ENDPOINT @namespace = BigCharger::SERVICE_NAMESPACE # DEBUG # @client.logger = Logger.new(STDOUT) end describe '#create_customer' do before(:all) do @customer = { 'CustomerRef' => 'Test 123', 'Title' => 'Mr.', 'FirstName' => 'Jo', 'LastName' => 'Smith', 'Company' => 'company', 'JobDesc' => 'Analyst', 'Email' => '<EMAIL>', 'Address' => '15 Dundas Court', 'Suburb' => 'phillip', 'State' => 'act', 'PostCode' => '2606', 'Country' => 'au', 'Phone' => '02111111111', 'Mobile' => '04111111111', 'Fax' => '111122222', 'URL' => 'http://eway.com.au', 'Comments' => 'Comments', 'CCNameOnCard' => '<NAME>', 'CCNumber' => '444433XXXXXX1111', 'CCExpiryMonth' => '08', 'CCExpiryYear' => '15' } end describe 'success scenario' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:create_customer_response) ) @client.create_customer(@customer) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/CreateCustomer", 'Content-Type' => 'text/xml' }) @client.create_customer(@customer) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:create_customer_request)) @client.create_customer(@customer) end it 'should return the correct ID' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:create_customer_response) ) response = @client.create_customer(@customer) response.should == @test_customer_id end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.create_customer(@customer) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.create_customer(@customer) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#process_payment' do before(:all) do @amount = 1000 @invoice_ref = 'INV-80123' @invoice_desc = 'Payment for services rendered' end describe 'success scenario' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:process_payment_response) ) @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/ProcessPayment", 'Content-Type' => 'text/xml' }) @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:process_payment_request)) @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:process_payment_response) ) response = @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) response['ewayTrxnError'].should == '00,Transaction Approved(Test Gateway)' response['ewayTrxnStatus'].should == 'True' response['ewayTrxnNumber'].should == '1011634' response['ewayReturnAmount'].should == '1000' response['ewayAuthCode'].should == '123456' end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.process_payment(@test_customer_id, @amount, @invoice_ref, @invoice_desc) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#process_payment_with_cvn' do before(:all) do @amount = 1000 @cvn = '123' @invoice_ref = 'INV-80123' @invoice_desc = 'Payment for services rendered' end describe 'success scenario' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:process_payment_with_cvn_response) ) @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/ProcessPaymentWithCVN", 'Content-Type' => 'text/xml' }) @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:process_payment_with_cvn_request)) @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:process_payment_with_cvn_response) ) response = @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) response['ewayTrxnError'].should == '00,Transaction Approved(Test CVN Gateway)' response['ewayTrxnStatus'].should == 'True' response['ewayTrxnNumber'].should == '21803' response['ewayReturnAmount'].should == '1000' response['ewayAuthCode'].should == '123456' end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.process_payment_with_cvn(@test_customer_id, @amount, @cvn, @invoice_ref, @invoice_desc) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#query_customer' do describe 'success scenarios' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_customer_response) ) @client.query_customer(@test_customer_id) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/QueryCustomer", 'Content-Type' => 'text/xml' }) @client.query_customer(@test_customer_id) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:query_customer_request)) @client.query_customer(@test_customer_id) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_customer_response) ) response = @client.query_customer(@test_customer_id) response['ManagedCustomerID'].should == '9876543211000' response['CustomerRef'].should == 'Test 123' response['CustomerTitle'].should == 'Mr.' response['CustomerFirstName'].should == 'Jo' response['CustomerLastName'].should == 'Smith' response['CustomerCompany'].should == 'company' response['CustomerJobDesc'].should be_nil response['CustomerEmail'].should == '<EMAIL>' response['CustomerAddress'].should == '15 Dundas Court' response['CustomerSuburb'].should == 'phillip' response['CustomerState'].should == 'act' response['CustomerPostCode'].should == '2606' response['CustomerCountry'].should == 'au' response['CustomerPhone1'].should == '02111111111' response['CustomerPhone2'].should == '04111111111' response['CustomerFax'].should == '111122222' response['CustomerURL'].should == 'http://eway.com.au' response['CustomerComments'].should == 'Comments' response['CCName'].should == '<NAME>' response['CCNumber'].should == '444433XXXXXX1111' response['CCExpiryMonth'].should == '08' response['CCExpiryYear'].should == '15' end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.query_customer(@test_customer_id) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.query_customer(@test_customer_id) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#query_customer_by_reference' do describe 'success scenarios' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_customer_by_reference_response) ) @client.query_customer_by_reference(@test_customer_ref) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/QueryCustomerByReference", 'Content-Type' => 'text/xml' }) @client.query_customer_by_reference(@test_customer_ref) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:query_customer_by_reference_request)) @client.query_customer_by_reference(@test_customer_ref) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_customer_by_reference_response) ) response = @client.query_customer_by_reference(@test_customer_ref) response['ManagedCustomerID'].should == '9876543211000' response['CustomerRef'].should == 'TEST 123' response['CustomerTitle'].should == 'Mr.' response['CustomerFirstName'].should == 'Jo' response['CustomerLastName'].should == 'Smith' response['CustomerCompany'].should == 'company' response['CustomerJobDesc'].should be_nil response['CustomerEmail'].should == '<EMAIL>' response['CustomerAddress'].should == '15 Dundas Court' response['CustomerSuburb'].should == 'phillip' response['CustomerState'].should == 'act' response['CustomerPostCode'].should == '2606' response['CustomerCountry'].should == 'au' response['CustomerPhone1'].should == '02111111111' response['CustomerPhone2'].should == '04111111111' response['CustomerFax'].should == '111122222' response['CustomerURL'].should == 'http://eway.com.au' response['CustomerComments'].should == 'Comments' response['CCName'].should == '<NAME>' response['CCNumber'].should == '444433XXXXXX1111' response['CCExpiryMonth'].should == '08' response['CCExpiryYear'].should == '15' end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.query_customer_by_reference(@test_customer_ref) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.query_customer_by_reference(@test_customer_ref) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#query_payment' do describe 'success scenarios' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_payment_response) ) @client.query_payment(@test_customer_id) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/QueryPayment", 'Content-Type' => 'text/xml' }) @client.query_payment(@test_customer_id) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:query_payment_request)) @client.query_payment(@test_customer_id) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:query_payment_response) ) response = @client.query_payment(@test_customer_id) response.size.should == 2 response[0]['TotalAmount'].should == '1000' response[0]['Result'].should == '1' response[0]['ResponseText'].should == 'Approved' response[0]['TransactionDate'].should == '2012-02-16T00:00:00+11:00' response[0]['ewayTrxnNumber'].should == '1' response[1]['TotalAmount'].should == '1008' response[1]['Result'].should == '1' response[1]['ResponseText'].should == 'Approved' response[1]['TransactionDate'].should == '2012-02-16T00:00:00+11:00' response[1]['ewayTrxnNumber'].should == '2' end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.query_payment(@test_customer_id) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.query_payment(@test_customer_id) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end describe '#update_customer' do before(:all) do @customer = { 'CustomerRef' => 'Test 123', 'Title' => 'Mr.', 'FirstName' => 'Jo', 'LastName' => 'Smith', 'Company' => 'company', 'JobDesc' => 'Analyst', 'Email' => '<EMAIL>', 'Address' => '15 Dundas Court', 'Suburb' => 'phillip', 'State' => 'act', 'PostCode' => '2606', 'Country' => 'au', 'Phone' => '02111111111', 'Mobile' => '04111111111', 'Fax' => '111122222', 'URL' => 'http://eway.com.au', 'Comments' => 'Comments', 'CCNameOnCard' => '<NAME>', 'CCNumber' => '444433XXXXXX1111', 'CCExpiryMonth' => '08', 'CCExpiryYear' => '15' } end describe 'success scenario' do after(:all) { WebMock.reset! } it 'should make a request to the eWAY endpoint' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:update_customer_response) ) @client.update_customer(@test_customer_id, @customer) end it 'should use the correct headers' do stub_request(:post, @endpoint) .with(:headers => { 'SOAPAction' => "#{@namespace}/UpdateCustomer", 'Content-Type' => 'text/xml' }) @client.update_customer(@test_customer_id, @customer) end it 'should pass the correct content within the request' do stub_request(:post, @endpoint) .with(:body => message(:update_customer_request)) @client.update_customer(@test_customer_id, @customer) end it 'should return the correct response' do stub_request(:post, @endpoint) .to_return( :status => 200, :body => message(:update_customer_response) ) response = @client.update_customer(@test_customer_id, @customer) response.should be_true end end describe 'failure scenarios' do it 'should raise an error when a fault is returned' do stub_request(:post, @endpoint) .to_return( :status => [500, 'Internal Server Error'], :body => message(:fault_response) ) expect { @client.update_customer(@test_customer_id, @customer) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Login failed." (soap:Client)') end it 'should raise an error when the server returns a failure response code' do stub_request(:post, @endpoint) .to_return( :status => [400, 'Bad Request'] ) expect { @client.update_customer(@test_customer_id, @customer) }.to raise_error(BigCharger::Error, 'eWAY server responded with "Bad Request" (400)') end end end end
johngrimes/bigcharger
lib/bigcharger/ops.rb
<gh_stars>1-10 require 'nokogiri' require 'curb' class BigCharger # Creates a new managed customer on the eWAY server. # @param customer_fields Title, FirstName, LastName, Address, Suburb, # State, Company, PostCode, Country, Email, Fax, Phone, Mobile, # CustomerRef, JobDesc, Comments, URL, CCNumber, CCNameOnCard, # CCExpiryMonth, CCExpiryYear # @return [String] Managed customer ID of new customer. def create_customer(customer_fields = {}) log_operation(:create_customer, customer_fields) raise Error, 'customer_fields is not a Hash' unless customer_fields.class == Hash envelope = wrap_in_envelope do |xml| xml['man'].CreateCustomer { CUSTOMER_REQUEST_FIELDS.each do |field| xml['man'].send(field, customer_fields[field]) if customer_fields[field] end } end response = post(envelope, 'CreateCustomer') result = response.xpath('//man:CreateCustomerResult', { 'man' => SERVICE_NAMESPACE }).first return result ? result.text : false end # Processes a payment of a given amount for the specified customer. # @param [#to_s] managed_customer_id # @param [Integer] amount The amount of the payment, in cents. (e.g. # 1000 = $10) # @param invoice_ref An optional field that you can use to identify # the corresponding invoice within your system. # @param invoice_desc An optional field to describe the subject of the # payment. # @return [Hash] ewayTrxnError, ewayTrxnStatus, ewayTrxnNumber, # ewayReturnAmount, ewayAuthCode def process_payment(managed_customer_id, amount, invoice_ref = nil, invoice_desc = nil) log_operation(:process_payment, managed_customer_id, amount, invoice_ref, invoice_desc) envelope = wrap_in_envelope do |xml| xml['man'].ProcessPayment { xml['man'].managedCustomerID managed_customer_id xml['man'].amount amount xml['man'].invoiceReference invoice_ref if invoice_ref xml['man'].invoiceDescription invoice_desc if invoice_desc } end response = post(envelope, 'ProcessPayment') result = response.xpath('//man:ProcessPaymentResponse/man:ewayResponse', { 'man' => SERVICE_NAMESPACE }).first return result ? node_to_hash(result) : false end # Identical to {#process_payment} except that it accepts a CVN/CVV for # greater security. def process_payment_with_cvn(managed_customer_id, amount, cvn = nil, invoice_ref = nil, invoice_desc = nil) log_operation(:process_payment_with_cvn, managed_customer_id, amount, cvn, invoice_ref, invoice_desc) envelope = wrap_in_envelope do |xml| xml['man'].ProcessPaymentWithCVN { xml['man'].managedCustomerID managed_customer_id xml['man'].amount amount xml['man'].invoiceReference invoice_ref if invoice_ref xml['man'].invoiceDescription invoice_desc if invoice_desc xml['man'].cvn cvn if cvn } end response = post(envelope, 'ProcessPaymentWithCVN') result = response.xpath('//man:ProcessPaymentWithCVNResponse/man:ewayResponse', { 'man' => SERVICE_NAMESPACE }).first return result ? node_to_hash(result) : false end # Returns the eWAY record for a specific managed customer ID. # @param [#to_s] managed_customer_id # @return [Hash] ManagedCustomerID, CustomerRef, CustomerTitle, # CustomerFirstName, CustomerLastName, CustomerCompany, # CustomerJobDesc, CustomerEmail, CustomerAddress, CustomerSuburb, # CustomerState, CustomerPostCode, CustomerCountry, CustomerPhone1, # CustomerPhone2, CustomerFax, CustomerURL, CustomerComments def query_customer(managed_customer_id) log_operation(:query_customer, managed_customer_id) envelope = wrap_in_envelope do |xml| xml['man'].QueryCustomer { xml['man'].managedCustomerID managed_customer_id } end response = post(envelope, 'QueryCustomer') result = response.xpath('//man:QueryCustomerResult', { 'man' => SERVICE_NAMESPACE }).first return result ? node_to_hash(result) : false end # Returns the eWAY customer record with the specified customer # reference. # @param [#to_s] customer_ref # @return [Hash] ManagedCustomerID, CustomerRef, CustomerTitle, # CustomerFirstName, CustomerLastName, CustomerCompany, # CustomerJobDesc, CustomerEmail, CustomerAddress, CustomerSuburb, # CustomerState, CustomerPostCode, CustomerCountry, CustomerPhone1, # CustomerPhone2, CustomerFax, CustomerURL, CustomerComments def query_customer_by_reference(customer_ref) log_operation(:query_customer_by_reference, customer_ref) envelope = wrap_in_envelope do |xml| xml['man'].QueryCustomerByReference { xml['man'].CustomerReference customer_ref } end response = post(envelope, 'QueryCustomerByReference') result = response.xpath('//man:QueryCustomerByReferenceResult', { 'man' => SERVICE_NAMESPACE }).first return result ? node_to_hash(result) : false end # Returns all the payment records associated with a specified managed # customer ID. # @param [#to_s] customer_ref # @return [Array of Hashes] TotalAmount, Result, ResponseText, # TransactionDate, ewayTrxnNumber def query_payment(managed_customer_id) log_operation(:query_payment, managed_customer_id) envelope = wrap_in_envelope do |xml| xml['man'].QueryPayment { xml['man'].managedCustomerID managed_customer_id } end response = post(envelope, 'QueryPayment') result = response.xpath('//man:QueryPaymentResult', { 'man' => SERVICE_NAMESPACE }).first return result ? node_collection_to_array(result) : false end # Update details of an eWAY customer record. # @param [#to_s] managed_customer_id # @param customer_fields Title, FirstName, LastName, Address, Suburb, # State, Company, PostCode, Country, Email, Fax, Phone, Mobile, # CustomerRef, JobDesc, Comments, URL, CCNumber, CCNameOnCard, # CCExpiryMonth, CCExpiryYear # @return [Boolean] Success or otherwise def update_customer(managed_customer_id, customer_fields = {}) log_operation(:update_customer, managed_customer_id, customer_fields) raise Error, 'customer_fields is not a Hash' unless customer_fields.class == Hash envelope = wrap_in_envelope do |xml| xml['man'].UpdateCustomer { xml['man'].managedCustomerID managed_customer_id CUSTOMER_REQUEST_FIELDS.each do |field| xml['man'].send(field, customer_fields[field]) if customer_fields[field] end } end response = post(envelope, 'UpdateCustomer') result = response.xpath('//man:UpdateCustomerResult', { 'man' => SERVICE_NAMESPACE }).first return result ? result.text == 'true' : false end end
bdewey/Zipper
Zipper.podspec
<reponame>bdewey/Zipper<gh_stars>10-100 Pod::Spec.new do |s| s.name = 'Zipper' s.version = '1.2.0' s.license = 'MIT' s.summary = 'Effortless ZIP Handling in Swift' s.homepage = 'https://github.com/Meniny/Zipper' s.social_media_url = 'https://meniny.cn/' s.authors = { '<NAME>' => '<EMAIL>' } s.source = { :git => 'https://github.com/Meniny/Zipper.git', :tag => s.version } s.swift_version = '5' s.ios.deployment_target = '9.0' s.osx.deployment_target = '10.11' s.tvos.deployment_target = '9.0' s.watchos.deployment_target = '2.0' s.source_files = 'Zipper/Source/*' s.public_header_files = 'Zipper/Source/*.h' end
jeremyevans/roda-message_bus
spec/roda-message_bus_spec.rb
require 'roda' require 'message_bus' require 'json' ENV['MT_NO_PLUGINS'] = '1' # Work around stupid autoloading of plugins require 'minitest/global_expectations/autorun' MessageBus.configure(:backend => :memory) describe 'roda message_bus plugin' do def req(path, input={}, env={}) env = {"PATH_INFO"=>path, "REQUEST_METHOD" => "GET", "SCRIPT_NAME" => "", 'rack.input'=>true, 'rack.request.form_input'=>true, 'rack.request.form_hash'=>input}.merge(env) @app.call(env) end def body(path, input={}, env={}) s = String.new b = req(path, input, env)[2] b.each{|x| s << x} b.close if b.respond_to?(:close) s end def json_body(path, input={}, env={}) JSON.parse(body(path, input, env)) end before do @app = Class.new(Roda) @app.plugin :message_bus @app end it "should handle message bus under a branch" do @app.route do |r| r.on "foo" do r.message_bus 'bar' end end body('/foo').must_equal 'bar' json_body('/foo/message-bus/1/poll', '/foo'=>'0', '__seq'=>1).must_equal [] MessageBus.publish '/foo', 'baz' json_body('/foo/message-bus/1/poll', '/foo'=>'0', '__seq'=>1).must_equal [{"global_id"=>1, "message_id"=>1, "channel"=>"/foo", "data"=>"baz"}] MessageBus.publish '/foo', 'baz1' json_body('/foo/message-bus/1/poll', '/foo'=>'0', '__seq'=>1).must_equal [{"global_id"=>1, "message_id"=>1, "channel"=>"/foo", "data"=>"baz"}, {"global_id"=>2, "message_id"=>2, "channel"=>"/foo", "data"=>"baz1"}] json_body('/foo/message-bus/1/poll', '/foo'=>'1', '__seq'=>1).must_equal [{"global_id"=>2, "message_id"=>2, "channel"=>"/foo", "data"=>"baz1"}] json_body('/foo/message-bus/1/poll', '/foo'=>'1').must_equal [{"global_id"=>2, "message_id"=>2, "channel"=>"/foo", "data"=>"baz1"}] end end
jeremyevans/roda-message_bus
lib/roda/plugins/message_bus.rb
# frozen-string-literal: true require 'message_bus/rack/middleware' class Roda module RodaPlugins # The message_bus plugin allows for integrating the message_bus library into # Roda's routing tree. By default, MessageBus provides a Rack middlware to # work with any rack framework. However, that doesn't work well if you are # integrating access control into your routing tree. # # With the message_bus plugin, you can specify exactly where to pass control # to message_bus, which can be done after access controls have been checked. # Additionally, this allows to control which message_bus channels are allowed # for which requests, further enhancing security. # # It is still possible to use message_bus's user/group/site filtering when # using this support to filter allowed channels. # # # Use default MessageBus # plugin :message_bus # # # Use specific MessageBus implementation # plugin :message_bus, :message_bus=>MessageBus::Instance.new # # route do |r| # r.on "room/:id" do |room_id| # room_id = room_id.to_i # raise unless current_user.has_access?(room_id) # # # Uses "/room/#{room_id}" channel by default # r.message_bus # # # Override channel to use (can also provide array of channels) # r.message_bus("/room/#{room_id}/enters") # # # In addition to subscribing to channels, # # in Javascript on this page, set: # # # # MessageBus.baseUrl = "/room/<%= room_id %>/" # view('room') # end # end module MessageBus APP = proc{[404, {"Content-Type" => "text/html"}, ["Not Found"]]} def self.configure(app, config={}) app.opts[:message_bus_app] = ::MessageBus::Rack::Middleware.new(APP, config) end module ClassMethods def message_bus_app opts[:message_bus_app] end end module RequestMethods def message_bus(channels=nil) if remaining_path =~ /\A\/message-bus\// chans = env['message_bus.channels'] = {} post = self.POST channels ||= script_name + path_info.chomp(remaining_path) Array(channels).each do |channel| if val = post[channel] chans[channel] = val end end env['message_bus.seq'] = post['__seq'] yield if block_given? run roda_class.message_bus_app end end end end register_plugin(:message_bus, MessageBus) end end
dorianmariefr/activejob-limiter
lib/active_job/limiter/railtie.rb
# frozen_string_literal: true require 'global_id/railtie' require 'active_job' module ActiveJob module Limiter class Railtie < Rails::Railtie ActiveSupport.on_load(:active_job) do include ActiveJob::Limiter::Mixin end end end end
dorianmariefr/activejob-limiter
lib/active_job/limiter/queue_adapters/test_adapter.rb
# frozen_string_literal: true module ActiveJob module Limiter module QueueAdapters module TestAdapter def self.check_lock_before_enqueue(_job, _expiration) true end def self.clear_lock_before_perform(_job) true end def self.acquire_lock_for_job_resource(_name, _expiration, _job, _resource_id) true end def self.release_lock_for_job_resource(_name, _job, _resource_id) true end end end end end
dorianmariefr/activejob-limiter
lib/active_job/limiter/mixin.rb
# frozen_string_literal: true require 'active_support/concern' module ActiveJob module Limiter # ActiveJob Limiter # # This extends ActiveJob::Base module Mixin extend ActiveSupport::Concern module ClassMethods def limit_queue(expiration:) # around_enqueue is preferred over before_enqueue so that we can # optionally enqueue the job. With before_enqueue, we would have # to raise an exception and handle it elsewhere to be able to stop # enqueuing. # https://groups.google.com/forum/#!topic/rubyonrails-core/mhD4T90g0G4 around_enqueue do |job, block| if ActiveJob::Limiter.check_lock_before_enqueue(job, expiration) block.call else job.job_id = nil end end before_perform do |job| ActiveJob::Limiter.clear_lock_before_perform(job) end end # The general philosophy behind the implementation of throttle_job is that it is safe to # drop duplicate jobs if and only if we know that an equivalent job will execute in the near # future. There are two cases where this is true. 1) from the time a job is enqueued up # until immediately before it is performed, we can safely drop subsequent enqueues knowing # that an equivalent job is in the queue about to execute. 2) on the second perform of a job # we delay performing until 1.25*duration time later. By doing this, we can continue to drop # jobs until the end of the currently held perform lock, which we know will expire sooner # than 1.25*duration. This allows us to throttle jobs without inducing artificial latency # on the initial invocation, with the tradeoff being that, in order to ensure we don't # unsafely drop jobs, we might still execute them once more than necessary. def throttle_job(duration:, extract_resource_id:, metrics_hook: ->(_result, _job) {}) active_job_limiter_add_throttle_job_around_enqueue( duration: duration, extract_resource_id: extract_resource_id, metrics_hook: metrics_hook ) active_job_limiter_add_throttle_job_around_perform( duration: duration, extract_resource_id: extract_resource_id, metrics_hook: metrics_hook ) end private # Prefixing private methods with active_job_limiter to avoid conflicts with user code def active_job_limiter_add_throttle_job_around_enqueue(duration:, extract_resource_id:, metrics_hook:) around_enqueue do |job, block| resource_id = extract_resource_id.call(job) # For enqueue-related locks, additionally namespace by queue_name. We only need to do # this for enqueue, and not perform. enqueue_resource_id = "#{resource_id}:#{job.queue_name}" if job.instance_variable_get(:@bypass_active_job_limiter_enqueue_locks) block.call elsif ActiveJob::Limiter.acquire_lock_for_job_resource('enqueue', duration, job, enqueue_resource_id) block.call metrics_hook.call('enqueue.enqueued', job) else # If we get here, that means that an equivalent job has been enqueued, but has not yet # been performed (because it always releases the enqueue lock before performing). That # means that it is safe to drop jobs here because we know an equivalent job will start # executing at some point in the near future. job.job_id = nil metrics_hook.call('enqueue.dropped', job) end end end def active_job_limiter_add_throttle_job_around_perform(duration:, extract_resource_id:, metrics_hook:) around_perform do |job, block| resource_id = extract_resource_id.call(job) # Before we start executing, allow new jobs to be enqueued # see around_enqueue above -- for enqueue related locks we must namespace by queue_name enqueue_resource_id = "#{resource_id}:#{job.queue_name}" ActiveJob::Limiter.release_lock_for_job_resource('enqueue', job, enqueue_resource_id) if ActiveJob::Limiter.acquire_lock_for_job_resource('perform', duration, job, resource_id) block.call metrics_hook.call('perform.performed', job) elsif ActiveJob::Limiter.acquire_lock_for_job_resource('reschedule', duration, job, resource_id) # If we get here, then that means an equivalent job either is still performing or # recently performed. In order to respect the throttle without losing data, we create # our own destiny by rescheduling a job in the near future. By doing do, it becomes # safe to start dropping jobs until the current perform lock expires. The retry is # scheduled for a point in time after the perform lock expires, so it will not be # dropped (unless it is contending with even more future duplicates... which is fine. # Either way, one will win and execute). self.class.send(:active_job_limiter_reschedule_job_for_later, job, duration) metrics_hook.call('perform.rescheduled', job) else # See above -- if we get here, we know a job has been scheduled in the future, so it # is safe to drop jobs until the current perform lock has expired. job.job_id = nil metrics_hook.call('perform.dropped', job) end end end def active_job_limiter_reschedule_job_for_later(existing_job, lock_duration) new_job = existing_job.class.new(*existing_job.arguments) # Rescheduled jobs need to pass through around_enqueue without being dropped, so we need # to sneakily signal that this job should be let through regardless of the current lock. # One might think that it if a job is already in the queue, then it should be fine to drop # the reschedule, but that is not the case. At this point, both the perform lock and the # retry lock have been acquired, so if there is a job already enqueued, it will probably # be dropped as soon as it is performed. For that reason, in order to stick to the policy # of only dropping jobs if we have guaranteed that an equivalent job will execute in the # near future, special care must be taken to ensure that our reschedule here passes safely # through the around_enqueue hook. new_job.instance_variable_set(:@bypass_active_job_limiter_enqueue_locks, true) # Using a 1.25x multiplier to account for clock skew between server and redis. 1.25 was # chosen so that the absolute skew would be at least a few seconds even with relatively # small values of lock_duration (e.g. this gives a 2.5 second allowance with a 10 second # lock_duration), while still trying to minimize latency in case the retry actually will # catch information missed by the first execution of the job. new_job.enqueue(wait: lock_duration * 1.25, queue: existing_job.queue_name) end end end end end
dorianmariefr/activejob-limiter
spec/active_job/limiter_throttle_spec.rb
<reponame>dorianmariefr/activejob-limiter # frozen_string_literal: true RSpec.describe ActiveJob::Limiter do let(:throttle_duration) { 2.minutes } let(:resource_id) { '123' } let(:queue_name) { :some_queue_name } class MetricsProxy def self.call(result, job); end end class ThrottledJob < ActiveJob::Base include ActiveJob::Limiter::Mixin # Needed without Rails autoloading # Same as :queue_name above, unable to access let() queue_as :some_queue_name # Same as :throttle_duration above, unable to access let() throttle_job( duration: 2.minutes, extract_resource_id: (lambda { |job| job.arguments.first }), metrics_hook: MetricsProxy ) def perform(resource_id); end end class StandardJob < ActiveJob::Base include ActiveJob::Limiter::Mixin # Needed without Rails autoloading def perform; end end # Preconditions def enqueue_lock_not_yet_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('enqueue', throttle_duration, instance_of(ThrottledJob), "#{resource_id}:#{queue_name}").and_return(true) end def enqueue_lock_already_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('enqueue', throttle_duration, instance_of(ThrottledJob), "#{resource_id}:#{queue_name}").and_return(false) end def perform_lock_already_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('perform', throttle_duration, instance_of(ThrottledJob), resource_id).and_return(false) end def perform_lock_not_yet_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('perform', throttle_duration, instance_of(ThrottledJob), resource_id).and_return(true) end def perform_lock_already_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('perform', throttle_duration, instance_of(ThrottledJob), resource_id).and_return(false) end def reschedule_lock_not_yet_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('reschedule', throttle_duration, instance_of(ThrottledJob), resource_id).and_return(true) end def reschedule_lock_already_acquired expect(ActiveJob::Limiter).to receive(:acquire_lock_for_job_resource) .with('reschedule', throttle_duration, instance_of(ThrottledJob), resource_id).and_return(false) end # Expectations def job_should_be_performed expect_any_instance_of(ThrottledJob).to receive(:perform).with(resource_id) end def job_should_not_be_performed expect_any_instance_of(ThrottledJob).to_not receive(:perform).with(resource_id) end def new_job_should_be_enqueued(&blk) expect(blk).to change { enqueued_jobs.size }.by(1) end def new_job_should_be_not_enqueued(&blk) expect(blk).to change { enqueued_jobs.size }.by(0) end def enqueue_lock_should_be_released expect(ActiveJob::Limiter).to receive(:release_lock_for_job_resource) .with('enqueue', instance_of(ThrottledJob), "#{resource_id}:#{queue_name}") end def expect_metric(result) expect(MetricsProxy).to receive(:call).with( result, instance_of(ThrottledJob) ) end context 'the job has not yet run during the throttle period' do before :each do enqueue_lock_not_yet_acquired perform_lock_not_yet_acquired end it 'performs the job' do enqueue_lock_should_be_released job_should_be_performed expect_metric('enqueue.enqueued') expect_metric('perform.performed') ThrottledJob.perform_later(resource_id) end end context 'the job has been enqueued but not yet run' do before :each do enqueue_lock_already_acquired end it 'drops the job' do job_should_not_be_performed expect_metric('enqueue.dropped') ThrottledJob.perform_later(resource_id) end end context 'the job has run one time already' do before :each do enqueue_lock_not_yet_acquired perform_lock_already_acquired end context 'a retry has not been scheduled' do before :each do reschedule_lock_not_yet_acquired end it 'enqueues a job for the future' do job_should_not_be_performed expect_metric('enqueue.enqueued') expect_metric('perform.rescheduled') new_job_should_be_enqueued do ThrottledJob.perform_later(resource_id) end end context 'when queue is explicitly set' do let(:queue_name) { :a_different_queue_name } it 'enqueues a job for the future with the specified queue' do job_should_not_be_performed expect_metric('enqueue.enqueued') expect_metric('perform.rescheduled') new_job_should_be_enqueued do ThrottledJob.set(queue: queue_name).perform_later(resource_id) end expect(enqueued_jobs.last['queue_name']).to eq(queue_name.to_s) end end end context 'a retry has been scheduled' do before :each do reschedule_lock_already_acquired end it 'drops the job' do job_should_not_be_performed expect_metric('enqueue.enqueued') expect_metric('perform.dropped') new_job_should_be_not_enqueued do ThrottledJob.perform_later(resource_id) end end end end end
dorianmariefr/activejob-limiter
lib/active_job/limiter.rb
# frozen_string_literal: true require 'active_job/limiter/version' require 'active_support/dependencies/autoload' module ActiveJob module Limiter extend ActiveSupport::Autoload class UnsupportedActiveJobLimiterQueueAdapter; end autoload :Mixin autoload :QueueAdapters class << self def check_lock_before_enqueue(job, expiration) queue_adapter(job).check_lock_before_enqueue(job, expiration) end def clear_lock_before_perform(job) queue_adapter(job).clear_lock_before_perform(job) end def acquire_lock_for_job_resource(name, expiration, job, resource_id) queue_adapter(job).acquire_lock_for_job_resource(name, expiration, job, resource_id) end def release_lock_for_job_resource(name, job, resource_id) queue_adapter(job).release_lock_for_job_resource(name, job, resource_id) end def queue_adapter(job) queue_adapter_by_class(job) end def queue_adapter_by_class(job) case job.class.queue_adapter.class.name when 'ActiveJob::QueueAdapters::TestAdapter' ActiveJob::Limiter::QueueAdapters::TestAdapter when 'ActiveJob::QueueAdapters::SidekiqAdapter' ActiveJob::Limiter::QueueAdapters::SidekiqAdapter else raise UnsupportedActiveJobLimiterQueueAdapter end end end end end require 'active_job/limiter/railtie' if defined?(Rails)
dorianmariefr/activejob-limiter
activejob-limiter.gemspec
# frozen_string_literal: true lib = File.expand_path('lib', __dir__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'active_job/limiter/version' Gem::Specification.new do |spec| spec.name = 'activejob-limiter' spec.version = ActiveJob::Limiter::VERSION spec.authors = ['<NAME>'] spec.email = ['<EMAIL>'] spec.summary = 'ActiveJob Limiter allows you to limit job enqueuing.' spec.description = <<-DESC ActiveJob Limiter allows you to limit enqueing of ActiveJobs. Currently this is accomplished through hashing the arguments to the job and setting a lock while the job is in the queue. The only currently supported queue adapter is Sidekiq. DESC spec.homepage = 'https://github.com/flexport/activejob-limiter' spec.license = 'MIT' # Specify which files should be added to the gem when it is released. spec.files = Dir['{lib}/**/*', 'README.md'] spec.test_files = Dir['spec/**/*'] spec.require_paths = ['lib'] spec.add_dependency 'activejob', '>= 5.1.6.1' spec.add_dependency 'activesupport', '>= 5.1.6.1' spec.add_development_dependency 'byebug' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'rspec', '~> 3.6' spec.add_development_dependency 'rubocop' end
dorianmariefr/activejob-limiter
lib/active_job/limiter/version.rb
# frozen_string_literal: true module ActiveJob module Limiter VERSION = '0.1.1' end end
dorianmariefr/activejob-limiter
spec/active_job/limiter_spec.rb
# frozen_string_literal: true RSpec.describe ActiveJob::Limiter do let(:expiration_time) { 2.minutes } class LimitedJob < ActiveJob::Base include ActiveJob::Limiter::Mixin # Needed without Rails autoloading # Same as :expiration_time above, unable to access let() limit_queue expiration: 2.minutes def perform; end end class StandardJob < ActiveJob::Base include ActiveJob::Limiter::Mixin # Needed without Rails autoloading def perform; end end it 'has a version number' do expect(::ActiveJob::Limiter::VERSION).not_to be_nil end context 'successfully performs a LimitedJob and' do before { expect_any_instance_of(LimitedJob).to receive(:perform) } after { expect(performed_jobs.size).to eq(1) } it 'checks a lock before enqueuing' do expect(ActiveJob::Limiter).to receive(:clear_lock_before_perform).and_return(true) expect(ActiveJob::Limiter).to receive(:check_lock_before_enqueue) .with(instance_of(LimitedJob), expiration_time).and_return(true) LimitedJob.perform_later end it 'clears the lock before performing' do expect(ActiveJob::Limiter).to receive(:check_lock_before_enqueue).and_return(true) expect(ActiveJob::Limiter).to receive(:clear_lock_before_perform) .with(instance_of(LimitedJob)) LimitedJob.perform_later end end context 'does not perform a LimitedJob and' do before { expect_any_instance_of(LimitedJob).to_not receive(:perform) } after { expect(performed_jobs.size).to eq(0) } it 'does not enqueue the job if the lock check returns false' do expect(ActiveJob::Limiter).to receive(:check_lock_before_enqueue) .with(instance_of(LimitedJob), expiration_time).and_return(false) expect(ActiveJob::Limiter).to_not receive(:clear_lock_before_perform) job = LimitedJob.perform_later expect(job == false || job.job_id.nil?).to be true end end context 'raises an error for a LimitedJob' do before { expect_any_instance_of(LimitedJob).to_not receive(:perform) } it 'when the before_perform hook raises an error' do expect(ActiveJob::Limiter).to receive(:check_lock_before_enqueue).and_return(true) expect(ActiveJob::Limiter).to receive(:clear_lock_before_perform).and_raise(StandardError) expect { LimitedJob.perform_later }.to raise_error(StandardError) end it 'when the before_enqueue hook raises an error' do expect(ActiveJob::Limiter).to receive(:check_lock_before_enqueue).and_raise(StandardError) expect(ActiveJob::Limiter).to_not receive(:clear_lock_before_perform) expect { LimitedJob.perform_later }.to raise_error(StandardError) end end context 'performs a StandardJob without the limit_queue directive and' do before { expect_any_instance_of(StandardJob).to receive(:perform) } after { expect(performed_jobs.size).to eq(1) } it 'does not check or clear a lock for jobs that do not have the limit_queue directive' do expect(ActiveJob::Limiter).to_not receive(:check_lock_before_enqueue) expect(ActiveJob::Limiter).to_not receive(:clear_lock_before_perform) StandardJob.perform_later end end end
dorianmariefr/activejob-limiter
lib/active_job/limiter/queue_adapters.rb
# frozen_string_literal: true require 'active_support/dependencies/autoload' module ActiveJob module Limiter module QueueAdapters extend ActiveSupport::Autoload autoload :SidekiqAdapter autoload :TestAdapter end end end