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
08ddcbe1b9fe31f3cb1935c90c45aea016c2c442
199
class Filedrop < Cask version :latest sha256 :no_check url 'https://commondatastorage.googleapis.com/filedropme/Filedrop.dmg' homepage 'http://www.filedropme.com/' app 'Filedrop.app' end
19.9
72
0.743719
878a81e04b7865eb34b480212eef552b8c40cd85
2,900
# frozen_string_literal: true # Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------...
37.662338
110
0.643103
0303c1d7fe268679586c216ff9b7ee5cacb03dc1
3,633
require 'multi_json' # require 'nokogiri' require 'open-uri/cached' OpenURI::Cache.cache_path = 'tmp/open-uri' # transparent caching # core/stdlib extensions # classes class CBRadio def pie(array, container, pa, percs) x = 0 y = array.length - 1 names = [] while x <= y hash = array[x] name...
37.84375
143
0.59978
2128c048cd9f96bcd37f8416c8399f6cda8c771f
5,696
module Formatter module Csv class AnnotationForCsv attr_reader :classification, :annotation, :cache, :workflow_information def initialize(classification, annotation, cache) @classification = classification @annotation = annotation.dup.with_indifferent_access @current = @annota...
31.469613
152
0.581812
abe8e5958fd3202a30a9a5e22a83e45aa6554e11
2,240
class Pulseaudio < Formula desc "Sound system for POSIX OSes" homepage "https://wiki.freedesktop.org/www/Software/PulseAudio/" url "https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-14.2.tar.xz" sha256 "75d3f7742c1ae449049a4c88900e454b8b350ecaa8c544f3488a2562a9ff66f1" license all_of: ["GPL-2...
29.866667
92
0.692411
1a8f58d0e40d59ea47c4ed4a66fb7e6da90c4827
284
execute 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3F0F56A8' do not_if "apt-key list | grep '/3F0F56A8'" end remote_file '/etc/apt/sources.list.d/sorah-rbpkg.list' do owner 'root' group 'root' mode '644' notifies :run, 'execute[apt-get update]' end
25.818182
87
0.704225
e9d8f7d178c2eb5409ffe539642fde84c342b1a6
1,626
# -*- encoding: utf-8 -*- # stub: aws-sdk-s3control 1.4.0 ruby lib Gem::Specification.new do |s| s.name = "aws-sdk-s3control".freeze s.version = "1.4.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "changelog_uri" => "https://git...
43.945946
246
0.663592
01af5f462416a208ac74a2240fcd9a389910d0a0
300
name 'waf_testbed' maintainer 'Team Security' maintainer_email 'team-security@fastly.com' license 'apache' description 'Installs/Configures waf_testbed' long_description 'Installs/Configures waf_testbed' version '0.2.0' depends 'apt', '~> 3.0.0' depends 'httpd' depends 'git' depends 'poise-python'
23.076923
50
0.783333
1d3852a2990dad63cd1238f40e767753dd72bb00
136
require 'test_helper' class InstancesControllerTest < ActionController::TestCase # test "the truth" do # assert true # end end
17
58
0.735294
282d7f9bddafad068eac67d949993cf84444d90d
102
# frozen_string_literal: true class DraftNoteSerializer < BaseSerializer entity DraftNoteEntity end
20.4
42
0.852941
79abd9c4562c974560ea8f977a2766060b79d4ef
910
# frozen_string_literal: false class Time # Deserializes JSON string by converting time since epoch to Time def self.json_create(object) if (usec = object.delete('u')) # used to be tv_usec -> tv_nsec object['n'] = usec * 1000 end if method_defined?(:tv_nsec) at(object['s'], Rational(object[...
26
77
0.643956
26f64f08931495b7be0e0d85fb6496ad5287b4fb
1,590
require 'simp/cli/config/items/data/cli_network_netmask' require 'simp/cli/config/items/data/cli_network_interface' require 'rspec/its' require_relative '../spec_helper' describe Simp::Cli::Config::Item::CliNetworkNetmask do before :each do @ci = Simp::Cli::Config::Item::CliNetworkNetmask.new end describe ...
32.44898
73
0.651572
ede2ec4045bca7ea5d211a0c4572fae7f37566c5
1,033
module MCollective module Agent # Discovery agent for The Marionette Collective # # Released under the Apache License, Version 2 class Discovery attr_reader :timeout, :meta def initialize config = Config.instance.pluginconf @timeout = 5 @timeout = config["discover...
25.825
91
0.54211
62e00d0bbee059c05e92d0491c8bf47ef5ccc197
7,047
require 'google/api_client' require 'googleauth' require 'yaml' Faraday.default_adapter = :httpclient module ApiRequestLogger class GoogleApi DATASET_ID = Rails.env def initialize @authorized = false end def config @config = YAML.load_file(File.join(Rails.root, 'config', 'ga_config.ym...
24.63986
125
0.572584
915e62108ffd2f0f6d97c891174e6dae8b010ca5
1,794
MsAuthoring::Application.routes.draw do # The priority is based upon order of creation: # first created -> highest priority. # Sample of regular route: # match 'products/:id' => 'catalog#view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # match 'p...
30.40678
91
0.658863
03539713bb6405bba2f0d663fef4a66cb709216c
864
def glob_from_array(array) "{" + array.join(",") + "}" end namespace :import do desc "Import Organisations, Sites, Hosts, Hits and update DNS details" task :all, [:bucket] => [ "import:all:orgs_sites_hosts", "import:all:hits", "import:dns_details", ] namespace :all do ...
27.870968
77
0.645833
6a4e3266509f09f493519d13cb73d0644ace4a30
85
# encoding: utf-8 # copyright: 2018, The Authors include_controls 'no_such_profile'
17
34
0.776471
21797bf988d84d2997627b3b1dc8541558a2d1d6
322
# frozen_string_literal: true module Gitlab module MarkdownCache # Increment this number every time the renderer changes its output CACHE_COMMONMARK_VERSION = 23 CACHE_COMMONMARK_VERSION_START = 10 BaseError = Class.new(StandardError) UnsupportedClassError = Class.new(BaseError) end en...
24.769231
70
0.754658
e80a0a498b87cabbf9a2d9f013d7a8b75eadc084
1,123
## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::Tcp include Msf::Auxiliary::Scanner include Msf::Auxiliary::Report def initialize super( 'Na...
24.413043
113
0.633126
287f6e4e629523a2b101e7038624c963c8741c9b
492
class AttendancesController < ApplicationController def create @attendance = Attendance.new(attended_event_id: params[:attended_event_id], attendee_id: params[:attendee_id]) respond_to do |format| if @attendance.save format.html do redirect_to event_path(@attendance.attended_event_id)...
30.75
116
0.703252
18a209dcea2025abb0f83d1c9b0cf30dd1531458
57,542
require 'set' require 'active_support/json' module ActionView module Helpers # Prototype[http://www.prototypejs.org/] is a JavaScript library that provides # DOM[http://en.wikipedia.org/wiki/Document_Object_Model] manipulation, # Ajax[http://www.adaptivepath.com/publications/essays/archives/000385.php] ...
44.059724
221
0.571947
f79edb067d2de7ca28c3da85710414e7aced1ccf
497
# A function that return a file content at apply time Puppet::Functions.create_function(:'openvpn::file_content') do # @param filename Path of file to cat # @return [String] Returns the file content dispatch :file_content do param 'String', :filename return_type 'String' end def file_content(filename...
24.85
62
0.688129
ac7b6f73937af1c3c315c7c353424f52ddcf6992
2,615
# frozen_string_literal: true require 'webmock/rspec' require './lib/atol/transaction/get_token' RSpec.describe Atol::Transaction::GetToken do describe '#new' do context 'without arguments' do it { expect { described_class.new }.not_to raise_error } end context 'with good argument' do let(:...
26.683673
80
0.604589
b9b34f84f30c68498b0d12686734b5e874dcc244
619
Rails.application.routes.draw do resources :leaderboards resources :recipe_garnishes resources :recipe_mixers resources :recipe_liqueurs resources :recipe_liquors resources :user_recipes resources :garnishes resources :mixers resources :liqueurs resources :liquors resources :bars resources :liqu...
24.76
102
0.789984
38da346a56ff57400febcd73c6fd0ffbd50dd538
2,034
require "twitter" require_relative "./Console" class TweetSong def setup @config = Hash.new @config[:last_tweet_file_name] = '.thelasttweet' # File containing the last tweet id mentionned @config[:lb_activation_duration] = 10000 # How long time the song will be played end @@instance = TweetSong.new def ...
26.763158
271
0.673058
5df6fc7a44cdf2f8fa71714ba7fe7056feb7a700
554
# encoding: utf-8 Gem::Specification.new do |gem| gem.name = "hirefire-resource" gem.version = "0.7.2" gem.platform = Gem::Platform::RUBY gem.authors = "Michael van Rooijen" gem.email = "michael@hirefire.io" gem.homepage = "https://www.hirefire.io" gem.summary = "Autoscaling for your Heroku dynos" gem....
30.777778
80
0.689531
e2d64510f80045ad36426330716a6a0fe4257640
4,208
# -------------------------------------------------------------------------- # # Copyright 2002-2021, OpenNebula Project, OpenNebula Systems # # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # # no...
32.875
125
0.478137
4a3bb70641bdb0e96f9a1acdac2b5fe4eaa46363
2,700
# Author:: Adam Jacob (<adam@chef.io>) # Author:: William Albenzi (<walbenzi@gmail.com>) # Copyright:: Copyright 2009-2016, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
31.034483
89
0.608148
6a20c9faa27b03899edd037afbc0e6d6ce9b4fa4
782
# frozen_string_literal: true module Archangel ## # Design model # class Design < ApplicationRecord acts_as_paranoid validates :content, presence: true validates :name, presence: true validates :partial, inclusion: { in: [true, false] } validate :valid_liquid_content belongs_to :pare...
20.051282
56
0.644501
182400931b8d978d752feb7a514b63fe674c390b
3,350
# # Controller for FamilyMember model # @author E. M. Maximilien # Copyright (C) IBM Corp., 2011 # License under the MIT license, found here: http://goo.gl/s9uhf # class FamilyMembersController < ApplicationController include SearchableHelper before_filter :'only_superusers?', :only => [:remove, :destroy] ...
27.459016
108
0.622687
fffa73e38fb1e6031fa27d7ca94fca7db711345b
352
class AddEvent < ActiveRecord::Migration[5.0] def change create_table :events do |t| t.belongs_to :user t.belongs_to :communty t.belongs_to :collection t.string :session_id t.string :ip_addr t.string :event_type t.string :event_class t.string :source t.datetim...
22
45
0.647727
1cf5276fadedd4833f1b2225d6cc4b362f4ab6b3
1,401
module HTTP module Protocol class Response class Headers < Headers define_header "Etag" do def validate(etag) unless pattern.match etag raise Error.new "invalid etag #{etag.inspect}" end end def pattern %r{^(?:W/)?"?[!#...
23.35
73
0.464668
33a0246f196a5d8ee2eb5042f399a996e5cdc258
90
require 'activevalidators' # Activate all the validators ActiveValidators.activate(:all)
18
31
0.822222
7a9f32fd263b06c4f7bd6b8101ea5cbe331b41c7
1,926
# frozen_string_literal: true require 'spec_helper' require 'action_view' require 'currency_select' module ActionView module Helpers describe CurrencySelect do include TagHelper class User attr_accessor :currency_code end let(:user) { User.new } let(:template) { ActionVie...
27.514286
77
0.590343
e988a856ab79e79c521eee4fb21bed45e48cb724
32
module DiveEquipmentsHelper end
10.666667
27
0.90625
e9cfca9473994d6914394710b42e339bbab6207d
6,857
require 'spec_helper' describe SessionContext do describe '#create' do context 'when user signs in for the first time' do context 'and user is a member' do let(:user) { build(:user) } let(:context) { SessionContext.new(user: user) } before { context.stub(:organizations...
28.102459
193
0.586991
08c964be81eb237e9a202d326011720fe79d36e5
5,012
# frozen_string_literal: true # This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause # this file to always be loaded, withou...
50.626263
96
0.717877
f7c6064e43bbbca55aa1c839eb28fd66b3422056
3,561
class Tm < Formula desc "TriggerMesh CLI to work with knative objects" homepage "https://triggermesh.com" url "https://github.com/triggermesh/tm/archive/v1.15.0.tar.gz" sha256 "4978af0bf87485a6e208738498e0559f85f1734d4aee6ed69cbda59fbc7b2af3" license "Apache-2.0" head "https://github.com/triggermesh/tm.git"...
37.882979
123
0.703735
d5575450376f22dc99c77d203a6cca51cdadcf2e
803
Pod::Spec.new do |s| s.name = "Heyzap" s.version = "3.4.34" s.summary = "Heyzap's iOS SDK: Leaderboards, Achievements, and Ads for games." s.homepage = "http://developers.heyzap.com/docs" s.license = { :type => 'Commercial', :text => 'See http://www.heyzap.com/legal/terms' } s.author ...
38.238095
94
0.622665
08ca9b410bd9c195dd62d81156bdad58ea6026fe
5,693
=begin #Alfresco Content Services REST API #**Core API** Provides access to the core features of Alfresco Content Services. OpenAPI spec version: 1 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in c...
28.465
107
0.632356
5db25962746375265539fe17e12486b357f53334
445
# frozen_string_literal: true require_relative '../params/current_helper' module Export module PathForHelper include Params::CurrentHelper def export_path_for(format) url_for export_params_for(format) end private def export_params_for(format) current_params .deep_merge(onl...
18.541667
43
0.617978
2636e66ca5d71a4d48331596a90e95b8bdbe5a0b
1,341
require "application_system_test_case" class NetworkMonitorsTest < ApplicationSystemTestCase setup do @network_monitor = network_monitors(:one) end test "visiting the index" do visit network_monitors_url assert_selector "h1", text: "Network Monitors" end test "creating a Network monitor" do ...
27.9375
73
0.747204
26cf224afeaedbbd992eb2ddf7fff15159ed80ce
3,799
require 'spec_helper' describe 'logstash::input::zenoss', :type => 'define' do let(:facts) { {:operatingsystem => 'CentOS', :osfamily => 'Linux'} } let(:pre_condition) { 'class {"logstash": }'} let(:title) { 'test' } context "Input test" do let :params do { :ack => false, ...
31.92437
708
0.523296
bf87090d9c2bf3a22b7fa62d15f9d14cf1e79b43
234
module Spree class Gateway::SagePay < Gateway preference :login, :string preference :password, :string preference :account, :string def provider_class ActiveMerchant::Billing::SagePayGateway end end end
19.5
45
0.709402
d5018737217ea17e618e2e408c43bc263c267a2f
2,787
class Day14 def self.title '--- Day 14: Extended Polymerization ---' end def initialize(state) @state = state setup end def tick(args) render(args) process_input(args) end private def setup read_input('14') @state.steps = 0 count_elements end def read_input(input...
22.119048
78
0.670255
014b1e25407aa7a44e78399cdccfa55f1e965319
1,720
require "language/haskell" class PandocCiteproc < Formula include Language::Haskell::Cabal desc "Library and executable for using citeproc with pandoc" homepage "https://github.com/jgm/pandoc-citeproc" url "https://hackage.haskell.org/package/pandoc-citeproc-0.10.5.1/pandoc-citeproc-0.10.5.1.tar.gz" sha256 ...
30.175439
107
0.691279
e88d7900cf6811dbfd3ae539662c1f09b3a6d015
3,016
# 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_12_01 module Models # # List of HubVirtualNetworkConnections and a URL nextLink to get the next # set of re...
29.281553
80
0.551061
f7b85db2bb6443ca470076d9516636ddb15e63af
929
ActiveAdmin.register SkillQuestion do permit_params :skill_id, :question, :answer, :language_id index do column :language column :skill column :question column :answer actions end form do |f| f.inputs do f.input :skill_id, as: :select, collection: Skill.all.map{ |skill| [ski...
24.447368
120
0.667384
1ae95acdb50323eb3887a9f505f72d11f76d23f6
1,073
class CreateFieldContacts < ActiveRecord::Migration[6.0] def change create_table :field_contacts do |t| t.string :fc_num t.string :contact_date t.integer :contact_officer_employee_id t.string :contact_officer_name t.integer :supervisor_employee_id t.string :supervisor_name ...
25.547619
67
0.664492
e95204e3afdd483e0c80d0c63b13fb20fd03ee0b
1,450
class Genometools < Formula desc "GenomeTools: The versatile open source genome analysis software" homepage "http://genometools.org/" url "http://genometools.org/pub/genometools-1.5.10.tar.gz" sha256 "0208591333b74594bc219fb67f5a29b81bb2ab872f540c408ac1743716274e6a" head "https://github.com/genometools/genome...
35.365854
94
0.72069
380a565a7b7f54cd25e11bf34dbeea8c23ba1cc6
483
class CreateDoorMatMemberships < ActiveRecord::Migration def change create_table :door_mat_memberships do |t| t.belongs_to :member, index: true, class_name: "DoorMat::Actor" t.belongs_to :member_of, index: true, class_name: "DoorMat::Actor" t.integer :sponsor, :default => 0 t.integer :owne...
32.2
72
0.654244
f8dcb3f4ba037423f1015204001605a9d1962a57
5,581
# frozen_string_literal: true require "abstract_unit" require "active_job" require "mailers/delayed_mailer" class MessageDeliveryTest < ActiveSupport::TestCase include ActiveJob::TestHelper setup do @previous_logger = ActiveJob::Base.logger @previous_delivery_method = ActionMailer::Base.delivery_method ...
33.220238
158
0.743594
03388cc857cb8fc05c5afd65f2f75dc19897912c
761
Pod::Spec.new do |s| s.name = "iOS-QuizKit" s.version = "0.1" s.summary = "Local Quiz/Test administration and management for iOS." s.homepage = "hhttps://github.com/narpas/iOS-Quizkit" s.license = { :type => 'MIT', :text => <<-LICENSE By: Justin Meiners Copyright (c) ...
31.708333
89
0.620237
e273cdda73e2e27fd07eb30be2b3d80ebe2d4f02
6,703
# Copyright (c) 2016, 2021, 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...
39.429412
245
0.699687
0308d1ca35017d547aa55cf32e2820c1908cee2b
5,450
# 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...
42.248062
154
0.651376
39454a2b0b5f8aaa072c04798791a99b6d99e051
5,058
module Neo4j # A relationship between two nodes in the graph. A relationship has a start node, an end node and a type. # You can attach properties to relationships like Neo4j::Node. # # The fact that the relationship API gives meaning to start and end nodes implicitly means that all relationships have a directi...
31.222222
155
0.677738
ac6ba45ad45a3e40be078f796535185de24a7287
1,436
# == Schema Information # Schema version: 12 # # Table name: audit_logs # # id :integer not null, primary key # user_id :integer # record_id :integer # action :string(255) # created_at :datetime # updated_at :datetime # # # Purpose: This class represents an Audit Log entry...
24.338983
93
0.649721
d56a70789a7409d395c8c24ce846104f1e3ceeac
92
class AutoCompletesController < ApplicationController before_filter :login_required end
23
53
0.858696
280d25aa7268d9e558301326511a37b9f0ef0117
1,344
# 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 require 'aws-sdk-core' require 'aws-sigv4' require_relative 'aws-sdk-devicefarm/types' require_relative 'aws-sd...
26.352941
83
0.744792
1d6b9744da4780fa98f93f8ab299515376205484
1,417
class Nant < Formula desc ".NET build tool" homepage "http://nant.sourceforge.net/" url "https://downloads.sourceforge.net/nant/nant/nant-0.92-src.tar.gz" sha256 "72d4d585267ed7f03e1aa75087d96f4f8d49ee976c32d974c5ab1fef4d4f8305" depends_on "pkg-config" => :run depends_on "mono" patch do # fix build ...
27.25
91
0.633733
f7d076a274f595493ed90c28af90e4980087e3af
209
Airbrake.configure do |config| config.project_key = '975c8408c0ba86574b0344c37eec36b5' config.project_id = 109790 config.environment = Rails.env config.ignore_environments = %w(development test) end
26.125
57
0.789474
385d6d0b55651a511b08e1de23b28ca47b92bfaf
387
# frozen_string_literal: true require '../0023_merge-k-sorted-lists/merge-k-sorted-lists' require '../../helper/list_node' RSpec.describe do context '' do it 't1' do lists = [[2], [], [-1]] ans = [-1, 2] lists.map! { |list| ListNode.generate(list) } ans = ListNode.generate(ans) e...
19.35
59
0.612403
5d15870b7f651fabb166f5545568a622b8da7a61
450
# frozen_string_literal: true # require 'spec_helper' RSpec.describe PartitionCreationWorker do subject { described_class.new.perform } let(:management_worker) { double } describe '#perform' do it 'forwards to the Database::PartitionManagementWorker' do expect(Database::PartitionManagementWorker).to ...
23.684211
96
0.753333
bf5b9126c9407fc15ef49079dc05fd02b1bda649
1,268
# -*- encoding: utf-8 -*- # stub: turbolinks 5.2.1 ruby lib Gem::Specification.new do |s| s.name = "turbolinks".freeze s.version = "5.2.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "source_code_uri" => "https://github.com/turb...
37.294118
116
0.694006
bf4ec2bc8b72dcbfe64d2aed69d01329d55f4f64
1,734
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Throw 500 error when submitting unpermitted form parameters config.action_controller.action_on_unpermitted_parameters = :raise # In the development environment your application's code is reload...
38.533333
85
0.779123
aba3a7dee0e69a51db2c381edeba7fd662307c14
4,969
# 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::Compute::Mgmt::V2018_04_01 module Models # # Describes a Virtual Machine Scale Set Extension. # class VirtualMachineScaleSet...
32.477124
78
0.524854
0191bd43de96ac4efa757c4d75daa2e6f2958c31
1,454
class Pla < Formula desc "Tool for building Gantt charts in PNG, EPS, PDF or SVG format" homepage "https://www.arpalert.org/pla.html" url "https://www.arpalert.org/src/pla-1.2.tar.gz" sha256 "c2f1ce50b04032abf7f88ac07648ea40bed2443e86e9f28f104d341965f52b9c" license "GPL-2.0" bottle do cellar :any s...
32.311111
93
0.715956
61d0baff975615b519ad3582dca67277d2a6cdd7
126
class AddNoticeToItems < ActiveRecord::Migration[6.0] def change add_column :items, :checkout_notice, :string end end
21
53
0.753968
7abd24c09e371cfb9ad48322091bfc5eea7a71f8
660
# frozen_string_literal: true require ::File.expand_path("../../test_helper", __FILE__) module Stripe class ThreeDSecureTest < Test::Unit::TestCase should "be retrievable" do secure = Stripe::ThreeDSecure.retrieve("tdsrc_123") assert_requested :get, "#{Stripe.api_base}/v1/3d_secure/tdsrc_123" ...
27.5
72
0.660606
1c7ade7fea0bd5d9d3dcd92632405120239b7e82
164
require_relative 'transaction' module FlexCommerce module PaypalExpress module Exception class NotAuthorized < Transaction end end end end
14.909091
39
0.731707
1cd3ebae6c6afeb67636623b599d28517f727e94
22
module JrubyKafka end
7.333333
17
0.863636
9170e1d5a20d63e46866414279b6a603d2f6e8dd
2,042
# 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::V2016_12_01 module Models # # Response for ListRoutesTable associated with the Express Route Circuits # API. ...
29.171429
83
0.529383
1d8f9c6fc41c73840789716608e62488db7c203b
3,210
class ForumPostsController < ApplicationController respond_to :html, :json, :js before_action :member_only, :except => [:index, :show, :search] before_action :moderator_only, only: [:destroy, :unhide] before_action :load_post, :only => [:edit, :show, :update, :destroy, :hide, :unhide] before_action :check_min...
32.1
138
0.719003
61e60611ff58be5a6c7894dbf7be6590062af736
3,891
require_relative "../fetcher" require_relative "generator_generation" require_relative "generator_fetcher" require_relative "generator_processor" require_relative "generator_tags" module GitHubChangelogGenerator # Default error for ChangelogGenerator class ChangelogGeneratorError < StandardError end class Gen...
31.379032
106
0.661784
18ec2a7ad66cfeb261e40d58785a16c95fb75b42
167
# frozen_string_literal: true module Macros class Model < Macros::Base register :build register :copy register :destroy register :persist end end
15.181818
29
0.706587
1c010d4befee512ceb2b056e55d2286429a4fee1
5,899
require 'spec_helper' describe 'apache::mod::itk', type: :class do let :pre_condition do 'class { "apache": mpm_module => false, }' end context 'on a Debian OS' do let :facts do { osfamily: 'Debian', operatingsystemrelease: '8', lsbdistcodename: 'jessie', operatings...
29.944162
164
0.583319
3975f1afe5fade117a14202f347a5aa3c9deb250
8,352
# encoding: utf-8 require ENV['TM_SUPPORT_PATH'] + '/lib/ui.rb' class RemoteController < ApplicationController ALL_REMOTES = "...all remotes..." include SubmoduleHelper::Update include SubmoduleHelper before_filter :set_script_at_top def set_script_at_top @script_at_top = true end def fe...
38.311927
192
0.635057
792fe129f7edf96376ca9c907c8c56d2346acf0e
380
cask "tip" do version "2.0.0" sha256 "4d986a461d1b24bb5776fb49063b9a1891939f336b306a6bc75f58d0a4e98bcb" url "https://github.com/tanin47/tip/releases/download/v#{version}/Tip.zip" name "Tip" desc "Programmable tooltip that can be used with any app" homepage "https://github.com/tanin47/tip" app "Tip.app" ...
27.142857
76
0.747368
26bfcf3dc60961189bf25d0d4cc0a87bd18c8504
222
class AddDefaultValueToIsAdminColumn < ActiveRecord::Migration def up change_column :users, :is_admin, :boolean, default: false end def down change_column :users, :is_admin, :boolean, default: nil end end
22.2
62
0.743243
6aef3b02a1495d6eb92538ee7769b15e917cecba
2,843
class VariantsController < ApplicationController include WithComment include WithSoftDeletion actions_without_auth :index, :show, :typeahead_results, :datatable, :gene_index, :entrez_gene_index, :variant_group_index, :myvariant_info_proxy, :allele_registry_proxy, :variant_navigation skip_analytics :typeahead_r...
27.07619
258
0.724587
5d705b24eed50579784b23287af59eb27fbacd32
833
require "./lib/waveform/version" Gem::Specification.new do |s| s.name = "waveform" s.version = Waveform::VERSION s.summary = "Generate waveform images from audio files" s.description = "Generate waveform images from audio files. Includes a Waveform class for generating wa...
30.851852
227
0.619448
e8beab92775bf32a989dcbe049d8a87f1a881532
987
require File.expand_path('../boot', __FILE__) require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module RailsPracticeAPI class Application < Rails::Application # Settings in config/environments/* t...
41.125
99
0.725431
79de7349bf2cf3405fffc02a2c03ad9ce9136f71
2,961
module SynapsePayRest # Wrapper class for /subnets endpoints # class Subnets # Valid optional args for #get # @todo Refactor to HTTPClient VALID_QUERY_PARAMS = [:page, :per_page].freeze # @!attribute [rw] client # @return [SynapsePayRest::HTTPClient] attr_accessor :client # @para...
33.647727
89
0.660925
e2c38ab30403ddcd3ea442f3ffa351d3089a2082
1,878
# frozen_string_literal: true # Copyright 2016-2019 New Context, 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 b...
32.37931
96
0.731097
f79dc780542f8d0a23695fade195236658e014d6
1,123
require('sinatra') require('sinatra/reloader') also_reload('lib/**/*.rb') require('./lib/vehicle') require('./lib/dealership') get('/') do erb(:index) end get('/dealerships') do @dealerships = Dealership.all() erb(:dealerships) end get('/dealerships/new') do erb(:dealerships_form) end post('/dealerships') d...
22.019608
73
0.680321
792e493f23e006a46bb788d804ff282013c08f90
103
require 'spec_helper' describe Domain do pending "add some examples to (or delete) #{__FILE__}" end
17.166667
56
0.747573
335fc653b3e77c74009511bb44e76704f3122d6c
3,352
# -*- encoding: utf-8 -*- # stub: ransack 1.8.9 ruby lib Gem::Specification.new do |s| s.name = "ransack".freeze s.version = "1.8.9" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Ernie Miller".fre...
51.569231
172
0.633055
87e380b76c65d3f134f1e535db91463b79ab713f
1,344
# frozen_string_literal: true require 'rails_helper' RSpec.describe Stocks::Destroy do let(:operation) { described_class.new(params) } describe '#call' do let!(:bearer) { create(:bearer, name: 'Bearer') } let!(:stock) { create(:stock, name: 'Stock', bearer: bearer) } let(:params) { { id: stock.id } }...
25.846154
80
0.630208
f7d4bfcd859b3edb4ffe91aa18de9346033a5e1b
485
Euler.register_language('c', Class.new do def run solution dir = File.dirname(file_path(solution)) Dir.chdir(dir) `gcc #{file_path(solution)} -o #{solution.dir}/solution` `#{solution.dir}/solution` end def init solution FileUtils.cp(template_path, file_path(solution)) end private de...
21.086957
60
0.661856
1dffd16954c86225cee259c3db2d1b2ec2f8246d
1,482
require "spec_helper" describe Spree::CheckoutController, type: :controller do let(:token) { 'some_token' } let(:user) { create(:user) } let(:order) { create(:order_with_line_items) } let(:payment_method) { create(:check_payment_method) } before do allow(controller).to receive_messages try_spree_current...
29.058824
110
0.673414
797e7c8b0b0e4552d8a97c24f945e9b36d26c089
103
module DesignPattern module Behavioral class Visitor def definition; end end end end
12.875
25
0.699029
ab8434c1d2f5687b998dd995f50db1465a4f0972
783
module Ebay # :nodoc: module Types # :nodoc: # == Attributes # text_node :pickup_method, 'PickupMethod', :optional => true # text_node :pickup_store_id, 'PickupStoreID', :optional => true # text_node :pickup_status, 'PickupStatus', :optional => true # text_node :merchant_pickup_code, 'Merchan...
35.590909
79
0.698595
7acc3299506c491856adadfa698cb30610baa525
2,681
module Catalog class ApprovalTransition attr_reader :order_item_id attr_reader :order_item attr_reader :state def initialize(order_item_id) @order_item = OrderItem.find(order_item_id) @approvals = @order_item.approval_requests end def process Insights::API::Common::Request....
28.221053
106
0.64752
79f2dc18111e703c5f8f02333b7d64ace8475ed6
2,136
=begin * Puppet Module : Provder: netdev * Author : Ganesh Nalawade * File : puppet/provider/netdev_groups/junos.rb * Version : 2014-11-10 * Platform : EX | QFX | MX * Description : * * The Provider class definition to implement the * netdev_lag type. There isn't really anythi...
40.301887
100
0.745787
7a8eeee3b05efeed153433760024c76318c22ec2
197
require 'rails_helper' feature 'user visits homepage' do scenario 'successfully' do visit root_path expect(page).to have_css 'h1', text: 'Welcome to Your Customized Training Plans!' end end
21.888889
83
0.761421
1d189dbf44e376260d9659a06a80c8b041e865ed
2,795
require 'vertx-web/routing_context' require 'vertx/util/utils.rb' # Generated from io.vertx.ext.web.handler.BodyHandler module VertxWeb # A handler which gathers the entire request body and sets it on the . # <p> # It also handles HTTP file uploads and can be used to limit body sizes. class BodyHandler #...
41.716418
144
0.703757
bf6c2e4f3bc7008bc391f1e12b052267094b7824
177
Rails.configuration.stripe = { :publishable_key => ENV['PUBLISHABLE_KEY'], :secret_key => ENV['SECRET_KEY'] } Stripe.api_key = Rails.configuration.stripe[:secret_key]
25.285714
56
0.717514
abb8c25d2f779ab8757b0d5f64f24881f0130922
1,945
require File.expand_path('../boot', __FILE__) require 'rails/all' # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) module Rails4Root class Application < Rails::Application ...
42.282609
104
0.712596
11781a386a086b159d3f03e36d0e44e35d8c72b6
129
name "collectd-client" description "Collectd client" run_list( "role[base]", "recipe[collectd-graphite::collectd-client]" )
16.125
46
0.736434
f8c36fd4eb33c79844cde876eec03ec398d08733
5,203
require "testing_env" require "tab" require "formula" class TabTests < Homebrew::TestCase def setup @used = Options.create(%w[--with-foo --without-bar]) @unused = Options.create(%w[--with-baz --without-qux]) @tab = Tab.new("used_options" => @used.as_flags, "unused_options" =...
29.39548
90
0.673842