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
61c0656ab5edd1c939fd17a63532b80ffc4fdfb3
927
# frozen_string_literal: true require 'rails_helper' RSpec.describe SolrDocument do let(:solr_document) { described_class.new(hsh) } let(:hsh) do { "access_identifier_ssim" => "123", "content_metadata_iiif_manifest_field_ssi" => "https://figgy.princeton.edu/concern/scanned_resources/c321a5f1-26e4-...
29.903226
153
0.731392
f804be731f91bf82dc51b6760650b8d740dced45
235
module Coupler::API module LinkageParams class Update < Base def process(data) result = super if data.has_key?('id') result[:id] = data['id'] end result end end end end
16.785714
34
0.531915
61d73dd7b8d3efae044a5b569f9642b7b600b6c1
658
class PlayersController < ApplicationController def show @player = Player.find(params[:id]) end def new @player = Player.new end def create @player = Player.new(player_params) if !@player.valid? || params[:player][:password] != params[:player][:password_confirmatio...
24.37037
99
0.594225
28a5b8737e5d2827edd6a4089221cebc42f551cd
12,666
# encoding: UTF-8 # This file contains data derived from the IANA Time Zone Database # (https://www.iana.org/time-zones). module TZInfo module Data module Definitions module Europe module Chisinau include TimezoneDefinition timezone 'Europe/Chisinau' do |tz| ...
52.995816
70
0.576662
d570f4d41cb2c40cc90c670dc8585f9d6d82873b
3,285
# frozen_string_literal: true module TTFunk class Table class Cff < TTFunk::Table class Index < TTFunk::SubTable include Enumerable # number of objects in the index attr_reader :count # offset array element size attr_reader :offset_size attr_reader :raw_of...
25.866142
78
0.529072
268ab5d1f8f5546277c3072bfaf1d5cc7a10f9a5
511
require 'active_support/concern' module Commentui module ActsAsCommentuiable extend ActiveSupport::Concern class_methods do def acts_as_commentuiable class_exec do has_one :commentui_topic, dependent: :nullify, as: :commentable, c...
22.217391
66
0.58317
1a29d4628c59be5961b563b698bdb752cda4a324
205
class UnborkDefaultValues < ActiveRecord::Migration[6.0] def change change_column :users, :about_me, :text, default: nil change_column :yarn_products, :description, :text, default: nil end end
29.285714
67
0.746341
ed6d38dd7b7a8f30ca77187e677ab56a176907f9
900
class Front::TicketsController < ApplicationController def create @ticket = Ticket.new my_note = Note.find(params[:note_id]) @ticket.note_id = my_note.id elements = params[:articles].split(";") @ticket.value = 0 my_menu_ids = [] my_article_ids = [] elements.each do |e| if (Menu.exists?(code: e)) ...
23.684211
59
0.673333
390b9a5bcfb5cd89e34d426e776cffd84e1cee44
1,551
# frozen_string_literal: true class MatchesController < ApplicationController require_player_login respond_to :html, :json layout 'game', only: :play before_action :set_match, only: %i[show play edit update] def index matches = Match.from_player(current_player_id).with_players.with_rounds @finish...
20.407895
87
0.719536
e86853ea3b01992c77e9a41f950d71d23d8b827d
1,864
require "kingfisher/operation" require "pry" module Kingfisher class RouteSet def initialize @routes = [] end def match(request) mroute = @routes.find { |route| route.match?(request) } Operation.either(->(_){ raise NoRouteError, "#{request.request_method} #{request.path}" }, mroute).re...
21.929412
111
0.590665
e8a920b22f6904b8f026fc4070c2dc9522108b82
1,085
require 'spec_helper' require 'facter/freeradius_version' describe 'freeradius_version', type: :fact do on_supported_os.each do |os, os_facts| context "on #{os}" do let(:facts) { os_facts } before :each do Facter.clear orig_facter_value_method = Facter.method(:value) allow(Fa...
26.463415
70
0.59447
e2bafe409340a4b184a84298421e06d10f5db34e
1,105
# Model: Setting # A setting. # # ## Description # You don't need to use this model directly. Just use: # # * {Aura.set} # * {Aura.get} # class Setting < Sequel::Model plugin :serialization, :yaml, :value def self.seed(type=nil, &blk) super Aura.default :'site.name', "My Site" end # Class method: ge...
18.416667
68
0.600905
ac8851f543f340abbecb037b30db394957082753
3,788
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web serve...
41.173913
102
0.756864
3907fb2138a4fe8dc8fe6be32dfec38e301cd3bd
312
# frozen_string_literal: true class DeviseMailer < Devise::Mailer include AbstractController::Callbacks before_action :add_inline_attachment! private def add_inline_attachment! image = Rails.root.join('app/assets/images/brand.png') attachments.inline['brand.png'] = File.read(image) end end
22.285714
58
0.762821
1832483a767689f1deb45ece0c290039af5ee091
74,335
# 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/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::XRay # @api private module ClientApi include Seahorse::Model...
69.148837
195
0.770337
e25f5fa3e79ef94c382a57401cbeb15896077f6b
4,745
class Twarc < Formula include Language::Python::Virtualenv desc "Command-line tool and Python library for archiving Twitter JSON" homepage "https://github.com/DocNow/twarc" url "https://files.pythonhosted.org/packages/13/4c/162c37f4d1cd3f01eb1dc4e32ca3ea827f4cc75a13ba6b64d0cedf481dec/twarc-2.8.0.tar.gz" sha2...
47.929293
148
0.820653
b922a590c786310a8c69155269eec0c80cc361a2
2,947
# # Be sure to run `pod lib lint ZPayManager.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 = 'ZPayMan...
35.506024
159
0.651849
625f1eaa38bb52daaa29abc54d2d0f6241342ecf
1,078
#--- # Excerpted from "Agile Web Development with Rails", # published by The Pragmatic Bookshelf. # Copyrights apply to this code. It may not be used to create training material, # courses, books, articles, and the like. Contact us if you are in doubt. # We make no guarantees that this code is fit for any purpose. # ...
29.944444
89
0.727273
e24bf0ff2705d94b493217fef27f6cc49443e3d1
146
class AddFeaturedTag < Mongoid::Migration def self.up require File.join(Rails.root, 'db','seeds','tags.rb') end def self.down end end
18.25
57
0.691781
ac7070cf757a596750861b3abd12c403ce969360
317
test_cask 'sevenzip-container' do version '1.2.3' sha256 '1550701e7848fcb94f5b0085cca527083a8662ddeb8c0a7bc5af6bd145797cc1' url TestHelper.local_binary_url('sevenzipcontainer.7z') homepage 'http://example.com/sevenzip-container' depends_on :formula => 'unar' app 'sevenzipcontainer/Application.app' end
28.818182
75
0.798107
28889d4d99eaf4c227dd03196ff475533ec54db6
731
# frozen_string_literal: true class TicketsController < ApplicationController helper_method :ticket def index @tickets = Ticket.all.oldest_first end def show; end def new @ticket = Ticket.new end def edit; end def create @ticket = Ticket.new(permitted_params) if ticket.save ...
14.057692
47
0.674419
08768d90eb9925c6068110f2ea9c38434492ebb5
55,514
# frozen_string_literal: true require_relative 'meta' require_relative 'stock_market' require_relative '../../loan' require_relative '../base' require_relative '../company_price_up_to_face' require_relative '../interest_on_loans' require_relative '../stubs_are_restricted' require_relative '../cities_plus_towns_route_d...
34.078576
125
0.463054
085042814b48fc7b7bada6d03d1daf15c6c0070e
165
require 'test_helper' module OmertaLogger class FamilyRankHistoryTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end end
16.5
55
0.70303
7acda369d38213423f25d6f0bc1147af7a623763
354
require 'fileutils' include FileUtils require 'rubygems' %w[rake hoe newgem rubigen activesupport].each do |req_gem| begin require req_gem rescue LoadError puts "This Rakefile requires the '#{req_gem}' RubyGem." puts "Installation: gem install #{req_gem} -y" exit end end $:.unshift(File.join(Fil...
22.125
59
0.70904
3340383fcc9166ae0cfe0905758b6754d8a56a5e
1,136
$:.push File.expand_path("lib", __dir__) # Maintain your gem's version: require "converters_before_validation/version" # Describe your gem and declare its dependencies: Gem::Specification.new do |spec| spec.name = "converters_before_validation" spec.version = ConvertersBeforeValidation::VERSION spec....
45.44
223
0.733275
01259a7867319205c66715c44c7495d0172d007b
302
module Fastlane module Helper class CryptexHelper # class methods that you define here become available in your action # as `Helper::CryptexHelper.your_method` # def self.show_message UI.message("Hello from the cryptex plugin helper!") end end end end
23.230769
74
0.672185
1852e80509071ac59f8f02890f50c790d927bb8f
211
# frozen_string_literal: true module Gibft class Configuration < Salesforce::Configuration SALESFORCE_INSTANCE_URL = Settings['salesforce-gibft'].url def service_name 'GIBFT' end end end
17.583333
62
0.734597
627b6cb56e406103e13d42bf5c9b2746782dc43f
8,771
module Spree module Admin module NavigationHelper # Make an admin tab that coveres one or more resources supplied by symbols # Option hash may follow. Valid options are # * :label to override link text, otherwise based on the first resource name (translated) # * :route to override auto...
38.638767
151
0.604264
e80b10119545f191dece2d619896be77b7869c58
1,185
require 'spec_helper' describe SportsDataApi::Nhl::Season, vcr: { cassette_name: 'sports_data_api_nhl_season', record: :new_episodes, match_requests_on: [:host, :path] } do subject { SportsDataApi::Nhl::Season } describe '.season?' do context :PRE do it { SportsDataApi::Nhl::Season.valid?(:PR...
28.214286
67
0.628692
e2d022d7fd91f9969795c2fbb7070e0c4761053d
2,160
# frozen_string_literal: true begin require 'nokogiri' rescue LoadError raise "Nokogiri is required for blog post summaries. Add 'nokogiri' to your Gemfile." end # Taken and modified from http://madebydna.com/all/code/2010/06/04/ruby-helper-to-cleanly-truncate-html.html # MIT license module TruncateHTML def sel...
30
108
0.73287
39df9edbc69710012633faa5674f32724bc35931
5,750
# frozen_string_literal: true require "fluent/config/error" module Fluent module Plugin # A simple stand-alone configurable mutator for systemd journal entries. # # Note regarding field mapping: # The input `field_map` option is meant to have a structure that is # intuative or logical for humans ...
37.828947
119
0.628
6112f60be887acd27a46b69506740db78fdcf08a
230
module PuppetGenerator module EntryConverters class File def convert(entries, module_name, class_name) entries.collect { |e| PuppetObjects::File.new( e, module_name , class_name ) } end end end end
23
86
0.686957
9176a63b9522eb652f510fc9a95fe26b970f5f44
12,083
# -*- coding: binary -*- require 'rex/text' require 'tmpdir' require 'nokogiri' require 'fileutils' require 'optparse' require 'open3' require 'date' class Msf::Payload::Apk def print_status(msg='') $stderr.puts "[*] #{msg}" end def print_error(msg='') $stderr.puts "[-] #{msg}" end alias_method :...
35.538235
139
0.674005
1adb723a536a7c52c5b5db63d945d34de81e2313
914
require File.expand_path('../../../../../spec_helper', __FILE__) require 'net/http' require File.expand_path('../fixtures/classes', __FILE__) describe "Net::HTTPHeader#each_value" do before :each do @headers = NetHTTPHeaderSpecs::Example.new @headers["My-Header"] = "test" @headers.add_field("My-Other-Hea...
25.388889
64
0.621444
1d4031bd2962fe379e9e9d32b2c9f54153f0194f
557
require 'bio-ucsc' describe "Bio::Ucsc::Hg19::WgEncodeHaibMethylRrbsGm12892HudsonalphagrowprotSitesRep2" do describe "#find_by_interval" do context "given range chr1:1-800,000" do it 'returns a record (r.chrom == "chr1")' do Bio::Ucsc::Hg19::DBConnection.default Bio::Ucsc::Hg19::DBConnecti...
32.764706
106
0.691203
0391728d3b59659e713e36453541dba8086df759
1,176
# Encoding: utf-8 # # This is auto-generated code, changes will be overwritten. # # Copyright:: Copyright 2015, Google Inc. All Rights Reserved. # License:: Licensed under the Apache License, Version 2.0. # # Code generated by AdsCommon library 0.9.8 on 2015-07-17 13:42:18. require 'ads_common/savon_service' require '...
27.348837
70
0.72619
ffc1d3c5120c0c886d780e48bd487e67aabde25f
788
# # Copyright (C) 2010-2016 dtk contributors # # This file is part of the dtk project. # # 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 # # Unles...
27.172414
74
0.725888
1d65f7069858f23821caa64c32196f534187339a
49,560
# 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::Kusto::Mgmt::V2019_11_09 # # The Azure Kusto management API provides a RESTful set of web services that # interact with Azure Kusto serv...
50.365854
219
0.71707
1177aee92c9bfca80993e9011e8b10b11f0800ad
896
Pod::Spec.new do |s| s.name = 'testPrivatePod' s.version = '0.1.0' s.summary = 'By far the most fantastic view I have seen in my entire life. No joke.' s.description = <<-DESC This fantastic view changes its color gradually makes your app look fantastic! ...
37.333333
112
0.582589
aceb0ee98ff5c9da1cd2ab45de910bda9713950e
788
# frozen_string_literal: true require 'icalendar' require 'rrule' require_relative 'organised_exchange/event' require_relative 'organised_exchange/events_processor' module OrganisedExchange class Calendar def self.parse(raw_data) new(raw_data) end def initialize(raw_data) @calendar = Icalen...
20.205128
59
0.649746
2611977314ebcae66cb1638728afbf6ddc7f8f32
190
class CommunityRecommendationFollowPolicy < ApplicationPolicy def update? false end def create? record.user == user end def destroy? is_owner? || is_admin? end end
13.571429
61
0.694737
1c1edafd31ff5b73b083ca22a1a935b74df27e56
681
require File.join(File.dirname(__FILE__), "../..", 'spec_helper.rb') module Admin describe Dashboard do before(:each) do @activity = [mock(:activity)] end describe "/admin" do it "should request dashboard" do Activity.should_receive(:all).with(:order => "created_at DESC", :limit => 5...
32.428571
106
0.660793
5daf7de4fbdf9339b4d2a44c1e6cd3bab6e762d5
697
Pod::Spec.new do |s| s.name = 'JMJParametricAnimation' s.version = '1.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.homepage = 'https://www.github.com/jjackson26/JMJParametricAnimation' s.authors = { 'J.J. Jackson' => 'jjackson8...
53.615385
114
0.545194
b972ead890df68dda1c7bd89115356dc18c96391
405
# # clear Mongoid::IdentityMap before each job # if ::Mongoid::Compatibility::Version.mongoid3? module Delayed module Plugins class ClearIdentityMap < Plugin callbacks do |lifecycle| lifecycle.before(:invoke_job) do Mongoid::IdentityMap.clear end end en...
20.25
63
0.651852
79ca27a2954388aa9119c7b432ff4311bf5ee69f
1,575
# # Be sure to run `pod lib lint Pilot.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 = 'Pilot' s.ve...
36.627907
97
0.631746
38e46090961bb3345e90bd7c6be6890116af6f0f
1,153
# frozen_string_literal: true class VirtualMachineInstance < ApplicationRecord belongs_to :benchmark_execution validates :benchmark_execution, presence: true has_many :nominal_metric_observations, dependent: :destroy has_many :ordered_metric_observations, dependent: :destroy default_scope { order('created_at...
29.564103
80
0.745013
1a39eab6b51cee0a8b72cf18ea5d41e8e14f98e2
53
module OAuth class Error < StandardError end end
10.6
29
0.754717
269017905d99217aadd7628a6b127573ce011398
178
class CreateGameLibraries < ActiveRecord::Migration[6.1] def change create_table :game_libraries do |t| t.integer :user_id t.integer :game_id end end end
19.777778
56
0.696629
18746ebc1256bc683d5f8306258317869c47a8e5
344
module Spree module BaseHelper def plural_resource_name(resource_class) end def admin_breadcrumbs @admin_breadcrumbs ||= [] end def admin_breadcrumb(*ancestors, &block) admin_breadcrumbs.concat(ancestors) if ancestors.present? admin_breadcrumbs.push(capture(&block)) if block_g...
21.5
63
0.712209
79292330bc68510e9bbdfba63d26663d9144091e
2,653
require 'test_helper' class PasswordResetsTest < ActionDispatch::IntegrationTest def setup ActionMailer::Base.deliveries.clear @user = users(:michael) end test "password resets" do get new_password_reset_path assert_template 'password_resets/new' #メールアドレスが無効 post password_resets_path, p...
34.907895
81
0.693554
5da0c281e6099726cd11a0deb5bfebce97cd68c3
120
require File.dirname(__FILE__) + '/string/conversions' class String #:nodoc: include JetTime::String::Conversions end
24
54
0.775
614e6f600f0a7297335df899e8aa346a6712a7d3
994
require 'rails_helper' RSpec.describe QueryStringFormatter do describe '.normalize' do it 'converts characters into their compatibility characters' do expect(described_class.normalize('2⁵')).to eq('25') end it 'composes all characters into single code points' do expect(described_class.normal...
31.0625
107
0.674044
28301a7265ef3968a165f9d30a14cc3f3ab4b1d5
3,077
require 'big_keeper/dependency/dep_operator' require 'big_keeper/util/gradle_module_operator' require 'big_keeper/util/gradle_file_operator' require 'big_keeper/model/operate_type' require 'big_keeper/util/version_config_operator' module BigKeeper # Operator for podfile class DepGradleOperator < DepOperator B...
41.026667
128
0.735782
3974e228f4ccdd95abd12e6b172f6516ac80fe95
507
class QueryBuilder def initialize(suggestion, body) @suggestion = suggestion @body = body.downcase end def build return suggestion.single if valid_for_single_match? return suggestion.multiple.fetch(body, '') if valid_for_multiple_match? body end private attr_re...
20.28
75
0.674556
08dd5424dbd2a99e2529f59e95c75f5d1b641af7
3,532
RSpec.feature "Export to CSV" do scenario "Export a csv file as an attachment" do given_i_am_an_auditor_belonging_to_an_organisation and_there_are_three_content_items when_i_export_an_audit_report then_i_receive_the_report_in_csv_format end scenario "Apply filters" do given_i_am_an_auditor_be...
34.291262
92
0.746319
28c83f8102cab4447f5d241c7d7703744f4a8648
701
Pod::Spec.new do |s| s.name = 'AWSS3' s.version = '2.6.29' 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 = 'http://aws...
38.944444
157
0.606277
5d16e7a4439b6664cafd0c95dfac4418aac4b232
2,159
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. module HermesHelper # BUILD_TYPE = :debug BUILD_TYPE = :release end Pod::Spec.new do |spec| spec.name = "hermes-engine" spec.v...
45.93617
178
0.689671
ab6d86db619f0ae187556508e1476e1086fd61d8
378
require 'spec_helper' describe 'rabbitmq' do let(:facts) do { :boxen_home => '/test/boxen' } end it do should include_class('homebrew') should contain_homebrew__formula('rabbitmq'). with_before('Package[boxen/brews/rabbitmq]') should contain_package('boxen/brews/rabbitmq')...
16.434783
57
0.62963
91fe969bae5f0889381f8f396e617adc20a07940
485
require 'voom/presenters/dsl/components/event_base' module Voom module Presenters module Plugins module Markup class Component < DSL::Components::Base attr_reader :document, :height def initialize(document, **attributes, &block) super(type: :markup, **attributes, &b...
21.086957
56
0.587629
21b2784fdc558651101d8d5b41f08df00da292b7
135
# Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: '_yms_session'
33.75
73
0.8
e23333e43cacda86c2f62d26fd408666672ccb46
1,018
class VotesController < ApplicationController before_action :find_paper before_action :require_editor def create if params[:commit].include?("in scope") puts "IN SCOPE" kind = "in-scope" elsif params[:commit].include?("out of scope") puts "OUT OF SCOPE" kind = "out-of-scope" e...
24.238095
78
0.657171
3855df358717ef9384ceb38d604b44fc1cc51e3f
4,655
module PaxosAcceptorModule bootstrap do connect <~ [["127.0.0.1:12346", ip_port]] end bloom do #Any of the Acceptors waits for a Prepare message from any of the Proposers. If an Acceptor receives a Prepare message, #the Acceptor must look at the identifier number n of the just received Prepare messa...
95
262
0.699463
1a3725b6ce2c6164efcb9120726a7cdae580410e
1,872
class LocationsController < ApplicationController get '/locations' do @locations = Location.all erb :'locations/index' end get '/locations/new' do redirect_login @current_user = User.find_by(id: session[:user_id]) erb :'locations/new' end post '/locations' do redirect_login if...
26.366197
101
0.663996
bf545f2ecc3ac29d66c09fcdc4b8161c04a5bfe3
1,035
require 'active_admin/component' module ActiveAdmin module BatchActions # Build a BatchActionForm class BatchActionForm < ActiveAdmin::Component builder_method :batch_action_form attr_reader :prefix_html def build(options = {}, &block) options[:id] ||= "collection_selection" ...
26.538462
90
0.657971
e2fef7560c8413416240d88a8547347438d0dead
5,099
# # Be sure to run `pod spec lint DLTitleImageControl.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:...
37.218978
107
0.600902
e90c1aa66190d14c2c6981bf78dc79a229c94710
806
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: registration.service.proto for package 'binocular.comm' require 'grpc' require 'registration.service_pb' module Binocular module Comm module RegistrationService class Service include GRPC::GenericService self.marshal_cl...
26.866667
65
0.712159
accf95bacf16298c97118c67012a52480fcb9550
43
module ChildProcess VERSION = "0.3.9" end
14.333333
19
0.72093
d565f47ff8f2d85390f8ae6a7e2b49c4a88ea055
3,099
#-- encoding: UTF-8 #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2017 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject,...
32.28125
104
0.732817
87fa16b5b0a31d2794195c1907c4d91151426831
33,980
# coding: utf-8 require 'rspec' require 'arangodb.rb' describe ArangoDB do api = "/_api/collection" prefix = "api-collection" context "dealing with collections:" do ################################################################################ ## reading all collections #####################################...
39.192618
152
0.579429
1886673935c399d05b628a3c921d3bc478f105ab
7,115
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/contactcenterinsights/v1/contact_center_insights.proto for package 'Google.Cloud.ContactCenterInsights.V1' # Original file comments: # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may...
69.07767
196
0.710471
38bfd36db102c8e3dc8637d970999449d52105d5
334
require "spec_helper" require "yaml_recrypt/gpg" RSpec.describe YamlRecrypt::Gpg do it "decrypts GPG correctly" do pt = File.open(PLAINTEXT_FILE, 'r') { |f| f.read } ct = File.open(GPG_ENCRYPTED_FILE, 'r') { |f| f.read } decrypted = YamlRecrypt::Gpg.decrypt(ct, GPG_HOME) expect(decrypted).to eq ...
23.857143
58
0.676647
615acc6fb7f769243564289336eb62329a98ce51
106
require_relative '../lib/rack/traffic_logger' require 'irb' require 'irb/completion' ARGV.clear IRB.start
17.666667
45
0.792453
ab35304e506909d1fb410829ce8ffa4c20b4859a
2,662
module Enscalator module Plugins # VPC NAT Gateway plugin module NATGateway # Allocate new elastic IP in given VPC template # # @param [String] name eip resource name # @param [Array<String>] depends_on list of resource names this resource depends on # @return [Hash] result of Fn...
36.972222
120
0.599925
28f54c007bef1976f57ad0b8c42f4b15196b1ba4
26,973
##########################GO-LICENSE-START################################ # Copyright 2018 ThoughtWorks, 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/li...
93.982578
199
0.863159
61fbf03de628d10144b9177c38dc7839510f476b
1,997
require 'spec_helper' describe FakeBraintree::SinatraApp do context "Braintree::Transaction.sale" do it "successfully creates a transaction" do result = Braintree::Transaction.sale(:payment_method_token => cc_token, :amount => 10.00) result.should be_success end context "when all cards are d...
30.723077
99
0.711067
bbe6ea9a5dadd5bed6bc6f77f32a767dd0d570c1
1,107
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'rack/objectspace/version' Gem::Specification.new do |spec| spec.name = "rack-objectspace" spec.version = Rack::Objectspace::VERSION spec.authors = ["Iain Beeston"] sp...
35.709677
94
0.655827
33d7458bd2737c864e9ac7b52ae53b8947d18eee
927
module Fog module Storage class Rackspace class Real # Get details for object # # ==== Parameters # * container<~String> - Name of container to look in # * object<~String> - Name of object to look for # @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404 ...
28.090909
95
0.540453
79f7e5bcfc7e384ce62efa96f40411be0421e8c7
242
class AddIncompleteFlagToResponse < ActiveRecord::Migration[4.2] def change add_column :responses, :incomplete, :boolean, :default => false, :null => false end def down remove_column :responses, :incomplete, :boolean end end
24.2
83
0.727273
6a531bf3e44e4d21e0ffb46880c77c31f4e64964
124
# frozen_string_literal: true class HelpController < ApplicationController skip_before_action :verify_authentication end
20.666667
44
0.862903
1a789e6c7f0cc38be2ca2d726f99dd01eb4d4b00
2,000
ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") require 'test_help' class Test::Unit::TestCase # restful_authentication test helpers. include AuthenticatedTestHelper # Transactional fixtures accelerate your tests by wrapping each test method # in a transac...
42.553191
89
0.748
2150a086078bf14f2311fd36a79c529bf43ace36
1,542
# frozen_string_literal: true # Copyright (C) 2016-2020 MongoDB 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 ap...
29.09434
79
0.680285
1a614ac86e3fb1d7dbf9ffcfe34b7e1c6c2ea04e
1,750
class Librttopo < Formula desc "RT Topology Library" homepage "https://git.osgeo.org/gitea/rttopo/librttopo" url "https://git.osgeo.org/gitea/rttopo/librttopo/archive/librttopo-1.1.0.tar.gz" sha256 "2e2fcabb48193a712a6c76ac9a9be2a53f82e32f91a2bc834d9f1b4fa9cd879f" license "GPL-2.0-or-later" head "https://gi...
35.714286
106
0.668571
33415a80fb9d1a7eacc6944739c0a1d97798e4cf
40,249
require 'openstudio' if /^1\.8/.match(RUBY_VERSION) class Struct def to_h h = {} self.class.members.each{|m| h[m.to_sym] = self[m]} return h end end end module THREE FrontSide = 0 BackSide = 1 DoubleSide = 2 end # Va3c class converts an OpenStudio model to vA3C JSON format for re...
40.903455
187
0.69152
011a9d1e630a70381c81249fa2d6dcb89c457a3b
1,876
# # Author:: AJ Christensen (<aj@opscode.com>) # Copyright:: Copyright (c) 2008 OpsCode, 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 may obtain a copy of the License at # # h...
31.79661
124
0.650853
5dfdc69dbfd7a45a56969378d1c5eac6cbd7f878
1,154
require "bundler/setup" require 'twitter' require 'pry' Bundler.require :default Dir[File.dirname(__FILE__) + '/lib/*.rb'].each { |file| require file } client = Twitter::REST::Client.new do |config| config.consumer_key = "MoUVWybJPWTR94gPIGgI21mfo" config.consumer_secret = "NdpPVsv4yHXSkSADY496XYOvnw7Zp...
25.086957
83
0.712305
03dc6d81c8d08237a742ea37cff289b630c7ccbe
773
# frozen_string_literal: true module Nanoc module CLI module StreamCleaners # Superclass for all stream cleaners. Stream cleaners have a single method, # {#clean}, that takes a string and returns a cleaned string. Stream cleaners # can have state, so they can act as a FSM. # # @abst...
32.208333
111
0.65718
791536eb5c2d1846908c4f923f6edf8af2f469cd
186
require 'test_helper' class AppointmentsControllerTest < ActionDispatch::IntegrationTest test "should get new" do get appointments_new_url assert_response :success end end
18.6
66
0.790323
e2a016a99076f344d18fb4220d1c61b09d212a3a
372
# frozen_string_literal: true module Gitlab module Checks class BaseBulkChecker < BaseChecker attr_reader :changes_access delegate(*ChangesAccess::ATTRIBUTES, to: :changes_access) def initialize(changes_access) @changes_access = changes_access end def validate! ra...
18.6
63
0.69086
38dd0975720a9af49900343609dad03eabdbfc28
181
# frozen_string_literal: true class FakeMigration < ActiveRecord::Migration[6.0] turn_async def change create_table('tests') do |t| t.string(:test) end end end
16.454545
50
0.690608
f720478e8bbf6204d34815eb6a7287939df82911
949
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
28.757576
74
0.751317
6a5c9382688d8453d4294925d0d78dd89987432c
5,426
# 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 # # Parameters supplied to the Create operation. # class ClusterCreateParameters ...
33.493827
79
0.51972
ffe010c01e83085e2ce9a6d7ed4c506d6b1b3eb1
146
class AddIsPublicToFileUploads < ActiveRecord::Migration def change add_column :file_uploads, :is_public, :boolean, default: true end end
24.333333
65
0.780822
e8141bfb3cfa7cf0a58ba44234e6f816d7a23f29
5,900
require_relative '../../../lib/commands' module Unipept class UnipeptPept2functTestCase < Unipept::TestCase def test_default_batch_size command = Cri::Command.define { name 'pept2funct' } pept2funct = Commands::Pept2funct.new({ host: 'http://api.unipept.ugent.be' }, [], command) assert_equal(10...
41.843972
160
0.682542
ed9b9361045d4b15fc29b60d570fc963ed5ec149
1,830
# frozen_string_literal: true class Folio::Blog::Article < Folio::Blog::ApplicationRecord extend FriendlyId include Folio::HasAttachments include Folio::Publishable::WithDate include Folio::HasAtoms::Basic self.table_name = "folio_blog_articles" friendly_id :title, use: %i[slugged history] # Validatio...
25.774648
60
0.594536
e243f6d8bc85f4f13adc846b4c131763e329c5fb
1,468
require 'spec_helper' describe Sly::ProjectManager do SLY_LOCATION = "/tmp/.sly" before :each do setup_complete_home_directory @manager = Sly::ProjectManager.new end after :each do rm_rf SLY_LOCATION if File.exists?(SLY_LOCATION) end describe :available_projects do it "returns an array...
29.36
154
0.688011
e90cb5747fc8af61bcb2c96fa2bfe77eeb7ea379
706
# frozen_string_literal: true Pharos.addon 'kubernetes-dashboard' do version '1.8.3' license 'Apache License 2.0' install { apply_resources(heapster_version: '1.5.1') logger.info { "~~> kubernetes-dashboard can be accessed via kubectl proxy. Check proxy URL with: kubectl cluster-info" } service_ac...
33.619048
142
0.71813
bf8e15b428f821752581052f4d1dda936fe619ba
1,891
# -*- encoding: utf-8 -*- # stub: bundler 1.9.6 ruby lib Gem::Specification.new do |s| s.name = "bundler" s.version = "1.9.6" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.6") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["Andr\u{e9} Arko", "Terence Lee", "...
39.395833
142
0.632998
113aefa6733d2cd2e2284b768d5d9a5121331aab
420
require 'minitest/autorun' require './lib/m2y_biz' class M2YBizTest < Minitest::Test def test_token connect = M2yBiz::Connect assert_equal ["Bearer ey", "200"], connect.test_call end def test_registration registration = M2yBiz::Registrations keys = M2yBiz::Keys user_hash = keys::User::USER_H...
24.705882
85
0.730952
e945492056a0cbf12e7587927fef21d332fa76fd
3,503
require 'date' class Shift < ApplicationRecord has_many :days, :dependent => :destroy belongs_to :team belongs_to :employee has_many :requests, :dependent => :destroy has_many :responses, :dependent => :destroy accepts_nested_attributes_for :days attr_accessor :assignment_method, :weeks_to_assign, :sele...
30.198276
139
0.688267
08b5fbbf2cb148762ca331f363c675389c8c330d
860
Pod::Spec.new do |s| s.name = 'GEOSwift' s.version = '8.0.2' s.swift_version = '5.1' s.cocoapods_version = '>= 1.4.0' s.summary = 'The Swift Geometry Engine.' s.description = <<~DESC Easily handle a geometric object model (points, linestrings, polygons etc.) and related topological operations (inte...
33.076923
93
0.648837