_id stringlengths 2 6 | title stringlengths 9 130 | partition stringclasses 3
values | text stringlengths 30 4.3k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q16300 | Xcake.Target.copy_files_build_phase | train | def copy_files_build_phase(name, &block)
phase = CopyFilesBuildPhase.new(&block)
phase.name = name | ruby | {
"resource": ""
} |
q16301 | Xcake.Target.pre_shell_script_build_phase | train | def pre_shell_script_build_phase(name, script, &block)
phase = ShellScriptBuildPhase.new(&block)
| ruby | {
"resource": ""
} |
q16302 | Xcake.Target.shell_script_build_phase | train | def shell_script_build_phase(name, script, &block)
phase = ShellScriptBuildPhase.new(&block)
| ruby | {
"resource": ""
} |
q16303 | Xcake.Target.build_rule | train | def build_rule(name, file_type, output_files, output_files_compiler_flags, script, &block)
rule = BuildRule.new(&block)
rule.name = name
rule.file_type = file_type
rule.output_files = output_files | ruby | {
"resource": ""
} |
q16304 | Xcake.Configurable.configuration | train | def configuration(name, type)
default_settings = default_settings_for_type(type)
configurations = configurations_of_type(type)
build_configuration = if name.nil?
configurations.first
else
configurations.detect do ... | ruby | {
"resource": ""
} |
q16305 | Xcake.Project.application_for | train | def application_for(platform, deployment_target, language = :objc)
target do |t|
t.type = :application
t.platform = platform
| ruby | {
"resource": ""
} |
q16306 | Xcake.Project.extension_for | train | def extension_for(host_target)
target = target do |t|
t.type = :app_extension
t.platform = host_target.platform
t.deployment_target = host_target.deployment_target
t.language = host_target.language
| ruby | {
"resource": ""
} |
q16307 | Xcake.Project.watch_app_for | train | def watch_app_for(host_target, deployment_target, language = :objc)
watch_app_target = target do |t|
t.name = "#{host_target.name}-Watch"
t.type = :watch2_app
t.platform = :watchos
t.deployment_target = deployment_target
t.language = language
end
watch_extensi... | ruby | {
"resource": ""
} |
q16308 | Xcake.Target.default_system_frameworks_for | train | def default_system_frameworks_for(platform)
case platform
when :ios
%w(Foundation UIKit)
when :osx
%w(Cocoa)
when :tvos
%w(Foundation UIKit)
when :watchos
| ruby | {
"resource": ""
} |
q16309 | StatefulEnum.StateInspector.possible_states | train | def possible_states
col = @stateful_enum.instance_variable_get :@column
possible_events.flat_map | ruby | {
"resource": ""
} |
q16310 | TZInfo.Timezone.to_local | train | def to_local(time)
raise ArgumentError, 'time must be specified' unless time
| ruby | {
"resource": ""
} |
q16311 | TZInfo.Timezone.utc_to_local | train | def utc_to_local(utc_time)
raise ArgumentError, 'utc_time must be specified' unless utc_time
| ruby | {
"resource": ""
} |
q16312 | TZInfo.Timezone.local_to_utc | train | def local_to_utc(local_time, dst = Timezone.default_dst)
raise ArgumentError, 'local_time must be specified' unless local_time
Timestamp.for(local_time, :ignore) do |ts|
period = if block_given?
period_for_local(ts, dst) {|periods| yield periods }
| ruby | {
"resource": ""
} |
q16313 | TZInfo.DataSource.try_with_encoding | train | def try_with_encoding(string, encoding)
result = yield string
return result if result
unless encoding == string.encoding
| ruby | {
"resource": ""
} |
q16314 | InvisibleCaptcha.ViewHelpers.invisible_captcha | train | def invisible_captcha(honeypot = nil, scope = nil, options = {})
if InvisibleCaptcha.timestamp_enabled
session[:invisible_captcha_timestamp] | ruby | {
"resource": ""
} |
q16315 | Slop.Result.fetch | train | def fetch(flag)
o = option(flag)
if o.nil?
cleaned_key = clean_key(flag)
raise | ruby | {
"resource": ""
} |
q16316 | Slop.Result.[]= | train | def []=(flag, value)
if o = option(flag)
o.value = value
else
raise ArgumentError, | ruby | {
"resource": ""
} |
q16317 | Slop.Result.option | train | def option(flag)
options.find do |o|
o.flags.any? { | ruby | {
"resource": ""
} |
q16318 | Slop.Result.to_hash | train | def to_hash
Hash[options.reject(&:null?).map { |o| | ruby | {
"resource": ""
} |
q16319 | Slop.Parser.try_process | train | def try_process(flag, arg)
if option = matching_option(flag)
process(option, arg)
elsif flag.start_with?("--no-") && option = matching_option(flag.sub("no-", ""))
process(option, false)
elsif flag =~ /\A-[^-]{2,}/
try_process_smashed_arg(flag) || try_process_grouped_flags(flag,... | ruby | {
"resource": ""
} |
q16320 | Slop.Option.key | train | def key
key = config[:key] || flags.last.sub(/\A--?/, '')
key = | ruby | {
"resource": ""
} |
q16321 | Slop.Options.separator | train | def separator(string = "")
if separators[options.size]
separators[-1] += "\n#{string}"
else
| ruby | {
"resource": ""
} |
q16322 | Slop.Options.method_missing | train | def method_missing(name, *args, **config, &block)
if respond_to_missing?(name)
config[:type] = name
| ruby | {
"resource": ""
} |
q16323 | Guard.RSpecFormatter.write_summary | train | def write_summary(duration, total, failures, pending)
_write do |f|
f.puts _message(total, failures, pending, duration)
| ruby | {
"resource": ""
} |
q16324 | PryRemote.Server.run | train | def run
if PryNav.current_remote_server
raise 'Already running a pry-remote session!'
else
PryNav.current_remote_server = self
end
setup
Pry.start @object, {
:input | ruby | {
"resource": ""
} |
q16325 | StateMachine.Transition.pausable | train | def pausable
begin
halted = !catch(:halt) { yield; true }
rescue Exception => error
raise unless @resume_block
end
if @resume_block
| ruby | {
"resource": ""
} |
q16326 | StateMachine.Event.transition | train | def transition(options)
raise ArgumentError, 'Must specify as least one transition requirement' if options.empty?
# Only a certain subset of explicit options are allowed for transition
# requirements
assert_valid_keys(options, :from, :to, :except_from, :except_to, :if, :unless) if (option... | ruby | {
"resource": ""
} |
q16327 | StateMachine.StateContext.transition | train | def transition(options)
assert_valid_keys(options, :from, :to, :on, :if, :unless)
raise ArgumentError, 'Must specify :on event' unless options[:on]
raise ArgumentError, 'Must specify either :to or :from state' unless !options[:to] ^ | ruby | {
"resource": ""
} |
q16328 | StateMachine.NodeCollection.initialize_copy | train | def initialize_copy(orig) #:nodoc:
super
nodes = @nodes
contexts = @contexts
@nodes = []
@contexts = []
@indices = @indices.inject({}) {|indices, (name, *)| indices[name] = {}; indices}
| ruby | {
"resource": ""
} |
q16329 | StateMachine.NodeCollection.context | train | def context(nodes, &block)
nodes = nodes.first.is_a?(Matcher) ? nodes.first : WhitelistMatcher.new(nodes)
@contexts << context = {:nodes => nodes, :block => block}
| ruby | {
"resource": ""
} |
q16330 | StateMachine.Machine.owner_class= | train | def owner_class=(klass)
@owner_class = klass
# Create modules for extending the class with state/event-specific methods
@helper_modules = helper_modules = {:instance => HelperModule.new(self, :instance), :class => HelperModule.new(self, :class)}
owner_class.class_eval do
extend he... | ruby | {
"resource": ""
} |
q16331 | StateMachine.Callback.run_methods | train | def run_methods(object, context = {}, index = 0, *args, &block)
if type == :around
if current_method = @methods[index]
yielded = false
evaluate_method(object, current_method, *args) do
yielded = true
run_methods(object, context, index + 1, *args, &bl... | ruby | {
"resource": ""
} |
q16332 | Capybara::Poltergeist.WebSocketServer.accept | train | def accept
@socket = server.accept
@messages = {}
@driver = ::WebSocket::Driver.server(self)
@driver.on(:connect) { |_event| @driver.start }
@driver.on(:message) do |event|
| ruby | {
"resource": ""
} |
q16333 | Capybara::Poltergeist.WebSocketServer.send | train | def send(cmd_id, message, accept_timeout = nil)
accept unless connected?
driver.text(message)
receive(cmd_id, accept_timeout)
| ruby | {
"resource": ""
} |
q16334 | ActiveType.Util.using_single_table_inheritance? | train | def using_single_table_inheritance?(klass, record)
inheritance_column = klass.inheritance_column
| ruby | {
"resource": ""
} |
q16335 | Cheffish.NodeProperties.tag | train | def tag(*tags)
attribute "tags" do |existing_tags|
existing_tags ||= []
tags.each do |tag|
if !existing_tags.include?(tag.to_s)
| ruby | {
"resource": ""
} |
q16336 | InlineSvg::TransformPipeline::Transformations.Transformation.with_svg | train | def with_svg(doc)
doc = Nokogiri::XML::Document.parse(
doc.to_html(encoding: "UTF-8"), nil, "UTF-8"
)
svg = | ruby | {
"resource": ""
} |
q16337 | InlineSvg.CachedAssetFile.named | train | def named(asset_name)
assets[key_for_asset(asset_name)] or
raise | ruby | {
"resource": ""
} |
q16338 | PDF.Reader.doc_strings_to_utf8 | train | def doc_strings_to_utf8(obj)
case obj
when ::Hash then
{}.tap { |new_hash|
obj.each do |key, value|
new_hash[key] = doc_strings_to_utf8(value)
end
}
when Array then
obj.map { |item| doc_strings_to_utf8(item) }
| ruby | {
"resource": ""
} |
q16339 | ExtractImages.Tiff.save_group_four | train | def save_group_four(filename)
k = stream.hash[:DecodeParms][:K]
h = stream.hash[:Height]
w = stream.hash[:Width]
bpc = stream.hash[:BitsPerComponent]
mask = stream.hash[:ImageMask]
len = stream.hash[:Length]
cols = stream.hash[:DecodeParms][:Columns]
puts "#{fi... | ruby | {
"resource": ""
} |
q16340 | ActiveModel.Observer.disabled_for? | train | def disabled_for?(object) #:nodoc:
klass = object.class
return false unless | ruby | {
"resource": ""
} |
q16341 | RubyUnits.Unit.copy | train | def copy(from)
@scalar = from.scalar
@numerator = from.numerator
@denominator = from.denominator
@base = from.base?
@signature = from.signature
@base_scalar = from.base_scalar
@unit_name = begin
| ruby | {
"resource": ""
} |
q16342 | RubyUnits.Unit.base? | train | def base?
return @base if defined? @base
@base = (@numerator + @denominator)
.compact
| ruby | {
"resource": ""
} |
q16343 | RubyUnits.Unit.to_base | train | def to_base
return self if base?
if @@unit_map[units] =~ /\A<(?:temp|deg)[CRF]>\Z/
@signature = @@kinds.key(:temperature)
base = if temperature?
convert_to('tempK')
elsif degree?
convert_to('degK')
end
return base
... | ruby | {
"resource": ""
} |
q16344 | RubyUnits.Unit.to_s | train | def to_s(target_units = nil)
out = @output[target_units]
return out if out
separator = RubyUnits.configuration.separator
case target_units
when :ft
inches = convert_to('in').scalar.to_int
out = "#{(inches / 12).truncate}\'#{(inches % 12).round}\""
when :lbs
... | ruby | {
"resource": ""
} |
q16345 | RubyUnits.Unit.=~ | train | def =~(other)
case other
when Unit
signature == other.signature
else
begin
x, y = coerce(other)
return x =~ y
| ruby | {
"resource": ""
} |
q16346 | RubyUnits.Unit.+ | train | def +(other)
case other
when Unit
if zero?
other.dup
elsif self =~ other
raise ArgumentError, 'Cannot add two temperatures' if [self, other].all?(&:temperature?)
if [self, other].any?(&:temperature?)
if temperature?
RubyUnits::Unit.new(... | ruby | {
"resource": ""
} |
q16347 | RubyUnits.Unit.* | train | def *(other)
case other
when Unit
raise ArgumentError, 'Cannot multiply by temperatures' if [other, self].any?(&:temperature?)
opts = RubyUnits::Unit.eliminate_terms(@scalar * other.scalar, @numerator + other.numerator, @denominator + other.denominator)
opts[:signature] = @signature ... | ruby | {
"resource": ""
} |
q16348 | RubyUnits.Unit./ | train | def /(other)
case other
when Unit
raise ZeroDivisionError if other.zero?
raise ArgumentError, 'Cannot divide with temperatures' if [other, self].any?(&:temperature?)
sc = Rational(@scalar, other.scalar)
sc = sc.numerator if sc.denominator == 1
opts = RubyUnits::Unit.e... | ruby | {
"resource": ""
} |
q16349 | RubyUnits.Unit.divmod | train | def divmod(other)
raise ArgumentError, "Incompatible Units ('#{self}' not compatible with '#{other}')" unless self =~ other
| ruby | {
"resource": ""
} |
q16350 | RubyUnits.Unit.** | train | def **(other)
raise ArgumentError, 'Cannot raise a temperature to a power' if temperature?
if other.is_a?(Numeric)
return inverse if other == -1
return self if other == 1
return 1 if other.zero?
end
case other
when Rational
return power(other.numerator).root... | ruby | {
"resource": ""
} |
q16351 | RubyUnits.Unit.power | train | def power(n)
raise ArgumentError, 'Cannot raise a temperature to a power' if temperature?
raise ArgumentError, 'Exponent must an Integer' unless n.is_a?(Integer)
return inverse if n == -1
return 1 if n.zero?
return self if n == 1
| ruby | {
"resource": ""
} |
q16352 | RubyUnits.Unit.units | train | def units(with_prefix: true)
return '' if @numerator == UNITY_ARRAY && @denominator == UNITY_ARRAY
output_numerator = ['1']
output_denominator = []
num = @numerator.clone.compact
den = @denominator.clone.compact
unless num == UNITY_ARRAY
defin... | ruby | {
"resource": ""
} |
q16353 | RubyUnits.Unit.coerce | train | def coerce(other)
return [other.to_unit, self] if other.respond_to? :to_unit
| ruby | {
"resource": ""
} |
q16354 | RubyUnits.Unit.best_prefix | train | def best_prefix
return to_base if scalar.zero?
best_prefix = if kind == :information
@@prefix_values.key(2**((Math.log(base_scalar, 2) / 10.0).floor * 10))
else
| ruby | {
"resource": ""
} |
q16355 | RubyUnits.Unit.unit_signature_vector | train | def unit_signature_vector
return to_base.unit_signature_vector unless base?
vector = Array.new(SIGNATURE_VECTOR.size, 0)
# it's possible to have a kind that misses the array... kinds like :counting
# are more like prefixes, so don't use them to calculate the vector
@numerator.map { |elemen... | ruby | {
"resource": ""
} |
q16356 | RubyUnits.Unit.unit_signature | train | def unit_signature
return @signature unless @signature.nil?
vector = unit_signature_vector
vector.each_with_index | ruby | {
"resource": ""
} |
q16357 | ActsAsFavoritor.FavoritorLib.parent_class_name | train | def parent_class_name(obj)
unless DEFAULT_PARENTS.include? obj.class.superclass
return | ruby | {
"resource": ""
} |
q16358 | Moneta.OptionSupport.with | train | def with(options = nil, &block)
adapter = self
if block
builder = Builder.new(&block)
builder.adapter(adapter)
adapter | ruby | {
"resource": ""
} |
q16359 | Moneta.Defaults.fetch | train | def fetch(key, default = nil, options = nil)
if block_given?
raise ArgumentError, 'Only one argument accepted if block is given' if options
result = load(key, default || {})
result == nil ? yield(key) : result
| ruby | {
"resource": ""
} |
q16360 | Moneta.Defaults.slice | train | def slice(*keys, **options)
keys.zip(values_at(*keys, | ruby | {
"resource": ""
} |
q16361 | Moneta.ExpiresSupport.expires_at | train | def expires_at(options, default = @default_expires)
value = expires_value(options, default)
| ruby | {
"resource": ""
} |
q16362 | Moneta.ExpiresSupport.expires_value | train | def expires_value(options, default = @default_expires)
case value = options[:expires]
when 0, false
false
when nil
default ? default.to_r : nil
when Numeric
value = value.to_r
raise ArgumentError, ":expires must be a positive value, got #{value}" | ruby | {
"resource": ""
} |
q16363 | Moneta.Builder.use | train | def use(proxy, options = {}, &block)
proxy = Moneta.const_get(proxy) if Symbol === proxy
raise ArgumentError, 'You must give a Class | ruby | {
"resource": ""
} |
q16364 | Moneta.Builder.adapter | train | def adapter(adapter, options = {}, &block)
case adapter
when Symbol
use(Adapters.const_get(adapter), options, &block)
when Class
use(adapter, options, &block)
else
raise ArgumentError, 'Adapter | ruby | {
"resource": ""
} |
q16365 | Moneta.Server.run | train | def run
raise 'Already running' if @running
@stop = false
@running = true
begin
until @stop
mainloop
end
ensure
| ruby | {
"resource": ""
} |
q16366 | Erubi.CaptureEndEngine.handle | train | def handle(indicator, code, tailch, rspace, lspace)
case indicator
when '|=', '|=='
rspace = nil if tailch && !tailch.empty?
add_text(lspace) if lspace
escape_capture = !((indicator == '|=') ^ @escape_capture)
src << "begin; (#{@bufstack} ||= []) << #{@bufvar}; #{@bufvar} = #... | ruby | {
"resource": ""
} |
q16367 | Win32.Certstore.open | train | def open(store_name)
certstore_handler = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, nil, CERT_SYSTEM_STORE_LOCAL_MACHINE, wstring(store_name))
unless certstore_handler
last_error = FFI::LastError.error
| ruby | {
"resource": ""
} |
q16368 | Temple.Utils.empty_exp? | train | def empty_exp?(exp)
case exp[0]
when :multi
exp[1..-1].all? {|e| empty_exp?(e) }
| ruby | {
"resource": ""
} |
q16369 | Mixlib.Log.loggers_to_close | train | def loggers_to_close
loggers_to_close = []
all_loggers.each do |logger|
# unfortunately Logger does not provide access to the logdev
# via public API. In order to reduce amount of impact and
# handle only File type log devices I had to use this method
# to get | ruby | {
"resource": ""
} |
q16370 | Support.Formats.normalize_json | train | def normalize_json(json)
json = json.to_json | ruby | {
"resource": ""
} |
q16371 | Travis.Features.active? | train | def active?(feature, repository)
feature_active?(feature) or
(rollout.active?(feature, repository.owner) or
| ruby | {
"resource": ""
} |
q16372 | Travis.Features.owner_active? | train | def owner_active?(feature, owner)
redis.sismember(ow | ruby | {
"resource": ""
} |
q16373 | Travis.AdvisoryLocks.exclusive | train | def exclusive(timeout = 30)
give_up_at = Time.now + timeout if timeout
while timeout.nil? || Time.now < give_up_at do
if obtained_lock?
return yield
else
# Randomizing sleep time may | ruby | {
"resource": ""
} |
q16374 | Unparser.CLI.exit_status | train | def exit_status
effective_sources.each do |source|
next if @ignore.include?(source)
process_source(source)
| ruby | {
"resource": ""
} |
q16375 | Unparser.CLI.effective_sources | train | def effective_sources
if @start_with
reject = true
@sources.reject do |source|
| ruby | {
"resource": ""
} |
q16376 | Unparser.CLI.sources | train | def sources(file_name)
files =
if File.directory?(file_name)
Dir.glob(File.join(file_name, '**/*.rb')).sort
elsif File.file?(file_name)
[file_name]
else
| ruby | {
"resource": ""
} |
q16377 | Unparser.DSL.define_child | train | def define_child(name, index)
define_method(name) do
| ruby | {
"resource": ""
} |
q16378 | Unparser.DSL.define_group | train | def define_group(name, range)
define_method(name) do
children[range]
end
| ruby | {
"resource": ""
} |
q16379 | Unparser.DSL.children | train | def children(*names)
define_remaining_children(names)
names.each_with_index do |name, index|
| ruby | {
"resource": ""
} |
q16380 | Unparser.Preprocessor.visited_children | train | def visited_children
children.map do |node|
if node.is_a?(Parser::AST::Node)
| ruby | {
"resource": ""
} |
q16381 | Unparser.Emitter.write_to_buffer | train | def write_to_buffer
emit_comments_before if buffer.fresh_line?
dispatch
comments.consume(node)
| ruby | {
"resource": ""
} |
q16382 | Unparser.Emitter.visit | train | def visit(node)
emitter = emitter(node)
conditional_parentheses(!emitter.terminated?) do
| ruby | {
"resource": ""
} |
q16383 | Unparser.Emitter.delimited | train | def delimited(nodes, &block)
return if nodes.empty?
block ||= method(:visit)
head, *tail = nodes
block.call(head)
tail.each do | ruby | {
"resource": ""
} |
q16384 | Unparser.Emitter.emit_comments_before | train | def emit_comments_before(source_part = :expression)
comments_before = comments.take_before(node, source_part)
return if | ruby | {
"resource": ""
} |
q16385 | Unparser.Emitter.emit_eof_comments | train | def emit_eof_comments
emit_eol_comments
comments_left = comments.take_all
return if comments_left.empty? | ruby | {
"resource": ""
} |
q16386 | Unparser.Emitter.emit_comments | train | def emit_comments(comments)
max = comments.size - 1
comments.each_with_index do |comment, index|
if comment.type.equal?(:document)
buffer.append_without_prefix(comment.text.chomp)
| ruby | {
"resource": ""
} |
q16387 | Unparser.Emitter.emit_body | train | def emit_body(body = body())
unless body
buffer.indent
nl
buffer.unindent | ruby | {
"resource": ""
} |
q16388 | Unparser.Comments.take_before | train | def take_before(node, source_part)
range = source_range(node, source_part)
if range
take_while | ruby | {
"resource": ""
} |
q16389 | Unparser.Comments.unshift_documents | train | def unshift_documents(comments)
doc_comments, other_comments = comments.partition(&:document?) | ruby | {
"resource": ""
} |
q16390 | Appbundler.App.copy_bundler_env | train | def copy_bundler_env
gem_path = installed_spec.gem_dir
# If we're already using that directory, don't copy (it won't work anyway)
return if gem_path == File.dirname(gemfile_lock)
FileUtils.install(gemfile_lock, gem_path, mode: 0644)
if File.exist?(dot_bundle_dir) | ruby | {
"resource": ""
} |
q16391 | Appbundler.App.write_merged_lockfiles | train | def write_merged_lockfiles(without: [])
unless external_lockfile?
copy_bundler_env
return
end
# handle external lockfile
Tempfile.open(".appbundler-gemfile", app_dir) do |t|
t.puts "source 'https://rubygems.org'"
locked_gems = {}
gemfile_lock_specs.each... | ruby | {
"resource": ""
} |
q16392 | RipperTags.VimFormatter.with_output | train | def with_output
super do |out|
out.puts header
@queued_write = []
yield out
| ruby | {
"resource": ""
} |
q16393 | RipperTags.Parser.on_command_call | train | def on_command_call(*args)
if args.last && :args == args.last[0]
args_add = | ruby | {
"resource": ""
} |
q16394 | RipperTags.Visitor.on_assign | train | def on_assign(name, rhs, line, *junk)
return unless name =~ /^[A-Z]/ && junk.empty?
if rhs && :call == rhs[0] && rhs[1] && "#{rhs[1][0]}.#{rhs[2]}" =~ /^(Class|Module|Struct)\.new$/
kind = $1 == 'Module' ? :module : :class
superclass = $1 == 'Class' ? rhs[3] : nil
superclass.flatten... | ruby | {
"resource": ""
} |
q16395 | Lit.I18nBackend.store_translations | train | def store_translations(locale, data, options = {})
super
ActiveRecord::Base.transaction do
| ruby | {
"resource": ""
} |
q16396 | Lit.Cache.fallback_localization | train | def fallback_localization(locale, key_without_locale)
value = nil
return nil unless fallbacks = ::Rails.application.config.i18n.fallbacks
keys = fallbacks == true ? @locale_cache.keys : fallbacks
keys.map(&:to_s).each do |lc|
if lc != locale.locale && value.nil?
nk | ruby | {
"resource": ""
} |
q16397 | Lit.Cache.fallback_to_default | train | def fallback_to_default(localization_key, localization)
localization_key.localizations.where.not(default_value: nil). \
| ruby | {
"resource": ""
} |
q16398 | Lit.CloudTranslation.translate | train | def translate(text:, from: nil, to:, **opts)
| ruby | {
"resource": ""
} |
q16399 | Lit.CloudTranslation.configure | train | def configure(&block)
unless provider
raise 'Translation provider not selected yet. Use `Lit::CloudTranslation' \
'.provider = PROVIDER_KLASS` | ruby | {
"resource": ""
} |
Subsets and Splits
SQL Console for CoIR-Retrieval/CodeSearchNet-ccr-ruby-queries-corpus
Retrieves a large number of entries in the 'ruby' language, providing basic information but limited analytical value.