query stringlengths 7 9.55k | document stringlengths 10 363k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102 values |
|---|---|---|---|---|---|---|
DELETE /tests/1 DELETE /tests/1.json | def destroy
@test.destroy
respond_to do |format|
format.html { redirect_to tests_url, notice: 'Test was successfully destroyed.' }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @test.destroy\n respond_to do |format|\n format.html { redirect_to tests_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @test.destroy\n respond_to do |format|\n format.html { redirect_to tests_url }\n format.json { head :no_content }\n e... | [
"0.7714073",
"0.7714073",
"0.76993823",
"0.74377954",
"0.73900163",
"0.73229724",
"0.7315204",
"0.72704124",
"0.726755",
"0.7227424",
"0.7193738",
"0.718851",
"0.71764004",
"0.7156611",
"0.7138094",
"0.7136512",
"0.7135397",
"0.71252537",
"0.71075827",
"0.7105353",
"0.7105136... | 0.74184704 | 10 |
Use callbacks to share common setup or constraints between actions. | def set_test
@test = Test.find(params[:id])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"def action_hook; end",
"def run_actions; end",
"def define_action_hook; end",
"def actions; end",
"def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_... | [
"0.6163163",
"0.6045976",
"0.5946146",
"0.591683",
"0.5890051",
"0.58349305",
"0.5776858",
"0.5703237",
"0.5703237",
"0.5652805",
"0.5621621",
"0.54210985",
"0.5411113",
"0.5411113",
"0.5411113",
"0.5391541",
"0.53794575",
"0.5357573",
"0.53402257",
"0.53394014",
"0.53321576"... | 0.0 | -1 |
Never trust parameters from the scary internet, only allow the white list through. | def test_params
# params.fetch(:test, {})
params.require(:test).permit(:subject_id, :time_required, :number_of_questions, :user_id)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end",
"def allow_params_authentication!; end",
"def allowed_params\n ALLOWED_PARAMS\n end",
"def default_param_whitelist\n [\"mode\"]\n... | [
"0.6981537",
"0.67835593",
"0.6748275",
"0.67436063",
"0.6736311",
"0.65937173",
"0.6503359",
"0.6498499",
"0.6482832",
"0.6478776",
"0.645703",
"0.6439998",
"0.63802195",
"0.6377008",
"0.6366287",
"0.632018",
"0.63016284",
"0.63011277",
"0.62932974",
"0.62919617",
"0.6290564... | 0.0 | -1 |
FizzBuzz The Programmer's Stairway to Heaven Define the fizzbuzz method to do the following: 10pts Use the modulo % method (divisible by) 2 % 2 => true 1 % 2 => false If a number is divisible by 3, puts "Fizz". If a number is divisible by 5, puts "Buzz". If a number is divisible by 3 and 5, puts "FizzBuzz" Use if statements 2pts Use the && operator 3pts Write a loop that will group the numbers from 1 through 50 by whether they fizz, buzz, or fizzbuzz 10pts solution 1 | def fizzbuzz(num)
collection = (1..num).to_a
collection.each do |num|
if (num % 3 == 0) && (num % 5 != 0)
puts "Fizz #{num}"
elsif (num % 5 == 0) && (num % 3 != 0)
puts "Buzz #{num}"
elsif (num % 3 == 0) && (num % 5 == 0)
puts "FizzBuzz #{num}"
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fizzbuzz\n\t(1..100).each do |num|\n\t if num % 3 == 0 && num % 5 == 0\n\t\tputs \"Fizzbuzz\"\n\t elsif num % 3 == 0\n\t\tputs \"Fizz\"\n\t elsif num % 5 == 0 \n\t\tputs \"Buzz\"\n\t else\n\t\tputs num\n\t end\n\tend\nend",
"def fizzbuzz\n\n\tfor i in (1..100) do\n\t\tif i % 3 == 0 and i % 5 == 0\n\t\t\... | [
"0.8684358",
"0.8621742",
"0.86174226",
"0.85953134",
"0.85786533",
"0.8488763",
"0.84774846",
"0.8477323",
"0.84768677",
"0.8475961",
"0.84548813",
"0.84440327",
"0.8442429",
"0.8436295",
"0.84282774",
"0.8427708",
"0.8423755",
"0.8408999",
"0.84083796",
"0.83991957",
"0.839... | 0.8213768 | 56 |
Accpets lat/lon coordinates and returns detailed political information. | def initialize coordinates
if coordinates.is_a?(Array)
@coordinates = ActiveSupport::JSON.encode(coordinates.map!{|a|CGI::escape(a)}) if coordinates.is_a?(Array)
elsif coordinates.is_a?(String)
@coordinates = CGI::escape(coordinates)
elsif coordinates.is_a?(Hash)
coordinates = sanitize(coordinates)
@coordinates = ActiveSupport::JSON.encode(coordinates.map!{|a| a.map!{|b| CGI::escape(b)}}) if coordinates.is_a?(Array)
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def location\n if [latitude, longitude].all?(&:present?)\n [latitude, longitude]\n end\n end",
"def show\n positive = Positive.find(params[:id])\n @longlat = positive.lonlat\n\n @latlong= positive.lonlat\n\n end",
"def latlon\r\n [latitude,longitude]\r\n end",
"def l... | [
"0.6227487",
"0.61855775",
"0.60524994",
"0.60524994",
"0.60524994",
"0.6035276",
"0.6013638",
"0.6001187",
"0.59712887",
"0.59503263",
"0.59459955",
"0.59372807",
"0.59372807",
"0.59322053",
"0.59092426",
"0.5907989",
"0.5904974",
"0.5878478",
"0.5877239",
"0.5876684",
"0.58... | 0.0 | -1 |
6h > 1/12 off 12h > 2/12 off 18h > 3/12 off 24h > 4/12 off | def flat_prices(hourly_price)
{
"6h" => {:duration => 6.hours, :price => "#{hourly_price*5.5}"},
"12h" => {:duration => 12.hours, :price => "#{hourly_price*10}"},
"18h" => {:duration => 18.hours, :price => "#{hourly_price*13.5}"},
"24h" => {:duration => 24.hours, :price => "#{hourly_price*16}"},
}
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def angl(hrs, mnts)\n 0.5 * (60 * hrs - 11 * mnts)\nend",
"def fuel_per_hour\n 10\n end",
"def cooking_time(eggs)\n (eggs.to_f / 8).ceil * 5\nend",
"def boil_off_gallons_per_hour\n 1.0\n end",
"def hours\n _nudge[0]\n end",
"def calc_raw_hours(job, task_name, effort)\n if $op_cyclo... | [
"0.6147789",
"0.6109509",
"0.6086442",
"0.60184824",
"0.6015286",
"0.5951903",
"0.5906973",
"0.5905018",
"0.5898006",
"0.5874781",
"0.58522534",
"0.5844289",
"0.5834794",
"0.5795807",
"0.5775393",
"0.5760071",
"0.575431",
"0.5750253",
"0.5747266",
"0.5746979",
"0.57449245",
... | 0.0 | -1 |
GET /exhibitior_categories/1 GET /exhibitior_categories/1.json | def show
@exhibitior_category = ExhibitiorCategory.find(params[:id])
@exhibitor = @exhibitior_category.exhibitors
respond_to do |format|
format.html # show.html.erb
format.json { render json: @exhibitior_category }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_categories\r\n categories = Taxonomy.get_categories\r\n render json: categories, root: 'categories', adapter: :json, status: :ok\r\n end",
"def categories\n\t\trender :json => {:status => 1, :categories => {\"1\" => \"Apparel & Accessories\", \"2\" => \"Arts and Crafts\", \"3\" => \"Electronics\",... | [
"0.7283221",
"0.7197113",
"0.71034133",
"0.7012842",
"0.6995474",
"0.6891323",
"0.677795",
"0.6718196",
"0.66946024",
"0.6640794",
"0.66325146",
"0.6614414",
"0.661238",
"0.66113895",
"0.66095465",
"0.6600718",
"0.6584939",
"0.6574456",
"0.6573825",
"0.6573825",
"0.65720296",... | 0.6923125 | 5 |
GET /exhibitior_categories/new GET /exhibitior_categories/new.json | def new
@exhibitior_category = ExhibitiorCategory.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @exhibitior_category }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new\n puts @category.inspect\n @internal = @category.internals.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @internal }\n end\n end",
"def new\n @category = Category.new\n respond_to do |format|\n format.html # new.html.erb\n ... | [
"0.74364746",
"0.73833764",
"0.73656535",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7362489",
"0.7344639",
"0.73279166",
"0.7327913",
"0.7300623",
"0.7237526",
"0.7175016",
"0.71696764",
"0.71354294",
"0.7132861... | 0.77980167 | 0 |
POST /exhibitior_categories POST /exhibitior_categories.json | def create
@exhibitior_category = ExhibitiorCategory.new(params[:exhibitior_category])
respond_to do |format|
if @exhibitior_category.save
format.html { redirect_to @exhibitior_category, notice: 'Exhibitior category was successfully created.' }
format.json { render json: @exhibitior_category, status: :created, location: @exhibitior_category }
else
format.html { render action: "new" }
format.json { render json: @exhibitior_category.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create\n @categoria = Categoria.new(categoria_params)\n if @categoria.save\n render json: @categoria\n else\n render json: @categoria.errors, status: :unprocessable_entity\n end\n end",
"def create_category payload\n\t\t\t\t\tFreshdesk::Api::Client.convert_to_hash( @connection.post CA... | [
"0.67995447",
"0.67280954",
"0.6692331",
"0.6446782",
"0.64250207",
"0.6298797",
"0.62950927",
"0.6272612",
"0.6272286",
"0.62249583",
"0.62238014",
"0.621838",
"0.61868274",
"0.61715853",
"0.61662114",
"0.61554",
"0.61518496",
"0.6138151",
"0.6121284",
"0.6093589",
"0.609086... | 0.698518 | 0 |
PUT /exhibitior_categories/1 PUT /exhibitior_categories/1.json | def update
@exhibitior_category = ExhibitiorCategory.find(params[:id])
respond_to do |format|
if @exhibitior_category.update_attributes(params[:exhibitior_category])
format.html { redirect_to @exhibitior_category, notice: 'Exhibitior category was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @exhibitior_category.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpdateCategory params = {}\n \n APICall(path: 'categories.json',method: 'PUT',payload: params.to_json)\n \n end",
"def update_categories(categories, options = {} )\n options.merge!(:docid => self.docid, :categories => categories)\n resp = @conn.put do |req|\n ... | [
"0.68047875",
"0.6802997",
"0.65672714",
"0.65645427",
"0.6486565",
"0.6376908",
"0.630117",
"0.6256176",
"0.62543267",
"0.6214432",
"0.6180587",
"0.61505646",
"0.61470294",
"0.6122314",
"0.6117411",
"0.611602",
"0.61112916",
"0.60785085",
"0.6060442",
"0.60554504",
"0.604269... | 0.7001599 | 0 |
DELETE /exhibitior_categories/1 DELETE /exhibitior_categories/1.json | def destroy
@exhibitior_category = ExhibitiorCategory.find(params[:id])
@exhibitior_category.destroy
respond_to do |format|
format.html { redirect_to exhibitior_categories_url }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @exhibitor_category = ExhibitorCategory.find(params[:id])\n @exhibitor_category.destroy\n\n respond_to do |format|\n format.html { redirect_to exhibitor_categories_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n #@incidentcategory.destroy\n render ... | [
"0.73797965",
"0.73602843",
"0.7295814",
"0.7242014",
"0.72043025",
"0.7200795",
"0.7151931",
"0.712239",
"0.71190214",
"0.71094865",
"0.7101901",
"0.7101655",
"0.7088081",
"0.70532817",
"0.7044528",
"0.70421284",
"0.7000866",
"0.6995815",
"0.6992089",
"0.698252",
"0.6978376"... | 0.77388936 | 0 |
+last_date_update+ is DateTime object | def get_ui_properties(language_id, last_date_update)
request('getUIProperties', {
accessKeyCode: @access_key_code,
languageId: language_id,
osType: @os_type,
lastDateUpdate: last_date_update,
})
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def last_updated\n self.dig_for_datetime(\"lastUpdateOn\")\n end",
"def last_update_date_time\n return @last_update_date_time\n end",
"def last_update_date_time\n return @last_update_date_time\n end",
"def last_update_date_time\n return @... | [
"0.7999643",
"0.79497194",
"0.79497194",
"0.79497194",
"0.79497194",
"0.77626234",
"0.76669496",
"0.76669496",
"0.76669496",
"0.76669496",
"0.76613456",
"0.7595919",
"0.7595919",
"0.7595919",
"0.7595919",
"0.75562894",
"0.7496774",
"0.7496774",
"0.7496774",
"0.7496774",
"0.73... | 0.0 | -1 |
Payments history for calendar month +month_period+ +month_period+ A string like 'yyyyMM' that represent month of year | def get_payments_history(month_period)
request('getPaymentsHistory', base_api_parameters.merge({ monthPeriod: month_period }))
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def month() end",
"def period\n case self.recurring_month\n when 12\n 1.year # 1.year != 12.months\n else\n self.recurring_month.months\n end\n end",
"def monthly\n end",
"def month=(_arg0); end",
"def month; end",
"def month; end",
"def calculate_month_and_next_month(year, mont... | [
"0.66572005",
"0.6550886",
"0.6426259",
"0.6388943",
"0.6368296",
"0.6368296",
"0.6343893",
"0.63118684",
"0.62379336",
"0.62376076",
"0.6217388",
"0.6216285",
"0.6178661",
"0.61545473",
"0.61245275",
"0.6068385",
"0.60121477",
"0.60079324",
"0.5964177",
"0.5949472",
"0.59494... | 0.6724994 | 0 |
Summary expenses report for calendar month +month_period+ +month_period+ A string like 'yyyyMM' that represent month of year | def get_expenses_summary(month_period)
request('getExpensesSummary', base_api_parameters.merge({ monthPeriod: month_period }))
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def month() end",
"def expenses_for(m)\n d = Date.parse(m)\n exp = self.expenses.within_range(d, ((d + 1.month) - 1.day)).sum(:amount)\n exp.nil? ? 0 : exp\n end",
"def month_depot\n \"#{depot.name} \"+\"#{issue_date.strftime(\"%b\")} \"+\"#{issue_date.year}\"\n end",
"def month; end",
"def m... | [
"0.68188566",
"0.677088",
"0.666363",
"0.66531795",
"0.66531795",
"0.6549146",
"0.63745123",
"0.63384",
"0.63263035",
"0.6311498",
"0.6289573",
"0.6287287",
"0.6285008",
"0.62812096",
"0.62656796",
"0.61824304",
"0.61760306",
"0.6157619",
"0.6134104",
"0.60981125",
"0.6065677... | 0.6889355 | 0 |
Initializer that takes an XcodeTarget as an input | def initialize(target)
@target = target
@name = target.display_name
@is_test_target = target.test_target_type?
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initialize(target, test_xcconfig = false)\n @target = target\n @test_xcconfig = test_xcconfig\n end",
"def initialize(pod_name, xcode_project)\n @config = {}\n @pod_name = pod_name\n @target = xcode_project.targets\n .find{|t| t.display_name == \"Po... | [
"0.69580126",
"0.6594453",
"0.6533583",
"0.62215656",
"0.6086976",
"0.59508395",
"0.59352964",
"0.5930769",
"0.5930769",
"0.5893715",
"0.5836138",
"0.5746859",
"0.57455",
"0.57270455",
"0.57203597",
"0.5716434",
"0.5716434",
"0.5625041",
"0.55393636",
"0.54645896",
"0.5457747... | 0.5960514 | 5 |
Returns an Array of dependencies on the target | def dependency_list
@target.dependencies.map(&:display_name)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dependencies\n @target_dependencies + (@parent ? @parent.dependencies : [])\n end",
"def dependencies\n @dependencies.collect { |name, dependency| dependency }\n end",
"def dependencies\n []\n end",
"def dependencies\n @dependencies.values\n end",
"def de... | [
"0.78034174",
"0.77154183",
"0.7679972",
"0.76735425",
"0.76414096",
"0.7542985",
"0.7542985",
"0.7542985",
"0.7542985",
"0.74957013",
"0.7423224",
"0.7314318",
"0.7239806",
"0.7239806",
"0.7239806",
"0.7198187",
"0.71836644",
"0.7183548",
"0.7125391",
"0.70432097",
"0.703956... | 0.80951196 | 0 |
Returns [String] of file names | def file_name_list
@target.source_build_phase.file_display_names
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filenames\n files.map(&:filename)\n end",
"def filenames\n files.map(&:filename)\n end",
"def filenames\n files.map(&:filename)\n end",
"def filenames\n @filenames ||= files.map(&:to_s)\n end",
"def filenames\n file_stats.map(&:filename)\n end",
"def filenames\n ... | [
"0.8364035",
"0.8364035",
"0.8364035",
"0.82256323",
"0.79260296",
"0.7870653",
"0.7588307",
"0.75071985",
"0.74748987",
"0.7444979",
"0.74150676",
"0.7351819",
"0.72789973",
"0.72675127",
"0.7263518",
"0.7258242",
"0.72468466",
"0.7233146",
"0.7172104",
"0.71389246",
"0.7102... | 0.72593516 | 15 |
Returns [String] of all the unit imports statements in the target | def all_unique_imports
files.map(&:all_imports).flatten.uniq
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def importsText\n @imps.to_a.map{|k| \"import #{k};\"}.sort.join(\"\\n\")\n end",
"def get_imports (path)\n imports = []\n puts \"path: #{path}\"\n for line in `otool -L '#{path}'`.split(\"\\n\")\n if line =~ /^\\t(.*)\\s*\\(.*\\)$/\n import = Pathname.new($1.rstrip)\n if import... | [
"0.6359902",
"0.61997193",
"0.55647385",
"0.548845",
"0.5446279",
"0.5401778",
"0.5334681",
"0.53240085",
"0.53178465",
"0.53126687",
"0.5306509",
"0.5261681",
"0.5152914",
"0.5152914",
"0.51235974",
"0.5075297",
"0.5075297",
"0.5047322",
"0.50130403",
"0.5012704",
"0.500871"... | 0.5357686 | 6 |
Returns names of files with duplicates imports. | def files_with_duplicate_imports
files.select(&:has_duplicate_import?)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def all_unique_imports\n files.map(&:all_imports).flatten.uniq\n end",
"def remove_duplicate_imports\n files.each(&:remove_duplicate_imports)\n end",
"def duplicate_imports_info\n import_frequency_mapping = {}\n all_imports.uniq.each do |item|\n item_occurrence = all_imports.count(item)\n ... | [
"0.8267978",
"0.7631692",
"0.6641064",
"0.64679164",
"0.6379785",
"0.6194772",
"0.61196035",
"0.6074548",
"0.5990646",
"0.5987395",
"0.59770125",
"0.59103966",
"0.58946514",
"0.5876847",
"0.5834983",
"0.57414603",
"0.57414603",
"0.5686114",
"0.5671773",
"0.5630323",
"0.558754... | 0.8417419 | 0 |
Returns the description of the object | def to_s
"Target - #{@name}"
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def description\n object[\"description\"]\n end",
"def describe\n @description\n end",
"def describe\n @description\n end",
"def description\n end",
"def description\n end",
"def description; end",
"def description; end",
"def description; end",
"def descri... | [
"0.86279297",
"0.8180344",
"0.8180344",
"0.81107014",
"0.81107014",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.80550545",
"0.7947243",
"0.79452896",
"0.79452896",
"0.79452896",
"0.79452896",
... | 0.0 | -1 |
Returns the unused dependencies on the target | def unused_dependencies_list
imports = all_unique_imports.map { |import| import.split.last }
dependency_list - imports
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_unused_dependencies\n # puts 'removing unused dependencies list.'\n dependencies = @target.dependencies\n dependencies.each do |dependency|\n dependency.remove_from_project if unused_dependencies_list.include? dependency.display_name\n end\n end",
"def enabled_dependencies\n @de... | [
"0.75177723",
"0.7088838",
"0.6891703",
"0.68696356",
"0.6738311",
"0.6725072",
"0.66946477",
"0.66920424",
"0.6681482",
"0.6672426",
"0.66719073",
"0.6666976",
"0.66294324",
"0.6573338",
"0.65641856",
"0.65641856",
"0.65641856",
"0.65641856",
"0.6527892",
"0.64535195",
"0.64... | 0.7489569 | 1 |
Removed the unused target dependencies on the target. | def remove_unused_dependencies
# puts 'removing unused dependencies list.'
dependencies = @target.dependencies
dependencies.each do |dependency|
dependency.remove_from_project if unused_dependencies_list.include? dependency.display_name
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_dependencies\n raise 'Not implemented'\n end",
"def prune_dependencies\n class_names = @classes.map {|klass| klass.name}\n @classes.each do |klass|\n klass.dependencies = klass.dependencies.uniq.keep_if {|dep| class_names.include?(dep)}\n end\n end",
"def remove_from_dep... | [
"0.6889047",
"0.6659218",
"0.6656846",
"0.653687",
"0.647297",
"0.647297",
"0.63622",
"0.6326725",
"0.6312936",
"0.6293903",
"0.62418056",
"0.62074286",
"0.61986613",
"0.6183366",
"0.6173584",
"0.61659145",
"0.6149706",
"0.6058918",
"0.60501415",
"0.60405105",
"0.6039996",
... | 0.85026187 | 0 |
Removes all the duplicate import statements from all the files linked to the target | def remove_duplicate_imports
files.each(&:remove_duplicate_imports)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_duplicate_imports\n duplicate_imports_mapping = duplicate_imports_info\n duplicate_imports = duplicate_imports_mapping.keys\n file_lines = IO.readlines(@path, chomp: true).select do |line|\n if duplicate_imports.include? line\n if duplicate_imports_mapping[line] <= 1\n line... | [
"0.6893452",
"0.67451614",
"0.6592932",
"0.60712755",
"0.60682005",
"0.59842294",
"0.5977443",
"0.5866538",
"0.5861052",
"0.5858443",
"0.58310634",
"0.58169115",
"0.578584",
"0.57832396",
"0.5782469",
"0.5743226",
"0.572319",
"0.5685762",
"0.56426513",
"0.56395173",
"0.562401... | 0.83346874 | 0 |
GET /businessbooks GET /businessbooks.json | def index
@businessbooks = Businessbook.search(params[:search]).paginate(:per_page => 18, :page => params[:page])
respond_to do |format|
format.html # index.html.erb
format.json { render :json => @businessbooks }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def show\n @businessbook = Businessbook.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render :json => @businessbook }\n end\n end",
"def index\n base_url = 'https://www.googleapis.com/books/v1/volumes?q=fiction&maxResults=20'\n and_key = '&key='\... | [
"0.7298897",
"0.70421624",
"0.695971",
"0.69306314",
"0.68328303",
"0.67693084",
"0.672795",
"0.66955805",
"0.66766506",
"0.66766506",
"0.66766506",
"0.6676336",
"0.6658967",
"0.6612253",
"0.6606977",
"0.6593214",
"0.65840733",
"0.6574277",
"0.65341747",
"0.6504094",
"0.65039... | 0.7229365 | 1 |
GET /businessbooks/1 GET /businessbooks/1.json | def show
@businessbook = Businessbook.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render :json => @businessbook }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index\n base_url = 'https://www.googleapis.com/books/v1/volumes?q=fiction&maxResults=20'\n and_key = '&key='\n key = ENV['GOOGLE_BOOKS_API_KEY'] \n googleurl = base_url + and_key + key\n\n response = RestClient.get(googleurl)\n @books = JSON.parse(response)\n\n respond_to do |format|\n format.html\n ... | [
"0.699776",
"0.6908427",
"0.6835466",
"0.6817468",
"0.6666077",
"0.66522855",
"0.66353226",
"0.66289055",
"0.6626388",
"0.6619751",
"0.6619751",
"0.6619751",
"0.6552016",
"0.6552016",
"0.6552016",
"0.6543199",
"0.65218496",
"0.65097106",
"0.64712507",
"0.6463741",
"0.6460948"... | 0.7402133 | 0 |
GET /businessbooks/new GET /businessbooks/new.json | def new
@businessbook = Businessbook.new
respond_to do |format|
format.html # new.html.erb
format.json { render :json => @businessbook }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new\n @book = Book.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @book }\n end\n end",
"def new\n @book = Book.new\n \n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @book }\n end\n en... | [
"0.7581938",
"0.7581938",
"0.7566873",
"0.75459146",
"0.75042427",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7498681",
"0.7489435",
"0.747616",
"0.74659175",
"0.7336534",
"0.73196006",
... | 0.7909274 | 0 |
POST /businessbooks POST /businessbooks.json | def create
@businessbook = Businessbook.new(params[:businessbook])
respond_to do |format|
if @businessbook.save
format.html { redirect_to @businessbook, :notice => 'Businessbook was successfully created.' }
format.json { render :json => @businessbook, :status => :created, :location => @businessbook }
else
format.html { render :action => "new" }
format.json { render :json => @businessbook.errors, :status => :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create\n @book = Book.new(book_params)\n\n if @book.save\n render json: @book, status: :created, location: @book\n else\n render json: @book.errors, status: :unprocessable_entity\n end\n end",
"def create\n @api_book = Api::Book.new(api_book_params)\n\n if @api_book.save\n r... | [
"0.65611285",
"0.6463056",
"0.6416757",
"0.64146",
"0.6325686",
"0.62910694",
"0.6285444",
"0.62647307",
"0.61569035",
"0.6153173",
"0.61375266",
"0.61241496",
"0.6092917",
"0.6091869",
"0.60832745",
"0.6066547",
"0.60340077",
"0.6032788",
"0.6032788",
"0.6032788",
"0.6032788... | 0.7194014 | 0 |
PUT /businessbooks/1 PUT /businessbooks/1.json | def update
@businessbook = Businessbook.find(params[:id])
respond_to do |format|
if @businessbook.update_attributes(params[:businessbook])
format.html { redirect_to @businessbook, :notice => 'Businessbook was successfully updated.' }
format.json { head :no_content }
else
format.html { render :action => "edit" }
format.json { render :json => @businessbook.errors, :status => :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update\n @api_book = Api::Book.find(params[:id])\n\n if @api_book.update(api_book_params)\n head :no_content\n else\n render json: @api_book.errors, status: :unprocessable_entity\n end\n end",
"def update\n @book = Book.find(params[:id])\n\n respond_to do |format|\n if @book... | [
"0.6816322",
"0.68015784",
"0.6615512",
"0.64487374",
"0.64161587",
"0.6367759",
"0.63424164",
"0.6319049",
"0.6302526",
"0.6262543",
"0.6261328",
"0.6230062",
"0.6225963",
"0.62095773",
"0.6199712",
"0.6150143",
"0.6147326",
"0.61428815",
"0.6136365",
"0.61291105",
"0.612089... | 0.69470376 | 0 |
DELETE /businessbooks/1 DELETE /businessbooks/1.json | def destroy
@businessbook = Businessbook.find(params[:id])
@businessbook.destroy
respond_to do |format|
format.html { redirect_to businessbooks_url }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @api_book.destroy\n\n head :no_content\n end",
"def destroy\n @business = Business.find(params[:id])\n @business.destroy\n\n respond_to do |format|\n format.html { redirect_to businesses_url }\n format.json { head :no_content }\n end\n end",
"def destroy\n @busine... | [
"0.72218",
"0.7198506",
"0.7082027",
"0.7044859",
"0.6987978",
"0.6974579",
"0.6963525",
"0.6953768",
"0.6933736",
"0.6933736",
"0.6932949",
"0.69251823",
"0.69176364",
"0.69176364",
"0.69176364",
"0.69176364",
"0.69176364",
"0.69176364",
"0.69176364",
"0.69176364",
"0.691763... | 0.77143854 | 0 |
GET /admin/digersayfas GET /admin/digersayfas.json | def index
@admin_digersayfas = Admin::Digersayfa.all
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_admin_digersayfa\n @admin_digersayfa = Admin::Digersayfa.find(params[:id])\n end",
"def index\n return if !current_user.admin?\n @disfrazs = Disfraz.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @disfrazs }\n end\n end",
"def u... | [
"0.6332812",
"0.5838458",
"0.5823415",
"0.5746072",
"0.5675711",
"0.5658039",
"0.5600863",
"0.55869013",
"0.5580449",
"0.5578242",
"0.5536106",
"0.5519336",
"0.5491851",
"0.5478802",
"0.54681295",
"0.54366094",
"0.5430967",
"0.54264057",
"0.5415979",
"0.54115105",
"0.5406339"... | 0.7174638 | 0 |
GET /admin/digersayfas/1 GET /admin/digersayfas/1.json | def show
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index\n @admin_digersayfas = Admin::Digersayfa.all\n end",
"def set_admin_digersayfa\n @admin_digersayfa = Admin::Digersayfa.find(params[:id])\n end",
"def show\n @plan = Plan.find(params[:id])\n @plan_days = @plan.plan_days\n\n respond_to do |format|\n format.html # show.html.erb... | [
"0.70862883",
"0.6558961",
"0.6136362",
"0.59907556",
"0.5906217",
"0.5857102",
"0.57937604",
"0.5792702",
"0.5788913",
"0.57844335",
"0.5750954",
"0.5741722",
"0.57402575",
"0.5707392",
"0.569033",
"0.5659121",
"0.5651803",
"0.56509614",
"0.5648965",
"0.5644548",
"0.56415737... | 0.0 | -1 |
POST /admin/digersayfas POST /admin/digersayfas.json | def create
@admin_digersayfa = Admin::Digersayfa.new(admin_digersayfa_params)
@turad = { 0 => "Bilim İnsanları", 1 => "Resmi Evraklar", 2 => "İlginç Bilgiler", 3 => "Motivasyon", 4 => "Sınav Sistemi"}
@tur = { 0 => "biliminsanlari", 1 => "resmievraklar", 2 => "ilgincbilgiler", 3 => "motivasyon", 4 => "sinavsistemi"}
respond_to do |format|
if @admin_digersayfa.save
Admin::Duyuru.create(aciklama: @admin_digersayfa.created_at.to_s.split(" ")[0] + " " + @turad[@admin_digersayfa.tur] + " " + @admin_digersayfa.baslik + " yazısı eklenmiştir.<a href=/" + @tur[@admin_digersayfa.tur] + "> Yazıya ulaşmak için tıklayınız. </a>", tur: 0)
format.html { redirect_to @admin_digersayfa, notice: 'Yazı başarılı bir şekilde oluşturuldu.' }
format.json { render :show, status: :created, location: @admin_digersayfa }
else
format.html { render :new }
format.json { render json: @admin_digersayfa.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def admin_digersayfa_params\n params.require(:admin_digersayfa).permit(:baslik, :metin, :tur, :dosya) \n end",
"def update\n respond_to do |format|\n if @admin_digersayfa.update(admin_digersayfa_params)\n format.html { redirect_to @admin_digersayfa, notice: 'Digersayfa was successfully upd... | [
"0.59678805",
"0.58623284",
"0.5756909",
"0.5643321",
"0.55046505",
"0.54953986",
"0.5492916",
"0.54927695",
"0.54807836",
"0.5457218",
"0.5453056",
"0.5415985",
"0.535122",
"0.5335929",
"0.53337973",
"0.5330513",
"0.5296965",
"0.5279655",
"0.5257377",
"0.52537113",
"0.525194... | 0.6569528 | 0 |
PATCH/PUT /admin/digersayfas/1 PATCH/PUT /admin/digersayfas/1.json | def update
respond_to do |format|
if @admin_digersayfa.update(admin_digersayfa_params)
format.html { redirect_to @admin_digersayfa, notice: 'Digersayfa was successfully updated.' }
format.json { render :show, status: :ok, location: @admin_digersayfa }
else
format.html { render :edit }
format.json { render json: @admin_digersayfa.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update\n keystone.update_tenant({:id=>params[:id],:name=>params[:name],:description=>params[:description],:enabled=>params[:enabled]})\n respond_to do |format|\n format.html { redirect_to tenants_path, :notice => 'Tenant was successfully updated.' }\n format.json { head :ok }\n end\n en... | [
"0.6654816",
"0.6445601",
"0.62220114",
"0.6175265",
"0.61671823",
"0.6163973",
"0.6111223",
"0.60848165",
"0.603647",
"0.6017741",
"0.6017741",
"0.5998265",
"0.5995518",
"0.59791595",
"0.5892284",
"0.5880789",
"0.58544594",
"0.58405834",
"0.58374256",
"0.5806576",
"0.5792266... | 0.68653923 | 0 |
DELETE /admin/digersayfas/1 DELETE /admin/digersayfas/1.json | def destroy
@admin_digersayfa.destroy
respond_to do |format|
format.html { redirect_to admin_digersayfas_url, notice: 'Digersayfa was successfully destroyed.' }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_tenant_circle(args = {}) \n delete(\"/tenantcircles.json/#{args[:circleId]}\", args)\nend",
"def delete\n response = WebPay.client.delete(path)\n response['deleted']\n end",
"def delete\n client.delete(\"/#{id}\")\n end",
"def delete()\n @api.do_request(\"DELETE\", get_... | [
"0.74236",
"0.7324176",
"0.7195265",
"0.71433914",
"0.71433914",
"0.71433914",
"0.71433914",
"0.70854354",
"0.7054274",
"0.69827485",
"0.6969745",
"0.6968206",
"0.6907897",
"0.6904587",
"0.68939435",
"0.68937755",
"0.68937755",
"0.6888857",
"0.6878041",
"0.68323946",
"0.68077... | 0.75525564 | 0 |
Use callbacks to share common setup or constraints between actions. | def set_admin_digersayfa
@admin_digersayfa = Admin::Digersayfa.find(params[:id])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"def action_hook; end",
"def run_actions; end",
"def define_action_hook; end",
"def actions; end",
"def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_... | [
"0.6165094",
"0.60450804",
"0.5944413",
"0.5915806",
"0.58885634",
"0.5835225",
"0.5775847",
"0.5700531",
"0.5700531",
"0.56543404",
"0.56209993",
"0.54238355",
"0.5410386",
"0.5410386",
"0.5410386",
"0.5394892",
"0.5377769",
"0.53559244",
"0.5339896",
"0.53388095",
"0.533008... | 0.0 | -1 |
Never trust parameters from the scary internet, only allow the white list through. | def admin_digersayfa_params
params.require(:admin_digersayfa).permit(:baslik, :metin, :tur, :dosya)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end",
"def allow_params_authentication!; end",
"def allowed_params\n ALLOWED_PARAMS\n end",
"def default_param_whitelist\n [\"mode\"]\n... | [
"0.6978086",
"0.6780264",
"0.6742658",
"0.6738813",
"0.67338693",
"0.65908474",
"0.6501793",
"0.6495506",
"0.64796513",
"0.64755446",
"0.6454826",
"0.6437561",
"0.6377127",
"0.63722163",
"0.6364058",
"0.63178706",
"0.62979764",
"0.62968165",
"0.62913024",
"0.6289789",
"0.6289... | 0.0 | -1 |
GET /instituicoes GET /instituicoes.json | def index
@instituicoes = Instituicao.all
respond_to do |format|
format.html # index.html.erb
format.json { render json: @instituicoes }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def show\n @instituicao = Instituicao.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @instituicao }\n end\n end",
"def index\n @instancia = Instancium.all\n end",
"def show\n @institucional = Institucional.find(params[:id])\n\n... | [
"0.751949",
"0.6958533",
"0.68788326",
"0.68244416",
"0.6755332",
"0.6747474",
"0.67021245",
"0.6619203",
"0.6611335",
"0.66074824",
"0.6586544",
"0.65787476",
"0.64574796",
"0.64278275",
"0.641245",
"0.6407009",
"0.640509",
"0.640509",
"0.63766575",
"0.63558304",
"0.634916",... | 0.7875285 | 0 |
GET /instituicoes/1 GET /instituicoes/1.json | def show
@instituicao = Instituicao.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @instituicao }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index\n @instituicoes = Instituicao.all\n\n respond_to do |format|\n format.html # index.html.erb\n format.json { render json: @instituicoes }\n end\n end",
"def show\n @institucional = Institucional.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n ... | [
"0.7704511",
"0.70620894",
"0.69456315",
"0.68963146",
"0.6868936",
"0.685834",
"0.6730599",
"0.66842204",
"0.6682483",
"0.6668672",
"0.66208",
"0.65291506",
"0.65291506",
"0.6524573",
"0.65057886",
"0.65046215",
"0.65035135",
"0.64633906",
"0.64383066",
"0.6434014",
"0.63916... | 0.766338 | 1 |
GET /instituicoes/new GET /instituicoes/new.json | def new
@instituicao = Instituicao.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @instituicao }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def new\n @indicativo = Indicativo.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @indicativo }\n end\n end",
"def new\n @sitio_entrega = SitioEntrega.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render j... | [
"0.7481899",
"0.74592733",
"0.7392899",
"0.7371191",
"0.7345058",
"0.7335122",
"0.7324422",
"0.72810566",
"0.727145",
"0.72610426",
"0.7247983",
"0.7228057",
"0.72174495",
"0.71782017",
"0.7171193",
"0.7157048",
"0.7149544",
"0.71336293",
"0.71280897",
"0.71144384",
"0.709214... | 0.79367125 | 0 |
POST /instituicoes POST /instituicoes.json | def create
@instituicao = Instituicao.new(params[:instituicao])
respond_to do |format|
if @instituicao.save
format.html { redirect_to @instituicao, notice: 'Instituicao was successfully created.' }
format.json { render json: @instituicao, status: :created, location: @instituicao }
else
format.html { render action: "new" }
format.json { render json: @instituicao.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create\n @instituto = Instituto.new(instituto_params)\n\n respond_to do |format|\n if @instituto.save\n format.html { redirect_to @instituto, notice: 'O instituto foi criado com sucesso.' }\n format.json { render :show, status: :created, location: @instituto }\n else\n form... | [
"0.70578986",
"0.68975914",
"0.6834867",
"0.6772598",
"0.67714244",
"0.6739272",
"0.661475",
"0.6461626",
"0.64222103",
"0.641717",
"0.6408052",
"0.640658",
"0.64003813",
"0.63718206",
"0.6368992",
"0.6346715",
"0.6300704",
"0.6297224",
"0.6296384",
"0.62830585",
"0.62819237"... | 0.7440674 | 0 |
PUT /instituicoes/1 PUT /instituicoes/1.json | def update
@instituicao = Instituicao.find(params[:id])
respond_to do |format|
if @instituicao.update_attributes(params[:instituicao])
format.html { redirect_to @instituicao, notice: 'Instituicao was successfully updated.' }
format.json { head :no_content }
else
format.html { render action: "edit" }
format.json { render json: @instituicao.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update\n @instituicao = Instituicao.find(params[:id])\n\n respond_to do |format|\n if @instituicao.update_attributes(params[:instituicao])\n format.html { redirect_to(@instituicao, :notice => 'Instituicao was successfully updated.') }\n format.xml { head :ok }\n else\n for... | [
"0.6810022",
"0.6726203",
"0.6404884",
"0.63641167",
"0.636172",
"0.6285308",
"0.6285308",
"0.6281354",
"0.62721556",
"0.62643033",
"0.6262745",
"0.625416",
"0.6218062",
"0.62179774",
"0.6217759",
"0.6217759",
"0.6208347",
"0.6200834",
"0.6161696",
"0.6144672",
"0.6143541",
... | 0.71600014 | 0 |
DELETE /instituicoes/1 DELETE /instituicoes/1.json | def destroy
@instituicao = Instituicao.find(params[:id])
@instituicao.destroy
respond_to do |format|
format.html { redirect_to instituicoes_url }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @asignatura.destroy\n respond_to do |format|\n format.json { head :no_content }\n end\n end",
"def destroy\n @instancium.destroy\n respond_to do |format|\n format.html { redirect_to instancia_url, notice: 'Instancium was successfully destroyed.' }\n format.json { head... | [
"0.7370825",
"0.73668385",
"0.73220986",
"0.73165035",
"0.7307515",
"0.7260004",
"0.71701807",
"0.71200705",
"0.7117085",
"0.7117085",
"0.7085163",
"0.7083893",
"0.7060684",
"0.7056958",
"0.7053504",
"0.70364827",
"0.7032805",
"0.7027775",
"0.70275205",
"0.701552",
"0.7015155... | 0.7671489 | 0 |
GET /data_items GET /data_items.json | def index
@data_items = DataItem.all
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getItems()\n return mergeWithAPI(@item_json)['data']\n end",
"def index\n #@items = Item.find_by_user_id(Session[user_id])\n @items = Item.all\n render json: @items\n end",
"def show\n @items = Item.find(params[:id])\n render json: @items\n end",
"def index\n @api_v1_items = Item.... | [
"0.7674954",
"0.71355444",
"0.7094214",
"0.6972444",
"0.6931706",
"0.6926581",
"0.6859299",
"0.68276066",
"0.68276066",
"0.68276066",
"0.68276066",
"0.6809148",
"0.6802287",
"0.67980635",
"0.67876524",
"0.67678326",
"0.676121",
"0.67236555",
"0.6714538",
"0.6663792",
"0.66573... | 0.70302844 | 3 |
GET /data_items/1 GET /data_items/1.json | def show
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getItems()\n return mergeWithAPI(@item_json)['data']\n end",
"def index\n @api_v1_items = Item.all\n render json: @api_v1_items\n end",
"def show\n @items = Item.find(params[:id])\n render json: @items\n end",
"def get_item( item )\n @session.base_url = \"http://cl.ly\"\n resp... | [
"0.71674293",
"0.70160764",
"0.6945815",
"0.6910274",
"0.68650216",
"0.6845848",
"0.671658",
"0.6709465",
"0.6671654",
"0.66532034",
"0.6628087",
"0.6614325",
"0.65953165",
"0.6592836",
"0.6592836",
"0.6592836",
"0.6592836",
"0.65753603",
"0.6569559",
"0.65677476",
"0.6566855... | 0.0 | -1 |
POST /data_items POST /data_items.json | def create
@data_item = DataItem.new(data_item_params)
respond_to do |format|
if @data_item.save
format.html { redirect_to @data_item, notice: 'Data item was successfully created.' }
format.json { render :show, status: :created, location: @data_item }
else
format.html { render :new }
format.json { render json: @data_item.errors, status: :unprocessable_entity }
end
end
end | {
"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 @request_item = RequestItem.new(request_item_params)\n @request_item.item = Item.new(name: params[:request_item][:item][:name])\n\n if @request_item.save\n render json: @request_item \n... | [
"0.6995797",
"0.6736687",
"0.67053056",
"0.662083",
"0.660447",
"0.6530322",
"0.64518636",
"0.64164734",
"0.6386439",
"0.6361424",
"0.63582677",
"0.63432807",
"0.62786186",
"0.6271697",
"0.62401927",
"0.62266135",
"0.61705756",
"0.61504644",
"0.61439097",
"0.6133691",
"0.6132... | 0.6744072 | 1 |
PATCH/PUT /data_items/1 PATCH/PUT /data_items/1.json | def update
respond_to do |format|
if @data_item.update(data_item_params)
format.html { redirect_to @data_item, notice: 'Data item was successfully updated.' }
format.json { render :show, status: :ok, location: @data_item }
else
format.html { render :edit }
format.json { render json: @data_item.errors, status: :unprocessable_entity }
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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][:item].present? ? Item.new(name: params[:request_item][:item][:name]) : @request_item.... | [
"0.694055",
"0.6755574",
"0.6690445",
"0.66534823",
"0.66378695",
"0.6612555",
"0.65406156",
"0.64654404",
"0.6451686",
"0.6451686",
"0.6436183",
"0.64320207",
"0.64165103",
"0.63948464",
"0.6345789",
"0.6326775",
"0.630687",
"0.6281748",
"0.62702966",
"0.62285125",
"0.619755... | 0.6610714 | 6 |
DELETE /data_items/1 DELETE /data_items/1.json | def destroy
@data_item.destroy
respond_to do |format|
format.html { redirect_to data_items_url, notice: 'Data item was successfully destroyed.' }
format.json { head :no_content }
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete\n render json: Item.delete(params[\"id\"])\n end",
"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.... | [
"0.7269818",
"0.71858126",
"0.71617115",
"0.71258295",
"0.69620955",
"0.6937723",
"0.6899765",
"0.6875788",
"0.6805055",
"0.68046165",
"0.6790078",
"0.6788352",
"0.67852485",
"0.6779539",
"0.6773469",
"0.6773081",
"0.6773081",
"0.6773081",
"0.6773081",
"0.6773081",
"0.6773081... | 0.7018578 | 4 |
Use callbacks to share common setup or constraints between actions. | def set_data_item
@data_item = DataItem.find(params[:id])
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"def action_hook; end",
"def run_actions; end",
"def define_action_hook; end",
"def actions; end",
"def define_action_helpers\n if super && action == :save\n @instance_helper_module.class_... | [
"0.6163927",
"0.6046165",
"0.59465253",
"0.59167755",
"0.58904207",
"0.58346355",
"0.577713",
"0.5703502",
"0.5703502",
"0.56531286",
"0.56215113",
"0.54224145",
"0.5410795",
"0.5410795",
"0.5410795",
"0.53924775",
"0.5379919",
"0.53580743",
"0.53401667",
"0.53397506",
"0.533... | 0.0 | -1 |
Never trust parameters from the scary internet, only allow the white list through. | def data_item_params
params.require(:data_item).permit(:name, :data_class_id, :data_source_id)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"def strong_params\n params.require(:listing_member).permit(param_whitelist)\n end",
"def allow_params_authentication!; end",
"def allowed_params\n ALLOWED_PARAMS\n end",
"def default_param_whitelist\n [\"mode\"]\n... | [
"0.6980384",
"0.6782743",
"0.6746196",
"0.6742575",
"0.6736",
"0.6594004",
"0.65037984",
"0.6496699",
"0.64819324",
"0.64791185",
"0.6456292",
"0.64403296",
"0.63795286",
"0.6375975",
"0.6365291",
"0.63210756",
"0.6300542",
"0.6299717",
"0.62943304",
"0.6292561",
"0.6290683",... | 0.0 | -1 |
Return the beginning of the shape | def first
@range.first
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def shape_lowest_left_point(shape)\n check_pre((\n shape?(shape)\n ))\n\n if shape.range1d?\n return shape.first\n elsif shape.range2d?\n return shape_lowest_left_point(shape.x_range)\n elsif shape.union1d? or shape.union2d?\n return shape_lowest_left_point(shape.left)\n else\n check_pre(false... | [
"0.67880446",
"0.65469706",
"0.64268476",
"0.6409094",
"0.632319",
"0.632319",
"0.6167918",
"0.6119286",
"0.61112297",
"0.60929847",
"0.6032626",
"0.5998835",
"0.59533006",
"0.59425807",
"0.59425807",
"0.5931039",
"0.5919909",
"0.59024453",
"0.5901155",
"0.58757156",
"0.58448... | 0.5488898 | 49 |
Return the end of the shape | def last
@range.last
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y_end\n y_end_dependencies = [calculated_height, default_y?, !default_y? && y]\n if y_end_dependencies != @y_end_dependencies\n # avoid recalculation of dependencies\n calculated_height, is_default_y, y = @y_end_dependencies = y_end_dependencies\n shape_height... | [
"0.6816561",
"0.6777623",
"0.6483366",
"0.6433626",
"0.6347916",
"0.63038546",
"0.62767774",
"0.6275276",
"0.62249285",
"0.61872923",
"0.6144535",
"0.61403805",
"0.61403805",
"0.61074334",
"0.61074334",
"0.6072441",
"0.60670936",
"0.6049944",
"0.60099554",
"0.6002715",
"0.597... | 0.57270813 | 44 |
Return the size of the shape | def size
@range.size
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def size\n shape[0] > 1 ? shape[0] : shape[1]\n end",
"def shape_count\n\t\treturn @shapes.length\n\tend",
"def length\n grid_shape.length\n end",
"def size(shape)\n shape = [shape,shape] unless shape.is_a?(Array)\n (0...shape.size).inject(1) { |x,i| x * shape[i] }\n end",
"def get_w... | [
"0.86689067",
"0.7864447",
"0.7726246",
"0.77138525",
"0.7670339",
"0.7522366",
"0.74911857",
"0.74640006",
"0.73924553",
"0.7375954",
"0.73192847",
"0.72641647",
"0.7232112",
"0.7202787",
"0.7202787",
"0.7202787",
"0.71853995",
"0.7174909",
"0.7174909",
"0.71597326",
"0.7159... | 0.0 | -1 |
Add method readers for members | def method_missing(m, *arg, &block)
return @members[m] if @members && @members[m]
super
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_reader_tags(klass, new_method, member); end",
"def add_reader_tags(klass, new_method, member)\n member_tag = member_tag_for_member(klass, member, :read)\n return_type = return_type_from_tag(member_tag)\n getter_doc_text = member_tag ? member_tag.text : \"Returns the value of attribute #{member}\... | [
"0.76274425",
"0.7350206",
"0.7028912",
"0.6969812",
"0.68382114",
"0.6684393",
"0.66162676",
"0.64602625",
"0.63911843",
"0.6338285",
"0.6327019",
"0.6314934",
"0.6304813",
"0.6235577",
"0.6219303",
"0.6113826",
"0.6091826",
"0.60864615",
"0.60807836",
"0.60737973",
"0.59811... | 0.56935984 | 44 |
Specify the size of the underlying type | def type_size=(sz)
t = eval "Int#{sz}"
raise "unsupported enum size #{sz}" unless t
@type = t
return sz
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type_size\n @type.size\n end",
"def size\n @type.size\n end",
"def size(size)\n @value[:size] = size\n self\n end",
"def size=(size)\n end",
"def size #:nodoc:\n 1\n end",
"def size #:nodoc:\n 1\n end",
"def size=(value)\n ... | [
"0.71337533",
"0.7121552",
"0.7009567",
"0.6971352",
"0.6910903",
"0.6910903",
"0.6780521",
"0.6780521",
"0.67725265",
"0.6764291",
"0.6749171",
"0.67126745",
"0.67017245",
"0.6658731",
"0.6657285",
"0.6657285",
"0.6653677",
"0.662732",
"0.6607625",
"0.66043025",
"0.6562318",... | 0.67347133 | 11 |
Get the underlying type size in bits | def type_size
@type.size
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def size\n (@bit_length*@length*@count)/8.0\n end",
"def size\n @type.size\n end",
"def sizeof(type)\n size_ptr = Pointer.new(:ulong_long)\n align_ptr = Pointer.new(:ulong_long)\n NSGetSizeAndAlignment(type, size_ptr, align_ptr)\n size_ptr[0]\n end",
"def raw_num_bytes\... | [
"0.7705189",
"0.7467742",
"0.7450963",
"0.7417675",
"0.734754",
"0.70911944",
"0.70911944",
"0.7063093",
"0.70573896",
"0.68974715",
"0.6862758",
"0.6853569",
"0.67551893",
"0.66868585",
"0.6642069",
"0.6633071",
"0.660719",
"0.6605012",
"0.657718",
"0.6556635",
"0.65282625",... | 0.7743193 | 0 |
Set the size and signedness of the underlying type | def set_type_size(sz, signed = false)
tname = "#{signed ? "" : "U"}Int#{sz}"
t = eval tname
raise "unsupported bitfield type #{tname}" unless t
@type = t
@signed = signed
return sz
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def type_size=(sz)\n t = eval \"Int#{sz}\"\n raise \"unsupported enum size #{sz}\" unless t\n @type = t\n return sz\n end",
"def initialize\n @type = LENGTH\n @value = UNSET\n @value_list = [SHORT, LONG].freeze\n end",
"def size=(size)\n instanc... | [
"0.6069003",
"0.59874624",
"0.5922158",
"0.58663684",
"0.5863692",
"0.5747521",
"0.57346654",
"0.5697523",
"0.5636921",
"0.562953",
"0.55702984",
"0.55702984",
"0.5555129",
"0.55262977",
"0.55237573",
"0.552178",
"0.5498379",
"0.54919183",
"0.5478183",
"0.544552",
"0.5405694"... | 0.75745386 | 0 |
Set the underlying type | def type=(type)
@type = type
@signed = type.name.split('::').last[0] != "U"
type
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_type\n end",
"def set_type(v)\n self.type = v\n self\n end",
"def set_type(val)\n self.type = val\n self\n end",
"def type(val); @type = val; self; end",
"def type=(type); end",
"def type_setter\n @type_setter ||= type.__setter__\n end",
"def record_type... | [
"0.82642114",
"0.8020331",
"0.79599285",
"0.7660267",
"0.7605883",
"0.7446298",
"0.74407166",
"0.7422211",
"0.7422211",
"0.7422211",
"0.7422211",
"0.7422211",
"0.7422211",
"0.7422211",
"0.7347063",
"0.7347063",
"0.7326029",
"0.73197496",
"0.7261865",
"0.7258958",
"0.72404414"... | 0.0 | -1 |
Set the bitfield's field names and number of bits Creates accessor to fields for instance of this class | def map=(m)
raise "map already set" if @map
@map = m.each.collect { |k, v| [k, [v, k.to_sym, :"#{k}="]] }.to_h
m.each_key { |k|
attr_accessor k
}
m
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bit_field name, width\n raise \"'bit_field' can be used only inside a 'field' block.\" if @_current_bit_fields.nil?\n \n # Register the bit field definition\n @_current_bit_fields << [name, width, bit_mask(width)]\n \n # Define the attribute accessor\n bits_attr_accessor(name)\n \n i... | [
"0.733397",
"0.6757972",
"0.6720495",
"0.65162027",
"0.6454409",
"0.61054504",
"0.6092267",
"0.60400337",
"0.60252166",
"0.58620846",
"0.58527654",
"0.57844204",
"0.5783991",
"0.57760525",
"0.5770837",
"0.57628065",
"0.57351655",
"0.5724615",
"0.5721556",
"0.5642044",
"0.5610... | 0.0 | -1 |
set only the unused bits of the underlying value | def __remainder=(v) # only keep relevant bits of the remainder
if v != 0
num_bits = self.class.type.size * 8
num_used_bits = self.class.map.value.collect { |v, _, _| v }.select { |v| v > 0 }.sum(:+)
if num_used_bits < num_bits
v &= ((( 1 << (num_bits - num_used_bits)) - 1) << num_used_bits)
else
v = 0
end
end
@__remainder = v
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_only(value)\n shift_out_with_index { |bit, i| bit.set_only = (value[i] == 0b1) }\n self\n end",
"def set_bits\n bits = []\n 0.upto(63) {|i| bits << i if set?(i)}\n bits\n end",
"def not\n ~@bits\n end",
"def []=(i,b)\n b = (b && b!=0) ? 1 : 0\n @v &= ~(1 << ... | [
"0.6862802",
"0.6576071",
"0.6468951",
"0.64213556",
"0.63843465",
"0.63731176",
"0.62672704",
"0.62672704",
"0.6264778",
"0.6260983",
"0.62445617",
"0.6222784",
"0.6080633",
"0.60455716",
"0.59848833",
"0.5951321",
"0.5946551",
"0.5943943",
"0.59142035",
"0.5889624",
"0.5882... | 0.6020718 | 14 |
When people refer to a mountain they can use Mount Name, Name Mountain, Mt. Name, Name mtn ...etc | def aliases
myAliases = ""
if ['Mount ',' Mountain',' Peak'].any? {|word| self.name.include?(word)}
short = shortname
myAliases = "#{short} Mountain, Mount #{short}, Mt. #{short}, Mt #{short}, #{shortname} mt, #{shortname} mtn, #{short} mtn., #{short} Peak"
end
myAliases
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def full_name\n \"#{brand.name} #{name} (#{vehicle_type.name})\"\n \n end",
"def snake_name\n @mountain.name.gsub(/./,'').gsub(/ /,'_').downcase\n end",
"def name\n 'occupant'\n end",
"def human_from_name; end",
"def appellant_fullname_readable\n appellant_name&.titleize\n end",
"d... | [
"0.64742225",
"0.6427333",
"0.6344343",
"0.63430834",
"0.6299515",
"0.6277544",
"0.6233395",
"0.62087435",
"0.6203189",
"0.61714435",
"0.61332124",
"0.61231005",
"0.61062247",
"0.609935",
"0.60773283",
"0.6067734",
"0.6060615",
"0.60569674",
"0.6050722",
"0.60484797",
"0.6040... | 0.6846041 | 0 |
Searches for the nearest higher mountain in a given radius and sets that as the parent mountain Sets distance to parent mountain as well | def set_parent_mountain_by_radius radius
Place.find_by_radius(centerLatitude, centerLongitude, radius, (height||0)+1).where("type = 'Mountain'").each do |mountain|
distance = dist(mountain.centerLatitude, mountain.centerLongitude)
if distance < dist_to_parent && self != mountain
self.dist_to_parent = distance
self.parent_mountain_id = mountain.id
self.parent_mountain = mountain
self.set_height_and_isolation
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def refresh_nearby_mountains\n return unless self.height_changed? || self.latitude_changed? || self.longitude_changed?\n Mountain.find_by_radius(self.latitude,self.longitude,self.dist_to_parent + 20).where(\"type = 'Mountain'\").each do |mountain|\n next if mountain.height.nil? || mountain.dist_to_paren... | [
"0.7133173",
"0.6104328",
"0.58099306",
"0.55982375",
"0.54753995",
"0.53915673",
"0.5343848",
"0.5337359",
"0.5316703",
"0.52875584",
"0.5238724",
"0.5238321",
"0.521971",
"0.51853186",
"0.51826876",
"0.5162653",
"0.51573294",
"0.5144329",
"0.5136009",
"0.51356137",
"0.51223... | 0.85513055 | 0 |
Look for mountains within radius to parent or 30km whichever is higher. If this mountain is higher than a mountain in this radius and closer than its parent then change that mountains parent to be this mountain and update its dist_to_parent | def refresh_nearby_mountains
return unless self.height_changed? || self.latitude_changed? || self.longitude_changed?
Mountain.find_by_radius(self.latitude,self.longitude,self.dist_to_parent + 20).where("type = 'Mountain'").each do |mountain|
next if mountain.height.nil? || mountain.dist_to_parent.nil?
if mountain.height < self.height && self != mountain && dist(mountain.latitude, mountain.longitude) < mountain.dist_to_parent
mountain.parent_mountain_id = self.id
mountain.dist_to_parent = dist(mountain.latitude, mountain.longitude)
mountain.set_height_and_isolation
mountain.save
end
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_parent_mountain_by_radius radius\n Place.find_by_radius(centerLatitude, centerLongitude, radius, (height||0)+1).where(\"type = 'Mountain'\").each do |mountain|\n distance = dist(mountain.centerLatitude, mountain.centerLongitude) \n if distance < dist_to_parent && self != mountain\n ... | [
"0.8235895",
"0.5898242",
"0.5318209",
"0.5277388",
"0.5045914",
"0.49961343",
"0.49835724",
"0.49419254",
"0.49409592",
"0.49079368",
"0.4890193",
"0.48785388",
"0.48690915",
"0.486506",
"0.4854083",
"0.4815669",
"0.48073077",
"0.47885486",
"0.478069",
"0.47805166",
"0.47803... | 0.71061254 | 1 |
create from the targets a list of files to be included and also their destinations in the zip file and sizes throw an error if a file/directory does not exist, if it is outside of the root, if the target type is invalid, etc. | def generate_file_list
self.file_list = Concurrent::Array.new
targets.each do |target|
add_target(target)
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_zip( ctx, file:, upload_dir:, archive_dir:, ** ) #File::Twin\n source_files = file.records\n\n zip_file = File.join( archive_dir, \"#{file.identifier}.zip\" )\n\n return false if File.exists?(zip_file)\n\n Zip::File.open(zip_file, Zip::File::CREATE) do |zip|\n source_files.eac... | [
"0.62616754",
"0.62557745",
"0.6206066",
"0.6185896",
"0.6034373",
"0.57765603",
"0.57113385",
"0.5684122",
"0.5640609",
"0.56351995",
"0.56351995",
"0.5616844",
"0.5600996",
"0.5569507",
"0.55608875",
"0.5531087",
"0.551721",
"0.5515941",
"0.5507255",
"0.5487787",
"0.5472913... | 0.5520483 | 16 |
=begin Generator needs to: Swap first and last name vowels moved forward one character consonants moved forward one character in this instance, y will be a consonant =end Swaps first and last names and turns them into arrays | def alias_generator(agent)
# changes vowels into array and uses .reverse method to account
# for edge cases
vowels = "aeiou"
new_vowels = "aeiou".split('').reverse
# changes consonants into array and uses .reverse method to account
# for edge cases
consonants = "bcdfghjklmnpqrstvwxyz"
new_consonants = "bcdfghjklmnpqrstvwxyz".split('').reverse
# defines variables for user input and parameter
real_name = agent
# swaps first and last names and turns them into arrays
reversed_real_name = real_name.downcase.split(' ').reverse
alias_name_array = reversed_real_name.join(' ').split('')
# maps the new array through the indices of the vowel and consonant arrays
altered_name = alias_name_array.map do |char|
if vowels.include?(char)
# if there is a vowel, it will map to the next vowel
new_vowels[new_vowels.index(char)-1]
elsif consonants.include?(char)
# if there is a consonant, it will map to the next consonant
new_consonants[new_consonants.index(char)-1]
else
# accounts for space or another character
char
end
end
# takes the newly mapped array, joins it back together and capitalizes it
new_alias = altered_name.join.split.map!{ |name| name.capitalize }.join(" ")
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def next_vowcon(oldlet) #actually takes in the whole name (not just 1 letter), since it is only split to an array of [first_name, last_name]\r\n vowel = ['a','e','i','o','u']\r\n rot_vow = vowel.rotate #reverses vowel array\r\n consonant = 'bcdfghjklmnpqrstvwxzy'.split('')\r\n rot_cons= consonant.rotate #rever... | [
"0.75452274",
"0.7493332",
"0.7485925",
"0.7208253",
"0.7146611",
"0.7121268",
"0.70032966",
"0.69553614",
"0.6931459",
"0.6897362",
"0.6868838",
"0.685386",
"0.68537724",
"0.68500936",
"0.6841828",
"0.6837607",
"0.68166506",
"0.68003565",
"0.6794053",
"0.6783319",
"0.6756605... | 0.6769894 | 20 |
Returns an array of Licensee::License instances | def licenses(options = {})
Licensee::License.all(options)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def licenses\n licenses = []\n uris = metadata[dataset_uri][dct.license.to_s]\n if uris.nil?\n []\n else\n uris.each do |uri|\n l = metadata[uri]\n licenses << License.new(:uri => uri, :name => l[dct.title.to_s])\n end\n return l... | [
"0.79116863",
"0.7615163",
"0.7191282",
"0.7116111",
"0.7056881",
"0.70310897",
"0.6982774",
"0.6905566",
"0.6766984",
"0.66965204",
"0.6654633",
"0.6613263",
"0.66106236",
"0.65628034",
"0.65628034",
"0.65494007",
"0.65008265",
"0.64991575",
"0.6475362",
"0.6403956",
"0.6308... | 0.8071391 | 0 |
Returns the license for a given path | def license(path)
Licensee.project(path).license
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license\n File.read file_path('LICENSE') if license?\n end",
"def license_file_path(path = NULL)\n if null?(path)\n @license_file_path || File.join(install_dir, \"LICENSE\")\n else\n @license_file_path = File.join(install_dir, path)\n end\n end",
"def license\n last... | [
"0.7683035",
"0.74824435",
"0.7099152",
"0.70910287",
"0.6921656",
"0.6828952",
"0.68228656",
"0.6766218",
"0.67525727",
"0.6741766",
"0.66850466",
"0.6644496",
"0.6614537",
"0.6590169",
"0.6530255",
"0.65026665",
"0.64850676",
"0.647243",
"0.6460033",
"0.6417067",
"0.6340329... | 0.86217886 | 0 |
Inverse of the confidence threshold, represented as a float By default this will be 0.1 | def inverse_confidence_threshold
@inverse ||= (1 - Licensee.confidence_threshold / 100.0).round(2)
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def inverse_brightness\n @base.brightness > 0.5 ? -1 : 1\n end",
"def threshold(x)\n\t\tx > 0 ? 1.0 : 0.0\n\tend",
"def confidence_lowered\n @positions.transform_values! {|value| value - 1}\n @positions.delete_if {|key, value| value == 0 }\n end",
"def inverse()\n map_hash{|k,v|[k,1/v] ... | [
"0.6771814",
"0.6225526",
"0.6224604",
"0.598087",
"0.5944674",
"0.57596177",
"0.5613212",
"0.56006366",
"0.55319154",
"0.54572326",
"0.5448475",
"0.5445973",
"0.5438047",
"0.5371062",
"0.53431785",
"0.5311402",
"0.53051555",
"0.5297779",
"0.5294272",
"0.5287737",
"0.5282349"... | 0.8523854 | 0 |
Create a new instance of a workitem belonging to its representation in the standard way Polarion does it | def initialize(filename)
@filename = filename
Powirb.log.debug("Retrieving workitem from #{@filename}")
begin
@doc = Nokogiri::XML(open(@filename))
rescue Exception => e
Powirb.log.error(e)
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_owfe_workitem\n\n wi = OpenWFE::InFlowWorkItem.new\n\n wi.fei = full_fei\n wi.participant_name = participant_name\n wi.fields = YAML.load(self.wi_fields)\n\n wi.dispatch_time = dispatch_time\n wi.last_modified = last_modified\n\n wi\n end",
"def create_new_item( depos... | [
"0.6659081",
"0.6650529",
"0.6369247",
"0.6323991",
"0.62001574",
"0.61834425",
"0.6163132",
"0.6105817",
"0.60133636",
"0.59773165",
"0.5886128",
"0.58402336",
"0.57838595",
"0.5777761",
"0.577641",
"0.56459665",
"0.56181335",
"0.5608963",
"0.5579679",
"0.5557633",
"0.553943... | 0.0 | -1 |
Return a field value | def [](fname)
fname = fname.to_s
node = @doc.xpath("//field[@id=\"#{fname}\"]")
return nil if node.text.empty?
node.text
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def process_field_value(value)\r\n value\r\n end",
"def field_value(field)\n @object.respond_to?(field) ? @object.send(field) : ''\n end",
"def [](field_name)\n f = field(field_name)\n f && f.value\n end",
"def get_value(field)\n field = item_type.find_field(field) unless ... | [
"0.81568515",
"0.8053764",
"0.80355847",
"0.79275453",
"0.7897131",
"0.7731986",
"0.77180535",
"0.76942295",
"0.76231956",
"0.75703657",
"0.75689673",
"0.74404156",
"0.73817647",
"0.73519635",
"0.7347162",
"0.733658",
"0.7317098",
"0.7310233",
"0.73042214",
"0.7280855",
"0.72... | 0.0 | -1 |
Return the list of linked workitems ['role1:wid1', ..., 'roleN:widN'] | def links
tmp = []
@doc.xpath('//field[@id="linkedWorkItems"]/list/struct').each do |struct|
linked_wid = struct.xpath('item[@id="workItem"]').text
role = struct.xpath('item[@id="role"]').text
tmp << "#{role}:#{linked_wid}"
end
return tmp
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def workitems (store_name=nil)\n\n return load_user_workitems if store_name == 'users'\n return (@workitems[store_name] || []) if store_name\n\n # then return all the workitems the user has access to\n\n wis = load_user_workitems\n\n @store_names.inject(wis) do |r, sname|\n r += (@workitems[sna... | [
"0.588742",
"0.5639725",
"0.5494293",
"0.5393605",
"0.5306446",
"0.5221445",
"0.51779103",
"0.51683897",
"0.51538044",
"0.5148698",
"0.5145366",
"0.51173925",
"0.51153964",
"0.51047075",
"0.50885755",
"0.5083474",
"0.5060652",
"0.5057517",
"0.50118136",
"0.5007342",
"0.500442... | 0.7573507 | 0 |
Add a link to another workitem with specified role | def add_link(lh)
lnk_wid = lh[:wid]
lnk_role = lh[:role]
# find or create the attach node
if @doc.xpath('//field[@id="linkedWorkItems"]/list').last.nil?
Nokogiri::XML::Builder.with(@doc.xpath('//work-item').last) do
field(:id => 'linkedWorkItems') {
list {}
}
end
end
# build and attach the link struct
Nokogiri::XML::Builder.with(@doc.xpath('//field[@id="linkedWorkItems"]/list').last) do
struct {
item(:id => 'revision')
item(:id => 'workItem') {
text lnk_wid
}
item(:id => 'role') {
text lnk_role
}
}
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_role_url(url, role_index=0)\n implementation[\"roles\"][role_index][\"role_url\"]=url\n end",
"def admin_link_to_user(user)\n case user.role\n when 'influencer'\n link_to(user.full_name, admin_influencer_path(user.influencer))\n when 'affiliate'\n link_to(user.full_na... | [
"0.5651713",
"0.5580572",
"0.5452056",
"0.5435948",
"0.5411164",
"0.5391962",
"0.5356014",
"0.531838",
"0.5298207",
"0.5297529",
"0.52965766",
"0.5295887",
"0.5295887",
"0.5289582",
"0.52657247",
"0.52458954",
"0.52362657",
"0.52158487",
"0.52028644",
"0.51917166",
"0.5188409... | 0.61871344 | 0 |
Save workitem on filesystem | def save!
Powirb.log.debug("[#{wid}] saving on #{@filename}")
File.open(@filename, 'w+') {|io| io.puts @doc}
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def save!\n ScriptoriaCore::Ruote.engine.storage_participant.do_update(_workitem)\n end",
"def save\n file_path = self.class.file_path(@save_id)\n File.open(file_path, 'w') { |file| \n bytes = file.write @items.inspect\n if bytes > 0\n puts \"saved to #{file_path}\"\n else\n ... | [
"0.7494753",
"0.7417596",
"0.6990294",
"0.6774721",
"0.65350753",
"0.64432013",
"0.6435946",
"0.6339212",
"0.63153625",
"0.62360924",
"0.62077975",
"0.6199994",
"0.61547506",
"0.61535966",
"0.61535966",
"0.61302906",
"0.6097697",
"0.6097697",
"0.6096614",
"0.6040261",
"0.6009... | 0.5601792 | 65 |
Return a list with all field names | def fields
@doc.xpath("//field").map{|node| node['id']}.sort
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def field_names\r\n return @field_names\r\n end",
"def field_names\n fields.keys\n end",
"def all_field_names\n field_set.all_field_names\n end",
"def field_names\n @_field_path.map{ |field_| field_.name }\n end",
"def fields\n @fields.keys\n end",
... | [
"0.8677694",
"0.86425143",
"0.8264976",
"0.82000244",
"0.7941163",
"0.7941163",
"0.79170007",
"0.7871886",
"0.786355",
"0.78615886",
"0.7802413",
"0.778707",
"0.7646379",
"0.76435477",
"0.75965893",
"0.7595485",
"0.75356984",
"0.7477407",
"0.7459868",
"0.74335945",
"0.7427739... | 0.0 | -1 |
Return the "space" under which the workitem lives (tracker xor document) | def space
if @filename.include?('/.polarion/tracker/')
return 'tracker'
else
File.dirname(@filename).split(/\//)[4]
end
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_space()\n get_parent(\"SPACE\")\n end",
"def get_space()\n get_parent(\"SPACE\")\n end",
"def get_space(sp)\n @spaces[sp]\n end",
"def system_space\n spaces[SYSTEM_SPACE_ID]\n end",
"def get_space_use()\n return \"Office\"\n end",
"def space()\n ... | [
"0.70735896",
"0.70703137",
"0.6586922",
"0.631907",
"0.62866944",
"0.62201846",
"0.61526424",
"0.5852432",
"0.5796302",
"0.57935655",
"0.5757408",
"0.5695092",
"0.56598026",
"0.56559503",
"0.5655083",
"0.5616547",
"0.5594899",
"0.555124",
"0.5539366",
"0.5458791",
"0.5436480... | 0.0 | -1 |
Delete a wrapup code from a queue | def delete_routing_queue_wrapupcode(queue_id, code_id, opts = {})
delete_routing_queue_wrapupcode_with_http_info(queue_id, code_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_game_id_in_queue game_id, queue = nil\n current_queue = queue || craft_firebase_command(\"minesweeper/queue.json\")\n\n # getting new queue to update\n new_queue = current_queue&.reject { |queue_game_id|\n # reject chosen game\n game_id == queue_game_id\n }\n\n # update queue on server\n upd... | [
"0.67168385",
"0.6701427",
"0.6632236",
"0.6622205",
"0.6597389",
"0.6577218",
"0.65414107",
"0.63598996",
"0.63252467",
"0.6315745",
"0.6314911",
"0.6211737",
"0.6211737",
"0.62098676",
"0.61528486",
"0.6131801",
"0.6096151",
"0.60693914",
"0.60602576",
"0.6050812",
"0.60457... | 0.6529408 | 8 |
Delete a wrapup code from a queue | def delete_routing_queue_wrapupcode_with_http_info(queue_id, code_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_queue_wrapupcode ..."
end
# verify the required parameter 'queue_id' is set
fail ArgumentError, "Missing the required parameter 'queue_id' when calling RoutingApi.delete_routing_queue_wrapupcode" if queue_id.nil?
# verify the required parameter 'code_id' is set
fail ArgumentError, "Missing the required parameter 'code_id' when calling RoutingApi.delete_routing_queue_wrapupcode" if code_id.nil?
# resource path
local_var_path = "/api/v2/routing/queues/{queueId}/wrapupcodes/{codeId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'codeId' + '}', code_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_queue_wrapupcode\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_game_id_in_queue game_id, queue = nil\n current_queue = queue || craft_firebase_command(\"minesweeper/queue.json\")\n\n # getting new queue to update\n new_queue = current_queue&.reject { |queue_game_id|\n # reject chosen game\n game_id == queue_game_id\n }\n\n # update queue on server\n upd... | [
"0.6715141",
"0.6699791",
"0.6629268",
"0.6621124",
"0.6597574",
"0.65756047",
"0.65398455",
"0.6529983",
"0.6529983",
"0.6358087",
"0.6324666",
"0.6314439",
"0.63142675",
"0.6210734",
"0.6210734",
"0.62094456",
"0.61521393",
"0.613172",
"0.6094889",
"0.60685295",
"0.6060054"... | 0.56820256 | 69 |
Delete an organization's routing settings | def delete_routing_settings(opts = {})
delete_routing_settings_with_http_info(opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @org_setting.destroy\n\n head :no_content\n end",
"def delete_routing_settings_with_http_info(opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: RoutingApi.delete_routing_settings ...\"\n end\n \n # resource path\n lo... | [
"0.730187",
"0.65662843",
"0.6402383",
"0.6378157",
"0.6342843",
"0.63057655",
"0.62673783",
"0.62329805",
"0.6202773",
"0.6193246",
"0.617383",
"0.61692655",
"0.6145706",
"0.61408544",
"0.61327016",
"0.61080647",
"0.6107035",
"0.60616076",
"0.6054164",
"0.6053777",
"0.605009... | 0.6706296 | 1 |
Delete an organization&39;s routing settings | def delete_routing_settings_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_settings ..."
end
# resource path
local_var_path = "/api/v2/routing/settings".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def destroy\n @org_setting.destroy\n\n head :no_content\n end",
"def destroy\n @organization = Organization.find(params[:id])\n @organization.destroy\n \n redirect_to admin_organizations_url, notice: t('organization.messages.delete.success')\n end",
"def destroy\n @organization = Organiz... | [
"0.74669045",
"0.6805188",
"0.66975385",
"0.6602611",
"0.65964794",
"0.6563039",
"0.6557922",
"0.6517594",
"0.6503264",
"0.6485661",
"0.64487743",
"0.64348334",
"0.6389579",
"0.6389442",
"0.6368104",
"0.6350502",
"0.632453",
"0.63117653",
"0.630649",
"0.62791026",
"0.62712526... | 0.6359687 | 15 |
Delete an Address by Id for SMS | def delete_routing_sms_address(address_id, opts = {})
delete_routing_sms_address_with_http_info(address_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_address(id)\n delete(\"addresses/#{id}\")\n end",
"def delete\n @address = Address.find(params[:address_id])\n end",
"def delete_address(address)\n address.delete!\n end",
"def delete id=nil\n id ||= self.id\n @nimble.delete \"contact/#{id}\"\n end",
"def delete_... | [
"0.823823",
"0.76458126",
"0.74411255",
"0.7301863",
"0.72175115",
"0.71461296",
"0.71368736",
"0.71223724",
"0.70379937",
"0.70300573",
"0.70029104",
"0.70017475",
"0.6908176",
"0.6907868",
"0.6796576",
"0.6768015",
"0.67422336",
"0.6723795",
"0.6723795",
"0.6723795",
"0.672... | 0.64942884 | 36 |
Delete an Address by Id for SMS | def delete_routing_sms_address_with_http_info(address_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_sms_address ..."
end
# verify the required parameter 'address_id' is set
fail ArgumentError, "Missing the required parameter 'address_id' when calling RoutingApi.delete_routing_sms_address" if address_id.nil?
# resource path
local_var_path = "/api/v2/routing/sms/addresses/{addressId}".sub('{format}','json').sub('{' + 'addressId' + '}', address_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_sms_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_address(id)\n delete(\"addresses/#{id}\")\n end",
"def delete\n @address = Address.find(params[:address_id])\n end",
"def delete_address(address)\n address.delete!\n end",
"def delete id=nil\n id ||= self.id\n @nimble.delete \"contact/#{id}\"\n end",
"def delete_... | [
"0.8239342",
"0.76468897",
"0.7438909",
"0.7303914",
"0.72190845",
"0.71464264",
"0.7139652",
"0.7039335",
"0.7030278",
"0.70030314",
"0.700274",
"0.6908973",
"0.6906973",
"0.67967844",
"0.676737",
"0.6741834",
"0.67238075",
"0.67238075",
"0.67238075",
"0.67238075",
"0.671685... | 0.71223754 | 7 |
Delete a phone number provisioned for SMS. | def delete_routing_sms_phonenumber(address_id, opts = {})
delete_routing_sms_phonenumber_with_http_info(address_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_customer_phone(customer_id, phone_id)\n delete(\"customers/#{customer_id}/phones/#{phone_id}\")\n end",
"def remove_phone (p)\n phone_numbers.delete_at p\n end",
"def destroy\n @phonenumber = Phonenumber.find(params[:id])\n @phonenumber.destroy\n\n head :no_content\n end",
... | [
"0.7268533",
"0.72600186",
"0.71352464",
"0.71031314",
"0.6942986",
"0.6842988",
"0.6807594",
"0.67865956",
"0.6767084",
"0.67649484",
"0.6731482",
"0.672774",
"0.6636843",
"0.66213554",
"0.6558635",
"0.65473104",
"0.65257716",
"0.65052646",
"0.6479042",
"0.6440309",
"0.64060... | 0.6369731 | 25 |
Delete a phone number provisioned for SMS. | def delete_routing_sms_phonenumber_with_http_info(address_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_sms_phonenumber ..."
end
# verify the required parameter 'address_id' is set
fail ArgumentError, "Missing the required parameter 'address_id' when calling RoutingApi.delete_routing_sms_phonenumber" if address_id.nil?
# resource path
local_var_path = "/api/v2/routing/sms/phonenumbers/{addressId}".sub('{format}','json').sub('{' + 'addressId' + '}', address_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_sms_phonenumber\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_customer_phone(customer_id, phone_id)\n delete(\"customers/#{customer_id}/phones/#{phone_id}\")\n end",
"def remove_phone (p)\n phone_numbers.delete_at p\n end",
"def destroy\n @phonenumber = Phonenumber.find(params[:id])\n @phonenumber.destroy\n\n head :no_content\n end",
... | [
"0.7268533",
"0.72600186",
"0.71352464",
"0.71031314",
"0.6942986",
"0.6842988",
"0.6807594",
"0.67865956",
"0.6767084",
"0.67649484",
"0.6731482",
"0.672774",
"0.6636843",
"0.66213554",
"0.6558635",
"0.65473104",
"0.65257716",
"0.65052646",
"0.6479042",
"0.6440309",
"0.64060... | 0.61286086 | 40 |
Delete the user's max utilization settings and revert to the organizationwide default. | def delete_routing_user_utilization(user_id, opts = {})
delete_routing_user_utilization_with_http_info(user_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clear_default_user\n @_default_user = nil\n end",
"def destroy\n @user_page_setting.destroy\n end",
"def reset_member_limits\r\n @member_limits.each do |user, limit|\r\n limit.reset\r\n end\r\n end",
"def clear_current_user; end",
"def destroy\n result = current_use... | [
"0.6049853",
"0.5794077",
"0.55486745",
"0.55344087",
"0.5484073",
"0.53461325",
"0.53131163",
"0.52906805",
"0.52800155",
"0.52749556",
"0.52602345",
"0.52483624",
"0.5208856",
"0.517547",
"0.5168046",
"0.51489973",
"0.51465255",
"0.51444685",
"0.5130903",
"0.51286817",
"0.5... | 0.0 | -1 |
Delete the user&39;s max utilization settings and revert to the organizationwide default. | def delete_routing_user_utilization_with_http_info(user_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_user_utilization ..."
end
# verify the required parameter 'user_id' is set
fail ArgumentError, "Missing the required parameter 'user_id' when calling RoutingApi.delete_routing_user_utilization" if user_id.nil?
# resource path
local_var_path = "/api/v2/routing/users/{userId}/utilization".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_user_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clear_default_user\n @_default_user = nil\n end",
"def destroy\n @user_page_setting.destroy\n end",
"def clear_current_user; end",
"def clear_user_and_mark_purged\n random_suffix = (('0'..'9').to_a + ('a'..'z').to_a).sample(8).join\n\n self.studio_person_id = nil\n self.name = nil\n ... | [
"0.6358747",
"0.59112644",
"0.58927345",
"0.5701909",
"0.5687984",
"0.5594676",
"0.5546773",
"0.5545212",
"0.5491082",
"0.54698616",
"0.5453417",
"0.54111135",
"0.5390647",
"0.53800553",
"0.5379309",
"0.5363997",
"0.5345485",
"0.5336234",
"0.5331013",
"0.52898973",
"0.528878"... | 0.0 | -1 |
Delete the organizationwide max utilization settings and revert to the system default. | def delete_routing_utilization(opts = {})
delete_routing_utilization_with_http_info(opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unset_limits(options = {})\r\n mem_fix = 1\r\n @@resource_limits = {}\r\n if options[:unset_env]\r\n ENV[\"MAGICK_AREA_LIMIT\"]=nil\r\n ENV[\"MAGICK_MAP_LIMIT\"]=nil\r\n ENV[\"MAGICK_MEMORY_LIMIT\"]=nil\r\n ENV[\"MAGICK_DISK_LIMIT\"]=nil\r\n end\r... | [
"0.57343435",
"0.56966364",
"0.5666205",
"0.5529655",
"0.5471934",
"0.54717773",
"0.5459326",
"0.5430016",
"0.5400638",
"0.53749424",
"0.5359212",
"0.53408",
"0.5300837",
"0.5300321",
"0.5291792",
"0.52771837",
"0.5207832",
"0.5204624",
"0.5196764",
"0.51963335",
"0.5181743",... | 0.0 | -1 |
Delete the organizationwide max utilization settings and revert to the system default. | def delete_routing_utilization_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_routing_utilization ..."
end
# resource path
local_var_path = "/api/v2/routing/utilization".sub('{format}','json')
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_routing_utilization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unset_limits(options = {})\r\n mem_fix = 1\r\n @@resource_limits = {}\r\n if options[:unset_env]\r\n ENV[\"MAGICK_AREA_LIMIT\"]=nil\r\n ENV[\"MAGICK_MAP_LIMIT\"]=nil\r\n ENV[\"MAGICK_MEMORY_LIMIT\"]=nil\r\n ENV[\"MAGICK_DISK_LIMIT\"]=nil\r\n end\r... | [
"0.57323545",
"0.5696815",
"0.56653935",
"0.5530463",
"0.5471131",
"0.5470981",
"0.54589444",
"0.5428829",
"0.54001933",
"0.5371029",
"0.53578496",
"0.5340306",
"0.5299525",
"0.52967054",
"0.5290305",
"0.5276439",
"0.52066785",
"0.5204589",
"0.51966095",
"0.5195773",
"0.51828... | 0.0 | -1 |
Remove routing language from user | def delete_user_routinglanguage(user_id, language_id, opts = {})
delete_user_routinglanguage_with_http_info(user_id, language_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_lang(uri, lang=self.path_lang)\n lang_code = Store.instance.settings['custom_lang_aliases'][lang] || lang\n\n # Do nothing if lang is empty.\n if lang_code.nil? || lang_code.empty?\n return uri\n end\n\n case @settings['url_pattern']\n when 'query'\n return ur... | [
"0.68258554",
"0.62279284",
"0.61071986",
"0.6066848",
"0.6048045",
"0.5916321",
"0.5913798",
"0.5913798",
"0.573063",
"0.5687655",
"0.56399965",
"0.5626786",
"0.56220305",
"0.5565366",
"0.5565234",
"0.55618393",
"0.5542741",
"0.5539161",
"0.5535223",
"0.5532577",
"0.5526178"... | 0.5226902 | 54 |
Remove routing language from user | def delete_user_routinglanguage_with_http_info(user_id, language_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_user_routinglanguage ..."
end
# verify the required parameter 'user_id' is set
fail ArgumentError, "Missing the required parameter 'user_id' when calling RoutingApi.delete_user_routinglanguage" if user_id.nil?
# verify the required parameter 'language_id' is set
fail ArgumentError, "Missing the required parameter 'language_id' when calling RoutingApi.delete_user_routinglanguage" if language_id.nil?
# resource path
local_var_path = "/api/v2/users/{userId}/routinglanguages/{languageId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'languageId' + '}', language_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_user_routinglanguage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_lang(uri, lang=self.path_lang)\n lang_code = Store.instance.settings['custom_lang_aliases'][lang] || lang\n\n # Do nothing if lang is empty.\n if lang_code.nil? || lang_code.empty?\n return uri\n end\n\n case @settings['url_pattern']\n when 'query'\n return ur... | [
"0.6822575",
"0.6225353",
"0.6104507",
"0.6062999",
"0.6043901",
"0.5913468",
"0.5913468",
"0.5913309",
"0.5735854",
"0.56866145",
"0.5636554",
"0.5629252",
"0.5618913",
"0.5565829",
"0.55654293",
"0.55628204",
"0.5540987",
"0.5540403",
"0.55381083",
"0.55366707",
"0.55249065... | 0.548246 | 26 |
Remove routing skill from user | def delete_user_routingskill(user_id, skill_id, opts = {})
delete_user_routingskill_with_http_info(user_id, skill_id, opts)
return nil
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove(skillName)\n\n end",
"def destroy\n @skill = @user.skills.find(params[:id])\n @skill.destroy\n\n respond_to do |format|\n format.html { redirect_to(user_skills_url(@user)) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @skill = current_user.skills.find(params[:i... | [
"0.66520846",
"0.65087",
"0.64458805",
"0.64318055",
"0.640045",
"0.63773775",
"0.62562084",
"0.6177585",
"0.61537915",
"0.61395776",
"0.60950154",
"0.607264",
"0.6032688",
"0.5999029",
"0.59834707",
"0.59799224",
"0.5969916",
"0.5962005",
"0.59486455",
"0.5937563",
"0.592466... | 0.6129079 | 11 |
Remove routing skill from user | def delete_user_routingskill_with_http_info(user_id, skill_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.delete_user_routingskill ..."
end
# verify the required parameter 'user_id' is set
fail ArgumentError, "Missing the required parameter 'user_id' when calling RoutingApi.delete_user_routingskill" if user_id.nil?
# verify the required parameter 'skill_id' is set
fail ArgumentError, "Missing the required parameter 'skill_id' when calling RoutingApi.delete_user_routingskill" if skill_id.nil?
# resource path
local_var_path = "/api/v2/users/{userId}/routingskills/{skillId}".sub('{format}','json').sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'skillId' + '}', skill_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#delete_user_routingskill\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove(skillName)\n\n end",
"def destroy\n @skill = @user.skills.find(params[:id])\n @skill.destroy\n\n respond_to do |format|\n format.html { redirect_to(user_skills_url(@user)) }\n format.xml { head :ok }\n end\n end",
"def destroy\n @skill = current_user.skills.find(params[:i... | [
"0.66520846",
"0.65087",
"0.64458805",
"0.64318055",
"0.640045",
"0.63773775",
"0.62562084",
"0.6177585",
"0.61537915",
"0.6129079",
"0.6129079",
"0.60950154",
"0.607264",
"0.6032688",
"0.5999029",
"0.59834707",
"0.59799224",
"0.5969916",
"0.5962005",
"0.59486455",
"0.5937563... | 0.61395776 | 9 |
Get the list of supported languages. | def get_routing_languages(opts = {})
data, _status_code, _headers = get_routing_languages_with_http_info(opts)
return data
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def supported_languages\n return self.supported_locales.present? ? self.supported_locales : [\"en\"]\n end",
"def getlist\r\n result = SUPPORTED_LANG_LIST\r\n end",
"def get_language_list\n call :get_language_list\n end",
"def languages\n translations.map(&:language)\n end",
... | [
"0.8217595",
"0.8006343",
"0.78214765",
"0.7794687",
"0.76729876",
"0.7650815",
"0.7650815",
"0.7650815",
"0.7650815",
"0.76375616",
"0.7583294",
"0.7466376",
"0.745824",
"0.73969007",
"0.73734707",
"0.73068357",
"0.724023",
"0.72044873",
"0.71648544",
"0.7157739",
"0.7150101... | 0.6002978 | 92 |
Get the list of supported languages. | def get_routing_languages_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.get_routing_languages ..."
end
if opts[:'sort_order'] && !['ascending', 'descending'].include?(opts[:'sort_order'])
fail ArgumentError, 'invalid value for "sort_order", must be one of ascending, descending'
end
# resource path
local_var_path = "/api/v2/routing/languages".sub('{format}','json')
# query parameters
query_params = {}
query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']
query_params[:'name'] = opts[:'name'] if opts[:'name']
query_params[:'id'] = @api_client.build_collection_param(opts[:'id'], :multi) if opts[:'id']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'LanguageEntityListing')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#get_routing_languages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def supported_languages\n return self.supported_locales.present? ? self.supported_locales : [\"en\"]\n end",
"def getlist\r\n result = SUPPORTED_LANG_LIST\r\n end",
"def get_language_list\n call :get_language_list\n end",
"def languages\n translations.map(&:language)\n end",
... | [
"0.82176244",
"0.8004659",
"0.7822113",
"0.77946955",
"0.7672182",
"0.76501215",
"0.76501215",
"0.76501215",
"0.76501215",
"0.7637189",
"0.75831145",
"0.74667925",
"0.7458409",
"0.7397909",
"0.7372927",
"0.7306661",
"0.7240775",
"0.7204052",
"0.7165767",
"0.71590245",
"0.7148... | 0.0 | -1 |
Get details about this queue. | def get_routing_queue(queue_id, opts = {})
data, _status_code, _headers = get_routing_queue_with_http_info(queue_id, opts)
return data
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def queue_stats\n broker_stats[\"queues\"]\n end",
"def name\n @queue.name\n end",
"def queue\n @queue ||= QueueManager.fetch(@name,@visibility)\n end",
"def info\n @queue << \"info\"\n end",
"def name\n @queue.queue_name\n end",
"def queued_build_d... | [
"0.7035148",
"0.6950711",
"0.6895175",
"0.6888979",
"0.68703395",
"0.6814118",
"0.6755307",
"0.66440725",
"0.6433887",
"0.6354206",
"0.63439405",
"0.63269806",
"0.6320574",
"0.6320574",
"0.62654006",
"0.6218406",
"0.6208837",
"0.6202117",
"0.6181912",
"0.6115444",
"0.6067164"... | 0.0 | -1 |
Get details about this queue. | def get_routing_queue_with_http_info(queue_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.get_routing_queue ..."
end
# verify the required parameter 'queue_id' is set
fail ArgumentError, "Missing the required parameter 'queue_id' when calling RoutingApi.get_routing_queue" if queue_id.nil?
# resource path
local_var_path = "/api/v2/routing/queues/{queueId}".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'Queue')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#get_routing_queue\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def queue_stats\n broker_stats[\"queues\"]\n end",
"def name\n @queue.name\n end",
"def queue\n @queue ||= QueueManager.fetch(@name,@visibility)\n end",
"def info\n @queue << \"info\"\n end",
"def name\n @queue.queue_name\n end",
"def queued_build_d... | [
"0.7035148",
"0.6950711",
"0.6895175",
"0.6888979",
"0.68703395",
"0.6814118",
"0.6755307",
"0.66440725",
"0.6433887",
"0.6354206",
"0.63439405",
"0.63269806",
"0.6320574",
"0.6320574",
"0.62654006",
"0.6218406",
"0.6208837",
"0.6202117",
"0.6181912",
"0.6115444",
"0.6067164"... | 0.5525941 | 69 |
Get Estimated Wait Time | def get_routing_queue_estimatedwaittime(queue_id, opts = {})
data, _status_code, _headers = get_routing_queue_estimatedwaittime_with_http_info(queue_id, opts)
return data
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wait_time\n self.measurement.wait_time\n end",
"def runtime_latency\n (finished_at || Time.current) - performed_at if performed_at\n end",
"def estimate_at_completion_duration\n return planned_duration - earned_schedule\n end",
"def total_mpi_busy_wait_time\n @total_mpi_bus... | [
"0.81492645",
"0.7104484",
"0.70677775",
"0.70523655",
"0.7039066",
"0.7015603",
"0.69371104",
"0.688588",
"0.68729275",
"0.68664545",
"0.686521",
"0.68544644",
"0.67905307",
"0.6749323",
"0.6745617",
"0.6745584",
"0.67152995",
"0.6707634",
"0.66368276",
"0.6594622",
"0.65853... | 0.0 | -1 |
Get Estimated Wait Time | def get_routing_queue_estimatedwaittime_with_http_info(queue_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.get_routing_queue_estimatedwaittime ..."
end
# verify the required parameter 'queue_id' is set
fail ArgumentError, "Missing the required parameter 'queue_id' when calling RoutingApi.get_routing_queue_estimatedwaittime" if queue_id.nil?
# resource path
local_var_path = "/api/v2/routing/queues/{queueId}/estimatedwaittime".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s)
# query parameters
query_params = {}
query_params[:'conversationId'] = opts[:'conversation_id'] if opts[:'conversation_id']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'EstimatedWaitTimePredictions')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#get_routing_queue_estimatedwaittime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wait_time\n self.measurement.wait_time\n end",
"def runtime_latency\n (finished_at || Time.current) - performed_at if performed_at\n end",
"def estimate_at_completion_duration\n return planned_duration - earned_schedule\n end",
"def total_mpi_busy_wait_time\n @total_mpi_bus... | [
"0.81487745",
"0.71049595",
"0.7069294",
"0.7051209",
"0.70391375",
"0.7016588",
"0.6935786",
"0.68869776",
"0.68720704",
"0.68671584",
"0.68660015",
"0.68559414",
"0.67899704",
"0.6750042",
"0.6745653",
"0.6744974",
"0.67171395",
"0.6707889",
"0.66387314",
"0.65927136",
"0.6... | 0.0 | -1 |
Get Estimated Wait Time | def get_routing_queue_mediatype_estimatedwaittime(queue_id, media_type, opts = {})
data, _status_code, _headers = get_routing_queue_mediatype_estimatedwaittime_with_http_info(queue_id, media_type, opts)
return data
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wait_time\n self.measurement.wait_time\n end",
"def runtime_latency\n (finished_at || Time.current) - performed_at if performed_at\n end",
"def estimate_at_completion_duration\n return planned_duration - earned_schedule\n end",
"def total_mpi_busy_wait_time\n @total_mpi_bus... | [
"0.81487745",
"0.71049595",
"0.7069294",
"0.7051209",
"0.70391375",
"0.7016588",
"0.6935786",
"0.68869776",
"0.68720704",
"0.68671584",
"0.68660015",
"0.68559414",
"0.67899704",
"0.6750042",
"0.6745653",
"0.6744974",
"0.67171395",
"0.6707889",
"0.66387314",
"0.65927136",
"0.6... | 0.0 | -1 |
Get Estimated Wait Time | def get_routing_queue_mediatype_estimatedwaittime_with_http_info(queue_id, media_type, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.get_routing_queue_mediatype_estimatedwaittime ..."
end
# verify the required parameter 'queue_id' is set
fail ArgumentError, "Missing the required parameter 'queue_id' when calling RoutingApi.get_routing_queue_mediatype_estimatedwaittime" if queue_id.nil?
# verify the required parameter 'media_type' is set
fail ArgumentError, "Missing the required parameter 'media_type' when calling RoutingApi.get_routing_queue_mediatype_estimatedwaittime" if media_type.nil?
# resource path
local_var_path = "/api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s).sub('{' + 'mediaType' + '}', media_type.to_s)
# query parameters
query_params = {}
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'EstimatedWaitTimePredictions')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#get_routing_queue_mediatype_estimatedwaittime\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wait_time\n self.measurement.wait_time\n end",
"def runtime_latency\n (finished_at || Time.current) - performed_at if performed_at\n end",
"def estimate_at_completion_duration\n return planned_duration - earned_schedule\n end",
"def total_mpi_busy_wait_time\n @total_mpi_bus... | [
"0.81487745",
"0.71049595",
"0.7069294",
"0.7051209",
"0.70391375",
"0.7016588",
"0.6935786",
"0.68869776",
"0.68720704",
"0.68671584",
"0.68660015",
"0.68559414",
"0.67899704",
"0.6750042",
"0.6745653",
"0.6744974",
"0.67171395",
"0.6707889",
"0.66387314",
"0.65927136",
"0.6... | 0.0 | -1 |
Get the members of this queue | def get_routing_queue_users(queue_id, opts = {})
data, _status_code, _headers = get_routing_queue_users_with_http_info(queue_id, opts)
return data
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n @members\n end",
"def membe... | [
"0.76058334",
"0.76058334",
"0.76058334",
"0.76058334",
"0.70418316",
"0.70418316",
"0.68412703",
"0.6680668",
"0.6662234",
"0.65510917",
"0.65439665",
"0.6524629",
"0.65193725",
"0.64570415",
"0.64570415",
"0.64328146",
"0.6432404",
"0.63932735",
"0.6340072",
"0.63375974",
"... | 0.0 | -1 |
Get the members of this queue | def get_routing_queue_users_with_http_info(queue_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: RoutingApi.get_routing_queue_users ..."
end
# verify the required parameter 'queue_id' is set
fail ArgumentError, "Missing the required parameter 'queue_id' when calling RoutingApi.get_routing_queue_users" if queue_id.nil?
# resource path
local_var_path = "/api/v2/routing/queues/{queueId}/users".sub('{format}','json').sub('{' + 'queueId' + '}', queue_id.to_s)
# query parameters
query_params = {}
query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
query_params[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by']
query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand']
query_params[:'joined'] = opts[:'joined'] if opts[:'joined']
query_params[:'name'] = opts[:'name'] if opts[:'name']
query_params[:'profileSkills'] = @api_client.build_collection_param(opts[:'profile_skills'], :multi) if opts[:'profile_skills']
query_params[:'skills'] = @api_client.build_collection_param(opts[:'skills'], :multi) if opts[:'skills']
query_params[:'languages'] = @api_client.build_collection_param(opts[:'languages'], :multi) if opts[:'languages']
query_params[:'routingStatus'] = @api_client.build_collection_param(opts[:'routing_status'], :multi) if opts[:'routing_status']
query_params[:'presence'] = @api_client.build_collection_param(opts[:'presence'], :multi) if opts[:'presence']
# header parameters
header_params = {}
# HTTP header 'Accept' (if needed)
local_header_accept = ['application/json']
local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
# HTTP header 'Content-Type'
local_header_content_type = ['application/json']
header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
# form parameters
form_params = {}
# http body (model)
post_body = nil
auth_names = ['PureCloud OAuth']
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => 'QueueMemberEntityListing')
if @api_client.config.debugging
@api_client.config.logger.debug "API called: RoutingApi#get_routing_queue_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n return @members\n end",
"def members\n @members\n end",
"def membe... | [
"0.7605825",
"0.7605825",
"0.7605825",
"0.7605825",
"0.70418257",
"0.70418257",
"0.68412596",
"0.66806644",
"0.6662208",
"0.6551057",
"0.65439236",
"0.6524602",
"0.6519345",
"0.6457027",
"0.6457027",
"0.64328",
"0.6432381",
"0.6393252",
"0.63400126",
"0.6337563",
"0.632695",
... | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.