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
ed26a0f265357fc272559a689773968e3e4c1a4f
324
Whodat::Engine.routes.draw do get 'users/index' get 'users/new' get 'users/create' resources :users, only: [:new, :create] resources :sessions, only: [:new, :create, :destroy] root to: 'dashboard#index' #root 'dashboard#index' get 'dashboard/index' => 'dashboard#index', as: :dashboard ...
20.25
60
0.645062
91da7aed9934c07a1defe08f73da31eafe0bd759
2,846
include System include System::Windows include System::Windows::Browser include System::Windows::Controls $DEBUG = false class SilverlightApplication def document HtmlPage.document end def application Application.current end def self.use_xaml(options = {}) options = {:type => UserControl, :nam...
20.623188
86
0.723823
619b87edf1da15e9c5c2215e1b5e937d56832a1c
1,005
require "language/node" class Truffle < Formula desc "Development environment, testing framework and asset pipeline for Ethereum" homepage "https://trufflesuite.com" url "https://registry.npmjs.org/truffle/-/truffle-5.2.2.tgz" sha256 "f3be4bf340d9eb2be6b02e1a24f4fb4b99a41e8ad453bd36aee9070a96ca3adb" license ...
33.5
92
0.768159
61587d45a217d395f8a530906e01940b138afaf7
122
MRuby::Build.new do |conf| toolchain :gcc conf.gembox 'default' conf.gem '../haconiwa-stats' conf.enable_test end
17.428571
30
0.704918
03da29c4c686930c5020b6fac27400b204a485aa
655
Gitlab::Seeder.quiet do 20.times do |i| begin User.create!( username: FFaker::Internet.user_name, name: FFaker::Name.name, email: FFaker::Internet.email, confirmed_at: DateTime.now, password: '12345678' ) print '.' rescue ActiveRecord::RecordInvalid ...
19.848485
45
0.549618
ab42bd88118a418195007186984b66d08cbbfcce
729
Pod::Spec.new do |s| s.name = 'AWSSageMakerRuntime' s.version = '2.12.8' s.summary = 'Amazon Web Services SDK for iOS.' s.description = 'The AWS SDK for iOS provides a library, code samples, and documentation for developers to build connected mobile applications using AWS.' s.homepage ...
40.5
157
0.621399
387a580230f21e51d578a94605ebc9c674e014cb
645
class Jmxterm < Formula desc "Open source, command-line based interactive JMX client" homepage "https://docs.cyclopsgroup.org/jmxterm" url "https://github.com/jiaqi/jmxterm/releases/download/v1.0.1/jmxterm-1.0.1-uber.jar" sha256 "76e0dae56b410c77724b561897e9073f088bd0b6158d668147d466debac6e9b0" bottle :unnee...
32.25
101
0.72093
ac9c1c933448ff2c8087fd4dd369bf25c45b2245
3,300
class AddHistoryToNfsStoreFilters < ActiveRecord::Migration def change # reversible do |dir| dir.up do execute <<EOF BEGIN; -- Command line: -- table_generators/generate.sh admin_history_table create nfs_store_filters app_type_id role_name user_id resource_name filter description CREATE OR REPLACE FUNCTION log...
28.448276
180
0.70303
e89d06767562bce37c5fc045ce778bf5b7d21af5
211
class CreateForemPosts < ActiveRecord::Migration[4.2] def change create_table :forem_posts do |t| t.integer :topic_id t.text :text t.integer :user_id t.timestamps end end end
19.181818
53
0.658768
1cd70cdbcc3ec72aa402fa81b53b6b8c2981fd67
4,069
# -*- coding: utf-8 -*- =begin Copyright (C) 2014-2015 Takashi SUGA You may use and/or modify this file according to the license described in the LICENSE.txt file included in this archive. =end module When class BasicTypes::M17n Positivist = [self, [ "locale:[=en:, ja=ja:, alias]", "names:[Pos...
40.287129
122
0.44753
1ddf2294804cdd1bc4875c61579f68cff81e44a8
1,270
begin require "rspec/core/rake_task" desc "Run RSpec code examples" RSpec::Core::RakeTask.new(:regression_test => :integration_test) do |t| # Glob pattern to match files. t.pattern = "spec/regression/**/test_*.rb" # Whether or not to fail Rake when an error occurs (typically when # examples fail)...
28.222222
85
0.658268
012d6e6a991bf76e807100e6170d767c4c4f778a
292
class CreateDirectors < ActiveRecord::Migration[5.0] def change create_table :directors do |t| t.references :account, foreign_key: true t.references :camp, foreign_key: true t.string :official_phone t.string :official_email t.timestamps end end end
22.461538
52
0.688356
1d94dc39d64c57d14df4819c6dc79575290b1765
369
class AddCountsToAgencies < ActiveRecord::Migration def change add_column :agencies, :draft_outlet_count, :integer, default: 0 add_column :agencies, :draft_mobile_app_count, :integer, default: 0 add_column :agencies, :published_outlet_count, :integer, default: 0 add_column :agencies, :published_mobil...
33.545455
75
0.758808
bb69eb53c958faaf83be14e4924d341d15344456
7,257
# frozen_string_literal: true RSpec.describe RuboCop::Cop::Style::ZeroLengthPredicate do subject(:cop) { described_class.new } let(:source) { '' } before do inspect_source(source) end shared_examples 'code with offense' do |code, message, expected| context "when checking #{code}" do let(:sou...
37.796875
68
0.513298
21a5c2cff2d437718bcb3cab489489e40dcf0e84
168
module Adminly module Serializer def self.render(current_scope, includes: []) current_scope.as_json(include: includes) end end end
18.666667
61
0.636905
e21063bd10d1e4b51d94f1c808c7294b2c917102
334
cask 'zoc' do version '7.24.0' sha256 'db419b70189b2c80c7fcff44588b37a9ca61be97fc12959d3c6302269e2cd9bb' url "https://www.emtec.com/downloads/zoc/zoc#{version.no_dots}.dmg" appcast 'https://www.emtec.com/downloads/zoc/zoc_changes.txt' name 'ZOC' homepage 'https://www.emtec.com/zoc/' app "zoc#{version.ma...
27.833333
75
0.742515
1c0d0e46bc2d47fd394d56bc2eab344db6f6f2f4
1,802
module EvaluationGroupsHelper def evaluation_group_element_id(evaluation_group) "evaluation-group-#{evaluation_group.id}" end def evaluation_group_label(evaluation_group, css_class: nil) if evaluation_group.needs_review? icon = :alert label_class = "alert" else icon = case evaluatio...
30.033333
173
0.746393
1aa2eb741109f898d54f6516be69d59361386a5a
1,569
require_relative 'boot' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
34.108696
82
0.769917
7a6ed7368b09f3e59a9f216c9950932b62e3195b
1,925
# # RIS format parser # # Parses a valid RIS text file into a Ruby Hash. # class RisParser < CitationParser def logger CitationParser.logger end #Determine if given data is RIS, # and if so, parse it! def parse_data(risdata) risdata = risdata.dup.strip!.gsub!("\r", "\n") #determine if this is R...
27.898551
85
0.62026
117b4143e60e8a385deda092a8427014bc27de50
323
class Nard::Rails::DictionaryMetaService def initialize( ref, debug_mode ) @ref = ref @ary = ref.split('.') @debug_mode = debug_mode if @debug_mode puts '' puts "ref: #{ @ref }" puts "ary: #{ @ary.to_s }" end end private def h ApplicationController.helpers end e...
14.043478
40
0.585139
ff31906b71e20195991f396cbf4e41c0d561d0d0
2,299
# frozen_string_literal: true # Copyright 2020 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...
32.380282
96
0.585037
1a519b8396332f137bcece2f3623eb6642cd63a5
1,592
require 'spec_helper' describe 'simp::server::ldap' do context 'supported operating systems' do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } if os_facts[:kernel] == 'windows' it { expect{ is_expected.to compile.with_all_deps }.to raise_err...
38.829268
111
0.630653
1d909d3fe7231fae8824b036efc47ab6f5c54373
2,265
# frozen_string_literal: true require 'spec_helper_acceptance' describe 'autofs::mount tests' do context 'basic mount test' do before(:context) do pp = "file { '/etc/auto.data': ensure => 'absent' }" apply_manifest(pp, catch_failures: true) end it 'applies' do pp = <<-EOS clas...
25.738636
94
0.584106
62cdb1ea87bb50b6425071c18d74ae7d789b25b6
4,490
module ActiveRecord module Associations # Association proxies in Active Record are middlemen between the object that # holds the association, known as the <tt>@owner</tt>, and the actual associated # object, known as the <tt>@target</tt>. The kind of association any proxy is # about is available in <t...
33.507463
124
0.605122
7ad260a1a9cd59fb834ddc1dbc525875cb6b05d2
67,326
# frozen_string_literal: true # Copyright 2020 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...
43.661479
306
0.727639
626b9fd7e2dd2083fbc6ee9f58b2b4f59d2b97b1
23,207
# contains all functions related to management of the signup sheet for an assignment # functions to add new topics to an assignment, edit properties of a particular topic, delete a topic, etc # are included here # A point to be taken into consideration is that :id (except when explicitly stated) here means topic id an...
49.063425
179
0.709657
1181c169f574de5169b9d062a4c29aad9432e5b4
1,394
# frozen_string_literal: true require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20190124200344_migrate_storage_migrator_sidekiq_queue.rb') RSpec.describe MigrateStorageMigratorSidekiqQueue, :redis do include Gitlab::Database::MigrationHelpers include StubWorker context 'when there are jobs i...
31.681818
105
0.731707
872856d0c88f693cf68b2370d9470e935b81a8e3
493
module WeightedAverage module ActiveRecordBaseClassMethods # @see WeightedAverage::ActiveRecordRelationInstanceMethods#weighted_average # # @return [Float,nil] def weighted_average(*args) scoped.weighted_average(*args) end # @see WeightedAverage::ActiveRecordRelationInstanceMethods#...
27.388889
89
0.744422
e20bb8761eb4afa11a570ca8ec730ff8c3d3e36d
84
class FileAtt < ActiveRecord::Base mount_uploader :file_info, FileUploader end
16.8
43
0.785714
871d9ddc65f1e83b2d2a440d7ac0757776fbf3cc
142
class NotificationTemplate < ApplicationRecord with_options(presence: true, uniqueness: true) do validates :key, :template_id end end
23.666667
51
0.78169
4a484340226b2e648b036f25297372170017c6d4
2,013
# frozen_string_literal: true require 'krane/kubernetes_resource/pod' module Krane class PodSetBase < KubernetesResource def failure_message pods.map(&:failure_message).compact.uniq.join("\n") end def timeout_message pods.map(&:timeout_message).compact.uniq.join("\n") end def fetch_...
27.958333
113
0.643318
18273573e0406bff7d91f5ff9f145db56fa86e00
8,359
require 'active_support/inflector/methods' require 'active_support/inflector/transliterate' # String inflections define new methods on the String class to transform names for different purposes. # For instance, you can figure out the name of a table from the name of a class. # # 'ScaleScore'.tableize # => "scale_sco...
38.520737
102
0.646369
5de963058361f6a2ef143ef6da112b79ada85fed
10,404
# frozen_string_literal: true RSpec.describe Twib::RssBuilder do describe '#podcast_root' do let(:result) do described_class.new do podcast_root do |rss| rss.testFoo 'bar' end end end describe 'the rss element' do let(:rss_node) { result.doc.xpath('rss').first...
25.06988
69
0.56113
b91b211f70b52bc0a017f432a24db0a28db886ff
224
# # Autogenerated by Thrift Compiler (0.9.3) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'thrift' require 'thrift_test_types' module Thrift module Test MyNumberz = 1 end end
14
66
0.705357
38746d98823674f535405bfe184f3bbe4db6d653
110
class DropTableDelayedJobs < ActiveRecord::Migration[5.2] def change drop_table :delayed_jobs end end
18.333333
57
0.772727
ff793895f9c7e84a5b7dcfb793b947d51bbf2dab
7,814
class Rubygem < ActiveRecord::Base include Patterns include RubygemSearchable has_many :owners, through: :ownerships, source: :user has_many :ownerships, dependent: :destroy has_many :subscribers, through: :subscriptions, source: :user has_many :subscriptions, dependent: :destroy has_many :versions, depe...
25.788779
111
0.677758
ab7c25ee775569e8ff5a427c22cc1ae6de9e967d
773
cask 'omnigraffle' do if MacOS.version <= :sierra version '7.8.2' sha256 'ab463ea6c12d49c4104d3814ac3280d0359072702d4751f5074f644fc79de0c6' url "https://downloads.omnigroup.com/software/Archive/MacOSX/10.12/OmniGraffle-#{version}.dmg" else version '7.10.1' sha256 '70a960eee199e089a34e26a94e2d48b...
33.608696
98
0.759379
e20398c53300e213bd05fec517bc275fb5f93aed
2,015
class Gnupg < Formula desc "GNU Pretty Good Privacy (PGP) package" homepage "https://gnupg.org/" url "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.21.tar.bz2" sha256 "61e83278fb5fa7336658a8b73ab26f379d41275bb1c7c6e694dd9f9a6e8e76ec" license "GPL-3.0" bottle do sha256 "a42991eca1ff5cc8bd25bdd700c8104c50...
30.074627
93
0.614888
f7de3dd7f80c3f59f0f1ea0bd0d8103b42761287
2,637
require_relative "test_helper" require "./app" class TripValidatorTest < Minitest::Test def setup stub_request(:get, %r{https://api\.mapbox\.com/directions/v5/mapbox/driving/.*}) .to_return(status: 200, body: File.read("#{__dir__}/doubles/responses/mapbox_example.json")) end def ass...
32.555556
99
0.681077
089ad0f27030551e9ecc037e66bf502ea63769e6
2,779
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/devtools/clouddebugger/v2/debugger.proto for package 'google.devtools.clouddebugger.v2' # Original file comments: # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file excep...
42.106061
104
0.699532
216cef585664692933ea634eeadd8f905b0da4d3
36,680
# 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,...
38.168574
233
0.653871
91567caa2b129a331362d2813054d7cffb84a399
2,080
class Strongswan < Formula desc "VPN based on IPsec" homepage "https://www.strongswan.org" url "https://download.strongswan.org/strongswan-5.8.2.tar.bz2" sha256 "86900ddbe7337c923dadf2c8339ae8ed2b9158e3691745884d08ae534677430e" bottle do sha256 "09147538543405ab5feb83c4aad866d147ed3acdc6d67e3fc423b7d1aa9...
25.365854
93
0.640385
ffbe63516bb9a25803f167d4c0ed677180d3fc4c
2,150
class UsersController < ApplicationController # editかupdateの処理がされる直前にlogged_in_userメソッドが実行(:onlyを渡す事で指定できる) before_action :logged_in_user, only:[:edit, :update] before_action :correct_user, only:[:edit, :update] before_action :admin_user, only:[:index, :destroy] def index # perメソッド(kaminari gemで利用できる)を渡...
21.717172
69
0.646977
3829c91bdf5dee6a5d44d73023a5f675d92f2650
669
require 'spec_helper' RSpec.describe "EipValidator::Loader" do let(:category) { 'Core' } let(:type) { 'Standards Track' } let(:status) { 'Final' } let(:eip){ { "eip" => 145, "title" => 'Bitwise shifting instructions in EVM', "author" => 'Alex Beregszaszi, Paweł Bylica', "type" => t...
23.068966
57
0.588939
08e8023f992a5907b39b77ee1d67e4f6cc885ff5
1,859
require File.expand_path('../boot', __FILE__) require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) require 'social_stream-base' module Dummy class Applicatio...
41.311111
99
0.724045
bb5cf7758e672fa55f9929846e55a8bd4ea2fdb5
597
require 'spec_helper_acceptance' describe 'memcached' do context 'with all defaults' do let(:pp) do 'include memcached' end it 'works idempotently with no errors' do apply_manifest(pp, catch_failures: true) apply_manifest(pp, catch_changes: true) end describe service('memcached...
25.956522
68
0.658291
4a890b99d4a1eb5b28d05a499dfe0289695fe03a
152
class ServerTimestampController < ApplicationController def show render json: { server_timestamp: DateTime.now.strftime('%Q') }.as_json end end
25.333333
74
0.769737
083ffb3b47e46aefb50670596e68033e4ba1476c
423
class CreateUsers < ActiveRecord::Migration[5.2] def change create_table :users do |t| t.string :provider t.string :uid t.string :name t.string :oauth_token t.string :oauth_expires_at t.string :email t.string :sha t.hstore :ex...
24.882353
48
0.550827
62dbc2da1e5352513d9b2cf13d5dbe8f4cf07dce
2,694
require 'test_helper' describe Outpost::Expectations::ResponseBody do class SubjectBody class << self attr_reader :expectation, :evaluation_method def expect(expectation, evaluation_method) @expectation = expectation @evaluation_method = evaluation_method end end ...
30.613636
82
0.707127
18541b0a685939e83e9f84273277220002196a5f
210
require "manageiq/providers/cloud_manager" require "vm" module ManageIQ::Providers class CloudManager class Vm < ::Vm belongs_to :availability_zone belongs_to :cloud_tenant end end end
17.5
42
0.728571
28ab9fe6bf7a066b7f3d9cdad4d8157e0e8bc9c8
1,038
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'interest_graph/version' Gem::Specification.new do |spec| spec.name = "interest-graph-ruby" spec.version = InterestGraph::VERSION spec.authors = ["Marshall Shen"] spec...
37.071429
74
0.660886
386156870850588c51391e37d7be64c23aa8fa9e
23,993
# Copyright 2015 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, ...
36.519026
89
0.573292
e2ef528f03004fa203e44178e18b3ab60e892643
19,610
# frozen_string_literal: true module Faraday # Connection objects manage the default properties and the middleware # stack for fulfilling an HTTP request. # # @example # # conn = Faraday::Connection.new 'http://sushi.com' # # # GET http://sushi.com/nigiri # conn.get 'nigiri' # # => #<Farada...
31.886179
80
0.612035
ab92e08f423858f22de160a14f93a258f531acb7
10,386
# deep_merge was written by Steve Midgley, and is now maintained by Daniel DeLeo. # The official home of deep_merge on the internet is now # https://github.com/danielsdeleo/deep_merge # # Copyright (c) 2008 Steve Midgley, released under the MIT license module DeepMerge class InvalidParameter < StandardError; end ...
47.861751
156
0.641633
33ae16117e0c8ca336ed1bcd5fd527fe0553f07a
1,352
module SessionsHelper # 渡されたユーザーでログインする def log_in(user) session[:user_id] = user.id end # ユーザーを永続的セッションに記憶する def remember(user) user.remember cookies.permanent.signed[:user_id] = user.id cookies.permanent[:remember_token] = user.remember_token end # 渡されたユーザーがログイン済みユーザーであればtrueを返す ...
21.806452
67
0.691568
38d0e693d320d31e42c205b9e2807165d54b0be9
488
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for child processes simplecov_command_name = ENV['SIMPLECOV_COMMAND_NAME'] # will not be set if hook does not run because `bundle install --without coverage` if simplecov_command_name require 'simplecov' require 'pathname' root ...
28.705882
92
0.760246
39779d429624fd1991f9601bf903c42af5826b57
159
module DevcampNewViewTool class Renderer def self.copyright name, msg "&copy; #{Time.now.year} | <b>#{name}</b> #{msg}".html_safe end end end
22.714286
65
0.641509
0841c4835af081a02988b351c63dff092aab744e
889
{ name: 'Lee', num_matrices: '2', notes: 'FEM, Electromagnetics, Center for Computational Electromagnetics, UIUC From the Univ of Illinois at Urbana-Champaign, Center for Computational Electromagnetics (development and application of the finite element method for analyzing antennas, high-frequency circuits...
40.409091
82
0.79865
ac02a3dc45ba344ba1ef12d276c1e907d29dce5a
221
# frozen_string_literal: true require 'nokogiri' require 'content-style/parser' require 'content-style/linter' require 'content-style/hotcop_partner' module ContentStyle ROOT = File.expand_path('../..', __FILE__) end
20.090909
44
0.773756
f77da0c7bf4edaa22c3b9011374c8c53623e413d
11,285
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/security_center/v1/securitycenter_service.proto require 'google/protobuf' require 'google/api/annotations_pb' require 'google/cloud/security_center/v1/asset_pb' require 'google/cloud/security_center/v1/finding_pb' require 'google/cloud...
60.026596
209
0.794152
1adcc23082dd04b3dae30ebc7796314ed64807b2
3,172
require 'test_helper' class Minitest::DataTest < Minitest::Test attr_accessor :reporter def run_test(test) output = StringIO.new("") self.reporter = Minitest::CompositeReporter.new reporter << Minitest::SummaryReporter.new(output) reporter << Minitest::ProgressReporter.new(output) reporter.s...
25.174603
79
0.647226
e81c15ebb4b36fb135fc7942c481759b063cb073
99
require 'spec_helper' describe PageLink do # "add some examples to (or delete) #{__FILE__}" end
16.5
50
0.727273
26074c5ccbfedd7d37a0d96d3e0db10c1ba89e07
211
user = User.create!(name: 'Admin', email: 'admin@example.com', password: 'iamRails2021', password_confirmation: 'iamRails2021') api_key = ApiKey.create!(user: user) puts api_key.access_token
42.2
88
0.691943
ab41ecfcfb783cc3c23347a5c18decb0684391c9
2,052
# frozen_string_literal: true require "rails_helper" RSpec.describe "Reserving an instrument on a holiday" do let(:user) { create(:user) } let!(:instrument) { create(:setup_instrument, restrict_holiday_access: true) } let(:facility) { instrument.facility } let!(:account) { create(:nufs_account, :with_account...
36
126
0.705166
5d14b2543adcdb3ececf1415905110ab254b480c
1,508
require 'spec_helper' describe Bosh::AwsCloud::Cloud, "reboot_vm" do let(:cloud) { described_class.new(options) } let(:options) do { "aws" => { "default_availability_zone" => "foo", "region" => "bar", "access_key_id" => "access", "secret_access_key" => "secret", "...
29.568627
98
0.627321
e2f4e7f223f48f9c4fcf80b4a6335a20a5db20d8
77
require_relative '../../Dispatcher' class DispatcherServlet < Dispatcher end
19.25
36
0.792208
f8da234fbcfd2377a03b0518e56b9baa42dda72f
3,745
# frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake require_relative 'endpoints/admin_apps' require_relative 'endpoints/admin_apps_requests' require_relative 'endpoints/admin_inviteRequests' require_relative 'endpoints/admin_inviteRequests_approved' require_relative 'endpoints/admin_invi...
32.008547
58
0.77036
ffea6880c49b41b86a3cbcfa5903183c756c6dfa
1,067
cask "unity" do arch = Hardware::CPU.intel? ? "" : "Arm64" version "2022.1.5f1,feea5ec8f162" if Hardware::CPU.intel? sha256 "5093df3663d7356e156ccc116072457625010e57107371c4fce5c0230009018f" else sha256 "6e75c0fda9d2b61d00458dafc62d887cc1368bbce666e384d1a05819dad4e48d" end url "https://download.u...
32.333333
131
0.68791
f8481846ab4b1974d65b40ee03c1823c0538770b
9,778
require 'spec_helper' module Omnibus describe Compressor::DMG do let(:project) do Project.new.tap do |project| project.name('project') project.homepage('https://example.com') project.install_dir('/opt/project') project.build_version('1.2.3') project.build_iteration('...
32.593333
118
0.593475
5db78dfd119f6a0489aa3e90b94e7851a764b33f
1,523
require 'active_support/core_ext/array/wrap' module ActsAsParanoid module Validations def self.included(base) base.extend ClassMethods end class UniquenessWithoutDeletedValidator < ActiveRecord::Validations::UniquenessValidator def validate_each(record, attribute, value) finder_class...
34.613636
110
0.705187
79f3a7dcb532c3641d886ed48525e843cc30d2fe
1,260
# frozen_string_literal: true module Gitlab module Utils module LazyAttributes extend ActiveSupport::Concern include Gitlab::Utils::StrongMemoize class_methods do def lazy_attr_reader(*one_or_more_names, type: nil) names = Array.wrap(one_or_more_names) names.each { ...
27.391304
68
0.580952
791cdf3f9aff4ea5a622494467867440b57f8154
68,604
require_relative "spec_helper" describe "DB#create_table" do before do @db = Sequel.mock end it "should accept the table name" do @db.create_table(:cats){}.must_be_nil @db.sqls.must_equal ['CREATE TABLE cats ()'] end with_symbol_splitting "should accept the table name with splittable symbols"...
38.071032
287
0.684989
bb9bda7377711daea8ac50d3fa35d454dcb785ec
153
class AddTntIdToDonations < ActiveRecord::Migration def change add_column :donations, :tnt_id, :string add_index :donations, :tnt_id end end
21.857143
51
0.751634
9112b9d6306379b901cc4c3c3b8e384d6e6694c2
4,823
# == Schema Information # # Table name: current_operators_serving_stop # # id :integer not null, primary key # stop_id :integer not null # operator_id :integer not null # tags :...
37.679688
373
0.612482
5dc6bee33544a521df7fbf8a68651cf800c26929
2,739
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report include Msf::Exploit::Remote::Udp include Msf::Auxiliary::UDPScanner include Msf::Auxiliary::NTP inc...
31.125
103
0.606426
010cf7c575938f44121811ac92a4e01aec1e351d
224
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'qonto' unless defined?(SPEC_ROOT) SPEC_ROOT = File.expand_path('../', __FILE__) end Dir[File.join(SPEC_ROOT, 'support/**/*.rb')].each { |f| require f }
24.888889
67
0.683036
ac62c977b48779e13b4175a65fbae2852430329d
281
class Shimo < Cask version :latest sha256 :no_check url 'http://www.chungwasoft.com/files/Shimo_latest.zip' appcast 'http://www.chungwasoft.com/library/appcasts/Shimo3/shimocast.php' homepage 'http://www.chungwasoft.com/shimo/' license :unknown app 'Shimo.app' end
23.416667
76
0.740214
6179b2009778cf200a25c90cf39307b3a026bd27
4,655
require 'formula' class Git < Formula homepage 'http://git-scm.com' url 'https://git-core.googlecode.com/files/git-1.9.0.tar.gz' sha1 'e60667fc16e5a5f1cde46616b0458cc802707743' head 'https://github.com/git/git.git', :shallow => false bottle do sha1 "78bb720052e624b889b7c39e47ec40e463fa13b0" => :maverick...
34.481481
101
0.654135
1d68c684bdfb887fdd313252c803287727ebbe43
802
class Utils # Common processing to handle a response that is expected to be JSON def self.handle_json(response, success) content_type = response.headers.get('content-type') || '' isJson = content_type.include? 'json' if response.status == 200 and isJson response.json().then do |json| succ...
29.703704
82
0.604738
61b0bb6cd5f8c11fa3508ba0766caad5507bf93f
4,435
module Fog module ContainerInfra class TeleFonica < Fog::Service SUPPORTED_VERSIONS = /v1/ SUPPORTED_MICROVERSION = '1.3' requires :telefonica_auth_url recognizes :telefonica_auth_token, :telefonica_management_url, :persistent, :telefonica_service_type, :telefonica_servic...
30.586207
103
0.600902
4a36f52712815d0bfc22c8005b53fb83adefbeeb
478
FactoryBot.define do factory :sprint_market_position, class: 'IGMarkets::SprintMarketPosition' do created_date { '2014-10-22T18:30:15' } currency { 'USD' } deal_id { 'DEAL' } description { 'Description' } direction { 'BUY' } epic { 'FM.D.FTSE.FTSE.IP' } expiry_time { '2014-10-22T19:30:14' ...
28.117647
78
0.635983
f7393ac2b99d34c020956a3b70ae7a486acd2243
411
# If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. # Find the sum of all the multiples of 3 or 5 below 1000. def multiples_of_3_and_5(num) multiples = [] num.times do |int| if int % 3 == 0 multiples << int elsif int % 5 == 0 ...
24.176471
131
0.683698
b9b6fd8e2733e6a6702df90ec961355a2a3b3fa7
1,560
require 'spec_helper' require 'rake' require 'stringio' describe "mesh rake tasks" do # rubocop:disable RSpec/DescribeClass let(:rake) { Rake::Application.new } before do Rake.application = rake Rake.application.rake_require "mesh", [Rails.root.join('lib', 'tasks'), Rails.root.join('..', 'lib', 'tasks')], ...
31.836735
118
0.646154
01bede0d0ccecc367481ce5495701d7dc4086537
653
require 'rspec' require 'asciidoctor' require 'asciidoctor-jats' RSpec.describe Asciidoctor::JATS::Entity::Bold do context '#to_s' do it 'should wrap a word in <bold> tags' do actual = build_strong('Example').to_s expected = '<bold>Example</bold>' expect(actual).to eq(expected) end it...
23.321429
55
0.663093
bbf9a57e771805d5fef8056bd961737ea6742a43
3,297
require File.expand_path('../boot', __FILE__) require 'rails/all' if defined?(Bundler) # If you precompile assets before deploying to production, use this line Bundler.require(*Rails.groups(:assets => %w(development test))) # If you want your assets lazily compiled in production, use this line # Bundler.requi...
47.782609
163
0.740977
f76d88be79278da7a1c530b3ae1bd3d341ad1ad7
120
require 'test_helper' class HeaderTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
15
42
0.7
18aaa41f423679968f3307583b437ccf462fd605
370
require "bundler/setup" require "versioned_item" RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! config.expect_wi...
24.666667
66
0.756757
ab258109c2b4b699b07da5ee0188eb7f1d335ca9
6,926
module Fastlane module Actions module SharedValues CREATE_PULL_REQUEST_HTML_URL = :CREATE_PULL_REQUEST_HTML_URL end class CreatePullRequestAction < Action def self.run(params) UI.message("Creating new pull request from '#{params[:head]}' to branch '#{params[:base]}' of '#{params[:repo...
42.231707
150
0.461161
ff751d232511cc1ae937ad75325b086b0e43a0a5
794
# frozen_string_literal: true # == Schema Information # # Table name: translations # # id :integer not null, primary key # language_id :integer # text :string # resource_content_id :integer # resource_type :string # resource_id :integer # language_n...
24.060606
94
0.653652
61ae0b112623ef2997200016110e8b2f87a67556
365
require 'spec_helper' require Rails.root.join('lib/migrations/ezine/20150408081234_enable_member_state.rb') RSpec.describe SS::Migration20150408081234, dbscope: :example do before do member = create :ezine_member member.unset :state end it do expect { described_class.new.change } .to change { ...
24.333333
85
0.742466
bbb94b14e5dccccaba6f10b45b91e0e550811052
6,417
require 'spec_helper' RSpec.describe Karafka::Params::Params do describe 'class methods' do subject { described_class } describe '#build' do let(:controller) { double } let(:defaults) { double } let(:merged_with_defaults) { double } before do expect(subject) .to re...
28.775785
97
0.580489
9158f9fb32490047a9fcc2c3aa0b17c2cee96b95
8,116
=begin = monitor.rb Copyright (C) 2001 Shugo Maeda <shugo@ruby-lang.org> This library is distributed under the terms of the Ruby license. You can freely distribute/modify this library. == example This is a simple example. require 'monitor.rb' buf = [] buf.extend(MonitorMixin) empty_cond = buf.new_cond...
22.733894
80
0.670034
e82f303c19ed7693160cc84abb9fc86bb176a711
1,811
class Tcpsplit < Formula desc "Break a packet trace into some number of sub-traces" homepage "https://www.icir.org/mallman/software/tcpsplit/" url "https://www.icir.org/mallman/software/tcpsplit/tcpsplit-0.2.tar.gz" sha256 "885a6609d04eb35f31f1c6f06a0b9afd88776d85dec0caa33a86cef3f3c09d1d" livecheck do ur...
50.305556
123
0.793484
035c3814c50014717ca99ce7101b9d82f7325d19
1,762
# frozen_string_literal: true module Spotlight ## # A controller to handle the adminstration of site admin users class AdminUsersController < Spotlight::ApplicationController before_action :authenticate_user! before_action :load_site before_action :load_users load_and_authorize_resource :site, c...
26.298507
98
0.671396
f779e1336d1e5c95d29fa406935ca3ac8f94d50b
1,131
# == Schema Information # # Table name: dhcp4_options # # code :integer not null # dhcp_client_class :string(128) # formatted_value :text # persistent :boolean default(FALSE), not null # space :string(128) # user_context :text # value :binary #...
26.928571
120
0.657825
e95c637930778dccb4aa060223c466bfbee496e8
840
Pod::Spec.new do |s| s.name = "WZYCamera" s.version = "1.0.3" s.summary = "WZYCamera is a lightweight custom camera controller. A line of code integration, bid farewell to invoke complex system API distress." s.description = <<-DESC WZYCamera is a lightweight custom camera controller. A line of code...
44.210526
151
0.683333
91f8dd84e6c182a013b350b48724544635ac2575
8,488
require File.dirname(__FILE__) + '/../sass' require 'sass/tree/node' require 'strscan' module Sass # :stopdoc: module Tree class Node def to_sass(opts = {}) result = '' children.each do |child| result << "#{child.to_sass(0, opts)}\n" end result end en...
21.488608
102
0.513902
d5e3b0c8d5f525c51a0268ad78db960b1b0a0b7e
11,284
# frozen_string_literal: true require "business_time" require "set" ## # AssignJudgesToHearingDays is used to assign judges to hearing days for a schedule period while filtering out # blackout days for the judges. Full details of the algorithm can be # found `HearingSchedule.md` in Appeals-team repo(link: https://git...
38.250847
120
0.712247
e9a9871125a652cb64b566fa138fc37a6cc80f4d
952
# encoding: utf-8 require 'webp-ffi' module CarrierWave module WebP module Converter def convert_to_webp(options = {}) manipulate! do |img| img = yield(img) if block_given? webp_path = "#{path}.webp" old_filename = filename # Конвертируем картинк...
25.72973
69
0.577731
ac7632168d2ef9a5ff19bf1483279d6b13f33493
1,273
# encoding: utf-8 # This module contains the behaviour for getting the various states through which a # resource can transition. module Tripod::State extend ActiveSupport::Concern attr_writer :destroyed, :new_record # Returns true if the +Resource+ has not been persisted to the database, # false if it has. ...
27.085106
83
0.693637