hexsha
stringlengths
40
40
size
int64
2
1.01M
content
stringlengths
2
1.01M
avg_line_length
float64
1.5
100
max_line_length
int64
2
1k
alphanum_fraction
float64
0.25
1
f8eb2114f716f2ed66f0a89e7f14f13dccd81b36
265
Rails.application.routes.draw do require 'sidekiq/web' mount Sidekiq::Web, at: '/sidekiq' get 'work/duplicate_simple' => 'work#duplicate_simple' get 'work/duplicate_nested' => 'work#duplicate_nested' get 'work/duplicate_slow' => 'work#duplicate_slow' end
33.125
56
0.743396
2871378b02ddd11c7a0a004e637bb5c76ceb1572
330
module Asteroids class Component def initialize(game_object = nil) self.object = game_object end def update end def draw end protected def object=(obj) if obj @object = obj obj.components << self end end def object @object end ...
11.37931
37
0.557576
1158b00317eb3e2be3ccafc45a1281aa8ff5d662
1,345
=begin #OpenLattice API #OpenLattice API The version of the OpenAPI document: 0.0.1 Contact: support@openlattice.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.0.0-SNAPSHOT =end require 'spec_helper' require 'json' require 'date' # Unit tests for OpenapiClient::SearchDetails # Automa...
24.907407
102
0.731599
183edf1c088849c2fbd2fb328456f16a993d30ee
3,622
require 'microsoft_kiota_abstractions' require_relative '../../users' require_relative '../messages' require_relative './content' module Graphrubyv4::Users::Messages::Content ## # Builds and executes requests for operations under \users\{user-id}\messages\{message-id}\$value class ContentRequestBuilder ...
41.159091
128
0.627278
bf926eb2d31496dd1e1044c4721fceff3d583bfb
2,374
#MIT License #http://www.github.com/amirrajan/rake-dot-net #Copyright (c) 2011 Amir Rajan require './RakeDotNet/command_shell.rb' require './RakeDotNet/web_deploy.rb' require './RakeDotNet/iis_express.rb' require './RakeDotNet/sln_builder.rb' require './RakeDotNet/file_sync.rb' require 'net/http' require 'yaml' task ...
31.653333
103
0.753159
8752455ce58a6652e29c94eaff055af099e66690
21,617
# scanf for Ruby # # $Release Version: 1.1.2 $ # $Revision: 27139 $ # $Id: scanf.rb 27139 2010-04-01 04:32:22Z naruse $ # $Author: naruse $ # # A product of the Austin Ruby Codefest (Austin, Texas, August 2002) =begin =scanf for Ruby ==Description scanf for Ruby is an implementation of the C function scanf(3), modi...
30.023611
121
0.63339
2613023bd059cb22182560fb6f2c2fbded22f691
368
require 'securerandom' class Configuration attr_accessor :name,:value,:description,:id,:displayfield def initialize(name, value, description) @name = name @value = value @description = description end end DisplayField = { TextBox: "textbox", CheckBox: "checkbox", NumericBox: "numericbox", ...
18.4
59
0.703804
1d3223da906ed94a6e4cf956e5ec389bc779efdf
1,593
require 'rails_helper' RSpec.describe Country, type: :model do context 'Create' do it 'country without name should raise record invalid' do @country = Country.new() expect(@country.valid?).to be(false) end it 'country should be created successfully' do expect{ Country.crea...
22.43662
60
0.610797
392ae9b05428ab5ef347426afe7371ad400643cf
2,158
require_relative '../../test_helper' require "minitest/autorun" describe RubyLanguageServer::ProjectManager do before do end describe "ProjectManager" do it "must init" do pm = RubyLanguageServer::ProjectManager.new("/") end end describe "tags_for_text" do let(:pm) { RubyLanguageServer::P...
26
87
0.636237
7a5ffcded6cb720488fa1e29f228b500c29f8e9e
8,064
# -*- coding: binary -*- require "rex/parser/nokogiri_doc_mixin" module Rex module Parser # If Nokogiri is available, define Template document class. load_nokogiri && class MbsaDocument < Nokogiri::XML::SAX::Document include NokogiriDocMixin # Triggered every time a new element is encou...
31.377432
96
0.604291
1da8aa0c37f132e553a16b91e87c5c08dbd03882
61
module Pickwick module API VERSION = "0.0.1" end end
10.166667
21
0.639344
f72b14028213486a5b39c1d5ac14fe168287bd8c
105
# frozen_string_literal: true require 'eac_ruby_utils/require_sub' ::EacRubyUtils.require_sub(__FILE__)
21
36
0.838095
1c49e6ce6b677263c35991a81007032565ccb0a9
471
cask 'fontplop' do version '1.3.0' sha256 '0ada8c9040bb3da489965b917990f6d88da23c8fec5602f798c91db7e2aafb0e' # github.com/matthewgonzalez/fontplop was verified as official when first introduced to the cask url "https://github.com/matthewgonzalez/fontplop/releases/download/v#{version}/fontplop-#{version}.dmg" ...
36.230769
105
0.781316
d513cbb55ed4ebf0bdc3b09454b51501abcde415
485
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 TMDTBt02 class Application < Rails::Application # Settings in config/environments/* take precedence over those spec...
30.3125
82
0.762887
bf1482f8bd7cb82a08f08d6fd39d3ae971956f75
457
# # encoding: utf-8 # Inspec test for recipe tracks::default # The Inspec reference, with examples and extensive documentation, can be # found at http://inspec.io/docs/reference/resources/ unless os.windows? describe user('root') do it { should exist } skip 'This is an example test, replace with your own t...
24.052632
73
0.722101
1a0f63fdeb9d594562562b3c5a0021d49e2874a4
721
module KRL_CMD class Commit def self.go(options) app = KRL_COMMON::get_app krl_file = File.join(Dir.pwd, app.application_id + ".krl") if File.exists?(krl_file) begin app.krl = File.open(krl_file, 'r') { |f| f.read } app.set_version_note(app.version, options["note"]) if op...
28.84
75
0.565881
629ad95a3d2d8d232922c6518164ca1e9a1f39b0
587
require "colorize" require_relative "group" def ensure_users_exist_in_uaa(users, uaa_client) users.each do |user| next if user.exists?(uaa_client) puts "Creating new user '#{user.email}' with Google ID '#{user.username}'".green user.create(uaa_client) user.get_user(uaa_client) puts " CREATED W...
23.48
84
0.739353
1a04ba365f52e9485cf0a5e55a84c9ac93a03ebe
1,070
class AddToMelds attr_reader :round, :card_names, :meld_rank, :errors def initialize(round:, card_names:, meld_rank:) @round = round @card_names = card_names @meld_rank = meld_rank @errors = [] end def call game_engine = replay_round # REVIEW: Transacion boundary?? cards = card_na...
24.318182
108
0.713084
7a400ec8724219663808f6f89e19cbaacef4cf86
2,213
class Weechat < Formula homepage "https://www.weechat.org" url "https://weechat.org/files/src/weechat-1.0.1.tar.gz" sha1 "1d33591b6c0adc2c30b36a7b349603cbdbcb40b2" devel do url "https://github.com/weechat/weechat/archive/v1.1-rc1.tar.gz" sha1 "3cf06cfead34fe351a0e3eb53144cbf3f68bc7e5" version "1.1-...
31.169014
78
0.68685
39c758872fd2eb986b5c2822d220dde87f851e7e
4,631
require 'pathname' Puppet::Type.newtype(:dsc_sptimerjobstate) do require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' @doc = %q{ The DSC SPTimerJobState resource type. Automatically generated fro...
30.873333
140
0.679119
f80b1845e778fb2f3ec09faae8a4e97e397d30d1
431
#-- # Ruby Whois # # An intelligent pure Ruby WHOIS client and parser. # # Copyright (c) 2009-2018 Simone Carletti <weppos@weppos.net> #++ require_relative 'whois.centralnic.com' module Whois class Parsers # Parser for the whois.nic.xyz server. # # @see Whois::Parsers::Example # The Example par...
16.576923
65
0.684455
e9f1287506fba0e74a30978059eac1f2f03c4bcf
4,293
describe Fastlane do describe Fastlane::FastFile do describe "Increment Build Number Integration" do require 'shellwords' describe "With agv enabled" do before(:each) do allow(Fastlane::Actions::IncrementBuildNumberAction).to receive(:system).with(/agvtool/).and_return(true) ...
39.027273
115
0.604007
acd123202a733fd6224c56ef0b1a76d15fee9d4e
455
module ClientJobQueue class Engine < ::Rails::Engine end module ControllerExtensions extend ActiveSupport::Concern protected def enqueue_client_job(queue_name, job_name, options) c = cookies[queue_name] c = c.present? ? JSON.parse(c.to_s) : [] c << [job_name, options] ...
22.75
76
0.676923
acf026f10190cf665ed450fb11b0fdf3707b1662
1,294
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'sidekiq/logging/json/version' Gem::Specification.new do |spec| spec.name = "sidekiq-logging-json" spec.version = Sidekiq::Logging::Json::VERSION spec.authors = ["Wouter...
40.4375
119
0.686244
083e5096f762ab555f790db35711ebfbbf6edbca
1,119
require "language/node" class Heroku < Formula desc "Command-line client for the cloud PaaS" homepage "https://cli.heroku.com" url "https://registry.npmjs.org/heroku-cli/-/heroku-cli-6.14.11.tgz" sha256 "5bf273c0b3042be4d9e37d9605a277f4f343c4b47bb9fc26199b2374a7bcb704" head "https://github.com/heroku/cli.git...
33.909091
92
0.723861
28bfe3a9264bf4d2ddd263cf3566c4dc611d9bef
26
module CurrencyHelper end
8.666667
21
0.884615
1d5307a35bb1305fbaebddf6c994745818899b8c
1,632
class PictureUploader < CarrierWave::Uploader::Base # Include RMagick or MiniMagick support: # include CarrierWave::RMagick include CarrierWave::MiniMagick process resize_to_limit: [400, 400] # Choose what kind of storage to use for this uploader: if Rails.env.production? storage :fog else stora...
28.631579
112
0.705882
ac8e28599e7c9fde31402b9d9d3eeb38baef7473
708
Pod::Spec.new do |s| s.name = "IDZDelegateLogger" s.version = "0.1.0" s.summary = "A class to log all messages sent to an object." s.homepage = "https://github.com/iosdevzone/IDZDelegateLogger" s.license = "MIT" s.author = { "iOS Developer Zone" => "idz@iosdeveloper...
29.5
108
0.637006
bb686f53ab55d4bdcacf44e2882d970ee4b25bd8
295
module Api module V1 module Entities class Props < Grape::Entity present_collection true expose :items, as: 'props', using: Entities::Prop expose :meta private def meta options[:pagination] end end end end end
15.526316
57
0.559322
b9efac3fbf10b18576a4f2d68610422ea7fdb472
3,640
$:.push File.expand_path('../lib', __FILE__) # Maintain your gem's version: require 'locomotive/version' # Describe your gem and declare its dependencies: Gem::Specification.new do |s| s.name = 'locomotivecms' s.version = Locomotive::VERSION s.platform = Gem::Platform::RUBY s.authors = ['Did...
47.272727
185
0.513462
bfaf1cf247f4814f91b3c9a5c66d9fa15a0bcad0
298
ENV['SINATRA_ENV'] ||= "development" require 'bundler/setup' Bundler.require(:default, ENV['SINATRA_ENV']) ActiveRecord::Base.establish_connection( :adapter => "sqlite3", :database => "db/#{ENV['SINATRA_ENV']}.sqlite" ) require './app/controllers/application_controller' require_all 'app'
19.866667
50
0.724832
01ca45e0ad9013bfcdff96eaca9d8811776df63d
3,770
require 'active_record' module Horza module Adapters class ActiveRecord < AbstractAdapter INVALID_ANCESTRY_MSG = 'Invalid relation. Ensure that the plurality of your associations is correct.' CONTEXT_NAMESPACE = ::ActiveRecord::Base class << self def single_entity_klass ::Hor...
30.403226
109
0.62679
08526ca1a871503eafe36024c2fc2fcd8db456bb
155
module Miyan0ViewTool class Renderer def self.copyright name, msg "&copy; #{Time.now.year} | <b>#{name}</b> #{msg}".html_safe end end end
22.142857
65
0.632258
18cfed1d20c3cea78e8ec2d3d8609c484b21ecea
190
require 'neighborly/admin/engine' require 'neighborly/admin/version' require 'best_in_place' require 'postgres-copy' module Neighborly module Admin # Your code goes here... end end
17.272727
34
0.763158
215f12d90e5e3732978cf665a52b368386844793
129
require 'rails_helper' RSpec.describe LineItem, :type => :model do pending "add some examples to (or delete) #{__FILE__}" end
21.5
56
0.728682
08042855396283ed386bfd54567ba71effc2364f
910
require 'spec_helper' feature "the signup process" do scenario "has a new user page" do visit new_user_url expect(page).to have_content "New User" end feature "signing up a user" do before(:each) do visit new_user_url fill_in 'Email', :with => "testing@email.com" fill_in 'Password...
25.277778
113
0.674725
fffbd64aab66fee7924984f981ae5750fa9a7157
903
=begin #Selling Partner API for Merchant Fulfillment #The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services. OpenAPI spec version: v0 Generated by: https://github.com/swagger-api/swagger-cod...
32.25
182
0.760797
7a41d259f7e8b778aa4d495c5fd0cb84693a2f15
233
module Admin::ResourcesHelper def show_thumbnail(image) image.create_thumbnail "<img class='tumb' src='#{this_blog.base_url}/files/thumb_#{image.filename}' alt='#{this_blog.base_url}/files/#{image.filename}' />" end end
29.125
136
0.725322
7a5279cc99bea83bbd8b847fbe1c2f73c6f33186
239
Rails.application.routes.draw do get 'user/new' root 'static_pages#home' get '/help', to: 'static_pages#help' get '/about', to: 'static_pages#about' get '/contact', to: 'static_pages#contact' get '/signup', to: 'user#new' end
23.9
44
0.677824
b9580d81171c1bbbb42738c52f697c7133dc9297
2,618
# frozen_string_literal: true require 'securerandom' module QA module Resource class User < Base attr_reader :unique_id attr_writer :username, :password attr_accessor :provider, :extern_uid attribute :name attribute :email def initialize @unique_id = SecureRandom.he...
22.376068
107
0.560351
9102804055a3bb317c8e0dc51e94d7f0f7b09607
1,246
# -*- coding: utf-8 -*- require 'helper' class TestRegressionChartAxis34 < Test::Unit::TestCase def setup setup_dir_var end def teardown File.delete(@xlsx) if File.exist?(@xlsx) end def test_chart_axis34 @xlsx = 'chart_axis34.xlsx' workbook = WriteXLSX.new(@xlsx) worksheet = workbo...
27.688889
80
0.547352
bfe96d203004a76b8b0565674b1480bb595b1b55
2,820
# -*- encoding: utf-8 -*- # stub: dnsruby 1.61.9 ruby lib Gem::Specification.new do |s| s.name = "dnsruby".freeze s.version = "1.61.9" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "bug_tracker_uri" => "https://github.com/alexdali...
57.55102
411
0.692199
611f50d9e5606b2fec4c9461b6fed98471474e5f
3,211
# frozen_string_literal: true require 'test_helper' class IntegrationTest < Test::Unit::TestCase def setup @address1 = K8sInternalLb::Address.new ip: '1.2.3.4' @address2 = K8sInternalLb::Address.new ip: '2.3.4.5' @port1 = K8sInternalLb::Port.new name: 'http', port: 80 @port2 = K8sInternalLb::Port.ne...
35.285714
134
0.554656
87be5c1131bbac6715b0759ee3343e94b8e62c44
2,191
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ResourceGraph::Mgmt::V2019_04_01 module Models # # Display metadata associated with the operation. # class OperationDisplay ...
27.3875
74
0.507074
7a2d596b0d7f402657ae5c423b5f4fd22c3ce7b8
536
module Mobility module Backends =begin Stores translations as hash on Postgres hstore column. ==Backend Options ===+column_prefix+ and +column_suffix+ Prefix and suffix to add to attribute name to generate hstore column name. @see Mobility::Backends::ActiveRecord::Hstore @see Mobility::Backends::Sequel::Hstore ...
20.615385
99
0.766791
033ec82c99c78bcd8ac6b2a9d52b0fdbd47aeb67
1,241
require_relative '../ticking_away_test' require 'json' class TickingAway::JSONFileStorageTest < TickingAwayTest def setup @filename = 'some_test_file.json' clear_file @storage = TickingAway::JSONFileStorage.new(@filename) end def test_increment_stat @storage.increment_stat('America/Los_Angeles'...
22.160714
58
0.713135
798a301ceb480a6a6f77ecfd0b70c010d08de4d2
1,529
class TreeBuilderIsoDatastores < TreeBuilder has_kids_for IsoDatastore, [:x_get_tree_iso_datastore_kids] private def tree_init_options(_tree_name) {:leaf => "IsoDatastore"} end def set_locals_for_render locals = super locals.merge!(:autoload => true) end def root_options { :title...
27.8
83
0.650752
bb894acd51eeb2463715b42d6eb3a1c783f60640
245
require "mongoid" require "mongoid_acts_as_tree" class OrderedCategory include Mongoid::Document include Mongoid::Acts::Tree field :name, :type => String field :value, :type => Integer acts_as_tree :order => [['value', 'asc']] end
17.5
43
0.706122
1a4de10c8c15e97eb04dae92420b61273d6a80d8
373
module PullReview class GoToFile def self.call(current_line_number) @current_line_number = current_line_number diff_map_location = DiffMap.loaded[current_line_number] unless diff_map_location Vim.command "echo 'Not on a diff line'" return end Vim.command "vsplit #{...
21.941176
62
0.689008
9143266b845006f7e62dedf54e903af0a70c707c
1,737
require 'rubygems' require 'selenium-webdriver' require 'test/unit' require File.join(File.dirname(__FILE__), 'test_data') class ProductValidationTests < Test::Unit::TestCase def setup @selenium = Selenium::WebDriver.for(:firefox) end def teardown @selenium.quit end def test_all_pr...
31.017857
115
0.684514
21ba5d601980a920367bd8c021fccde849f8f0c4
508
cask "accurics" do version "1.0.30" sha256 "b6cb02513aca9fec505930759e50e9c7b97c0267534e73a6031ef891ce91d49c" url "https://downloads.accurics.com/cli/#{version}/accurics-cli.dmg", user_agent: :fake name "Accurics CLI" desc "Security and compliance for Infrastructure as Code" homepage "https://www.acc...
25.4
75
0.734252
ff3c9e3da8fbfe9bee2d2a2ae46842c0d97e35b1
512
require_relative '../serverspec_helper' describe 'Docker image run' do it 'installs PHP version 5.6' do expect(command('php -v').stdout).to match(/^PHP 5\.6/) end describe package('apache2') do it { should be_installed } end describe process('apache2') do it { should be_running } end descr...
21.333333
79
0.662109
bb5d6aa6f320b038adc5cc1b60c30abaafe16503
1,997
module Seek module Ontologies class OntologyClass prepend OntologyClassExtensionWithSuggestedType attr_reader :uri, :description, :label, :subclasses, :parents, :term_type alias children subclasses def initialize(uri, label = nil, description = nil, subclasses = [], parents = [], term_t...
28.942029
126
0.607912
b9e7813fc14b80ed7408299cc53d3fd1501cb996
87
on(master, oregano('resource', 'service', master['oreganoservice'], "ensure=running"))
43.5
86
0.724138
ab437d3347bc1d90122533706af462bcb4647647
257
require_relative 'node.rb' class DabNodeBlockReference < DabNode def initialize(target) super() @target = target insert(@target.identifier) end def identifier self[0] end def real_identifier identifier.extra_value end end
14.277778
37
0.708171
28ce34f8a44ba04eea7cf92b46826938b3b14d9a
310
class Ebisu::Paragraph::ImageButtonDecorator < Ebisu::ParagraphDecorator delegate_all def content h.link_to(object.link_to) do h.content_tag(:div, style: 'text-align: center;') do h.content_tag(:img, '', {class: "", src: object.content.url, alt: object.alt}) end end end end
25.833333
86
0.667742
1d0ad3d2950bff51f74b5aeff50eac1fa9a9b612
1,122
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "active_record/readonly_statement/version" Gem::Specification.new do |spec| spec.name = "activerecord-readonly_statement" spec.version = ActiveRecord::ReadonlyStatement::VERSION spec.authors...
38.689655
99
0.686275
3851a151367f060117cdef152616b4d0188b53b4
822
Mailboxer.setup do |config| #Configures if you application uses or not email sending for Notifications and Messages config.uses_emails = true #Configures the default from for emails sent for Messages and Notifications config.default_from = "ZweiDesign <contact@zweidesign.co>" # config.notification_mailer =...
32.88
89
0.783455
e2f933c492dba42f0a4c9f7a6248b53a389ad50e
2,788
############################################ # test_colgroup.rb # # Test suite for the Table::ColGroup class ############################################ require 'test-unit' require 'html/table' include HTML class TC_HTML_Table_ColGroup < Test::Unit::TestCase def setup @cgroup = Table::ColGroup.new @col = Ta...
30.977778
77
0.671808
e91c27a0eea3024a85e190dc83805c965eabcd02
1,056
# frozen_string_literal: true # ## Schema Information # # Table name: `oauth_applications` # # ### Columns # # Name | Type | Attributes # ------------------- | ------------------ | --------------------------- # **`id`** | `uuid` | `not null, primary key` # **`confide...
32
72
0.425189
1ab0ad7aa542a02df4415beb016d0f3d142da7e7
3,656
require 'optparse' require 'rubygems' #require 'bundler/setup' require 'nokogiri' require 'vdoc' require 'org_mode' require 'drop_view' module Vdoc2Org VERSION = '11.8.23' class Main def initialize @exit_code = 0 end attr_accessor :window, :quit_button, :import_button, :drop_view ...
23.435897
91
0.530635
18ea8a78fa133ca61a5253e6209e774c48da68b8
1,524
# frozen_string_literal: true # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
37.170732
79
0.788714
622a7d91b017f85dba124bd9d1597c1004ab1032
5,636
require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') require 'json' describe "Analytical::Modules::Mixpanel" do before(:each) do @parent = mock('api', :options=>{:google=>{:js_url_key=>'abc'}}) end describe 'on initialize' do it 'should set the command_location' do a = Analytical...
49.008696
146
0.637331
1861e6cf3e25ac539c97e47449ca2824d95fd6ae
143
class AddInvitationUrlToOnboarding < ActiveRecord::Migration[6.0] def change add_column :onboardings, :invitation_url, :string end end
23.833333
65
0.783217
b97f24c5ad1d936135b5657dc5bbf24ef83ea486
145
require "bunto" require_relative "bunto-relative-links/generator" require_relative "bunto-relative-links/context" module BuntoRelativeLinks end
20.714286
49
0.848276
5df913a4ea477f7504068bca7ee29ccbd88cdf82
45
module YtDataChecker VERSION = "0.1.0" end
11.25
20
0.711111
b9a476ab6fa9184be61d6cfca0c5f4f7584cc413
128
module Missindex class Railtie < ::Rails::Railtie rake_tasks do load 'tasks/missindex_tasks.rake' end end end
16
39
0.6875
396dedc4c73483b37a06490c95e6a295a7f708d7
555
require 'gitomator/classroom/auto_marker/config' module Gitomator module Classroom module AutoMarker module Maven class AutoMarkerConfig < Gitomator::Classroom::AutoMarker::Config attr_accessor :auto_marker_source_repo def initialize(config_obj) super(config_obj...
19.821429
76
0.645045
11490518ced76017b0939cb151b66968cf4b432a
357
#encoding: utf-8 require_relative '../ruby_tool/ruby_tools' def method_with_2_arguments(x, y) dump_object(x) dump_object(y) end def print_all(**args) # Note: args is a hash dump_object(args) # Note: expand *args as [:x, 1], [:y, 2] method_with_2_arguments *args # Note: **args also a hash dump_objec...
16.227273
42
0.680672
bf431da2d463db44af055c7927c15f855b8787c6
717
StripeEvent.configure do |events| events.subscribe 'charge.failed' do |event| stripe_id = event.data.object['customer'] subscription = ::Subscription.find_by_stripe_id(stripe_id) subscription.charge_failed end events.subscribe 'invoice.payment_succeeded' do |event| stripe_id = event.data...
32.590909
62
0.737796
e828fd3b8e219482ab3a9d66449fcc01ef56c93f
938
ENV['GEM_ENV'] = 'test' require 'coveralls' require 'pry' require 'simplecov' require 'support/logistic_reverse_helper' require 'support/fixture_helper' require 'webmock/rspec' Coveralls.wear! File.expand_path(File.dirname(File.dirname(__FILE__))) SimpleCov.start do add_filter "/spec/" end require 'correios_sigep'...
23.45
76
0.706823
6a33655c20fdea55d8d7a40e23ae92447b5cdcdf
1,926
execute "extract-chruby" do command "tar xzf /tmp/src/chruby-0.3.9.tar.gz && cd chruby-0.3.9 && make install" cwd "/tmp/src" action :nothing end remote_file "/tmp/src/chruby-0.3.9.tar.gz" do source "https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz" owner "root" group "root" mode '0644' action...
26.383562
102
0.687435
117bb39ac588095953f6e342afecc40baa9dcc8f
1,087
class Staticcheck < Formula desc "State of the art linter for the Go programming language" homepage "https://staticcheck.io/" url "https://github.com/dominikh/go-tools/archive/2020.1.6.tar.gz" sha256 "da1dd86ac97ca8864dbed6343fd38c3bbcf83f7a1a4526e56337452698b27c95" license "MIT" head "https://github.com/do...
28.605263
93
0.712971
acf0e2274983fa4cd7e923be47b4429b5959baaa
407
module ApplicationHelper def is_controller_and_action(c, a = nil) if a == nil controller_name == c else controller_name == c && action_name == a end end def controller_name controller.controller_name end def action_name controller.action_name end def current_path ...
15.653846
46
0.648649
bf24ee346936fdacc9bf519d4c5e0a8caca83e05
1,420
class GraphqlController < ApplicationController def execute render json: execute_query rescue StandardError => e raise e unless Rails.env.development? handle_error_in_development(e) end private def execute_query ApplicationSchema.execute( params[:query], variables: prepare_variab...
22.903226
82
0.692958
03345f2b2ef3dffa0cb3b7ccc705306071af4411
2,569
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ServiceFabric::V7_0_0_42 module Models # # Represents a scaling mechanism for adding or removing named partitions of # a statele...
29.528736
90
0.55508
1c8c0880285c8e8704d28faad541a747edc70b7b
5,339
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v3/common/simulation.proto require 'google/protobuf' require 'google/protobuf/wrappers_pb' require 'google/api/annotations_pb' Google::Protobuf::DescriptorPool.generated_pool.build do add_file("google/ads/googleads/v3/common/s...
64.325301
173
0.761379
286f116d4fc2e9ae86b846beca7084f1e5c0c231
659
# encoding: utf-8 # # This file is part of the bovem gem. Copyright (C) 2013 and above Shogun <shogun@cowtech.it>. # Licensed under the MIT license, which can be found at https://choosealicense.com/licenses/mit. # require "optparse" require "prettyprint" require "logger" require "open4" require "find" require "lazier"...
24.407407
96
0.76176
39133c00e754d6197e635f77506a08b804c3d571
940
class Libbladerf < Formula desc "USB 3.0 Superspeed Software Defined Radio Source" homepage "https://nuand.com/" url "https://github.com/Nuand/bladeRF.git", :tag => "2019.07", :revision => "991bba2f9c4d000f000077cc465878d303417e26" head "https://github.com/Nuand/bladeRF.git" bottle do sha256...
30.322581
93
0.717021
edd36e969df68d0864ff2803cc7761b2a1ac9897
1,580
# frozen_string_literal: true require_relative '../types' module Xumlidot module Types # representation for class information class KlassDefinition # TODO: I think the name could be a constant rather than an array of # constants class Name < Array def name map(&:name).fla...
25.483871
86
0.589873
bf2c9c27c91f0d008828091f2922c8e553c04d05
1,302
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) require File.expand_path(File.join(File.dirname(__FILE__), 'shared_spec_node')) require 'stringio' describe CopyNode do it_should_behave_like AllStandardNodes before(:each) do @context = mock "Context" @source_path = mock "S...
29.590909
88
0.711214
d582d328bfbc65f884631eea3642eaa5a3961427
9,138
#-- # =============================================================================== # Copyright (c) 2005,2006,2007,2008 Christopher Kleckner # All rights reserved # # This file is part of the Rio library for ruby. # # Rio is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
25.960227
95
0.486649
bb8c18988c8165bc46997e44a8592ac445f0ee9e
773
# Example of class overloading: # Create a rectangle class that represents a rectangular shape on a grid. # Two different ways of instantiating. # How to do this with Ruby having a single initialize method? class Rectangle def initialize(*args) if args.size < 2 || args.size > 3 # !(2..3).include? args.size pu...
29.730769
75
0.711514
618514526168571759e3562346d76925c8eb4bb3
479
module ApplicationHelper include Pagy::Frontend def link_to_add_fields(name, form, association, **args) new_object = form.object.send(association).klass.new id = new_object.object_id fields = form.fields_for(association, new_object, child_index: id) do |builder| render(association.to_s.singularize...
39.916667
108
0.699374
e9cce7cc7001229251f2e022f83db65297786a75
218
# frozen_string_literal: true # Copyright The OpenTelemetry Authors # # SPDX-License-Identifier: Apache-2.0 module OpenTelemetry module Instrumentation module Sidekiq VERSION = '0.18.0' end end end
15.571429
37
0.729358
3939554617bcb870516fd5deff385a37212d8a05
672
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
29.217391
74
0.741071
bf5fdf88f5397b40f0666fafc0f8cd84bcaa27da
14,736
class Thor module Shell class Basic DEFAULT_TERMINAL_WIDTH = 80 attr_accessor :base attr_reader :padding # Initialize base, mute and padding to nil. # def initialize #:nodoc: @base = nil @mute = false @padding = 0 @always_force = false ...
29.769697
115
0.553542
ed6ef1488fe4399822317cee5997c1f43f4106ff
3,110
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
36.588235
95
0.711254
03f449bf118561876e6fa77df10ba30b223d7e40
99
puts 'Ruby is awesome!!!!!1111!!!!1!!!1!' puts 2 + 5 puts 24 * 10 puts 'Hi ' + 'there!' puts 2 + 2
16.5
41
0.545455
ac95cf4fbed4d41e209087f23a74abf627812442
1,827
#-- encoding: UTF-8 #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2014 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject,...
32.052632
91
0.735085
ac8565ee6cf032eb61ee0f0cf8086a6af6708b09
1,583
module Logging module Appenders # call-seq: # Appenders[name] # # Returns the appender instance stored in the appender hash under the # key _name_, or +nil+ if no appender has been created using that name. # def []( name ) @appenders[name] end # call-seq: # Appenders[name]...
24.353846
75
0.643714
03556067e26c5a0e1f21668c2415075c1e7d43c9
5,468
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2019_09_01 module Models # # Information about packet capture session. # class PacketCaptureResult in...
31.976608
78
0.500183
f85cf6211fd5122a17c9251e8282bd7ceeaca132
3,324
%w(text memo image markdown image_gallery email phone url).each do |name| CB::Core::ContentType.find_or_create_by(name: name, title: name, composite: false, by_platform: true) end users_data = [ {email: 'nico.nardone@gmail.com', nest_name: 'nna', admin: true}, {email: 'adrien.thery@gmail.com', nes...
60.436364
143
0.481949
1c365957121ea1d9d5a72273fa92b6384bcfaae2
310
module VagrantPlugins module OpenStack module Action class MessageSnapshotDone def initialize(app, env) @app = app end def call(env) env[:ui].info(I18n.t("vagrant_openstack.snapshot_done")) @app.call(env) end end end end end
18.235294
66
0.574194
18535cf3ae26e6f8508bbdd968e6605cd3d5581d
224
class CreateEvents < ActiveRecord::Migration[6.1] def change create_table :events do |t| t.string :name t.date :date t.string :location t.text :description t.timestamps end end end
17.230769
49
0.629464
ab9392d2fb601b396eda0c5844cb6b849619cd1d
42
require 'ci/reporter/rake/spinach_loader'
21
41
0.833333
bf73e91bf60103540ffec80c864b88accfc93014
943
require_relative '../../../../spec_helper' describe 'monitoring::checks::mirror', :type => :class do let(:pre_condition) { 'icinga::host { "dummy.host": }' } let(:facts) {{ :fqdn => "dummy.host", :cache_bust => Time.now, :ipaddress => '10.10.10.10', :fqdn_short => 'fakehost-1.managemen...
30.419355
89
0.664899
f85ad9a18be7a565fdbe04ddd37874545f4db318
480
cask "banktivity" do version "8.0.5" sha256 "c2ab4fd9124c921604e9f867828c5fab8fbc3e267ebec6e5ff79c1a8fbc07f41" url "https://www.iggsoft.com/banktivity/Banktivity#{version}.dmg", verified: "iggsoft.com/" appcast "https://www.iggsoft.com/banktivity/banktivity-versions-feed.json" name "Banktivity" desc ...
30
76
0.747917
33dc2349d7506e89bd73f0af568c896307f4451e
65
module CamaSubscriber class Engine < ::Rails::Engine end end
13
32
0.738462
7a4c899581dfd52eb02adf8b8b7d7a533ef72e26
39
module Postage VERSION = "0.1.0" end
9.75
19
0.666667