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
ff0a8d17c613e2aeb1b3803bb120045c23170bf7
807
class AddOpenCasesReports < ActiveRecord::DataMigration def up rt = ReportType.find_by(abbr: 'R901') rt = ReportType.new if rt.nil? rt.update( abbr: 'R901', full_name: 'Open cases report for Offender Sar', class_name: 'Stats::R901OffenderSarCasesReport', custom_report: fals...
26.032258
56
0.592317
b937d152ccbbb0e98308f24a064ec9f646d1b110
267
require 'finacle_api/common/serializable_object' module FinacleApi module LoanAcctInq module ResponseEntity class InstallFreq < SerializableObject attr_accessor :cal, :type, :start_dt, :week_day, :week_num, :hol_stat end end end end
22.25
77
0.726592
1cd5ec370966b50a2cba304c60061809f68dfc3a
326
# frozen_string_literal: true require 'sequel' require 'real_world/auth/ports/repository/sql' RSpec.shared_context 'auth ports' do let(:repository) do RealWorld::Auth::Ports::Repository::SQL.new(Sequel.connect('sqlite:memory'), unsafe: true) end let(:ports) do { repository: repository, } en...
19.176471
94
0.705521
ffbcb2d8d9e37c6de0542906b11dfe77725eb262
6,188
=begin #UltraCart Rest API V2 #UltraCart REST API Version 2 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.15-SNAPSHOT =end require 'date' module UltracartClient class EmailCommseqEmailResponse attr_acce...
27.873874
107
0.606012
1c743de57bdefd2e2141b01463573bf9b3981469
284
module Fog module Rackspace class LoadBalancers class Real def list_algorithms request( :expects => 200, :method => 'GET', :path => 'loadbalancers/algorithms' ) end end end end end
17.75
51
0.482394
bf23984e78b32b91aa3404fe4fc65e8825f24438
159
class Forms::TagComponentPreview < ViewComponent::Preview def default end def disabled end def with_remove_button end def clickable end end
11.357143
57
0.742138
ed557649a8c09846bf00a5ac9b1a3eb2ed3af35f
2,580
class Hash # Returns new hash with given arguments. # If an array is provided, it will be flattened once. Multi-level arrays are not supported. # This method is basically a helper to support different return values of Hash#select: # Ruby 1.8.7 returns an array, Ruby 1.9.2 returns a hash. # def self.build(a...
25.294118
111
0.604264
389cc243037c8b99d47e9527dba36e2544f3c7fa
2,248
require 'linguist/blob_helper' require 'linguist/language' require 'rugged' module Linguist class LazyBlob GIT_ATTR = ['linguist-documentation', 'linguist-language', 'linguist-vendored', 'linguist-generated', 'linguist-detectable'] GIT_ATTR_OPT...
19.893805
84
0.603648
f8af1f1ceccef5619ef33387410b9b6790f8d74a
48,633
# Copyright 2015 Google Inc. # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
63.822835
173
0.687393
f7b6edc62a0879c7741797ff8470957c28245c8c
4,835
# # Firm details FormPanel implementation # # - author: Steve A. # - vers. : 3.05.05.20131002 # class FirmDetails < Netzke::Basepack::FormPanel model 'Firm' js_properties( :prevent_header => true, :track_reset_on_load => false, :border => false ) def configuration super.merge( :min_width...
46.047619
141
0.513754
1d8d93de122129b19bc3002b8d3c104c78e4bc8c
1,009
module Mincer module Processors module PgSearch class SearchStatement attr_accessor :columns, :options, :pattern alias_method :terms, :pattern def initialize(columns, options = {}) @columns, @options = columns, ::ActiveSupport::HashWithIndifferentAccess.new(options) ...
28.828571
128
0.623389
38beb0fc08f99175a363dc3bde71689182ce4b77
122
Facter.add('rvm_installed') do rvm_binary = '/usr/local/rvm/bin/rvm' setcode do File.exist? rvm_binary end end
15.25
39
0.696721
623376d3e688b1390e44cacf19eddb9f73268f26
2,371
require "test_helper" require 'base64' class ObjectTest < Rugged::TestCase include Rugged::RepositoryAccess def test_lookup_can_lookup_any_object_type blob = Rugged::Object.lookup(@repo, "fa49b077972391ad58037050f2a75f74e3671e92") assert_instance_of Rugged::Blob, blob commit = Rugged::Object.lookup(@...
32.930556
85
0.772248
f73b8bfcf46aa7df60c8bc9945d90f4d2e6cce7c
2,433
require 'rubygems' require 'sinatra' require 'data_mapper' require 'builder' require 'rack-flash' #require 'sinatra-redi' enable :sessions use Rack::Flash, :sweep => true SITE_TITLE = "Recall" SITE_DESCRIPTION = "'cause you're too busy to remember" DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/recall.db") class ...
21.156522
67
0.63954
33909d762f90fce9c5220c3621b3612f78b7fb34
4,431
# 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::V6_5_0_36 module Models # # Represents health evaluation for applications of a particular application # type. The...
33.315789
79
0.546603
b9884937ecdf3da2be6bccfd8465d73b673ed190
287
class User < ActiveRecord::Base # Include default devise modules. Others available are: # :confirmable, :lockable, :registerable, :timeoutable and :omniauthable has_many :posts devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable end
35.875
74
0.752613
7a6b9b71a521f2e77203fa856817de4bc1e54565
2,914
require 'rails_helper' RSpec.describe SessionsController, type: :controller do # for documentation on OmniAuth Test mode visit https://github.com/omniauth/omniauth/wiki/Integration-Testing before :each do OmniAuth.config.test_mode = true @user_hash = { provider: 'google_oauth2'...
38.342105
133
0.620796
6220ee87b5cac191397a7e03b3e2501d1a378081
1,285
# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE Gem::Specification.new do |spec| spec.name = 'aws-sdk-kinesisanaly...
40.15625
138
0.676265
26a39c8792dbc2be44986ffec28f5d40a9b21011
174
Before do set_env('MSF_DATBASE_CONFIG', Rails.configuration.paths['config/database'].existent.first) set_env('RAILS_ENV', 'test') @aruba_timeout_seconds = 4.minutes end
34.8
92
0.775862
2174939f02ec481d09df5d01b0a2544e24cc165a
127
# frozen_string_literal: true module Libvirt class NodeInfo < BaseInfo struct_class FFI::Host::NodeInfoStruct end end
15.875
42
0.771654
1da47674bc7bdf4e7fd58e9ba8132d2259f3145f
165
class CreateBulletins < ActiveRecord::Migration[5.1] def change create_table :bulletins do |t| t.string :title # 제목 t.timestamps end end end
18.333333
52
0.666667
1cb1b1937c8324417ff6183d8fbbb68a0b5e6cfd
132
module OpenStax::Swagger class ApplicationController < ActionController::Base protect_from_forgery with: :exception end end
22
54
0.80303
1d062b95a47348f9bc4b45f75f247c4d0d41e0e7
152
# frozen_string_literal: true class Server < Sinatra::Base set :root, File.join(File.dirname(__FILE__), '..') get '/' do erb :index end end
15.2
52
0.657895
38a7c067476ed10cdb1d3f2ea5f85f9a89ad3f6b
905
# # Author:: Adam Jacob (<adam@opscode.com>) # Author:: Christopher Brown (<cb@opscode.com>) # Copyright:: 2008-2016, Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
30.166667
74
0.735912
4a329a94295b294c392fac2515854e46b7741768
178
class Author attr_accessor :name, :biography def initialize(name, biography) @name = name @biography = biography end def to_s "#{@name}. #{@biography}" end end
12.714286
33
0.662921
61d18d07926d310c37744d0b3313f34f2311284c
7,673
require 'roby/test/self' class TC_TransactionsProxy < Minitest::Test attr_reader :transaction def setup super @transaction = Roby::Transaction.new(plan) end def teardown transaction.discard_transaction super end def test_wrapping_free_objects task = Task...
32.239496
168
0.630914
2140f8c95f22a95f2f7e1ded58219f34b5973f8e
5,359
# frozen_string_literal: false module LicenseFinder # Super-class for the different package managers # (Bundler, NPM, Pip, etc.) # # For guidance on adding a new package manager use the shared behavior # # it_behaves_like "a PackageManager" # # Additional guidelines are: # # - implement #curren...
31.339181
181
0.713566
b9865f85c937499d8b0a54de0c9c638d20228dcd
6,854
# == Schema Information # Schema version: 20101101011500 # # Table name: recommendations # # id :integer(4) not null, primary key # progress :integer(4) # recommendation :integer(4) # checklist_id :integer(4) # user_id ...
36.457447
323
0.681938
012157af26bab0e6617be03cf992642737da27eb
3,292
# -*- encoding: utf-8 -*- # stub: mime-types-data 3.2016.0521 ruby lib Gem::Specification.new do |s| s.name = "mime-types-data".freeze s.version = "3.2016.0521" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.a...
53.967213
314
0.6613
4ab25aeb574c31b0c165acc636cb4311c15b2290
802
require File.dirname(__FILE__) + '/helper' class TestActor < Test::Unit::TestCase def setup end # from_string def test_from_string_should_separate_name_and_email a = Actor.from_string("Tom Werner <tom@example.com>") assert_equal "Tom Werner", a.name assert_equal "tom@example.com", a.email end ...
22.277778
77
0.709476
26d9a1fd299bf65be68cd1d9d839db2a363d12aa
2,066
module ApplicationHelper def default_meta_tags { site: 'BooQs Sub', title: t('layouts.title'), reverse: true, charset: 'utf-8', description: t('layouts.description'), keywords: t('layouts.keywords'), canonical: request.original_url, separator: '|', icon: [ ...
24.595238
107
0.60213
113cb5a1a987ef782d17456bfe68186d42d9576a
284
cask :v1 => 'pastebotsync-pane' do version :latest sha256 :no_check url 'http://tapbots.net/pastebot/PastebotSync.dmg' homepage 'http://tapbots.com/software/pastebot/' license :unknown # todo: improve this machine-generated value prefpane 'PastebotSync.prefPane' end
25.818182
66
0.739437
5df970d59f3c67131d52bb414689155da6290ace
2,731
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: MIT # DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN. # appliance - The vCenter Server Appliance is a preconfigured Linux-based virtual machine optimized for running vCenter Server and associated services. re...
35.467532
169
0.688759
e9480b0efa6b011da1a5487e3e4e8c99fee7a038
164
class Permission < ActiveRecord::Base has_and_belongs_to_many :members, join_table: :members_permissions belongs_to :resource, polymorphic: true scopify end
23.428571
68
0.810976
611c37c1e5508718a2d8e8e516d1b14f06ea8f67
347
require_relative "operations_base" class Chef module Provisioning module GoogleDriver module Client # Wraps a GlobalOperations service of the GCE API. class GlobalOperations < OperationsBase def operations_service compute.global_operations end end ...
18.263158
58
0.651297
ac52c917d09d960f61b83aadcda6b463b7aead8f
1,836
require 'spec_helper_integration' module Doorkeeper describe ApplicationsController do context 'when admin is not authenticated' do before do allow(Doorkeeper.configuration).to receive(:authenticate_admin).and_return(proc do redirect_to main_app.root_url end) end it '...
30.6
100
0.635621
2848740e3282c7cf4f41d786ad89683e21805e9c
176
Date::DATE_FORMATS.merge!( :min => '%d %b %Y', :comment => '%b %d %Y at %I:%M %p' ) Time::DATE_FORMATS.merge!( :min => '%d %b %Y', :comment => '%b %d %Y at %I:%M %p' )
19.555556
36
0.477273
5d066bc4f22b59038d72a263a213cb5fe836f5dc
2,495
=begin #Datadog API V1 Collection #Collection of all Datadog Public endpoints. The version of the OpenAPI document: 1.0 Contact: support@datadoghq.com Generated by: https://openapi-generator.tech Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. This product...
31.1875
107
0.735872
1caa76045034e63f9b7d50b5801f24629062bae3
1,146
cask 'karabiner-elements' do version '0.90.67' sha256 '06c909e0f696bc5bcdc8a96b4135ba44e735066ae0a406bc6d569ef5dd65a7f7' url "https://pqrs.org/osx/karabiner/files/Karabiner-Elements-#{version}.dmg" appcast 'https://pqrs.org/osx/karabiner/files/karabiner-elements-appcast.xml', checkpoint: '3600c2e6409...
39.517241
107
0.629145
7956bfbe07dc7c87727c4d379569e9117dbc42b8
588
# frozen_string_literal: true Gem::Specification.new do |spec| spec.name = "theme" spec.version = "0.1.0" spec.authors = ["tcbutler320"] spec.email = ["tcbutler320@gmail.com"] spec.summary = "Write a short summary, because Rubygems requires one." spec.homepage = "ht...
34.588235
145
0.627551
1a508c8c483472854fb202efc41b441f1d75e70c
606
Pod::Spec.new do |s| s.name = 'WKVerticalScrollBar' s.version = '0.3.1' s.license = 'MIT' s.platform = :ios s.summary = 'A traditional-style scrollbar for iOS that integrates with existing UIScrollView or UIScrollView subclasses.' s.homepage = 'https://github.com/litl/WKVerti...
37.875
129
0.643564
875800c68a44d23d1a31139e1e82bbeb41e094e5
70
class CustomersController < ApplicationController def new end end
14
49
0.814286
61f95febce8a78d66362f2a487e82caae1c914cc
1,158
# # Be sure to run `pod lib lint ASUncaughtExce.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'ASUn...
31.297297
105
0.597582
e8239db8680043a87094f9bcf2b8e6e107709187
1,020
describe MagicBell do let(:api_key) { "dummy_api_key" } let(:api_secret) { "dummy_api_secret" } before do MagicBell.configure do |config| config.api_key = api_key config.api_secret = api_secret end end after do MagicBell.reset_config end describe ".configure" do it "configur...
25.5
137
0.702941
08c049ea840789068aaa0fb4f099ce24f05f7f0e
274
class CreateClients < ActiveRecord::Migration[5.1] def change create_table :clients do |t| t.text :name t.text :phone t.text :datestamp t.text :barber t.text :color t.timestamps #создаёт created_at и updated_at end end end
17.125
51
0.635036
e83fef06b3af01d2339f14fa571242560dc6745a
400
Sequel.migration do up do create_table :users do primary_key :id String :name, :null => true String :nickname, :null => true String :twitter_user, :null => true String :facebook_user, :null => true String :image, :null => true end add_index :users, :twitter_user ad...
20
42
0.6275
bf9ff922c05255377947087ec97ac1283c7f5520
3,487
# frozen_string_literal: true require 'spec_helper' describe Gitlab::Ci::Pipeline::Chain::Build do set(:project) { create(:project, :repository) } set(:user) { create(:user, developer_projects: [project]) } let(:pipeline) { Ci::Pipeline.new } let(:variables_attributes) do [{ key: 'first', secret_value: '...
26.416667
95
0.667909
0337320ce1e291e98e8f4f5276fb654bf3db5b8c
1,516
class ScenariosController < ApplicationController def index @plan = Plan.find(params[:plan_id]) respond_to do |format| format.html end end def show @scenario = Scenario.find(params[:id]) respond_to do |format| format.js end end def create @plan = Plan.find(params[:...
18.487805
65
0.639182
ed801569d4b6e3618cc73a72b7d027f6db57d26b
1,419
# coding: UTF-8 require 'pathname' require 'sprockets' require 'execjs' require 'haml_coffee_assets/global_context' require 'haml_coffee_assets/configuration' require 'haml_coffee_assets/compiler' require 'haml_coffee_assets/version' require 'haml_coffee_assets/transformer' if defined?(Rails) && Rails.version >= '...
24.894737
124
0.736434
0870c991474f4f41f0c67c6743fb10a642273f8a
3,340
# frozen_string_literal: true # This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: # # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }]) ...
35.913978
103
0.601198
1c0d012614904da3f6d669124c4b9c2051132677
1,513
class Task attr_reader :description, :list_id, :due_date def initialize(attributes={}) @description = attributes.fetch(:description, "") @list_id = attributes.fetch(:list_id).to_i @due_date = attributes.fetch(:due_date) @complete = attributes.fetch(:complete) end def ==(another_task) descr...
29.666667
147
0.668209
331970970a91531d779cf0b53aaa9fcecf3972d9
365
cask 'hostbuddy' do version '2.2.4,20_13' sha256 '613c9eb8972d2bbfb53fda0b16b033d6d668e4de9f8667ecbe1bf0337dcab41a' url "https://download.clickontyler.com/hostbuddy/hostbuddy#{version.after_comma}.zip" appcast 'https://shine.clickontyler.com/appcast.php?id=41' name 'Hostbuddy' homepage 'https://clickontyle...
30.416667
87
0.778082
e8a0194d47061c8f7af67394b045ebd3f1e1bcd8
305
array = [1,3,4,5] def calc(so_far, sum, array, d) puts "#{so_far}, #{sum}, #{array}" return so_far if sum == d return false if array.empty? return calc(so_far.dup << array.first, sum + array.first, array.drop(1), d) || calc(so_far.dup, sum, array.drop(1), d) end puts calc([], 0, array, 11).to_s
30.5
120
0.632787
e86b8cc2b2a4508e299f82ced700b51a33c1c170
1,200
require 'minitest/spec' require 'minitest/autorun' require 'open3' require_relative '../support/nat_binary' class ReplWrapper def initialize(cmd) @in, @out, @wait_thr = Open3.popen2e(*cmd) end def execute(input) @in.puts input end def out @out.read.strip end def quit @in.close end en...
19.047619
62
0.584167
33d318bf226f3f4f7985f5b1802b2cb092fc7236
4,168
# -*- encoding: utf-8; frozen_string_literal: true -*- # #-- # This file is part of HexaPDF. # # HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby # Copyright (C) 2014-2021 Thomas Leitner # # HexaPDF is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero Genera...
35.623932
99
0.664587
03f934529cd3854cd6168b5b0b15d19ae0446c0e
78,345
# frozen_string_literal: true class Nspack < Roda route 'finished_goods', 'rmd' do |r| # -------------------------------------------------------------------------- # OFFLOAD VEHICLE # -------------------------------------------------------------------------- r.on 'offload_vehicle' do interactor...
51.205882
356
0.553207
794254793ba4d5dd6efa757f9066e2e7b77465d2
1,571
# # Be sure to run `pod lib lint CHKit.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'CHKit' s.ver...
36.534884
106
0.634628
1180e0b3fe0341e0abf2b265985b726c762f06be
1,222
require 'white_list/white_list_helper' ActionView::Base.send :include, WhiteListHelper ActiveRecord::Base.send :include, WhiteListHelper ActiveRecord::Base.class_eval do include ActionView::Helpers::TagHelper, ActionView::Helpers::TextHelper, WhiteListHelper, ActionView::Helpers::UrlHelper def self.format_attri...
38.1875
122
0.718494
4ae5e83b2bf095099acaf3c64e3fd4b890da78c0
3,374
name = cookbook_name.to_s rname = recipe_name.to_s n = node[name] bin_cmd = n["bincmd"] include_recipe name n["domains"].each do |domain, _options| options = merge_options(_options, n) next if !correct_plugin?(rname, options) le_cert = Cert.new(n["archiveroot"], domain) arg_str = get_common_args(domain,...
33.74
106
0.640782
38b56d390f0d7be85c4d44677f9bb3139f071946
405
# Capture and provide convenient access to output stream content # when included in an example group module OutputCapture def self.included(target) target.before do $stdout = @out = StringIO.new $stderr = @err = StringIO.new end target.after do $stdout = STDOUT $stderr = STDERR ...
19.285714
64
0.659259
26d84f64ff32c7d9ebda5d63c0a1e2e37cefab98
1,019
# written as an example of how to implement the minimal _why wiki require 'rubygems' require 'ramaze' require 'yaml/store' require 'bluecloth' DB = YAML::Store.new('whywiki.yaml') unless defined?(DB) class WikiController < Ramaze::Controller map :/ def index redirect r(:show, 'Home') end def show page ...
21.229167
68
0.619235
ed969e9a314def964c5b205ec820f7a8fd3d68f6
545
cask 'cyberduck' do version '6.8.0.28825' sha256 '39fb2fb31838e844e5dd06f8b61606f2d753425c9943c3feeec56a11ffffaf1a' url "https://update.cyberduck.io/Cyberduck-#{version}.zip" appcast 'https://version.cyberduck.io/changelog.rss' name 'Cyberduck' homepage 'https://cyberduck.io/' auto_updates true app '...
27.25
75
0.669725
7aea138f845c390132348339164b99dce65d2cfc
578
# Write a function named mod_three which takes an array of numbers, # and return a new array consisting of their remainder when divided by three. # Exclude any numbers which are actually dividible by three. # # EXAMPLES: # mod_three [0] # => [] # mod_three [1] # => [1] # mod_three [2] # => [2] # mod_three [3] # =...
26.272727
77
0.567474
91e0a41607f625acb47cee1ea577fed8f43a9edf
1,365
## # This module requires Metasploit: http//metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'msf/core/handler/find_tag' module Metasploit3 include Msf::Payload::Stager include Msf::Payload::Windows def initialize(info = {}) super(mer...
29.673913
72
0.534799
8704f61b37261043e1c52471a6862d16da0e51f5
271
class CreateDivisionsMigration < ActiveRecord::Migration def self.up create_table :divisions do |t| t.timestamps t.integer :league_id t.string :name, :limit => 50, :null => false end end def self.down drop_table(:divisions) end end
19.357143
56
0.664207
18bc4af2ab57a95a96ef526153830fad68479967
1,111
cask 'unity-webgl-support-for-editor@2019.2.0a7' do version '2019.2.0a7,b5f63d908f8e' sha256 :no_check url "https://download.unity3d.com/download_unity/b5f63d908f8e/MacEditorTargetInstaller/UnitySetup-WebGL-Support-for-Editor-2019.2.0a7.pkg" name 'WebGL Build Support' homepage 'https://unity3d.com/unity/' ...
30.861111
140
0.714671
6299b633195cf5d2ed8d68604c3dbea4e66588c9
20,919
class PythonAT39 < Formula desc "Interpreted, interactive, object-oriented programming language" homepage "https://www.python.org/" # Keep in sync with python-tk@3.9. url "https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz" sha256 "0c5a140665436ec3dbfbb79e2dfb6d192655f26ef4a29aeffcb6d1820d716d83" l...
42.779141
168
0.664659
f7fb197ecd3a426c64de5126848b004b11e364c9
66
require_relative '../../../stdlib/test/' + File.basename(__FILE__)
66
66
0.69697
1a46123e9c2d3a0c056bfacf976bc2584796ae7d
604
readme = File.open('README.md').read.split("\n\n").map { |pr| pr.lines.map(&:strip) } version = `git tag | tail -n 1`.sub(/^v/, '') summary = readme[0].first.sub('servedir: ', '') description = readme[1].to_a.join('').gsub('`', '') Gem::Specification.new do |spec| spec.name = 'servedir' spec.version = version ...
31.789474
85
0.634106
d5ad4c69f3c56f5a91872c2c6166f86e8f11fd11
2,301
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::TNS include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner def initialize(info = {}) super...
28.7625
79
0.507605
e91073fb75f2394a5133c92577179d2e603c12b7
1,155
# Mg::Test represents something you are 'a/b testing' # # Attributes # test_type:: Symbol uniquely identifying this test (for code interaction) # title:: Title of the test (E.g. Banner text) # tally_each_serve:: Should we count each view by a user as a hit, or just first-serve to that user? # is_switch:: Are we implem...
36.09375
143
0.722944
fff9a9acf8f802625c22ec6bdd7cb560c9ae174a
6,885
class AddsFtiToProjectsEndpoint < ActiveRecord::Migration def up execute <<-SQL DROP VIEW "1".projects CASCADE; CREATE VIEW "1".projects AS SELECT p.id AS project_id, p.name AS project_name, p.headline, p.permalink, public.mode(p.*) AS mode, COALESCE(fp.state, (p.state)::text) AS state, p...
28.6875
192
0.693101
6ad66d454758f5bfee62df640ccca9b9d55e28f4
45
module TmuxConnector VERSION = "1.0.8" end
11.25
20
0.711111
e27be0baf5295e79156cbc46a8cb88d5f17ff437
738
require 'formula' class Sratom < Formula homepage 'http://drobilla.net/software/sratom/' url 'http://download.drobilla.net/sratom-0.4.6.tar.bz2' sha1 '5f7d18e4917e5a2fee6eedc6ae06aa72d47fa52a' bottle do cellar :any sha256 "9023b8427d0e4068c7ca9e9a66a18545c51af3e30fcf9566db74aacceff18d2b" => :yosemite ...
28.384615
95
0.745257
ab71f51fed5cd23cfb69ab3ba8272796ab18b9a1
174
# spec/factories/tpl_birst_soap_generic_commands FactoryGirl.define do factory :tpl_birst_soap_generic_command do command "list_spaces" argument_json "" end end
19.333333
48
0.798851
ed92b69864ab89f117c9fd9bf950556d504a0c57
127
class DropJoinTableOrdersProducts < ActiveRecord::Migration[5.2] def change drop_join_table :orders, :products end end
21.166667
64
0.779528
d59c4a6b242f7cd6cf62627bbd0cfcb7c8a4ed3c
1,787
class LdapTools def initialize @permsYaml = YAML::load_file("#{Rails.root}/config/permission_#{Rails.env}.yaml") @parametersYaml = YAML::load_file("#{Rails.root}/config/yap_parameters.yaml") end def perms(memberOf,menuName) @perms = false if memberOf.length < 0 memberOf = ['default'] e...
21.27381
85
0.567431
bbec4f593c34a42e3532383a66da41c980a2962f
373
require File.expand_path('../../../lib/migration_extensions', __FILE__) class CreateItemTypes < ActiveRecord::Migration include MigrationExtensions def change create_table :item_types do |t| t.string :name, null: false t.text :description t.hstore :attrs, default: {} t.timestamps ...
20.722222
71
0.689008
0177a8c912888e5f090be8f8ccaf40c2ba860e8a
4,479
Sequel.migration do up do create_table :link_providers do primary_key :id String :name, :null => false Boolean :shared, :null => false foreign_key :deployment_id, :deployments, :null => false, :on_delete => :cascade String :instance_group, :null => false Boolean :consumable, :n...
35.547619
154
0.610181
bbacd3468db0b0f073f6fa85985ed5b83810c406
6,480
module AdvertSelector module ApplicationHelper def advert_selector_initialize(available_placements = :all) Rails.logger.tagged('AdvertSelector') do Rails.logger.debug("AdvertSelection initialized") @advert_selector_banners_selected = [] if params[:advert_selector_force] ...
41.538462
198
0.657716
b9511cf4d2b10cbaf1fda58b58e012909163ff5d
278
require File.expand_path('../../../spec_helper', __FILE__) describe "Float#infinite?" do it "returns nil, -1, +1 when self is finite, -Infinity, +Infinity" do 1.0.infinite?.should == nil (1.0/0.0).infinite?.should == 1 (1.0/-0.0).infinite?.should == -1 end end
27.8
71
0.629496
f75be7fa388fb76c4013eec5abf8377f66162915
454
# frozen_string_literal: true RSpec.describe Mihari::DnsRecord do describe ".build_by_domain" do let(:domain) { "example.com" } it do dns_records = described_class.build_by_domain(domain) # example.com has A records and does not have CNAME records expect(dns_records.any? { |record| record...
28.375
83
0.680617
e9034e9fa9e3b0a4e5160009fe3616b161e0a584
397
# frozen_string_literal: true class CreateTriggers < ActiveRecord::Migration[4.2] def change create_table :triggers do |t| t.references :rule, index: true, null: false, foreign_key: { on_delete: :restrict, on_update: :restrict } t.text :callback, null: false t.integer :lock_versio...
24.8125
66
0.667506
acecadddc74f545e899a1572746f451c610fd44c
198
class LabzController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end
28.285714
56
0.777778
91b4ba7f205d4ab016b0d267b9317ec9d1671a05
1,447
cask "rubymine" do version "2021.1.3,211.7628.26" if Hardware::CPU.intel? sha256 "5c09ad7dbb861b58a1b2d9094b13cd4b0380f232076cf841e525d00581c45b72" url "https://download.jetbrains.com/ruby/RubyMine-#{version.before_comma}.dmg" else sha256 "e11d9e5d93e059a1582e489e4642496708f771d53e67f04e1995e6490083...
30.145833
115
0.697996
79526735e101e89c846dc92910a11a57e92d643f
1,194
class Swiftlint < Formula desc "Tool to enforce Swift style and conventions" homepage "https://github.com/realm/SwiftLint" url "https://github.com/realm/SwiftLint.git", :tag => "0.37.0", :revision => "36775cce86bb72681604592f7e41497b6959ac53" head "https://github.com/realm/SwiftLint.git" bot...
38.516129
136
0.721106
bb306860120e71a1a7076b73a640f5df7ad0a892
1,019
FactoryBot.define do factory :benefit_sponsors_organizations_issuer_profile, class: 'BenefitSponsors::Organizations::IssuerProfile' do transient do office_locations_count { 1 } assigned_site { nil } legal_name { "Blue Cross Blue Shield" } end after(:build) do |profile, evaluator| ...
35.137931
168
0.730128
f711b065ca221c25b9b65984572a4d5922a7196f
4,487
module ActionCable module Channel # Streams allow channels to route broadcastings to the subscriber. A broadcasting is an discussed elsewhere a pub/sub queue where any data # put into it is automatically sent to the clients that are connected at that time. It's purely an online queue, though. If you're not ...
41.165138
149
0.662358
111f654e9f9d6d2163b6af046ea66172b973eb2a
559
module Fog module Compute class Cloudstack class Real # List Usage Types # # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/listUsageTypes.html] def list_usage_types(*args) options = {} if args[0].is_a? Hash ...
22.36
118
0.550984
1c4dfac9447df1506aded04f7789201f63d6f4f9
429
module Select2Helper def select2(select_id, val) return if val == 'Unassigned' @hidden_select_value = find("##{select_id} option", text: val.to_s)[:value].downcase find("##{select_id} + .select2.select2-container.select2-container--default").click @results_container = find("#select2-#{select_id}-resu...
33
88
0.710956
1d1eda202021e31f1eadee312a60437dc5113589
557
Rails.application.routes.draw do post ':controller(/:action(/:id))(.:format)' get ':controller(/:action(/:id))(.:format)' get '/logout' => 'sessions#destroy', :as => 'logout' get '/auth/failure' => 'sessions#failure' post '/auth/:provider/callback' => 'sessions#create' get '/auth/:provider/callback' => 'ses...
37.133333
101
0.685817
d51ab230a376e533283dd8e4d746a166133b81c2
1,567
class GobjectIntrospection < Formula desc "Generate introspection data for GObject libraries" homepage "https://live.gnome.org/GObjectIntrospection" url "https://download.gnome.org/sources/gobject-introspection/1.54/gobject-introspection-1.54.1.tar.xz" sha256 "b88ded5e5f064ab58a93aadecd6d58db2ec9d970648534c6380...
36.44186
105
0.750479
7aa19cd63df755fa0d400faa72a80d0c9bd389eb
13,736
# # DO NOT MODIFY!!!! # This file is automatically generated by Racc 1.4.15 # from Racc grammer file "". # require 'racc/parser.rb' module Rison class Parser < Racc::Parser module_eval(<<'...end parser.y/module_eval...', 'parser.y', 75) attr_reader :source, :input def initialize(source) @source = source @inpu...
23.008375
115
0.501674
e82dbf2b73445eca14bfc3260880b38a15939d08
2,341
module ActiveRecord::Import::AbstractAdapter module InstanceMethods def next_value_for_sequence(sequence_name) %(#{sequence_name}.nextval) end def insert_many( sql, values, *args ) # :nodoc: number_of_inserts = 1 base_sql, post_sql = if sql.is_a?( String ) [sql, ''] elsif...
29.632911
115
0.665955
ed098170c65a29a31621b1d5cc9852ddd3b7ee1f
1,459
module Saml module Elements class EncryptedAttribute include Saml::Base tag "EncryptedAttribute" register_namespace "saml", Saml::SAML_NAMESPACE namespace "saml" element :encrypted_data, Xmlenc::Builder::EncryptedData has_many :encrypted_keys, Xmlenc::Builder::EncryptedKey,...
34.738095
173
0.710761
1c35f73fac6ced46a9444eafc27f48bda4588ae5
323
require 'spec_helper' require_relative '../corals/game_of_life' describe 'Game of Life' do xit 'dead cells should remain dead' do test :game_of_life, given: { cells: [ 0,0,0, 0,0,0, 0,0,0 ]}, then: { cells: [ 0,0,0, 0,0,0, 0,0,0 ]} end ...
15.380952
41
0.498452
01310bc5feb79c60ee3b4559dadb04b073e6f7cc
2,934
# typed: ignore require "test_helper" class TracerTest < Minitest::Test extend T::Sig sig { void } def test_tracer_traces_method_calls io_writer = StringIO.new tracer = SorbetAutoTyper::Tracer.new(io_writer, filter_path=Dir.pwd) tracer.start! HelperClass.bar(27) HelperClass.bar HelperCla...
43.147059
153
0.69257
6259ff6d92726ca41495241ec41c0ee43e01c318
2,024
# frozen_string_literal: true # Instantiate the global Alchemy namespace module Alchemy YAML_WHITELIST_CLASSES = %w(Symbol Date Regexp) ROOT_PATH = Pathname.new(File.join(__dir__, "..")) end # Require globally used external libraries require 'acts_as_list' require 'action_view/dependency_tracker' require 'active_m...
31.138462
58
0.844368
d5297141b75815bd14240ebd0b8c1f16e94851e4
48,446
module MiqLinux InitProcHash = { "2xthinclientserver" => "Supports thin clients", "3dwm-server" => "Binary server daemon", "acct" => "GNU Accounting utilities for process and login accounting", "acpid" => "Utilities for using ACPI power management", ...
76.533965
142
0.526978
21b7242f705aa70d3616245702f517201c295086
1,709
# frozen_string_literal: true require_relative "../command" require_relative "../helpers/parse" module Byebug # # Implements the continue command. # # Allows the user to continue execution until the next stopping point, a # specific line number or until program termination. # class ContinueCommand < Com...
24.768116
119
0.648332