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
6a433e3ec6cdd8aa2cb02de83f33181a17c870dd
8,614
# Copyright 2018 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, ...
49.222857
141
0.586951
e2614798c6794a2e502f70164bfe797f6e5e58f3
4,779
module Insured class InteractiveIdentityVerificationsController < ApplicationController before_action :set_current_person def new service = ::IdentityVerification::InteractiveVerificationService.new service_response = service.initiate_session(render_session_start) respond_to do |format| ...
41.556522
163
0.69638
b9b07287501bd197f1a98eb2006c334852d72be2
2,318
# # Author:: Jason J. W. Williams (williamsjj@digitar.com) # Copyright:: Copyright (c) 2011 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 ...
35.661538
139
0.601381
6a903b1d62a228052963efff4d06a48d66903050
2,444
# frozen_string_literal: true module Swagger module Schemas module Health class Prescriptions include Swagger::Blocks swagger_schema :Prescriptions do key :required, %i[data meta] property :data, type: :array, minItems: 1, uniqueItems: true do items do ...
32.586667
100
0.589607
62c80d8d7e06da3861deee326b4cf78fdb2f74e5
19,040
# encoding: utf-8 require "logstash/devutils/rspec/spec_helper" require "logstash/filters/aggregate" require_relative "aggregate_spec_helper" describe LogStash::Filters::Aggregate do before(:each) do reset_pipeline_variables() @start_filter = setup_filter({ "map_action" => "create", "code" => "map['sql_dura...
43.669725
349
0.636345
391ed898c8cca178fac5dab2c4e2bc2a168db4bc
1,254
# -*- encoding: utf-8 -*- # stub: globalid 0.3.6 ruby lib Gem::Specification.new do |s| s.name = "globalid" s.version = "0.3.6" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.require_paths = ["lib"] s.authors = ["David Heinemeier Hansson"] s.date ...
33.891892
105
0.651515
083d22206ed18ba99b698ad00a7c2a2fc9095ab6
359
# 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::Consumption::Mgmt::V2019_06_01 module Models # # Defines values for CategoryType # module CategoryType Cost = "Cost" ...
21.117647
70
0.688022
1dc70bebccca4ea86ab2338c3f0baf8d17ac6521
2,260
module ActiveScaffold::Actions module FieldSearch include ActiveScaffold::Actions::CommonSearch def self.included(base) base.before_filter :search_authorized_filter, :only => :show_search base.before_filter :store_search_params_into_session, :only => [:list, :index] base.before_filter :do_se...
37.04918
124
0.734956
bbbfa0309026ccb997a54427afbfd5138b42dcba
930
Pod::Spec.new do |s| s.name = "TastyTomato" s.version = "0.36.0" s.summary = "The Tasty Tomato." s.description = <<-DESC Get all the awesome custom UI elements that resmio uses to make your App really beautiful! DESC s.homepage = "https://github.com/resm...
29.0625
64
0.586022
ffa6fbadc99ffff48a61fb8f75ae1c8064e9e1bd
181
require 'active_record' class DelayedJobTracking < ActiveRecord::Base belongs_to :delayed_job, :class_name => "::Delayed::Job" belongs_to :job_owner, :polymorphic => true end
22.625
58
0.756906
4ad89ef1b91a8dbdb0327c669096f51a36735bb8
1,157
class Roswell < Formula desc "Lisp installer and launcher for major environments" homepage "https://github.com/roswell/roswell" url "https://github.com/roswell/roswell/archive/v17.2.8.74.tar.gz" sha256 "703095b28cc2985494976b708853566225dd70d4beb1359a1eb7f7038332c221" head "https://github.com/roswell/roswell....
35.060606
92
0.680207
ff225a66674cbea27e27b4944e4db4ebf426a6a5
311
cask :v1 => 'boxcryptor-classic' do version :latest sha256 :no_check url 'https://www.boxcryptor.com/download/Boxcryptor_Installer.dmg' name 'Boxcryptor' name 'Boxcryptor Classic' homepage 'https://www.boxcryptor.com/en/boxcryptor-classic' license :commercial app 'Boxcryptor Classic.app' end
23.923077
68
0.749196
acc299d3f3f53149c90a026c111d66b46c237bba
956
require 'rails_helper' RSpec.describe ButtonComponent, type: :component do let(:type) { nil } let(:outline) { false } let(:content) { 'Button' } let(:options) do { type: type, }.compact end subject(:rendered) { render_inline ButtonComponent.new(outline: outline, **options) { content } } i...
22.232558
99
0.665272
7aeb7b75dc2ace689eff7d9a4a0ea2c618d65cf5
888
# frozen_string_literal: true class AddSettingsToCommunities < ActiveRecord::Migration[4.2] def change add_column :communities, :settings, :text, default: "{}" Community.all.each do |c| c.update_attribute(:settings, case c.name when "Touchstone" ...
42.285714
132
0.533784
6a1e1620e815f1591c60ff3bbfb6c8ad06bb0dea
985
# -*- encoding : utf-8 -*- # # Cookbook Name:: ruby_install # Attributes:: default # # Author:: Ross Timson <ross@rosstimson.com> # # Copyright 2013, Ross Timson # # 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...
35.178571
104
0.750254
b9a848ea9f485df40f2ccef9d7c2af69397f1cd3
101
module TinderfieldsUserImpersonate class ApplicationController < ::ApplicationController end end
20.2
55
0.851485
f7f0deb751bb4e6cd93d5f3e4a4d49718a81e9ea
20,994
# frozen_null_literal: true module FinishedGoodsApp class TitanRepo < BaseRepo crud_calls_for :titan_requests, name: :titan_request def find_pallet_for_titan(pallet_id) # rubocop:disable Metrics/AbcSize oldest_id = DB[:pallet_sequences].where(pallet_id: pallet_id).order(:id).get(:id) query = Mes...
48.373272
174
0.691245
9132f38b7710ffc153475bf8ed987de25b6d1cb0
2,802
require 'travis' class BuildsController < ApplicationController respond_to :json # github does not currently post the payload with the correct # accept or content-type headers, we need to change the # the github-service code for this to work correctly skip_before_filter :verify_authenticity_token, :only => ...
31.483146
121
0.676303
1ad027b902611e2af075075260a10c4fdf261b07
148
FactoryBot.define do factory :shipping_rate, class: Spree::ShippingRate do cost { BigDecimal(10) } shipping_method shipment end end
18.5
55
0.722973
6a7da7c84d2513d3f52ca90f6e2623545af9bbad
552
ENV['CUCUMBER_COLORS'] = nil $:.unshift(File.dirname(__FILE__)) # For Travis.... require 'cucumber/encoding' require 'simplecov_setup' require 'pry' require 'cucumber' RSpec.configure do |c| c.before do ::Cucumber::Term::ANSIColor.coloring = true end end module RSpec module WorkInProgress def pendin...
18.4
79
0.682971
e9a0bec56f7196cb05d134b978c19a616127ff9a
6,272
describe "hist" do before do Pry.history.clear @hist = Pry.history @str_output = StringIO.new @t = pry_tester history: @hist do # For looking at what hist pushes into the input stack. The implementation # of this helper will definitely have to change at some point. def next_input ...
28.38009
145
0.602838
f7a4b473f8eaf28cc78916450152ecbe3ff430d4
1,138
require_relative "../test_helper" class I18nIntegrationTest < ActionDispatch::IntegrationTest def collect_combined_keys(hash, ns = nil) hash.collect do |k, v| keys = [] keys << collect_combined_keys(v, "#{ns}.#{k}") if v.is_a?(Hash) keys << "#{ns}.#{k}" end.flatten end def test_transl...
29.179487
81
0.644112
f81be91217b7b2049619438cba48550f8752b781
1,226
module Padrino module WebSockets module SpiderGazelle module Routing require 'spider-gazelle/upgrades/websocket' ## # Creates a WebSocket endpoint using SpiderGazelle + libuv. # # It handles upgrading the HTTP connection for you. # You can nest this inside co...
32.263158
95
0.601142
21ce84e10f0c4652a1ec4d93d48d427652263093
14
json.msg @msg
7
13
0.714286
798ea1f73827bb85f5d9b064f2fc5c9958ceb758
2,807
RSpec.shared_examples_for 'all client drafts' do def validate_request expect(handshake.to_s).to eql(client_request) handshake << server_response expect(handshake.error).to be_nil expect(handshake).to be_finished expect(handshake).to be_valid end it 'is valid' do handshake << server_resp...
25.752294
79
0.676167
5de50d297c1f363738e815870f7d7d8e110cb5bb
5,512
# @file TestSBMLDocument.rb # @brief SBMLDocument unit tests # # @author Akiya Jouraku (Ruby conversion) # @author Ben Bornstein # # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting the file located...
31.678161
79
0.642598
1db5205051497860418ece1180debf2922bf6526
2,454
#-- encoding: UTF-8 #-- copyright # OpenProject is an open source project management software. # Copyright (C) 2012-2021 the OpenProject GmbH # # 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 ChiliProj...
30.675
91
0.732681
034bfd2784482a68a6369fe285f959123d9717e8
585
# frozen_string_literal: true require 'spec_helper' RSpec.describe Projects::Security::ConfigurationHelper do let(:current_user) { create(:user) } describe 'security_upgrade_path' do subject { security_upgrade_path } it { is_expected.to eq("https://#{ApplicationHelper.promo_host}/pricing/") } end d...
29.25
151
0.769231
b9edb0974630a19bf0574e86d01c4dcb5607a625
3,513
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' class Metasploit3 < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner def initialize ...
26.216418
96
0.603473
b934cea575f20631c62f5ff37ad0538e899b92ca
235
# encoding: utf-8 Refinery::I18n.configure do |config| config.default_locale = :en config.current_locale = :en config.default_frontend_locale = :en config.frontend_locales = [:en] config.locales = {:en=>"English"} end
16.785714
38
0.702128
6a66b38d486026c3842ba1e991743a0a72381aec
152
class CreateItems < ActiveRecord::Migration[6.1] def change create_table :items do |t| t.string :name t.timestamps end end end
15.2
48
0.651316
1ce24fe85f51be69bb1671ad0aca3033a4577ee0
185
namespace :db do desc "Upload config/database.yml" path = "config/database.yml" task :upload do on roles(:db) do upload!(path, shared_path.join(path)) end end end
18.5
43
0.659459
26dd5260d59e6079e5799b51966d7def2786160e
1,369
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
28.520833
100
0.711468
0856e431377d4e601cbd466e24ea1aff0a8bd7a4
924
require "rails_helper" RSpec.describe Api::V1::UsersController, type: :routing do describe "routing" do it "routes to #index" do expect(get: "/api/v1/users").to route_to("api/v1/users#index", format: :json) end it "routes to #show" do expect(get: "/api/v1/users/1").to route_to("api/v1/users#...
30.8
99
0.623377
ab50d2f3730a7cb1283f4d69618ba5a3fbea0221
9,191
# Add the dependencies file to require vendor libs require File.expand_path(File.join(File.dirname(__FILE__), 'dependencies')) class ActiveDirectoryComputerRemoveGroupsV1 # Prepare for execution by configuring the initial LDAP configuration, # initializing Hash objects for necessary values, and validate the prese...
41.03125
118
0.64215
5d6cb227030c3e260e284305255f9bfd5429f867
2,296
require "language/haskell" class Elm < Formula include Language::Haskell::Cabal desc "Functional programming language for building browser-based GUIs" homepage "https://elm-lang.org" url "https://github.com/elm/compiler/archive/0.19.1.tar.gz" sha256 "aa161caca775cef1bbb04bcdeb4471d3aabcf87b6d9d9d5b0d62d3052...
29.818182
94
0.597125
1c554d255b0066200fca5362b4df3bc33b69cf11
370
# frozen_string_literal: true require 'rails_helper' describe PublishChannel do subject { described_class.new(uri) } context "with a vocab term" do let(:uri) { AICPublishChannel.TrustedParty } its(:uri) { is_expected.to eq("http://definitions.artic.edu/publish_channel/TrustedParty") } its(:pref_label)...
28.461538
96
0.732432
61d7c7ecced53ca3841205d9cef61aef6893e7be
3,034
require File.expand_path('../boot', __FILE__) require 'csv' 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 #...
43.971014
100
0.735662
e8070b83409369b320c916752f5ce78e06af14af
184
FactoryGirl.define do factory :fide_rating do association :fide_player rating { 1 + rand(2500) } list "2011-11-01" games { rand(30) } end end
20.444444
35
0.570652
2604a85b96bd5ee8bb4907d67400f413bb215b5f
892
module Hippo_eyeDoc::TransactionSets module HIPAA_999 class L2110AK2 < Hippo_eyeDoc::TransactionSets::Base loop_name 'L2110AK2' #Implementation Data Element Note #Implementation Data Element Note segment Hippo_eyeDoc::Segments::IK4, :name => 'Implementation Data El...
33.037037
132
0.454036
ffef1f9f51611400f37559c59378a288a9edc857
1,237
module VCloudCloud module Steps class ReconfigureVM < Step def perform(name, description, resource_pool, networks, &block) vapp = state[:vapp] = client.reload state[:vapp] vm = state[:vm] = client.reload state[:vm] vm.name = name unless name.nil? vm.description = description...
34.361111
102
0.625707
bb375076c67c581df7637af1f33c6454207b0e79
6,149
# encoding: utf-8 require 'abstract_unit' require 'action_view/dependency_tracker' class NeckbeardTracker def self.call(name, template) ["foo/#{name}"] end end class FakeTemplate attr_reader :source, :handler def initialize(source, handler = Neckbeard) @source, @handler = source, handler end end ...
31.213198
113
0.713612
2185a876752a469fef8603333fc972065add1f55
2,042
# This file is part of Metasm, the Ruby assembly manipulation suite # Copyright (C) 2006-2009 Yoann GUILLOT # # Licence is LGPL, see LICENCE in the top-level directory # metasm dasm plugin: retrieve a section section, and disassemble everything it can, skipping existing code and nops # usage: load the...
28.760563
117
0.604799
e8ea6a5394b322d017f2b61a4a88fbda2e65a325
1,747
class UsersController < ApplicationController before_action :set_user, only: %i[show edit update destroy] # GET /users # GET /users.json def index @users = User.all end # GET /users/1 # GET /users/1.json def show; end # GET /users/new def new @user = User.new end # GET /users/1/edit ...
22.397436
80
0.637092
9149d9401e9ee27a741b023707251e7fcbcbd5da
2,442
require "spec_helper" describe Mongoid::Timestamps do describe ".included" do let(:document) do Dokument.new end let(:fields) do Dokument.fields end before do document.run_callbacks(:create) document.run_callbacks(:save) end it "adds created_at to the document...
21.610619
85
0.67199
ff6cf2880bf5747e19d69ea42ffadc5b1045ff6d
135
class addNumbers def self.one x =+ 1 puts x end def self.five 5.times do addNumbers.five end puts x end end
11.25
34
0.607407
113199085fed230420561d1becf10833fc2237d6
14,416
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ # # Copyright (c) 2016, Electric Power Research Institute (EPRI) # All rights reserved. # # OpenADR ("this software") is licensed under BSD 3-Clause license. # # Redistribution and use in source and binary forms, with or without m...
73.177665
206
0.636792
627af19b5e9521eb7ee83d8f4ca67f4e2028fd06
974
require 'spec_helper' describe 'user:reset_login_tokens' do include_context 'rake' let!(:first_user) { create_user(email: 'first@plink.com') } let!(:second_user) { create_user(email: 'second@plink.com') } before do first_user.update_attribute('modified', 10.days.ago) second_user.update_attribute('mod...
37.461538
82
0.777207
5da611217c50d36ee5e16a135ca8b04a8646716d
44
module ShippingEasy VERSION = "0.7.1" end
11
19
0.704545
91a6a08bf139b2e18e1dcc3ff92a9bcbed65ca20
749
require 'spec_helper' describe Project do let(:url) { 'git@github.com:joelmoss/strano.git' } let(:user) { FactoryGirl.create(:user) } let(:cloned_project) { FactoryGirl.build_stubbed(:project) } before(:each) do Github.strano_user_token = user.github_access_token @project = Project.create :url => url...
27.740741
98
0.680908
26b4b4ebc860bb9dc541cd6e184099e49c24107a
3,209
require File.dirname(__FILE__) + '/../../spec_helper' describe Users::OpenAuthenticationsController do before(:each) do controller.set_current_user = nil end before(:all) do truncate_all_tables Language.create_english CuratorLevel.create_enumerated @user = User.gen @other_user = User.ge...
43.364865
115
0.662823
5dfcb3f829aa28d9d3fd899419f3dcc1aac96b1e
4,284
# frozen_string_literal: true require_relative 'spec_helper' describe 'asciidoctor-pdf' do context 'Packaging' do it 'should install bin script named asciidoctor-pdf' do bin_script = (Pathname.new Gem.bindir) / 'asciidoctor-pdf' bin_script = Pathname.new Gem.bin_path 'asciidoctor-pdf', 'asciidoctor-...
45.094737
153
0.692577
ab89456902532978204c7076052050c8aff6f65b
1,150
# frozen_string_literal: true require 'spec_helper' module GraphqlRails module Model RSpec.describe BuildGraphqlInputType do subject(:builder) { described_class.new(name: name, description: description, attributes: attributes) } let(:name) { 'DummyInput' } let(:description) { 'This is dummy i...
27.380952
109
0.630435
397a1f24585556d32892faae9b1f735c35a62d15
97
require 'dry-struct' module OmniScrapperOutput module Types include Dry.Types() end end
12.125
25
0.742268
1d546eec8dea36bbaa9d0ce246bd2c94122c5ad6
1,125
get '/decks/:deck_id/cards' do @deck = Deck.find(params[:deck_id]) @game = @deck.game_for_user(current_user) @cards = @deck.cards.study_order haml :'cards/index' end get '/decks/:deck_id/cards/new' do @deck = current_user.created_decks.find(params[:deck_id]) haml :'cards/new' end get '/decks/:deck_id/card...
26.162791
97
0.704
38deeb3b68d029088c3d9d5d5b3ac65e1a185876
60
puts "Enter Your Name" name = gets.chomp puts "Hi, #{name}"
15
22
0.666667
ac5018af6a71d09df181ff1a4fa39c779e8be1c4
3,461
require 'net/http' class NodesController < ApplicationController before_action :set_node, only: %i[show edit update destroy] # GET /nodes # GET /nodes.json def index @nodes = Node.all end # GET /nodes/1 # GET /nodes/1.json def show; end # GET /nodes/new def new @node = Node.new end ...
26.623077
100
0.658191
ed063aafbcb3407c38d8d676297374cec44128b7
1,239
class AuthenticationMailer < Devise::Mailer helper :application include Devise::Controllers::UrlHelpers def reset_password_instructions(record, token, opts={}) link_to_reset_password = edit_password_url(record, reset_password_token: token) twilio_client.messages.create( from: ENV["TWILIO_APP_PHONE_...
31.769231
87
0.728006
263abb360f684fb73d8c899530b071ccc36ec172
964
module Importex class Column attr_reader :name def initialize(name, options = {}) @name = name @type = options[:type] @format = [options[:format]].compact.flatten @required = options[:required] end def cell_value(str, row_number) validate_cell(str) @type ? @ty...
25.368421
116
0.602697
f7ec1b1ae429d958e70559201ac821c4b5fdfe81
4,196
require 'spec_helper' describe Volt::PhoneNumberValidator do subject { Volt::PhoneNumberValidator.new(*params) } let(:params) { [model, field_name, options] } let(:model) { Volt::Model.new phone_number: phone_number } let(:field_name) { :phone_number } let(:options) { true } let(:valid_us_number) { '(123...
28.544218
77
0.635844
e2b57b36d1a040a7e47c18d28a74d6de279453fd
215
require "google/cloud/language" class GoogleDriveWrapper attr_reader :client def initialize @client = Google::Cloud::Language.new(credentials: JSON.parse(ENV["GOOGLE_CREDENTIALS"])) end end
19.545455
97
0.716279
bfada4e921022b6333dada739d3c87572f3ed5dd
656
# frozen_string_literal: true # This model represents the 'site-config' content type in Contentful. Any linked # entries of the 'site-config' content type will be resolved as instances of this class. # It exposes .find, .find_by, and .find_all methods to query Contentful. class SiteConfig < WCC::Contentful::Model::Si...
32.8
88
0.696646
1a7317cf51604008c6c53d71f36022eb4660ceba
942
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "Links" do before :each do browser.goto(WatirSpec.files + "/non_control_elements.html") end describe "#length" do it "returns the number of links" do browser.links.length.should == 4 end end descri...
23.55
70
0.641189
1c0a1e0ee2d93587dee68d7de7c4ab6b5c9cb014
4,385
# Cookbook:: splunk_otel_collector # Recipe:: default ruby_block 'splunk-access-token-unset' do block do raise "Set ['splunk_access_token']['splunk_access_token'] as an attribute or on the node's run_state." end only_if { node['splunk_otel_collector']['splunk_access_token'].nil? } end if platform_family?('w...
38.80531
128
0.729532
622049246b929a388c2641950427fbc501b8b277
1,159
Pod::Spec.new do |m| version = '5.7.0-alpha.1' m.name = 'Mapbox-iOS-SDK' m.version = version m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Coc...
34.088235
132
0.640207
61b310e796854314799d2fa713b24f06cdd00cb3
874
require_relative 'params' module Twizo class WidgetParams < Params attr_accessor :allowed_types, :recipient, :backup_code_identifier, :token_length, :token_type, :body_template, :sender, :sender_ton, :sender_npi, :tag, :dcs # @return [Object] def to_json json = { :allowedTypes ...
29.133333
160
0.503432
184aecc3be721df2ef6f92506500daf03aaa5653
806
class SizedArray < Array attr_reader :capacity def initialize( capacity = 10, *args ) @capacity = capacity super( *args ) end def resize if size > @capacity slice!( (0...-@capacity) ) end end private :resize def concat( other_array ) sup...
16.44898
42
0.478908
182c4d4eeeeb70dd6694f57567eaca08c9bcfe65
201
# Simple, obvious (to me) way to do it. (1..100).each do |n| case when n % 15 == 0 : puts 'FizzBuzz' when n % 5 == 0 : puts 'Buzz' when n % 3 == 0 : puts 'Fizz' else puts n end end
20.1
39
0.527363
ed9007a08858f3ff76f1db9a1ff0f7a7bf660b4b
707
Pod::Spec.new do |s| s.name = 'AWSPolly' s.version = '2.11.1' 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://...
39.277778
157
0.609618
f71a3f08705d90384109c36eb3203b8d22946c78
1,251
require "test_helper" require_relative "signature_helper" class TracerTest < Minitest::Test include SignatureHelper class X def foo(x, y) x end def bar() nil end end def test_learn lib = Argtrace::TypeLib.new lib.learn(signature_from(X, :foo, {x: [String], y: [Integer]}, ...
29.093023
85
0.677858
182683bcf305bb6a9baface29ec532f23319b1d8
146
require "test_helper" class Api::V1::FactsControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
18.25
68
0.726027
e264cf32a35f509d81f38d9d460a0f6627adcd97
270
class ApplicationController < ActionController::Base protect_from_forgery with: :exception include SessionsHelper def user_should_have_logged_in return if logged_in? store_location flash[:danger] = "Please login." redirect_to login_url end end
20.769231
52
0.77037
62e01f1002cd809002a4624a8b9b864f009067b7
1,183
# Copyright 2014 Square 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 ...
38.16129
92
0.743872
b92b13ef34c5c5dbc98f53353f7188b087792577
4,875
require 'test_helper' class InspireTest < Test::Unit::TestCase include CommStub def setup @gateway = InspireGateway.new( :login => 'LOGIN', :password => 'PASSWORD' ) @credit_card = credit_card('4242424242424242') @amount = 100 @options = { :billing_address => address } end def...
34.090909
174
0.730462
b941eab4f434c6c4a6449d1a2fe004d013a3b788
131
module DmcKanye class Config class_attribute :script_to_disable_transitions class_attribute :default_wait_time end end
18.714286
50
0.816794
11343bf2a4f979e81d0a0e58fa73cf69bc786404
9,379
require 'axlsx' require 'axlsx_styler' require 'spreadsheet_architect/axlsx_string_width_patch' module SpreadsheetArchitect module ClassMethods def to_xlsx(opts={}) return to_axlsx_package(opts).to_stream.read end def to_axlsx_package(opts={}, package=nil) opts = SpreadsheetArchitect::Util...
37.218254
168
0.603263
286dc7022bd38e6db21d163117723c0d5027dc11
167
# http://www.codewars.com/kata/56445cc2e5747d513c000033 # --- iteration 1 --- def validate(msg) /\AMDZHB \d{2} \d{3} [A-Z]+ \d{2} \d{2} \d{2} \d{2}\z/ === msg end
23.857143
65
0.580838
ffb1ca7cbf8fe74aa02f7312545c7733fa314764
455
# frozen_string_literal: true class FeaturedCircuit < ApplicationRecord belongs_to :project after_create :featured_circuit_email validate :project_public private def project_public if project.project_access_type != "Public" errors.add(:project, "Featured projects have to be public") ...
21.666667
78
0.749451
bbfe784d467961a47de671d9be65291f235a017d
2,151
require 'date' # RequestLogAnalyzer is the base namespace in which all functionality of RequestLogAnalyzer is implemented. # This module itself contains some functions to help with class and source file loading. The actual # application startup code resides in the {RequestLogAnalyzer::Controller} class. # # The {Reque...
48.886364
122
0.757787
7a103ce44064fbcd4ca2d37d2e255c9e28680434
41
include_recipe 'delivery-truck::default'
20.5
40
0.829268
e86d94b1ec6b3760d6ee9569c76973860711efb5
943
module Trample class Page attr_reader :request_method, :think_time def initialize(request_method, url, think_time, parameters = {}) @request_method = request_method @url = url @think_time = think_time @parameters = parameters end def parameters proc_p...
22.452381
68
0.566278
b9bdd415066d8d56f62f84deb7aafb9cfc521942
2,024
require 'helper' require 'faraday_middleware/response/parse_xml' describe FaradayMiddleware::ParseXml, :type => :response do let(:xml) { '<user><name>Erik Michaels-Ober</name><screen_name>sferik</screen_name></user>' } let(:user) { {'user' => {'name' => 'Erik Michaels-Ober', 'screen_name' => 'sferik'} } } cont...
28.111111
96
0.630929
28eaccbe484d9e5e6e37cb1742660e2f3500a22f
118
RSpec.configure do |config| config.before(:each) do ApplicationController.current_user = User.create! end end
19.666667
53
0.754237
f86bfc6f8f25ccb72766b424894ad6470478f34c
1,141
class Wv2 < Formula desc "Programs for accessing Microsoft Word documents" homepage "https://wvware.sourceforge.io/" url "https://downloads.sourceforge.net/project/wvware/wv2-0.4.2.tar.bz2" sha256 "9f2b6d3910cb0e29c9ff432f935a594ceec0101bca46ba2fc251aff251ee38dc" bottle do cellar :any sha256 "7bda8de...
40.75
93
0.787029
7aae344236b1cddd321f02b4aa8b6f85fcc053d6
11,399
# meraki # # This file was automatically generated by APIMATIC v2.0 # ( https://apimatic.io ). module Meraki # meraki client class. class MerakiClient # Singleton access to organizations controller. # @return [OrganizationsController] Returns the controller instance. def organizations ...
33.526471
87
0.734012
bfd4de6618eefc5bb8d3a86c6eab81c4c8629c58
2,888
class Mandoc < Formula desc "The mandoc UNIX manpage compiler toolset" homepage "https://mandoc.bsd.lv/" url "https://mandoc.bsd.lv/snapshots/mandoc-1.14.3.tar.gz" sha256 "0b0c8f67958c1569ead4b690680c337984b879dfd2ad4648d96924332fd99528" head "anoncvs@mandoc.bsd.lv:/cvs", :using => :cvs bottle do sha25...
37.506494
93
0.676939
288fd0a8d9d18991330495a6c83361576fca8a34
5,194
#!/usr/bin/env ruby # -*- mode: ruby; coding: utf-8 -*- # A Demo Ruby/OpenCV Implementation of SURF # See https://code.ros.org/trac/opencv/browser/tags/2.3.1/opencv/samples/c/find_obj.cpp require 'opencv' require 'benchmark' include OpenCV def compare_surf_descriptors(d1, d2, best, length) raise ArgumentError unles...
30.552941
107
0.67424
030e71e18d09494c92c7874cb2dcb980092cf667
1,122
=begin This file is a cotribution to Viewpoint; the Ruby library for Microsoft Exchange Web Services. Copyright © 2013 Mark McCahill <mark.mccahill@duke.edu> 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 ...
32.057143
94
0.755793
b9d604f5fd072dcfbb238d1afe30fa07ea3e3783
66
# frozen_string_literal: true json.(user, :id, :username, :name)
16.5
34
0.712121
d57d9fc3eb6efb691b0c541fed166c20325a2b20
1,210
class B3sum < Formula desc "The BLAKE3 cryptographic hash function" homepage "https://github.com/BLAKE3-team/BLAKE3" url "https://github.com/BLAKE3-team/BLAKE3/archive/0.3.1.tar.gz" sha256 "200587a49098957b5c119936ebee248cae4fb437827e444c7708e92ddf55836c" bottle do cellar :any_skip_relocation sha256 ...
35.588235
107
0.74876
1a32b770322535cc460ca8e5263322db9a34fe8f
1,383
# # Cookbook Name:: mysql # Recipe:: client # # Copyright 2008-2011, Opscode, 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 # # Unles...
26.596154
74
0.733189
62ae92efc396dea24f08919234f9e53d05d37ea4
685
require 'redcarpet' module ExtraExtra class SemanticHtmlRenderer < Redcarpet::Render::HTML def initialize(opts={}) @header_level_offset = opts.delete(:header_level_offset) || 1 @header_class_prefix = opts.delete(:header_class_prefix) || "h" @header_class_prefix_offset = opts.delete(:header_class...
42.8125
193
0.718248
33b260cd4ded90eb72cab72b4ce56d9768d97a7f
2,494
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## require 'msf/core' require 'rex/proto/rfb' class Metasploit3 < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Report include Msf::Auxiliary::Scanner...
27.108696
119
0.558941
ac74ca82ea8c5e62e7564bb29c660d4c5c025310
1,006
# 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. # # This file is the source Rails uses to define your schema when running `bin/rai...
45.727273
86
0.764414
e93a3974e44b307e9a9b93fbe7dac775eb702b11
1,098
class Grid attr_reader :columns, :width, :height def initialize(width, height) @width = width @height = height @columns = Array.new(width) { Array.new(height) } end def push(token, column) raise ArgumentError if column >= @width return if column_full?(column) @columns[column][next_row...
21.96
101
0.623862
6122841b7690facab8485f05963ab4cbd2e96055
800
class Primesieve < Formula desc "Fast C/C++ prime number generator" homepage "http://primesieve.org/" url "https://github.com/kimwalisch/primesieve/archive/v6.2.tar.gz" sha256 "c4d1c358ab95b370dcac317fe1820e41d60460b22e450359ebc4bdd507bb2547" bottle do cellar :any sha256 "f03b9925f3e732b47989196b1a09...
29.62963
93
0.7375
f78b4669e14c8d67a7863457ba26ee87caea0f18
4,892
# frozen_string_literal: true require "kafka/fetch_operation" module Kafka class Fetcher attr_reader :queue def initialize(cluster:, logger:, instrumenter:, max_queue_size:, group:) @cluster = cluster @logger = logger @instrumenter = instrumenter @max_queue_size = max_queue_size ...
25.612565
110
0.612428
878ad4b650cd41de4bd4ba50bccdc4c34f81df58
1,385
# typed: true module Kuby module CertManager module DSL module CertManager module V1 class IssuerStatusConditions < ::KubeDSL::DSLObject value_field :status value_field :observed_generation value_field :last_transition_time value_field :reas...
32.97619
88
0.561011
f7f23dac73b148e70eca59056d27be810a296504
741
module Fastlane module Actions module SharedValues end class FastlaneVersionAction def self.run(params) defined_version = ((Gem::Version.new(params.first) if params.first) rescue nil) raise "Please pass minimum fastlane version as parameter to fastlane_version".red unless def...
29.64
169
0.682861
1812573e78acb631686d32c8b4f49dd0a0cb0703
719
Pod::Spec.new do |s| s.name = "Then" s.version = "2.7.0" s.summary = "Super sweet syntactic sugar for Swift initializers." s.homepage = "https://github.com/tworingsoft/Then" s.license = { :type => "MIT", :file => "LICENSE" } s.author = { "Suyeol Jeon"...
37.842105
76
0.557719