query
stringlengths
7
9.55k
document
stringlengths
10
363k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
add number of frames (or another timecode) to this one
def +(arg) if (arg.is_a?(Timecode) && framerate_in_delta(arg.fps, @fps)) self.class.new(@total+arg.total, @fps) elsif (arg.is_a?(Timecode)) raise WrongFramerate, "You are calculating timecodes with different framerates" else self.class.new(@total + arg, @fps) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def +(arg)\n if (arg.is_a?(Timecode) && arg.fps == @fps)\n Timecode.new(@total+arg.total, @fps)\n elsif (arg.is_a?(Timecode))\n raise WrongFramerate, \"You are calculating timecodes with different framerates\"\n else\n Timecode.new(@total + arg, @fps)\n end\n end", "def timecode_frame...
[ "0.67962563", "0.64785755", "0.63298506", "0.62141925", "0.62141925", "0.6150092", "0.6077465", "0.60709757", "0.6060809", "0.6055703", "0.60495704", "0.60238457", "0.5997484", "0.59973186", "0.59695655", "0.59638536", "0.59508926", "0.59335333", "0.592096", "0.5900851", "0.5...
0.65815675
2
Tells whether the passes timecode is immediately to the left or to the right of that one with a 1 frame difference
def adjacent_to?(another) (self.succ == another) || (another.succ == self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_left?\n dir1 = get_character(-1).direction\n dir2 = get_character(@event_id).prelock_direction\n return ((10 - dir1) * 2) % 10 == dir2\n end", "def phase_shift? ; false ; end", "def phase_shift? ; @phase_shift ; end", "def strike_frame?\n if not_last_frame? && (@throws == 1) && (@pin...
[ "0.6318614", "0.6173643", "0.6151182", "0.6098432", "0.6094985", "0.6070746", "0.60663533", "0.6039274", "0.6036435", "0.6006694", "0.5984509", "0.5965816", "0.59613234", "0.595978", "0.59520364", "0.5949128", "0.5918842", "0.59159815", "0.589295", "0.5878453", "0.5835993", ...
0.0
-1
Subtract a number of frames
def -(arg) if (arg.is_a?(Timecode) && framerate_in_delta(arg.fps, @fps)) self.class.new(@total-arg.total, @fps) elsif (arg.is_a?(Timecode)) raise WrongFramerate, "You are calculating timecodes with different framerates" else self.class.new(@total-arg, @fps) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def * times\n result = self.slice 0, 0\n frames = self.slice 0..-1\n times.times do\n result.concat frames\n end\n result\n end", "def frames\n @keyframes.last.index + @keyframes.last.duration\n end", "def tenth_frame; end", "def frames\n _nudge[3]\n end", "def ro...
[ "0.6476094", "0.64357466", "0.6398791", "0.63316804", "0.6260064", "0.62539417", "0.6241194", "0.6233361", "0.6192789", "0.6176227", "0.6162659", "0.6151193", "0.61091167", "0.60849667", "0.6073847", "0.60103786", "0.598452", "0.598452", "0.598452", "0.59735703", "0.5933519",...
0.6181468
10
Multiply the timecode by a number
def *(arg) raise RangeError, "Timecode multiplier cannot be negative" if (arg < 0) self.class.new(@total*arg.to_i, @fps) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def *(arg)\n raise RangeError, \"Timecode multiplier cannot be negative\" if (arg < 0)\n Timecode.new(@total*arg.to_i, @fps)\n end", "def mulSelf(value)\n if(time.is_a?(Numeric)) then\n @sec *= value ;\n else\n raise \"Illegal mulSelf argument(\" + value.inspect() + \")\"\n end\n ret...
[ "0.6964472", "0.6281734", "0.61863804", "0.61631763", "0.6106265", "0.6013049", "0.5959649", "0.5922255", "0.59133714", "0.5859547", "0.5838126", "0.5814848", "0.5780928", "0.57537156", "0.5713086", "0.5698946", "0.5685026", "0.5683758", "0.5683", "0.5680917", "0.56720936", ...
0.64069533
2
Get the next frame
def succ self.class.new(@total + 1, @fps) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_frame\n next_frame\n rescue StopIteration => e\n return nil\n end", "def next_frame\n #populate our @channels instance vaiable\n create_channel_list\n do_frame_lookup\n\n if File.exist?(\"/home/lee/src/eyebleach/test_images/#{message[:channel_name]}-frame#{message[:frame_no]}.gif\")\n...
[ "0.79162306", "0.7322505", "0.710531", "0.6856793", "0.6719272", "0.6674338", "0.6605948", "0.65707237", "0.6443287", "0.6441964", "0.6439516", "0.64344865", "0.6368505", "0.63122517", "0.6288127", "0.6282503", "0.62736547", "0.62729627", "0.62729627", "0.62729627", "0.627296...
0.0
-1
Get the number of times a passed timecode fits into this time span (if performed with Timecode) or a Timecode that multiplied by arg will give this one
def /(arg) arg.is_a?(Timecode) ? (@total / arg.total) : self.class.new(@total / arg, @fps) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timecode_framecount(timecode, fps)\n frames_dropped = 0 # init - I don't need this, do I!\n fps = fps_normalize(fps)\n timecode_array = timecode_split(timecode)\n\n total_minutes = 60 * timecode_array[:hh] + timecode_array[:mm]\n if timecode_array[:is_drop] == true\n frames_dropped = 2 * (total_minutes...
[ "0.6592047", "0.60022455", "0.5766146", "0.5736461", "0.5735268", "0.572244", "0.57045424", "0.569314", "0.56761444", "0.5673011", "0.566816", "0.5652015", "0.56100374", "0.5443507", "0.5426379", "0.54077625", "0.54010546", "0.5392089", "0.53740716", "0.536798", "0.5341752", ...
0.5537752
14
Timecodes can be compared to each other
def <=>(other_tc) if framerate_in_delta(fps, other_tc.fps) self.total <=> other_tc.total else raise WrongFramerate, "Cannot compare timecodes with different framerates" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_timecode(t1,t2)\n # enforce type\n t1 = t1.to_f\n t2 = t2.to_f\n \n # enforce bounds\n t1 = 0.0 if t1 < 0.0\n t2 = 0.0 if t2 < 0.0\n t1 = 86399.0 if t1 > 86399.0\n t2 = 86399.0 if t2 > 86399.0\n \n ...
[ "0.6728496", "0.63882834", "0.62697834", "0.615825", "0.61185277", "0.60915935", "0.6025427", "0.5969113", "0.59485805", "0.59021115", "0.5831011", "0.5830041", "0.58210474", "0.5766446", "0.57651", "0.5760398", "0.57056737", "0.5686132", "0.56777716", "0.56302875", "0.562880...
0.5696253
18
FFmpeg expects a fraction of a second as the last element instead of number of frames. Use this method to get the timecode that adheres to that expectation. The return of this method can be fed to ffmpeg directly. Timecode.parse("00:00:10:24", 25).with_frames_as_fraction => "00:00:10.96"
def with_frames_as_fraction vp = value_parts.dup vp[-1] = (100.0 / @fps) * vp[-1] WITH_FRACTIONS_OF_SECOND % vp end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_with_fractional_seconds(tc_with_fractions_of_second, fps = DEFAULT_FPS)\n fraction_expr = /\\.(\\d+)$/\n fraction_part = ('.' + tc_with_fractions_of_second.scan(fraction_expr)[0][0]).to_f\n\n seconds_per_frame = 1.0 / fps.to_f\n frame_idx = (fraction_part / seconds_per_frame).floor\n\...
[ "0.6891175", "0.6891175", "0.62685215", "0.60032356", "0.5940963", "0.5940963", "0.5804036", "0.57164896", "0.5617439", "0.5538645", "0.54068136", "0.54068136", "0.5266965", "0.5263312", "0.52195764", "0.5207042", "0.51870525", "0.51086134", "0.5063869", "0.5054524", "0.50478...
0.6498737
3
Validate that framerates are within a small delta deviation considerable for floats
def framerate_in_delta(one, two) (one.to_f - two.to_f).abs <= ALLOWED_FPS_DELTA end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_float(a, b)\n #tolerance = 1e-12\n tolerance = 1e-2\n a = a.to_f\n b = b.to_f\n if a.finite? and b.finite?\n (a-b).abs < tolerance\n else\n true\n end\n end", "def check_float(a, b)\n tolerance = 1e-12\n a = a.to_f\n b = b.to_f\...
[ "0.6540503", "0.65201175", "0.64239794", "0.64239794", "0.6323493", "0.6223715", "0.6220988", "0.60866594", "0.60756505", "0.60531515", "0.60208035", "0.5930202", "0.58592796", "0.5759077", "0.56615263", "0.5651098", "0.5640022", "0.55463696", "0.55268306", "0.55181384", "0.5...
0.7059788
1
Prepare and format the values for TC output
def validate! frames = @total secs = (@total.to_f/@fps).floor frames-=(secs*@fps) mins = (secs/60).floor secs -= (mins*60) hrs = (mins/60).floor mins-= (hrs*60) self.class.validate_atoms!(hrs, mins, secs, frames, @fps) [hrs, mins, secs, frames] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def formats=(values); end", "def preformatting\n\n end", "def wrestler_raw_values_output\n\t\ttt_probability = \"%.1f\" % (self.statistics[:tt_probability] * 100) + \"%\"\n\t\tcard_rating = \"%.1f\" % self.statistics[:total_card_rating]\n\t\toc_probability = \"%.1f\" % (self.statistics[:oc_probability] ...
[ "0.631077", "0.6073906", "0.60591555", "0.58908385", "0.58669823", "0.58214337", "0.5611131", "0.5605329", "0.56049496", "0.560272", "0.55320984", "0.5434524", "0.54324144", "0.541987", "0.53961766", "0.53763807", "0.5373504", "0.53543985", "0.5352698", "0.5344945", "0.533953...
0.0
-1
Timecode TC helper: parse both hh:mm:ss:ttt and hh:mm:ss.sss TC formats used in DCSubtitle
def parse_dcsubtitle_tc_string( tc_string, fps ) case tc_string when /\d\d:\d\d:\d\d:\d\d\d/ # hh:mm:ss:ttt Timecode.parse_with_ticks( tc_string, fps ) when /\d\d:\d\d:\d\d\.\d\d\d/ # hh:mm:ss.sss Timecode.parse( tc_string, fps ) else nil end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tt(time, format=:short); '13:37'; end", "def parse_srt_time(time)\n time =~ /^(\\d+):(\\d+):(\\d+),(\\d{3})$/\n hh, mm, ss, ms = [$1, $2, $3, $4].map(&:to_i)\n hh*3600 + mm*60 + ss + ms/1000.0\n end", "def timeConversion(s)\n #\n # Write your code here.\n #\n split = s.split(\":\")\n ...
[ "0.6679312", "0.66331774", "0.655438", "0.65348864", "0.6492654", "0.6364852", "0.6306446", "0.6306446", "0.62765664", "0.6254339", "0.62242126", "0.62186223", "0.6205635", "0.6198229", "0.61766243", "0.6160829", "0.61282307", "0.6081812", "0.6067581", "0.6048505", "0.6047632...
0.804122
0
check_compliance Verify a sorted certificate chain
def verify_cert_chain( certs, context_errors ) certs = certs.reverse verification = Array.new certs.each_with_index do |cert, index| if index == 0 then issuer = cert else issuer = certs[ index - 1 ] end begin check = cert.verify issuer.public_key context_errors[ cert.subject.to_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_cert_chain( certs, context_errors )\n certs = certs.reverse\n verification = Array.new\n certs.each_with_index do |cert, index|\n if index == 0 then issuer = cert else issuer = certs[ index - 1 ] end\n begin\n check = cert.verify issuer.public_key\n context_errors[ cert....
[ "0.70947254", "0.68287253", "0.6528463", "0.62260026", "0.62230265", "0.61065453", "0.6039003", "0.6039003", "0.5999668", "0.5903112", "0.588643", "0.5808776", "0.5795388", "0.57874185", "0.57558095", "0.5703685", "0.5694952", "0.5682039", "0.5639502", "0.56301194", "0.562826...
0.71110255
0
FIXME Looking only at the first prefix returned from collect_all_namespaces_href_keys for a given namespace will fall on its nose when there would be multiple prefixes for the same namespace. E.g. I think in a Signature it would be entirely valid to use different prefixes for different portions, all evaluating to the s...
def namespace_prefix( doc, ns ) doc_ns = doc.collect_all_namespaces_href_keys if doc_ns.key?( ns ) doc_ns[ ns ].first.nil? ? 'xmlns' : doc_ns[ ns ].first else 'xmlns' end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collect_namespaces\n # TODO: print warning message if a prefix refers to more than one URI in the document?\n ns = {}\n traverse {|j| ns.merge!(j.namespaces)}\n ns\n end", "def namespaces_by_prefix\n form_data = { 'action' => 'query', 'meta' => 'siteinfo', 'siprop' => 'n...
[ "0.7553688", "0.72554076", "0.7094396", "0.69445527", "0.6919969", "0.681973", "0.6815932", "0.6775171", "0.6722255", "0.67095006", "0.6604263", "0.6554275", "0.6554275", "0.6476666", "0.64516044", "0.6422058", "0.64013803", "0.64013803", "0.6373231", "0.6370692", "0.62423354...
0.66936386
10
Will return true/false for completing the evaluation
def signature_verify( doc ) # 1. Figure out signature namespace prefix sig_ns, prefix = signature_namespace_and_prefix( doc ) # 2.a Signer present? @signer_node = doc.xpath( "//#{ namespace_prefix( doc, doc.root.namespace.href ) }:Signer" ) if @signer_node.size != 1 @messages << "#{ @signer_n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluate?\n false\n end", "def evaluate?\n false\n end", "def evaluable?\n true\n end", "def result?\n true\n end", "def evaluated?; @__evaluated end", "def evaluation_succeeded\n return @evaluation_succeeded\n end", "def evaluat...
[ "0.8180659", "0.8180659", "0.77362293", "0.71617377", "0.7142542", "0.6979476", "0.69759107", "0.6956325", "0.69090664", "0.69090664", "0.69090664", "0.68975073", "0.6865628", "0.68233895", "0.67271316", "0.6625809", "0.6618773", "0.6618069", "0.65905607", "0.6579514", "0.655...
0.0
-1
See rsa gem. note the bn modification here
def modpow( base, exponent, modulus ) result = 1 while exponent > 0 result = ( base * result ) % modulus unless ( ! exponent.bit_set? 0 ) base = ( base * base ) % modulus exponent >>= 1 end result end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rsa_public(input, n, e)\n input_bn = OpenSSL::BN.new(input.to_s)\n n_bn = OpenSSL::BN.new(n.to_s)\n e_bn = OpenSSL::BN.new(e.to_s)\n (input_bn.mod_exp(e_bn, n_bn)).to_i\nend", "def rsa_from_params(e, n, d, p, q, iqmp, dmp1, dmq1)\n ::OpenSSL::PKey::RSA.new.tap do |pkey|\n ...
[ "0.7353612", "0.72476923", "0.6979055", "0.69753385", "0.69616586", "0.67232096", "0.66945404", "0.6575035", "0.6543653", "0.6456165", "0.64182806", "0.63933796", "0.63910615", "0.63026965", "0.629542", "0.6286012", "0.62455153", "0.62147397", "0.6202439", "0.6172721", "0.612...
0.0
-1
lib/xml.rb FIXME Looking only at the first prefix returned from collect_all_namespaces_href_keys for a given namespace will fall on its nose when there would be multiple prefixes for the same namespace. E.g. I think in a Signature it would be entirely valid to use different prefixes for different portions, all evaluati...
def namespace_prefix( doc, ns ) doc_ns = doc.collect_all_namespaces_href_keys if doc_ns.key?( ns ) doc_ns[ ns ].first.nil? ? 'xmlns' : doc_ns[ ns ].first else 'xmlns' end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collect_namespaces\n # TODO: print warning message if a prefix refers to more than one URI in the document?\n ns = {}\n traverse {|j| ns.merge!(j.namespaces)}\n ns\n end", "def namespaces_by_prefix\n form_data = { 'action' => 'query', 'meta' => 'siteinfo', 'siprop' => 'n...
[ "0.76827896", "0.73850244", "0.7149335", "0.7034576", "0.70186025", "0.694745", "0.68889713", "0.6868551", "0.67331856", "0.6721297", "0.6654583", "0.6646254", "0.66132456", "0.6606819", "0.6589075", "0.65382046", "0.65277827", "0.6470507", "0.64622647", "0.64445394", "0.6444...
0.71771955
2
returns xml or false. in addition to xml all kinds of stuff will be examined here hence the hoopla to skip expected errors from nonxml. still: what an appalling method
def get_xml_of_type( asdcp_type, file, errors, errors_status ) begin xml = Nokogiri::XML( open file ) rescue Exception => e @logger.info "#{ file }: #{ e.message }" return false, errors, errors_status end unless xml.errors.empty? xml.errors.each do |error| # expected errors from non-xml ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rexml? ; false end", "def is_xml_valid?(xml_text)\n return true #FIXME\n end", "def xml?\n return unless subtype\n\n subtype == 'xml'\n end", "def xml?; end", "def xml?; end", "def check_error(xml)\n raise NotImplementedError\n end", "def valid_xml?(xml)\n create_documen...
[ "0.7844747", "0.7504664", "0.7422765", "0.74197745", "0.74197745", "0.7164444", "0.71608704", "0.7125205", "0.70014995", "0.69586015", "0.69586015", "0.69586015", "0.69586015", "0.6823359", "0.6787369", "0.67414784", "0.66622955", "0.65439206", "0.6534409", "0.6528341", "0.64...
0.6786369
15
FIXME Rather brittle mechanism here. I'd like to have infrastructure types show up (CompositionPlaylist, PackingList, DCSubtitle, DCMetadata)
def get_asset_uuid( file ) id = nil if File.exists?( file ) xml = xml?( file ) if xml xml.remove_namespaces! # FIXME how to find the first child level Id only? ids = xml.xpath( '//Id' ) if ids.size > 0 id = ids.first.text.split( ':' ).last else id = xml.xpath( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kind\n :playlist\n end", "def embed_type\n raise NotImplementedError\n end", "def kind; end", "def kind; end", "def kind; end", "def kind; end", "def kind; end", "def kind; end", "def subtype; end", "def mediatype; end", "def type ; metadata[:type] ; end", "def res...
[ "0.6094836", "0.6032406", "0.60223794", "0.60223794", "0.60223794", "0.60223794", "0.60223794", "0.60223794", "0.5984972", "0.5981965", "0.59378666", "0.55821", "0.5562873", "0.55352247", "0.55352247", "0.55352247", "0.55352247", "0.55352247", "0.55352247", "0.55352247", "0.5...
0.0
-1
Returns subject, issuer and serial (from signing certificate) and x509serialnumber (from Signer..X509SerialNumber)
def signer_info( xml, sig ) sig_info = Hash.new if ! sig.signature_node.empty? sig_info[ :signer_name ] = sig.signer_name sig_info[ :signer_issuer_name ] = sig.signer_issuer if ! sig.signer_node.empty? signer_ns_prefix = namespace_prefix( xml, MStr::Ns_Xmldsig ) sig_info[ :x509serialnumber ]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serial\n @cert.serial\n end", "def cert_serial_get\n cert = certificate_get\n # Convert the base 10 serial number from the openssl cert to hexadecimal\n serial_number = cert.serial.to_s(16)\n # Add a colon every 2 characters to the returned serial number\n serial_number.scan(%r{\\w{2}}...
[ "0.6738246", "0.673712", "0.65900207", "0.6470563", "0.64332366", "0.63626885", "0.6236969", "0.61906505", "0.61190605", "0.5952662", "0.5950264", "0.5947507", "0.58150595", "0.5773428", "0.56793344", "0.56541264", "0.5608646", "0.559307", "0.5582892", "0.5532681", "0.5471419...
0.6322789
7
Consider the naming convention checks performed here to be a work in progress. As of Q2 2013 this code still assumes the world is using V.3.9 See for the new V.8.3 nomenclature which was released in Q2 2013.
def naming_convention_compliant?( cpl_id, title, is_stereoscopic, i3d_specs_required, hints ) matches = Hash.new misses = Hash.new original_parts = title.split( '_' ).reject { |e| e.empty? } parts = original_parts.dup required_parts = MStr::Naming_convention.keys required_parts.delete( :i3d_specs ) unless (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name_safe?; end", "def old_name; end", "def real_name; end", "def plausible_common_name; end", "def implausible_common_name; end", "def original_name; end", "def check_name\n parts = name.split '_'\n fail NotImplementedError, \\\n 'Result fetcher naming convention not being foll...
[ "0.67264473", "0.6519664", "0.64963245", "0.64920706", "0.6465439", "0.64551413", "0.6377055", "0.6308263", "0.625622", "0.621833", "0.6146027", "0.61306596", "0.6079587", "0.60633355", "0.6049092", "0.60464805", "0.60464805", "0.60464805", "0.60464805", "0.6020967", "0.59954...
0.0
-1
And the error goes to ...
def error_output where = Array.new where << 'below' if @logger.prints_errors where << 'with increased verbosity' if ! @logger.prints_errors where << "in autolog at #{ ENV[ 'DCP_INSPECT_DIR' ] }" if @logger.writes_autolog where << 'in autolog with option --autolog' if ! @logger.writes_autolog where << "in #{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def error; end", "def error; end", "def error; end", "def error; end", "def error; end", "def error; end", "def error; end", "def recover_from(_error); end", "def error(exception) nil ; end", "def error?; end", "def error?; end", "def error?; end", "def errorhandling\n end", "def error\...
[ "0.7897404", "0.7897404", "0.7897404", "0.7897404", "0.7897404", "0.7897404", "0.7897404", "0.7714673", "0.7526", "0.75244015", "0.75244015", "0.75244015", "0.75147915", "0.74359655", "0.7395349", "0.7395349", "0.73689276", "0.7343677", "0.7314296", "0.72906613", "0.72906613"...
0.0
-1
Puts current version of the file to items.
def put!(method) # If necessary, creates the state record if not self.file.state.exists? self.file.state.create(@file) end # Rotates other items new_list = { } self.each_item do ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_version_file(version)\n if File.exists?('VERSION')\n File.open('VERSION', 'w') { |f| f << version.to_s }\n modified_files << 'VERSION'\n end\n end", "def current_items=(items)\n @current_items = items\n invoke! :update\n end", "def recreate_versions!\n with_c...
[ "0.599553", "0.56709665", "0.5643732", "0.5506726", "0.5502068", "0.5493335", "0.542076", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.54160106", "0.5...
0.61071944
0
Mail file to specified address.
def mail!(to) if to.nil? to = @storage.directory.configuration[:mail] end if to.nil? raise Exception("No e-mail address specified for sending log to.") end require "etc" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_email_by_passing_file(sendto, attachmnent_filename, path='./public')\n Pony.mail({\n :to => sendto,\n :from => 'Magic Team',\n :subject => 'Your web scrapper successfully finished',\n :body => 'Thanks for using web scrapper service offered by MAGiC',\n :attachments => {attachmn...
[ "0.69873995", "0.6760441", "0.6716342", "0.6544984", "0.646208", "0.62654614", "0.6179396", "0.6099145", "0.6023731", "0.6002407", "0.6001722", "0.5953669", "0.5896329", "0.5893281", "0.5867276", "0.58545566", "0.5831128", "0.58292055", "0.5792389", "0.57901645", "0.57727313"...
0.6465148
4
Traverses through all items.
def each_item self.file.state.items.each_pair do |identifier, path| yield Item::new(self, identifier, path) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def each\n items.each { |itm| yield itm }\n end", "def each\n @items.each {|x| yield x}\n end", "def each\n @items.each { |i| yield i }\n end", "def each\n @items.each { |_item| yield _item }\n end", "def all\n @items.each {|item| p item}\n en...
[ "0.6813256", "0.67070144", "0.6692499", "0.6657093", "0.6569511", "0.6375278", "0.6343488", "0.6314546", "0.6290073", "0.62566686", "0.6200024", "0.6199427", "0.6199427", "0.61823714", "0.6174355", "0.61678964", "0.61541814", "0.61348087", "0.6085857", "0.6071565", "0.6065057...
0.5996061
26
GET /entries GET /entries.xml
def index @entries = Entry.all; respond_to do |format| format.html # index.html.erb format.xml { render :xml => @entries } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @entries = Entry.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @entries }\n end\n end", "def index\n @entries = @resource_finder.find(:all)\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render...
[ "0.7376466", "0.72305304", "0.7090864", "0.6967356", "0.695757", "0.6926811", "0.68990505", "0.681597", "0.6762197", "0.67595464", "0.67136544", "0.66883403", "0.66407484", "0.6625349", "0.66169727", "0.66169727", "0.66169727", "0.66169727", "0.66169727", "0.66169727", "0.648...
0.73518234
1
GET /entries/1 GET /entries/1.xml
def show @entry = Entry.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @entry } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @entries = Entry.all;\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @entries }\n end\n end", "def index\n @entries = Entry.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @entri...
[ "0.7119046", "0.71144897", "0.684475", "0.6828041", "0.6715832", "0.6660727", "0.6642236", "0.6567999", "0.6480441", "0.64218634", "0.63900346", "0.63313913", "0.63300765", "0.6319279", "0.6288174", "0.6285836", "0.62801266", "0.62376285", "0.61688244", "0.61545646", "0.61254...
0.6700736
6
GET /entries/new GET /entries/new.xml
def new @entry = Entry.new @folders = Folder.find(:all, :order => "updated_at DESC").map { |f| [f.name, f.id] } @new = true; respond_to do |format| format.html { render "edit" } format.xml { render :xml => @entry } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @entry = Entry.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @entry }\n end\n end", "def new\n @entry = Entry.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.xml { render :xml => @entry }\n end...
[ "0.7487231", "0.7475742", "0.7358314", "0.7252312", "0.69534063", "0.6934935", "0.69304943", "0.6913238", "0.68988115", "0.68988115", "0.68988115", "0.68988115", "0.68988115", "0.68988115", "0.68988115", "0.68988115", "0.6866781", "0.68301696", "0.6800907", "0.6755044", "0.67...
0.68932796
16
POST /entries POST /entries.xml
def create @entry = Entry.new(params[:entry]) respond_to do |format| if @entry.save flash[:notice] = 'Entry was successfully created.' format.html { redirect_to(@entry) } format.xml { render :xml => @entry, :status => :created, :location => @entry } else format.html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n logger.info \"Creating Entry\"\n @entry = Entry.new(params[:entry])\n logger.info \"Entry Created\"\n\n respond_to do |format|\n if @entry.save\n format.html { redirect_to(entries_url, :notice => 'Entry was successfully created.') }\n format.xml { render :xml => @entry,...
[ "0.62269115", "0.6189906", "0.60944426", "0.6051307", "0.58648914", "0.58509773", "0.58441854", "0.5820264", "0.5808413", "0.58058083", "0.5761974", "0.5755941", "0.5737393", "0.5737393", "0.5737393", "0.5736821", "0.5736727", "0.57349133", "0.5724143", "0.56773037", "0.56760...
0.6038386
4
PUT /entries/1 PUT /entries/1.xml
def update @entry = Entry.find(params[:id]) respond_to do |format| if @entry.update_attributes(params[:entry]) flash[:notice] = 'Entry was successfully updated.' format.html { redirect_to(@entry) } format.xml { head :ok } else format.html { render :action => "edit" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post 'update', opts\n end", "def put_atom_entry(entry, url = entry.edit_url)\n raise \"Cowardly refusing to PUT a non-Atom::Entry (#{entry.class})\" unless entry.is_a? Atom::Entry\n headers = {\"Con...
[ "0.6826873", "0.6384516", "0.63785386", "0.6353075", "0.622276", "0.61162645", "0.60563713", "0.6055115", "0.60504633", "0.6040615", "0.6001748", "0.59459376", "0.5907139", "0.58965147", "0.5887981", "0.5828941", "0.5822026", "0.58199334", "0.58199334", "0.57608676", "0.57182...
0.6093299
6
DELETE /entries/1 DELETE /entries/1.xml
def destroy @entry = Entry.find(params[:id]) @entry.destroy respond_to do |format| format.html { redirect_to(entries_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n RestClient.delete \"#{REST_API_URI}/contents/#{id}.xml\" \n self\n end", "def destroy\n @entry ||= Entry.find(params[:id])\n @entry.destroy\n\n respond_to do |format|\n format.html { redirect_to(entries_url) }\n format.xml { head :ok }\n end\n end", "def delete_entr...
[ "0.72282064", "0.7108327", "0.70655566", "0.69840044", "0.6867898", "0.68631315", "0.6762863", "0.6734909", "0.669322", "0.66766214", "0.66355205", "0.6596771", "0.6585262", "0.65573466", "0.6533589", "0.65327686", "0.65273607", "0.6506398", "0.6506398", "0.6496457", "0.64964...
0.7111399
4
This allows you to choose from questions what answers will be provided
def show @choices = { :taste => params[:taste], :smell => params[:smell], :food =>params[:food]} @taste_list = {:salty => 4, :sour => 3, :bitter => 2, :sweet => 1} @food_list = {:steak => 'a', :chicken => 'b', :fish => 'c', :veggies => 'd'} @smells_list = {:rosemary => 'z', :oak => 'y', :lavendar => 'x'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def question\n @question = params[:question]\n @answer = %w[yes no].sample\n end", "def multiple_choice_question(text, points)\n question = MultipleOptionsQuestion.new(text, points)\n @errorReporter.register question\n @test.add_question question\nend", "def ask_questionaire\n alert_reserved_a...
[ "0.7692644", "0.70888627", "0.6966419", "0.6952221", "0.6932353", "0.68866414", "0.687131", "0.6861139", "0.6840308", "0.68368363", "0.68368363", "0.6817372", "0.68150145", "0.68085575", "0.678101", "0.6775581", "0.6768588", "0.67436963", "0.67215794", "0.6710078", "0.6704634...
0.0
-1
$:.unshift(File.dirname(__FILE__)) require File.expand_path(File.dirname(__FILE__) + '/../lib/smeagol') Stop test if test wiki path is not set if !ENV.has_key?('SMEAGOL_TEST_WIKI_PATH') puts 'You must set SMEAGOL_TEST_WIKI_PATH in your environment to run the tests.' exit(1); end TODO: Use Grit instead of shell.
def test_wiki(directory='smeagol-test') $test_wiki ||= {} $test_wiki[directory] ||= ( directory = File.join('tmp', directory) if ::File.directory?("#{directory}/.git") #system "cd #{directory} && git reset --hard" else system "git clone https://github.com/rubyworks/smeagol-test.git #{direct...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test\n require File.expand_path(File.join(File.dirname(__FILE__), \"tests/tests\"))\n Test.run\nend", "def test_bin\n Dir.chdir(File.expand_path(__dir__))\n assert_command('../bin/chuckle url_file.txt')\n end", "def setup_test\n\n assert(File.exist?(model_path))\n\n if !File.exist?(run_dir)\n ...
[ "0.66035205", "0.65256065", "0.6404417", "0.63882524", "0.626726", "0.626726", "0.6239443", "0.61585027", "0.60271007", "0.5990904", "0.5990904", "0.59794325", "0.59759206", "0.5968012", "0.5961397", "0.59605855", "0.59598243", "0.5946266", "0.5946266", "0.59226483", "0.59190...
0.61267215
8
Returns an array of hashes. Each hash has an id and market name key
def return_names url = URI.parse"http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=#{@options[:zip]}" JSON.parse(Net::HTTP.get(url)).delete('results') end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def return_all\n market_details = return_names.collect do |value|\n url = URI.parse \"http://search.ams.usda.gov/farmersmarkets/v1/data.svc/mktDetail?id=#{value['id']}\"\n result = JSON.parse(Net::HTTP.get(url) )\n value = value.merge(result.delete('marketdetails'))\n value\n ...
[ "0.65580827", "0.6340354", "0.6073809", "0.6062287", "0.5841023", "0.56932366", "0.56729746", "0.56505907", "0.56016225", "0.5599238", "0.55889875", "0.55707645", "0.55445737", "0.5538836", "0.5512742", "0.5475089", "0.5435617", "0.5379509", "0.53769356", "0.53639066", "0.535...
0.0
-1
Returns an array of hashes. Each hash has an id, market name, address, time, products and google link
def return_all market_details = return_names.collect do |value| url = URI.parse "http://search.ams.usda.gov/farmersmarkets/v1/data.svc/mktDetail?id=#{value['id']}" result = JSON.parse(Net::HTTP.get(url) ) value = value.merge(result.delete('marketdetails')) value end mar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hash\n [id, name, ticker, figi_ticker, ric, isin, sedol, exchange_mic, sponsor, type, description, inception_date, data_change_date, close_date, is_live_listed, legal_structure, intraday_nav_ticker, primary_ticker, primary_ticker_country_code, primary_listing_region, net_expense_ratio, asset_class, other_...
[ "0.6418155", "0.6253235", "0.62171644", "0.6116767", "0.60110646", "0.5991314", "0.5961187", "0.59554434", "0.59152454", "0.590382", "0.585866", "0.58179295", "0.5807686", "0.5800888", "0.57972527", "0.57902855", "0.57775533", "0.5773701", "0.57574517", "0.5741553", "0.573481...
0.61954284
3
set default order This method allows us to do things like
def to_param self.name end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default; return DefaultOrder; end", "def default_order\n raise NotImplementedError\n end", "def default_list_order\n return nil\n end", "def order()\n @options[:order] || DEF_LAST_ORDER\n end", "def original_order\n end", "def normalize_order!(default = :asc...
[ "0.81251204", "0.80408204", "0.7476312", "0.7365126", "0.7235898", "0.7197512", "0.7196216", "0.7123396", "0.70875686", "0.70608026", "0.69612676", "0.6832758", "0.67649066", "0.67608327", "0.6749871", "0.6749871", "0.67291826", "0.67145586", "0.6692134", "0.66701025", "0.663...
0.0
-1
importo los metodos de ese archivo Los metodos pueden tener parametros con valores por defecto u omision
def say_hi(name,moment='Morning') puts "Hello #{name}, have a good #{moment}" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modelo_start\n $productos = 'Productos.csv'\n $clientes = 'Usuarios.csv'\n $vendedores = 'Vendedores.csv'\nend", "def import_params\n params.require(:file)\n end", "def recuperar_dados(arquivo)\n @tools.leitura arquivo\n end", "def archivo_params\n params.require(:archivo).permi...
[ "0.60925645", "0.6038953", "0.6037546", "0.57789767", "0.5679169", "0.5648702", "0.5633833", "0.56199133", "0.56199133", "0.5619331", "0.5586279", "0.5570047", "0.55292857", "0.5521048", "0.54965764", "0.5488102", "0.54637986", "0.5457965", "0.5442849", "0.54409504", "0.54371...
0.0
-1
New Hampshire (only state summary, bycounty pdf)
def parse_nh() state = "NH"; url = 'https://www.nh.gov/covid19/' browser = Watir::Browser.new browser.goto(url); doc = Nokogiri::HTML.parse(browser.html()) browser.close(); tnow = DateTime.now().strftime(); output_fn = "data/"+tnow+'_USA_'+state+'.html'; f = File.open(output_fn,"w"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def county\n self.well_info.county\n end", "def full_country_report(hash)\n\n hash.each do |key, value|\n new_state = VirusPredictor.new(key, STATE_DATA[key][:population_density], STATE_DATA[key][:population])\n new_state.virus_effects\n end\n\nend", "def us_county_beds(fips)\n state = us_county...
[ "0.6033436", "0.5972877", "0.5899653", "0.5547402", "0.55366886", "0.5511521", "0.5471282", "0.53963554", "0.53884107", "0.52704185", "0.52704185", "0.5261353", "0.5213723", "0.51179385", "0.5105484", "0.5075921", "0.50624555", "0.5062057", "0.5062057", "0.5062057", "0.506135...
0.48105317
51
New Jersey (dashboard only state summary, bycounty pdf) separate frame for the dashboard, dashboard readable, but no history...
def parse_nj() state = "NJ"; # url = 'https://www.nj.gov/health/cd/topics/covid2019_dashboard.shtml' url = 'https://maps.arcgis.com/apps/opsdashboard/index.html#/ec4bffd48f7e495182226eee7962b422' browser = Watir::Browser.new browser.goto(url); sleep 10 doc = Nokogiri::HTML.parse(browser.html()) brow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n load_county or raise \"county not found\"\n\n breadcrumbs.add(:url=>@state.to_url, :title=>@state.name)\n breadcrumbs.add(:url=>@county.to_url, :title=>@county.name)\n self.page_title = \"#{@county.fancy_name_with_state} Cemetery Map\"\n\n @graveyards = @county.graveyards.includes(:main_...
[ "0.59683436", "0.5750124", "0.5709578", "0.55711776", "0.55609643", "0.5462942", "0.5462942", "0.5462942", "0.5462942", "0.5462942", "0.5445792", "0.5445792", "0.54419214", "0.5352829", "0.53409827", "0.5340908", "0.5320121", "0.53173214", "0.5232821", "0.5229485", "0.5224872...
0.0
-1
Vermont summary nly, breakdown at .png:
def parse_vt() state = "VT"; url = 'https://www.healthvermont.gov/response/infectious-disease/2019-novel-coronavirus' browser = Watir::Browser.new browser.goto(url); doc = Nokogiri::HTML.parse(browser.html) tnow = DateTime.now().strftime(); output_fn = "data/"+tnow+'_USA_'+state+'.html'; f ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_pie_chart\n\t\trequire 'gruff'\n \t\ta = Sha.group(\"filetype\").count\n\n \t\tg = Gruff::Pie.new\n \t\tg.title = 'Filetypes'\n \n \t\ta.each do |key, value|\n \t\t puts g.data(key, a[key])\n \t\tend\n\n\t\t g.write('app/assets/images/pie.png')\n\tend", "def main()\n img = ImageList.new(...
[ "0.5484859", "0.53776324", "0.53370994", "0.5331214", "0.5331214", "0.5315163", "0.53101695", "0.5289132", "0.526847", "0.5262869", "0.52279943", "0.5217835", "0.5204264", "0.5203731", "0.51874965", "0.51869106", "0.5185119", "0.5159951", "0.51370955", "0.51266456", "0.512382...
0.0
-1
Washington need to wait for 510 sec
def parse_wa() state = "WA"; url = 'https://www.doh.wa.gov/emergencies/coronavirus' browser = Watir::Browser.new browser.goto(url); sleep 10 html = browser.html doc = Nokogiri::HTML.parse(html) tnow = DateTime.now().strftime(); output_fn = "data/"+tnow+'_USA_'+state+'.html'; f = Fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait\n sleep 0.0001\n end", "def wait_readable_or_timeout; end", "def wait; end", "def wait; end", "def wait; end", "def wait_until_not_full; end", "def brute_wait(delay)\n sleep(delay)\n end", "def waiting; end", "def waiting; end", "def pre_sleep; end", "def abs_wait_short\n ...
[ "0.71824634", "0.70242715", "0.69645333", "0.69645333", "0.69645333", "0.6894473", "0.6821661", "0.68084604", "0.68084604", "0.6785049", "0.67637384", "0.67636967", "0.67454875", "0.6712567", "0.6688382", "0.6680505", "0.6665501", "0.6660281", "0.66452676", "0.6538984", "0.65...
0.0
-1
Methods relating to updating Bibl records with metadata from an external source, namely U.Va. Library catalog / Blacklight Looks up (via Ajax request) a record in the external metadata source (U.Va. Library catalog / Blacklight) based on externalrecordID and populates the HTML form fields on the page with corresponding...
def external_lookup # look up catalog ID (passed as a parameter) in external metadata source, # getting back a Bibl object with the values from the external source begin # Note: The Bibl object (variable "bibl") here is just a convenient # carrier for the metadata values gleaned from t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_externaldocument\n @externaldocument = Externaldocument.find(params[:id])\n end", "def update\n @external = External.find(params[:id])\n\n respond_to do |format|\n if @external.update_attributes(params[:external])\n format.html { redirect_to @external, notice: 'External was succ...
[ "0.52240014", "0.52177984", "0.51425606", "0.50743306", "0.5073828", "0.5066915", "0.50606906", "0.5027654", "0.48678616", "0.48499417", "0.48406383", "0.48400998", "0.48273635", "0.4811822", "0.4809958", "0.47972864", "0.4785296", "0.4777835", "0.4769784", "0.47675672", "0.4...
0.6746222
0
I create properties as symbols
def initialize (gene_id, gene_name, mut_phen_description) #I initialize the three properties of the class @gene_id = gene_id @gene_name = gene_name @mut_phen_description = mut_phen_description @gene_linkings = [] # I prefer this attribute as array (one gene can be linked with more of one other gene) e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def objects_and_symbols; end", "def symbols() @symbols end", "def create_symbols\n # creates all named symbols, including vector references\n @expressions.map { |a| a.create_symbols }\n puts(self.class)\n end", "def symbols; end", "def to_s(symbols = {})\n if @value.is_a?(Generate::V...
[ "0.66539174", "0.66214937", "0.6582807", "0.6564963", "0.64905566", "0.6393118", "0.6263211", "0.61600447", "0.6056286", "0.6050776", "0.60405797", "0.59562224", "0.59561604", "0.58759487", "0.58597106", "0.5856198", "0.57911015", "0.5776115", "0.57631785", "0.57631785", "0.5...
0.0
-1
TODO make these next 2 methods smarter
def get_watched_repos @repos.each do |r| if r.name.downcase == 'txtout' @watched.store('txtout', r.id) end if r.name.downcase == 'resumemonster' @watched.store('resumemonster', r.id) end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def probers; end", "def schubert; end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def suivre; end", "def refutal()\n end", "def operations; end", "def operations; end", "def formation; end", "def implementation; end", "def implemen...
[ "0.73837525", "0.6435472", "0.6298637", "0.6233509", "0.6233509", "0.6233509", "0.6233509", "0.6048182", "0.594497", "0.58790594", "0.58790594", "0.5877969", "0.5812801", "0.5812801", "0.58066934", "0.57811135", "0.57811135", "0.574891", "0.57442725", "0.57235336", "0.5704222...
0.0
-1
TODO this needs to be made smarter in conjunction with the ones above
def init_event_holders @txtout_events = Array.new @resmon_events = Array.new end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def private; end", "def probers; end", "def specie; end", "def specie; end", "def specie; end", "def specie; end", "def schubert; end", "def formation; end", "def offences_by; end", "def custom; end", "def custom; end", "def identify; end", "def terpene; end", "def refutal()\n end", ...
[ "0.7212195", "0.63014627", "0.6179358", "0.6179358", "0.6179358", "0.6179358", "0.59645396", "0.5800789", "0.5790752", "0.5674761", "0.5674761", "0.56518567", "0.56167746", "0.55635136", "0.5539524", "0.5528689", "0.5519866", "0.54989934", "0.54989934", "0.54832864", "0.54829...
0.0
-1
Just creating 1 team for now, leaving room to flesh this out if needed called from init_members.rake for now
def init_teams init_org if @org.blank? @team = Team.where('name is NOT NULL').first_or_create(name: 'development', org_id: @org.id) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(_team)\n # stub\n end", "def create_teams\n number_of_teams.to_i.times do |i|\n self.teams << Team.create!(:name => TEAM_NAMES[i])\n end\n end", "def create\n # if he/she has already created a team, but no one else join the team\n # destroy the old team, teammember ...
[ "0.7406641", "0.7335922", "0.7138324", "0.71016645", "0.7088875", "0.6953469", "0.6932324", "0.6873781", "0.6867228", "0.68448216", "0.68004954", "0.6788455", "0.67884034", "0.6784911", "0.67761457", "0.676514", "0.67525804", "0.66910446", "0.66895443", "0.66721", "0.6657602"...
0.7119858
3
just doing 1 org at the moment
def init_org @org = Org.where('name is NOT NULL').first_or_create(name: Rails.application.config.github_org) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def organization; end", "def organization; end", "def organization; end", "def projects ; end", "def autonomous_system_organization; end", "def autonomous_system_organization; end", "def autonomous_system_organization; end", "def project; end", "def rossini; end", "def do_your_stuff! organization...
[ "0.6150909", "0.6150909", "0.6150909", "0.5980306", "0.5772753", "0.5772753", "0.5772753", "0.567711", "0.5664842", "0.5642115", "0.5637168", "0.56203926", "0.56203926", "0.56203085", "0.559162", "0.55896026", "0.55727965", "0.5569608", "0.5511016", "0.5472674", "0.5472674", ...
0.5380191
60
Algolia Faroo Web Search Get top 5 search results for topic name and save to resource table.
def scrape_resources(topic) #The query parameters: (update according to your search query) q = "#{topic.name}"; #the search query pageNumber = 1 #the number of requested page pageSize = WebScraperOptions[:numSearchResults] #the size of a page autoCorrect = false #autoCorrectspelling safeSe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @topic = Topic.friendly.find(params[:topic_id])\n @posts = @topic.posts\n\n # @all_posts = Post.where(topic_id: params[:topic_id])\n # if params[:search]\n # @posts = @topic.posts.search(params[:search]).order(\"created_at DESC\")\n # else\n # @posts = @topic.posts.order('creat...
[ "0.6423615", "0.62666774", "0.6161766", "0.6063304", "0.60342777", "0.6025005", "0.5996706", "0.59513706", "0.5946322", "0.5946149", "0.59346294", "0.5932863", "0.58965886", "0.58857536", "0.58769596", "0.5869751", "0.58579046", "0.5811278", "0.57840997", "0.5779956", "0.5755...
0.64755154
0
Use callbacks to share common setup or constraints between actions.
def set_city @city = City.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Only allow a trusted parameter "white list" through.
def city_params params.require(:city).permit(:location, :startdate, :triporder) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allowed_params\n ALLOWED_PARAMS\n end", "def expected_permitted_parameter_names; end", "def param_whitelist\n [:role, :title]\n end", "def default_param_whitelist\n [\"mode\"]\n end", "def permitir_parametros\n \t\tparams.permit!\n \tend", "def permitted_params\n []\n end", ...
[ "0.7121987", "0.70541996", "0.69483954", "0.6902367", "0.6733912", "0.6717838", "0.6687021", "0.6676254", "0.66612333", "0.6555296", "0.6527056", "0.6456324", "0.6450841", "0.6450127", "0.6447226", "0.6434961", "0.64121825", "0.64121825", "0.63913447", "0.63804525", "0.638045...
0.0
-1
Echoes either user information or nil
def me render json: current_user end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_info\n\t\t\"name: #{name} \\n\"+\n\t\t\"email: #{email}\"\n\t\t\t\n\tend", "def userinfo\n if @user.nil?\n nil\n elsif @password.nil?\n @user\n else\n @user + ':' + @password\n end\n end", "def print_details\n puts '=================: User-details: ======...
[ "0.71338135", "0.6891935", "0.6821039", "0.6805284", "0.67702067", "0.67243844", "0.67240083", "0.6656587", "0.6601551", "0.65817225", "0.6575861", "0.6575662", "0.6551971", "0.6551971", "0.65342206", "0.65107185", "0.64377785", "0.6422418", "0.64175206", "0.6411385", "0.6393...
0.0
-1
Use callbacks to share common setup or constraints between actions.
def set_recipe @recipe = Recipe.friendly.find(params[:id]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_required_actions\n # TODO: check what fields change to asign required fields\n end", "def action_hook; end", "def run_actions; end", "def define_action_hook; end", "def actions; end", "def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_...
[ "0.6163163", "0.6045976", "0.5946146", "0.591683", "0.5890051", "0.58349305", "0.5776858", "0.5703237", "0.5703237", "0.5652805", "0.5621621", "0.54210985", "0.5411113", "0.5411113", "0.5411113", "0.5391541", "0.53794575", "0.5357573", "0.53402257", "0.53394014", "0.53321576"...
0.0
-1
Never trust parameters from the scary internet, only allow the white list through.
def recipe_params params.require(:recipe).permit( :name, :link, :ingredients_array, :image_url, meal_plans_params: [:recipe_id, :user_id, :status], likes_params: [:recipe_id, :user_id], ingredients_params: [:recipe_id, :grocery_item_id, :qty, :measurement, :note, :aisle] ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strong_params\n params.require(:user).permit(param_whitelist)\n end", "def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end", "def allow_params_authentication!; end", "def allowed_params\n ALLOWED_PARAMS\n end", "def default_param_whitelist\n [\"mode\"]\n...
[ "0.6981269", "0.6783559", "0.6746007", "0.67423046", "0.6735905", "0.6593568", "0.6504213", "0.649792", "0.6482664", "0.6478558", "0.64566684", "0.64392304", "0.6380194", "0.6376366", "0.636562", "0.63208145", "0.63006365", "0.63001287", "0.6292953", "0.62927175", "0.62911004...
0.0
-1
send buy order to Kraken
def order_to_kraken kraken = Kraken::Client.new(ENV['KRAKEN_PUBLIC_KEY'], ENV['KRAKEN_SECRET_KEY']) origin_price = cal_origin_price Process.fork do txid = kraken.buy_sell(amount, origin_price, "buy", currency+payment_type, "+3600") MyLog.kraken("#{Process.pid}") if txid.is_a?(Hash) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buy(amount:, price:)\n OpenOrderParser.parse(post(\"buy\", amount: amount, price: price))\n end", "def buy!(qty, price)\n order = Fyb::Order.new qty, price, :buy\n order.perform\n end", "def buy(params)\n params[:side] = 'buy'\n params[:product_id] = id\n\n Order...
[ "0.7345496", "0.71903795", "0.7119454", "0.69793534", "0.6909384", "0.6732799", "0.66440153", "0.6622887", "0.65790135", "0.6567341", "0.6547655", "0.65250254", "0.6419563", "0.64178956", "0.6417288", "0.63541394", "0.6308655", "0.62953883", "0.62864906", "0.6240522", "0.6187...
0.7358145
0
send coin from karaken to server
def request_withdraw kraken = Kraken::Client.new(ENV['KRAKEN_PUBLIC_KEY'], ENV['KRAKEN_SECRET_KEY']) withdraw_txid = kraken.withdraw(currency, ENV['KEY_WITHDRAW'], amount) if !withdraw_txid.nil? && !withdraw_txid.empty? self.withdraw_txid = withdraw_txid self.save self.withdraw! end ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send\n Chain.send_transaction(hex)\n end", "def get_coins\n get(\"/getcoins\")\n end", "def transfer client\n interface.send_money client.address, @options[:volume]\n end", "def send_money(amount)\n fail unless amount >= 0\n self.credits += amount\n end", "def t...
[ "0.64545625", "0.6235105", "0.62191993", "0.6194381", "0.61682767", "0.6158954", "0.60672456", "0.604952", "0.6030412", "0.6030412", "0.6030412", "0.5997776", "0.59954554", "0.59183484", "0.59021187", "0.5900037", "0.5878436", "0.58605367", "0.57700324", "0.5768311", "0.57582...
0.0
-1
trust price on server
def trust_price_tao setting_price = get_setting_price('TradeBid') if setting_price.activate_price setting_price.price else global = Global.new("#{currency}#{payment_type}") return 0 if global.last_buy.nil? return 0 if global.last_buy[:price].nil? global.last_buy[:price] end...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_price\n end", "def trust_buy_price\n setting_price = get_setting_price('TradeBid')\n if setting_price.activate_price\n setting_price.price\n else\n Rails.cache.read(\"kraken-price-#{currency}#{payment_type}\")[:buy_order_price]\n end\n end", "def hack\n self.price = 200\n...
[ "0.72498983", "0.7039727", "0.68374854", "0.6752564", "0.66893804", "0.66801494", "0.6637662", "0.66233724", "0.65980446", "0.6564202", "0.6531757", "0.6470497", "0.64617467", "0.64402604", "0.6439877", "0.6423635", "0.64096516", "0.63776636", "0.6348375", "0.6348375", "0.634...
0.68263865
3
trust price on server
def trust_buy_price setting_price = get_setting_price('TradeBid') if setting_price.activate_price setting_price.price else Rails.cache.read("kraken-price-#{currency}#{payment_type}")[:buy_order_price] end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_price\n end", "def hack\n self.price = 200\n end", "def trust_price_tao\n setting_price = get_setting_price('TradeBid')\n if setting_price.activate_price\n setting_price.price\n else\n global = Global.new(\"#{currency}#{payment_type}\")\n return 0 if global.last_buy.nil...
[ "0.72498983", "0.68374854", "0.68263865", "0.6752564", "0.66893804", "0.66801494", "0.6637662", "0.66233724", "0.65980446", "0.6564202", "0.6531757", "0.6470497", "0.64617467", "0.64402604", "0.6439877", "0.6423635", "0.64096516", "0.63776636", "0.6348375", "0.6348375", "0.63...
0.7039727
1
TEST 10 def find_pet_by_name(pet_shop, name) for pet in pet_shop[:pets][:name] if pet[:name] == pet end end end TEST 11
def find_pet_by_name(pet_shop, name) for pet in pet_shop[:pets] if pet[:name] == pet return pet else return nil end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_pet_by_name(pet_shop, name)\n\n for animal in pet_shop[:pets]\n if animal[:name] == name\n p animal[:name]\n end\n end\n\nend", "def find_pet_by_name(petshop, name)\n for pet in petshop[:pets]\n if pet[:name] == name\n return pet\n end\n end\n return nil\nend", "def find_pet_by_name(pe...
[ "0.88059485", "0.8606057", "0.8602099", "0.8535306", "0.8515936", "0.85022324", "0.85022324", "0.8499192", "0.84845614", "0.84814686", "0.84789526", "0.8467117", "0.8464132", "0.84406257", "0.8394387", "0.8394387", "0.83905596", "0.8369739", "0.8343592", "0.8276542", "0.82585...
0.8654238
1
def add_pet_to_stock(pet_shop, new_pet) pet_shop[:pets].push(new_pet) return pet_shop[:pets].length end TEST 14
def customer_cash(customers) return customers[:cash] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_pet_to_stock(pet_shop, new_pet)\n pet_shop[:pets].push(new_pet)\n return pet_shop[:pets].length\nend", "def add_pet_to_stock(pet_shop, new_pet)\n pet_shop[:pets] << new_pet\n return pet_shop[:pets].length\nend", "def add_pet_to_stock(pet_shop, new_pet)\n pet_shop[:pets].push(new_pet)\n return pet...
[ "0.97075677", "0.954703", "0.950876", "0.9213727", "0.91631866", "0.89058375", "0.8902048", "0.8902048", "0.8902048", "0.8902048", "0.8902048", "0.8872725", "0.8842011", "0.88145244", "0.8808257", "0.8762538", "0.8746223", "0.8736172", "0.8718541", "0.8698866", "0.8600709", ...
0.0
-1
TEST 18 + 19
def customer_can_afford_pet (customer,new_pet) if customer[:cash] < new_pet[:price] return false else return true end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_more_than_one_variable\n assert_equal(20,minus(80,40,20))\t\n end", "def test_suma_densa_dispersa\n\t\tassert_equal(@h11.m, @h9+@h10, \"Resultado Incorrecto\" )\n\tend", "def test_Arithmetic_Sample04\n assert_equal(16, 2**2**2)\n assert_equal(81, 3**2**2)\n end", "def test_Arithmeti...
[ "0.681025", "0.6796712", "0.67367524", "0.66501683", "0.6613934", "0.6564177", "0.6561815", "0.6559602", "0.65521353", "0.6497209", "0.6492355", "0.6486417", "0.64468974", "0.64279735", "0.6388257", "0.629753", "0.6297242", "0.62779844", "0.626066", "0.6233183", "0.6228316", ...
0.0
-1
TEST 20 + 21 + 22 Separate function to test pet_found def sell_pet_to_customer(pet_shop, pet, customer) if pet != nil customer[:pets].push(pet) customer[:cash] = pet[:price] end end
def sell_pet_to_customer(pet_shop, pet, customer) if pet != nil && customer[:cash] >= pet[:price] customer[:pets].push(pet) pet_shop[:admin][:pets_sold] += 1 customer[:cash] -= pet[:price] pet_shop[:admin][:total_cash] += pet[:price] end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sell_pet_to_customer(pet_shop, pet_to_sell, customer)\n for pet_for_sale in pet_shop[:pets]\n if pet_for_sale[:name] == pet_to_sell\n customer[:pets].push(pet_to_sell)\n pet_shop[:admin][:pets_sold] += 1\n customer[:cash] -= pet_to_sell[:price]\n pet_shop[:admin][:total_cash] += pet_to_...
[ "0.8806568", "0.8779154", "0.8756506", "0.8749477", "0.86631763", "0.86464643", "0.85444474", "0.84937924", "0.8488285", "0.846515", "0.8441397", "0.841041", "0.8334082", "0.832019", "0.8314675", "0.8309552", "0.82786274", "0.82739997", "0.82490176", "0.8226733", "0.82190216"...
0.9079861
0
The database column currently associated with the workflow state of the record.
def state_column(*) STATE_COLUMN end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column\n @__col\n end", "def current_state\r\n self.send(self.class.state_column).to_sym\r\n end", "def workflow_column(column_name=nil)\n if column_name\n @workflow_state_column_name = column_name.to_sym\n end\n if !instance_variable_defined?('@workflow_state_...
[ "0.7149928", "0.6795481", "0.67924726", "0.6712401", "0.66800946", "0.6637164", "0.65556484", "0.6546446", "0.6523203", "0.650182", "0.6484204", "0.6484204", "0.6484204", "0.6484204", "0.6484204", "0.6484204", "0.6484204", "0.6469913", "0.645769", "0.6449901", "0.6356101", ...
0.70549834
1
Workflow state table associated with item.
def state_table(item) get_state_table(item) || {} end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_table(item = nil)\n # noinspection RubyMismatchedArgumentType\n item and super or @state_table ||= super(self)\n end", "def get_state_table(item = nil, no_raise: true)\n # noinspection RubyMismatchedArgumentType\n super((item || self), no_raise: true)\n end", "def get_state_...
[ "0.72566855", "0.6944337", "0.6922224", "0.61415595", "0.60517937", "0.5857334", "0.57272863", "0.57119524", "0.56427777", "0.55435437", "0.5536909", "0.55335355", "0.54473823", "0.54401475", "0.5391161", "0.53709364", "0.52945805", "0.52945805", "0.5266865", "0.5239368", "0....
0.805551
0
Workflow state configuration for item.
def get_state_table(item, no_raise: true) return unless item cls = self_class(item) # noinspection RubyResolve if cls.respond_to?(:type_value) result = cls.safe_const_get(:STATE_TABLE, false) and return result base = cls.module_parent.type_value type = cls.type_value result =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state\n @state_wrapper ||= ActionItemInternal::ActionItemStateWrapper.new(@item)\n end", "def state_table(item)\n get_state_table(item) || {}\n end", "def workflow=(value)\n @workflow = value\n end", "def auto_configuration_state\n super\n end", "def get_in...
[ "0.65207094", "0.566642", "0.56072545", "0.54689527", "0.5460526", "0.54598176", "0.54586333", "0.54544795", "0.53795373", "0.53795373", "0.53636736", "0.5358964", "0.53571635", "0.5343122", "0.5338527", "0.5306532", "0.53007025", "0.52998567", "0.5295774", "0.52410537", "0.5...
0.0
-1
All valid workflow states for item.
def get_state_names(item) state_table(item).keys end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def invalid_items\n @items.select { |item| item.valid == false }\n end", "def valid_states\n aasm.states.map(&:name).map(&:to_s)\n end", "def valid_transitions\n aasm.states(permitted: true).map(&:name).map(&:to_s)\n end", "def workflow_states\n wfs = workflows\n states = {}\n ...
[ "0.6141648", "0.6134984", "0.59656274", "0.59468424", "0.5919478", "0.57298934", "0.56488574", "0.56011695", "0.559727", "0.5585419", "0.5528527", "0.5485174", "0.54816157", "0.5414669", "0.53806424", "0.5370992", "0.5335792", "0.5324601", "0.5308062", "0.5298973", "0.5295845...
0.5576766
10
Cast value in a form for comparison.
def state_value(item) return if item.blank? if item.is_a?(Symbol) || item.is_a?(String) item.to_sym elsif item.respond_to?(:state_value) item.state_value elsif item.is_a?(Model) raise "#{item.class} does not support #{__method__}" else raise "#{__method__}: #{item.class}: inv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast_value(value)\n value\n end", "def typecast(value)\n value\n end", "def cast(value)\n value\n end", "def typecast(value)\n value\n end", "def cast_value\n value.mongoize\n end", "def cast_value(value) # :api: public\n value\n ...
[ "0.68847615", "0.6874527", "0.6800382", "0.6736423", "0.6710302", "0.66907305", "0.66583097", "0.66142684", "0.65215325", "0.64331865", "0.642363", "0.6412898", "0.63393897", "0.6212634", "0.6134646", "0.61084527", "0.60957783", "0.60750777", "0.60196316", "0.59847975", "0.59...
0.0
-1
Get the configured descriptive note for the state.
def state_note(item) s = state_value(item) or return state_table.dig(s, :note) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_description(item)\n s = state_value(item) or return\n state_table.dig(s, :note) || s.to_s.humanize(capitalize: false)\n end", "def description\n @state.description\n end", "def descriptive_label\n @attributes[:descriptive_label]\n end", "def descr\n return text_get(2, id)\n ...
[ "0.7511865", "0.6885062", "0.65529835", "0.65402967", "0.6484408", "0.64793617", "0.63521206", "0.6338009", "0.62630063", "0.6247375", "0.62396055", "0.62070537", "0.62063044", "0.6152089", "0.61392266", "0.6138861", "0.6132021", "0.61288977", "0.61266863", "0.61227757", "0.6...
0.677024
2
Get a naturallanguage description for the state.
def state_description(item) s = state_value(item) or return state_table.dig(s, :note) || s.to_s.humanize(capitalize: false) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def description\n if I18n.locale == :en\n description_en\n else\n description_pl\n end\n end", "def description\n @state.description\n end", "def language\n fetch('nation.language')\n end", "def description\n description = I18n.t \"http.status.description.#{symbol}\"\n ...
[ "0.6879785", "0.6504072", "0.6433474", "0.64267313", "0.6356089", "0.6111757", "0.6070448", "0.60453224", "0.60356015", "0.60066426", "0.5980991", "0.5969348", "0.5923896", "0.5902064", "0.58824694", "0.5795557", "0.57804096", "0.57781106", "0.57710624", "0.575915", "0.572116...
0.62935734
5
Indicate whether this record represents an existing EMMA entry.
def existing_entry?(item) state_value(item) == :completed end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aleph_record?\n if @record.eds_accession_number.present? &&\n @record.eds_accession_number.start_with?('mit.')\n true\n else\n false\n end\n end", "def has_journal_entry?\n false\n end", "def exists?\n\t\treturn self.entry ? true : false\n\tend", "def new_entry?\n ...
[ "0.65514344", "0.6454729", "0.639196", "0.63529515", "0.63529515", "0.6204495", "0.6172886", "0.6155449", "0.61307704", "0.61034775", "0.6094656", "0.6094656", "0.60936826", "0.607426", "0.60521454", "0.6048429", "0.60365313", "0.6028346", "0.60250586", "0.6018788", "0.601575...
0.55909693
95
Indicate whether this record represents an existing EMMA entry.
def new_submission?(item) !existing_entry?(item) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aleph_record?\n if @record.eds_accession_number.present? &&\n @record.eds_accession_number.start_with?('mit.')\n true\n else\n false\n end\n end", "def has_journal_entry?\n false\n end", "def exists?\n\t\treturn self.entry ? true : false\n\tend", "def new_entry?\n ...
[ "0.65514344", "0.6454729", "0.639196", "0.63529515", "0.63529515", "0.6204495", "0.6172886", "0.6155449", "0.61307704", "0.61034775", "0.6094656", "0.6094656", "0.60936826", "0.607426", "0.60521454", "0.6048429", "0.60365313", "0.6028346", "0.60250586", "0.6018788", "0.601575...
0.5653027
71
Return the group of the given state.
def state_group(item) if item.is_a?(String) || item.is_a?(Symbol) state = item.to_sym else state = state_value(item) end REVERSE_STATE_GROUP[state] || :all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_group\n state = @current_policy ? @current_policy.tax_state_abbr : @company_info.hq_state\n case state\n when nil\n 'All'\n when 'CA'\n 'California'\n else\n 'non_California'\n end\n end", "def group\n Group.get!(gidnumber)\n end", "def get_group(string); end", ...
[ "0.7216023", "0.6512028", "0.6304797", "0.6282017", "0.62015545", "0.62015545", "0.6185004", "0.6154512", "0.6152262", "0.61457044", "0.6134211", "0.6096762", "0.6081948", "0.6050869", "0.6026645", "0.6007337", "0.5998698", "0.5963262", "0.5950182", "0.59471065", "0.59374523"...
0.7225394
0
Return the label for the given state group.
def state_group_label(group) if group.is_a?(String) || group.is_a?(Symbol) group = group.to_sym else group = state_group(group) group = nil if group == :all end # noinspection RubyMismatchedArgumentType STATE_GROUP.dig(group, :label) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_group_label(group = nil)\n # noinspection RubyMismatchedArgumentType\n super(item || self)\n end", "def rs_group_label\n CFR_RS_GROUP_LABELS[ rs_group ] unless rs_group.nil?\n end", "def label(name)\n @labels[name.to_sym]\n end", "def for_state(state)\n labels_by_s...
[ "0.75513226", "0.6852692", "0.6509095", "0.64945114", "0.64466846", "0.64449245", "0.64055294", "0.62292945", "0.6208334", "0.62017983", "0.61849123", "0.61825943", "0.6134083", "0.6132075", "0.60916555", "0.60817814", "0.6066484", "0.6042803", "0.6034975", "0.60263544", "0.6...
0.8921582
0
Indicate whether this record is involved in a workflow step related to the creation of a new EMMA entry.
def being_created?(item) state_group(item) == :create end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_entry?\n @new_entry\n end", "def new_entry?\n @new_entry\n end", "def create?\n @record.present?\n end", "def new_record?\n !defined?(@new_record) || @new_record\n end", "def creation?\n self.diff['attributes']['new'] && !self.diff['attributes']['old']\n end"...
[ "0.68351555", "0.68351555", "0.6587486", "0.6556154", "0.6513816", "0.6494658", "0.6478006", "0.64692086", "0.64692086", "0.6448931", "0.64407223", "0.64253044", "0.64253044", "0.64253044", "0.6424804", "0.6424804", "0.6424804", "0.6361325", "0.6336971", "0.6335976", "0.63315...
0.6591984
2
Indicate whether this record is involved in a workflow step related to the modification of an existing EMMA entry.
def being_modified?(item) state_group(item) == :edit end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modified_existing?\n false\n end", "def modified?\n @modified\n end", "def modified?\n @modified\n end", "def modified?\r\n @modified\r\n end", "def modified?\n\t\treturn self.status == 'M'\n\tend", "def modified?\n @modified\n end", "def updatable?\n sir_item...
[ "0.63801175", "0.62890947", "0.62890947", "0.6285755", "0.62586707", "0.6253707", "0.6185879", "0.61426455", "0.61093044", "0.6088463", "0.60727996", "0.60530317", "0.59840375", "0.5983794", "0.5982673", "0.5981272", "0.5907264", "0.5899095", "0.5898805", "0.58639055", "0.584...
0.6467933
0
Indicate whether this record is involved in a workflow step related to the removal of an existing EMMA entry.
def being_removed?(item) state_group(item) == :remove end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removed?\n @removed\n end", "def is_removed?\n self.has_current_status_of?(ArticleSubmission::ADMIN_REMOVED) || self.has_current_status_of?(ArticleSubmission::REMOVED)\n end", "def removed?\n\t\treturn self.status == 'R'\n\tend", "def removed?\n status == STATUS_REMOVED\n end", "def...
[ "0.6554017", "0.6508374", "0.6309244", "0.62672514", "0.6184464", "0.6100889", "0.6047333", "0.6047333", "0.6047333", "0.6047333", "0.6047333", "0.6038436", "0.6035338", "0.5973955", "0.58906734", "0.58713627", "0.584748", "0.58025783", "0.5740518", "0.57119125", "0.56941366"...
0.6688749
0
Indicate whether this record is involved in a workflow step related to the review process.
def under_review?(item) state_group(item) == :review end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reviewed?\n !application_review_decision_type.nil?\n end", "def reviewed?\n @status == :reviewed\n end", "def post_review?(next_review, user)\n\n (next_review && \n !self.review_locked? && \n next_review.designer_id == user.id &&\n next_review...
[ "0.6762247", "0.6590726", "0.64135027", "0.63889545", "0.6368471", "0.6321507", "0.6313783", "0.6313783", "0.6302272", "0.62701935", "0.62454826", "0.6234905", "0.6226862", "0.62003815", "0.60669976", "0.60239613", "0.6011491", "0.60034853", "0.5973989", "0.597041", "0.594744...
0.6111312
14
Indicate whether this record is involved in a workflow step related to transmission to a member repository.
def being_submitted?(item) state_group(item) == :submission end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_be_performed?\n self.research_billing_qty > 0\n end", "def member?\n client.organization_member? org_id, github_user.login\n end", "def push_to_epic_in_progress?\n %w(started sent_study).include? last_epic_push_status\n end", "def payment_in_progress?\n\t\t\t\t\treturn !self.payment_id...
[ "0.6027566", "0.58782387", "0.58333", "0.5797447", "0.57963896", "0.5777454", "0.5744928", "0.5727815", "0.57164115", "0.5715447", "0.5643354", "0.56084245", "0.55915034", "0.5579522", "0.55778456", "0.55727524", "0.5565814", "0.55517507", "0.5551519", "0.5547116", "0.5544697...
0.540941
47
Indicate whether this record is involved in a workflow step related to ingest into the EMMA Unified Index.
def being_indexed?(item) state_group(item) == :finalization end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def embedded_workflow(field)\n field == AUTOMATION_TYPES[:workflow][:key]\n end", "def supports_step?(step)\n if Maadi::Procedure::Step.is_step?( step )\n return %w(ENQUEUE DEQUEUE SIZE ATINDEX NULCONSTRUCT NONNULCONSTRUCT DETAILS PEEK FRONT BACK).include?( step.id )\n end\n\n ...
[ "0.5827662", "0.5817973", "0.5790007", "0.57878095", "0.57665795", "0.57605106", "0.5713166", "0.5656291", "0.5633928", "0.5631065", "0.5538834", "0.5534686", "0.55329186", "0.54965264", "0.54762733", "0.54530025", "0.5410095", "0.5398691", "0.5372843", "0.53723836", "0.53204...
0.4930109
90
Indicate whether this record is involved in a workflow step related to ingest into the EMMA Unified Index.
def completed?(item) state_group(item) == :done end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def embedded_workflow(field)\n field == AUTOMATION_TYPES[:workflow][:key]\n end", "def supports_step?(step)\n if Maadi::Procedure::Step.is_step?( step )\n return %w(ENQUEUE DEQUEUE SIZE ATINDEX NULCONSTRUCT NONNULCONSTRUCT DETAILS PEEK FRONT BACK).include?( step.id )\n end\n\n ...
[ "0.5827662", "0.5817973", "0.5790007", "0.57878095", "0.57665795", "0.57605106", "0.5713166", "0.5656291", "0.5633928", "0.5631065", "0.5538834", "0.5534686", "0.55329186", "0.54965264", "0.54762733", "0.54530025", "0.5410095", "0.5398691", "0.5372843", "0.53723836", "0.53204...
0.0
-1
Indicate whether this record is involved in a workflow step which leads to a change in the associated EMMA Unified Index entry.
def in_process?(item) item = state_group(item) being_submitted?(item) || being_indexed?(item) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def changed?\n self.event_state.include? :changed\n end", "def change_detail_set?\n self.change_detail\n end", "def changed_to_manual_check?\n @participant_eligibility.manual_check_status? && ((@previous_status != \"manual_check\") || @new_eligibility_record)\n end", "def changed?\n !!@pre...
[ "0.59176934", "0.5866156", "0.58640486", "0.5836151", "0.58339983", "0.5793492", "0.574945", "0.5738926", "0.57361233", "0.5707566", "0.5682435", "0.5671679", "0.56679255", "0.5661688", "0.56143546", "0.5610845", "0.559452", "0.55862445", "0.5585325", "0.5585325", "0.5582414"...
0.5293482
63
Indicate whether this record is involved in a workflow step where nonadministrative data (EMMA or file data) could be changed.
def unsealed?(item) item = state_group(item) being_created?(item) || being_modified?(item) || being_removed?(item) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def info_only\n if @type == RECORD\n @changed_records.all? { |r| r.type == RecordChange::IGNORED }\n else\n false\n end\n end", "def can_modify\n\t\tself.changed_attributes.each do |attr|\n\n\t\t\tif attr.to_s == \"reports\"\n\t\t\t\tself.reports.each do |r|\n\t\t\t\t\...
[ "0.63826257", "0.62760425", "0.6120452", "0.610041", "0.60751814", "0.60607356", "0.6032217", "0.59906614", "0.59687763", "0.5903975", "0.5903748", "0.5863721", "0.5840059", "0.58288825", "0.58148956", "0.5777486", "0.5774187", "0.57669497", "0.57633096", "0.5757376", "0.5750...
0.0
-1
Indicate whether this record is not involved in a workflow step where nonadministrative data (EMMA or file data) could be changed.
def sealed?(item) !unsealed?(item) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ignored_attr_has_changed?\n ignored = @record.paper_trail_options[:ignore] + @record.paper_trail_options[:skip]\n ignored.any? && (changed_in_latest_version & ignored).any?\n end", "def info_only\n if @type == RECORD\n @changed_records.all? { |r| r.type == RecordChange::IGNORED }...
[ "0.6422241", "0.6363997", "0.63413584", "0.62300736", "0.620602", "0.61294127", "0.6115366", "0.60808975", "0.607619", "0.6012801", "0.6004908", "0.59706277", "0.5968132", "0.5950869", "0.59243196", "0.59136593", "0.58565676", "0.58427805", "0.5838467", "0.58299285", "0.58186...
0.0
-1
All valid workflow states.
def get_state_names(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_states\n aasm.states.map(&:name).map(&:to_s)\n end", "def validate_states!\n self.class.state_managers.each do |name, klass|\n # Simply ensuring that all of the state managers have been\n # instantiated will make the corresponding states valid\n unless state_manage...
[ "0.6901441", "0.67670196", "0.6531472", "0.6388236", "0.63403755", "0.6328539", "0.6230122", "0.6220958", "0.61787593", "0.61311114", "0.60562634", "0.60562634", "0.60562634", "0.6046831", "0.602654", "0.5992733", "0.5984918", "0.5984918", "0.59028506", "0.5884896", "0.587203...
0.0
-1
Return the class from app/jobs associated with the record class.
def job_class(item = nil) item and super or @job_class ||= super(self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job_class\n return if job_class_name.nil?\n job_class_name.constantize\n rescue NameError\n nil\n end", "def job_class\n discrete? ? attributes['job_class'] : serialized_params['job_class']\n end", "def application_job_class\n @application_job_class ||= self.class.ancest...
[ "0.80346054", "0.75374675", "0.7487816", "0.7334007", "0.7330949", "0.7058623", "0.69141716", "0.6890386", "0.68632156", "0.68429816", "0.68344337", "0.68340504", "0.6821356", "0.66699386", "0.6555719", "0.6555719", "0.6555719", "0.65535855", "0.6543842", "0.6430811", "0.6399...
0.69347084
6
Called from the including class to generate query and actionmethods associated with the column.
def generate_state_methods(states = nil) states ||= get_state_names enum_methods(state_column => states) if states.present? end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def define_accessors\n columns.each do |column|\n underscored_column_name = column.name.underscore\n unless respond_to?(underscored_column_name)\n self.class.send :define_method, underscored_column_name do\n @attributes[column.name.underscore]\n end\n end\n ...
[ "0.6144402", "0.6140214", "0.60466903", "0.591389", "0.59062284", "0.5750615", "0.57120615", "0.57120615", "0.56924325", "0.5660788", "0.5660788", "0.56392837", "0.557366", "0.55735284", "0.55735284", "0.55686426", "0.55686426", "0.55686426", "0.55686426", "0.55686426", "0.55...
0.0
-1
Validate state table definitions and interconnections.
def validate_state_table(table = nil) table ||= get_state_table(no_raise: false) meths = self.is_a?(Module) ? instance_methods : self.class.methods states = table.keys errors = [] table.each_pair do |state, config| # === Check optional note if config.key?(:note) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_state(state = {}); end", "def validate_state(state = {}); end", "def validate_states!\n self.class.state_managers.each do |name, klass|\n # Simply ensuring that all of the state managers have been\n # instantiated will make the corresponding states valid\n unless ...
[ "0.65893877", "0.65893877", "0.650343", "0.5893788", "0.58901477", "0.5870494", "0.5847518", "0.58234483", "0.57826364", "0.5704892", "0.56940895", "0.5669245", "0.56664556", "0.5654827", "0.5654827", "0.5654827", "0.56372523", "0.56303984", "0.5625179", "0.56055015", "0.5600...
0.75335974
0
Create an ActiveJob serializer for the given Record class if it does not already exist.
def generate_job_serializer(base) unless model_class?(base) return Log.debug { "#{__method__}: ignoring #{base.class} argument" } end base_name = base.name serializer = "#{base_name}::Serializer" return if safe_const_get(serializer) base.module_eval <<~HERE_DOC cla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_default_serializer_class(model, serializer_class_name)\n platform_name = totem_settings.engine.current_platform_name(model)\n error(\"Platform name for model #{model.inspect} is blank.\") if platform_name.blank?\n extend_class = totem_settings.class[platform_name.to_sym].get_...
[ "0.5615765", "0.5488376", "0.5452718", "0.5451679", "0.53860617", "0.5371756", "0.535112", "0.5318897", "0.5288268", "0.528574", "0.528574", "0.5263663", "0.5251525", "0.5237327", "0.52207386", "0.51871383", "0.5180367", "0.51790565", "0.5176897", "0.51159745", "0.5108278", ...
0.6556597
0
Workflow state table associated with the current record.
def state_table(item = nil) # noinspection RubyMismatchedArgumentType item and super or @state_table ||= super(self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_table(item)\n get_state_table(item) || {}\n end", "def current_state\r\n self.send(self.class.state_column).to_sym\r\n end", "def current_state\n current = StateTransition.where(record_id: id, record_type: self.class.to_s, current: true).order(id: :desc).limit(1).first\n ...
[ "0.68526053", "0.63610184", "0.62885344", "0.61620003", "0.6106425", "0.6106425", "0.6077372", "0.6004011", "0.5959266", "0.5934378", "0.5922587", "0.5921426", "0.5909896", "0.58613497", "0.5795811", "0.57909614", "0.5779374", "0.57670486", "0.5751037", "0.5745303", "0.568697...
0.62747955
3
Workflow state configuration associated with the current record.
def get_state_table(item = nil, no_raise: true) # noinspection RubyMismatchedArgumentType super((item || self), no_raise: true) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_initial_state\n write_attribute self.class.workflow_column, current_state.value\n end", "def write_initial_state\n write_attribute self.class.workflow_column, current_state.to_s\n end", "def write_initial_state\n write_attribute self.class.workflow_column, current_state.t...
[ "0.63247526", "0.62703115", "0.62703115", "0.6262409", "0.61582094", "0.5964413", "0.58696604", "0.58408546", "0.58078545", "0.57820255", "0.577486", "0.5766574", "0.57306266", "0.5730375", "0.57227534", "0.5716857", "0.5683663", "0.5679882", "0.5605529", "0.55529296", "0.552...
0.0
-1
All valid workflow states for the current record.
def get_state_names(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valid_states\n aasm.states.map(&:name).map(&:to_s)\n end", "def workflow_states\n wfs = workflows\n states = {}\n wfs.each { |wf| states[wf.id] = workflow_state(workflow_id: wf.id) }\n states\n end", "def valid_transitions\n aasm.states(permitted: true).map(&:name).map(&:to_s)...
[ "0.64677054", "0.646153", "0.6289514", "0.6082961", "0.6045801", "0.6010778", "0.6007096", "0.5941938", "0.5939616", "0.5817206", "0.5765352", "0.5705551", "0.5705551", "0.5671426", "0.5649824", "0.5623422", "0.5623422", "0.55877924", "0.55734634", "0.5559144", "0.5550344", ...
0.0
-1
Cast value in a form for comparison.
def state_value(item = nil) super(item || self[state_column]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast_value(value)\n value\n end", "def typecast(value)\n value\n end", "def cast(value)\n value\n end", "def typecast(value)\n value\n end", "def cast_value\n value.mongoize\n end", "def cast_value(value) # :api: public\n value\n ...
[ "0.68847615", "0.6874527", "0.6800382", "0.6736423", "0.6710302", "0.66907305", "0.66583097", "0.66142684", "0.65215325", "0.64331865", "0.642363", "0.6412898", "0.63393897", "0.6212634", "0.6134646", "0.61084527", "0.60957783", "0.60750777", "0.60196316", "0.59847975", "0.59...
0.0
-1
Get the configured descriptive note for the current state.
def state_note(item = nil) super(item || self[state_column]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_description(item)\n s = state_value(item) or return\n state_table.dig(s, :note) || s.to_s.humanize(capitalize: false)\n end", "def state_note(item)\n s = state_value(item) or return\n state_table.dig(s, :note)\n end", "def note\n @attributes[:note]\n end", "def descr\n re...
[ "0.72144985", "0.66520303", "0.6614169", "0.65135306", "0.648489", "0.6469947", "0.64338905", "0.64136106", "0.6323893", "0.63195467", "0.62727773", "0.6242456", "0.6210252", "0.6197837", "0.6194117", "0.6150257", "0.61491334", "0.61474836", "0.6145497", "0.6123661", "0.61085...
0.0
-1
Get a naturallanguage description for the current state.
def state_description(item = nil) super(item || self[state_column]) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def description\n if I18n.locale == :en\n description_en\n else\n description_pl\n end\n end", "def language\n fetch('nation.language')\n end", "def description\n description = I18n.t \"http.status.description.#{symbol}\"\n description = nil if description =~ /translation ...
[ "0.715045", "0.6683071", "0.64865243", "0.64712095", "0.6440822", "0.63592094", "0.63215894", "0.6314432", "0.6288599", "0.62333643", "0.6224196", "0.6125979", "0.60848945", "0.60549", "0.6027713", "0.60129106", "0.5993067", "0.59879434", "0.5948312", "0.59300965", "0.5930096...
0.0
-1
Indicate whether this record represents an existing EMMA entry.
def existing_entry?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aleph_record?\n if @record.eds_accession_number.present? &&\n @record.eds_accession_number.start_with?('mit.')\n true\n else\n false\n end\n end", "def has_journal_entry?\n false\n end", "def exists?\n\t\treturn self.entry ? true : false\n\tend", "def new_entry?\n ...
[ "0.65514344", "0.6454729", "0.639196", "0.63529515", "0.63529515", "0.6204495", "0.6172886", "0.6155449", "0.61307704", "0.61034775", "0.6094656", "0.6094656", "0.60936826", "0.607426", "0.60521454", "0.6048429", "0.60365313", "0.6028346", "0.60250586", "0.6018788", "0.601575...
0.5575959
99
Indicate whether this record represents an existing EMMA entry.
def new_submission?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aleph_record?\n if @record.eds_accession_number.present? &&\n @record.eds_accession_number.start_with?('mit.')\n true\n else\n false\n end\n end", "def has_journal_entry?\n false\n end", "def exists?\n\t\treturn self.entry ? true : false\n\tend", "def new_entry?\n ...
[ "0.65514344", "0.6454729", "0.639196", "0.63529515", "0.63529515", "0.6204495", "0.6172886", "0.6155449", "0.61307704", "0.61034775", "0.6094656", "0.6094656", "0.60936826", "0.607426", "0.60521454", "0.6048429", "0.60365313", "0.6028346", "0.60250586", "0.6018788", "0.601575...
0.0
-1
Return the state group of the record.
def state_group(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_group(item)\n if item.is_a?(String) || item.is_a?(Symbol)\n state = item.to_sym\n else\n state = state_value(item)\n end\n REVERSE_STATE_GROUP[state] || :all\n end", "def state_group\n state = @current_policy ? @current_policy.tax_state_abbr : @company_info.hq_state\n case ...
[ "0.7063217", "0.6945465", "0.65063334", "0.6489524", "0.6489524", "0.6456077", "0.6316175", "0.6308317", "0.6276624", "0.6216187", "0.6176599", "0.6171008", "0.6070745", "0.6070423", "0.6062533", "0.60243917", "0.5996508", "0.59709203", "0.5961805", "0.5961805", "0.59457624",...
0.56553036
50
Return the label for the state group of the record.
def state_group_label(group = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_group_label(group)\n if group.is_a?(String) || group.is_a?(Symbol)\n group = group.to_sym\n else\n group = state_group(group)\n group = nil if group == :all\n end\n # noinspection RubyMismatchedArgumentType\n STATE_GROUP.dig(group, :label)\n end", "def rs_group_label\n ...
[ "0.8342255", "0.7206813", "0.6937016", "0.6923813", "0.6815399", "0.68136483", "0.66775364", "0.6677374", "0.65657973", "0.6552155", "0.6530933", "0.6527227", "0.65267074", "0.65087473", "0.65026265", "0.6500455", "0.6500258", "0.64574504", "0.64574504", "0.64574504", "0.6457...
0.7569994
1
Indicate whether this record is involved in a workflow step related to the creation of a new EMMA entry.
def being_created?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new_entry?\n @new_entry\n end", "def new_entry?\n @new_entry\n end", "def being_created?(item)\n state_group(item) == :create\n end", "def create?\n @record.present?\n end", "def new_record?\n !defined?(@new_record) || @new_record\n end", "def creation?\n se...
[ "0.68357825", "0.68357825", "0.6593113", "0.6588649", "0.6556904", "0.6515625", "0.64958566", "0.64786583", "0.6470339", "0.6470339", "0.64497894", "0.6441574", "0.64263356", "0.64263356", "0.64263356", "0.6425846", "0.6425846", "0.6425846", "0.6362403", "0.63379675", "0.6336...
0.0
-1
Indicate whether this record is involved in a workflow step related to the modification of an existing EMMA entry.
def being_modified?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def being_modified?(item)\n state_group(item) == :edit\n end", "def modified_existing?\n false\n end", "def modified?\n @modified\n end", "def modified?\n @modified\n end", "def modified?\r\n @modified\r\n end", "def modified?\n\t\treturn self.status == 'M'\n\tend", ...
[ "0.6467933", "0.63801175", "0.62890947", "0.62890947", "0.6285755", "0.62586707", "0.6253707", "0.6185879", "0.61426455", "0.61093044", "0.6088463", "0.60727996", "0.60530317", "0.59840375", "0.5983794", "0.5982673", "0.5981272", "0.5907264", "0.5899095", "0.5898805", "0.5863...
0.5722657
41
Indicate whether this record is involved in a workflow step related to the removal of an existing EMMA entry.
def being_removed?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def being_removed?(item)\n state_group(item) == :remove\n end", "def removed?\n @removed\n end", "def is_removed?\n self.has_current_status_of?(ArticleSubmission::ADMIN_REMOVED) || self.has_current_status_of?(ArticleSubmission::REMOVED)\n end", "def removed?\n\t\treturn self.status == 'R'\n\t...
[ "0.66873515", "0.6552896", "0.6507738", "0.6307463", "0.6265877", "0.6182946", "0.6100359", "0.60459846", "0.60459846", "0.60459846", "0.60459846", "0.60459846", "0.6037551", "0.6035841", "0.59740525", "0.5888923", "0.5869745", "0.58460766", "0.5802048", "0.57397926", "0.5710...
0.5590077
26
Indicate whether this record is involved in a workflow step related to the review process.
def under_review?(item = nil) # noinspection RubyMismatchedArgumentType super(item || self) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reviewed?\n !application_review_decision_type.nil?\n end", "def reviewed?\n @status == :reviewed\n end", "def post_review?(next_review, user)\n\n (next_review && \n !self.review_locked? && \n next_review.designer_id == user.id &&\n next_review...
[ "0.67600167", "0.6588897", "0.6411776", "0.63871074", "0.63670063", "0.63200784", "0.63126856", "0.63126856", "0.630083", "0.62688524", "0.6243572", "0.62337124", "0.6225752", "0.6199368", "0.6109509", "0.60659987", "0.6022826", "0.601143", "0.60020727", "0.5973306", "0.59688...
0.56491756
46