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
7aa24f9d9fddf3139062a19e0aae039a030c7965
417
# 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 # # Defines values for ExpressRouteCircuitSkuFamily # module ExpressRouteCircuitSku...
24.529412
70
0.731415
117de657b7e0311258142e1c0a5726df2f2d3205
1,098
# 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...
35.419355
86
0.752277
189026e7d3be3e141a474469c9c21739b8e87e97
689
class Animal # ENCAPSULATION attr_reader :species def move # POLYMORPHISM puts 'Animal moves' end def consume(food = nil) # POLYMORPHISM puts "I consume #{food} like a savage" if food end private # Abstraction / Information Hiding def initialize(species) @species = species end end class...
16.404762
50
0.677794
6ae67ac4d980a589660b977e93ee636146f1a9d5
1,561
# 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::BatchAI::Mgmt::V2018_03_01 module Models # # Describes a reference to Key Vault Key. # class KeyVaultKeyReference inc...
26.457627
75
0.532992
79c8a33404d40d8c3ca9715212db56e64b756d0b
5,472
module Bundler module Source class Git < Path class GitNotInstalledError < GitError def initialize msg = "You need to install git to be able to use gems from git repositories. " msg << "For help installing git, please refer to GitHub's tutorial at https://help.github.com/article...
33.570552
143
0.55117
ed1f8c806b90a41163ff2e7e5f8ad4ab1099a663
5,132
# frozen_string_literal: true # Copyright 2021 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...
47.962617
189
0.643804
01f97569b7f18a5bb26625248c1ffd80677ff5cf
501
# frozen_string_literal: true require 'vk/api/responses' module Vk module API class Wall < Vk::Schema::Namespace module Responses # @see https://github.com/VKCOM/vk-api-schema/blob/master/objects.json class UnpinResponse < Vk::Schema::Response # @return [API::Base::OkResponse] @se...
29.470588
112
0.670659
080b3701370ee600bef6f5a93fb434d6a7efe9af
1,003
# encoding: UTF-8 # 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 sou...
41.791667
86
0.754736
bfa32dfebd3bd0b99ed3f284de744404ac7003d0
383
name 'ctf01-01' maintainer 'Stefan Rusu' maintainer_email 'saltwaterc@gmail.com' license 'MIT' description 'Installs / Configures ctf01-01' long_description 'Installs / Configures ctf01-01' version '0.1.1' source_url 'https://github.com/SaltwaterC/hackers-dome-images' issues_url 'https://github.com/SaltwaterC/hackers-...
27.357143
69
0.788512
d54bd261c435d7424f39e61a14e175cb6738e789
5,379
# frozen_string_literal: true require 'spec_helper' require 'webauthn/public_key' require 'support/seeds' require 'cose' require 'openssl' RSpec.describe 'PublicKey' do let(:uncompressed_point_public_key) do Base64.strict_decode64(seeds[:u2f_migration][:stored_credential][:public_key]) end let(:cose_public...
29.075676
111
0.648819
62e7859689ecc6e30468f1171ecb55f3b54e94e4
2,992
module UniversalCrm module Models module Company extend ActiveSupport::Concern included do include Mongoid::Document include Mongoid::Timestamps include Mongoid::Search include Universal::Concerns::Status include Universal::Concerns::Kind include Univer...
31.829787
103
0.572193
3988169fefe94b213aed24756df02d019cdfd0d1
2,181
#Copyright 2010 Foradian Technologies Private Limited #This product includes software developed at #Project Fedena - http://www.projectfedena.org/ # #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...
28.697368
89
0.770289
b984b4d5dcbdca0ff99b382a0d8c28b80f71afdf
78
# coding: utf-8 module FormData # FormData version VERSION = "0.1.0" end
11.142857
20
0.666667
11662e539b601762f756010f7e66c9cf818d5d22
2,019
# 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::EventHub::Mgmt::V2017_04_01 module Models # # SKU parameters supplied to the create namespace operation # class Sku i...
26.565789
79
0.493314
f83842ca4a28ca9f65a893b54a3a4a8470a24c41
735
module ActiveRecord::Turntable class Mixer class Fader class CalculateShardsSumResult < Fader def execute results = @shards_query_hash.map do |shard, query| args = @args.dup args[1] = args[1].dup if args[1].present? shard.connection.send(@called_method, ...
27.222222
104
0.542857
626b9c0a2fb1f1694d5d5ca8534255c31a5fe60b
2,677
# frozen_string_literal: true # A collection of class methods that will be available on classes that include `AwesomeXML`. module AwesomeXML module ClassMethods attr_reader :context, :nodes, :public_nodes private :nodes, :public_nodes # Takes in a string representing an XML document. Initializes an inst...
30.770115
95
0.663056
393c04de0c5c9c933efa29b3c9772e43150f7adb
4,532
class Ffmpeg < Formula desc "Play, record, convert, and stream audio and video" homepage "https://ffmpeg.org/" url "https://ffmpeg.org/releases/ffmpeg-4.4.1.tar.xz" sha256 "eadbad9e9ab30b25f5520fbfde99fae4a92a1ae3c0257a8d68569a4651e30e02" # None of these parts are used by default, you have to explicitly pass ...
29.428571
104
0.684907
b9f63f1a09e8b639197e6d4f5dd6d1ad11d86ee1
133
class Post < ActiveRecord::Base # Remember to create a migration! belongs_to :user belongs_to :ticket has_many :comments end
19
35
0.75188
28d9ce6371ee517948da0baf535a41db3d45b7bb
4,804
class Phpcurl < Formula desc "Get a file from an HTTP, HTTPS or FTP server" homepage "https://curl.haxx.se/" url "https://curl.haxx.se/download/curl-7.72.0.tar.bz2" mirror "http://curl.mirror.anstey.ca/curl-7.72.0.tar.bz2" sha256 "ad91970864102a59765e20ce16216efc9d6ad381471f7accceceab7d905703ef" version '7....
38.432
103
0.650291
6199385c3b359c665fdc0f7e34e6ec67237130b9
3,597
# frozen_string_literal: true # Cloud Foundry Java Buildpack # Copyright 2013-2018 the original author or authors. # # 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....
36.333333
119
0.700862
f87e3c4ffb87851ff4d917f4f2d42634f4e9155b
7,298
Threadable::Application.routes.draw do get '/sign_in' => 'authentication#show' post '/sign_in' => 'authentication#sign_in' post '/recover-password' => 'authentication#recover_password', as: 'recover_password' match '/sign_out' => 'authentication#sign_out', via: [:get, :delete]...
46.782051
140
0.657714
1d09e7215031da70a5927d9f2791598ec9c4c132
8,639
module Fog module Compute class ProfitBricks class Real # Update LAN properties # # ==== Parameters # * datacenter_id<~String> - Required - UUID of the virtual data center # * lan_id<~String> - Required - UUID of the LAN # * properties<~Hash>: ...
68.563492
144
0.492881
0172fde1d4f4868b792912663d5c565bc991784b
845
class PersistorService def self.store_state(building) round = Round.new BuildingState.create!(round: round, state_data: { elevators: building.elevators.map do |elevator| { floor_number: ...
40.238095
77
0.369231
5d2d292165b1f06432a9d81d4c8be4a65d1929ac
25,029
module FHIR class SubstanceSpecification < FHIR::Model include FHIR::Hashable include FHIR::Json include FHIR::Xml SEARCH_PARAMS = ['code'] METADATA = { 'id' => {'type'=>'id', 'path'=>'SubstanceSpecification.id', 'min'=>0, 'max'=>1}, 'meta' => {'type'=>'Meta', 'path'=>'SubstanceSpecif...
67.829268
651
0.585001
3942c6a5a75b1773afc55cb0d15e102e954492bf
388
require 'spec_helper' describe Telecine::Registry do it_should_behave_like "a Registry" it 'should take hash default arg' do subject = described_class.new("foo") subject.get(:foo).should == "foo" end it 'should not respond to hash methods' do [:fetch, :store, :delete, :[], :[]=].each do |method| ...
22.823529
57
0.675258
79a370a31c77b7fca20f14e492d1ea052defcc30
1,632
# # Be sure to run `pod lib lint PQSearchControl.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 = 'PQS...
37.953488
107
0.645221
396d5e71da0c0130a54dcdf2b5882815ad67283a
524
require_relative "../task" require_relative "metrics" class UpdateMetricsTask < Task def run puts "* Updating #{font_class_path}" source = updated_font_class open_file(font_class_path, "w") do |file| file.write source end end def updated_font_class font_class.sub(/ASCENT = \d+/, "ASCE...
20.153846
118
0.683206
f786f82f8599019daf1185cd72af658feb1c45d3
1,989
require_relative '../parser.rb' RSpec.describe "Parser" do context "deals with query strings" do before do request = instance_double("Request", :uri => "GET /home?first=Burt&last=Malkiel") @parser = Parser.new(request) end it "returns the method of an URI" do expect(@parser.http_meth...
26.171053
117
0.63097
333abc9d7a21a76c837431f489803761eea15e0c
949
require "test_helper" class UserMailerTest < ActionMailer::TestCase test "account_activation" do user = users(:michael) user.activation_token = User.new_token mail = UserMailer.account_activation(user) assert_equal "Account activation", mail.subject assert_equal [user.email], mail.to assert_...
33.892857
59
0.726027
217c985bdde5f6db0d40900d4a433ecf18fa2460
1,120
require "./lib/paginate/version" Gem::Specification.new do |s| s.name = "paginate" s.version = Paginate::Version::STRING s.platform = Gem::Platform::RUBY s.authors = ["Nando Vieira"] s.email = ["fnando.vieira@gmail.com"] s.homepage = "http://rubygems.org/gems/paginate" s.summar...
40
137
0.692857
26588d3cfd558175da0f501d8378e22a75307298
166
class CreateAmenityLists < ActiveRecord::Migration def change create_table :amenity_lists do |t| t.boolean :wifi t.boolean :couch end end end
18.444444
50
0.692771
1c8ee65d3a9c4b3d1431c069795992de2cfb6987
1,463
require 'spec_helper' class PlatformApiDummyController < Spree::Api::V2::Platform::ResourceController private def model_class Spree::Address end def scope Spree::Address end end describe Spree::Api::V2::Platform::ResourceController, type: :controller do let(:dummy_controller) { PlatformApiDummyC...
26.125
152
0.704033
e888ba1f2ed9df45985d465a839c235379730743
640
class AmmoniteRepl < Formula desc "Ammonite is a cleanroom re-implementation of the Scala REPL" homepage "https://lihaoyi.github.io/Ammonite/#Ammonite-REPL" url "https://github.com/lihaoyi/Ammonite/releases/download/1.8.2/2.12-1.8.2" sha256 "378d7a9fa1a8f44f8e27769259a465423cf540658ba42365213a3c00e4a8acc0" b...
29.090909
78
0.714063
08e8eceff7b3e46951b39e1849443ab6430d707e
382
tarball = 'go1.4.2.linux-arm~multiarch-armv7-1.tar.gz' tarball_path = ::File.join(Chef::Config[:file_cache_path], tarball) remote_file tarball_path do source "http://dave.cheney.net/paste/#{tarball}" action :create_if_missing notifies :run, 'execute[decompress_tarball]' end execute 'decompress_tarball' do com...
27.285714
67
0.748691
bb276c46f1d9995cd54ff73a244b216bc11c1c7e
2,585
require 'fast_spec_helper' require 'active_support/core_ext/object/blank' require 'epi_cas/ldap_info' describe EpiCas::LdapInfo do subject { EpiCas::LdapInfo.new('username', double(find_by_username: double(uid: "abc", givenname: "test", sn: "user", mail: "test@user.com", dn: "dn", ou: "EPG"))) } describe '#get_ld...
36.928571
192
0.622824
f8095a74ca15aea773e0ae261bb2b8d87af2daca
3,684
require 'base64' module RestPki class PadesSignatureStarter < SignatureStarter attr_accessor :visual_representation def initialize(restpki_client) super(restpki_client) @pdf_content_base64 = nil @visual_representation = nil end #region set_pdf_t...
33.490909
95
0.586048
265296984d845c300baf86a02139d719c6bf65be
368
# # = config/initializers/annotation_security.rb # # Sets up files under <tt>config/security</tt> which hold # the security configuration. # # Add your own files here if they should also be loaded. # AnnotationSecurity.load_relations('relations') AnnotationSecurity.load_rights('rights') # AnnotationSecurity.load_right...
30.666667
79
0.777174
abb81602de1857d37b1fd65de66fdadea4c01609
1,018
require "spec_helper" describe "Set store values in xml feed", type: :feature, js: true do stub_authorization! let(:store) { Spree::Store.default } context "If no preferances are set" do it "it renders the default store details correctly" do visit "/products.rss" expect(page.body).to have_text...
31.8125
104
0.681729
0831344d6814798a9b55d6673adf037b9c3de7a5
9,695
require 'spec_helper' require 'pry' describe 'device_manager' do let(:pre_condition) do [ 'class cisco_ios {}', 'class f5 {}', ] end context 'declared on a device' do let(:title) { 'cisco.example.com' } let(:params) do { ensure: :present, type: 'cisco_ios', ...
32.753378
147
0.614028
015c509c2cf00615ecc7dece96bdc9a98b554f80
1,269
# # Cookbook Name:: sc-mongodb # Recipe:: configserver # # Copyright 2011, edelight GmbH # Authors: # Markus Korn <markus.korn@edelight.de> # # Copyright 2016-2017, Grant Ridder # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. #...
34.297297
89
0.754137
6184df481fe717eae9df973604c118d4b5d66c71
19,780
require 'abstract_unit' require 'active_support/inflector' require 'inflector_test_cases' require 'constantize_test_cases' class InflectorTest < ActiveSupport::TestCase include InflectorTestCases include ConstantizeTestCases def test_pluralize_plurals assert_equal "plurals", ActiveSupport::Inflector.plural...
37.820268
163
0.716279
bfd3af0b71f955152deeeb1ab72d395f7c905fbe
2,365
# coding: utf-8 lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "jets/version" require "jets/rdoc" Gem::Specification.new do |spec| spec.name = "jets" spec.version = Jets::VERSION spec.authors = ["Tung Nguyen"] spec.email =...
39.416667
258
0.709091
79cb50e364f94704f492a6e8b4f5dcee3cf4ba0d
464
class GmailNotifr < Cask version '0.9.0' sha256 '47ecf1edf08678e6a1c53cb5a3e39d5c6c5f63a9145fc7cbc7df2ebada42b662' url "https://s3.amazonaws.com/assets.ashchan.com/gmailnotifr/GmailNotifr-#{version}.zip" appcast 'https://s3.amazonaws.com/assets.ashchan.com/gmailnotifr/update.xml' homepage 'http://ashchan.com...
35.692308
90
0.775862
28efcdc244640daf925087d047357525c7b7ce56
2,484
DocumentFilterPresenter = Struct.new(:filter, :context, :document_decorator) do extend Whitehall::Decorators::DelegateInstanceMethodsOf delegate_instance_methods_of Whitehall::DocumentFilter::Filterer, to: :filter def as_json(options = nil) as_hash(options) end def as_hash(_options = nil) data = { ...
31.05
92
0.714976
bbd9fba901659b68257aa7c07c42f116ee847c96
662
Rails.application.routes.draw do root 'home#index' $cluster.models.each do |model| name = model.name.underscore controller name.pluralize do collection_path = "/#{ name.pluralize }" collection_path << "(/s/:series)" if model.acts_as_seriables? collection_path << "(/p/:page)" if model.ac...
24.518519
67
0.626888
87e516165ac59a31184148de88a09ac3801a875e
752
ClimateWatchEngine.s3_bucket_name = Rails.application.secrets.s3_bucket_name # Locations engine initializer require 'locations' Locations.locations_filepath = "#{CW_FILES_PREFIX}locations/locations.csv" Locations.cartodb_url = 'https://wri-01.carto.com/api/v2/sql?q=SELECT%20name_engli,iso,topojson,centroid%20FROM%20...
53.714286
126
0.864362
03b1847d5afabd96d6cc69269912edc4abceda13
339
n, M, P, Q = gets.split.map(&:to_i) fail_leaves = {} (1..12).each do |m| fail_leaves[m] = M if m.between?(P, P + Q - 1) || (m + 12).between?(P, P + Q - 1) fail_leaves[m] += M end end answer, month = 0, 1 loop do answer += 1 n -= fail_leaves[month] break if n <= 0 month += 1 month = 1 if month > ...
15.409091
64
0.551622
87fec5390cc42cbd5463840a75170d6e03af3806
650
cask "frescobaldi" do version "3.1.3" sha256 "a7c53b67015c8515ae31102a53e16a9eca6b0e5c98ced6e859bb834e3e12f29c" url "https://github.com/frescobaldi/frescobaldi/releases/download/v#{version}/Frescobaldi-#{version}-x86_64.dmg", verified: "github.com/frescobaldi/frescobaldi/" name "Frescobaldi" desc "Lily...
30.952381
115
0.726154
7ab0269d1ac4ff3febc0fcaa52bde7a5f545b302
774
# encoding: utf-8 module Gallifreyian module Translation class I18nKey include Mongoid::Document include Mongoid::Translation # Field # field :state, type: Symbol # Validations # validates :language, presence: true validate :valid_datum? def va...
18
58
0.564599
261a0460c0de007d1f762784a44de4b66be65e7e
4,301
require 'spec_helper' describe Hydra::PolicyAwareAccessControlsEnforcement do before(:all) do class MockController include Hydra::AccessControlsEnforcement include Hydra::PolicyAwareAccessControlsEnforcement attr_accessor :params def user_key current_user.user_key end...
39.824074
352
0.695187
21884e89afa7aada65501941eb981775e1f52c62
2,914
require 'rbconfig' require_relative '../utils/snapshot_helpers.rb' include Utils::SnapshotHelpers namespace :dgidb do if Rails.env.production? data_submodule_path = File.join(Rails.root, 'public', 'data') else data_submodule_path = File.join(Rails.root, 'data') end data_file = File.join(data_submodule...
38.853333
113
0.715511
b9914774d85c9a2b3c14c25a15c0c741cc6e8967
6,782
Sequel.require 'adapters/jdbc/transactions' module Sequel module JDBC # Database and Dataset support for HSQLDB databases accessed via JDBC. module HSQLDB # Instance methods for HSQLDB Database objects accessed via JDBC. module DatabaseMethods PRIMARY_KEY_INDEX_RE = /\Asys_idx_sys_pk_/i.f...
36.659459
143
0.58095
38990d00abf3c1e69e20f4c040317fe0f0d09b2d
4,500
## # This module requires Metasploit: http//metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'msf/core/handler/reverse_tcp' require 'msf/base/sessions/command_shell' require 'msf/base/sessions/command_shell_options' module Metasploit3 include Ms...
53.571429
78
0.292889
6266f936ec858a8b12e06b4a87a56a8cc4c243c3
3,154
# -------------------------------------------------------------------------- # # Copyright 2002-2022, OpenNebula Project, OpenNebula Systems # # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # # no...
38
80
0.417565
e86fc264bf6cc2c56fe5f9b5d259106b976b9cd5
404
module Imgproxy module OptionsExtractors # Extracts group of options and trim nils from the end class Group def initialize(*extractors) @extractors = extractors end def extract(raw) values = @extractors.map { |extractor| extractor.extract(raw) } values.delete_at(-1) ...
23.764706
71
0.641089
3326ecceba4087c11b11eaaec242696ae837da57
148
class SalaryQuestionPresenter < QuestionPresenter def response_label(value) value_for_interpolation(SmartAnswer::Salary.new(value)) end end
24.666667
59
0.817568
08185cf89f5272f04a196ebde44119e179288e32
2,583
# 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::Dns::Mgmt::V2016_04_01 module Models # # The resource model definition for a ARM tracked top level resource # class TrackedR...
27.774194
72
0.44096
38015c6452b712a8eed370d8ad3a5b6469d6682d
5,047
# # Be sure to run `pod spec lint LSDateFormat.podspec' to ensure this is a # valid spec and to remove all comments including this before submitting the spec. # # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html # To see working Podspecs in the CocoaPods repo see https://githu...
36.572464
93
0.59045
e2b79a66188639aa04821eb831114a86a2aa59fe
1,423
class Bitchx < Formula desc "BitchX IRC client" homepage "http://bitchx.sourceforge.net/" url "https://downloads.sourceforge.net/project/bitchx/ircii-pana/bitchx-1.2.1/bitchx-1.2.1.tar.gz" sha256 "2d270500dd42b5e2b191980d584f6587ca8a0dbda26b35ce7fadb519f53c83e2" bottle do sha256 "ebb3d7dd9342843c47964d4c...
31.622222
100
0.704146
1a6446ff2ef2cf0fdb8c83ba6c7cad08ad007461
2,202
class OptQuestionsController < ApplicationController # # skip_before_filter :authorize # skip_before_filter :authorize2 # # def new # @user = User.find(params[:user_id]) # @event = Event.find(params[:event_id]) # @optq = @event.opt_questions.new # # respond_to do |format| # format....
26.853659
87
0.599001
ed44d2242d9371fb5e3b695d5cf8f80aff4bd9c1
49
module Responders VERSION = "0.4.8".freeze end
12.25
26
0.714286
bb89bdcfb95971e8653a7ce4f9d95f2ba4da73d9
6,164
module XmlSitemap class Item DEFAULT_PRIORITY = 0.5 # ISO8601 regex from here: http://www.pelagodesign.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/ ISO8601_REGEX = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12...
49.312
305
0.612914
5d4a8eb46dc1b63f322f31a500e9e982b25e48fc
179
# Chef InSpec test for recipe log_hello::default # The Chef InSpec reference, with examples and extensive documentation, can be # found at https://docs.chef.io/inspec/resources/
35.8
78
0.782123
08b57de1bd9bad7b0ed00115a0b627239a7ddeee
1,040
require File.expand_path(File.dirname(__FILE__))+'/../../test_helper' class RedisFollowStoreTest < Test::Unit::TestCase context "RedisStores::Follow" do setup do use_redis_store @klass = Socialization::RedisStores::Follow @base = Socialization::RedisStores::Base end context "method ali...
38.518519
97
0.699038
bb3baa8eab7b9980a20ff2d86c4e92376593145d
1,168
class Zint < Formula desc "Barcode encoding library supporting over 50 symbologies" homepage "http://www.zint.org.uk/" url "https://downloads.sourceforge.net/project/zint/zint/2.9.0/zint-2.9.0.tar.gz" sha256 "fa02fa637f1cecb242bcc751f02710cda4026d41f8f60e0c60a8884525e56fea" license "GPL-3.0" head "https://g...
34.352941
94
0.732877
080e7544d2d5f1cb013aecd2b1517aec023c0d58
7,704
# frozen_string_literal: true require 'test_helper' module Shipit class StacksControllerTest < ActionController::TestCase setup do @routes = Shipit::Engine.routes @stack = shipit_stacks(:shipit) session[:user_id] = shipit_users(:walrus).id end test "validates that Shipit.github is pres...
32.1
112
0.65135
79d29871da096a1600f035eace8a590134b62e90
1,025
APP_ROOT = "#{File.join(File.dirname(__FILE__),"..")}/" require 'yaml' require 'gamebox' require 'releasy' Gamebox.configure do |config| config.config_path = APP_ROOT + "config/" config.data_path = APP_ROOT + "data/" config.music_path = APP_ROOT + "data/music/" config.sound_path = APP_ROOT + "data/s...
31.060606
77
0.677073
793ce008df09082027688c1c88cdf26bbf658e4b
2,602
=begin #Topological Inventory Ingress API #Topological Inventory Ingress API OpenAPI spec version: 0.0.2 Contact: agrare@redhat.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.0.0-SNAPSHOT =end require 'spec_helper' require 'json' require 'date' # Unit tests for TopologicalInventoryIn...
28.911111
102
0.731745
7a75ad716d0a6af8dac396b924626b18a8536801
2,249
# frozen_string_literal: true require 'spec_helper' RSpec.describe AwardEmojisFinder do let_it_be(:issue_1) { create(:issue) } let_it_be(:issue_1_thumbsup) { create(:award_emoji, name: 'thumbsup', awardable: issue_1) } let_it_be(:issue_1_thumbsdown) { create(:award_emoji, name: 'thumbsdown', awardable: issue_1)...
40.890909
126
0.70787
acf77d0dd5c1ec72a614808acedc9554141ea165
828
module PoolArchiveTestHelper def mock_pool_version_service! setup do PoolVersion.stubs(:sqs_service).returns(MockPoolSqsService.new) PoolVersion.establish_connection(PoolVersion.database_url) PoolVersion.connection.begin_transaction joinable: false end teardown do PoolVersion.conn...
26.709677
88
0.678744
1ac4af107081333894a9d4441128253fe6baefaa
600
class TrucksController < ApplicationController before_action :authenticate_user, :dispatcher_or_this_truck_driver skip_before_action :dispatcher_or_this_truck_driver, only: [:index] def index render json: Truck.visible_to(current_user) end def show render json: Truck.find(params[:id]) end def s...
27.272727
106
0.755
1ce4c040b2416ac94c10da5f0206fe2a94d36bf5
564
# == Schema Information # # Table name: morphology_word_verb_forms # # id :bigint not null, primary key # name :string # value :string # created_at :datetime not null # updated_at :datetime not null # word_id :bigint # # Indexes # # index_morphology_word_verb_forms...
23.5
57
0.675532
1a69a76528e6c998b3c3b4d3a94a89ad2e8e7790
493
dir = Pathname(__FILE__).dirname.expand_path / 'adapters' require dir / 'abstract_adapter' require dir / 'in_memory_adapter' # NOTE: this is a temporary work-around to the load error problems, # and is better fixed in dm-core/next. The main reason the fix is # not applied in dm-core/master is because the change is n...
29
69
0.73428
183ab866cdf476c3762b541a22869ee7dfee3e46
700
module Cesri class RecepcionComprobanteResponse attr_reader :response, :state, :messages def initialize(response) @response = response @state = state_value @messages = [] load_messages end def success? @state == 'RECIBIDA' end private def state_value ...
18.918919
72
0.635714
b9ffb84bc8098ff820ab94f3b34cf5816a10b944
8,673
# # == Synopsis # The Threaded module is used to perform some activity at a specified # interval. # # == Details # Sometimes it is useful for an object to have its own thread of execution # to perform a task at a recurring interval. The Threaded module # encapsulates this functionality so you don't have to write it you...
31.197842
127
0.70068
613f518077d071c2452522384fd8340ee1ba801d
363
require "bundler/setup" require "testqit" 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_with :rsp...
24.2
66
0.752066
e892156a4d1619d8845d786c23bfc6638bf0faa2
6,492
require File.join( File.dirname(__FILE__), '..', 'test_helper' ) require 'active_record' begin require 'globalize/model/active_record' rescue MissingSourceFile puts "This plugin requires the Globalize2 plugin: http://github.com/joshmh/globalize2/tree/master" puts raise end require 'globalize2_versioning' # H...
29.375566
100
0.657116
d5741fd4dc358b5ca3a9d2edb96a9992cc1d8c16
1,432
require "pact_broker/pacticipants/generate_display_name" module PactBroker module Pacticipants describe GenerateDisplayName do describe ".call" do TEST_CASES = { "foo" => "Foo", "MyService" => "My Service", "my-service" => "My Service", "my_service" => "My Se...
35.8
79
0.560754
4a87f08453b5b20076944bcd463c3895bece3402
13,642
# Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render invalid all existing # confirmat...
49.071942
154
0.751356
7a798346539467d00366624c609cd41e4aad2451
13,185
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
42.395498
245
0.687979
1aa8868a67c33d1d7b27f154e67190c542c542bc
330
Deface::Override.new(:virtual_path => "spree/admin/shared/sub_menu/_configuration", :name => "add_bank_settings", :insert_bottom => "[data-hook='admin_configurations_sidebar_menu'], #admin_configurations_sidebar_menu[data-hook]", :text => "<%= configurations_sidebar_menu_item('Lista de Bancos', admin_banks_...
82.5
119
0.751515
ffe606eefe58951fa458d89de9491f224a9e15f2
115
require 'rubygems' require 'thin' require 'sinatra' require File.expand_path '../app.rb', __FILE__ run MyApp.new
14.375
46
0.747826
6a97ed16128f59712232bddc23a41d1da08b266f
157
# frozen_string_literal: true ## # Class: Directory model # class Directory < Sequel::Model plugin MatPath::Plugin dataset_module MatPath::Datasets end
15.7
34
0.764331
08f17bfcc242622308e050fd2579828e7e9cb538
336
module BlockStack module Validations class NotEmpty < Validation protected def validate(value, expression) !(value.nil? || value.respond_to?(:empty?) && value.empty?) end def default_message "#{clean_attribute_name} must#{inverse? ? nil : ' not'} be empty." end ...
18.666667
74
0.613095
1d45be1dfc4bed0a12b3f26fae0baf15ec3c4a53
6,777
class Gnuradio < Formula desc "SDK providing the signal processing runtime and processing blocks" homepage "https://gnuradio.org/" url "https://gnuradio.org/releases/gnuradio/gnuradio-3.7.13.4.tar.gz" sha256 "c536c268b1e9c24f1206bbc881a5819ac46e662f4e8beaded6f3f441d3502f0d" revision 4 head "https://github.c...
35.296875
139
0.678619
1c6baff0509eb86af0c54218dea09677ebceb4d2
10,514
module Quickbooks module Service class BaseService include Quickbooks::Util::Logging include ServiceCrud attr_accessor :company_id attr_accessor :oauth attr_reader :base_uri attr_reader :last_response_body attr_reader :last_response_xml XML_NS = %{xmlns="http://sc...
33.591054
131
0.592258
e964d15d31357d903d510f225bfada82aeeb34f0
1,240
# frozen_string_literal: true # Copyright 2021 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...
36.470588
74
0.783065
bfb9b10e8cbc64e215ed32e73c622dc7417c32ed
532
# frozen_string_literal: true Sequel.seed(:development, :test) do # Applies only to "development" and "test" environments def run User.create \ full_name: "Richard Feynman", profession: "Theoretical physicist", username: "rfeynman", password: "271828" end end Sequel.seed do # Wildcard ...
23.130435
91
0.648496
01d231d5ce339d9a650edec45e77ae1a7ff2fdeb
412
## # Random Test assert("Random#srand") do r1 = Random.new(123) r2 = Random.new(123) r1.rand == r2.rand end assert("Kernel::srand") do srand(234) r1 = rand srand(234) r2 = rand r1 == r2 end assert("Random::srand") do Random.srand(345) r1 = rand srand(345) r2 = Random.rand r1 == r2 end asse...
12.484848
26
0.618932
5dbe002e8c77f7fbd18f89808270db396bf18005
1,628
# frozen_string_literal: true $LOAD_PATH.push File.expand_path("../lib", __FILE__) require "magic_lamp/version" Gem::Specification.new do |s| s.name = "magic_lamp" s.version = MagicLamp::VERSION s.authors = ["Michael Crismali"] s.email = ["michael@crismali.com"] s.homepage = "https:...
33.22449
106
0.69656
e286c9722c99938c7f0cc1051ada35677e3b9d2d
2,181
# # a language data file for Ruby/CLDR # # Generated by: CLDR::Generator # # CLDR version: 1.3 # # Original file name: common/main/sr_Latn_YU.xml # Original file revision: 1.11 $ # # Copyright (C) 2006 Masao Mutoh # # This file is distributed under the same license as the Ruby/CLDR. # private def init_data @ho...
33.553846
217
0.711142
7a32a071437798e767b215d4f79bda1c0e8cd985
21,359
# encoding:utf-8 #-- # Copyright (C) Bob Aman # # 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 b...
31.50295
78
0.556206
11226c8c770a47bc65529ec989f60fa26cd5402e
370
require 'mathpack/version' require 'mathpack/statistics' require 'mathpack/sample' require 'mathpack/nonlinear_equations' require 'mathpack/sle' require 'mathpack/approximation' require 'mathpack/integration' require 'mathpack/io' require 'mathpack/functions' require 'mathpack/functional' require 'mathpack/integral_equ...
28.461538
41
0.837838
261565019d456f3a8d4cdb0f9b6598f002bfed65
1,362
require 'azure_generic_resources' class AzureMigrateProjectDatabases < AzureGenericResources name 'azure_migrate_project_databases' desc 'Verifies settings for a collection of Azure Migrate Project Databases for a Azure Migrate Project in a Resource Group' example <<-EXAMPLE describe azure_migrate_project_da...
34.05
129
0.736417
398f4c40e23034eb8f515e941eea1e1c13b192ee
146
require 'mxx_ru/cpp' MxxRu::Cpp::exe_target { required_prj 'so_5/prj.rb' target '_test.bench.so_5.prepared_select' cpp_source 'main.cpp' }
13.272727
42
0.732877
33e80a07381f5d4219e34d5efab6eaf591db3626
1,346
require "spec_helper" describe "modular-scale" do before(:all) do ParserSupport.parse_file("library/modular-scale") end context "called with arguments (1, $value: 2em)" do it "outputs double the first value from the default scale" do expect(".one-base-two").to have_rule("font-size: 2.5em") end...
30.590909
68
0.677563
7ab3c5bccaf3fa7555c3727e2046aa1f3344ce81
8,489
namespace :pl do desc "Ship mocked rpms to #{Pkg::Config.yum_host}" task :ship_rpms do ["el", "fedora"].each do |dist| retry_on_fail(:times => 3) do pkgs = Dir["pkg/#{dist}/**/*.rpm"].map { |f| "'#{f.gsub("pkg/#{dist}/", "#{Pkg::Config.yum_repo_path}/#{dist}/")}'"} unless pkgs.empty? ...
43.984456
179
0.673813
39019a6dca2bfa363579fea8378aac40abd704fc
13,823
# frozen_string_literal: true require 'spec_helper' RSpec.describe ArclightHelper, type: :helper do describe '#collection_active?' do context 'with active collection search' do let(:search_state) do instance_double( 'Blacklight::SearchState', params_for_search: { 'f' => { 'leve...
32.833729
117
0.662808
b9e1bf1344f82f4b8251a43827cc2aa7aa3c6b8e
1,278
module BuildComms class KMS class << self def client @client || @client = Aws::KMS::Client.new end def get_key key, context=nil opts = { :key_id => "alias/#{key}", :key_spec => "AES_256" } if !context.nil? opts[:encryption_context]...
22.034483
100
0.535211
268462b7b2678dff746ffe9ac138e993c5e17407
1,331
class Theater < ApplicationRecord has_many :shows def self.create_theaters Theater.destroy_all # delete this line later paramount = Theater.new paramount.location = "911 Pine St, Seattle, WA 98101" paramount.name = "The Paramount Theater" paramount.klass = "Paramount" paramount.save p...
23.350877
100
0.691961