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
e87a5e04d190ed42dba8f366f0970a658584f6a3
4,084
require 'erpify' require 'locomotive/mounter' require 'locomotive/wagon/server' require 'ostruct' require 'cgi' require 'delegate' require 'ooor/rack' module Erpify module ContentEntryHelper include Ooor::LocaleMapper def content_type locale = Locomotive::Mounter.locale.to_s context = {'lang' =...
25.848101
158
0.644221
ed763db979a1fd051754a1a4f1ed378ee102a842
9,199
# frozen_string_literal: true # Cloud Foundry Java Buildpack # Copyright 2013-2020 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
40.70354
120
0.684205
e86f692ad86365a34780a4ba87e7fbcc295b0296
602
class Micropost < ApplicationRecord belongs_to :user mount_uploader :picture, PictureUploader validates :user_id, presence: true validates :content, presence: true, length: {maximum: Settings.content_micropost.maximum_length} validate :picture_size scope :order_by_created_at, ->{order created_at: :desc} s...
33.444444
102
0.752492
33e8ef51c7af2594ce10c31a329eeb7e983d7ef7
757
require 'rubygems' require 'bundler/setup' require 'dm-core' require 'dm-timestamps' require 'dm-validations' require 'dm-aggregates' require 'dm-migrations' require 'haml' require 'ostruct' require 'sinatra' unless defined?(Sinatra) configure do SiteConfig = OpenStruct.new( :title => 'Your Applica...
29.115385
143
0.645971
61f375999fb863ad7190d59febabf8b57ada9494
1,503
# # Be sure to run `pod lib lint TTCardView.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 = 'TTCardVie...
44.205882
122
0.66334
ede0ac3c7d9bda7f18533e6bb0ab06811920bd85
4,002
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Auxiliary include Msf::Exploit::Remote::HttpClient include Msf::Auxiliary::Scanner def initialize super( 'Name' => 'TP-Link Wir...
29.211679
96
0.53973
18d0cb135e0e0f07db93d000f01f8d427c223f54
3,924
require 'json' module Agents class GoogleCalendarPublishAgent < Agent cannot_be_scheduled! no_bulk_receive! gem_dependency_check { defined?(Google) && defined?(Google::APIClient) } description <<-MD The Google Calendar Publish Agent creates events on your Google Calendar. #{'## Include...
35.672727
247
0.649083
2169ec95c41e278d5a9efdceaeb262150c5b59c8
561
# frozen_string_literal: true require 'simplecov' SimpleCov.start # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper.rb"` to ensure that it is only # loaded once. # # ...
28.05
78
0.773619
015a6c7640e335a004246229ac4a22624a1691ce
2,971
server ENV["CAPISTRANO_SERVER"], port: ENV["CAPISTRANO_PORT"], roles: [:web, :app, :db], primary: true set :repo_url, ENV["CAPISTRANO_REPO_URL"] set :application, ENV["CAPISTRANO_APPLICATION"] set :user, ENV["CAPISTRANO_USER"] set :puma_threads, [4, 16] set :puma_workers, 0 set :pty,...
26.292035
90
0.664086
1134d70550c1fbd90104f3c1107b69a680421829
2,008
################################################################################ # # Copyright (C) 2006 Peter J Jones (pjones@pmade.com) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software with...
47.809524
84
0.539841
e2134d97bceb9f290b526a062507e676f165c13a
1,221
# frozen_string_literal: true describe Blacklight::SuggestHelperBehavior do before do allow(helper).to receive(:blacklight_config).and_return(blacklight_config) end describe '#autocomplete_enabled?' do describe 'with autocomplete config' do let(:blacklight_config) do Blacklight::Configurati...
29.780488
78
0.665029
1db4c00738c9d4e799a04bf0a015ebbbe69e37a8
629
$:.push File.join(File.dirname(__FILE__), 'lib') require 'view_matchers/version' Gem::Specification.new do |s| s.name = 'view-matchers' s.version = ViewMatchers::VERSION s.date = Time.now.strftime('%Y-%m-%d') s.summary = 'RSpec matchers for ascii tables and form fields.' s.descr...
37
81
0.615262
1c8e4eaeb291338fff448148962197ee76272c7b
155
# frozen_string_literal: true Factory.define :task do |f| f.sequence(:description) { |i| "description-#{i}" } f.association(:user) f.timestamps end
19.375
53
0.696774
01967c4e94341b0b902e43da8a0d787ca84c6d21
273
class StaticPagesController < ApplicationController def home if logged_in? @micropost = current_user.microposts.build @feed_items = current_user.feed.paginate(page: params[:page]) end end def help end def about end def contact end end
14.368421
65
0.703297
18a1aa1cb47320432fcab212fb00b0110a5df720
3,068
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'decks routing', :type => :routing do it 'routes decks endpoint' do route = '/api/decks' expect(:get => route).to route_to 'decks#index' expect(:patch => route).not_to be_routable expect(:put => route).not_to be_routable expect...
39.333333
134
0.684811
6201881c92eb14e888a0d8d9fccaa6e10232c34d
2,690
# frozen_string_literal: true require "ipaddr" module Doorkeeper module IPAddrLoopback def loopback? case @family when Socket::AF_INET @addr & 0xff000000 == 0x7f000000 when Socket::AF_INET6 @addr == 1 else raise AddressFamilyError, "unsupported address family" ...
26.372549
87
0.585874
e949834d6cdb8e917081dad91abb2d5fe8045f7b
1,126
# -*- encoding: utf-8 -*- $:.push File.expand_path('../lib', __FILE__) Gem::Specification.new do |s| s.name = 'fluent-plugin-elasticsearch' s.version = '1.7.0' s.authors = ['diogo', 'pitr'] s.email = ['pitr.vern@gmail.com', 'me@diogoterror.com'] s.description = %q{ElasticSearch...
36.322581
78
0.636767
1c3cdce12ce7c36b44fa51d96033abfa6ef282fb
6,212
# frozen_string_literal: true module Epics class UpdateService < Epics::BaseService EPIC_DATE_FIELDS = %I[ start_date_fixed start_date_is_fixed due_date_fixed due_date_is_fixed ].freeze def execute(epic) reposition_on_board(epic) # start_date and end_date columns are...
33.76087
130
0.741951
b99d8ad995feb83436c881470c575a298185a2af
3,943
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.505263
102
0.758559
ab2849cd38c600b2330dd42384d727ac3121eab6
2,413
# # Copyright 2008-2017, Chef Software, Inc. # Copyright 2017, Noah Kantrowitz # # 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 requir...
36.014925
148
0.723581
e8cb4ec81212613b4ac09f10c94396522dd90216
90
# frozen_string_literal: true Administrate::Engine.add_javascript 'admin/application.js'
22.5
58
0.833333
e9d80b35440a5c06d868169ba7e5212f72f91869
985
class IdentitiesController < ApplicationController before_filter :auth_anybody!, only: :new before_action :check_accounts_limit def new @identity = env['omniauth.identity'] || Identity.new end def edit @identity = current_user.identity end def update @identity = current_user.identity u...
24.02439
72
0.726904
ed6c7d40b202285e9ee727fe6b778a38fbfd9200
3,353
## Copied from Rack 1.4.1 on 19 June 2012. ## see http://github.com/rack/rack/blob/1.4.1/lib/rack/urlmap.rb # Copyright (c) 2007, 2008, 2009, 2010 Christian Neukirchen <purl.org/net/chneukirchen> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documen...
34.56701
92
0.640322
18212265d9e47b7b27937506756d649b74518fcc
1,040
class Modulo < Base Arbol.add_mapped_class( 'modulo', Modulo, %{void modulo(long op1[3], long op2[3], long out[3]) { out[0] = op1[0] % op2[0]; out[1] = op1[1] % op2[1]; out[2] = op1[2] % op2[2]; }} ) attr_accessor :op1 attr_accessor :op2 def param_keys [:op1, :op2] end def arduin...
14.857143
84
0.551923
6a5381dc6178c7e6afc558b5157c078bf6e9ab97
871
require 'sinatra' get '/' do <<-EOHTML <html> <body> <a href='/dom/#/param/some-name'>DOM link</a> </body> </html> EOHTML end get '/inputtable' do <<-EOHTML <html> <body> <a href='/dom/#/input1/value1/input2/value2'>DOM link</a> </body> ...
19.795455
91
0.474168
7928090282a3ec296a88ea2132237156f0705957
97
# encoding: utf-8 module HashStringsUTF8 def self.literal_hash {"foo" => "bar"} end end
12.125
23
0.659794
08ac53c7fa7ce1dd966378c6ca34baee6bb5a974
641
# -*- encoding: utf-8 -*- require './lib/ember/data/version' Gem::Specification.new do |gem| gem.name = "ember-data-source" gem.authors = ["Yehuda Katz"] gem.email = ["wycats@gmail.com"] gem.date = Time.now.strftime("%Y-%m-%d") gem.summary = %q{ember-data source code wra...
35.611111
80
0.609984
39a41fe6ef1884e13222d4cdcbefbabbb9601283
590
Pod::Spec.new do |s| s.name = 'TTTAttributedLabel' s.version = '1.5.0' s.authors = {'Mattt Thompson' => 'm@mattt.me'} s.homepage = 'https://github.com/mattt/TTTAttributedLabel/' s.summary = 'A drop-in replacement for UILabel that supports attributes, data detectors, links, and more.' s.source = {:git => 'ht...
36.875
108
0.684746
6aa834daa38a074dbf770f25525d6eb928ba92ac
304
class CreateNodes < ActiveRecord::Migration[5.2] def change create_table :nodes do |t| t.integer :row t.integer :col t.belongs_to :maze t.integer :north_neighbor t.integer :east_neighbor t.integer :south_neighbor t.integer :west_neighbor end end end
21.714286
48
0.657895
ab94fd8d0945ed5622e86da6c9da98908f7033af
2,098
class Xml2 < Formula desc "Makes XML and HTML more amenable to classic UNIX text tools" homepage "https://web.archive.org/web/20160730094113/www.ofb.net/~egnor/xml2/" url "https://web.archive.org/web/20160427221603/download.ofb.net/gale/xml2-0.5.tar.gz" sha256 "e3203a5d3e5d4c634374e229acdbbe03fea41e8ccdef6a594a...
52.45
123
0.795043
7a6aee034266c964b693dc6087b1b64c6aed59b0
150
FactoryBot.define do factory :user do name { 'kalu' } password { '123456' } sequence(:email) { |i| "my-email-#{i}@mail.com" } end end
18.75
53
0.586667
4a169cf5f0682ebbf421e9473e00b0f1daa6cc23
11,400
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008, 2009 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 # # ...
31.578947
144
0.65807
01e77bdfba999cac70e6d977fd1af0e6536c88c1
1,489
# -*- encoding: utf-8 -*- # stub: octokit 4.6.2 ruby lib Gem::Specification.new do |s| s.name = "octokit".freeze s.version = "4.6.2" s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Wynn Netherla...
40.243243
116
0.660846
abc79eefa06768b6ae787408fdff753d3ea91079
195
class CreateTodos < ActiveRecord::Migration[6.1] def change create_table :todos do |t| t.string :todo t.text :notes t.string :status t.timestamps end end end
16.25
48
0.625641
39f75b81fda38e60299f7d4558abf47e1f7141ea
2,195
# frozen_string_literal: true require 'rails_helper' RSpec.feature 'Course: Videos: Management' do let(:instance) { create(:instance, :with_video_component_enabled) } with_tenant(:instance) do let(:course) { create(:course, :with_video_component_enabled) } before { login_as(user, scope: :user) } cont...
34.296875
91
0.671982
bfd0af56450b6af96755c597dd93524c93661118
151
class SomeWorker include Sidekiq::Worker sidekiq_options merger: { key: "foo" } def perform(*ids) puts "Get IDs: #{ids.inspect}" end end
15.1
40
0.668874
28f5d81774110644761b689f82e1a3b19bce1a78
217
class ChangeResourceFileSize < ActiveRecord::Migration def up change_column :file_assets, :resource_file_size, :bigint end def down change_column :file_assets, :resource_file_size, :integer end end
21.7
61
0.764977
61ebdd3e0890ffe81858b53084366f045a4ecddd
978
module Aviator define_request :update_snapshot, inherit: [:openstack, :common, :v2, :public, :base] do meta :service, :volume meta :api_version, :v2 link 'documentation', 'http://docs.openstack.org/api/openstack-block-storage/2.0/content/PUT_updateSnapshot__v2__tenant_id__snapshots__snapshot_...
23.285714
167
0.616564
1c8dff477239a7ede0f57b1dc34ba68ac104fb03
1,699
# :stopdoc: # # It happens sometimes that it is very expensive to construct a logging # message; for example, if a large object structure has to be traversed # during execution of an `object.to_s` method. It would be convenient to # delay creation of the message until the log event actually takes place. # # For example...
36.934783
88
0.749853
e9f066f33ca4ba695dbdf89db22b06e955a1cc74
2,327
require 'matrix' require 'test/unit' require_relative '../lib/csr_matrix' require_relative '../lib/csr_matrix_factory' require_relative '../lib/diagonal_matrix' require_relative '../lib/diagonal_matrix_factory' require_relative '../lib/dok_matrix' require_relative '../lib/dok_matrix_factory' require_relative '../lib/sp...
35.8
78
0.707778
7991900354363af63ba16ef649001e859a627299
209
class CreateShoppingListsItemsTable < ActiveRecord::Migration def change create_table :items_shopping_lists, id: false do |t| t.belongs_to :shopping_list t.belongs_to :item end end end
23.222222
61
0.736842
6af82f753fc3eabe704eedac95c55706cea457ae
1,693
PRODUCT_COLLSCAN = <<-EOF { "queryPlanner" => { "plannerVersion" => 1, "namespace" => "awesome_explain.products", "indexFilterSet" => false, "parsedQuery" => { "name" => { "$eq" => "Coffee Beans - Chocolate" } }, "winningPlan" => { "stage" => "COLLSCA...
28.216667
62
0.391022
1a2ea9550e61fda112ae1d0bd714ce13097fe6bc
771
# note this example is inplace and destructive def thomas(a, b, c, d) # set the initial elements c[0] = c[0] / b[0] d[0] = d[0] / b[0] n = d.length # number of equations to solve (1...n).each do |i| scale = 1 / (b[i] - c[i - 1] * a[i]) # scale factor for c and d c[i] *= scale d[i] = (d[i] - a[i] ...
19.769231
67
0.470817
d5984f64898a75f304c280f059bc34d0ad20048c
167
dir = File.dirname(__FILE__) + '/facets/' Dir.new(dir).each do |path| next unless File.extname(path) == '.rb' require('facets/' + path) #require(dir + path) end
23.857143
49
0.646707
2658ed9437006da23f845f6162a19b3218637890
6,874
require 'spec_helper' RSpec.describe 'Trello::Schema::Attribute::BoardPref' do let(:attribute) { Trello::Schema::Attribute::BoardPref.new(name: name, options: options, serializer: serializer) } describe '#build_attributes' do let(:name) { :visibility_level } let(:options) { { remote_key: :permissionLeve...
32.889952
116
0.615944
eda0bc463e9a2cd9e16a4098e0de5cddc4f1a4df
1,931
# frozen_string_literal: true module Liquid class TableRow < Block Syntax = /(\w+)\s+in\s+(#{QuotedFragment}+)/o attr_reader :variable_name, :collection_name, :attributes def initialize(tag_name, markup, options) super if markup =~ Syntax @variable_name = Regexp.last_match(1) ...
28.820896
98
0.612118
ac03cd3785ac12fdd64b7ac97ff0121659d12a06
1,361
require 'test_helper' class DiscountVotesControllerTest < ActionController::TestCase setup do @discount_vote = discount_votes(:one) end test "should get index" do get :index, token: 'token_1' assert_response :success assert_not_nil assigns(:discount_votes) end test "should get new" do g...
27.22
148
0.726672
3327a8a6ef76cfe3f3e30affe8fac1b665b615e3
117,139
require 'test_helper' module Credits class CanonicalNamesTest < ActiveSupport::TestCase include AssertContributorNames test 'タコ焼き仮面' do assert_contributor_names '84403ae', 'Takoyaki Kamen' end test '松田 明' do assert_contributor_names 'bb33432', 'Akira Matsuda' end test '簡煒航' do ...
23.659665
78
0.672927
6255bfeac275ab9d95cf7f042625ab1327090454
382
# == Schema Information # # Table name: content_learning_quizzes # # id :integer not null, primary key # player_id :integer not null # questions :json not null # answers :json # created_at :datetime not null # updated_at :datetime not null # FactoryGirl....
20.105263
53
0.615183
618e788f937e2cdf0fcefb0abb98d8c6b8bab6d5
2,911
# This file is copied to spec/ when you run 'rails generate rspec:install' require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' require File.expand_path('../config/environment', __dir__) # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails....
42.188406
86
0.749571
6aecc062e2232ff48abc4688c4a64226bcb944cf
1,987
class UsersController < ApplicationController # before filters before_action :logged_in_user, only: [:index, :edit, :update, :destroy] # runs the method logged_in_user before index, destroy, edit & update actions before_action :correct_user, only: [:edit, :update] before_action :admin_user, only: :de...
24.231707
152
0.638651
1ddd3156c796859cd019bb9effed329e2f9a481a
2,073
module ComputedCustomField module CustomFieldsHelperPatch def self.included(base) #:nodoc: base.extend(ClassMethods) base.send(:include, InstanceMethods) base.class_eval do unloadable alias_method_chain :custom_field_tag, :computed_custom_field end end ...
34.55
90
0.655572
3824c827b384576b16e55f59bc0e2237ca16c5cf
930
require 'spec_helper' class MemberValidatable include ActiveModel::Validations validates_with MemberCountValidator attr_accessor :members end describe MemberCountValidator do let(:workspace) { MemberValidatable.new } context 'when license limits workspace membership' do before do stub(License.ins...
23.846154
66
0.723656
bb4e544544774db15fe39af90b2c26f18460923f
945
require 'spec_helper' require 'blog' RSpec.describe Blog do subject { described_class.new(title: "Brett Codes", subdomain: "brettcodes") } describe "#add_post" do it "adds a post to the posts array" do expect do subject.add_post(title: "RSpec Test Doubles Explained", content: "Lots of great cont...
27.794118
103
0.667725
1cea2f11d82ea3f72a89deb2fe63383c3a68608e
3,058
#!/usr/bin/env ruby # Encoding: utf-8 # # Author:: api.dklimkin@gmail.com (Danial Klimkin) # # Copyright:: Copyright 2012, Google Inc. All Rights Reserved. # # License:: Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
26.591304
79
0.68378
21316537c4704c150af63627e23998fe980c80d3
37
module Seria VERSION = "0.0.1" end
9.25
19
0.648649
7a7e28f745167743e0a1377c975e3e3ae738e35f
501
module OpenXml module Docx module Properties class EastAsianLayout < ComplexProperty with_namespace :w do attribute :combine, expects: :on_or_off attribute :combine_brackets, one_of: %i(angle curly none round square) attribute :id, expects: :integer attribute...
27.833333
87
0.664671
e89352fc151e9ddf1b7309d8b9dc1c3b3014dcfe
3,720
require "helper" if SimpleCov.usable? describe SimpleCov::SourceFile::Line do context "a source line" do subject do SimpleCov::SourceFile::Line.new("# the ruby source", 5, 3) end it 'returns "# the ruby source" as src' do expect(subject.src).to eq("# the ruby source") end...
23.846154
105
0.598656
21111135faaf2751170fb4789b7e61d2aa5c2e40
1,084
# frozen_string_literal: true require "drb" class Pry class Shell class Registry include DRb::DRbUndumped attr_reader :clients, :current, :mutex def initialize @clients = {} @mutex = Mutex.new end def register(id:, name:, host:, pid:, location:) Client.ne...
19.357143
65
0.559041
acaf9dc5d8bfb983f3c95cbeb32a4d9f47379be0
4,556
describe RequirementsService::Commands::DefaultThirdPartyRequirements do subject { described_class.new(context_module: context_module) } let(:context_module) do double( 'context module', completion_requirements: [], update_column: nil, touch: nil, content_tags: content_tags, ...
31.42069
93
0.630817
218abfb2d12a7082decb8eeb5a4ebd773a68e0c3
402
module ApplicationHelper def markdown(content) @markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, space_after_headers: true, fenced_code_blocks: true, filter_html: true, no_styles: true) @markdown.render(content) end def vimeo_summary_cleanup(summary) index = summary.index...
33.5
171
0.738806
1c18af91ff8eb187920218be4f213a62a50c6de7
7,833
# encoding: utf-8 # This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # /spec/fixtures/responses/whois.centralnic.com/kr.com/status_registered.expected # # and regenerate the tests with the following rake task # # $ rake spec:generate # require 'spec_helper...
46.625
679
0.710839
21c169eda8392f1af564e78e4427d96cbf59ebdb
2,564
# 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::KeyVault::V2015_06_01 module Models # # The key import parameters # class KeyImportParameters include MsRestAzure ...
27.869565
79
0.475429
6a07309322f67cbdde608b783d5280b460da73dd
1,802
# -*- encoding: utf-8 -*- # stub: rb-fsevent 0.10.3 ruby lib Gem::Specification.new do |s| s.name = "rb-fsevent".freeze s.version = "0.10.3" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "source_code_uri" => "https://github.com/th...
41.906977
112
0.656493
28644312a75fd094642cf756e0384ec231a5c3fe
58,105
require 'ostruct' require 'xml/xml_utils' require 'cgi' # Used for URL encoding/decoding require 'metadata/linux/LinuxUsers' require 'metadata/linux/LinuxUtils' require 'metadata/ScanProfile/HostScanProfiles' class Host < ApplicationRecord include SupportsFeatureMixin include NewWithTypeStiMixin in...
34.019321
165
0.658566
1120a41121ded478387b189ef4dc89b45d13889f
230
class DeletedRecords::Filter::SinceDate < ApplicationFilter def execute_query(deleted_records, filters) return deleted_records if filters[:since_date].blank? deleted_records.between_dates(filters[:since_date]) end end
32.857143
59
0.804348
015c585899a50a3aff1a4af74e59b70b4a3e15f7
369
cask 'ocenaudio' do version '3.6.0.1' sha256 'b44f2f962b9ae204e6e12249d92784c639fc3949000bf834c7a6b80a21752eb8' url 'https://www.ocenaudio.com/downloads/index.php/ocenaudio_sierra.dmg' appcast "https://www.corecode.io/cgi-bin/check_urls/check_url_filename.cgi?url=#{url}" name 'ocenaudio' homepage 'https://...
30.75
88
0.769648
38386015d5fed6b231c12ab9ac57c1023a9a2b50
889
class AdvisorActAsController < ActAsController include CampusSolutions::ProfileFeatureFlagged skip_before_filter :check_reauthentication, :only => [:stop_advisor_act_as] def initialize super act_as_session_key: SessionKey.original_advisor_user_id end def act_as_authorization(uid_param) if is_cs_pro...
42.333333
170
0.779528
4a21d24cdb8b276cb19a25f7193e2792c48b5cd1
1,405
class Usuario::RegistrationsController < Devise::RegistrationsController # before_filter :configure_sign_up_params, only: [:create] # before_filter :configure_account_update_params, only: [:update] respond_to :json # GET /resource/sign_up # def new # super # end # POST /resource # def create # sup...
22.66129
72
0.697509
33b48c9dcd9f339c79f0d29066b40d41e1e94740
3,587
# 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 `rails #...
39.417582
95
0.712016
01e717b897a875b8ba08fd94f7ef9c21cb18d39d
168
# What is the value of a, b, and c in the following program? string = "Welcome to America!" a = string[6] b = string[11] c = string[19] # a = "e" # b = "A" # c = nil
15.272727
60
0.589286
619bc56824453137bc4baeccba1827d21c317704
775
# # Cookbook Name:: crowbar # Role:: crowbar-upgrade # # Copyright 2013-2014, SUSE LINUX Products GmbH # # 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/LIC...
29.807692
74
0.757419
39a8f4a6952fdad9219b63be9a9099f5ccd02870
41,205
require 'spec_helper' require 'request_spec_shared_examples' RSpec.describe 'Packages' do let(:email) { 'potato@house.com' } let(:user) { VCAP::CloudController::User.make } let(:user_name) { 'clarence' } let(:user_header) { headers_for(user, email: email, user_name: user_name) } let(:space) { VCAP::CloudCont...
40.837463
158
0.576556
184a7c571e71983e8a0383f5579cf781f824a9c1
1,425
# 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/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE require 'aws-sdk-core' require 'aws-sigv4' require_relative 'aws-sdk-amplify...
26.388889
82
0.756491
4ad6f38e2b3b0bc7e7377a20c0e87eedd74b9d19
238
execute 'apt-get make' do command 'apt-get install make' ignore_failure true action :nothing end.run_action(:run) execute 'apt-get-update' do command 'apt-get update' ignore_failure true action :nothing end.run_action(:run)
18.307692
32
0.743697
e889a87172155f7bfa1dba4090c2e6b164fee71d
355
# frozen_string_literal: true # Generated via # `rails generate hyrax:work_resource CollectionResource` require 'rails_helper' require 'valkyrie/specs/shared_specs' RSpec.describe CollectionResourceForm do let(:change_set) { described_class.new(resource) } let(:resource) { CollectionResource.new } it_behave...
25.357143
58
0.791549
bb944812f217dac8004ab206e52192f67769f8ac
9,090
require "association_cache" require "fileutils" class Course < ApplicationRecord trim_field :name, :semester, :display_name validates_uniqueness_of :name validates_presence_of :display_name, :start_date, :end_date validates_presence_of :late_slack, :grace_days, :late_penalty, :version_penalty validates_numer...
29.417476
101
0.725193
390be15e74ab00b61d6723d410a9da6b8c236e73
374
# frozen_string_literal: true require_relative '../../test_helper' class TestDeprecateHeyArnold < Test::Unit::TestCase def setup @tester = Faker::HeyArnold end def test_character assert @tester.character.match(/\w+/) end def test_location assert @tester.location.match(/\w+/) end def test_...
17
51
0.695187
d56928ba4d948a7b0bce1dd2d447cc32a2f34555
3,641
#file: points_shower_gfx.rb ## # Holds information about points shower class PointsShowerGfx attr_accessor :pos_x, :pos_y, :visible, :z_order, :image def initialize(x=0, y=0, img=nil, zord=0, visb=true) @pos_x = x # x position @pos_y = y # y position @image = img # image ...
28.007692
87
0.583082
bf693c9e39fdee9e87d8fff97339a01db0ad3a63
131
require 'test_helper' class CompanyStateFieldTest < ActiveSupport::TestCase # test "the truth" do # assert true # end end
16.375
53
0.725191
1c54be7021db790895c9ae2f99b13aeace4c558e
1,233
require 'fog/volume/telefonica/requests/create_snapshot' module Fog module Volume class TeleFonica class V2 class Real include Fog::Volume::TeleFonica::Real def create_snapshot(volume_id, name, description, force = false) data = { 'snapshot' => { ...
26.804348
75
0.428224
6271550d9d98ded78c3df2a04f17f8720851ad31
38
# Minitest require 'minitest/autorun'
12.666667
26
0.789474
9100420b43755cff1532e036989ea2b82065f7fb
2,002
module Alf module Sql class Processor class SemiJoin < Processor include JoinSupport def initialize(right, negate = false, builder) super(builder) @right = right @negate = negate end attr_reader :right, :negate def call(sexpr) ...
30.333333
79
0.567932
bb20e92b36647a00409e98f39247875c11eea9c8
2,026
class Povray < Formula desc "Persistence Of Vision RAYtracer (POVRAY)" homepage "https://www.povray.org/" url "https://github.com/POV-Ray/povray/archive/v3.7.0.8.tar.gz" sha256 "53d11ebd2972fc452af168a00eb83aefb61387662c10784e81b63e44aa575de4" revision 1 bottle do rebuild 1 sha256 "a882f103b0ad016c...
31.169231
93
0.699408
d5c2950ecdacaf562c4b2db53bf0fe359ff8d016
977
# frozen_string_literal: true require 'sprockets' ## # Wrapper class for our applications's Sprockets environment. class ApplicationAssets < Sprockets::Environment # request path prepended to each asset -- this is where the Rack app is # _mounted_ OR a directory within /public containing compiled assets ASSET_R...
30.53125
79
0.727738
01a159275eba0150c9562eb714b266c15ad0cb2d
314
require 'rails_helper' RSpec.describe Favorite, type: :model do let(:topic) { create(:topic) } let(:user) { create(:user) } let(:post) { create(:post) } let(:favorite) { Favorite.create!(post: post, user: user) } it { is_expected.to belong_to(:post) } it { is_expected.to belong_to(:user) } end
26.166667
62
0.649682
5dbf3ffc3b5fc200cc0dac3be25247cccf434750
4,124
require 'capistrano/node-deploy' require 'capistrano/uptodate' set :application, 'gatewayd' set :scm, 'git' set :repository, 'https://github.com/ripple/gatewayd.git' set :branch, ENV['branch'] ? ENV['branch'] : 'develop' set :deploy_to, "/var/apps/#{application}" set :user, 'ubuntu' # deploy user set :node_user, "#{ap...
34.366667
189
0.719932
d5635132e30e40955500c612a25ad521f7f09212
1,463
require_relative 'boot' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" require "action_mailbox/engine" require "action_text/en...
35.682927
83
0.779904
62cc2e61aa12f892466c18af1b29af0bee7aabf1
6,888
describe '/v1/certificates' do let(:request_headers) do { 'HTTP_AUTHORIZATION' => "Bearer #{valid_token.token_plain}" } end let(:grid) do Grid.create!(name: 'terminal-a') end let(:david) do user = User.create!(email: 'david@domain.com', external_id: '123456') grid.users << user ...
34.268657
158
0.695267
283108c1404b188ff0936c5fb26e983cbb2e9a79
2,073
# frozen_string_literal: true module Factories # rubocop:disable Metrics/MethodLength All-in-one-place is more relevant than short methods here class << self def project(name, score: 25, downloads: 5000, first_release: 1.year.ago, description: nil...
36.368421
116
0.561505
0146b250f97d49d8ac13e3fb1f4e87abb56b25c1
44
module Odin VERSION = "0.1.0.alpha.1" end
11
27
0.659091
e8585aefef1f49a8a89a70e0d91219a63e41d452
4,767
# -*- encoding: utf-8 -*- # shared_examples_for 'cnab400' do let(:pagamento) do Brcobranca::Remessa::Pagamento.new(valor: 199.9, data_vencimento: Date.current, nosso_numero: 123, documento_sacado: ...
38.136
178
0.617369
3371ee1672a106b0655be857e6b9247e65daa6d3
490
module Fog module DNS class Rackspace class Real def list_subdomains(domain_id, options={}) validate_path_fragment :domain_id, domain_id path = "domains/#{domain_id}/subdomains" if !options.empty? path = path + '?' + array_to_query_string(options) ...
20.416667
62
0.504082
d5bbc906b56b7a40ff285886ae2fa95a8954d550
3,393
require 'spec_helper' describe FacilityAccount do context "valid account number" do before(:each) do @user = FactoryGirl.create(:user) @facility = FactoryGirl.create(:facility) assert @facility.valid? @options = Hash[:is_active => 1, :created_by => @user.id, :facility_id => @facility...
39.917647
137
0.681403
3864ec189a4dfd1ee07abb245acae8134aa0e994
23,730
require 'spec_helper' RSpec.describe Qa::Authorities::LinkedData::FindTerm do describe '#find' do let(:lod_oclc) { described_class.new(term_config(:OCLC_FAST)) } let(:lod_loc) { described_class.new(term_config(:LOC)) } context 'basic parameter testing' do context 'with bad id' do before do...
57.597087
234
0.619764
01f9a0aa2e7920ad2f33586dabdc112a85060c8f
7,401
# encoding: utf-8 require "logstash/outputs/base" require "logstash/outputs/loki/entry" require "logstash/outputs/loki/batch" require "logstash/namespace" require 'net/http' require 'time' require 'uri' require 'json' class LogStash::Outputs::Loki < LogStash::Outputs::Base include Loki config_name "loki" ## 'A ...
27.513011
154
0.642346
87502f1a731b4c2095bbac9f4fd5a24956f8b80a
124
class RemoveDeckAccessFlag < ActiveRecord::Migration[4.2] def change remove_column :users, :has_deck_access end end
20.666667
57
0.774194
39077aea7ea3a72ad004cf6549b5232314e05a8d
13,782
module ActiveRecord # = Active Record Aggregations module Aggregations # :nodoc: extend ActiveSupport::Concern def clear_aggregation_cache #:nodoc: @aggregation_cache.clear if persisted? end # Active Record implements aggregation through a macro-like class method called +composed_of+ # f...
51.425373
135
0.646205
bfe04aceeb0bb51821f61127a9c3f563832d03b3
5,705
# TL;DR: YOU SHOULD DELETE THIS FILE # # This file was generated by Cucumber-Rails and is only here to get you a head start # These step definitions are thin wrappers around the Capybara/Webrat API that lets you # visit pages, interact with widgets and make assertions about page content. # # If you use these step defin...
26.910377
100
0.638563
1c58c3e26c8d8f39cc44bc1056bcffaba5d8f2d7
1,505
module Enocean module Esp3 # Radio package, main package for 4BS and RPS data # Header # Data (byte offsets) # 0 byte: RORG (type of radio package) # 1-4 bytes: Radio data # 4 bytes: sender_id # 5: status field class Radio < BasePacket class << self ...
24.672131
85
0.506312