First 24 rows of ruby
| uuidstring | repo_namestring | relative_pathstring | contentstring | categorystring | algo_rel_scorefloat32 | quality_scorefloat32 | source_meta |
|---|---|---|---|---|---|---|---|
| c4110070-b33e-4694-bd6a-dd27e050f83a | mikezter/adwords4r | lib/adwords4r/v201008/TargetingIdeaServiceMappingRegistry.rb | require 'adwords4r/v201008/TargetingIdeaService' require 'soap/mapping' module AdWords; module V201008; module TargetingIdeaService module DefaultMappingRegistry EncodedRegistry = ::SOAP::Mapping::EncodedRegistry.new LiteralRegistry = ::SOAP::Mapping::LiteralRegistry.new … | TOOL | 0.6008691191673279 | 3.2944509983062744 |
| 1ddd8509-06da-40b6-9b20-85619740420e | standvpmnt/employee-data | app/controllers/documents_controller.rb | class DocumentsController < ApplicationController before_action :approved_user before_action :identify_employee def create @document = @employee.documents.new(document_params) if @document.save flash[:success]="Document successfully saved" redirect_to e… | WEB | 0.9557585716247559 | 6.498197555541992 | {"github_metadata":{"branch":"master","commit_count":13,"repo_created_at":"2020-04-28T01:54:19.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":1,"forks":0,"issues":0,"pull_requests":15},"file_meta":{"content_id":"7c44ae2c1fb3dbeaed483e5c2044592291df5568","si… |
| 543d6739-8a80-4c2f-8ceb-10e0e10a5068 | azizaz/catalog | _parser/demo.rb | # coding: utf-8 require 'nokogiri' require 'open-uri' require 'sqlite3' require 'geocoder' puts "Get index page" doc = Nokogiri::HTML(open('http://biz.kr.ua/#catalog')) db = SQLite3::Database.new("../db/development.sqlite3") rubrics = [] #drop existing content db.execute("dele… | DATA | 0.6709717512130737 | 3.8775954246520996 | {"github_metadata":{"branch":"master","commit_count":7,"repo_created_at":"2012-04-14T06:20:30.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":1,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"9ec67d74adadda27281bd0b5e997435ec8e7a039","size… |
| 8205fcd5-a75f-4e1a-9d94-cd349fd400c2 | alshafei/CrowdVoice | app/controllers/admin/tags_controller.rb | class Admin::TagsController < ApplicationController before_filter :authenticate_user! before_filter :admin_required before_filter :find_tag, :only => [:edit, :update, :destroy] layout 'admin' def index @tags = Kaminari.paginate_array(ActsAsTaggableOn::Tag.order(:na… | WEB | 0.939639687538147 | 6.911981105804443 | {"github_metadata":{"branch":"master","commit_count":592,"repo_created_at":"2014-09-30T17:45:49.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"067dd47fa2583190e80172a4845ad7ddba0143c1","si… |
| 0803d5a0-86ec-4252-a7b1-32230d6461b8 | jruby/jruby | bench/shootout/heapsort.ruby | #!/usr/bin/ruby # -*- mode: ruby -*- # $Id: heapsort.ruby,v 1.5 2005-04-14 15:59:37 igouy-guest Exp $ # # The Great Computer Language Shootout # http://shootout.alioth.debian.org/ # # modified by <NAME> IM = 139968 IA = 3877 IC = 29573 $last = 42.0 def gen_random (max) (max … | ALGO | 0.9953711628913879 | 5.550626277923584 | {"github_metadata":{"branch":"master","commit_count":55786,"repo_created_at":"2009-04-05T03:54:35.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":3832,"forks":927,"issues":765,"pull_requests":93},"file_meta":{"content_id":"b48db72835103088477b71a904019bcc6a80… |
| 8264ac9d-f34b-4dd5-b190-e6c430894386 | MeMoElprince/bus-booking-app | app/controllers/api/v1/bookings_controller.rb | class Api::V1::BookingsController < ApplicationController before_action :authenticate , only: [:create] def index bookings = Booking.all render json: bookings.to_json(include: [:user, :trip]) end def show booking = Booking.find(params[:id]) render json:… | WEB | 0.9886788725852966 | 4.700931549072266 | {"github_metadata":{"branch":"main","commit_count":29,"repo_created_at":"2024-07-19T02:44:56.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":1,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"db66c44f452e23df2121ba7f6ddc65c2d8ed679f","size_… |
| 1632d689-a79a-4d78-b96c-097811b6b918 | MVerthein/phase-0 | week-4/longest-string/my_solution.rb | # Longest String # I worked on this challenge [by myself, with: ]. # longest_string is a method that takes an array of strings as its input # and returns the longest string # # +list_of_words+ is an array of strings # longest_string(list_of_words) should return the longest stri… | ALGO | 0.9616870880126953 | 4.333978652954102 | {"github_metadata":{"branch":"master","commit_count":153,"repo_created_at":"2016-01-21T22:43:11.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"c980eeb970487ddbd2f9b694fb939539b9c120cb","si… |
| f8b2007c-2aff-4ebf-bd45-5f05dd62cb82 | ideacrew/enroll | app/models/map_reduce/family_search_for_family.rb | module MapReduce class FamilySearchForFamily include FamilySearchCommon def self.populate_for(family) self.new(family).execute end def initialize(family) @family = family @person_ids = family.family_members.map(&:person_id) @map_reduce … | ALGO | 0.7250034213066101 | 5.686278820037842 | {"github_metadata":{"branch":"trunk","commit_count":50088,"repo_created_at":"2020-06-25T13:59:52.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":8,"forks":10,"issues":0,"pull_requests":18},"file_meta":{"content_id":"0900d8763dbbcbc65814ba813963ea875024fb37","… |
| 1921256c-ed6d-4526-9179-acfbb8606332 | adokOne/homey_test | app/controllers/users_controller.rb | class UsersController < ApplicationController before_action :load_and_authorize_user, except: %i[index] def index authorize User @users = User.page(params[:page]).per(10) end def update if @user.update(permitted_attributes) redirect_back(fallback_locat… | WEB | 0.9767162799835205 | 6.763443946838379 | {"github_metadata":{"branch":"main","commit_count":5,"repo_created_at":"2023-02-22T11:38:41.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"2aefda5099b46c1711e64618f18689b49c6623ff","size_b… |
| dc1d1eef-1b2e-450f-83f8-41f7fc7686a0 | nogusan/protospace-38428 | app/controllers/prototypes_controller.rb | class PrototypesController < ApplicationController def index @prototypes = Prototype.all end def new @prototype = Prototype.new end def create @prototype = Prototype.create(prototype_params) if @prototype.save redirect_to root_path else … | WEB | 0.9695559740066528 | 6.417022705078125 | {"github_metadata":{"branch":"master","commit_count":32,"repo_created_at":"2022-12-11T03:04:02.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":1,"pull_requests":0},"file_meta":{"content_id":"3c863cf2bbe5992813b8bb034e6df17f88c30162","siz… |
| 4fc26407-098e-4121-9ea6-7c6643e2b50c | GitChinaLab/GitChinaLab | spec/features/groups/settings/packages_and_registries_spec.rb | # frozen_string_literal: true require 'spec_helper' RSpec.describe 'Group Packages & Registries settings' do include WaitForRequests let(:user) { create(:user) } let(:group) { create(:group) } let(:sub_group) { create(:group, parent: group) } before do group.add… | TEST | 0.8649839162826538 | 7.359427452087402 | {"github_metadata":{"branch":"main","commit_count":1,"repo_created_at":"2022-01-14T15:54:30.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":3,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"05c3611fabb7e14431fee30c898b576dbe4c1b42","size_by… |
| 8da01656-6597-469b-ac6a-62bb979d5249 | derUbermenk/Chess-CLI | lib/board_tools/mapping_tools.rb | # frozen_string_literal: true require_relative '../board' # NOTE # # * direction # a direction is an array of coordinates with reference from a cell # that is sorted by distance to the reference cell, determined by the # piece in the ref cell and bounded by the lim… | ALGO | 0.9801336526870728 | 4.613162994384766 | {"github_metadata":{"branch":"main","commit_count":105,"repo_created_at":"2021-09-30T13:42:49.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"a79919a93667be74940c67d98fbaf5c4687ade7b","size… |
| 2c65f1cc-93df-4029-a086-5d581d988b11 | codekitchen/advent-of-code | 2023/6.rb | #!/usr/bin/env ruby --yjit ### # impl ### def part1(input) races = input.lines.map { _1.split[1..].map(&:to_i) }.transpose races .map { |t,rec| (0..t).count { |hold| hold * (t - hold) > rec } } .reduce(:*) end def part2(input) time, rec = input.lines.map { _1.spli… | ALGO | 0.9955403208732605 | 4.626841068267822 | {"github_metadata":{"branch":"master","commit_count":121,"repo_created_at":"2020-12-08T04:51:25.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"2f1206e4ca9ccd3c3783382c335c447d430a14c0","si… |
| 58c2ab77-43ce-4af6-9cb3-f28594770667 | Shanna99/adventofcode-1 | 2016/03_squares_with_three_sides.rb | p File.readlines("03.input") .map { |l| l.split.map(&:to_i) } .transpose.flatten.each_slice(3) # remove for part 1 .count { |a, b, c| a + b > c && b + c > a && a + c > b } | ALGO | 0.9845976829528809 | 4.101690292358398 | {"github_metadata":{"branch":"master","commit_count":149,"repo_created_at":"2019-12-06T15:03:56.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"6b6f58610db6957c5144328d13f33bec50fda990","si… |
| e51c4adc-1216-473d-9a16-1a85a2fc5b08 | chuckmersereau/api_practice | app/services/task/filter/contact_status.rb | class Task::Filter::ContactStatus < Task::Filter::Base def execute_query(tasks, filters) filters = clean_contact_filter(filters) tasks.joins(:contacts).merge(Contact::Filter::Status.query(Contact, filters, account_lists)) end # Reversing is handled by {Contact::Fil… | TOOL | 0.9383439421653748 | 6.936576843261719 | {"github_metadata":{"branch":"age","commit_count":7083,"repo_created_at":"2018-09-18T15:37:08.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"6f9f356013222523b71702ba9bc640117cc43ab5","size… |
| a5bf7759-ee97-4aba-a28f-aeb2c6003fe2 | koheiyamada/jenkins_test | app/controllers/hq/subjects_controller.rb | class Hq::SubjectsController < ApplicationController hq_user_only layout 'with_sidebar' def index @subjects = Subject.all end def show @subject = Subject.find(params[:id]) end def new @subject = Subject.new end def create @subject = Subject.n… | WEB | 0.9507171511650085 | 5.641283988952637 | {"github_metadata":{"branch":"master","commit_count":4,"repo_created_at":"2014-08-21T01:24:10.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"66803aeffc901726a2930f31d3c3ed1ed7c0bd5b","size… |
| 0b2fdff1-b5ed-4174-a41f-db54a04ff222 | Iharidla/RoR-Elevator-Service-Tech-Proposal | app/controllers/orders_controller.rb | class OrdersController < ApplicationController before_action :check_elevator def pickup add_order(0) end def dropoff add_order(1) end private def add_order(state) @order = Order.new(state: state, floor: order_params) if @order.save … | WEB | 0.9201816916465759 | 5.796304225921631 | {"github_metadata":{"branch":"master","commit_count":8,"repo_created_at":"2020-06-01T12:42:09.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":8},"file_meta":{"content_id":"a7162b0c9ac7ece96c2c4acdb858ccb91835ccd4","size… |
| db80514b-6ac6-49a4-a886-35f7ac63b1f6 | palin/msa-search | app/controllers/api/v1/search_controller.rb | class Api::V1::SearchController < Api::V1::BaseController rescue_from ActionController::ParameterMissing, with: :bad_request def index search = Search.new(search_params) @results = search.results end private def search_params QueryParser.parse(params.… | WEB | 0.681396484375 | 6.429957389831543 | {"github_metadata":{"branch":"master","commit_count":19,"repo_created_at":"2014-12-12T09:46:40.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"30f8790fd886aa6ebe551271446eefea7abbd3e9","siz… |
| 2d1003b5-42db-49a2-bf02-e0923b29917c | futureproject/logbook | app/views/api/v3/people/show.json.jbuilder | json.extract! @person, :id, :created_at, :updated_at, :first_name, :last_name, :initials, :school_id, :school_name, :grade, :dream_team, :role, :last_engaged, :avatar_url json.engagements @person.engagements.order("date DESC").limit(10) do |engagement| j… | WEB | 0.8043388724327087 | 6.490148544311523 | {"github_metadata":{"branch":"master","commit_count":1006,"repo_created_at":"2015-08-20T18:38:41.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"b0d5c670c764decb0701cfd0e5c74f75f462c7bf","si… |
| f7074312-51bb-43c8-9c91-be3c466e7854 | shoes/shoes4 | shoes-core/lib/shoes/arrow.rb | # frozen_string_literal: true class Shoes class Arrow < Common::ArtElement style_with :art_styles, :curve, :common_styles, :dimensions STYLES = { fill: Shoes::COLORS[:black] }.freeze def create_dimensions(left, top, width) left ||= @style[:left] || 0 … | TOOL | 0.697444498538971 | 6.610750198364258 | {"github_metadata":{"branch":"main","commit_count":4238,"repo_created_at":"2012-05-24T14:57:59.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":1610,"forks":191,"issues":94,"pull_requests":3},"file_meta":{"content_id":"2ba9841fe183e7f4521f9067580e245bbef6bef2"… |
| c879ade8-3dae-4c4e-8b79-6480d7c1c1cf | yujiloh0816/trip_system | spec/models/trip_finder_spec.rb | require 'rails_helper' RSpec.describe TripFinder, type: :model do let!(:moe) { FactoryBot.create(:customer) } let!(:imperial_palace01) { FactoryBot.create(:trip) } let!(:imperial_palace02) { FactoryBot.create(:trip) } let!(:road_bicycle) { FactoryBot.create(:bicycle) } … | TEST | 0.8613122701644897 | 7.1619720458984375 | {"github_metadata":{"branch":"master","commit_count":12,"repo_created_at":"2019-08-12T17:38:17.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":10},"file_meta":{"content_id":"e331e2aae2590e317f440dd5f1377ad0efecd9de","si… |
| 8cd12837-d78e-4c74-bd66-dd84a7382056 | hsvruby/hntsvll | app/controllers/confirmations_controller.rb | class ConfirmationsController < ApplicationController def new @email = params[:email] end def show @account = Account.find_by_email(params[:email]) if @account && @account.confirm_by_token(params[:token]) flash[:notice] = "You have successfully confirmed… | WEB | 0.914736270904541 | 6.208480358123779 | {"github_metadata":{"branch":"master","commit_count":170,"repo_created_at":"2010-12-22T01:22:59.000Z","is_fork":false,"is_org_owned":true,"forked_from":null,"stars":6,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"92d5c94b4a5c9986bb6ad8e15a5c9ec57184fbe0","siz… |
| b658352e-2542-4db4-a766-7e5730010f05 | Eihcir0/go_fish_w_specs | solution/deck.rb | class Deck attr_reader :cards #factory method, returns an array containing 52 new card objects of #all suits and values def self.all_cards all_cards = [] Card.suits.product(Card.values).each do |suit, value| all_cards << Card.new(suit, value) end … | ALGO | 0.9619301557540894 | 4.08015251159668 | {"github_metadata":{"branch":"master","commit_count":3,"repo_created_at":"2016-07-24T09:59:55.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"18d36ab29bd8bf027289de23328ec6bd6ff42f89","size… |
| e550f3b0-a54c-41c9-ae1f-a44a2ffd130f | siwS/ruby-algorithms-and-scripts | algos/data_structures/set.rb | class Set def initialize @elements = {} end def items @elements.keys end def add(item) @elements[item] = true end def is_empty? @elements.size == 0 end def remove(item) @elements.delete(item) end end set = Set.new set.add(1) set.add(2)… | ALGO | 0.970057487487793 | 6.303936958312988 | {"github_metadata":{"branch":"main","commit_count":11,"repo_created_at":"2020-10-06T22:03:06.000Z","is_fork":false,"is_org_owned":false,"forked_from":null,"stars":0,"forks":0,"issues":0,"pull_requests":0},"file_meta":{"content_id":"c04a7768d30680f22a7a0f177c973d83b82ae645","size_… |