query_id stringlengths 32 32 | query stringlengths 7 6.75k | positive_passages listlengths 1 1 | negative_passages listlengths 88 101 |
|---|---|---|---|
1e45b02275713602a3db9cf7b6919d19 | Unpack and rsync the contents into release path | [
{
"docid": "3d3745109aa599cf34280c4efc0b0827",
"score": "0.70953906",
"text": "def release\n context.execute :tar, '-xvzf', \"#{deploy_path}/local_file/#{fetch(:repo_url)}\"\n context.execute :rsync, \"-a\", \"--exclude=#{fetch(:repo_url)}\", \"#{deploy_path}/local_file/*\", release_path\n ... | [
{
"docid": "384a28ecfb39472a1a15bbe4e532b45f",
"score": "0.66149193",
"text": "def unpack_repo(command, path)\n destination = iso_location\n remove_directory(iso_location)\n destination.mkpath # in case it didn't already exist\n Archive.extract(path, destination) if path\n ... |
9c64abeb01fbc85d80172b9b79e011ba | POST /client_groups POST /client_groups.json | [
{
"docid": "5dcc2e739c0756a7dc89637b3aa7769d",
"score": "0.74921674",
"text": "def create\n \n @client_group = ClientGroup.create(client_group_params)\n redirect_to account_account_client_groups_path(@account)\n \n end",
"title": ""
}
] | [
{
"docid": "5cb4ab8a327fe1e230609263ea21fe93",
"score": "0.71519995",
"text": "def create\n @group_params = group_params.to_json\n @reponse = HTTParty.post(\"https://rails-api-ipo.herokuapp.com/api/v1/groups.json\",\n :body => @group_params,\n :headers => { 'Content-Type' => 'application/jso... |
069d2330e14b88d0f7e3e8cf71a4a1c0 | Updates value of activity_type through in line editing feature of time entry. | [
{
"docid": "485e5181bbc27394df336cb11cccdd8f",
"score": "0.8105453",
"text": "def set_time_entry_activity_type\n data=params\n @i = Physical::Timeandexpenses::TimeEntry.find(data[:id])\n f = current_company.company_activity_types.find(data[:value])\n @i.update_attribute( :activity_type, dat... | [
{
"docid": "b3585ecfc666d7f4b4e33e2b4bba8ce5",
"score": "0.7638845",
"text": "def activity_type=(value)\n @activity_type = value\n end",
"title": ""
},
{
"docid": "b9f6b1d4051af1375e84a6eec3f346cd",
"score": "0.6995555",
"text": "def set_activity_type\n ... |
fe4d3b65772ee71bc86dba77f15d2918 | REVIEW: retrieve the locale account settings for a particular user. | [
{
"docid": "ab1de89759775acd8d295eb164cdf298",
"score": "0.85774505",
"text": "def get_locale_account_settings(user_id)\n path = \"/d2l/api/lp/#{$lp_ver}/accountSettings/#{user_id}/locale/\"\n _get(path)\n # returns Locale JSON block\nend",
"title": ""
}
] | [
{
"docid": "75b983121806fd77581173c92d58adf4",
"score": "0.67348874",
"text": "def user_locale\n @user_locale\n end",
"title": ""
},
{
"docid": "778c2aa198791e8fc9f75dbdd43dbeb8",
"score": "0.670411",
"text": "def get_account_settings\n acc_settings = self.quote.projec... |
c47c5aa54551d8548b9c325900ecd712 | POST /web/v1/my_bikes POST /web/v1/my_bikes.json | [
{
"docid": "18321029aea2c26c75d6a5b14cbac206",
"score": "0.0",
"text": "def create\n @my_bike = MyBike.new(my_bike_params)\n\n if @my_bike.save\n if @my_bike.bike_image.present?\n if set_host == \"localhost:3000\"\n @my_bike.update(my_bike_image_url: \"http://\" + set_host + @... | [
{
"docid": "9a95270529965b0b4eb0701e59852ecb",
"score": "0.6774853",
"text": "def create\n @ayu_din = AyurvedaDincharya.new(bike_params)\n\n if @ayu_din.save\n render json: @ayu_din, status: :created #serializer: Web::V1::BikeSerializer\n else\n render json: @ayu_din.errors, status: :... |
a10f8c096ff0036b987248cc04a3062f | POST /games POST /games.xml | [
{
"docid": "0dddd6fd560984caaeb5ad80a977738e",
"score": "0.56736666",
"text": "def create\n @game = Game.new(params[:game])\n\n \n respond_to do |format|\n if @theme.games << @game\n groups = params[:groups]\n groups.each do |group|\n @game.groups << Group.find(grou... | [
{
"docid": "34b8d6896965a23e13eabfa2a139db2d",
"score": "0.62753236",
"text": "def create\n @game = Game.new(params[:game])\n\n respond_to do |format|\n if @game.save\n format.html { redirect_to(@game, :notice => 'Game was successfully created.') }\n format.xml { render :xml =>... |
c9c176f69b8bd1b7dd88179afdb340c0 | This action sets values that are used by detail of item page for admin Story: Admin can see information about a specific item ( | [
{
"docid": "b9c5adea12b574fe1601e0689e4e7486",
"score": "0.0",
"text": "def show\n @item=Item.find(params[:id])\n @search = Item.search(params[:search])\n end",
"title": ""
}
] | [
{
"docid": "acd463d7fc3f97d8292b56a0879bbf8c",
"score": "0.72779495",
"text": "def set_item\n @item = Item.friendly.find(params[:id])\n end",
"title": ""
},
{
"docid": "bd2647b30b7831de0f2fda7df725bd9b",
"score": "0.72222227",
"text": "def set_item\n #@admin_item = Admin::... |
6d92804a523bcfaebabea04768649bb8 | the first argument, project_id, may be a single id or an array of ids | [
{
"docid": "32b2abd497b5ca3055fd621a93198a5b",
"score": "0.0",
"text": "def get_denotation_hids(project_id = nil, span = nil)\n\t\tdenotations.in_project(project_id).in_span(span).pluck(:hid)\n\tend",
"title": ""
}
] | [
{
"docid": "afb051ca060bd1f7d8d1a357dd166171",
"score": "0.7273358",
"text": "def set_project_and_project_id\n @project_id = params[:project_id]\n @project = Project.find_by(id: @project_id)\n end",
"title": ""
},
{
"docid": "36373e66f9cc7053660327cb53dd6ff4",
"score": "0.69173473... |
0a25a1276b9c480127147b73b18947e3 | take raw ipn and validate it | [
{
"docid": "712a2d2141b14812b876ca8cc5e0799f",
"score": "0.72764117",
"text": "def validate_ipn(raw)\n \tpost_data = \"cmd=_notify-validate&\" + raw\n \turl = URI.parse(Figaro.env.ipn_validate_url)\n \thttp = Net::HTTP.new(url.host, url.port)\n \thttp.use_ssl = true\n\n \trequest = Net::HTTP::Post.... | [
{
"docid": "f31ea46817180b52d23d1442955179e3",
"score": "0.6933143",
"text": "def valid_ip?(str)\n str_arr = str.split(\".\");\n return false if str_arr.length != 4\n\n str_arr.each do |el|\n return false unless el.match(/^\\d{0,3}$/) && el.to_i >= 0 && el.to_i <= 255\n end\n return true \nen... |
a70da1e512926622b171a401218bbe4e | prints out game board as a string | [
{
"docid": "e16f5ec45d6e44e05e93f2f2691754df",
"score": "0.0",
"text": "def to_s\n result = \"Rows: #{@rows.to_s}\\n\" +\n \"Columns: #{@columns.to_s}\\n\" +\n \"Players turn: #{@player_turn.to_s}\\n\" +\n \"Last Played: #{@last_played.row}, #{@last_played.column}\\n\"\n\n (@r... | [
{
"docid": "5c71a524929c7179a3222903d96fb06f",
"score": "0.85184026",
"text": "def print_board(new_game)\n puts \"\n \n |#{new_game.board[0][0]}|#{new_game.board[0][1]}|#{new_game.board[0][2]}|\n |#{new_game.board[1][0]}|#{new_game.board[1][1]}|#{n... |
12963f282a3d4b92d6c9da8a3af6bc82 | Update an Existing Rule and Reorder the Rule Modifies existing PBR rule along with relative position among other PBR rules inside a PBR section. | [
{
"docid": "205c40e635cfd7198fdda39e27dd0717",
"score": "0.0",
"text": "def revise_pbr_rule_revise_with_http_info(section_id, rule_id, pbr_rule, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug 'Calling API: ManagementPlaneApiServicesPolicyBasedRoutingApi.revise... | [
{
"docid": "e9b83370565615df592c01b3b5cced91",
"score": "0.6819758",
"text": "def reorder_rules\n self.survey_version.rules.where(['rules.rule_order > ?', self.rule_order])\n .update_all('rules.rule_order = rules.rule_order - 1')\n end",
"title": ""
},
{
"docid": "30031315a98511a169... |
cffc7d84d83038c64e4e10140cb923d1 | POST /moments POST /moments.json | [
{
"docid": "c4b8d11539874a70436ea406328230a0",
"score": "0.58762175",
"text": "def create\n @moment = current_user.moments.build(moment_params)\n\n respond_to do |format|\n if @moment.save\n flash[:notice] = \"Moment was successfully created\"\n format.html { redirect_to action:... | [
{
"docid": "a1d9255611391a67d7fb9fcb06e49125",
"score": "0.6883427",
"text": "def create\n @mom = Mom.new(mom_params)\n\n respond_to do |format|\n if @mom.save\n format.html { redirect_to mom_url(@mom), notice: \"Mom was successfully created.\" }\n format.json { render :show, st... |
9e5e1f7bbc77c018268f60234a71e446 | Returns all pentagon indexes at the given resolution. | [
{
"docid": "13ffd1db1e87a446c3d35587f07546ea",
"score": "0.8370498",
"text": "def pentagons(resolution)\n out = H3Indexes.of_size(pentagon_count)\n Bindings::Private.get_pentagon_indexes(resolution, out)\n out.read\n end",
"title": ""
}
] | [
{
"docid": "6a2b4844c9e6bd7bd1f8eb1f7c357323",
"score": "0.5621003",
"text": "def as_indices\n ix = Vedeu::Point.coerce(value: (x - 1), min: 0).value\n iy = Vedeu::Point.coerce(value: (y - 1), min: 0).value\n\n [iy, ix]\n end",
"title": ""
},
{
"docid": "6bad8576366... |
becd2b4e794f199e0203f15e5062eb89 | Performs validations related to the `name` attribute. | [
{
"docid": "f6b1214ca0352bcf418350dd5829333b",
"score": "0.7255987",
"text": "def _validate_name(name)\n if name =~ %r{/}\n results.add_error('name', 'The name of a spec should not contain ' \\\n 'a slash.')\n end\n\n if name =~ /\\s/\n resu... | [
{
"docid": "213ff17a4aa6a81924b0792dd8fee91b",
"score": "0.79200554",
"text": "def name_is_valid\n errors.add(:name,\"Invalid string for name.\") unless name_is_valid?\n end",
"title": ""
},
{
"docid": "a998b5f4c5938498f8ed06d15b303bbf",
"score": "0.7815194",
"text": "def name_is... |
2452859d949cfc3df0013eea27861cb3 | uploads the public/swift_test.html file to the given directory | [
{
"docid": "b64dbeedd5db00768e3b7fee6b9c12ee",
"score": "0.8055405",
"text": "def upload_example_file_2(dirname)\n file_location = Rails.root.to_s + \"/public/swift_test.html\"\n upload_file file_location, \"swift_test.html\", dirname\n end",
"title": ""
}
] | [
{
"docid": "10e11c8983a045bdd927d78f776796a5",
"score": "0.6716777",
"text": "def serve_local\r\n send_file(File.expand_path(settings.public_folder + unescape(@path)))\r\nend",
"title": ""
},
{
"docid": "3ae5d46a6ac6005aca9da51442c66c22",
"score": "0.645342",
"text": "def upload_fil... |
42f921deb6689a4fb717e500dfbe5309 | Convert CamelCase to ruby_case | [
{
"docid": "2584c238220c37e7734faf5685043a11",
"score": "0.0",
"text": "def underscore\n self.gsub(/::/, '/').\n gsub(/([A-Z]+)([A-Z][a-z])/,'\\1_\\2').\n gsub(/([a-z\\d])([A-Z])/,'\\1_\\2').\n tr(\"-\", \"_\").\n downcase\n end",
"title": ""
}
] | [
{
"docid": "34f8b17c1aabdf088641457489202bd9",
"score": "0.82909286",
"text": "def ruby_case(input)\n input.to_s.split(/(?=[A-Z])/).join('_').downcase\n end",
"title": ""
},
{
"docid": "34b0070ccdd25f92f49fb73f1952722a",
"score": "0.8252865",
"text": "def ruby_case(s)\n ... |
a2da248dd0566adad8720bb072f582f6 | TODO: Provide boundschecking when setting registers | [
{
"docid": "6bb33cbe3e2db04e274dfb7a2d34d95b",
"score": "0.0",
"text": "def reg_dp=(val)\n @registers[:dp] = val\n end",
"title": ""
}
] | [
{
"docid": "0e9486ccc899cd0c433e1b7b8ce6d678",
"score": "0.73894",
"text": "def registers; end",
"title": ""
},
{
"docid": "484044310dc783e6a4acb58c74b6ec8f",
"score": "0.6664202",
"text": "def set_regs\n\t\traise NotImplementedError\n\tend",
"title": ""
},
{
"docid": "c9... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "3d1d80a204f8d76d8f077e7bb1aa4515",
"score": "0.0",
"text": "def set_clinical_stat\n @clinical_stat = ClinicalStat.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "631f4c5b12b423b76503e18a9a606ec3",
"score": "0.60339177",
"text": "def process_action(...)\n run_callbacks(:process_action) do\n super\n end\n end",
"title": ""
},
{
"docid": "7b068b9055c4e7643d4910e8e694ecdc",
"score": "0.60135007",
"text": "d... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "cd81693f61ef67b382c8b67a1bfbf62c",
"score": "0.0",
"text": "def joining_checklist_master_params\n params.require(:joining_checklist_master).permit(:code, :name, :description, :status)\n end",
"title": ""
}
] | [
{
"docid": "e164094e79744552ae1c53246ce8a56c",
"score": "0.69792545",
"text": "def strong_params\n params.require(:user).permit(param_whitelist)\n end",
"title": ""
},
{
"docid": "e662f0574b56baff056c6fc4d8aa1f47",
"score": "0.6781151",
"text": "def strong_params\n params.requ... |
cbd923f763164cf478c061553b8a7597 | GET /diaries/1 GET /diaries/1.json | [
{
"docid": "f7ccee1c34616b0af582dd0fcc834f69",
"score": "0.0",
"text": "def show\n\tend",
"title": ""
}
] | [
{
"docid": "3f700d94e5b1aa23e0b63bd2e234f662",
"score": "0.73436594",
"text": "def show\n @diary = Diary.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @diary }\n end\n end",
"title": ""
},
{
"docid": "54b1aec6c094a... |
7f08f03afebef90605eb34e722ac86cc | Returns how much time it took the appraiser to complete the appraisal (can return in seconds (s), minutes(m), hours(h), or days(d)) | [
{
"docid": "befc5c6d4fd0093191c86a8d5b6c8dc2",
"score": "0.60476446",
"text": "def completion_time(format = \"s\")\n begin\n # claimed_on = (get_date_for_status_change(EActivityValuePayed, EActivityValueClaimed)).to_i\n claimed_on = get_claimed_on\n completed_on = (get_date_for_status_... | [
{
"docid": "2df5858637dcfb8688ffcb9985a22e50",
"score": "0.7023491",
"text": "def duration\n if leg_a_answered_at.nil?\n return 0\n else\n if hangup? \n (leg_a_hangup_at - leg_a_answered_at).round\n else\n (Time.now - leg_a_answered_at).round\n end\n end\n end... |
96b0ee6e821ca003bbcae4d48e75040c | The name of the key on the model which declares the association | [
{
"docid": "692a7b158b977eb926f56cc6fa09ca72",
"score": "0.7761065",
"text": "def owner_key_name\n reflection.join_foreign_key\n end",
"title": ""
}
] | [
{
"docid": "3458a71aaec781f30787622dca003bde",
"score": "0.8844785",
"text": "def association_key_name; end",
"title": ""
},
{
"docid": "3458a71aaec781f30787622dca003bde",
"score": "0.8844785",
"text": "def association_key_name; end",
"title": ""
},
{
"docid": "de069bf00d... |
2fbd370766f93729be7fb7119d6e3906 | input_type is checkbox or radio | [
{
"docid": "a96b482c533a3cc3d89a74276f3e5447",
"score": "0.6469782",
"text": "def review_input(input_type, question, value, is_checked, is_disabled)\n content_tag(:label, class: \"#{input_type}-inline\") do\n properties = {\n type: input_type, value: value, name: \"answer[#{question.id}][... | [
{
"docid": "6e5d758bdbee6bda8ef106256ed99d27",
"score": "0.69360626",
"text": "def type\n assert_exists\n 'radio'\n end",
"title": ""
},
{
"docid": "b7c66f66c451abb34eb1f1ef58689ba3",
"score": "0.676675",
"text": "def check_box_type?\n self[:value][:type].to_s\n end"... |
08c9f9f29098de128934ba0d39d6b835 | Pass the specified initial value to each previously added Proc with matching key and returns the mutated value. | [
{
"docid": "ffd2c1c3718dcfe9f07c7a7ea51c67ca",
"score": "0.53494483",
"text": "def apply( key, value )\n sync_on_hooks( key ) do |hks|\n hks.each { |hook| hook[0].call( value ) }\n value\n end\n end",
"title": ""
}
] | [
{
"docid": "9b314bed02e49ec28d05155225a1eaf5",
"score": "0.58426255",
"text": "def create_set_and_get(initial_value=0) # Note the default value of 0\n closure_value = initial_value\n return Proc.new {|x| closure_value = x}, Proc.new { puts closure_value }\nend",
"title": ""
},
{
"docid... |
9f54652b188657fa64e4402de76de274 | Get the system of an include in +code+. | [
{
"docid": "b86c3d463024858621f812422c433c79",
"score": "0.918583",
"text": "def get_include_system(code)\n return code[2][1][1]\n end",
"title": ""
}
] | [
{
"docid": "41646de8bdfe3cd6d7c9786162b22bea",
"score": "0.69932973",
"text": "def get_system(code)\n return code[2][1][0][1][1][1]\n end",
"title": ""
},
{
"docid": "c74886994876a1ae5e36efca062273a3",
"score": "0.68559283",
"text": "def is_include?(code,systems)\n ... |
c657de4b70d266e9a3a784b999ea9e60 | Never trust parameters from the scary internet, only allow the white list through. | [
{
"docid": "d44340699b5b78699650a8f416be5184",
"score": "0.0",
"text": "def collection_item_params\n params.require(:collection_item).permit(:user_id, :collection_id, :file, :video, :item_type)\n end",
"title": ""
}
] | [
{
"docid": "3663f9efd3f3bbf73f4830949ab0522b",
"score": "0.7497761",
"text": "def whitelisted_params\n super\n end",
"title": ""
},
{
"docid": "13a61145b00345517e33319a34f7d385",
"score": "0.6959097",
"text": "def strong_params\n params.require(:request).permit(param_white... |
129d8171a9d79923e1b60bbc24ed31ac | DELETE /servicos/1 DELETE /servicos/1.json | [
{
"docid": "9796a0719867d22997be1749bc9200f3",
"score": "0.71910924",
"text": "def destroy\n @servico.destroy\n respond_to do |format|\n format.html { redirect_to servicos_url, notice: 'Servico was successfully destroyed.' }\n format.json { head :no_content }\n end\n end",
"title... | [
{
"docid": "42bf509d63cb36d4d195ef2f26ebbb10",
"score": "0.7511679",
"text": "def destroy\n @servicios = Servicio.find(params[:id])\n @servicios.destroy\n\n respond_to do |format|\n format.html { redirect_to(servicios_url) }\n format.xml { head :ok }\n end\n end",
"title": ""... |
bb105c2c0a6f2df3234e04d45ec261ed | Make sure the lock version column gets updated when counters are updated. | [
{
"docid": "57c3cbf051f57d72176115c7cd2c05e6",
"score": "0.6674223",
"text": "def update_counters(id, counters)\n counters = counters.merge(locking_column => 1) if locking_enabled?\n super\n end",
"title": ""
}
] | [
{
"docid": "4af21d957a129a3e3723235f4d293645",
"score": "0.6916316",
"text": "def lock!\n self.update_column(:occurrences_ready, false)\n end",
"title": ""
},
{
"docid": "85806f058198201c520512f9b7369f03",
"score": "0.6914276",
"text": "def locking_column; end",
"title": ""
... |
ef69453d547fccd24f8eb1575bde1eb6 | This is where the composition begins | [
{
"docid": "a91b927b91298ed674fcb2093c2b3a9a",
"score": "0.0",
"text": "def start_composition\n current_solution = generate_initial_solution\n calculate_weight(current_solution)\n args = create_arguments(current_solution)\n result_array = start_simulated_annealing(args)\n \n solution_c... | [
{
"docid": "5ece6166ebc8eba8e2779ccb0d4d864a",
"score": "0.63748896",
"text": "def components; end",
"title": ""
},
{
"docid": "7a5a921e4456eacf5ba2028b885f0c7a",
"score": "0.6297715",
"text": "def compose\n raise NotImplementedError.new\n end",
"title": ""
},
{
"... |
3fae7908b46e0786e468337a23f1c403 | GET /ofertas_academica/1 GET /ofertas_academica/1.json | [
{
"docid": "9d45d80647a1d7b094caacf945d1f70e",
"score": "0.697556",
"text": "def show\n @oferta_academica = OfertaAcademica.find(params[:id])\n\n render json: @oferta_academica\n end",
"title": ""
}
] | [
{
"docid": "0de35831f7d677c5b200daa818ca23f9",
"score": "0.6582308",
"text": "def consulta\n fiesta = Fiesta.all\n render json: fiesta\n end",
"title": ""
},
{
"docid": "8a87bec30e04a6e2c0134f574268be63",
"score": "0.6245684",
"text": "def index\n @oferta_academica = Of... |
f97ce2ecc39ae9290fadc0d7ca300586 | POST /productivities POST /productivities.json | [
{
"docid": "0b0c195f33cb418d45d6c8ac51e47ea6",
"score": "0.61969364",
"text": "def create\n @productivity = Productivity.new(productivity_params)\n\n @productivity.user = current_user\n\n respond_to do |format|\n if @productivity.save\n format.html { redirect_to @productivity, notic... | [
{
"docid": "0694e19e2dffcf115d3d0326ce71367b",
"score": "0.67297024",
"text": "def create\n @productivity = Productivity.new(productivity_params)\n\n respond_to do |format|\n if @productivity.save\n format.html { redirect_to productivities_path, notice: 'A produtividade foi criada com ... |
79dc80963c08f0fe06c7f0fdc4cfe273 | returns html for the thumbnail for this product's photo | [
{
"docid": "6079e67df1a7cc10daf1600020da1978",
"score": "0.6828835",
"text": "def primary_photo_thumbnail\n if !primary_photo.nil?\n primary_photo.thumbnail_tag(:small_thumbnail)\n else\n Photo.default_thumbnail\n end \n end",
"title": ""
}
] | [
{
"docid": "2e5e2564c4b56c5a5dea43f3f998000c",
"score": "0.7971708",
"text": "def html\n \"<img src='#{thumbnail.sub( /\\_s.jpg/, '_m.jpg')}'>\" #TODO user image_tag helper here??\n end",
"title": ""
},
{
"docid": "17799d1b2e5fc74ad30a309b5c84befc",
"score": "0.75732344",
"tex... |
d36ff77691018d4fefe66cfd901bb195 | Sets the canonicalName property value. The canonical name of the CNAME record. Used to configure the CNAME record at the DNS host. | [
{
"docid": "7a169a9a5d688f4bb99fda613342220f",
"score": "0.8033565",
"text": "def canonical_name=(value)\n @canonical_name = value\n end",
"title": ""
}
] | [
{
"docid": "2c74abe5532812bd4b9649822fada537",
"score": "0.65823734",
"text": "def canonical_name\n return @canonical_name\n end",
"title": ""
},
{
"docid": "22b33feeaa8f427831cf0501d0e713e8",
"score": "0.6377586",
"text": "def canonical_name\n normalized... |
89df6cd570f1eceb67fe4bfc27dd9975 | Find unpublished jobs PARAMS: publication_type, source, copyright | [
{
"docid": "9a6499e1ea1adc07993e7f257b3291f9",
"score": "0.7638031",
"text": "def find_unpublished_jobs(params:)\n response = HTTParty.get(\"#{@host}/api/jobs/unpublished_jobs\", query: params)\n \n return response['jobs']\n end",
"title": ""
}
] | [
{
"docid": "af799dc56e5b3489711de7d926e3e328",
"score": "0.6299336",
"text": "def get_unpublished_books\n @grid_title = \"Not Published\"\n\n # get task 'Production Complete' which is a published book\n published_task = Task.find_by_name(\"Production Complete\")\n workflow_task = published_t... |
57b12bddaa1017cacae48365dc9b4bf2 | GET /notice_attachments GET /notice_attachments.json | [
{
"docid": "6f71f7bb5508ce3d1fc50f3f63e3acf5",
"score": "0.77196306",
"text": "def index\n @notice_attachments = NoticeAttachment.all\n end",
"title": ""
}
] | [
{
"docid": "0e626e22b114ba98d32fc8c24a9dc61f",
"score": "0.70080537",
"text": "def attachments\n data[:attachments]\n end",
"title": ""
},
{
"docid": "0c477dc6cfd925095f6f1c970293808d",
"score": "0.6953749",
"text": "def find_attachments(message)\n JSON.parse(RestClien... |
ae45f83f8fa193ce5e9d52f5fafe2d23 | Create a new user for the configured application. | [
{
"docid": "9001a1e7cf8986de1cac261f343d1d34",
"score": "0.8069731",
"text": "def create_user\n params = {\n :client_id => Swiftype.platform_client_id,\n :client_secret => Swiftype.platform_client_secret\n }\n post(\"users.json\", params)\n end",
"title": ... | [
{
"docid": "71d4ce23424967b5aa36dcaa1b2da993",
"score": "0.7799109",
"text": "def create_user\n User.create name: \"test\", email: \"test@example.com\", password: \"123456\"\n end",
"title": ""
},
{
"docid": "862cac6f52e9eecfd76924fb02b6ec55",
"score": "0.7776523",
"text": "d... |
441de859cbd05d69f6cca24e1e780571 | Internal: Persists values which are stored in dataset CSV files. | [
{
"docid": "e51793765a37e707f17e9b94fb247d34",
"score": "0.57580686",
"text": "def save_file_values\n parent = @dataset.parent\n\n @values.fetch(:file_values).each do |file_key, value_map|\n parent_file = parent.public_send(file_key)\n\n any_changes = value_map.any? do |c... | [
{
"docid": "c99d1b71eb644a32872c710815f91dda",
"score": "0.64212453",
"text": "def csv_data\n @csv_data ||= compute_csv_data\n end",
"title": ""
},
{
"docid": "5b32107c7ae12749781bd02ad3328280",
"score": "0.6271071",
"text": "def assign_csv_values_to_genericfile(row, generic_... |
93938948ba5dc9d185980f05ae00fc52 | =begin If payment was made and now we want to unpay we have to delete payment and remove money from user's balance. But if there is no payment made, just method was called, we shouldnt destroy any payments or remove from balance, just set status to unpaid and pay pay_date to nil. Unpaid note's status has to be 'unpaid'... | [
{
"docid": "03fcbc077baf96152725cd5822bab011",
"score": "0.81436384",
"text": "def unpay\n self.status = 'unpaid'\n self.pay_date = nil\n if self.payment_id\n Payment.destroy(self.payment_id)\n self.payment_id = nil\n remove_from_balance\n end\n self.save\n end",
"titl... | [
{
"docid": "2fd8f5900b447b8ab091272cc3c2619c",
"score": "0.7172053",
"text": "def remove_payment\n @payment = Payment.find(params[:id])\n @payment.update!(state: 2)\n end",
"title": ""
},
{
"docid": "fba444614861edc809ce302bccbed2dd",
"score": "0.6733738",
"text": "def pay_off... |
4a253a6703a256ff332d403fc4644a7f | If the full? or won? method returns true, return true, else return false | [
{
"docid": "420aac312cc691176591a76b3bdd76b7",
"score": "0.7655787",
"text": "def draw?\n !won? && full? ? true : false\n end",
"title": ""
}
] | [
{
"docid": "8753036bf42ec8575965a46348b84119",
"score": "0.86681944",
"text": "def over?\n if won? == true || full? == true\n true\n end\n end",
"title": ""
},
{
"docid": "6de487f7384e36f53b8a7c89bc64feec",
"score": "0.86395943",
"text": "def over?()\n if won?() || fu... |
e74f8f623d090b06c82c497621a5f2be | GET /auctions/1 GET /auctions/1.json | [
{
"docid": "a81945373733e4951b987de6ea99f9a1",
"score": "0.0",
"text": "def show\n end",
"title": ""
}
] | [
{
"docid": "3feeb60200b23bb71111faae95775c45",
"score": "0.7733439",
"text": "def show\n @auction = Auction.find(params[:id])\n @bids = @auction.bids.sort_by(&:bid_at).reverse\n \n respond_to do |format|\n format.html # show.html.erb\n format.json { render json: @auction }\... |
58c87af3f534f1b9bbcdf1c61f88ce15 | Rebuilds file bindings. will detach all current bindings, and reattach the monitored_paths | [
{
"docid": "ce458d26854ce1f0c82d6fa846f74198",
"score": "0.62286204",
"text": "def refresh(monitored_paths)\n @monitored_paths = monitored_paths\n attach\n end",
"title": ""
}
] | [
{
"docid": "1f01f651f81d606760e24d537dc1c964",
"score": "0.6354664",
"text": "def reload!\n changed_files = []\n\n @monitor_dirs.keys.each do |dir|\n check_monitor_dir(dir, changed_files)\n end\n\n removed_files = []\n delete_hooks = []\n\n @monitor_fil... |
a137e5cc82a0fb769b31a9f306a29a6d | Convenience method for finding something in a (potentially) deep hash | [
{
"docid": "c5665aa1206f6a397d795363f305bb04",
"score": "0.0",
"text": "def extract(hash, *args)\n begin\n tmp = hash\n args.each do |arg|\n tmp = tmp[arg]\n end\n tmp\n rescue\n nil\n end\n end",
"title": ""
}
] | [
{
"docid": "89aa2f40139f9287ac460b2487e52dd8",
"score": "0.74592304",
"text": "def deep_find(key)\n if key?(key)\n true\n else\n self.values.inject(nil) do |memo, v|\n memo ||= v.deep_find(key) if v.respond_to?(:deep_find)\n end\n end\n end",
"title": ""
},
{
... |
c35a96b0caf1c424b1dfa8e85132b83e | Streams ConferenceInstance records from the API as an Enumerable. This operation lazily loads records as efficiently as possible until the limit is reached. | [
{
"docid": "3e364444bedbfbb75eda00cecac87980",
"score": "0.55275184",
"text": "def stream(conference_sid: T.unsafe(nil), friendly_name: T.unsafe(nil), status: T.unsafe(nil), created_after: T.unsafe(nil), created_before: T.unsafe(nil), mixer_region: T.unsafe(nil), tags: T.unsafe(nil), subaccount: T.unsaf... | [
{
"docid": "cb260d68ee8cfca838c77ec8a0dc6dd6",
"score": "0.55442595",
"text": "def each\n limits = @version.read_limits\n \n page = self.page(\n page_size: limits['page_size'],\n )\n \n @version.stream(page,\n... |
d0df87b1bea9b55706b1c7c4184cdaba | PATCH/PUT /posts/1 PATCH/PUT /posts/1.json | [
{
"docid": "60b5cb8fb847dd93ceb34239797ad186",
"score": "0.0",
"text": "def update\n start_time = Time.now\n cpu_cores_number = check_cpu\n do_something(cpu_cores_number)\n end_time = Time.now\n respond_to do |format|\n if @post.update(body: end_time - start_time, title: \"cores were... | [
{
"docid": "2a642a611c63a85b6ef6e72d09830e50",
"score": "0.71867543",
"text": "def update\n render json: Post.update(params[\"id\"], params[\"post\"])\n end",
"title": ""
},
{
"docid": "e2c68cadce474543233abd080997b452",
"score": "0.7042899",
"text": "def update\n respond_... |
3c0cea336c723962096a695126867d0f | Provide a detailed, user friendly representation | [
{
"docid": "59e6db2d15088c6d17e8ff37bf578af5",
"score": "0.0",
"text": "def inspect\n values = @properties.map{|k, v| \"#{k}: #{v}\"}.join(\" \")\n \"<Twilio.Api.V2010.MessageInstance #{values}>\"\n end",
"title": ""
}
] | [
{
"docid": "7bea0b559c41a5f338754e1c5f53f1cb",
"score": "0.7074551",
"text": "def details \n\t\t\"#{self.id} - #{self.name.capitalize}\"\n\tend",
"title": ""
},
{
"docid": "6143c330d598497e31bfa9b9f780219e",
"score": "0.7009431",
"text": "def detail\n\t\t\t\to = ''\n\t\t\t\to += \" ... |
1fc2398f558ab8414f90e70bed8836e9 | method return Users subscriptions to other users but only those which are active | [
{
"docid": "9c8bdded327703a9c448d3c2feef5c64",
"score": "0.8356128",
"text": "def get_user_subscriptions\n self.subscriptions(User.name).joins(\" INNER JOIN users u on u.id=\\\n d360_core_subscribes.content_id\").where(\"u.status = true\")\n end",
"title": ""
}
] | [
{
"docid": "a73a228b6726e503b3da2f4b17f7a411",
"score": "0.77308947",
"text": "def active_subscriptions\n subscriptions\n .where('start_date < ?', Time.now)\n .where('end_date > ?', Time.now)\n end",
"title": ""
},
{
"docid": "9a511c0298948e7615fb7ba11999b66d",
"score": "... |
3ba7cbcb91e2999e3e26a7babf0e76b6 | DELETE /departments/1 DELETE /departments/1.json | [
{
"docid": "2002fa357140ea2a94e53fb12a08d1a0",
"score": "0.75574285",
"text": "def destroy\n @department = Department.find(params[:id])\n \n respond_to do |format| \n @department.destroy\n format.json { head :no_content } \n end\n end",
"title": ""
}
] | [
{
"docid": "cfea572d114948e2ea084b545c3be8cd",
"score": "0.812354",
"text": "def destroy\n request = RestClient.delete File.join(API_SERVER,\"rest-api/departments\",params['id'])\n redirect_to :action => :index\t\n end",
"title": ""
},
{
"docid": "8b903d6e8e76658fb030eec81694c127",
... |
6d14dff160643c3cbd3dc4f278db2bc9 | method_missing implement method_missing to search for domain/role fields :iaccert_number | [
{
"docid": "829391799e7f82b0f91eab39aa2c8559",
"score": "0.46896195",
"text": "def method_missing(method, *args) \n if domain.nil?\n super\n elsif (f = domain.fields.find(:first, :conditions => {:name => method.to_s}))\n if (args.length > 0)\n ... | [
{
"docid": "f19c5db32df03d79ee1356866e3ec064",
"score": "0.5637447",
"text": "def method_missing(method, *args)\n if method.to_s =~ /^eligible_(.+)\\?$/\n ldap_person && ldap_person.send(method)\n else\n super\n end\n end",
"title": ""
},
{
"docid": "09b34b5281ffb490bd8db... |
3bbab12252f0558cd0ec4112e6a7eabd | def next push_game_state(Beginning) end | [
{
"docid": "bf3d82198ed8947a6f549173f5ad5047",
"score": "0.0",
"text": "def pop\n puts \"pop\"\n# if $window.current_game_state.to_s == \"Introduction\" or $window.current_game_state.to_s == \"Level_1\" then\n# pop_game_state(:setup => true)\n# elsif $window.current_game_state.to_s != \"Op... | [
{
"docid": "f27d82a0e74f3231668cec5a3dc60044",
"score": "0.76106954",
"text": "def next_state(state, move)\n # Fill this in\n end",
"title": ""
},
{
"docid": "c9c1daa984e31595f971d6a118673b16",
"score": "0.7171448",
"text": "def next_state\n\t\t\t\t@state+= 1\n\t\t\tend",
"ti... |
2cc9719f9f42043139c0b0ddc0a59bd9 | Create a new course | [
{
"docid": "1863e37ab97fc05a0ee32c28d8d3bca5",
"score": "0.0",
"text": "def create_course(name, description, capacity, prices, opts = {})\n data, _status_code, _headers = create_course_with_http_info(name, description, capacity, prices, opts)\n return data\n end",
"title": ""
}
] | [
{
"docid": "73e92fec19fdd4304ba53aa8d8bbef02",
"score": "0.8309871",
"text": "def create\n @courses = Course.all\n @course = Course.create(course_params)\n end",
"title": ""
},
{
"docid": "f8813bc929d8cf241789702790238b53",
"score": "0.82070625",
"text": "def create\n @cour... |
531f33fa526c8e369e7d01995be98bbb | GET /stories/1 GET /stories/1.xml | [
{
"docid": "2fad4acdcf304a10596ae531e8ad2c58",
"score": "0.0",
"text": "def show\n @story = Story.find(params[:id])\n #vote = Vote.new\n #vote.story = @story\n #vote.sentiment = 0\n #vote.save\n \n render :layout => \"frame\" \n #respond_to do |format|\n # format.html # show... | [
{
"docid": "092b32fe7594ec690d3f9d37342b58aa",
"score": "0.75825745",
"text": "def show\n @story = Story.find(params[:id])\n\n respond_to do |format|\n format.xml { render :xml => @story }\n end\n end",
"title": ""
},
{
"docid": "7e1591c8e3e4a879fb9cda4f0fc72229",
"score"... |
70222dfa77abe1f4f2b8b99d76a9209f | 6. Combien y atil de underscore _ dans tous les pseudos confondus ? | [
{
"docid": "d60707c79b21be3ee90ef77f19cdf4e9",
"score": "0.0",
"text": "def underscore_handle(list)\n search = 0\n list.each do |email|\n email.split(\"\").each do |underscore|\n if underscore == \"_\"\n search += 1\n end\n end\n end\n return search\nend",
"title": ""
}
] | [
{
"docid": "1bc2022946fffd6b33e562b55f8a1396",
"score": "0.69655687",
"text": "def underscore!\n gsub!('::', '_')\n gsub!(/([A-Z\\d]+)([A-Z][a-z])/, '\\1_\\2')\n gsub!(/([a-z\\d])([A-Z])/, '\\1_\\2')\n downcase!\n end",
"title": ""
},
{
"docid": "8db5523a79f45c144fcc4d652dbebaaf... |
cfeba3d90b5a194e5c46ce320047600b | PATCH/PUT /heros/1 PATCH/PUT /heros/1.json | [
{
"docid": "64b3168458e8ac8f7b13907510c46925",
"score": "0.0",
"text": "def update\n respond_to do |format|\n if @hero.update(hero_params)\n format.html { redirect_to @hero, notice: 'Hero was successfully updated.' }\n format.json { render :show, status: :ok, location: @hero }\n ... | [
{
"docid": "d5eaea298e64625a71a15a970f3b75ed",
"score": "0.64338756",
"text": "def patch *args\n make_request :patch, *args\n end",
"title": ""
},
{
"docid": "af9aedd4f428a2c26c3fd57798526020",
"score": "0.63314146",
"text": "def put(path, data = {}, header = {})\n _send(jso... |
28e0576f4c56039de28217131af7302d | POST /citations POST /citations.json | [
{
"docid": "43eb27d0484d1f0d7d5497d68f47f3d6",
"score": "0.62645745",
"text": "def create\n @citation = Citation.new(citation_params)\n\n respond_to do |format|\n if @citation.save\n format.html { redirect_to @citation.citation_object.metamorphosize, notice: 'Citation was successfully ... | [
{
"docid": "eb696f9044f9610f32d815f227764680",
"score": "0.67310935",
"text": "def index\n @citations = Citation.all\n\n render json: @citations\n end",
"title": ""
},
{
"docid": "a8639ccf04bf10f714000825097368cb",
"score": "0.66826344",
"text": "def create\n @civil_citatio... |
b0fb90287257d0eb116e5d0dcd9aba48 | POST /carts POST /carts.json | [
{
"docid": "921ef6ca26d4333c2fd283f818d7d000",
"score": "0.7198283",
"text": "def create\n @cart = Cart.new(params[:cart])\n\n respond_to do |format|\n if @cart.save\n format.html { redirect_to @cart, notice: 'Cart was successfully created.' }\n format.json { render json: @cart,... | [
{
"docid": "2ed05351f8959b1c59c31fd25ed18632",
"score": "0.76922077",
"text": "def create\n response, status = BeyondApi::Request.post(@session,\n \"/carts\")\n\n handle_response(response, status)\n end",
"title": ""
},
{
"docid": ... |
ae741bcbcb49e81c47cd25869da27df8 | [POST] make_comment See: Add comment to a movie. | [
{
"docid": "0bb2e9e99612c23bd4e74644e4be95c9",
"score": "0.7025843",
"text": "def make_comment(params)\n data = self.class.post(\"/make_comment\", { body: post_params(params) })\n Yify::Response.new(data, :api_response)\n end",
"title": ""
}
] | [
{
"docid": "e13bd499588d5046de65a9595e85e8db",
"score": "0.7318536",
"text": "def create\n\n @movie = Movie.find(params[:movie_id ])\n @comment = @movie.comments.new(comment_params)\n\n respond_to do |format|\n if @comment.save\n format.html { redirect_to movies_path(@movie), notice... |
873fc5c831a868f5dfffeacbaf3bcfde | Display notification if preferences are successful updated | [
{
"docid": "66e3223115948d61c833a79d97644608",
"score": "0.8250176",
"text": "def preference_updated\n notify :notice, t('preferences.updated')\n redirect_to :action => 'index'\n end",
"title": ""
}
] | [
{
"docid": "83f90122f1d63b6d7b63ee0a71a1b004",
"score": "0.74407613",
"text": "def update_preferences()\n p 'updating preferences'\n p $width_prefs = $defaults.stringForKey('Width_Prefs').to_i\n p $height_prefs = $defaults.stringForKey('Height_Prefs').to_i\n p $window_x = $defaults.strin... |
0518d4dea72a491df1a72b0afb8354bb | Return all the mobs which is not yet dead. | [
{
"docid": "658d7b964ba93807dab30e16cf3a1283",
"score": "0.79130137",
"text": "def living_mobs\n living_mobs = Array.new\n mobs.each do |mob|\n living_mobs << mob unless mob.dead?\n end\n return living_mobs\n end",
"title": ""
}
] | [
{
"docid": "403ebf421858a3792557383d52312d87",
"score": "0.6738307",
"text": "def dead_members\r\n members.select {|member| member.dead? }\r\n end",
"title": ""
},
{
"docid": "15a89afd2593d04af3c7394f1ae473c0",
"score": "0.6607658",
"text": "def mobs\n\t\t@@mobs\n\tend",
"tit... |
bd378c38fa551e975ef003457fa99b1b | The method apply request for SPARQLQueriesall_predicates_by_object query. | [
{
"docid": "c07c3421b1c87f52a79036ef96979565",
"score": "0.710844",
"text": "def get_all_predicates_by_subject_object(subject, object)\n process_query(all_predicates_by_object_and_subject(subject, object))\n end",
"title": ""
}
] | [
{
"docid": "31b29aaa6646795b86fa51ecfe32c5dc",
"score": "0.8036893",
"text": "def get_all_predicates_by_object(object)\n process_query(all_predicates_by_object(object))\n end",
"title": ""
},
{
"docid": "aaa4efc6e6c2282421d868748f91d12c",
"score": "0.5850356",
"text": "def pr... |
7f70286042c1d443d8ff101334514ca3 | Public: Retrieves value stored in Redis key as Integer. Returns Integer value stored in Redis key, nil if it does not exist. | [
{
"docid": "7350b02c54cecbde49b48a3c8af761a0",
"score": "0.5735909",
"text": "def to_i\n get && get.to_i\n end",
"title": ""
}
] | [
{
"docid": "6eb18283b12fb866f0713dada5ff6a74",
"score": "0.8638861",
"text": "def get\n redis.get(key).to_i\n end",
"title": ""
},
{
"docid": "1876c883b6e321fb86c5d94bbdb42f93",
"score": "0.80299985",
"text": "def get(key)\n Study.redis.get(key).to_i || 0\n en... |
0f4e1e7cfa38934df2d8f2cf485fe24a | GET /cards/1 GET /cards/1.xml | [
{
"docid": "e5f491a6c73857e28fce141312fdc27d",
"score": "0.72885764",
"text": "def show\n @card = @stage.cards.find(params[:id])\n\n respond_to do |format|\n format.html # show.html.erb\n format.xml { render :xml => @card }\n end\n end",
"title": ""
}
] | [
{
"docid": "75cbcf56e70b6f05f18bf63abd4293fd",
"score": "0.8204944",
"text": "def index\n self.class.get(\"/cards/index.xml\");\n end",
"title": ""
},
{
"docid": "d41f0f8c5dcf6266be1de08a320256da",
"score": "0.7907035",
"text": "def get_cards\r\n self.class.get(\"/cards.xml\")... |
d935cb1dc136070479d149594b41e997 | method description Defines a permitted option for the task. | [
{
"docid": "6d31023f8a3dccc826102111e8ababc9",
"score": "0.0",
"text": "def option option_name, option_params\n options[option_name] = option_params\n\n define_helpers option_name, option_params\n end",
"title": ""
}
] | [
{
"docid": "eb529385f4fd29bd2abcd2b51fa174b6",
"score": "0.66968834",
"text": "def task_option_params\n params.require(:task_option).permit(:option)\n end",
"title": ""
},
{
"docid": "ef2903f8ccc75f0f2d352091e354c45f",
"score": "0.63396746",
"text": "def allowed_options\nend"... |
adba5d6fdf029006bb37ab444dcdf022 | validate :acceptable_status def acceptable_status status == 'accepted' || status == 'declined' || status == nil end | [
{
"docid": "393dca9c0d50168b073b3981b44c85e4",
"score": "0.0",
"text": "def comments\n comment_threads\n end",
"title": ""
}
] | [
{
"docid": "06b1c59deedd95c088a1dcb9d58c2a78",
"score": "0.7519574",
"text": "def accepted?\n status == 'accepted'\n end",
"title": ""
},
{
"docid": "9a55ba6226a1aae0c37ce1e94b5b218f",
"score": "0.7356121",
"text": "def accepted?\n true if self.status == \"accepted\"\n end",
... |
3ee07ef1b9d0f311e180c495143320fd | returns a list of ratios | [
{
"docid": "30c8783be5da47b31797b2c361bfe130",
"score": "0.6204089",
"text": "def parse_screen_res( screen_res_array )\n ratios = []\n\n # parse strings input like this #1024 768\n #1152 720\n #1280 800\n #144... | [
{
"docid": "87885c5168e8e52b173f45866d198917",
"score": "0.66004336",
"text": "def ratio\n @ratio ||= (\n rcounts = counts.dup\n rcounts['Total'] = total\n r = Array.new(rcounts.size+1){ [] }\n x = 1\n rcounts.each do |type1, count1|\n r[x][0] = type1\n ... |
f409c296a6fcce5ace0fbb1f319d8050 | Update Account Update an account. | [
{
"docid": "46b586f817d1f66137bf859c6885ccb4",
"score": "0.0",
"text": "def update_account_0_with_http_info(id, opts = {})\n if @api_client.config.debugging\n @api_client.config.logger.debug \"Calling API: AccountsApi.update_account_0 ...\"\n end\n # verify the required parameter '... | [
{
"docid": "72aa0e79cc7c5b7c9d63ebbbff0de21b",
"score": "0.8447857",
"text": "def update\n # find and update the account\n end",
"title": ""
},
{
"docid": "abebda05656f8a011e08aa5667356423",
"score": "0.8378599",
"text": "def update_account(account)\n result = FinerWorks... |
3a73bab6efd6657c353929051d3dd0b4 | UTILS: can be moved to the independent UTILS module as possibly reusable code Test case: 4. Focus onto "Find freelancers" | [
{
"docid": "b0c914fe773b2fb8443083061683312a",
"score": "0.5324704",
"text": "def testCase_4\n puts \"\\nTest case: 4. Focus onto 'Find freelancers'\"\n #!NOTE: elements' detection should be more flexible! (..[2].click -- array-index stub value.)\n @driver.find_elements(:class, 'dropdown-toggle')[2]... | [
{
"docid": "c3a42f90f58e2e129a1256dd5596506b",
"score": "0.6226932",
"text": "def testCase_9\n puts \"\\nTest case: 9. Get into that freelancer's profile\"\n fc_name = @FcSearchResult[getRandomIndex].getFcName\n puts \"Browser title: '#{@driver.title}'\" #DEBUG\n puts \" - CONTAINS ? -\\nFreelance... |
cfe538f4191ade50dddce5d14da6d7ac | FIXME not working now | [
{
"docid": "ead922f4a7c327c09f7cb2120b0ec49e",
"score": "0.0",
"text": "def raw(project, sha_or_branch, options = {})\n get(\"/projects/#{project}/repository/commits/#{sha_or_branch}/blob\", options)\n end",
"title": ""
}
] | [
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.6377429",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",
"score": "0.6377429",
"text": "def bodystmt; end",
"title": ""
},
{
"docid": "9dcc74dd11eb115d21bf9af45b3ec4e3",... |
dd659157757fb5ab1ec24b71c9211018 | PUT /drags/1 PUT /drags/1.xml | [
{
"docid": "d9f0ef762c0f7f43c52f2dcec8d2a760",
"score": "0.5632497",
"text": "def update\n @drag = Drag.find(params[:id])\n\n respond_to do |format|\n if @drag.update_attributes(params[:drag])\n format.html { redirect_to(@drag, :notice => 'Drag was successfully updated.') }\n fo... | [
{
"docid": "23b5f5e4dacfb330cb1e0ffd4590ef63",
"score": "0.6448055",
"text": "def update opts = {}\n opts[:headers] ||= {}\n opts[:headers]['Content-Type'] ||= 'text/xml'\n post opts.fetch(:path, update_path), opts\n end",
"title": ""
},
{
"docid": "ad54471b285e5e357d9be959c8ade2d8... |
a85309ee78c9b1c49aa896c60ed05972 | def swap(string) words = string.split(' ') words.each do |word| word[0], word[1] = word[1], word[0] end words.join(' ') end def swap_first_last_characters(word) word[0], word[1] = word[1], word[0] word end def swap(words) result = words.split.map do |word| swap_first_last_characters(word) end result.join(' ') end p swa... | [
{
"docid": "2bd72a8af04466e96a574c86f3b62ff2",
"score": "0.0",
"text": "def cleanup(string)\n string.gsub!(/[^a-zA-Z]+/, ' ')\nend",
"title": ""
}
] | [
{
"docid": "f364128f6f1c1b497d5617eef8b1a30e",
"score": "0.8364048",
"text": "def swap(str)\n words = str.split\n words.each do |word|\n last_letter = word[-1]\n first_letter = word[0]\n word[0] = last_letter\n word[-1] = first_letter\n end\n\n words.join(' ')\nend",
"title": ""
},... |
b0be71fea14b1e282b57772c33cb2ca9 | Get the value of a hash field. O(1). | [
{
"docid": "a2cf1778e27d892d38edc22cfa06a742",
"score": "0.62922627",
"text": "def hget(key, field)\n\t\t\t\t\tcall('HGET', key, field)\n\t\t\t\tend",
"title": ""
}
] | [
{
"docid": "05b9030a4e7efedb195ac082a163f56c",
"score": "0.75988144",
"text": "def hget(hash, field)\n redis.hget(hash, field)\n end",
"title": ""
},
{
"docid": "282ebda532f4fa8b0251317ebfef20d4",
"score": "0.7586726",
"text": "def get_value(key, field)\n @redis.hget key... |
47cacb7e1e7addda64d1070d9bdb6b43 | Get a custom fault object | [
{
"docid": "e0b4530fff8f5466de719ac06f9ad541",
"score": "0.7251395",
"text": "def getFaultObject(am3)\n\t puts am3\n\t return FaultObject.new(3, \"This is an error object\")\n\tend",
"title": ""
}
] | [
{
"docid": "248062f38d1865a605bbd5125942fd88",
"score": "0.6588321",
"text": "def initialize(e)\n @fault = e\n e.to_hash.tap do |fault|\n fault_code = fault[:fault][:faultcode]\n fault_string = parse_fault(fault[:fault][:faultstring])\n super(compose_message('soa... |
6b9efc9978f3bb9a9093945e805e0803 | update a current user form | [
{
"docid": "13d9d82b05c59c1d7d22387e67a6f80a",
"score": "0.0",
"text": "def edit\n end",
"title": ""
}
] | [
{
"docid": "310a05185f1f0b1b3519673336e9d9a6",
"score": "0.8274227",
"text": "def update_form\n @user = User.find_by_id(session[:user_id])\n end",
"title": ""
},
{
"docid": "80305607ef79f4abc8feee488b5927ec",
"score": "0.77889955",
"text": "def update_user\n end",
"title":... |
64533b96c2b53ad72f2146035eecfd1b | PUT /tasks/1 PUT /tasks/1.xml | [
{
"docid": "6118d31da14c051a72b7a27558b01980",
"score": "0.6654039",
"text": "def update\n @task = Task.find(params[:id])\n\n respond_to do |format|\n if @task.update_attributes(params[:task])\n flash[:notice] = 'Task was successfully updated.'\n format.html { redirect_to(@task)... | [
{
"docid": "23b8fd20c4f863cc9fd1d0f2eeefb2e5",
"score": "0.76518345",
"text": "def update_task\n @user = User.find_by_username(session['user'])\n @access_token = OAuth::AccessToken.new(UsersController.consumer, @user.token, @user.secret)\n @response = UsersController.consumer.request(:put, \"/a... |
9724c1955b11ddd4fc0c42e2915e074a | Returns true if constant name already exists. | [
{
"docid": "189c686bedeb5b4b4d8d6befb2be4f15",
"score": "0.7146468",
"text": "def already_exists?(name, project_name = nil)\n project_name = project_name ? (Object.const_get(project_name) rescue nil) : nil\n Object.const_defined?(name) || (project_name && project_name.const_defined?(name))... | [
{
"docid": "bbf3221dba68b83a24f0d620834f2381",
"score": "0.7748661",
"text": "def constant_defined?(name); end",
"title": ""
},
{
"docid": "08ec37c627e4e1779547fc00529c09b5",
"score": "0.7516787",
"text": "def constant?(name)\n name == name.upcase\n end",
"title": ""
},... |
efa5ff6c28e1f624500237f29644fcdb | Retrieve the channel user object for the named user, or return nil if none exists. | [
{
"docid": "8ed01b860792d3db5847efc4e9dbfa79",
"score": "0.6274584",
"text": "def get_user nick\n @users.fetch nick, nil\n end",
"title": ""
}
] | [
{
"docid": "81d5ac490cba86f7e07c849bd3f53240",
"score": "0.69796646",
"text": "def user\n User.get(@channel.name)\n end",
"title": ""
},
{
"docid": "780f15c156ec40dba3b048b8765b6d08",
"score": "0.6958422",
"text": "def get_user_by_username(name)\n resp = request('getUser... |
e4aab27df87e5e26c686486e7760acd9 | Get the start ratings of all players. | [
{
"docid": "15e007fbbadbfbe965395a05e5e9f4ed",
"score": "0.5627488",
"text": "def get_old_ratings\n icu_ids = players.select{ |p| p.category == \"icu_player\" }.map(&:icu_id)\n latest = Player.get_last_ratings(icu_ids, rorder)\n legacy = OldRating.get_ratings(icu_ids)\n players.each { |p| p.... | [
{
"docid": "fc21da52af10c1600bc8bd61ac4ba2df",
"score": "0.6853623",
"text": "def ratings\n ChgkRating::Collections::PlayerRatings.new player: self\n end",
"title": ""
},
{
"docid": "d6d424a788d63a055eec7c4f227f3ec2",
"score": "0.63603044",
"text": "def players\n ret... |
ff19209dc13c238139bf80161d053517 | EXPRESSION Attribute assignment: receiver.attr=(value) Same as a method call! | [
{
"docid": "ca56a29784bcff60ad8b282c995de03b",
"score": "0.6449489",
"text": "def process_attrasgn(exp)\n process_call(exp)\n end",
"title": ""
}
] | [
{
"docid": "45d3b6704ec73d5086f5f6faf7bb0702",
"score": "0.70454115",
"text": "def attribute=(_arg0); end",
"title": ""
},
{
"docid": "45d3b6704ec73d5086f5f6faf7bb0702",
"score": "0.70454115",
"text": "def attribute=(_arg0); end",
"title": ""
},
{
"docid": "980948db36dacd... |
62330f8f586c76763e86782a00d86ba6 | schedules a block to run in the given number of seconds; returns the created event object | [
{
"docid": "c52f0b80d7350b1a5e05b3bf907f8858",
"score": "0.73264116",
"text": "def run_in(secs, &block)\n schedule RunEvent.new(fsecs + secs, block)\n end",
"title": ""
}
] | [
{
"docid": "12697db654f9f3619116f132f358b3ef",
"score": "0.7063575",
"text": "def using_wait_time(seconds, &block); end",
"title": ""
},
{
"docid": "12697db654f9f3619116f132f358b3ef",
"score": "0.7063575",
"text": "def using_wait_time(seconds, &block); end",
"title": ""
},
{
... |
2c536cc5f4f8cdf7004a5b90c0ee448d | For use with defining dependencies with the +gem+ method. This allows for compatibility with Bundler Gemfile. | [
{
"docid": "e5edbc61433115efc09abc26a15ac691",
"score": "0.0",
"text": "def group(*names) #:yield:\n @_group.concat names\n yield\n ensure\n names.each{@_group.pop}\n end",
"title": ""
}
] | [
{
"docid": "b519022863ad9b23f8208de4d17ccdfb",
"score": "0.73826575",
"text": "def util_gem(name, *args) args.last.is_a?(Hash) && args.last.merge!(:require => false); gem(name, *args) end",
"title": ""
},
{
"docid": "311dbb9e621984f01e3c9600ccb0f99b",
"score": "0.73565",
"text": "de... |
a417a846e343853f00f13b7b5f751836 | Opens an existing file for reading | [
{
"docid": "f96ba840e366deb7e0075db38cd33fba",
"score": "0.0",
"text": "def open(path, encoding: self.encoding, tempdir: nil, **_opts, &block)\n full = full_path(path)\n temp = Tempfile.new(File.basename(path), tempdir, encoding: encoding)\n temp.close\n\n @client.download!(f... | [
{
"docid": "bbaff168660c110373909fb6262158b8",
"score": "0.76094615",
"text": "def open_file(filename)\n File.open(filename, 'r')\n end",
"title": ""
},
{
"docid": "09aa5c2679062fc52fd3b7b75c9e138c",
"score": "0.75541997",
"text": "def _open(filename)\n File.open(filenam... |
4925170345f7251404bb8ffa2bf494c5 | pulls data from a within a project's site | [
{
"docid": "bc4cf56cf13f8038cb222db662e8f74a",
"score": "0.0",
"text": "def get_project_site_sensor_data_last_update \n @site = \"\"\n @data_values = Hash.new\n @values = Array.new\n parent.managed_repository do\n @site= Voeis::Site.get(params[:site_id].to_i)\n if @site.nil?\n ... | [
{
"docid": "583600753ba7154776ae7d82fb13f2cd",
"score": "0.6680986",
"text": "def pull_projects_harvest\n harvest_uri = URI(\"https://api.harvestapp.com/v2/projects\")\n Net::HTTP.start(harvest_uri.host, harvest_uri.port, use_ssl: true) do |http|\n harvest_request = Net::HTTP::Get.new harvest... |
ed97f64cd444a47e31ec32e6299a67bd | Type (xsd:boolean) For icon sets, determines whether this threshold value uses the greater than or equal to operator. 0 indicates 'greater than' is used instead of 'greater than or equal to'. The default value is true | [
{
"docid": "008264668c3446042a5e6b86b9796759",
"score": "0.0",
"text": "def gte; end",
"title": ""
}
] | [
{
"docid": "696ee7e7866c5a249c55e472d6e2f48a",
"score": "0.639503",
"text": "def is_greater_than(value)\n ObjectFilterOperation.new('>', value)\n end",
"title": ""
},
{
"docid": "6f357bd2565bb7dfc3a814d57d0da921",
"score": "0.6044036",
"text": "def greater_than value\n ... |
ad7f116212aa707a8c6b5e209dafb94c | Deliver message(s) to the queue | [
{
"docid": "2ab84e60dce3befc5dd3594f4b218716",
"score": "0.6047884",
"text": "def deliver(msg_or_msgs, options = {})\n result = perform_delivery(msg_or_msgs, options)\n result.is_a?(Array) ? result : [result]\n end",
"title": ""
}
] | [
{
"docid": "589953d3bb587263e023fe841486a2a5",
"score": "0.7589572",
"text": "def deliver( message )\n @queue.push( message )\n end",
"title": ""
},
{
"docid": "9511944a6becd95f76cb60bd0b23c95b",
"score": "0.742021",
"text": "def deliver(message)\n @queue.pus... |
c4078111cda30342722b8c70f47a19eb | , except: :edit_locations layout "locations", except: [:index, :show_make_request, :make_appointment, :view_doctor, :life_threatening, :warning] | [
{
"docid": "6df7ec6a79bfcc56de1429bb14e83f01",
"score": "0.0",
"text": "def index\n #Set default location\n london_latlng = [51.507351, -0.127758]\n if patient_signed_in?\n if current_patient.get_min_eta.present? && current_patient.get_min_eta.third.present? && current_patient.get_min_eta.... | [
{
"docid": "21f55ba35326cf34a348f198453c4904",
"score": "0.65091443",
"text": "def deny_layout(*actions)\n actions.each do |action|\n layout[:deny] << action.to_s\n end\n end",
"title": ""
},
{
"docid": "4dde483e0d0bfa4e22613733acd4c3d0",
"score": "0.61994207"... |
387dfd10c430414fc2458a15093fb1b7 | Get informations about the currect account used to connect to swift Returns: xaccountbytesused xaccountobjectcount xaccountcontainercount | [
{
"docid": "b7f6720e22a99208990e3369c9fb7841",
"score": "0.0",
"text": "def account(url, token)\n query = {:format => \"json\"}\n HTTParty.head(url, :headers => {\"X-Auth-Token\"=> token}, :query => query).headers\n end",
"title": ""
}
] | [
{
"docid": "37566ea7dee52f6e7ca2a235399cfc1a",
"score": "0.7833332",
"text": "def account_info\n headers = Api.account(@url, @token)\n {\n \"bytes_used\" => headers[\"x-account-bytes-used\"],\n \"object_count\" => headers[\"x-account-object-count\"],\n \"containe... |
6750eb564e1a7d020bce1a611ad64150 | Method to update existing entry requirements for a course +entry_requirement: One of the entry_requirements for the course +old_course_id: The ID of the course being updated Return: add/update database records for entry requirements | [
{
"docid": "f74df331afbb3b142b29913ce87b7d8c",
"score": "0.8116008",
"text": "def update_entry_reqs(entry_requirement, old_course_id)\n # Find incoming qualification based on entry_req\n # If none exists, then create it and add it to the array\n qual = @incoming_quals.find{ |hash| hash[:name] =... | [
{
"docid": "817bb4d8849a09bf1114e77e9791bcf4",
"score": "0.69603515",
"text": "def update_course(course, old_course)\n course_inst = @institutions.find { |hash| hash[:name] == course[:provider] }\n # Call the update record method\n update_record(course, old_course, course_inst)\n\n # For eac... |
1a6fbd8eb97753d7cf17667e64a2f424 | sets the contents of a range | [
{
"docid": "118fa1dfc82d040b9a706b7ea981eb0b",
"score": "0.0",
"text": "def set_namevalue_global(name, value, opts = { }) \n name_obj = begin\n get_name_object(name)\n rescue NameNotFound => msg\n raise\n end \n ole_range = name_obj.RefersToRange\n ole_range... | [
{
"docid": "3dd5dee3b0705875345c5763aa4e4089",
"score": "0.8455579",
"text": "def setRange(range);@range = (range);end",
"title": ""
},
{
"docid": "192ea875e33790d3b739b7a351c22bee",
"score": "0.8058407",
"text": "def set_range r\n self.range = r\n end",
"title": ""
},
{
... |
b12e741d56c1fc39a8d385243451866c | la durata totale dello status che viene inflitto dalla skill | [
{
"docid": "2c1a4253be1f208f2e64ecc83db6e582",
"score": "0.0",
"text": "def state_duration\n return 0 if @plus_state_set.empty?\n state = $data_states[@plus_state_set.first]\n state.hold_turn + @state_inf_dur\n end",
"title": ""
}
] | [
{
"docid": "179cde9e38885bc41912d31dc7813c83",
"score": "0.65821886",
"text": "def skill_time_vs_completed_tasks\n\n end",
"title": ""
},
{
"docid": "d5e9dbd83066e9a35e500d048a7428e2",
"score": "0.6537889",
"text": "def state_duration(user, skill, state)\n modificator = 0\n mo... |
9fd77bdf40f31e03c23133a2db90f1d6 | Internal: The next time this thread should next wake up for an element If there are elements in the work set, this will correspond to time of the soonest. Returns a Time object, or nil if there are no elements stored. | [
{
"docid": "5381bb5ae38fbcd2b969b9c4ec99e378",
"score": "0.5888974",
"text": "def next_run_at\n e = earliest_element\n e && e.run_at\n end",
"title": ""
}
] | [
{
"docid": "6ec41d3be47be6be8b297fafcff9df8b",
"score": "0.68788946",
"text": "def min_time_next\n tn = DEVS::INFINITY\n if (obj = @scheduler.peek)\n tn = obj.time_next\n end\n tn\n end",
"title": ""
},
{
"docid": "685cfb2d767cd6d9a97192ae39ebea47",
"score":... |
0f830c23f2aed58457cf9a5abb5c9249 | (NonKeyword) Parses the "location" string provided as argument for locating HTML elements. WatirWebDriver expects a hash of parameters by which to search for HTML elements. This function take arguments from Robot Framework tests in the form of attribute=value and constructs a hash which WatirWebDriver can use to unique... | [
{
"docid": "ab0de71945f021477a22aba83ff3b4aa",
"score": "0.59022695",
"text": "def parse_location(loc)\n loc = self.trim_sides(loc)\n \n if loc[0..3].downcase == 'css='\n return {:css => loc[4..loc.length]}\n elsif loc[0..5].downcase == 'xpath='\n return {:xpath => loc[... | [
{
"docid": "69d5011b03205efece4e4354799c285e",
"score": "0.56385213",
"text": "def convert_locator(how, what)\n # case how\n # when 'class name'\n # how = 'css selector'\n # what = \".#{escape_css(what)}\"\n # when 'id'\n # how = 'css selector'... |
cf85d43f14edc2989df9104666cf28f0 | GET /ratings/new GET /ratings/new.json | [
{
"docid": "9326475bc9c9511c4cc68b6d8a59a484",
"score": "0.7020253",
"text": "def new\n @story = Story.find(params[:story_id])\n @rating = @story.ratings.build\n\n respond_to do |format|\n format.json { render json: @rating }\n end\n end",
"title": ""
}
] | [
{
"docid": "3782c0d68c6a6bd75cc3dcf9f622da65",
"score": "0.7917441",
"text": "def new\n @rating = Rating.new\n\n respond_to do |format|\n format.html # new.html.erb\n format.json { render json: @rating }\n end\n end",
"title": ""
},
{
"docid": "3782c0d68c6a6bd75cc3dcf9f62... |
ad2c29c0e0754f5260ec8ea32e4975af | Site Scan Template Updates the assigned scan template to the site. | [
{
"docid": "0a00dc405f538b9148e477c22e1942d8",
"score": "0.65026647",
"text": "def set_site_scan_template(id, opts = {})\n data, _status_code, _headers = set_site_scan_template_with_http_info(id, opts)\n data\n end",
"title": ""
}
] | [
{
"docid": "503252b332f4df58e19719aafb7846c2",
"score": "0.6450573",
"text": "def set_site_scan_template(id, opts = {})\n data, _status_code, _headers = set_site_scan_template_with_http_info(id, opts)\n return data\n end",
"title": ""
},
{
"docid": "778fe408d9f15d9ca44e093963bf6... |
c69e2f5e032d812093f1567c86d34cc9 | Update property info, call Zillow service to update Property Tax after saving property successfully | [
{
"docid": "793fc13aa5b6aaafc659d7672a900601",
"score": "0.61596876",
"text": "def create\n property_form = PropertyForm.new(\n loan: @loan,\n subject_property: @loan.subject_property,\n address: address,\n params: params\n )\n\n if property_form.save\n @loan.reload\n ... | [
{
"docid": "6c327d0ac10f089b377bb80e341139ab",
"score": "0.67905754",
"text": "def update\n @address = Address.where([\"address_id = ? and user_email = ?\", @property.address_id, current_user.email]).first\n @citystate = @address.city << \", \" << @address.state\n @data = Rubillow::PropertyDeta... |
f74c29bdfc4a183e1ec1b91334cd5be2 | Use callbacks to share common setup or constraints between actions. | [
{
"docid": "4bd1adc731ac97258a46d741e2808001",
"score": "0.0",
"text": "def set_subtopic\n @subtopic = Subtopic.find(params[:id])\n end",
"title": ""
}
] | [
{
"docid": "bd89022716e537628dd314fd23858181",
"score": "0.6163163",
"text": "def set_required_actions\n # TODO: check what fields change to asign required fields\n end",
"title": ""
},
{
"docid": "3db61e749c16d53a52f73ba0492108e9",
"score": "0.6045976",
"text": "def action_hook;... |
7df0b0299636b4e1962a1eaa80567a57 | Confirms the correct applicant. | [
{
"docid": "6b2709a5256d81b6ed0e3994be7802b8",
"score": "0.59262544",
"text": "def correct_applicant\n @applicant = Applicant.find(params[:id])\n redirect_to(root_url) unless current_applicant?(@applicant)\n end",
"title": ""
}
] | [
{
"docid": "24fa6d5f01d97b58a450b0d8ab179ef1",
"score": "0.5921752",
"text": "def is_correct_application\n if !(session[:applicants_id].to_i == @application.applicants_id) && !(session[:user_role] == \"admin\")\n redirect_back fallback_location: show_dash_path, notice: \"Error: Not aut... |
695afded6be5c23f6a12cc657abf8a6a | DELETE /page_identifiers/1 DELETE /page_identifiers/1.json | [
{
"docid": "64243b1be71eff4f1a9a2999483b3599",
"score": "0.7554738",
"text": "def destroy\n @page_identifier.destroy\n respond_to do |format|\n format.html { redirect_to page_identifiers_url, notice: 'Page identifier was successfully destroyed.' }\n format.json { head :no_content }\n ... | [
{
"docid": "a3403368baa2b668f761ac8ecdbab295",
"score": "0.7244203",
"text": "def delete_page\n pg = page_number\n pdf_store = state.store\n pdf_objs = pdf_store.instance_variable_get :@objects\n pdf_ids = pdf_store.instance_variable_get :@identifiers\n page_id = pdf_store.object_id_for_p... |
69beaa3e957d1fc356539d0314d703e1 | Custom attribute writer method checking allowed values (enum). | [
{
"docid": "6ebe21eb76dd527b00f81fcf004ecbab",
"score": "0.0",
"text": "def security_plan_approval_status=(security_plan_approval_status)\n validator = EnumAttributeValidator.new('Object', ['Approved', 'Not Yet Approved', 'Denied'])\n unless validator.valid?(security_plan_approval_status)\n ... | [
{
"docid": "8146b840a980695b919bbb80892fcc0c",
"score": "0.6161179",
"text": "def valid?\n type_validator = EnumAttributeValidator.new('String', [\"GPA_CREDIT_PENDING\", \"GPA_CREDIT_PENDING_REVERSAL\", \"GPA_CREDIT_REVERSAL\", \"GPA_CREDIT\", \"GPA_DEBIT\", \"GPA_DEBIT_PENDING_REVERSAL\", \"GPA_DE... |
c541ac69658dce7cb64df7df059964b9 | Whether the payload is a valid URL or pseudoURL | [
{
"docid": "5fd02f0118f7d1e528fd4d0286ed1acd",
"score": "0.81753963",
"text": "def valid_url?\n valid_string? && @body.to_s.include?(PROTOCOL_SPLITTER)\n end",
"title": ""
}
] | [
{
"docid": "6b7769945fc670734e33283c24275bdf",
"score": "0.7760358",
"text": "def valid_http_url?\n self.scan(/:\\/\\//).size == 1 && self.to_uri.is_a?(URI::HTTP)\n end",
"title": ""
},
{
"docid": "6b7769945fc670734e33283c24275bdf",
"score": "0.7760358",
"text": "def valid_http_u... |
ac09ccab58db43e237c877b9b5a638ce | Restituisce i passi compiuti dall'eroe | [
{
"docid": "281076e5ea00a94359fa7b69bb3ab82c",
"score": "0.0",
"text": "def steps\n @steps ||= 0\n end",
"title": ""
}
] | [
{
"docid": "19928904518385f2623a450e95caa1ab",
"score": "0.58790606",
"text": "def preflight=(_arg0); end",
"title": ""
},
{
"docid": "fa621899047276a0a69f83153c947af1",
"score": "0.5847379",
"text": "def compilereturn\n\n end",
"title": ""
},
{
"docid": "63f8d967f0ddafa... |
81c2b6c5f77fc45618507c6d0c2100a8 | returns memory used and total memory used (w/cache) | [
{
"docid": "12e221eb76ef664d72b5a4d582ae9bb2",
"score": "0.75445193",
"text": "def get_mem\n lines = `free -m`.split(\"\\n\")\n header = lines[0]\n w_cache = lines[1].split(/\\s+/)[2].to_i\n mem = lines[2].split(/\\s+/)[2].to_i\n [mem, w_cache]\n end",
"title": ""
}
] | [
{
"docid": "ac1518129ea8683411c5daa988d57c1a",
"score": "0.84366274",
"text": "def memused\n @memtotal - @memfree\n end",
"title": ""
},
{
"docid": "98b10268c497e3d3867a26707dec3286",
"score": "0.77914155",
"text": "def used\n\t\t\t\treturn nil unless meminfo?\n\t\t\t\tmemory... |