query
stringlengths
7
6.41k
document
stringlengths
12
28.8k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Return the number of atoms in a sequence. If type is given, return the number of specific atoms in a sequence.
def total_atoms(type=nil) if !type.nil? type = type.to_sym if /^(?:C|H|O|N|S){1}$/ !~ type.to_s raise ArgumentError, "type must be C/H/O/N/S/nil(all)" end end num_atom = {:C => 0, :H => 0, :O => 0, :N => 0, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quantity(type=NonEmpty)\n grep(type).inject(0){ |sum, spot| sum + spot.item.count }\n end", "def countAtoms(seq)\n\t\t\t\to = 0\n\t\t\t\tn = 0\n\t\t\t\tc = 0\n\t\t\t\th = 0\n\t\t\t\ts = 0\n\t\t\t\tp = 0\n\t\t\t\tse = 0\n\t\t\t\tseq.each_char do |aa|\n\t\t\t\t\to = o + MS::Feature::AA::ATOM_COUNTS[aa]...
[ "0.63567305", "0.63145524", "0.61980516", "0.60390794", "0.59796715", "0.5946256", "0.5850562", "0.5831301", "0.58186245", "0.5765675", "0.5749233", "0.56758785", "0.56386787", "0.56018287", "0.5587829", "0.55661076", "0.5442579", "0.5369471", "0.53659385", "0.53339356", "0.5...
0.68754864
0
Return the number of nitrogens.
def num_nitro @num_nitro ||= total_atoms :N end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def number_of_concept_genres(login=nil)\n count_by_frbr(login, :has_as_its_genre, :how_many_concepts?) \n end", "def number_of_concept_genres(login=nil)\n count_by_frbr(login, :has_as_its_genre, :how_many_concepts?) \n end", "def count\n count = 0\n\n each do |node|\n ...
[ "0.68646866", "0.68646866", "0.6578251", "0.6530618", "0.64941645", "0.6474515", "0.6474515", "0.64725417", "0.6360934", "0.63361204", "0.63211834", "0.63211834", "0.63051116", "0.62940323", "0.6272964", "0.62563336", "0.6251159", "0.6243836", "0.6237959", "0.62242717", "0.62...
0.7361511
0
Return the number of oxygens.
def num_oxygen @num_oxygen ||= total_atoms :O end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size\n @gens.size\n end", "def size\n @gens.size\n end", "def lots_count\t\t\n lots.count\n end", "def length\n @gens.length\n end", "def length\n @gens.length\n end", "def nb_opinions() opinion_ids.size end", "def count\n @ole.Count\n end", "def c...
[ "0.6822128", "0.6822128", "0.6805353", "0.6792886", "0.6792886", "0.671845", "0.66310984", "0.66310984", "0.66310984", "0.66310984", "0.66310984", "0.66310984", "0.66310984", "0.66310984", "0.6570404", "0.6523384", "0.65066195", "0.6486188", "0.6468808", "0.6466652", "0.64594...
0.6822373
0
Return the number of sulphurs.
def num_sulphur @num_sulphur ||= total_atoms :S end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_susus_global\n susus = Susu.all.count\n end", "def how_many\n return @@total_samurais\n end", "def spicy_count\n self.spicies.size\n end", "def dinosaurii_count\n @@count += 1\n end", "def num_shelf\n\t\tputs \"Library has #{@shelves.length} shelves\"\n\tend", "def...
[ "0.6834224", "0.6822347", "0.679203", "0.6628784", "0.6579925", "0.6576353", "0.65345216", "0.6468602", "0.6458979", "0.6440525", "0.63977396", "0.6358515", "0.63417405", "0.63160545", "0.6304613", "0.6304613", "0.6304613", "0.6280699", "0.6275606", "0.62723404", "0.6271254",...
0.81454146
0
Calculate molecular weight of an AA sequence. _Protein Mw is calculated by the addition of average isotopic masses of amino acids in the protein and the average isotopic mass of one water molecule._
def molecular_weight @mw ||= begin mass = WATER_MASS each_aa do |aa| mass += AVERAGE_MASS[aa.to_sym] end (mass * 10).floor().to_f / 10 end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def molecular_weight\n Bio::AminoAcid.weight(self)\n end", "def weight\n @mass * @hopper.size\n end", "def calculateWeight word\n letters = word.split\n weight = 0\n hash_alphabet = generateHashWithLetterAndWeight()\n letters.each do |letter|\n (/[[:upper:]]/.match(letter)) ? weight...
[ "0.7229752", "0.60174626", "0.59964734", "0.5925158", "0.5860306", "0.57346463", "0.5703239", "0.5697059", "0.56761897", "0.5663131", "0.5591569", "0.55661243", "0.5384147", "0.53690857", "0.5359473", "0.5354546", "0.53224325", "0.53134286", "0.52998465", "0.5292222", "0.5282...
0.71202606
1
Claculate theoretical pI for an AA sequence with bisect algorithm. pK value by Bjelqist, et al. is used to calculate pI.
def theoretical_pI charges = [] residue_count().each do |residue| charges << charge_proc(residue[:positive], residue[:pK], residue[:num]) end round(solve_pI(charges), 2) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def p(i, j, k)\n n = neighbours(i, k)\n if n.include?(j) then\n this_move_value = 0.0\n other_possible_moves_summed_value = 0.0\n @state.transaction do\n this_move_value = @state[:trails][[i, j]]\n other_possible_moves_summed_value = n.in...
[ "0.5462763", "0.5442878", "0.5347153", "0.5302049", "0.5289266", "0.51673424", "0.51580364", "0.514113", "0.5125691", "0.5110864", "0.51021624", "0.5093386", "0.50421435", "0.49688026", "0.4938162", "0.49120304", "0.4909912", "0.4881527", "0.48788646", "0.48482218", "0.484738...
0.5590275
0
Return estimated half_life of an AA sequence. _The halflife is a prediction of the time it takes for half of the amount of protein in a cell to disappear after its synthesis in the cell. ProtParam relies on the "Nend rule", which relates the halflife of a protein to the identity of its Nterminal residue; the prediction...
def half_life(species=nil) n_end = @seq[0].chr.to_sym if species HALFLIFE[species][n_end] else { :ecoli => HALFLIFE[:ecoli][n_end], :mammalian => HALFLIFE[:mammalian][n_end], :yeast => HALFLIFE[:yeast][n_end] } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_expected_dominant_offspring(xAA_AA, xAA_Aa, xAA_aa, xAa_Aa, xAa_aa, xaa_aa, offspring_each = 2)\r\n xAA_AA_prob = offspring_each.to_f * xAA_AA * 1 \r\n xAA_Aa_prob = offspring_each.to_f * xAA_Aa * 1 \r\n xAA_aa_prob = offspring_each.to_f * xAA_aa * 1 \r\n xAa_Aa_prob = offspring_each.to_f...
[ "0.5435176", "0.5106106", "0.51055604", "0.5099969", "0.5079222", "0.49448442", "0.49448442", "0.49408907", "0.49173385", "0.49081874", "0.48839054", "0.4853226", "0.4842884", "0.48420635", "0.48389047", "0.48318678", "0.4829914", "0.4829279", "0.48252252", "0.48178998", "0.4...
0.6273526
0
Calculate instability index of an AA sequence. _The instability index provides an estimate of the stability of your protein in a test tube. Statistical analysis of 12 unstable and 32 stable proteins has revealed [7] that there are certain dipeptides, the occurence of which is significantly different in the unstable pro...
def instability_index @instability_index ||= begin instability_sum = 0.0 i = 0 while @seq[i+1] != nil aa, next_aa = [@seq[i].chr.to_sym, @seq[i+1].chr.to_sym] if DIWV.key?(aa) && DIWV[aa].key?(next_aa) instability_sum += DIWV[aa][next_aa]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aliphatic_index\n aa_map = aa_comp_map\n @aliphatic_index ||= round(aa_map[:A] +\n 2.9 * aa_map[:V] +\n (3.9 * (aa_map[:I] + aa_map[:L])), 2)\n end", "def ig_ind\n\t\taibc(@datos[0]).each_with_index.map{ |ind, i| (ind/aib...
[ "0.64629894", "0.61294776", "0.5818332", "0.5763177", "0.56234854", "0.5593739", "0.5575883", "0.5564423", "0.5524716", "0.53492093", "0.5343286", "0.5320034", "0.52854216", "0.5278959", "0.5276254", "0.5217866", "0.52151525", "0.5093001", "0.508744", "0.50860256", "0.5084812...
0.8551031
0
Return wheter the sequence is stable or not as String (stable/unstable). _Protein whose instability index is smaller than 40 is predicted as stable, a value above 40 predicts that the protein may be unstable._
def stability (instability_index <= 40) ? "stable" : "unstable" end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stable?\n (instability_index <= 40) ? true : false\n end", "def complete?\n return nil unless ivsat_table\n line = ivsat_table.split(\"\\n\").find{|l| l.include? 'INFO: Sequence completeness:' }\n line && !line.include?('partial')\n end", "def assess_insurance()\n\t\tvalues = self.comb_va...
[ "0.59346", "0.55109864", "0.5359347", "0.5294463", "0.5180834", "0.51680654", "0.5112167", "0.51115215", "0.51037943", "0.50916517", "0.50392485", "0.4972031", "0.49627674", "0.49081233", "0.4901036", "0.48808068", "0.4855916", "0.4855916", "0.4855916", "0.48397312", "0.48253...
0.6345953
0
Return true if the sequence is stable.
def stable? (instability_index <= 40) ? true : false end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stable\n self[:draft] == false && self[:prerelease] == false\n end", "def sequential\n return true if hand_to_val.last - hand_to_val.first == 4\n return false \n end", "def consistent?\n return @grammar.consistent?\n end", "def empty_sequence?\n false\n end", ...
[ "0.6626637", "0.6512906", "0.6167755", "0.6158894", "0.61111784", "0.6092307", "0.60544586", "0.60181403", "0.60051495", "0.60025716", "0.59646", "0.59554505", "0.58984464", "0.5885162", "0.5823181", "0.58019644", "0.5774902", "0.5761803", "0.57541203", "0.57541203", "0.57134...
0.6803989
0
Calculate aliphatic index of an AA sequence. _The aliphatic index of a protein is defined as the relative volume occupied by aliphatic side chains (alanine, valine, isoleucine, and leucine). It may be regarded as a positive factor for the increase of thermostability of globular proteins._
def aliphatic_index aa_map = aa_comp_map @aliphatic_index ||= round(aa_map[:A] + 2.9 * aa_map[:V] + (3.9 * (aa_map[:I] + aa_map[:L])), 2) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instability_index\n @instability_index ||=\n begin\n instability_sum = 0.0\n i = 0\n while @seq[i+1] != nil\n aa, next_aa = [@seq[i].chr.to_sym, @seq[i+1].chr.to_sym]\n if DIWV.key?(aa) && DIWV[aa].key?(next_aa)\n instability_sum += DIWV...
[ "0.6621182", "0.6333505", "0.6068041", "0.6020737", "0.59023076", "0.58319247", "0.56881386", "0.5607501", "0.55861014", "0.5583739", "0.5526599", "0.55243194", "0.5512173", "0.5501506", "0.5465918", "0.5452043", "0.5447528", "0.5445903", "0.5329291", "0.53167236", "0.5311475...
0.77311355
0
Calculate GRAVY score of an AA sequence. _The GRAVY(Grand Average of Hydropathy) value for a peptide or protein is calculated as the sum of hydropathy values [9] of all the amino acids, divided by the number of residues in the sequence._
def gravy @gravy ||= begin hydropathy_sum = 0.0 each_aa do |aa| hydropathy_sum += HYDROPATHY[aa] end round(hydropathy_sum / @seq.length.to_f, 3) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def raw_gpa\n tot_grade_points/tot_graded_attmp rescue 0.0/0.0\n end", "def get_gpa\n total = registrations.where('grade is not null').inject(0){|sum, c| sum + c.grade}\n if total != 0\n # binding.pry\n final_gpa = total.to_f / (self.registrations.where('grade is not null').count).to_f\n ...
[ "0.60018265", "0.5839094", "0.5787341", "0.565506", "0.55642915", "0.55627733", "0.5533933", "0.55288666", "0.55063254", "0.54518044", "0.54405046", "0.54323685", "0.5411593", "0.5410152", "0.53939104", "0.5326942", "0.5324399", "0.53011346", "0.5292673", "0.526699", "0.52649...
0.7091364
0
Calculate the percentage composition of an AA sequence as a Hash object. It return percentage of a given amino acid if aa_code is not nil.
def aa_comp(aa_code=nil) if aa_code.nil? aa_map = {} IUPAC_CODE.keys.each do |k| aa_map[k] = 0.0 end aa_map.update(aa_comp_map){|k,_,v| round(v, 1) } else round(aa_comp_map[aa_code], 1) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def overall_aroma_percentage\n overall_aroma = self.aroma_bundles.inject(0) do |memo, bundle|\n memo += bundle.percent if bundle.percent.is_a?(Integer) || bundle.percent.is_a?(BigDecimal)\n memo\n end\n\n return overall_aroma\n end", "def calculate_percentage_completion\n result = {}\n ...
[ "0.57860136", "0.5707039", "0.5654985", "0.5577412", "0.55692405", "0.5556035", "0.5485852", "0.5466409", "0.5452387", "0.54397494", "0.53883076", "0.5377612", "0.5369018", "0.53582907", "0.5344103", "0.5330651", "0.5329907", "0.5329273", "0.5324464", "0.5321181", "0.53096193...
0.68882215
0
Return proc calculating charge of a residue.
def charge_proc positive, pK, num if positive lambda {|ph| num.to_f / (1.0 + 10.0 ** (ph - pK)) } else lambda {|ph| (-1.0 * num.to_f) / (1.0 + 10.0 ** (pK - ph)) } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def charge\n subtotal * 0\n end", "def charge\n ((sprintf(\"%.1f\", (\n $ioreg_return.split(' = ')[15].strip.split(\"\\n\")[0].to_f / $ioreg_return.split(' = ')[9].strip.split(\"\\n\")[0].to_f )\n )).to_f*100).to_i\n end", "def theoretical_pI\n charges = []\n residue_count().ea...
[ "0.6225294", "0.5906098", "0.5820925", "0.5817745", "0.57494015", "0.5707212", "0.5559077", "0.54159015", "0.5376804", "0.53589404", "0.53589404", "0.53448075", "0.53445965", "0.52909523", "0.5265159", "0.524935", "0.5217298", "0.5191494", "0.5138116", "0.5102817", "0.5086883...
0.65045726
0
Transform AA sequence into residue count
def residue_count counted = [] # N-terminal n_term = @seq[0].chr if PK[:nterm].key? n_term.to_sym counted << { :num => 1, :residue => n_term.to_sym, :pK => PK[:nterm][n_term.to_sym], :positive => positive?(n_term) } elsif PK[:normal]....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def acidic_count(amino_acid_sequence)\n count = 0\n comp = amino_acid_sequence.composition\n ACIDIC_AMINO_ACIDS.each do |acidic|\n if comp[acidic]\n count += comp[acidic]\n end\n end\n return count\n end", "def basic_count(amino_acid_sequence)\n count = 0\n...
[ "0.7141778", "0.70089996", "0.68835706", "0.6433953", "0.5985886", "0.5922526", "0.5756015", "0.57402045", "0.56796736", "0.5613895", "0.5606639", "0.5547495", "0.55425197", "0.5510146", "0.54603595", "0.54540306", "0.5436752", "0.5427353", "0.5423404", "0.54028624", "0.53948...
0.7270198
0
Solving pI value with bisect algorithm.
def solve_pI charges state = { :ph => 0.0, :charges => charges, :pI => nil, :ph_prev => 0.0, :ph_next => 14.0, :net_charge => 0.0 } error = false # epsilon means precision [pI = pH +_ E] epsilon = 0.001 loop do # Reset net char...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def p_value(p, a, b, rmin = 0, rmax = 1)\n fail 'a <= 0' if a <= 0\n fail 'b <= 0' if b <= 0\n fail 'rmin == rmax' if rmin == rmax\n fail 'p <= 0' if p <= 0\n fail 'p > 1' if p > 1\n\n precision = 8.88e-016\n max_iterations = 256\n\n ga = 0\n ...
[ "0.614283", "0.5933399", "0.56879985", "0.56388", "0.5591578", "0.5515401", "0.545671", "0.5451235", "0.5417222", "0.53818583", "0.53731453", "0.5349993", "0.5303633", "0.52670103", "0.5259487", "0.5258435", "0.52548975", "0.524092", "0.52062017", "0.51943946", "0.5193879", ...
0.61282843
1
The load_game method is responsible for comparing the timestamp within the file to the time the filesystem has associated with the file. Write the load_game(file) method.
def load_game(file) raise "I suspect you of cheating." if File.mtime(file) != Time.at(File.readlines(file).last.to_i) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_gamedata\n @time_stamp = Time.at(0)\n @file_exist = FileTest.exist?(@filename)\n if @file_exist\n file = File.open(@filename, \"r\")\n @time_stamp = file.mtime\n begin\n @characters = Marshal.load(file)\n @frame_count = Marshal.load(file)\n @last_bgm ...
[ "0.77167517", "0.727479", "0.72611916", "0.7061204", "0.6986792", "0.69377977", "0.685706", "0.6831958", "0.6797869", "0.67838186", "0.664105", "0.6372434", "0.63679725", "0.6291665", "0.6234307", "0.6166935", "0.6145533", "0.6017127", "0.60056835", "0.59807503", "0.5978757",...
0.80305064
0
find note and parent picture, destroy then redirect back to artwork
def destroy @note = Note.find(params[:id]) @picture = @note.picture @artwork = @picture.artwork @note.destroy redirect_to @artwork end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @picture = Picture.find(params[:id])\n @picture.destroy\n\n #need a redirect here\n redirect_back(fallback_location: root_path)\n #if artwork is no longer present fallback to the root\n end", "def destroy\n if @note\n @parent = @note.get_parent if @note\n @note.destroy\...
[ "0.73953956", "0.71886754", "0.66464704", "0.64856774", "0.6481065", "0.6458882", "0.6432985", "0.6409424", "0.6349936", "0.6347975", "0.6316039", "0.63066953", "0.62736166", "0.6269202", "0.6267368", "0.6244086", "0.6211219", "0.62053996", "0.6203089", "0.619996", "0.6199286...
0.75453204
0
For a recurrent network, this resets hidden states back to zero
def reset if config.isRecurrent @nn.resetRecurrentStates else puts "Warning not a recurrent network. This does nothing" end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_state\n @hidden.data = @hidden.data.fill(0) if @hidden.data\n end", "def reset\n clear\n CONNECTION_TYPES.map { |ct| connections.send(ct) }.each do |conn_group|\n conn_group.each_value { |conn| conn.weight = rand * 0.2 - 0.1 }\n end\n\n @bias = rand * 0.2 - 0.1\n ...
[ "0.793131", "0.65126204", "0.6357723", "0.6288698", "0.62217224", "0.61153", "0.59013903", "0.5882676", "0.58755016", "0.5801405", "0.5768204", "0.575981", "0.5719362", "0.5677884", "0.56665677", "0.563799", "0.56377774", "0.5635372", "0.5632821", "0.5627946", "0.5625814", ...
0.7516543
1
Copies workflows to another scope.
def copy workflows = Workflow.accessible_by(@context).where(id: params[:item_ids]) new_workflows = workflows.map { |wf| copy_service.copy(wf, params[:scope]).first } # TODO: change old UI to handle json-response! respond_to do |format| format.html do redirect_to pathify(workf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy\n workflows = Workflow.accessible_by(@context).where(id: params[:item_ids])\n\n new_workflows = workflows.map { |wf| copy_service.copy(wf, params[:scope]).first }\n\n # TODO: change old UI to handle json-response!\n respond_to do |format|\n format.html do\n redirect_to ...
[ "0.6871361", "0.57982564", "0.5650359", "0.5604749", "0.5523248", "0.55140465", "0.5383086", "0.5368381", "0.53668875", "0.5338356", "0.52970976", "0.5240788", "0.52288944", "0.5172689", "0.51283437", "0.51116115", "0.50960404", "0.50477606", "0.5039503", "0.50284374", "0.501...
0.6953001
0
This is the actual action that ships the reward ship_reward_now_user_payment_reward_receivers POST
def ship_reward_now @reward_receiver = RewardReceiver.find(params[:reward_receiver_id]) @reward_receiver.update(reward_receiver_params) if @reward_receiver.update( status: "shipped" ) #Send email #Send notification #Add xp @user.add_score("ship_reward") end redirect_to show_user_studio_rewards_pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_reward_action_params\n params.fetch(:user_reward_action, {})\n end", "def set_user_reward_action\n @user_reward_action = UserRewardAction.find(params[:id])\n end", "def rewardpurchase\n @reward = Reward.find(params[:id]).clone\n @rewardpurchase = @reward.rewardpurchases.create(pa...
[ "0.62571675", "0.6154065", "0.6122438", "0.6039495", "0.6003704", "0.59771526", "0.5963008", "0.5954132", "0.5932498", "0.59322613", "0.59250814", "0.5878585", "0.5833457", "0.5800626", "0.57559234", "0.57546043", "0.5743966", "0.572459", "0.5718811", "0.56481206", "0.5639043...
0.7573464
0
Show the given thesis with the given tiss_id
def show @thesis = Thesis.load params[:id] end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_thesis\n @thesis = Thesis.find(params[:id])\n end", "def display_resource(thesis)\n \"Thesis: #{thesis.title}\"\n end", "def show\n @issuance = Issuance.where(id: params[:id]).first\n end", "def show\n @tuiter = Tuiter.find(params[:id])\n end", "def index\n @theses = Thesis.a...
[ "0.69233584", "0.66976506", "0.63381547", "0.6287084", "0.6270265", "0.62337285", "0.6196108", "0.6163608", "0.6042122", "0.6031026", "0.60042626", "0.59876084", "0.5986726", "0.59836763", "0.5972753", "0.5943741", "0.59387267", "0.59319234", "0.59302306", "0.59246606", "0.58...
0.72106856
0
returns truthy if the given frame carries HTTP semantics (so has to be sent in order)
def semantic_frame? f f.type == FrameTypes::DATA || f.type == FrameTypes::HEADERS || f.type == FrameTypes::CONTINUATION || f.type == FrameTypes::GZIPPED_DATA end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def head?\r\nHTTP_METHOD_LOOKUP[request_method] == :head\r\nend", "def http_header?(name)\n name.start_with?(\"HTTP\") && !HTTP_NON_HEADERS.include?(name)\n end", "def treat_as_standard_html_request?\n !request.format.json? and !request.format.print? and !request.format.video?\n end", "def treat_...
[ "0.6558549", "0.62860686", "0.6256679", "0.6256679", "0.61295325", "0.61175334", "0.61175334", "0.6113873", "0.60840786", "0.60704446", "0.6067758", "0.60201645", "0.6002649", "0.5972792", "0.58855915", "0.5847994", "0.5845215", "0.5839393", "0.5836589", "0.5833479", "0.58316...
0.7241635
0
Are we configured to accept GZIPPED_DATA frames from this peer? Takes into account peer's apparent ability to correctly send gzip.
def accept_gzip? return if @ext__veto_gzip @ext__recv_gzip end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accept_gzip!\n return if @ext__veto_gzip\n if !@ext__recv_gzip\n send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 1})\n @ext__recv_gzip = true\n end\n end", "def send_gzip?\n return if !@ext__peer_gzip\n @ext__send_gzip\n end", "def no_accept_gzi...
[ "0.766792", "0.74445325", "0.6850856", "0.65573454", "0.63458", "0.60623276", "0.60623276", "0.60442317", "0.5980888", "0.59735066", "0.595472", "0.59233373", "0.5898725", "0.5839625", "0.58131963", "0.57851064", "0.57664853", "0.5682518", "0.56816906", "0.56658715", "0.56405...
0.7738065
0
tell the peer we'll accept GZIPPED_DATA frames
def accept_gzip! return if @ext__veto_gzip if !@ext__recv_gzip send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 1}) @ext__recv_gzip = true end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accept_gzip?\n return if @ext__veto_gzip\n @ext__recv_gzip\n end", "def no_accept_gzip!\n return if @ext__veto_gzip\n if @ext__recv_gzip\n send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 0})\n @ext__recv_gzip = false\n end\n end", "def snapshots...
[ "0.6632567", "0.63472205", "0.59732676", "0.5944581", "0.59191394", "0.58648014", "0.57127595", "0.56354225", "0.561135", "0.55936605", "0.55447555", "0.54818", "0.54678214", "0.5440597", "0.54247224", "0.54160464", "0.5398543", "0.53897715", "0.5374744", "0.535133", "0.53371...
0.7478205
0
tell the peer we don't accept GZIPPED_DATA frames
def no_accept_gzip! return if @ext__veto_gzip if @ext__recv_gzip send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 0}) @ext__recv_gzip = false end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accept_gzip!\n return if @ext__veto_gzip\n if !@ext__recv_gzip\n send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 1})\n @ext__recv_gzip = true\n end\n end", "def no_send_gzip!\n if @ext__send_gzip\n @ext__send_gzip = false\n end\n end", "d...
[ "0.6865061", "0.63741463", "0.62295026", "0.610589", "0.610589", "0.5976867", "0.58996403", "0.5692219", "0.5689522", "0.56092215", "0.5589415", "0.55344594", "0.55241996", "0.5496961", "0.5429668", "0.54194087", "0.5402771", "0.5391948", "0.53852093", "0.5376257", "0.5374902...
0.74682546
0
Are we configured to send GZIPPED_DATA frames to this peer? Takes into account peer's settings for receiving them.
def send_gzip? return if !@ext__peer_gzip @ext__send_gzip end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accept_gzip?\n return if @ext__veto_gzip\n @ext__recv_gzip\n end", "def accept_gzip!\n return if @ext__veto_gzip\n if !@ext__recv_gzip\n send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 1})\n @ext__recv_gzip = true\n end\n end", "def no_accept_gz...
[ "0.6787585", "0.67495316", "0.6270493", "0.6021219", "0.5889975", "0.5840739", "0.5817615", "0.5672995", "0.56668615", "0.56657493", "0.56657493", "0.56309086", "0.56244725", "0.55641174", "0.54602253", "0.5459606", "0.5457673", "0.53546077", "0.53490037", "0.53181916", "0.53...
0.7271987
0
application lets us send GZIPPED_DATA frames to this peer
def send_gzip! if !@ext__send_gzip @ext__send_gzip = true end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def accept_gzip!\n return if @ext__veto_gzip\n if !@ext__recv_gzip\n send_frame Settings.frame_from({Settings::ACCEPT_GZIPPED_DATA => 1})\n @ext__recv_gzip = true\n end\n end", "def send_data_with_http_tunnel(data)\n #msg_data = Base64::encode64(data)\n #@socket_srv.print \"...
[ "0.67159706", "0.60468405", "0.5960542", "0.58490294", "0.5817642", "0.58146393", "0.57843447", "0.578295", "0.57530475", "0.5714235", "0.5696031", "0.56844765", "0.56827", "0.5673934", "0.5617282", "0.5607205", "0.5592035", "0.55890477", "0.55718523", "0.55499536", "0.554069...
0.61859727
1
does the questions table need an answer_id to make this connection work? generate question objects that are associated to quiz by question_id
def create_question question_hash = Adapter.quiz_api(difficulty) #use adapter method, with difficulty passes into the url as a variable, to gnerate a new list of questions. new_question = Question.new #make a new question instance new_question.save #save now so we can store the question's id in the answer b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def questions\n results = CONNECTION.execute(\"SELECT * FROM questions WHERE student_id = #{@id};\")\n \n results_as_objects = []\n \n results.each do |result_hash|\n results_as_objects << Question.new(result_hash[\"id\"], result_hash[\"student_id\"], result_hash[\"content\"])\n end\n \n ...
[ "0.7032894", "0.67263997", "0.6716732", "0.644409", "0.6424999", "0.6343684", "0.6338102", "0.62696993", "0.62696993", "0.6223113", "0.6167304", "0.61640286", "0.614915", "0.61425966", "0.6113575", "0.6096051", "0.6089674", "0.60862046", "0.6074964", "0.6073646", "0.60510755"...
0.701326
1
Centroid of an empty should return an empty collection rather than throw a weird exception out of ffigeos
def test_empty_centroid assert_equal(@factory.collection([]), @factory.multi_polygon([]).centroid) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def centroid\n return @centroid if defined?(@centroid)\n\n cx, cy = 0, 0\n\n (0...vertices.length).each do |i|\n prev = vertices[i - 1]\n curr = vertices[i]\n\n v = prev.x * curr.y - curr.x * prev.y\n cx += v * (prev.x + curr.x)\n cy += v * (prev.y ...
[ "0.6222692", "0.60607773", "0.5992386", "0.5939178", "0.58846116", "0.58846116", "0.5828418", "0.57966566", "0.5743518", "0.57348335", "0.57344866", "0.56697625", "0.56311977", "0.56003714", "0.56003714", "0.56003714", "0.55759805", "0.55759805", "0.55273706", "0.5524584", "0...
0.79611725
0
API to request a random speach of Robert with a direction to user
def random_roberto_speech skip_authorization respond_to do |format| format.json do render json: { roberto_speech: "#{RobertoBarros.in_ingrish} #{direction_for_active_cell(@play)}" } end end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def greeting\n random_response(:greeting)\n end", "def farewell\n random_response(:farewell)\n end", "def greeting\n\t\trandom_response(:greeting)\n\tend", "def greeting\n\t\trandom_response :greeting\n\tend", "def random\n redirect_to_random(Word)\n end", "def select_word\n uri = URI(...
[ "0.6410003", "0.62890655", "0.617846", "0.6140068", "0.60641664", "0.6027653", "0.5996284", "0.5993427", "0.5981577", "0.5953854", "0.5953854", "0.5915373", "0.5882376", "0.58802176", "0.57827646", "0.57559085", "0.5744108", "0.5732625", "0.5730949", "0.57013685", "0.56785595...
0.6819541
0
Returns the CollectionEventParameters for this Collectible.
def collection_event_parameters event_parameters.detect { |ep| CaTissue::CollectionEventParameters === ep } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collection_params\n params[:collection]\n end", "def params\n @parameter_collection ||= ParameterCollection.new(self)\n end", "def parameters\n params = []\n self.event_parameters.each do |param|\n params << OpenStruct.new( :param_id => param.id, :name => param.Descript...
[ "0.6391381", "0.61298275", "0.6054056", "0.5796431", "0.55367786", "0.5498293", "0.5491343", "0.543182", "0.5366797", "0.53638387", "0.5360491", "0.5342864", "0.53407526", "0.5338184", "0.52496517", "0.5236401", "0.5235768", "0.5219217", "0.52115715", "0.51969904", "0.5188255...
0.7778192
0
Returns whether this Collectible has a received event.
def received? received_event_parameters end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_received(sequence)\n false # return true if we handled the event here\n end", "def received?\n !!self.received_at?\n end", "def event?\n @events_mutex.synchronize do\n !@events.empty?\n end\n end", "def ready?\n running? && @event_received\n end", "...
[ "0.72068524", "0.7193023", "0.7118438", "0.70399374", "0.6855773", "0.68084085", "0.67628276", "0.675207", "0.6705036", "0.6678729", "0.6634484", "0.65112597", "0.65058595", "0.6502429", "0.6453903", "0.6441787", "0.63667846", "0.63488317", "0.6328561", "0.63088006", "0.62748...
0.7875182
0
Returns the ReceivedEventParameters for this Collectible.
def received_event_parameters event_parameters.detect { |ep| CaTissue::ReceivedEventParameters === ep } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parameters\n params = []\n self.event_parameters.each do |param|\n params << OpenStruct.new( :param_id => param.id, :name => param.Description, :param_type => param.parameter_type.Description )\n end\n params\n end", "def collection_event_parameters\n event_parameters.detec...
[ "0.6323639", "0.6012966", "0.56432647", "0.5609585", "0.5517666", "0.5517666", "0.5517666", "0.54708624", "0.54607844", "0.5360808", "0.5338348", "0.5233195", "0.5230966", "0.5226758", "0.5193156", "0.5133072", "0.5131748", "0.510998", "0.5108963", "0.5099242", "0.5064849", ...
0.7330431
0
Overrides +Jinx::Resource.each_defaultable_reference+ to visit the +CaTissue::ReceivedEventParameters+.
def each_defaultable_reference # visit ReceivedEventParameters first rep = received_event_parameters yield rep if rep # add other dependent defaults super { |dep| yield dep unless ReceivedEventParameters === dep } end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_default_event_parameters\n rep = received_event_parameters || create_default_received_event_parameters || return\n if collection_event_parameters.nil? then\n create_default_collection_event_parameters(rep)\n end\n end", "def add_defaults_local\n super\n self.collection_...
[ "0.6164295", "0.5381283", "0.4969595", "0.4838806", "0.47838664", "0.47681656", "0.47594526", "0.46621728", "0.4611608", "0.46099967", "0.46099967", "0.46076325", "0.45855463", "0.4564988", "0.45619994", "0.4556502", "0.45543855", "0.4546286", "0.4544712", "0.453702", "0.4533...
0.80867386
0
methods copied from openstudiostandards Remove all air loops in model
def remove_air_loops(model) model.getAirLoopHVACs.each(&:remove) return model end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_all_plant_loops(model)\n model.getPlantLoops.each(&:remove)\n return model\n end", "def remove_plant_loops(model, runner)\n plant_loops = model.getPlantLoops\n plant_loops.each do |plant_loop|\n shw_use = false\n plant_loop.demandComponents.each do |component|\n if compon...
[ "0.72458667", "0.66515267", "0.6582943", "0.60994804", "0.5972743", "0.59486586", "0.5842645", "0.5763797", "0.57474786", "0.5698407", "0.5690245", "0.5642426", "0.5619892", "0.561644", "0.5603296", "0.556087", "0.5513277", "0.54816663", "0.54705334", "0.54594445", "0.5438511...
0.8150995
0
Remove plant loops in model except those used for service hot water
def remove_plant_loops(model, runner) plant_loops = model.getPlantLoops plant_loops.each do |plant_loop| shw_use = false plant_loop.demandComponents.each do |component| if component.to_WaterUseConnections.is_initialized or component.to_CoilWaterHeatingDesuperheater.is_initialized s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_all_plant_loops(model)\n model.getPlantLoops.each(&:remove)\n return model\n end", "def remove_all_HVAC(model)\n remove_air_loops(model)\n remove_all_plant_loops(model)\n remove_vrf(model)\n remove_all_zone_equipment(model, runner)\n remove_unused_curves(model)\n return model\...
[ "0.7977865", "0.6317917", "0.6171294", "0.59789693", "0.59051365", "0.58486855", "0.5725123", "0.56902903", "0.56771296", "0.5660775", "0.5614084", "0.55762285", "0.55254906", "0.55183774", "0.54585844", "0.5440105", "0.5421288", "0.5401321", "0.53636134", "0.5352844", "0.533...
0.8130865
0
Remove all plant loops in model including those used for service hot water
def remove_all_plant_loops(model) model.getPlantLoops.each(&:remove) return model end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_plant_loops(model, runner)\n plant_loops = model.getPlantLoops\n plant_loops.each do |plant_loop|\n shw_use = false\n plant_loop.demandComponents.each do |component|\n if component.to_WaterUseConnections.is_initialized or component.to_CoilWaterHeatingDesuperheater.is_initialized\n...
[ "0.81790364", "0.6589813", "0.6502841", "0.6242478", "0.6119649", "0.58563393", "0.57929134", "0.57875216", "0.5780385", "0.5763786", "0.57443535", "0.56694466", "0.5651515", "0.56339765", "0.56157476", "0.5593708", "0.55870295", "0.5569084", "0.5567656", "0.5567593", "0.5553...
0.8488544
0
Remove zone equipment except for exhaust fans
def remove_zone_equipment(model, runner) zone_equipment_removed_count = 0 model.getThermalZones.each do |zone| zone.equipment.each do |equipment| if equipment.to_FanZoneExhaust.is_initialized runner.registerInfo("#{equipment.name} is a zone exhaust fan and will not be removed.") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_all_zone_equipment(model, runner)\n zone_equipment_removed_count = 0\n model.getThermalZones.each do |zone|\n zone.equipment.each do |equipment|\n equipment.remove\n zone_equipment_removed_count += 1\n end\n end\n runner.registerInfo(\"#{zone_equipment_removed_count} ...
[ "0.70199895", "0.6247393", "0.58842", "0.57995945", "0.57291377", "0.56963205", "0.5600381", "0.5579024", "0.5498476", "0.5490843", "0.5441397", "0.5415022", "0.5409011", "0.5407079", "0.54061013", "0.53802806", "0.5371178", "0.5355217", "0.535057", "0.53460014", "0.5339017",...
0.7796493
0
Remove all zone equipment including exhaust fans
def remove_all_zone_equipment(model, runner) zone_equipment_removed_count = 0 model.getThermalZones.each do |zone| zone.equipment.each do |equipment| equipment.remove zone_equipment_removed_count += 1 end end runner.registerInfo("#{zone_equipment_removed_count} zone equipment...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_zone_equipment(model, runner)\n zone_equipment_removed_count = 0\n model.getThermalZones.each do |zone|\n zone.equipment.each do |equipment|\n if equipment.to_FanZoneExhaust.is_initialized\n runner.registerInfo(\"#{equipment.name} is a zone exhaust fan and will not be removed....
[ "0.80142355", "0.6505793", "0.63005346", "0.617482", "0.6059574", "0.60200137", "0.595982", "0.5894745", "0.5813889", "0.57174635", "0.571298", "0.5707686", "0.57023436", "0.56797737", "0.5645785", "0.56434333", "0.56410253", "0.5605959", "0.55543077", "0.5544964", "0.5537663...
0.7808084
1
Remove unused performance curves
def remove_unused_curves(model) model.getCurves.each do |curve| if curve.directUseCount == 0 model.removeObject(curve.handle) end end return model end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discard_trip_outliers\n @drivers.each do |driver|\n driver.discard_trip_outliers\n end\n end", "def remove_useless_traces_data(params)\n convert_list_of_json_traces_to_objects(params[0])\n create_new_traces\n @traces_json_string = '[' + @traces_json_string[0...-1] + ']'\n puts @traces...
[ "0.63622653", "0.5890391", "0.58874714", "0.5548547", "0.5514475", "0.54884386", "0.544713", "0.5444272", "0.54383636", "0.54342604", "0.5347522", "0.5347522", "0.5339887", "0.53289837", "0.5318336", "0.5307225", "0.5307121", "0.5300492", "0.52713186", "0.5260212", "0.5233385...
0.6594909
0
Remove all HVAC equipment including service hot water loops and zone exhaust fans
def remove_all_HVAC(model) remove_air_loops(model) remove_all_plant_loops(model) remove_vrf(model) remove_all_zone_equipment(model, runner) remove_unused_curves(model) return model end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_all_zone_equipment(model, runner)\n zone_equipment_removed_count = 0\n model.getThermalZones.each do |zone|\n zone.equipment.each do |equipment|\n equipment.remove\n zone_equipment_removed_count += 1\n end\n end\n runner.registerInfo(\"#{zone_equipment_removed_count} ...
[ "0.7198777", "0.7169061", "0.662502", "0.6248277", "0.6094765", "0.60933167", "0.60856855", "0.60630375", "0.6013214", "0.5910571", "0.58979416", "0.58232826", "0.57867634", "0.5696978", "0.5696209", "0.5675323", "0.5628587", "0.55907035", "0.5582356", "0.5573607", "0.5572154...
0.75487345
0
GET /android_profiles/new GET /android_profiles/new.json
def new @android_profile = @user.build_android_profile respond_to do |format| format.html # new.html.erb format.json { render json: @android_profile } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @android_profile = @user.build_android_profile(params[:android_profile])\n\n respond_to do |format|\n if @android_profile.save\n format.html { redirect_to user_android_profile_url, :flash => { success: 'Successfully saved.' } }\n format.json { render json: @android_profile, st...
[ "0.72782207", "0.7229526", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.7157012", "0.707604", "0.7030763", "0.7012275", "0.6968892", "0.6918348", "0.69110125", "0.69033355", "0.6857037", "0.6840285", "0.6818574", ...
0.7586584
0
POST /android_profiles POST /android_profiles.json
def create @android_profile = @user.build_android_profile(params[:android_profile]) respond_to do |format| if @android_profile.save format.html { redirect_to user_android_profile_url, :flash => { success: 'Successfully saved.' } } format.json { render json: @android_profile, status: :crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @android_profile = @user.build_android_profile\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @android_profile }\n end\n end", "def newprofile\n if params[\"auth_key\"] == nil or params[\"device_id\"] == nil or params[\"profile_url\"] == nil\...
[ "0.6620486", "0.6309191", "0.6241737", "0.6217791", "0.6216352", "0.61435705", "0.6082825", "0.60503715", "0.6032393", "0.6011774", "0.59844774", "0.5958668", "0.59420544", "0.59111065", "0.5891704", "0.5876368", "0.5872493", "0.5856541", "0.5846068", "0.58314735", "0.5818122...
0.7356422
0
PUT /android_profiles/1 PUT /android_profiles/1.json
def update @android_profile = @user.android_profile respond_to do |format| if @android_profile.update_attributes(params[:android_profile]) format.html { redirect_to user_android_profile_url, :flash => { success: 'Successfully updated.' } } format.json { head :no_content } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assign_default_profile(args = {}) \n put(\"/profiles.json/#{args[:profileId]}/default\", args)\nend", "def update_profile(options = {}) \n # query profile info\n response = HTTP.auth('Bearer ' + Asca::Tools::Token.new_token).get(URI_PROFILES, :params => { 'filter[name]' => options[:name...
[ "0.6951007", "0.6715517", "0.66986156", "0.6642862", "0.6555922", "0.6541912", "0.6474071", "0.63844603", "0.6382593", "0.6366721", "0.63333946", "0.6270955", "0.61857677", "0.6096249", "0.60856724", "0.6079825", "0.60654044", "0.60649693", "0.60550237", "0.60038793", "0.6003...
0.72788167
0
DELETE /android_profiles/1 DELETE /android_profiles/1.json
def destroy @android_profile = @user.android_profile @android_profile.destroy respond_to do |format| format.html { redirect_to new_user_android_profile_url, :flash => { success: 'Successfully deleted.' } } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_default_profile \n put(\"/profiles.json/default/clear\")\nend", "def destroy\n @profile.destroy\n end", "def destroy\n @profile.destroy\n respond_to do |format|\n format.html { redirect_to profiles_url, :notice => t('alerts.profiles.destroy') }\n format.json { head :no_content }\n...
[ "0.688106", "0.67451817", "0.66933864", "0.6646937", "0.66443163", "0.663883", "0.66304415", "0.66253275", "0.6622983", "0.6622587", "0.6622587", "0.661696", "0.661696", "0.661696", "0.66095537", "0.65910894", "0.65910894", "0.65910894", "0.65910894", "0.65910894", "0.6591089...
0.7638798
0
We strip the segments before code analysis begins
def pre_code_analyze # grab the section names we will strip return if not options[ '/strip' ] # split the string into an array of section names names = options[ '/strip' ].split( ';' ) # don't bother to continue if we have no sections to strip return if names.empty? ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_segments()\n if @handle.ptr == nil\n raise \"this is disposed\"\n end\n Native.RunEditor_remove_segments(@handle.ptr)\n end", "def strip() end", "def segments; end", "def code_splitter(code)\n student_code = []\n code = code.split('startTrac...
[ "0.63169897", "0.6114767", "0.6013568", "0.59254557", "0.59133667", "0.58593154", "0.57742417", "0.575581", "0.57271725", "0.5725265", "0.570112", "0.5669288", "0.56517005", "0.563582", "0.5633089", "0.5595469", "0.55848056", "0.55652046", "0.5541076", "0.5530846", "0.5519808...
0.7150977
0
POST /forum_comentarios POST /forum_comentarios.json
def create @forum_comentario = ForumComentario.new(forum_comentario_params) @forum_comentario.usuario_curso_id = @perfil.id if @forum_comentario.save ApplicationMailer.nova_postagem_forum(@forum_comentario).deliver @forum_comentario = ForumComentario.where(forum_id: @forum_comentario.foru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forum_comentario_params\n params.require(:forum_comentario).permit(:usuario_curso_id, :forum_id, :texto, :forum_comentario_id)\n end", "def set_forum_comentario\n @forum_comentario = ForumComentario.find(params[:id])\n end", "def CreateForum params = {}\n \n APICall(path: 'for...
[ "0.68770254", "0.6542328", "0.61994195", "0.61258686", "0.6037483", "0.5904276", "0.5897215", "0.5894291", "0.58818334", "0.58128065", "0.579469", "0.57040703", "0.56828684", "0.5668554", "0.5662532", "0.56562525", "0.56545424", "0.5638724", "0.56264144", "0.5622462", "0.5617...
0.7176462
0
PATCH/PUT /forum_comentarios/1 PATCH/PUT /forum_comentarios/1.json
def update if @forum_comentario.update(forum_comentario_params) @forum_comentario = ForumComentario.where(forum_id: @forum_comentario.forum_id) else respond_to do |format| format.js { render :edit } format.json { render json: @forum_comentario.errors, status: :unprocessable_entity } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_forum_comentario\n @forum_comentario = ForumComentario.find(params[:id])\n end", "def UpdateForum id,params = {}\n \n APICall(path: \"forums/#{id}.json\",method: 'PUT',payload: params.to_json)\n \n end", "def update\n respond_to do |format|\n if @forum.update(f...
[ "0.64999384", "0.64824", "0.64161706", "0.6259877", "0.6259877", "0.6259877", "0.6223598", "0.6206684", "0.62062985", "0.6204959", "0.6182075", "0.6182075", "0.61629933", "0.6117606", "0.61157", "0.61007637", "0.6095807", "0.60956335", "0.60912025", "0.608763", "0.6086541", ...
0.7314524
0
DELETE /forum_comentarios/1 DELETE /forum_comentarios/1.json
def destroy authorize! :destroy, ForumComentario @forum = @forum_comentario.forum_id @forum_comentario.destroy if @forum_comentario.destroy @forum_comentario = ForumComentario.where(forum_id: @forum) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DeleteForum id\n \n APICall(path: \"forums/#{id}.json\",method: 'DELETE')\n \n end", "def destroy\n @forum.destroy\n respond_to do |format|\n format.html { redirect_to forums_url, notice: 'Foro eliminado exitosamente.' }\n format.json { head :no_content }\n end\n ...
[ "0.7317778", "0.73058254", "0.7304083", "0.7258103", "0.7258103", "0.7258103", "0.7258103", "0.7258103", "0.7218876", "0.7163052", "0.7084888", "0.70713013", "0.70666856", "0.7061846", "0.7061364", "0.70522696", "0.70380616", "0.7022656", "0.7019304", "0.6998135", "0.6988827"...
0.7514427
0
Public: Get the number of lines of context padding. This may be overridden with the environment variable DEPRECATABLE_CALLER_CONTEXT_PADDING. Returns the Integer number of context padding lines.
def caller_context_padding p = ENV['DEPRECATABLE_CALLER_CONTEXT_PADDING'] if p then p = Float(p).to_i raise ArgumentError, "DEPRECATABLE_CALLER_CONTEXT_APDDING must have a value > 0, it is currently #{p}" unless p > 0 return p end return @caller_context_padding end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def formatted_context_lines\n if @formatted_context_lines.empty? then\n number_width = (\"%d\" % @context_line_numbers.last).length\n @context_lines.each_with_index do |line, idx|\n prefix = (idx == @context_index) ? CallSiteContext.pointer : CallSiteContext.not_pointer\n numbe...
[ "0.61622196", "0.6041935", "0.577995", "0.56787866", "0.564149", "0.55461526", "0.5533148", "0.5525991", "0.5525991", "0.55059415", "0.54337305", "0.54337305", "0.5407679", "0.5312454", "0.5302851", "0.5294514", "0.52807075", "0.5265841", "0.5219367", "0.5211028", "0.5199492"...
0.69588923
0
Public: Set the maximum number of times an alert for a unqiue CallSite of a DeprecatedMethod will be emitted. (default: :once) That is, when a deprecated method is called from a particular CallSite, normally an 'alert' is sent. This setting controls the maximum number of times that the 'alert' for a particular CallSite...
def alert_frequency=( freq ) @alert_frequency = frequency_of( freq ) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alert_frequency\n p = ENV['DEPRECATABLE_ALERT_FREQUENCY']\n return frequency_of(p) if p\n return @alert_frequency\n end", "def alert( call_site )\n if call_site.invocation_count <= ::Deprecatable.options.alert_frequency then\n ::Deprecatable.alerter.alert( self, call_site )\n ...
[ "0.6306147", "0.538227", "0.53795356", "0.53001046", "0.52460736", "0.5233095", "0.5148796", "0.5124275", "0.49778658", "0.49561843", "0.4932399", "0.4873181", "0.48727104", "0.4861797", "0.48283324", "0.48092556", "0.4808774", "0.47439083", "0.47408217", "0.47212908", "0.470...
0.6525837
0
Public: Get the current value of the alert_frequency. This may be overridden with the environment variable DEPRECATABLE_ALERT_FREQUENCY. Returns the Integer value representing the alert_frequency.
def alert_frequency p = ENV['DEPRECATABLE_ALERT_FREQUENCY'] return frequency_of(p) if p return @alert_frequency end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def alert_frequency=( freq )\n @alert_frequency = frequency_of( freq )\n end", "def getFrequency()\n# @config[\"demandFactoryConf\"][\"frequency\"]\n interval = @config[\"demandFactoryConf\"][\"configList\"][0][\"interval\"] ;\n return 60 * 60 / interval.to_f ;\n end", "def frequency\n F...
[ "0.7243557", "0.5936833", "0.59023714", "0.58545506", "0.5589659", "0.54387724", "0.5435269", "0.5387118", "0.5350051", "0.52953535", "0.5264387", "0.52528775", "0.5251148", "0.5225531", "0.52203304", "0.5218486", "0.52042353", "0.5189414", "0.51863307", "0.51800543", "0.5158...
0.8939573
0
Public: Say whether or not the final at exit report shall be emitted. This may be overridden by the environment variable DEPRECATABLE_HAS_AT_EXIT_REPORT. Setting the environment variable to 'true' will override the existing setting. Returns the boolean of whether or not the exti report should be done.
def has_at_exit_report? return true if ENV['DEPRECATABLE_HAS_AT_EXIT_REPORT'] == "true" return @has_at_exit_report end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def final_report( registry = Deprecatable.registry )\n lines = [ \"Deprecatable 'at_exit' Report\",\n \"=============================\" ]\n lines << \"\"\n lines << \"To turn this report off do one of the following:\"\n lines << \"\"\n lines << \"* in your ruby code set `Dep...
[ "0.6626738", "0.65446526", "0.5816383", "0.57172364", "0.5506578", "0.5466769", "0.5463742", "0.5445951", "0.5421882", "0.53928465", "0.5387986", "0.5358838", "0.53575164", "0.5351999", "0.53495646", "0.5297472", "0.52193785", "0.52143604", "0.5198657", "0.5189402", "0.517628...
0.87594885
0
GET /customersessions GET /customersessions.json
def index @customersessions = Customersession.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_customer_profile\n authenticate_request!\n json_response(current_customer)\n end", "def index\n if !session[:user_id]\n redirect_to customer_path(session[:customer_id]) , notice: 'Access Denied'\n return\n else\n @customers = Customer.all\n\n respond_to do |format|\n forma...
[ "0.6467191", "0.6334141", "0.6325294", "0.6248147", "0.62335366", "0.6228345", "0.62056506", "0.6198579", "0.61951417", "0.61770505", "0.6167864", "0.6160193", "0.6143405", "0.6134287", "0.61129445", "0.60850716", "0.6084903", "0.6082777", "0.6080246", "0.60394037", "0.600201...
0.72994256
0
POST /customersessions POST /customersessions.json
def create @customersession = Customersession.new(customersession_params) respond_to do |format| if @customersession.save format.html { redirect_to @customersession, notice: 'Customersession was successfully created.' } format.json { render :show, status: :created, location: @customersess...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @customer = Customer.new(params[:customer])\n\n respond_to do |format|\n if @customer.save\n session[:customer_id] = @customer.id\n format.html { redirect_to new_order_path, method: :get, notice: \"Your account was successfully created.\" }\n format.json { render json: ...
[ "0.6517261", "0.6481007", "0.63280153", "0.6311892", "0.62295717", "0.62247634", "0.61894065", "0.61664677", "0.6150127", "0.6123724", "0.6082324", "0.60772586", "0.60659003", "0.60503364", "0.60067624", "0.5990653", "0.5957539", "0.5898321", "0.5867269", "0.58659714", "0.583...
0.7304028
0
PATCH/PUT /customersessions/1 PATCH/PUT /customersessions/1.json
def update respond_to do |format| if @customersession.update(customersession_params) format.html { redirect_to @customersession, notice: 'Customersession was successfully updated.' } format.json { render :show, status: :ok, location: @customersession } else format.html { render :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n\n\n respond_to do |format|\n if @customer.update(customer_params)\n @@current_customer = @customer.id\n format.html { redirect_to @customer, notice: 'Customer was successfully updated.' }\n format.json { head :no_content }\n else\n format.html { render action: ...
[ "0.6316203", "0.631569", "0.63069785", "0.63013405", "0.6294324", "0.62768227", "0.62220925", "0.620664", "0.6156126", "0.61463845", "0.61080676", "0.61055964", "0.60857433", "0.60844153", "0.60844153", "0.60844153", "0.60844153", "0.60844153", "0.60844153", "0.60844153", "0....
0.7107896
0
DELETE /customersessions/1 DELETE /customersessions/1.json
def destroy @customersession.destroy respond_to do |format| format.html { redirect_to customersessions_url, notice: 'Customersession was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_session\n request.method = :get\n request.uri = '_session'\n Couchdbtools.execute(request)\n end", "def destroy\n @sixmonth_customer = SixmonthCustomer.find(params[:id])\n @sixmonth_customer.destroy\n\n respond_to do |format|\n format.html { redirect_to sixmonth_custome...
[ "0.6928423", "0.67967445", "0.6662833", "0.66535", "0.6631406", "0.6631406", "0.6631406", "0.6631406", "0.6631406", "0.6631406", "0.6631406", "0.6631406", "0.66313607", "0.6622446", "0.6622446", "0.66223925", "0.66176987", "0.6601827", "0.6599062", "0.65986556", "0.65911", ...
0.73525804
0
function to update the session and add in cart
def add_in_cart product_id=params[:id].to_i @product=Product.find(product_id) total_request=1 update_through_cart=0 if params.has_key?(:quant) total_request=params[:quant][:total_request].to_i update_through_cart=1 end if(check_availabilty(product_id,total_r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_to_cart\n \tif session[\"cart\"].nil?\n \t\tsession[\"cart\"] = []\n \tend\n \t#So luong cua san pham add vao gio hang\n \tquantity_ = 1\n \tsession[\"item\"] = {:id => params[:id].to_i, :name => params[:name], :quantity => quantity_.to_i, :price => params[:price].to_i, :total => quantity_.to_i * par...
[ "0.77462834", "0.74573016", "0.7444345", "0.7436648", "0.7408306", "0.73057497", "0.72427255", "0.7237766", "0.7228131", "0.7190924", "0.7139007", "0.7130779", "0.7122372", "0.7094831", "0.70561075", "0.70561075", "0.70561075", "0.70561075", "0.70348644", "0.7030617", "0.7026...
0.75841796
1
To view or fill out the form
def form end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def form; end", "def forms; end", "def form_view\n end", "def set_form(easy)\n end", "def ing_form; end", "def fill_out_admission_form(options = {})#incomplet fill out\n @org_codes = AdmissionHelper.get_org_codes_info(CONFIG['location'], options[:org_code] || \"0287\") if options[:org_code]\n ...
[ "0.7874452", "0.7570237", "0.7158963", "0.7024453", "0.6973726", "0.6750572", "0.66734934", "0.6654096", "0.66520834", "0.6631199", "0.6431091", "0.6375422", "0.6330114", "0.6328348", "0.62941176", "0.62941176", "0.62898064", "0.62727416", "0.62727416", "0.6253111", "0.624495...
0.7714907
1
POST /code_samples POST /code_samples.json
def create @code_sample = current_user.code_samples.new(code_sample_params) respond_to do |format| if @code_sample.save format.html { redirect_to @code_sample, notice: 'Code sample was successfully created.' } format.json { render :show, status: :created, location: @code_sample } el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def code_sample_params\n params.require(:code_sample).permit(:title, :versions, :description, :code, :featured, :code_info)\n end", "def create\n @sample = Sample.new(params[:sample])\n\n respond_to do |format|\n if @sample.save\n format.html { redirect_to samples_path, notice: 'Sample ...
[ "0.6404364", "0.64013237", "0.63031113", "0.63031113", "0.63031113", "0.62829536", "0.62224555", "0.6166463", "0.5935846", "0.58953506", "0.5800161", "0.5715335", "0.56703776", "0.56488675", "0.564442", "0.56327534", "0.55416656", "0.55367595", "0.553587", "0.553587", "0.5522...
0.7403989
0
DELETE /code_samples/1 DELETE /code_samples/1.json
def destroy @code_sample.destroy respond_to do |format| format.html { redirect_to code_samples_url, notice: 'Code sample was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @sample = Sample.find(params[:id])\n @sample.destroy\n\n respond_to do |format|\n format.html { redirect_to samples_url }\n format.json { head :no_content }\n end\n end", "def destroy\n @sample = Sample.find(params[:id])\n @sample.destroy\n\n respond_to do |format|\n...
[ "0.71839494", "0.71839494", "0.7168637", "0.71536934", "0.70669526", "0.6961494", "0.6961494", "0.6961494", "0.6961494", "0.6961494", "0.69059694", "0.6855563", "0.6843512", "0.68383676", "0.68169045", "0.68169045", "0.68169045", "0.68169045", "0.67387795", "0.6698845", "0.66...
0.73903066
0
I haven't written a test for it but the implemenation seems incorrect to me. It doesn't take into account the colour of the area you're filling. Your test passes only because you're limiting the area you're filling with the colour used to fill but if you change the colour, it fails. Also, it fails with a stack level to...
def floodfill(x, y, color) if @pixels[y-1][x-1] != color @pixels[y-1][x-1] = color floodfill(x+1, y, color) floodfill(x-1, y, color) floodfill(x, y + 1, color) floodfill(x, y - 1, color) end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def floodFill(col, row)\r\n (col > @columns-1 || col < 0 || row > @rows-1 || row < 0) && return #Returns if the tile index is outside of the grid bounds.\r\n @tile[col][row].revealed && return #Returns if the tile is already revealed.\r\n\r\n @tile[col][row].revealed = true #Marks the tile as revealed.\r\n @hi...
[ "0.7119922", "0.6965181", "0.6864852", "0.6861658", "0.6798411", "0.6793343", "0.6761053", "0.6688027", "0.6616791", "0.65391827", "0.6428579", "0.6405382", "0.6401684", "0.6350412", "0.62816596", "0.6251833", "0.62218", "0.6150228", "0.6107627", "0.6072554", "0.6034519", "...
0.7314697
0
GET /contests/new GET /contests/new.json
def new @contest = Contest.new respond_to do |format| format.html # new.html.erb format.json { render json: @contest } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @contest = Contest.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render :json => @contest }\n end\n end", "def new\n @contest = Contest.new\n @problem_count = 4\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { r...
[ "0.8337197", "0.818067", "0.8151273", "0.7914055", "0.76858914", "0.753359", "0.753359", "0.753359", "0.7529654", "0.75065213", "0.75065213", "0.73803174", "0.73803174", "0.73803174", "0.73363173", "0.72187024", "0.72187024", "0.72187024", "0.72105795", "0.7195674", "0.705507...
0.84163564
0
POST /contests POST /contests.json
def create @contest = Contest.new(params[:contest]) respond_to do |format| if @contest.save format.html { redirect_to @contest, notice: 'Contest was successfully created.' } format.json { render json: @contest, status: :created, location: @contest } else format.html { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @contest = @event.contests.build(contest_params)\n\n respond_to do |format|\n if @contest.save\n format.html { redirect_to [@event, @contest], notice: 'Contest was successfully created.' }\n format.json { render :show, status: :created, location: @contest }\n else\n ...
[ "0.7152174", "0.7103855", "0.70241404", "0.70208913", "0.69897294", "0.695391", "0.68805426", "0.68404317", "0.68307537", "0.68174773", "0.6759615", "0.6731611", "0.67187345", "0.67118084", "0.6692199", "0.6692199", "0.66318876", "0.66176033", "0.6520299", "0.6520299", "0.652...
0.74872786
0
GET /vanos/1 GET /vanos/1.json
def show @vano = Vano.find(params[:id]) respond_to do |format| format.html # show.html.erb format.json { render json: @vano } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @vanos = Vano.all\n end", "def show\n @volantino = Volantino.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @volantino }\n end\n end", "def show\n @vodka = Vodka.find(params[:id])\n\n respond_to do |format|\n ...
[ "0.6829573", "0.6780538", "0.671385", "0.67125195", "0.6626964", "0.66235274", "0.6606887", "0.66032594", "0.65865487", "0.6581894", "0.6528772", "0.6516062", "0.6447883", "0.64475924", "0.6440455", "0.64249116", "0.64249116", "0.64249116", "0.642256", "0.6390795", "0.638326"...
0.7074363
0
GET /vanos/new GET /vanos/new.json
def new @vano = Vano.new respond_to do |format| format.html # new.html.erb format.json { render json: @vano } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def new\n @po = Po.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @po }\n end\n end", "def new\n @volantino = Volantino.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @volantino }\n end\n e...
[ "0.74409693", "0.73978406", "0.7373073", "0.73017687", "0.7276522", "0.72739065", "0.7255778", "0.72509056", "0.7245187", "0.7237352", "0.7231472", "0.7224756", "0.7209617", "0.71968424", "0.7194532", "0.7192254", "0.71458995", "0.71458995", "0.71458995", "0.7123853", "0.7121...
0.75199854
0
POST /vanos POST /vanos.json
def create @vano = Vano.new(params[:vano]) respond_to do |format| if @vano.save format.html { redirect_to @vano, notice: 'Vano was successfully created.' } format.json { render json: @vano, status: :created, location: @vano } else format.html { render action: "new" } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @vano = Vano.new(vano_params)\n\n respond_to do |format|\n if @vano.save\n format.html { redirect_to @vano, notice: 'Vano was successfully created.' }\n format.json { render :show, status: :created, location: @vano }\n else\n format.html { render :new }\n fo...
[ "0.65094936", "0.6346268", "0.6317516", "0.6213228", "0.61727434", "0.61343896", "0.60662377", "0.6063277", "0.6059031", "0.6041116", "0.60224843", "0.60210156", "0.6019828", "0.6013145", "0.5997783", "0.59836125", "0.59815365", "0.5971525", "0.59701365", "0.5959958", "0.5947...
0.653171
0
GET /positioncoefficients GET /positioncoefficients.xml
def index @positioncoefficients = Positioncoefficient.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @positioncoefficients } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @positioncoefficient = Positioncoefficient.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @positioncoefficient }\n end\n end", "def new\n @positioncoefficient = Positioncoefficient.new\n\n respond_to do |format|\n ...
[ "0.65258884", "0.6046247", "0.5679516", "0.5533102", "0.5532579", "0.53812826", "0.5181406", "0.5174721", "0.51607746", "0.50951135", "0.5091188", "0.50303143", "0.5020803", "0.49832216", "0.4978589", "0.4956052", "0.4905392", "0.4902835", "0.48825383", "0.48513266", "0.48492...
0.7403955
0
GET /positioncoefficients/1 GET /positioncoefficients/1.xml
def show @positioncoefficient = Positioncoefficient.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml => @positioncoefficient } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @positioncoefficients = Positioncoefficient.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @positioncoefficients }\n end\n end", "def new\n @positioncoefficient = Positioncoefficient.new\n\n respond_to do |format|\n format.h...
[ "0.74998224", "0.6315164", "0.5776348", "0.5688913", "0.564511", "0.5529654", "0.54390216", "0.533006", "0.53189373", "0.52742636", "0.51853716", "0.5152585", "0.5140186", "0.51255345", "0.511978", "0.5106641", "0.50957143", "0.50730157", "0.50649565", "0.4977526", "0.4964364...
0.68329537
1
GET /positioncoefficients/new GET /positioncoefficients/new.xml
def new @positioncoefficient = Positioncoefficient.new respond_to do |format| format.html # new.html.erb format.xml { render :xml => @positioncoefficient } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @positioncoefficients = Positioncoefficient.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @positioncoefficients }\n end\n end", "def create\n @positioncoefficient = Positioncoefficient.new(params[:positioncoefficient])\n\n respo...
[ "0.67789316", "0.6614078", "0.63938475", "0.636018", "0.6129326", "0.6106632", "0.6076105", "0.6076105", "0.6076105", "0.6047523", "0.600763", "0.591057", "0.5851495", "0.58120257", "0.5784976", "0.5750409", "0.5680605", "0.5642594", "0.56354", "0.56230664", "0.5603886", "0...
0.7581399
0
POST /positioncoefficients POST /positioncoefficients.xml
def create @positioncoefficient = Positioncoefficient.new(params[:positioncoefficient]) respond_to do |format| if @positioncoefficient.save format.html { redirect_to(@positioncoefficient, :notice => 'Positioncoefficient was successfully created.') } format.xml { render :xml => @positionc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index\n @positioncoefficients = Positioncoefficient.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.xml { render :xml => @positioncoefficients }\n end\n end", "def new\n @positioncoefficient = Positioncoefficient.new\n\n respond_to do |format|\n format.h...
[ "0.63139105", "0.60718316", "0.58930624", "0.5589935", "0.54409516", "0.5332197", "0.5322689", "0.52606946", "0.52483875", "0.5248295", "0.52323455", "0.51994646", "0.5166757", "0.51469284", "0.51469284", "0.51145875", "0.5083312", "0.5083286", "0.5060266", "0.5059451", "0.50...
0.6944485
0
PUT /positioncoefficients/1 PUT /positioncoefficients/1.xml
def update @positioncoefficient = Positioncoefficient.find(params[:id]) respond_to do |format| if @positioncoefficient.update_attributes(params[:positioncoefficient]) format.html { redirect_to(@positioncoefficient, :notice => 'Positioncoefficient was successfully updated.') } format.xml ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n @positioncoefficient = Positioncoefficient.new(params[:positioncoefficient])\n\n respond_to do |format|\n if @positioncoefficient.save\n format.html { redirect_to(@positioncoefficient, :notice => 'Positioncoefficient was successfully created.') }\n format.xml { render :xml =>...
[ "0.60126203", "0.58573455", "0.57445574", "0.554824", "0.54882663", "0.54754776", "0.54361254", "0.54283375", "0.5397946", "0.53792685", "0.5372173", "0.5352605", "0.53466403", "0.52502984", "0.5244632", "0.5235216", "0.52308124", "0.5219644", "0.5197457", "0.51897436", "0.51...
0.6778262
0
DELETE /positioncoefficients/1 DELETE /positioncoefficients/1.xml
def destroy @positioncoefficient = Positioncoefficient.find(params[:id]) @positioncoefficient.destroy respond_to do |format| format.html { redirect_to(positioncoefficients_url) } format.xml { head :ok } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy\n @position = Position.find(params[:id])\n @position.destroy\n \n respond_to do |format|\n format.html { redirect_to(positions_url) }\n format.xml { head :ok }\n end\n end", "def destroy\n @cash_position = CashPosition.find(params[:id])\n @cash_position.destroy\n\n ...
[ "0.5921333", "0.5915622", "0.5900425", "0.58856875", "0.5871932", "0.5863749", "0.5847981", "0.5796321", "0.5786627", "0.57745445", "0.5736627", "0.570602", "0.56330585", "0.56232315", "0.56163514", "0.5598683", "0.5596947", "0.5574214", "0.5563767", "0.5555509", "0.5554605",...
0.7180604
0
takes a code returned by wepay oauth2 authorization and makes an api call to generate oauth2 token for this farmer.
def request_wepay_access_token(code, redirect_uri) response = GemsUsage::Application::WEPAY.oauth2_token(code, redirect_uri) if response['error'] raise "Error - "+ response['error_description'] elsif !response['access_token'] raise "Error requesting access from WePay" else self.wepay_access_token = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def request_wepay_access_token(code, redirect_uri)\n response = WEPAY.oauth2_token(code, redirect_uri)\n if response['error']\n raise \"Error - \"+ response['error_description']\n elsif !response['access_token']\n raise \"Error requesting access from WePay\"\n else\n self.wepay_access_token = response...
[ "0.7482357", "0.7470306", "0.73334104", "0.7279733", "0.7279112", "0.7184088", "0.7152392", "0.71414405", "0.7128365", "0.7109416", "0.7034843", "0.7016859", "0.70067984", "0.6990521", "0.6941618", "0.69037986", "0.69030356", "0.68375874", "0.6817902", "0.68138623", "0.681263...
0.74810106
1
Retrieve all template information. Build an array of template ids here over which to iterate
def retrieve_all_template_info puts "Retrieving all template ids and names for #{@primary_username} ..." puts uri = URI(@config['endpoint']) # Retrieve templates http = Net::HTTP.new( uri.host,uri.port ) http.use_ssl = true request = Net::HTTP::Get.new( uri.request_uri ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list\n @client.call(method: :get, path: 'templates')\n end", "def list\n @client.make_request :get, templates_path\n end", "def select_template\n templatelist = []\n templatelist\n end", "def get_ids_by_host(data)\n result = []\n @client.api_request(:method => \...
[ "0.6812131", "0.66967785", "0.66958106", "0.6672116", "0.6672116", "0.6652211", "0.6617218", "0.6595698", "0.6591689", "0.6560652", "0.6559263", "0.6516133", "0.6483969", "0.6438744", "0.6349718", "0.63436997", "0.6337578", "0.6334029", "0.6328988", "0.63022083", "0.63022083"...
0.82086986
0
Retrieve single template. This method will be iterative over the result of retrieve_all_template_info
def retrieve_single_template( template_id ) puts "Retrieving template id #{template_id}." uri = URI(@config['endpoint'] + '/' + template_id) # Retrieve templates http = Net::HTTP.new( uri.host,uri.port ) http.use_ssl = true request = Net::HTTP::Get.new( uri.request_uri ) requ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def details\n response = get \"/templates/#{template_id}.json\", {}\n Hashie::Mash.new(response)\n end", "def details\n response = CreateSend.get \"/templates/#{template_id}.json\", {}\n Hashie::Mash.new(response)\n end", "def get_template(template_name)\n self.api_get(:template,...
[ "0.7586648", "0.74029773", "0.7339263", "0.7268522", "0.7008067", "0.68500745", "0.68413126", "0.68368345", "0.68368345", "0.6663513", "0.6575016", "0.6574777", "0.6563132", "0.64946645", "0.64781356", "0.64725524", "0.64099216", "0.6406067", "0.63910824", "0.63813275", "0.63...
0.7499402
1
Given a string or an IO object, this will attempt a parse of its contents and return a result. If the parse fails, a Parslet::ParseFailed exception will be thrown.
def parse(io) if io.respond_to? :to_str io = StringIO.new(io) end result = apply(io) # If we haven't consumed the input, then the pattern doesn't match. Try # to provide a good error message (even asking down below) unless io.eof? # Do we know why we stopped matching input?...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(io)\n source = Parslet::Source.new(io)\n context = Parslet::Atoms::Context.new\n \n result = nil\n value = apply(source, context)\n \n # If we didn't succeed the parse, raise an exception for the user. \n # Stack trace will be off, but the error tree should explain the reason\n ...
[ "0.72174203", "0.6852277", "0.6852277", "0.6703048", "0.631334", "0.6219154", "0.6219154", "0.6219154", "0.6219154", "0.61336005", "0.61092764", "0.6071023", "0.6033791", "0.5999352", "0.5886984", "0.5871687", "0.5851328", "0.5810459", "0.5778697", "0.569109", "0.56814206", ...
0.69466734
1
Construct a new atom that repeats the current atom min times at least and at most max times. max can be nil to indicate that no maximum is present. Example: match any number of 'a's str('a').repeat match between 1 and 3 'a's str('a').repeat(1,3)
def repeat(min=0, max=nil) Parslet::Atoms::Repetition.new(self, min, max) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repeat(min = T.unsafe(nil), max = T.unsafe(nil)); end", "def rep(rule, min=1, max=Infinity, &block)\n ext(Repeat.new(rule, min, max), block)\n end", "def rep(rule, min=1, max=Infinity, &block)\n ext(Repeat.new(min, max, rule), block)\n end", "def repeat min = nil, max = nil\n Parslet...
[ "0.64874667", "0.64760303", "0.6467832", "0.6409728", "0.5549661", "0.51496565", "0.51174235", "0.511173", "0.49808976", "0.49430907", "0.49255964", "0.49134278", "0.48976672", "0.48437476", "0.48371568", "0.48275897", "0.47970575", "0.47713268", "0.47107324", "0.47024688", "...
0.70429593
0
Returns a new parslet atom that is only maybe present in the input. This is synonymous to calling repeat(0,1). Generated tree value will be either nil (if atom is not present in the input) or the matched subtree. Example: str('foo').maybe
def maybe Parslet::Atoms::Repetition.new(self, 0, 1, :maybe) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_if_nil(word, value)\n current = @root\n current_prefix = word\n\n while current_prefix != \"\"\n current, current_prefix = find_canididate_insertion_node(current, current_prefix)\n end\n\n current[:value] ||= value\n return current[:value]\n end", "def maybe(*args, **opts, &block)...
[ "0.51193595", "0.48774472", "0.48455667", "0.47992495", "0.47945142", "0.4708897", "0.46568134", "0.46323395", "0.4578652", "0.45517424", "0.4451846", "0.44018352", "0.43995935", "0.43551353", "0.43493292", "0.43220568", "0.4316036", "0.43117633", "0.42866147", "0.42510933", ...
0.6656186
0
Tests for absence of a parslet atom in the input stream without consuming it. Example: Only proceed the parse if 'a' is absent. str('a').absnt?
def absnt? Parslet::Atoms::Lookahead.new(self, false) end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def liberal_parsing?() @liberal_parsing end", "def none?\n @value.to_s.empty? or /\\Anone\\z/io.match(@value.to_s)\n end", "def atom_safe?( str )\n not ATOM_UNSAFE === str\n end", "def is_missing?(value)\n value.nil? or (String===value and value.strip.empty?)\n end", "def ...
[ "0.5951514", "0.57234496", "0.563946", "0.5633084", "0.5585235", "0.5575473", "0.5559646", "0.5534272", "0.55145633", "0.5508625", "0.5506903", "0.549662", "0.5493121", "0.54790026", "0.54713666", "0.5426929", "0.5417753", "0.54136544", "0.54093033", "0.54036856", "0.5374929"...
0.5851146
1
Report/raise a parse error with the given message, printing the current position as well. Appends 'at line X char Y.' to the message you give. If +pos+ is given, it is used as the real position the error happened, correcting the io's current position.
def error(io, str, pos=nil) pre = io.string[0..(pos||io.pos)] lines = Array(pre.lines) if lines.empty? formatted_cause = str else pos = lines.last.length formatted_cause = "#{str} at line #{lines.count} char #{pos}." end @last_cause = formatted_cause raise Pars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def error(error_message, current_scope = nil, current_exp = nil)\n if current_exp.respond_to?(:position) && current_exp.position && current_exp.position.lineno\n pos = current_exp.position\n location = \" @ #{pos.inspect}\"\n elsif @lastpos\n location = \" near (after) #{@lastpos}\"\n else\...
[ "0.6947295", "0.6947295", "0.6276376", "0.614279", "0.60134834", "0.59056336", "0.5842644", "0.5829156", "0.58288133", "0.5718064", "0.5662606", "0.56615263", "0.56347984", "0.56316334", "0.56172544", "0.5604067", "0.55866724", "0.55265605", "0.54059964", "0.53876317", "0.535...
0.72440624
0
Returns true if a password reset has expired.
def password_reset_expired? reset_sent_at < 2.hours.ago end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def password_reset_expired?\n reset_sent_at < Settings.timeout_reset_password.hours.ago\n end", "def password_reset_expired?\n reset_sent_at < 2.hours.ago # password reset sent earlier than two hours ago.\n end", "def password_reset_expired?\n reset_sent_at < 2.hours.ago # reads as password reset se...
[ "0.8866848", "0.87405956", "0.869067", "0.86877984", "0.86600757", "0.86578995", "0.86572534", "0.86572534", "0.86572534", "0.86572534", "0.86572534", "0.86572534", "0.86572534", "0.86572534", "0.8651915", "0.8649047", "0.86207587", "0.8620148", "0.86081725", "0.86076194", "0...
0.8742425
1
GET /fnf_items GET /fnf_items.json
def index @fnf_items = FnfItem.all end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show\n @items = Item.find(params[:id])\n render json: @items\n end", "def items\n\t\tresponse = self.get('items').body\n\t\titems = JSON.parse(response)\n\t\tparse_items(items)\n\t\treturn items\n\tend", "def fetch\n result = WebApi.json!('ITFItems_440', 'GetPlayerItems', 1, { :SteamID => @steam_...
[ "0.68880343", "0.6700884", "0.66582596", "0.6637868", "0.6602145", "0.6580473", "0.65746987", "0.6528283", "0.6508454", "0.6503422", "0.64814156", "0.6465555", "0.64136887", "0.64136887", "0.64136887", "0.64136887", "0.6407439", "0.6405341", "0.63968736", "0.63893515", "0.638...
0.75232977
0
POST /fnf_items POST /fnf_items.json
def create @fnf_item = FnfItem.new(fnf_item_params) respond_to do |format| if @fnf_item.save format.html { redirect_to @fnf_item, notice: 'Fnf item was successfully created.' } format.json { render :show, status: :created, location: @fnf_item } else format.html { render :new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create\n item = list.items.create!(item_params)\n render json: item, status: 201\n end", "def create\n json_response(current_restaurant.restaurant_food_items.create!(food_item_params), :created)\n end", "def create\n create_params = item_params\n item = Item.new(\n name: creat...
[ "0.72207713", "0.67484325", "0.67477804", "0.66641617", "0.6635152", "0.6523007", "0.64696527", "0.6447944", "0.6436264", "0.6428302", "0.63975084", "0.6395761", "0.63598627", "0.6294305", "0.6270345", "0.626063", "0.6258671", "0.625775", "0.6232487", "0.6231857", "0.6193738"...
0.7313476
0
PATCH/PUT /fnf_items/1 PATCH/PUT /fnf_items/1.json
def update respond_to do |format| if @fnf_item.update(fnf_item_params) format.html { redirect_to @fnf_item, notice: 'Fnf item was successfully updated.' } format.json { render :show, status: :ok, location: @fnf_item } else format.html { render :edit } format.json { render...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update\n json_response(@food_item.update!(food_item_params))\n end", "def update\n render json: Item.update(params[\"id\"], params[\"item\"])\n end", "def update\n\n #update the item of request_item\n if (params[:request_item].present?)\n @request_item.item = params[:request_item...
[ "0.7083626", "0.7041379", "0.68925995", "0.67435515", "0.6677418", "0.6621005", "0.66181964", "0.6582088", "0.6561441", "0.65573895", "0.6556058", "0.6530383", "0.6519308", "0.65159804", "0.6510725", "0.64919347", "0.64915043", "0.64876", "0.6476257", "0.645653", "0.6449354",...
0.72149175
0
DELETE /fnf_items/1 DELETE /fnf_items/1.json
def destroy @fnf_item.destroy respond_to do |format| format.html { redirect_to fnf_items_url, notice: 'Fnf item was successfully destroyed.' } format.json { head :no_content } end end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_item(item_id)\n response = Unirest.delete CONNECT_HOST + '/v1/' + LOCATION_ID + '/items/' + item_id,\n headers: REQUEST_HEADERS\n\n if response.code == 200\n puts 'Successfully deleted item'\n return response.body\n else\n puts 'Item deletion failed'\n puts response.body...
[ "0.73617923", "0.7226795", "0.70814204", "0.7033399", "0.70078087", "0.6970182", "0.6960349", "0.695755", "0.6948101", "0.69021577", "0.6897318", "0.68926764", "0.6892373", "0.6892373", "0.6892373", "0.6892373", "0.6892373", "0.6892373", "0.6892373", "0.6892373", "0.6892373",...
0.73346955
1
breakpoint.hit_condition = symbol Sets the hit condition of the breakpoint which must be one of the following values: +nil+ if it is an unconditional breakpoint, or :greater_or_equal(:ge), :equal(:eq), :modulo(:mod)
def hit_condition= symbol #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def at_breakpoint(breakpoint)\n @pry ||= Pry.new\n\n output.puts bold(\"\\n Breakpoint #{breakpoint.id}. \") + n_hits(breakpoint)\n\n expr = breakpoint.expr\n return unless expr\n\n output.puts bold(\"Condition: \") + expr\n end", "def at_breakpoint(_context, breakpoint)\n @pry ...
[ "0.70646346", "0.7031818", "0.6581376", "0.65412825", "0.61108035", "0.5783104", "0.56519616", "0.55837977", "0.5389279", "0.53603435", "0.53221023", "0.52690893", "0.51907635", "0.5189416", "0.5189416", "0.5184524", "0.5155536", "0.512498", "0.5091033", "0.50805616", "0.5073...
0.7109952
0
breakpoint.hit_count > int Returns the hit count of the breakpoint.
def hit_count() #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hit_count\n self[:hit_count] && self[:hit_count].to_i\n end", "def hit_count\n item_hash.deep_find(:hit_count, 0)\n end", "def hit_count_increament\n self.hit_count = self.hit_count + 1\n self.update\n end", "def num_hits; @hits.size; end", "def num_hits; @hits.size; ...
[ "0.77391016", "0.69725823", "0.653472", "0.6135756", "0.6135756", "0.6135756", "0.6075219", "0.6005014", "0.5868335", "0.583589", "0.5815476", "0.5736305", "0.56796646", "0.56718105", "0.5655607", "0.5600057", "0.55880976", "0.55845207", "0.5541998", "0.5528223", "0.55129576"...
0.72230375
1
breakpoint.hit_value > int Returns the hit value of the breakpoint.
def hit_value() #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hit_value= int\n #This is a stub, used for indexing\n end", "def native_hit\n 95\n end", "def hit_count\n self[:hit_count] && self[:hit_count].to_i\n end", "def hit\n malus_hit = has2w ? CPanel::TWHIT : 0\n [super - malus_hit, 0].max\n end", "def should_hit?\n...
[ "0.6995996", "0.6346121", "0.6185641", "0.5980916", "0.5891098", "0.5760935", "0.5760935", "0.56833166", "0.55650693", "0.55058306", "0.5492335", "0.54455924", "0.5442931", "0.54348075", "0.5426388", "0.5421468", "0.5396576", "0.5396576", "0.5396576", "0.5391494", "0.5367503"...
0.6643117
1
breakpoint.hit_value = int Sets the hit value of the breakpoint.
def hit_value= int #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hit_value()\n #This is a stub, used for indexing\n end", "def hit_id=(value)\n @hit_id = value\n end", "def trigger_breakpoint\n local_var = 6 * 7\n local_var\n end", "def receive_damage\n @hit_points-= 10\n end", "def white_hits=(hits)\n ...
[ "0.6196517", "0.59898365", "0.5663979", "0.56413996", "0.5607882", "0.55528563", "0.55480903", "0.5525361", "0.55206543", "0.54973465", "0.54973465", "0.54681706", "0.5415442", "0.53903043", "0.53068984", "0.5277721", "0.52742463", "0.5254985", "0.52476543", "0.52073383", "0....
0.70791703
0
context.step(steps, force = false) Stops the current context after a number of +steps+ are made. +force+ parameter (if true) ensures that the cursor moves from the current line.
def step(steps, force = false) #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def step(steps = 1)\n @running = true\n \n unless @started\n do_setup\n @started = true\n end\n \n step_discrete\n steps.to_i.times do\n break if clock > clock_finish\n self.step_count += 1\n step_continuous\n step_discrete\n @running = false\n yield sel...
[ "0.59728587", "0.59317935", "0.5768815", "0.5679898", "0.5611346", "0.55906224", "0.5486114", "0.54564655", "0.5420921", "0.53006965", "0.5212678", "0.51285917", "0.51089215", "0.5106602", "0.51035166", "0.5102643", "0.5068543", "0.49807268", "0.49571222", "0.4945342", "0.492...
0.69721305
0
context.step_over(steps, frame = nil, force = false) Steps over a +steps+ number of times. Make step over operation on +frame+, by default the current frame. +force+ parameter (if true) ensures that the cursor moves from the current line.
def step_over(steps, frame = nil, force = false) #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def step(symbol = :over)\n raise RuntimeError, \"can only step top frame\" unless @index === 1\n case symbol\n when :into\n @thread.__step_over_in_frame(0)\n when :over\n @thread.__step_over_in_frame(1)\n when Fixnum\n @thread.__step_ove...
[ "0.6124069", "0.57661784", "0.561959", "0.5553481", "0.54919463", "0.5349302", "0.52394855", "0.52306765", "0.5080505", "0.5064667", "0.5062398", "0.5038954", "0.49929854", "0.4868817", "0.48618066", "0.481636", "0.4810257", "0.4691803", "0.46550697", "0.46507102", "0.4645890...
0.83142155
0
context.thnum > int Returns the context's number.
def thnum() #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def identifier\n num\n end", "def num()\n\t\treturn @num\n\tend", "def td_number_before_saison\n return 3\n end", "def num()\n @num\n end", "def num\r\n @num\r\n end", "def num\n @num\n end", "def column_number\n env(:column_number).to_i - 1\n end", "def li...
[ "0.5684912", "0.5657714", "0.55187297", "0.5484435", "0.5455073", "0.5454178", "0.5436273", "0.5424014", "0.5369638", "0.53601897", "0.52985054", "0.5270507", "0.5262721", "0.5258526", "0.52210695", "0.52201474", "0.5217972", "0.5217972", "0.5217972", "0.5217972", "0.5217972"...
0.6627264
0
context.stop_reason > sym Returns the reason for the stop. It maybe of the following values: :initial, :step, :breakpoint, :catchpoint, :postmortem
def stop_reason() #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop_symbol\n STOP\n end", "def stop(event, reason=\"\", bag={})\n step_errors << reason unless reason == \"\"\n r = StepResult.new(false, reason)\n r.bag = bag\n fire_events(event, r)\n r\n end", "def stop(flags = {})\n raise BreakControllerException.new(flags)\n end", ...
[ "0.66273147", "0.629454", "0.6262377", "0.6055388", "0.59404385", "0.5926642", "0.57250553", "0.5692453", "0.5685622", "0.5669365", "0.5666084", "0.56274426", "0.55897015", "0.5584706", "0.5584706", "0.5573017", "0.5570875", "0.55692863", "0.5534579", "0.5534198", "0.55273503...
0.76403606
0
context.suspended? > bool Returns +true+ if the thread is suspended by debugger.
def suspended?() #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspended?\n status.suspended?\n end", "def is_suspended?\n current_teacher && current_teacher.suspended == true\n end", "def suspended?\n (status == SUSPEND)\n end", "def suspended?\n !active?\n end", "def suspended?\n (status == SUSPENDED)\n end", "def suspended\n ...
[ "0.76199895", "0.7105392", "0.7096407", "0.69690377", "0.69383776", "0.68270034", "0.67573303", "0.6369418", "0.6271647", "0.6264778", "0.6251077", "0.62107533", "0.6193293", "0.61832786", "0.6049362", "0.6015271", "0.59988904", "0.59984094", "0.5977086", "0.5952087", "0.5945...
0.7565439
1
context.tracing = bool Controls the tracing for this context.
def tracing= bool #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tracing?\n # The non-nil value of this instance variable\n # indicates if we are currently tracing\n # in this thread or not.\n self.current_trace ? true : false\n end", "def trace(bool)\n Options[:trace] = bool\n end", "def trace_context\n TraceContextData.new trace_i...
[ "0.64751333", "0.63221496", "0.6173602", "0.6167658", "0.60902816", "0.6049188", "0.59212685", "0.576751", "0.5726613", "0.56587684", "0.5629724", "0.55955744", "0.55809015", "0.553886", "0.55050445", "0.5484302", "0.5418977", "0.54049236", "0.53941494", "0.5393414", "0.53498...
0.75297266
0
context.frame_args(frame_position=0) > list Returns frame's argument parameters
def frame_args(frame_position=0) #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def frame_args_info(frame_position=0)\n #This is a stub, used for indexing\n end", "def frame_locals(frame)\n #This is a stub, used for indexing\n end", "def args\n @function.args\n end", "def get_args\n <<-CODE\n stack_push(I2N(c->args));\n CODE\n en...
[ "0.8184107", "0.72241396", "0.6730563", "0.6720058", "0.6580736", "0.6578291", "0.6574132", "0.65566057", "0.65477014", "0.65438724", "0.652671", "0.65024203", "0.65015596", "0.64470434", "0.63704914", "0.63704914", "0.63704914", "0.63285214", "0.63285214", "0.6273936", "0.61...
0.8568744
0
context.frame_args_info(frame_position=0) > list if track_frame_args or nil otherwise Returns info saved about call arguments (if any saved).
def frame_args_info(frame_position=0) #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def frame_args(frame_position=0)\n #This is a stub, used for indexing\n end", "def frame_info(b, verbose = T.unsafe(nil)); end", "def frame_locals(frame)\n #This is a stub, used for indexing\n end", "def frame\n context.frame\n end", "def inspect_details\n\t\t\tr...
[ "0.73614925", "0.67115647", "0.62972516", "0.5916123", "0.5851767", "0.564387", "0.5492211", "0.541012", "0.5378247", "0.5325605", "0.5295451", "0.5292543", "0.5257294", "0.52423185", "0.5241608", "0.52381957", "0.52247214", "0.52034533", "0.51905805", "0.5182769", "0.5158352...
0.8432847
0
context.frame_binding(frame_position=0) > binding Returns frame's binding.
def frame_binding(frame_position=0) #This is a stub, used for indexing end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_binding\r\n binding\r\n end", "def get_binding\n binding\n end", "def get_binding\n binding\n end", "def get_binding\n binding\n end", "def get_binding\n binding\n end", "def get_binding\n binding\n end", "def get_binding...
[ "0.74325603", "0.7393375", "0.73767585", "0.73767585", "0.73767585", "0.73767585", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.7356188", "0.72688013", "0.7268207", "0.7268207", "0.7268207", "0.7268207", "0.7268207...
0.88787585
0