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
edce47c8cd4ebb48483d9abbe5acdeaf5738fa79
248
FactoryBot.define do factory :sync_token do association :source_cell_volume, factory: :cell_volume association :target_cell_volume, factory: :cell_volume association :object, factory: :full_object status :scheduled end end
27.555556
58
0.754032
f812492882427a6fce69787122c82f6e19bcaa7a
2,857
# frozen_string_literal: true require 'pathname' require 'opal/version' require 'opal/nodes/scope' module Opal module Nodes # Generates code for an entire file, i.e. the base sexp class TopNode < ScopeNode handle :top children :body def compile push version_comment openi...
24.843478
118
0.540777
61fd7bf1b18a0f043cae91829947d1f27752078b
470
# encoding: utf-8 # frozen_string_literal: true module Services module Products # This is the Products index service class Index < Services::ApplicationService include Services::Concerns::ActsAsIndexable def initialize(user_session, params) @user_session = user_session @params = ...
17.407407
49
0.640426
acd710f9f33e6ba0828e98131b9d08fe636b5780
1,660
Pod::Spec.new do |s| s.name = 'GRDB.swift' s.version = '4.14.0' s.license = { :type => 'MIT', :file => 'LICENSE' } s.summary = 'A toolkit for SQLite databases, with a focus on application development.' s.homepage = 'https://github.com/groue/GRDB.swift' s.author = { 'Gwendal Roué' => 'gr@pierlis....
33.2
107
0.642169
184db35bdb6713db8ce300cbe1130728ddcf8864
373
When /^I check hidden spam checkbox$/ do id = find(".boolean.required[id*='confirmation_input'] input[name*='[confirmation]'][type=checkbox]")[:id] page.evaluate_script <<-JS document.getElementById("#{id}").checked = true JS end When /^timestamp spam check will return probability (\d+)$/ do |value| stub_s...
33.909091
108
0.729223
e91f233ee15b0ef5069f32e60cff7e0c92deb4a2
195
class ContactNumber < ActiveRecord::Base belongs_to :contact validates :label, :number, presence: true, length: { maximum: 255 } include TranslatableModel translates :label, :number end
24.375
69
0.753846
0197f7119da27a9d0d3728e8893e289c920170aa
958
Pod::Spec.new do |s| s.version = "2.5.7" s.source = { :http => "https://download.avoscloud.com/sdk/iOS/release-v#{s.version}/AVOSCloudSNS.framework.zip"} s.platform = :ios, '5.0' s.name = "AVOSCloudSNS" s.summary = "AVOS Cloud SNS SDK for iOS" s.homepage = "htt...
39.916667
134
0.631524
bb6d467cdc28d11ea99e2bd0f7533f8757d1a286
953
# frozen_string_literal: true require "rails/generators" require "rails/generators/rails/model/model_generator" module Dis module Generators class ModelGenerator < Rails::Generators::ModelGenerator desc "Creates a Dis model" def initialize(args, *options) super(inject_dis_attributes(args), ...
21.177778
65
0.593914
08af9c2fd82a5dc63ea5f1b5eaf8a2137f032745
338
cask 'hyper' do version :latest sha256 :no_check # amazonaws.com is the official download host per the vendor homepage url 'https://hyper-install.s3.amazonaws.com/hyper-mac.pkg' name 'Hyper' homepage 'https://hyper.sh/' license :apache pkg 'hyper-mac.pkg' uninstall :script => '/opt/hyper/bin/uninst...
22.533333
71
0.713018
62de81250a0a372cf188afa60ab2935aee82ca5f
351
# frozen_string_literal: true module ActionMailer # Returns the version of the currently loaded Action Mailer as a <tt>Gem::Version</tt>. def self.gem_version Gem::Version.new VERSION::STRING end module VERSION MAJOR = 5 MINOR = 2 TINY = 3 PRE = nil STRING = [MAJOR, MINOR, TINY, PR...
19.5
89
0.660969
edb8802fb0f127e1c7f94b9eb9fc52e8bc9222c5
437
# # Cookbook:: openmrs # Spec:: default # # Copyright:: 2017, The Authors, All Rights Reserved. require 'spec_helper' describe 'openmrs::default' do context 'When all attributes are default, on an unspecified platform' do let(:chef_run) do runner = ChefSpec::ServerRunner.new runner.converge(describe...
20.809524
74
0.702517
ed22c71042c76bc9cf043056376de5c8bb278e5a
1,188
Rails.application.routes.draw do root 'spaces#show' # get "/auth/:provider/callback", "sessions#create" # post "/auth/:provider/callback", "sessions#create" # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html resources :spaces, only: %I[show edit update] do ...
32.108108
102
0.693603
26987fdfc669d47409110853e51220123cd6cba3
219
# frozen_string_literal: true # json formatter for logs class JSONLogFormatter < ::Logger::Formatter def call(severity, time, _progname, msg) JSON.dump(level: severity, time: time, message: msg) + "\n" end end
24.333333
63
0.721461
6a39b3d1726508658944ee11ddd0eb80c98f2f64
1,423
# # Author:: Daniel DeLeo (<dan@kallistec.com>) # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
27.901961
74
0.712579
b9af18fd1d61d2db344a6578926a9e58fd32138c
2,322
class Grade < ActiveRecord::Base belongs_to :fireman validates_date :date, :allow_blank => true, :on_or_before => :today after_save :update_intervention_editable_at GRADE_CATEGORY = { 'Médecin' => 5, 'Infirmier' => 4, 'Officier' => 1, 'Sous-officier' => 2, 'Homme du rang' ...
30.552632
79
0.393196
33517e62298984771fe6a4460f365e96fbf5db02
133
module NotificationService class ApplicationController < ActionController::API include SharedModules::Authentication end end
22.166667
53
0.827068
5d35d30c4f0bd7dce9188dd98bb095fa266307e9
177
class Etl::Edition::Content::ReadingTime def self.calculate(words) # 200 words per minute. Rounds up to 1 anything less than 1 minute. (words / 200.00).ceil end end
25.285714
71
0.706215
d59287a008d5555232553c6621a38a8181c29e85
1,763
lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "aws_lambda_memory_amount/version" Gem::Specification.new do |spec| spec.name = "aws_lambda_memory_amount" spec.version = AwsLambdaMemoryAmount::VERSION spec.authors = ["haruharuharuby...
45.205128
152
0.686897
ff8a24b623b121aacd3c65c704a2c2cf1deed48b
8,544
# 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::DigitalTwins::Mgmt::V2020_10_31 # # Azure Digital Twins Client for managing DigitalTwinsInstance # class Operations include MsRest...
38.660633
163
0.687149
39ce1c0148af951bd1991454661f91c183d10c26
6,188
# encoding: utf-8 # This file is distributed under New Relic's license terms. # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details. class SinatraIgnoreTestApp < Sinatra::Base get '/record' do request.path_info end newrelic_ignore '/ignore' get '/ignore' do request.path_info end newr...
27.259912
80
0.714447
1cc5ebb7892d5dc98d424dd149f21678cb8a211d
150
require 'opencl_ruby_ffi' require 'narray_ffi' OpenCL::platforms.each do |p| puts p.name p.devices.each { |d| puts " --Device: #{d.name}" } end
18.75
53
0.673333
d563e690ab4ec9a7e9b3149926c70cba2c46b01e
179
class ShowAction < SweetActions::JSON::ShowAction # def set_resource # resource_class.find(params[:id]) # end # def authorized? # can?(:read, resource) # end end
17.9
49
0.664804
4aea4cbbac3f1f716b7a03d14f339ed98077bdeb
1,015
# frozen_string_literal: true require File.expand_path('lib/rggen/markdown/version', __dir__) Gem::Specification.new do |spec| spec.name = 'rggen-markdown' spec.version = RgGen::Markdown::VERSION spec.authors = ['Taichi Ishitani'] spec.email = ['rggen@googlegroups.com'] spec.summary = "rggen-markdown-#{RgG...
30.757576
74
0.705419
1d0d4fa2b02d38ebb33764a2168697e6011364a2
1,550
class Libxc < Formula desc "Library of exchange and correlation functionals for codes" homepage "http://octopus-code.org/wiki/Libxc" url "http://www.tddft.org/programs/octopus/down.php?file=libxc/3.0.1/libxc-3.0.1.tar.gz" sha256 "836692f2ab60ec3aca0cca105ed5d0baa7d182be07cc9d0daa7b80ee1362caf7" revision 1 ...
31
93
0.610323
33a10a4a6dc5346f877707c95b22617fabb9c02e
259
class CreateProjects < ActiveRecord::Migration[5.2] def change create_table :projects do |t| t.string :name t.string :description t.date :due_date t.integer :status t.integer :owner_id t.timestamps end end end
18.5
51
0.640927
e871ec7d77b6d208af4305497d4343466f396d13
4,435
class VisitorsController < ApplicationController def complete_registration if current_user.bitpay_invoices.find_by_name("sign_up") == nil create_invoice end tx_id = current_user.bitpay_invoices.find_by_name("sign_up") response = HTTParty.get("https://test.bitpay.com/invoices/#{tx_id.bitpay_invoice}") bod...
31.013986
204
0.67779
91ba8e6300180d9a603e0c8ab304fe2c66af764e
1,398
class Wimlib < Formula desc "Library to create, extract, and modify Windows Imaging files" homepage "https://wimlib.net/" url "https://wimlib.net/downloads/wimlib-1.10.0.tar.gz" sha256 "989b1b02f246c480dec10469374f4235d15a3d5e5ae054452405305af5007f55" bottle do cellar :any sha256 "820662984db7e93d3a4...
29.125
92
0.690272
916b4c102ff25ce7668a1237b3972b61a4a954a0
4,857
## # $Id$ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # Framework web site for more information on licensing and terms of use. # http://metasploit.com/framework/ ## require 'msf/core' class Metasploit3 < Msf::Expl...
34.942446
114
0.64546
bb3d9815065c492f0f232c4e0f573d3594ac4e6f
1,359
require "rails" require "rails/generators" require "rails/generators/active_record" module Hayfork module Generators class CreateOrReplaceMigration < Rails::Generators::Actions::CreateMigration def initialize(base, destination, data, config = {}) config[:force] = true super end ...
27.18
135
0.671818
7915200e188d4e770bed8bf76445b2cef2538409
20,023
# Note: Calculate the number of jrubies by the number of jrubies that will fit into RAM rather than CPU. module PuppetX module Puppetlabs # Query infrastructure and show current, or calculate optimized settings. class Tune # Calculate optimized settings. class Calculate # Calculon Compute...
47.67381
182
0.650052
d58e88526ef0e7fa29061249fac18451dab96851
454
cask 'navicat-for-oracle' do version '15.0.4' sha256 '93853defa51d98b659de55a0f313b8034399fd2ad81a9bafabd0704aae63c5ad' url "http://download.navicat.com/download/navicat#{version.major_minor.no_dots}_ora_en.dmg" appcast 'https://updater.navicat.com/mac/navicat_updates.php?appName=Navicat%20for%20Oracle&appLang...
37.833333
105
0.790749
28f6e6f4617f6b1ecea34ef5a77a1ff4472741af
1,635
require 'rails_helper' RSpec.describe Offboard::RemoveSuppliersFromLots do it 'raises an error if the expected headers are not present' do bad_headers_csv_path = Rails.root.join('spec', 'fixtures', 'framework_suppliers_bad_headers.csv') expect { Offboard::RemoveSuppliersFromLots.new(bad_headers_csv_path) }....
34.0625
107
0.697248
5d13e1d5c401ca1830ffe96cecc6bc6dfce5e35c
1,268
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'roadie_actionmailer/version' Gem::Specification.new do |spec| spec.name = "roadie_actionmailer" spec.version = RoadieActionmailer::VERSION spec.authors = ["Tomáš Celizn...
40.903226
87
0.708202
e95f96325dcaba4b82fbc0593aa9f080fb2fae3f
23,851
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::ADHybridHealthService::Mgmt::V2014_01_01 # # REST APIs for Azure Active Directory Connect Health # class AddsServiceMembersOperations include MsRest...
44.581308
141
0.701061
1aa312327f2dcbaa84c22fed447ec6f2e761c16a
1,762
class Mpv < Formula desc "Media player based on MPlayer and mplayer2" homepage "https://mpv.io" url "https://github.com/mpv-player/mpv/archive/v0.32.0.tar.gz" sha256 "9163f64832226d22e24bbc4874ebd6ac02372cd717bef15c28a0aa858c5fe592" head "https://github.com/mpv-player/mpv.git" bottle do sha256 "dd0fe84...
28.419355
93
0.689557
5d6139778f3e3fbc7ee1c6c4433fc7ff02fb2fec
4,153
# Generated by jeweler # DO NOT EDIT THIS FILE DIRECTLY # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec' # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "mustachio" s.version = "0.3.0" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubyge...
37.080357
105
0.633036
f7e9c3d5de6f8fc044234d4c212371f81df098b1
25,787
module Fog module Storage class AWS < Fog::Service extend Fog::AWS::CredentialFetcher::ServiceMethods COMPLIANT_BUCKET_NAMES = /^(?:[a-z]|\d(?!\d{0,2}(?:\.\d{1,3}){3}$))(?:[a-z0-9]|\.(?![\.\-])|\-(?![\.])){1,61}[a-z0-9]$/ DEFAULT_REGION = 'us-east-1' DEFAULT_SCHEME = 'https' DEFAU...
34.613423
303
0.556327
abe3b57a5fc729a59f1cdc14f07413f34b296c1f
82
exclude :test_update, 'Precision is off' exclude :test_values, 'Precision is off'
27.333333
40
0.780488
87a14e8367908e58723ea90b12396bcc89d08550
1,922
require "minitest/spec" require "minitest/autorun" require 'mocha/minitest' require "./src/user_config/provider" describe "UserConfig" do describe "Provider" do let(:user_config) {{"credentials"=>{}}} let(:provider) { UserConfig::Provider.new(user_config) } it "should create provider" do provide...
33.137931
145
0.67794
f73ac628bce539eef2518ef953ee41973651ca17
1,814
# frozen_string_literal: true # Interface to the Redis-backed cache store for keys that use a Redis set module Gitlab class RepositorySetCache < Gitlab::SetCache attr_reader :repository, :namespace, :expires_in def initialize(repository, extra_namespace: nil, expires_in: 2.weeks) @repository = reposit...
26.289855
79
0.642227
269dc2195300fd73fe6dd735745158a058dcb13e
3,797
require 'test_helper' require 'benchmark' class FullPageRefreshTest < ActionDispatch::IntegrationTest include Capybara::DSL setup do visit "/pages/1" end test "will strip noscript tags" do click_link "Perform a full navigation to learn more" refute page.has_selector?("noscript") # this test shoul...
39.14433
177
0.724256
ff67704b4fd39fe1fd88a6e6aa218a0aed362a31
716
class CreateAccounts < ActiveRecord::Migration[4.2] def change create_table :accounts do |t| t.string :encrypted_bic, null: false t.string :encrypted_owner, null: true t.string :encrypted_iban, null: false t.string :encrypted_bank, null: false t.string :encrypted_name, null: true ...
31.130435
51
0.699721
616d62fb0b85259c5f64fa54ccaced4d827f39ad
247
class CreateClickLogs < ActiveRecord::Migration def change create_table :click_logs do |t| t.references :user, index: true t.integer :ref_id t.string :ref_clazz t.string :ref_url t.timestamps end end end
19
47
0.659919
f7ee49c7e01f3b326ba577f1fee33a24aa489372
1,446
control "VCST-67-000007" do title "Security Token Service log files must only be modifiable by privileged users." desc "Log data is essential in the investigation of events. The accuracy of the information is always pertinent. One of the first steps an attacker will undertake is the modification or deletion of log...
37.076923
87
0.713001
d5618ca4d9650d92a09bd8810c30ffc8b88a712c
231
RSpec::Matchers.define :have_filters do |kind, *names| match do |controller| filters = controller._process_action_callbacks.select{ |f| f.kind == kind }.map(&:filter) names.all?{ |name| filters.include?(name) } end end
33
93
0.701299
1a28e5a09bc9436b21ceb0b41dd6e3618c98358e
1,949
# 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...
33.033898
86
0.707029
1a86f4d1c3116d72fd06aaea7c48f0a274b0be62
801
Pod::Spec.new do |spec| spec.name = "RZEventKit" spec.version = "3.0.2" spec.summary = "Small example to test code sharing." spec.description = "Small example to test code sharing via cocoapods." spec.homepage = "https://github.com/nersonSwift/RelizKit" spec.license = "MIT...
22.25
74
0.627965
01a4d3a07bc145eaffc83fdbc7edd3f130497c6e
7,774
=begin #NSX-T Data Center Policy API #VMware NSX-T Data Center Policy REST API OpenAPI spec version: 3.1.0.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'date' module NSXTPolicy # Paginated collection of members belonging to a Group. class P...
29.225564
107
0.611011
28c3c2441ebb24e7385cb922d7dc0b363ee891b5
962
class Templates < Attachments @@template_types = ["section", "single", "archive", "search", "error", "tag", "layout"] @@template_types.sort! def template_types(extension = ".liquid") @@template_types.collect { |f| "#{f}"+extension } end def [](template_name) template_name = File.basename(template_...
37
109
0.696466
1cd12219aeedfb8921126d9c19767df22ac51b44
1,121
require "faraday" module Applicaster module Ais class Request attr_accessor :config def self.get(path, params = {}) new.get(path, params) end def self.post(path, params = {}) new.post(path, params) end def self.put(path, params) new.put(path,params) ...
20.381818
69
0.589652
1d664e690811582a86e9215d5bf9c056916e7f6a
1,893
# -*- encoding: utf-8 -*- # frozen_string_literal: true $LOAD_PATH.push File.expand_path('../lib', __FILE__) require 'devise-security/version' Gem::Specification.new do |s| s.name = 'devise-security' s.version = DeviseSecurity::VERSION.dup s.platform = Gem::Platform::RUBY s.licenses = ['MIT']...
37.86
129
0.71421
bfc9f646ff460b95689d127254b385a4b8c7778a
139
module AppleNewsClient module Behavior class Parallax < Base type "parallax" optional_property :factor end end end
15.444444
31
0.690647
91ef4e72eb74bd00d1105242503441e26c21cc8d
1,100
class Fio < Formula desc "I/O benchmark and stress test" homepage "https://github.com/axboe/fio" url "https://github.com/axboe/fio/archive/fio-3.8.tar.gz" sha256 "3eccc9eb2ccf9d910ab391c5d639565e0f6bb4050620d161f26c36c6ff83454f" bottle do cellar :any_skip_relocation # sha256 "39a042775bc8e7f84c18cf714...
36.666667
93
0.689091
bfb0d3f5dc6dfc6f6d5b3af90c954d64c513571c
1,202
# frozen_string_literal: true # encoding: utf-8 # Copyright (C) 2021 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
27.318182
74
0.663894
26dfa66488bd9db1398b955293137f2331e8e480
142
require 'mxx_ru/cpp' MxxRu::Cpp::exe_target { required_prj 'so_5/prj_s.rb' target 'sample.so_5.coop_listener_s' cpp_source 'main.cpp' }
14.2
37
0.739437
21fed918e6f20ae2efb41755b51b059b1f39c555
686
require 'active_support/inflector' class Dessert attr_reader :type, :quantity, :ingredients, :temp def initialize(type, quantity, chef) raise ArgumentError unless quantity.is_a?(Integer) @type = type @quantity = quantity @chef = chef @ingredients = [] @temp = 60 end def add_ingredient...
17.15
65
0.64723
ff5a1e892144aa00fc418f176aa6fc02ef0c620c
410
require 'gems' module Gemmies class AddWebhook < Services::Base IGNORED_ERROR_MESSAGE = /has already been registered/ def call(gemmy) return unless Gems.key.present? begin Gems.add_web_hook gemmy.name, api_releases_url rescue Gems::GemError => error unless IGNORED_ERROR_ME...
20.5
58
0.663415
e8a7b9f82ef0882b92f140218ac631fd150b2cdc
335
if ENV['PROVISIONED_USERNAME'] == 'root' PROVISIONED_DIRECTORY = '/root' else PROVISIONED_DIRECTORY = "/home/#{ENV['PROVISIONED_USERNAME']}" end remote_file "#{PROVISIONED_DIRECTORY}/.vimrc" do source ENV['VIMRC_FILE'] content 'Copy Vim config file' owner ENV['PROVISIONED_USERNAME'] group ENV['PROVISIONED_...
25.769231
64
0.746269
6a5be4ae250487f0b658ae58159d3de137fb52e9
629
[ {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 50}, {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 7}, {:test_field1 => 'Test Value 1', :test_field2 => "Test Value 2", :test_field3 => 10}, {:test_field1 => 'Test Value 1', :test_field2...
62.9
89
0.605723
f82d865cbf3126536a88b90efca8e10aa0ac6abb
155
class CreatePhotos < ActiveRecord::Migration[5.2] def change create_table :photos do |t| t.string :image t.timestamps end end end
15.5
49
0.658065
bf2accea0985af82c4595a3bd06fdf85dc194fad
808
class PessoaPolicy < ApplicationPolicy def index? user.admin? || user.pedagogx? || user.psicologx? || user.assistente_social? end def show? user.admin? || user.pedagogx? || user.psicologx? || user.assistente_social? end def new? user.admin? || user.pedagogx? || user.psicologx? || user.assistent...
21.837838
79
0.662129
2665df2440ace00f0074c3a70614915eb03f44d6
218
# Copyright (c) 2019 Danil Pismenny <danil@brandymint.ru> # frozen_string_literal: true # Load the Rails application. require_relative 'application' # Initialize the Rails application. Rails.application.initialize!
21.8
57
0.798165
4a19981466959cae1052c27933dff46c7f662c2b
675
cask 'duet' do version '2.1.0.8' sha256 '7193d0753f03993f8c7250e4c868aea9c7f54265514aae864a5798b1f07588ae' # duet.nyc3.cdn.digitaloceanspaces.com/Mac was verified as official when first introduced to the cask url "https://duet.nyc3.cdn.digitaloceanspaces.com/Mac/#{version.major_minor.dots_to_underscores}/duet-...
37.5
135
0.777778
01dff358973f66343f8d7d0bdb4d60f6105f637a
1,848
require 'spec_helper' describe Spree::PromotionCodeBatchJob, type: :job do let(:email) { "test@email.com" } let(:promotion_code_batch) do Spree::PromotionCodeBatch.create!( promotion_id: create(:promotion).id, base_code: "test", number_of_codes: 10, email: email ) end context "w...
28
63
0.669372
1aa11be3639c5909826a78c794895323e24b6dc0
50
module RoadieActionmailer VERSION = "0.0.1" end
12.5
25
0.74
d585bfe42803d70a4c547daac0f2526319a0614d
1,471
cask "microsoft-edge" do folder = Hardware::CPU.intel? ? "C1297A47-86C4-4C1F-97FA-950631F94777" : "03adf619-38c6-4249-95ff-4a01c0ffc962" linkid = Hardware::CPU.intel? ? "2069148" : "2093504" version "96.0.1054.43" if Hardware::CPU.intel? sha256 "cf229328305f25c91fd1909014f4a50df49a86d968965712ea5d28fad2a5...
31.978261
113
0.706322
d51db3e446227dd395d686013160f9ca1e13a403
1,099
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'll_pay/version' Gem::Specification.new do |spec| spec.name = 'll_pay' spec.version = LlPay::VERSION spec.authors = ['houdelin'] spec.email = ['houdelin@bayeke...
40.703704
105
0.652411
b9a32a5f7ab41c81f9ebf057dc16e461eb3857fb
36
module PsiDisciplineSlotsHelper end
12
31
0.916667
017791f197c052fffb4db284ef67f49cb8a684df
338
# frozen_string_literal: true module Gitlab module BackgroundMigration # No op on CE class MigrateRequirementsToWorkItems def perform(start_id, end_id) end end end end Gitlab::BackgroundMigration::MigrateRequirementsToWorkItems.prepend_mod_with('Gitlab::BackgroundMigration::MigrateRequirem...
24.142857
139
0.789941
39976194fe0e0aac5417abc50ca9ea6a6b86eef1
3,296
namespace :db do desc "Download latest project list and import csv" task :update => :environment do require 'csv' require 'open-uri' require 'open_uri_redirections' puts "Starting import..." record_count = 0 filename = "http://infrastructure.gc.ca/alt-format/opendata/project-list-liste-de...
34.333333
144
0.684163
6a3db1da30296f4c06a5603f0243e28a26ac3ee6
1,905
require 'spec/preparation' describe 'A Diakonos::Clipboard' do it 'can accept new clips via #add_clip' do c = Diakonos::Clipboard.new( 3 ) c.add_clip( nil ).should.be.false c.add_clip( [ 'foo' ] ).should.be.true c.add_clip( [ 'bar' ] ).should.be.true c.add_clip( [ 'baz' ] ).should.be.true c[ ...
29.307692
63
0.571129
263d562b7eb014629817f36df9e66dcced2dd7b5
2,621
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # dat...
30.476744
86
0.659672
1cf08afce7ed3e8592845169eacaf9b3a7e8c3be
5,430
class Libbi < Formula desc "Bayesian state-space modelling on parallel computer hardware" homepage "https://libbi.org/" url "https://github.com/libbi/LibBi/archive/1.4.2.tar.gz" sha256 "17824f6b466777a02d6bc6bb4704749fb64ce56ec4468b936086bc9901b5bf78" revision 1 head "https://github.com/libbi/LibBi.git" ...
37.708333
93
0.750645
91ab0fa1f4b6467496da55bb18837f34c8ac5d63
1,068
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Ch...
38.142857
117
0.741573
b9ef26ec74fc11db08d0a4016a6fa2c7774ec379
377
# encoding: UTF-8 # This file contains data derived from the IANA Time Zone Database # (http://www.iana.org/time-zones). module TZInfo module Data module Definitions module America module St_Kitts include TimezoneDefinition linked_timezone 'America/St_Kitts', 'Americ...
19.842105
69
0.649867
aba65e57865ae7972b20583ecbbba98fb5749ed8
1,627
class Libomp < Formula desc "LLVM's OpenMP runtime library" homepage "https://openmp.llvm.org/" url "https://releases.llvm.org/8.0.0/openmp-8.0.0.src.tar.xz" sha256 "f7b1705d2f16c4fc23d6531f67d2dd6fb78a077dd346b02fed64f4b8df65c9d5" bottle do cellar :any sha256 "6c8f66a6582efa00620593e16a41f3649018778...
33.204082
93
0.634296
d56eea80489bc97192a6d1ad6bdfc8030f7c760c
2,916
# frozen_string_literal: true require 'spec_helper' RSpec.describe ActiveJob::Retry::ConstantBackoffStrategy do let(:strategy) { described_class.new(options) } describe '#should_retry?' do subject { strategy.should_retry?(attempt, exception) } let(:attempt) { 1 } let(:exception) { RuntimeError.new } ...
24.711864
75
0.576475
b959e34acf7c1919c38f8ad979df98d5871eca0c
811
# # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'flutter_qr_reader' s.version = '0.0.1' s.summary = 'QR code (scan code &#x2F; picture) recognition (AndroidView&#x2F;UiKitView)' s.description = <<-DESC QR co...
35.26087
100
0.583231
03db3f276476a661a90a515ac1fe49a1ba957da6
3,911
require 'helper' require 'time' require 'net/http' require 'ddtrace' require 'ddtrace/contrib/rack/middlewares' require 'rack/test' def wait_http_server(server, delay) delay.times do |i| uri = URI(server + '/') begin res = Net::HTTP.get_response(uri) return true if res.code == '200' rescue S...
28.547445
88
0.580926
218cefd87e2747a701954efc6825a8923dc8cb14
463
Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html root to: redirect('/todos') get 'todos', to: 'site#index' get 'todos/new', to: 'site#index' get 'todos/:id/edit', to: 'site#index' namespace :api do namespace :v1 do ...
27.235294
102
0.682505
1da32572638adcea8bb7f7a4146fef19f3eea456
14,457
# frozen_string_literal: true # Use this hook to configure devise mailer, warden hooks and so forth. # Many of these configuration options can be set straight in your model. Devise.setup do |config| # The secret key used by Devise. Devise uses this key to generate # random tokens. Changing this key will render inv...
48.19
154
0.751262
3871785da1241248bb6c8fc5474986bd8dd4291a
741
default['openstack']['network']['tun_network_bridge_interface'] = 'lo' default['openstack']['network']['provider_network_interface'] = 'lo' default['sample']['network']['dns'] = '1.1.1.1' default['sample']['network']['provider']['subnet'] = '192.168.57.0/24' default['sample']['network']['provider']['gateway'] = '192....
49.4
71
0.646424
e27985392ac0f5da4f2036ffbcff58a937f4ccb0
1,353
require 'rails_helper' RSpec.describe Track, type: :model do describe 'Validations' do let(:user) { create :user } let(:activ) { create :activ, user: user } it 'has a valid factory' do track = build :track, activ: activ expect(track).to be_valid end it 'has a valid name' do tr...
28.787234
67
0.651146
912e8fe64d2b992aeaa20e6322b9e11199d3d24f
1,601
class Glab < Formula desc "Open-source GitLab command-line tool" homepage "https://glab.readthedocs.io/" url "https://github.com/profclems/glab/archive/v1.18.1.tar.gz" sha256 "ce10c93268eb58fa6d277ebd4ed6de254e4365a1a332122f597e295cc11496c3" license "MIT" revision 1 head "https://github.com/profclems/glab...
43.27027
122
0.738289
876a4471ab0bcd212b6ab0b20aae8e9d71009f18
176
module FreeThePaf class App < Padrino::Application register Padrino::Rendering register Padrino::Mailer register Padrino::Helpers enable :sessions end end
17.6
34
0.732955
61695758a2681e901f1715cb0154c292ebc82a24
327
# frozen_string_literal: true module SimpleForm module Inputs class RichTextAreaInput < Base def input(wrapper_options = nil) merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) @builder.rich_text_area(attribute_name, merged_input_options) end end e...
25.153846
89
0.752294
623a30c66b6b708d15e953219912ca09c57c838c
14,161
require File.dirname(__FILE__) + '/../test_helper' class UrlFiltersTest < ActiveSupport::TestCase fixtures :sites, :sections, :contents include CoreFilters, UrlFilters def setup @context = mock_context 'site' => sites(:first).to_liquid, 'section' => sections(:about).to_liquid end test "should generate...
42.525526
149
0.694513
87cc1cc4397f5b551761bcb8a0dd8c42812261ee
175
class NewsNotification < ActiveRecord::Base validates_presence_of :title, :body default_scope -> { order(updated_at: :desc) } scope :active, -> { where(active: true) } end
29.166667
46
0.731429
0166856d11dfe30e4ba55821f3fc396aaa241396
425
module NLBSG class GetAvailabilityInfoResponse < ResponseBase def initialize(response) super(response.to_hash[:get_availability_info_response]) end def next_record_position @response[:next_record_position] end def set_id @response[:set_id] end def items wrap_in_...
17
62
0.677647
61a750bb5caab6b3a7d4dcd4e8cd0cc42d676fae
136
class AddRedcapIdToParticipants < ActiveRecord::Migration[6.0] def change add_column :participants, :redcap_id, :string end end
22.666667
62
0.772059
61991c3989107aa89101b3de7a6c6b9df9d722dd
217
class AddOmniauthToUsers < ActiveRecord::Migration[5.1] def change add_column :users, :provider, :string add_index :users, :provider add_column :users, :uid, :string add_index :users, :uid end end
24.111111
55
0.705069
6aed7bd44a7dcf83e30d572a2ffc91c6cecfef34
53
module Mtg class Setting < Sequel::Model end end
10.6
31
0.716981
2114843b6c41fa6df5333d6eae01e4f827d557a5
755
#! /usr/bin/jruby # -*- coding: utf-8 -*- # # hsqldb_update.rb # # Jan/29/2015 # ------------------------------------------------------------ # include Java import java.sql.DriverManager import java.lang.System # require 'date' # load '/var/www/data_base/common/jruby_common/jruby_sql_manipulate.rb' # # -------------...
19.868421
69
0.528477
ffe9b4fb4cad96f6894648765e90a651e9085901
590
require 'spec_helper' describe 'rabbitmq::policy_management' do let(:runner) { ChefSpec::ServerRunner.new(REDHAT_OPTS) } let(:node) { runner.node } let(:chef_run) do runner.converge(described_recipe) end let(:file_cache_path) { Chef::Config[:file_cache_path] } it 'includes the `default` recipe' do ...
24.583333
59
0.716949
e982a7df162dad9c055d471bff30041dc6966aa0
2,172
# coding: UTF-8 require 'spec_helper' describe Spree::Taxon, :type => :model do let(:taxon) { FactoryGirl.build(:taxon, :name => "Ruby on Rails") } describe '#to_param' do subject { super().to_param } it { is_expected.to eql taxon.permalink } end context "set_permalink" do it "should set permal...
28.96
81
0.649632
03dad98a20638346595b490a37c8233d363c06f3
1,581
class Riemann::Babbler::Plugin::Mdadm < Riemann::Babbler::Plugin def init plugin.set_default(:service, 'mdadm') plugin.set_default(:interval, 60) plugin.states.set_default(:critical, 1) end def run_plugin File.exists? '/proc/mdstat' end def rm_bracket(text) text.gsub('[', '').gsub(']', ...
27.736842
166
0.596458
e9251a8b4662395c0837a51f69f8e8e248f000e7
545
# an example where a field may crosse one or two byte boundaries # # try with arguments like 4, 12, and 13 to see the difference # # based on test case from Jon Hart require 'bit-struct' class Foo < BitStruct unsigned :a, 4 unsigned :b, 8 unsigned :c, (ARGV[0] || (raise "USAGE: #{$0} bits")).to_i end puts Foo.d...
17.580645
64
0.645872
ac3d251414bc318817093b209a74fb5191722d43
3,011
require "singleton" module PseudoCleaner class Configuration include Singleton # A simple configuration class for the PseudoCleaner # # Configurations: # output_diagnostics - true/false # if true, the system will use puts to output information about what it is doin...
34.215909
111
0.672534
bf5c66322e91d5b80ed081f04644ede8ac1c80fe
1,587
# # Copyright 2015, SUSE Linux 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
24.415385
74
0.553245
abc41f2718152dc185ea60bba464b123df219d5f
1,099
statistics_announcements = StatisticsAnnouncement.unscoped.includes(:publication).all check = DataHygiene::PublishingApiSyncCheck.new(statistics_announcements) def has_been_redirected?(statistics_announcement) publication_published?(statistics_announcement) || statistics_announcement.unpublished? end def publicatio...
31.4
89
0.806187