First 46 rows of rb
| uuidstring | repo_namestring | relative_pathstring | contentstring | categorystring | algo_rel_scorefloat64 | quality_scorefloat64 |
|---|---|---|---|---|---|---|
| c1290f21-2610-4190-a3d2-ac30cae09277 | krlawrence/SVG | generators/svg-triangle-art6.rb | require "./SVGTools.rb" c = SVGTools.new c.emitHeader() cx = 300 cy = 300 r = 100 d = 18 n = 1 c.setFillOpacity(0.5) c.setFill("#fff") c.drawRect(50,50,500,500) c.newGroup(stroke="none", fill="none") 0.step(324,36) do |a| p2 = c.getPointOnCircle(cx,cy,r,a-d) p3 = c.getPoi… | TOOL | 0.9129602313041687 | 6.164241313934326 |
| ac467bef-3a11-4bbc-8c65-62f651901c1d |
| src/nqueens.rb |
| def main() $n = ARGV[0].to_i || 8 solve.each do |b| printboard b puts end end def solve Enumerator.new do |e| [*0..$n-1].permutation do |a| e.yield a if board_valid?(a) end end end def board_valid?(a) (0..$n-1)… |
| ALGO |
| 0.9826101660728455 |
| 5.198312282562256 |
| 20cfb49b-9256-4aa5-90a9-221c980706fa | cindyytong/calmspace | app/controllers/api/sessions_controller.rb | class Api::SessionsController < ApplicationController def create memberType = params[:type].titleize.constantize @user = memberType.find_by_credentials( params[:user][:email], params[:user][:password] ) if @user && para… | WEB | 0.9701328873634338 | 6.529210567474365 |
| 908a0cbe-b223-4598-a7c6-8634a322ff17 | m9795/Bookers2_exercise8c | config/application.rb | require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Bookers2 class Application < Rails::Application # Initialize configuration … | CONFIG | 0.9499773979187012 | 7.2477126121521 |
| f5c0dff6-f6c5-4ef8-91d3-e2c77717496b | hmacht/henry-and-hart-eat-food | config/application.rb | require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module ProjectFoodSite class Application < Rails::Application # Initialize configu… | CONFIG | 0.9932274222373962 | 7.334836959838867 |
| 8c165b23-1585-456c-8c0a-ae6edc95e972 | yusuke-imai3723/line_todo_list | vender/bundle/ruby/2.7.0/gems/rack-2.2.3/lib/rack/deflater.rb | # frozen_string_literal: true require "zlib" require "time" # for Time.httpdate module Rack # This middleware enables content encoding of http responses, # usually for purposes of compression. # # Currently supported encodings: # # * gzip # * identity (no transfo… | WEB | 0.7990151047706604 | 4.857325553894043 |
| 2c037c7d-1564-46ea-956a-b5421da8be24 | orkungo/magazinete | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file. # # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:… | CONFIG | 0.9957208037376404 | 7.145318031311035 |
| aac5681c-08e9-4313-979d-cd1942ce0323 | aslanval/FIT5H_EuP | Rails/Projekte/flix/config/environments/production.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in … | CONFIG | 0.9977219700813293 | 7.6574530601501465 |
| c729470c-9412-4182-8a75-62eb24f31faa | reita17/workouter | config/puma.rb | # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads… | CONFIG | 0.9945104122161865 | 7.79004430770874 |
| 40af193c-98eb-4375-ba76-a31cb340ec96 | lightwatcher/Enrolling | config/environments/production.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in … | CONFIG | 0.998275876045227 | 7.5983195304870605 |
| ae77adb3-f7d3-4dfe-8002-6dd34eec8d56 | jonnyjonnyjonjon/brakeman43 | test/apps/rails3/app/controllers/application_controller.rb | class ApplicationController < ActionController::Base # protect_from_forgery before_filter :action_in_parent, :only => :action_in_child end | WEB | 0.7820952534675598 | 4.111202716827393 |
| 01c229af-9bfa-47a7-aacd-eb3d9619bcd8 | Andriano606/print_lab | config/environments/development.rb | require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Make code changes take effect immediately without server restart. config.enable_reloading = true # Do not… | CONFIG | 0.9965404868125916 | 7.5970916748046875 |
| 8ca58c2d-a874-4c60-81b2-3ccd2100f604 | mh61503891/hakuto | lib/hakuto/models.rb | require 'data_mapper' DataMapper::Model.raise_on_save_failure = true module Hakuto class Paper include DataMapper::Resource # IDs property :id, Serial property :doi, String, unique:true # ACM property :acm_id, String, unique:true property :acm_titl… | TOOL | 0.9012717008590698 | 6.344672679901123 |
| 7c4e794f-8bcc-4c76-ae49-ba4d9d034f52 | IntersectAustralia/hcsvlab | features/support/selectors.rb | module HtmlSelectorsHelpers # Maps a name to a selector. Used primarily by the # # When /^(.+) within (.+)$/ do |step, scope| # # step definitions in web_steps.rb # def selector_for(locator) case locator when "the page" "html > body" when… | TEST | 0.7917807102203369 | 6.514837265014648 |
| 461c9993-9ae5-4dc9-a5bc-ab476812dbf7 | simbiri/final_project | app/controllers/message_attachments_controller.rb | class MessageAttachmentsController < ApplicationController def index matching_message_attachments = MessageAttachment.all @list_of_message_attachments = matching_message_attachments.order({ :created_at => :desc }) render({ :template => "message_attachments/index" … | WEB | 0.8043983578681946 | 6.263035774230957 |
| 82423988-90ac-4f26-b42f-020171ca4744 | ontrack-2305/ontrack_fe | app/controllers/users_controller.rb | class UsersController < ApplicationController before_action :validate_session, only: [:show] def show @user = current_user @holidays = HolidayFacade.upcoming_holidays @mood = params[:mood] if params[:calendar] == "true" @calendar_events = CalendarEven… | WEB | 0.9027960896492004 | 6.445926666259766 |
| 82586d9e-7d67-45ec-a496-be2f7a33050b | dsantafe/Rails | rails_projects/milia-sample-app/config/puma.rb | # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads… | CONFIG | 0.9828848838806152 | 7.804619312286377 |
| 51d9d059-35be-416d-8a24-aa9301d72615 | HSEADC/B21DZ09-L3-Project-01 | config/environments/production.rb | require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager … | CONFIG | 0.9984968900680542 | 7.6531548500061035 |
| 1b092dca-a374-44cd-8240-f5e510c91ab0 | ideacrew/opm_enroll | app/controllers/broker_agencies/inboxes_controller.rb | class BrokerAgencies::InboxesController < InboxesController include Acapi::Notifiers def new @inbox_provider_name = 'HBX Admin.' @inbox_to_name = @broker_agency_provider.try(:legal_name) @inbox_provider = @broker_agency_provider super end def msg_to_port… | WEB | 0.9775185585021973 | 3.6870346069335938 |
| 1745ad52-6e55-42b7-99d1-6223f4d0c4ea | sunny/raise_js | test/dummy/config/environments/development.rb | Dummy::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # sin… | CONFIG | 0.9959006905555725 | 7.463110446929932 |
| ae1e11b6-f24c-428f-894d-a98b94792019 | Menubatenny/new_project | config/application.rb | require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module NewProject class Application < Rails::Application # Initialize configuratio… | CONFIG | 0.966799259185791 | 7.273943901062012 |
| bcc5facb-8ddb-492c-b3e4-ff584b7dee82 | 99Problemsx/Illusion | Data/Scripts/016_UI/019_UI_PC.rb | #=============================================================================== # #=============================================================================== def pbPCItemStorage command = 0 loop do command = pbShowCommandsWithHelp(nil, … | TOOL | 0.8295754194259644 | 3.4176061153411865 |
| 4fb71623-0898-4ec0-8348-85d4bf7004db | Essux/ProductCast | app/controllers/products_controller.rb | require 'date' class ProductsController < ApplicationController # Se llama al mostrar todos los productos def index @products = current_user.products end # Se llama al mostrar un producto en específico def show @product = current_user.product… | WEB | 0.8713462352752686 | 5.553073883056641 |
| 7a33d95b-26f0-4bad-b376-7ec60814d0cf | babysnoop/friends | config/initializers/devise.rb | # frozen_string_literal: true # Assuming you have not yet modified this file, each configuration option below # is set to its default value. Note that some are commented out while others # are not: uncommented lines are intended to protect your configuration from # breaking chan… | CONFIG | 0.9947298765182495 | 6.369459629058838 |
| 910342c5-c7d9-4811-abeb-9dcb94aaeaf2 | AnuSinghs/rails-wikinimous | config/environments/production.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in … | CONFIG | 0.9982149600982666 | 7.5979838371276855 |
| 4d629260-b233-4421-aec3-ffe89ded5e50 | Alexander150/Rspec | config/initializers/wrap_parameters.rb | # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:a… | CONFIG | 0.9952768087387085 | 7.068408489227295 |
| d10484e7-a57a-4cef-9248-dd44e31aed68 | UsamaAnser1518/library-manager | config/application.rb | require_relative "boot" require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module LMS class Application < Rails::Application # Initialize configuration defau… | CONFIG | 0.979317307472229 | 7.34101676940918 |
| 874fe7f3-c479-4821-a2bb-d43177b5378d | nickmerwin/skylineonline | app/controllers/events_controller.rb | class EventsController < ApplicationController before_filter :require_login, :except => [:index, :show] before_filter :can_edit, :only => [:edit, :update, :destroy] def index @date = Time.parse("#{params[:date]} || Time.now.utc") @events = Event.find(:all, :co… | WEB | 0.9668546915054321 | 5.530778884887695 |
| 9303c111-09aa-4da3-ab99-ddcf551611a4 | HD-Case/css | config/environments/test.rb | require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated betwe… | CONFIG | 0.9959239959716797 | 7.71061897277832 |
| 59aeab6c-2b0c-48ba-884f-22bb38ec0fde | uabassguy/ewigehoffnung | lib/tools/worldmap_editor.rb | # Note: This must be run from the lib directory. require "rubygems" require_relative "../eh.rb" module EH module Tools include Gosu class AbstractMap attr_accessor :lower, :upper, :right, :left attr_reader :name, :file def initialize(name,… | TOOL | 0.8708081245422363 | 4.241973876953125 |
| 39eca9ff-27ea-4399-b112-e0e460370282 | sakitakech/football_team_training | app/controllers/application_controller.rb | class ApplicationController < ActionController::Base # Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has. allow_browser versions: :modern before_action :configure_permitted_parameters, if: :devise_controller? befo… | WEB | 0.9547126889228821 | 6.454960823059082 |
| 2d792c57-7010-4ee3-97c7-d8d12700fbc6 | mansimas/armyfight_v1 | config/environments/production.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in … | CONFIG | 0.9982796907424927 | 7.6298017501831055 |
| a072224b-0ee5-4917-bccf-17b4c1fe196c | Jacwutang/App_Academy_Projects | W4D1/FirstRoutes/config/puma.rb | # Puma can serve each request in a thread from an internal thread pool. # The `threads` method setting takes two numbers: a minimum and maximum. # Any libraries that use thread pools should be configured to match # the maximum value specified for Puma. Default is set to 5 threads… | CONFIG | 0.9899917244911194 | 7.804619312286377 |
| 42bd6cfc-49b1-4ef6-8f23-bfe7a6632e8e | tomasibarrab/Portafolio | app/controllers/posts_controller.rb | class PostsController < ApplicationController before_action :find_post, only: [:show, :edit, :update, :destroy] before_action :authenticate_user!, except: [:index, :show] def index @posts = Post.all.order('created_at DESC').paginate(page: params[:page], per_page:5) end de… | WEB | 0.9793120622634888 | 6.48211669921875 |
| 1a669ede-d2e2-478c-b841-d216fcba6a7d | nveronpro/THP-WebCatShop | config/environments/test.rb | # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! Rai… | CONFIG | 0.9956181049346924 | 7.711869716644287 |
| 1203a02e-1a07-4757-bdf7-99365a22c317 | gadial/Thinking | config/initializers/session_store.rb | # Be sure to restart your server when you modify this file. # Your secret key for verifying cookie session data integrity. # If you change this key, all old sessions will become invalid! # Make sure the secret is at least 30 characters and all random, # no regular words or you'… | CONFIG | 0.917272686958313 | 5.717250823974609 |
| cc119c10-89c9-41dc-9b8c-a7798af8990f | ahjwoo/TodoList-App | app/controllers/todo_items_controller.rb | class TodoItemsController < ApplicationController before_action :set_todo_list before_action :set_todo_item, except: [:create] def create @todo_item = @todo_list.todo_items.create(todo_item_params) redirect_to @todo_list end def destroy if @todo_item.destroy fl… | WEB | 0.9657667875289917 | 6.796207427978516 |
| 36273277-3aa9-44af-b0e0-37597586cfd9 | JasonOCodes/rails-watch-list-jensen | config/environments/test.rb | require "active_support/core_ext/integer/time" # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated betwe… | CONFIG | 0.9973610043525696 | 7.726419925689697 |
| 4850b5df-65b5-4a17-a20a-bcaa54c87336 | toshiyukihina/rails-fileupload-server | config/environments/development.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # sinc… | CONFIG | 0.9976891279220581 | 7.613992691040039 |
| f5cac9f0-965f-4c03-bed1-3f313b420edc | S-C-M/sinatra-mvc-file-structure-pc-jastor-120215 | .bundle/gems/coderay-1.1.0/lib/coderay/tokens.rb | module CodeRay # The Tokens class represents a list of tokens returned from # a Scanner. It's actually just an Array with a few helper methods. # # A token itself is not a special object, just two elements in an Array: # * the _token_ _text_ (the original source of t… | TOOL | 0.9402492046356201 | 3.7335422039031982 |
| a302cde2-2363-4b3f-a6a2-ef7380e564de | cjkula/cipher-lang | lib/deprecated/script_literal.rb | require 'cipher/script' class Cipher::Script::Literal def self.create_if(literal) return nil unless literal.is_a?(Cipher::Object) new literal end def initialize(literal) @literal = literal end def evaluate(context=nil) @literal end end | TOOL | 0.7891794443130493 | 4.7726664543151855 |
| fe29b7d6-35ff-4aa8-bbb5-5d872ac224df | penders89/programming_foundations | lesson4/tictactoe.rb | require 'pry' INITIAL_MARKER = ' '.freeze PLAYER_MARKER = 'X'.freeze COMPUTER_MARKER = 'O'.freeze WINNING_LINES = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] + # rows [[1, 4, 7], [2, 5, 8], [3, 6, 9]] + # cols [[1, 5, 9], [3, 5, 7]] # diagonals… | TOOL | 0.9730406999588013 | 5.207283020019531 |
| 893595b5-d51f-449c-967b-20f3eba34eab | MasatoshiOsugi/six-hat | config/environments/test.rb | Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test datab… | CONFIG | 0.9971985816955566 | 7.743454456329346 |
| 19d6056b-f0dd-4f85-83d8-2d5f78892bac | faysalmehmood/notenote | config/initializers/devise.rb | # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will r… | CONFIG | 0.9944475889205933 | 5.958539009094238 |
| 0b51a7de-4bca-4a23-b5bf-1468ce567c1a | tamatsukoki/protospace-39535 | config/initializers/devise.rb | # frozen_string_literal: true # Assuming you have not yet modified this file, each configuration option below # is set to its default value. Note that some are commented out while others # are not: uncommented lines are intended to protect your configuration from # breaking chan… | CONFIG | 0.9948863387107849 | 6.38853645324707 |
| 1afc5068-ac34-4e1c-b2f9-5e5983ce11d9 | johnantoni/old.rails.apps | stock-tracker/config/environment.rb | # Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails… | CONFIG | 0.9699283838272095 | 7.100955009460449 |