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
7982ae1b68a8c4d7e2c58aff515d0475b90edb9e
39
module Satisfy VERSION = '0.0.1' end
9.75
19
0.666667
7af8025d3ea1f8b6856af285ab3a43381abe65a1
2,473
require 'test_helper' class PasswordResetsTest < ActionDispatch::IntegrationTest def setup ActionMailer::Base.deliveries.clear @user = users(:michael) end test "password resets" do get new_password_reset_path assert_template "password_resets/new" # メールアドレスが無効 post password_resets_path, ...
38.640625
139
0.743631
1adb44900e115c45269e27da3e72dd021290c626
363
module Glysellin module Cart class Address include ModelWrapper wraps :embed_address, class_name: "Glysellin::Address" def as_json attributes.reject do |attr, _| key = attr.to_s %w(id created_at updated_at activated).include?(key) || key.match(/addressabl...
22.6875
65
0.606061
ab6d6aef1c3dec8c310570ff227722359a364bda
2,217
# frozen_string_literal: true require 'test_helper' class UsersEditTest < ActionDispatch::IntegrationTest def setup @user = users(:michael) end test 'unsuccessful edit' do log_in_as(@user) get edit_user_path(@user) assert_template 'users/edit' patch user_path(@user), params: { user: { name:...
31.671429
78
0.54894
28024fd010b5e2785e0095f3a024828791ef2fb0
686
# frozen_string_literal: true module Types module Tree # rubocop: disable Graphql/AuthorizeTypes # This is presented through `Repository` that has its own authorization class TreeEntryType < BaseObject graphql_name 'TreeEntry' description 'Represents a directory' implements Types::Tree:...
32.666667
75
0.701166
6ad8890048946a4bcdd37db941f5f070607e4d7a
52
Fabricator(:tag) do name { "tag_#{sequence}" } end
17.333333
28
0.653846
610a83510f8c6e743ec1b3cd44a3fc9153f8b868
18
module Census end
6
13
0.833333
79de60d20fd245b75980e4a37c9d21a107519197
184
class AddFullnameAndGoogleApiidToUsers < ActiveRecord::Migration[5.1] def change add_column :users, :full_name, :string add_column :users, :google_api_key, :string end end
26.285714
69
0.76087
4a9f96fa7fd34bd52f5e7f93240f8e62a816a95b
1,771
class Libmagic < Formula desc "Implementation of the file(1) command" homepage "https://www.darwinsys.com/file/" url "ftp://ftp.astron.com/pub/file/file-5.36.tar.gz" sha256 "fb608290c0fd2405a8f63e5717abf6d03e22e183fb21884413d1edd918184379" bottle do root_url "https://linuxbrew.bintray.com/bottles" sh...
36.142857
94
0.643704
212bb09abc1ed2dc917fb6f16e4db5533eaa82a0
1,313
Pod::Spec.new do |s| s.name = "BQMM_RC" s.version = "1.7.2" s.summary = "BQMM RongCloud SDK" s.description = <<-DESC The developer can use this SDK to integrate more and more emoji, such as some static image emoji, or animated emoji ...
42.354839
246
0.584158
bfe6a5aac1c4170b078cdb24a634559f3e18525d
993
require 'spec_helper' describe Storage::VersionStorage do describe "#name" do let(:version) { double(name: "123", options: {foo: "var"}) } let(:model) { double } it "works" do version_storage = described_class.new(version, model) expect(version_storage.name).to eq version.name expect(v...
29.205882
79
0.632427
bb4ffbd8168882edfadcebed60f8cd46fb70d606
156
class <%= @scope_prefix %>SessionsController < DeviseJwt::SessionsController # def create # super # end # # def destroy # super # end end
15.6
76
0.641026
4aeb94450f2c72838ccf53f6c811f7c0cac63081
454
require 'pty' # Wrapper for PTY pseudo-terminal module Ansible::SafePty # Spawns process for command # @param command [String] command # @return [Integer] exit status def self.spawn(command) PTY.spawn(command) do |r,w,p| begin yield r,w,p if block_given? rescue Errno::EIO nil #...
20.636364
64
0.638767
218c4b174aa7df4eea15a6f7695b6909268a4838
137
class RemoveColumnTramiteToCircuito < ActiveRecord::Migration def change remove_column :circuitos, :tramite_id, :integer end end
22.833333
61
0.79562
4a117700721cff1922ffcbca87231ec1721eef19
213
FactoryBot.define do factory :forums_post_edit, class: 'Forums::PostEdit' do association :post, factory: :forums_post association :created_by, factory: :user content { 'Stuff happened!!' } end end
26.625
57
0.71831
ffa67f2e25b1df1b4a7e7c2f55ce5303f7d9bd4f
1,811
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
34.169811
115
0.641634
7a4da95b5aaf95646efa951a265c64eb386538f2
130
class RenameTextColumnInPredictions < ActiveRecord::Migration def change rename_column :predictions, :text, :body end end
21.666667
61
0.784615
7a24cb613d2156c6c60997622b4a1c93d5e5cb8d
628
module TaskHelper module API class Cache def initialize(limit: 0, **call_defaults) @limit = limit @call_defaults = call_defaults @calls = [] end def get(**args) new_call = Call.new(@call_defaults.merge(args)) cached_call = @calls.find { |call| call == new...
20.933333
61
0.536624
1caf1f9bc474d90064ffb704138e7df311204d1d
27,559
# -*- encoding: utf-8; frozen_string_literal: true -*- # #-- # This file is part of HexaPDF. # # HexaPDF - A Versatile PDF Creation and Manipulation Library For Ruby # Copyright (C) 2014-2020 Thomas Leitner # # HexaPDF is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero Genera...
48.519366
105
0.611488
d5f151a01e78b015c3a73b95ac8907ff7cda016b
2,986
# 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::MariaDB::Mgmt::V2018_06_01_preview module Models # # A virtual network rule. # class VirtualNetworkRule < ProxyResource ...
29.86
79
0.497991
6286e7c6a057d9cdeddac1fe1551f8a16c928483
532
# frozen_string_literal: true module Stupidedi module Versions module FunctionalGroups module ThirtyTen module SegmentDefs s = Schema e = ElementDefs r = ElementReqs N3 = s::SegmentDef.build(:N3 , "Address Information", "To specify the location ...
24.181818
74
0.593985
1aeae70b36e4d0c76479380c3c6f10caa8848bc2
316
class AddTagsToSavedSearches < ActiveRecord::Migration[4.2] def change execute "set statement_timeout = 0" add_column :saved_searches, :labels, "text", array: true, null: false, default: [] add_index :saved_searches, :labels, using: :gin rename_column :saved_searches, :tag_query, :query end end
35.111111
86
0.727848
e284bb669b3cfe16bce947c862ebb2e61a1218e4
8,397
=begin #Xero Payroll AU API #This is the Xero Payroll API for orgs in Australia region. Contact: api@xero.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'time' require 'date' module XeroRuby::PayrollAu require 'bigdecimal' class BankAccount # The text that w...
30.98524
210
0.620579
1a1b9ab04435522b3968fd543f37fadf2b4d6192
232
class SearchController < ApplicationController def index keywords = params[:q] || '' keywords.gsub!('#', '%23') redirect_to "https://www.google.com.hk/#hl=zh-CN&q=site:ruby-china.org+#{CGI.escape(keywords)}" end end
29
99
0.668103
ff7ff1bffeecd36bf9e78cf53e7ac3fdb74ab72d
1,720
# encoding: utf-8 # # Redmine - project management software # Copyright (C) 2006-2017 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or ...
44.102564
136
0.742442
62f9bdcc99597084fc04d9f0cbba4bf2b6ef353f
544
require "bar_back/version" require "bar_back/engine" module Webpacker; end require "webpacker/ENV" require "webpacker/configuration" require "webpacker/instance" module BarBack mattr_accessor :http_basic_enabled mattr_accessor :http_basic_username mattr_accessor :http_basic_password ROOT_PATH = Pathname.new(F...
22.666667
59
0.731618
ac34ebd0a7756a4e56755e1225d25840d6bad38d
2,074
require "sidekiq/logging/json/version" require "sidekiq/logging/json" require "json" module Sidekiq module Logging module Json class Logger < Sidekiq::Logging::Pretty # Provide a call() method that returns the formatted message. def call(severity, time, program_name, message) { ...
36.385965
140
0.499036
f7c4ec6134f6dbf4f5d15b89a41e59a029e706c1
261
require 'rubygems' require 'test/unit' require 'shoulda' $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'ActionMailer-Base-to-use-an-absolute-path-template' class Test::Unit::TestCase end
23.727273
66
0.762452
08fac1d4cd939f90af563d4dc3df28d2aced42c0
106
exclude :test_enclosed_thgroup, "needs investigation" exclude :test_frozen_thgroup, "needs investigation"
35.333333
53
0.849057
288ce8c71745f232520bee67466c551da5ffeece
45
require "zelotes/engine" module Zelotes end
9
24
0.8
e20f1d35b2821564b031e4f27713767246872c25
2,549
require 'test/unit' $: << File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) require 'orientdb4r' ### # This class tests Utils methods. class TestUtils < Test::Unit::TestCase include Orientdb4r::Utils def test_verify_options opt_pattern = {:a => :mandatory, :b => :optional, :c => 'predefined', :...
36.414286
105
0.655159
d5d9683ad995915fac66761e839b23a0bced90a6
9,033
# frozen_string_literal: true # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
39.969027
114
0.560611
e9f536a566201509034f6014f5e3ad0289dc847e
5,631
#!/usr/bin/ruby -w begin; require 'rubygems'; rescue LoadError; end require 'test/unit' require 'aem' require 'kae' require 'ae' def num(s) if [1].pack('s') == "\001\000" # host system is i386 s.reverse else s end end def ut16(s) if [1].pack('s') == "\001\000" # host system is i386 i = 0 s2 = '' (s.le...
30.112299
208
0.648553
08f99cffd48877e03613aafac9573d17dfbf80c2
268
cask :v1 => 'cpumeter' do version :latest sha256 :no_check url 'https://github.com/yusukeshibata/cpumeter/blob/master/dist/cpumeter.zip?raw=true' name 'cpumeter' homepage 'https://github.com/yusukeshibata/cpumeter/' license :mit app 'cpumeter.app' end
22.333333
88
0.727612
4a6a5367f7acaa4cd5198bd5b368774e4aa32d97
1,137
class SoundTouch < Formula desc "Audio processing library" homepage "https://www.surina.net/soundtouch/" url "https://gitlab.com/soundtouch/soundtouch/-/archive/2.1.2/soundtouch-2.1.2.tar.gz" sha256 "2826049e2f34efbc4c8a47d00c93649822b0c14e1f29f5569835704814590732" license "LGPL-2.1" bottle do cellar :...
31.583333
93
0.734389
610eab78937b458a1fdf40d8605c68037fcf7f9e
752
class IRWebmachine::TracedRequest def initialize(app) @app = app @req = nil @res = nil @stack = IRWebmachine::Stack.new end def stack @stack end def dispatch(*args) dispatch!(*args) while frame = @stack.tracer.continue @stack << frame end @res end def dispatch!...
20.888889
69
0.615691
e277633664faa6ca44d2f125db02a9b449a0bd2b
3,160
# frozen_string_literal: true module Integrations class EmailsOnPush < Integration include NotificationBranchSelection RECIPIENTS_LIMIT = 750 boolean_accessor :send_from_committer_email boolean_accessor :disable_diffs prop_accessor :recipients, :branches_to_be_notified validates :recipients...
31.6
205
0.692405
081ebb6a81da9fbe802f7ee535685352bb096836
833
require 'bundler/setup' require 'webmock/rspec' require 'httparty' require 'active_support' require 'pensio_api' require './spec/support/helpers' RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus config.include Helpers config.before :each do PensioAPI::Cr...
30.851852
101
0.752701
088c584392f3a7e0ee1e38d7e667d2b3db422385
154
class EnablePgcryptoExtension < ActiveRecord::Migration[5.2] def change enable_extension "pgcrypto" unless extension_enabled?("pgcrypto") end end
25.666667
69
0.785714
ab1e7ad269ce835c3ba528ba70962740c1929b62
99,611
# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/core_ext/string/conversions" require "active_support/core_ext/module/remove_method" require "active_record/errors" module ActiveRecord class AssociationNotFoundError < ConfigurationError #:nodoc: def initialize(re...
53.468062
456
0.635251
62caf02a95e66a04e8748572521801db613efe3e
4,870
Then(/(.*) should see active and renewing enrollments/) do |named_person| visit "/families/home" person = people[named_person] ce = CensusEmployee.where(:first_name => /#{person[:first_name]}/i, :last_name => /#{person[:last_name]}/i).first renewal_effective_date = ce.benefit_sponsorship.renewal_benefit_applic...
41.623932
191
0.732444
e94285536a7785a505c5e522a0dfe2374a68d0f1
217
# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) map Web::Application.config.relative_url_root || "/" do run Rails.application end
27.125
67
0.75576
b98ff49916ea38a416a0d37c443335f2957b0470
3,946
require "cmd/update-report" require "formula_versions" require "yaml" describe Reporter do def perform_update(fixture_name = "") allow(Formulary).to receive(:factory).and_return(double(pkg_version: "1.0")) allow(FormulaVersions).to receive(:new).and_return(double(formula_at_revision: "2.0")) diff = YAML...
30.353846
90
0.707045
7a42509fd688ced56282d27512f66d28d3b937ef
3,284
require 'test_helper' class QbmsTest < Test::Unit::TestCase def setup Base.mode = :test @gateway_options = fixtures(:qbms) @gateway = QbmsGateway.new(@gateway_options) @amount = 100 @card = credit_card('4111111111111111') @options = { billing_address: address, } end def ...
30.407407
95
0.752132
7af9f44a603db6cfcaff512dd87de413cc97653b
1,783
module Spree module TestingSupport module AuthorizationHelpers module CustomAbility def build_ability(&block) block ||= proc { |_u| can :manage, :all } Class.new do include CanCan::Ability define_method(:initialize, block) end end e...
26.61194
93
0.609647
213fe8206fa42cf468eafefbe8d4f8f871ddf035
130
#!/usr/bin/env ruby # frozen_string_literal: true (1..10).each { |n| puts format("%<n>2i\t%<square>6.2f", n: n, square: n**2) }
21.666667
77
0.607692
62f8ea4c411e686d36e77ff83eb0d48c6cce0452
12,993
# frozen_string_literal: true require 'rspec' describe 'config/haproxy.config HTTPS frontend' do let(:template) { haproxy_job.template('config/haproxy.config') } let(:haproxy_conf) do parse_haproxy_config(template.render({ 'ha_proxy' => properties })) end let(:frontend_https) { haproxy_conf['frontend ht...
36.192201
223
0.687447
7979fba958026c98a9d9b4bae7da319814eab128
5,653
Shindo.tests('OpenStack | authenticate', ['openstack']) do begin @old_mock_value = Excon.defaults[:mock] Excon.defaults[:mock] = true Excon.stubs.clear expires = Time.now.utc + 600 token = Fog::Mock.random_numbers(8).to_s tenant_token = Fog::Mock.random_numbers(8).to_s body =...
34.260606
79
0.482399
01287deacf5eb8f2ec15188a4a68522d15509705
948
# (C) Copyright 2020 Hewlett Packard Enterprise Development LP # # 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...
36.461538
85
0.748945
6a7cf3fc075b5eb802b7db65fb22b90755a76e51
369
=begin Copyright (c) 2015, Koichiro Tamura/Toshinari Naminatsu/Yuki Ishikawa/Tatsuya Onishi/Mamoru Endo/Kenji Suzuki This software is released under the BSD 2-Clause License. http://opensource.org/licenses/BSD-2-Clause =end # system development and maintenance information for administration class MaintenanceInfo ...
23.0625
109
0.807588
0312b2c86e1e45bf32f52f0ac3f8ed2db96bdd80
23
module TemasHelper end
7.666667
18
0.869565
6a482989e69a184686aa21168b9a186d0f37981f
3,506
# frozen_string_literal: true class Idt::V1::AppealDetailsSerializer include FastJsonapi::ObjectSerializer set_id do |object| object.is_a?(LegacyAppeal) ? object.vacols_id : object.uuid end attribute :case_details_url do |object, params| "#{params[:base_url]}/queue/appeals/#{object.external_id}" end...
31.585586
100
0.68939
f83c225e8911f0b77f39b3ec396e5b7f176ac886
422
module MsGraphRest class Error < StandardError end class ResourceNotFound < Error end class AuthenticationError < Error end class BadRequestErrorCreator def self.error(ms_error) ms_error_code = JSON.parse(ms_error.response[:body] || '{}').dig("error", "code") return AuthenticationError...
20.095238
88
0.7109
bf58a806b17f75b79fc282706bc40dc27fed2460
1,972
require 'sentry-raven-without-integrations' require 'pry' require 'simplecov' SimpleCov.start if ENV["CI"] require 'codecov' SimpleCov.formatter = SimpleCov::Formatter::Codecov end Raven.configure do |config| config.dsn = "dummy://12345:67890@sentry.localdomain/sentry/42" config.encoding = "json" config.si...
22.930233
78
0.732252
bf558ba961a3f429531d84869b5e67854917876e
128
# # Cookbook Name:: workstation # Recipe:: git include_recipe "git_wrapper" execute "git config --global push.default simple"
16
49
0.75
28f71068f1a16e5546db6663356827d152e13f5b
563
require_relative 'node_literal.rb' class DabNodeLiteralFloat < DabNodeLiteral attr_reader :number def initialize(number) super() @number = number end def extra_dump number.to_s end def compile_as_ssa(output, output_register) output.comment(self.extra_value) output.print('LOAD_FLOAT', ...
16.085714
65
0.724689
38e2833f216eda6d47f3244b114980f37912e8ca
2,534
cask 'thunderbird' do version '45.7.1' language 'de' do sha256 '2a9f128bed773eafb28e1a17687e42319e2a6db22db1269b775e2821dd1f225c' 'de' end language 'en-GB' do sha256 'f0ea3365a434681e8da6df6d27651d3499297812c2e80263a9c94f3882598989' 'en-GB' end language 'en', default: true do sha256 '...
27.846154
169
0.746646
113896626bdeb291154329a3229346812d19ee3e
1,557
class Tssh < Formula desc "SSH Lightweight management tools" homepage "https://github.com/luanruisong/tssh" url "https://github.com/luanruisong/tssh/archive/refs/tags/2.1.2.tar.gz" sha256 "1c6b00750260d2c567d99f8bfd0c7fc87a96ac0faa3cfc8d54cb32400e95bb56" license "Apache-2.0" bottle do sha256 cellar: :a...
48.65625
123
0.782916
ac2ec3097deaa741355e82424c2e33865cd56f5a
1,494
class Libcouchbase < Formula desc "C library for Couchbase" homepage "https://docs.couchbase.com/c-sdk/current/hello-world/start-using-sdk.html" url "https://packages.couchbase.com/clients/c/libcouchbase-3.2.1.tar.gz" sha256 "c5ee6a5591c644b97f83ecff339abfa8e01e06fa4af126df4b226a425df5f056" license "Apache-2....
38.307692
109
0.706827
79ea139ed7953b37f1440d26da2dc59521d26cb1
338
# # rm-macl/lib/rm-macl/xpan/easer/quint-inout.rb # dc 24/03/2013 # dm 24/03/2013 # vr 1.0.0 module MACL class Easer class Quint::InOut < Quint register(:quint_inout) def _ease(t, st, ch, d) if (t /= d / 2.0) < 1 ch / 2.0 * t ** 5 + st else ch / 2.0 * ((t -= 2) * t ** 4 + 2) + st end ...
14.695652
47
0.529586
617075cfe61a2d4c13ee6358d38e453249183aaa
156
require 'test_helper' class WorkflowToHashTest < Minitest::Test def test_that_it_has_a_version_number refute_nil ::WorkflowToHash::VERSION end end
19.5
41
0.807692
ed5f7d04421901f79c7c573481390646941a4547
645
class Answers::CommentsController < CommentsController before_action :set_commentable def create super respond_to do |format| format.html { redirect_to url_for(@commentable.question) } format.js end end def destroy @comment = @commentable.comments.find_by(commentable_id: params[:an...
24.807692
80
0.658915
4aec41b834d24125510dc6ce109f6b1f332a21ce
5,225
# frozen_string_literal: true require 'spec_helper' RSpec.describe Mutations::Vulnerabilities::Create do include GraphqlHelpers let_it_be(:user) { create(:user) } let(:project) { create(:project) } let(:mutated_vulnerability) { subject[:vulnerability] } before do stub_licensed_features(security_dashboa...
33.280255
128
0.620096
21df399eb3b94f8ef6ad12f4ad42867fe343f78a
836
module MockleyCrew class Configuration attr_accessor :crew_folder, :factories, :crew_header, :heroku def initialize args = {} @crew_header = args["crew_header"] || "crew-man-badge" @crew_folder = args["crew_folder"] || "#{Rails.root}/db/crew" @heroku = args["heroku"] || false end d...
22.594595
67
0.642344
bf8728f5286c2b4693bc07725333e89510220fac
939
Pod::Spec.new do |s| s.name = 'Legible' s.version = '0.1.0' s.summary = 'Quick and Nimble Behaviors and Helpers' s.description = <<-DESC Set of Quick and Nimble Behaviors and Helpers to make spec more readable DESC s.homepage = 'https://github...
32.37931
70
0.576145
116854d88e91f4f21b657a0e7ca1052b56dcfd13
335
# frozen_string_literal: true module Renalware log "Adding HD Providers" do unit = Hospitals::Unit.find_by(unit_code: "MOUNT") provider = HD::Provider.find_by(name: "Diaverum") HD::ProviderUnit.find_or_create_by!( hospital_unit: unit, hd_provider: provider, providers_reference: "1831" ...
23.928571
54
0.695522
6a61f0a8463241172a4a29264f6f5f25f1d911e2
1,455
module BackgroundCache class Client attr_reader :redis_1, :redis_2 def initialize(root) if File.exists?(yaml = "#{root}/config/background_cache.yml") options = YAML.load(File.read(yaml)) else puts "\nFAIL: config/background_cache.yml not found" shutdown end @...
27.45283
81
0.579381
080cfaeb8c9abdc7fd02802b91cbcf17fa4eb5ae
4,549
require 'ddtrace/contrib/configuration/resolver' require 'ddtrace/vendor/active_record/connection_specification' module Datadog module Contrib module ActiveRecord module Configuration # Converts Symbols, Strings, and Hashes to a normalized connection settings Hash. # # When matching...
35.263566
119
0.560123
bfd4543b4fcb1d3161763e657c67aa54559fac39
1,864
require 'spec_helper' describe TrackingController do it_should_behave_like(:tracking_extensions) describe 'GET new' do let(:valid_options) { { 'aid' => '1732', 'c' => 'BIGLONGHASH', 'campaign_id' => nil, 'pathID' => '123', 'subID' => 'Subid 1', 'subID2' => 'Subid 2', ...
27.411765
133
0.651824
1c32996711cfa267a2175c13ee92092cec8fd199
1,045
cask "retro-virtual-machine" do version "2.0,1.r7" sha256 "75e94f2df589ead3fb1eab529713312a17dc16e6b2ba547594cd9d5975def566" url "https://retrovirtualmachine.ams3.digitaloceanspaces.com/release/beta#{version.csv.second.major}/macos/RetroVirtualMachine.#{version.csv.first}.beta-#{version.csv.second}.macos.dmg", ...
37.321429
188
0.714833
ed6dd4e8964e260562ed57c19b6b17ecc76432f5
1,997
# encoding: UTF-8 # # Copyright (c) 2010-2015 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require_relative '../rest/resource' require_relative '../extensions/hash' module GoodData class E...
23.77381
121
0.649975
26e41d857487442600385aa91e0fd2505bddc4bb
187
class ChangeAppointmentSummariesValueOfPensionPotsToString < ActiveRecord::Migration[4.2] def change change_column :appointment_summaries, :value_of_pension_pots, :string end end
31.166667
89
0.834225
28d8093b81ffce679735b3be21ca9bb795c18a96
563
#!/usr/bin/ruby -w # PART 7 # The rand method can generate random numbers! # In the IO section we will see how these things work! p rand(1..100) # => 30 p Kernel.rand(1..100) # => 94 p Random.rand(1..100) ...
37.533333
75
0.516874
033ff82b458ec5f6c716c36b8e425feeefa6951f
1,826
module MobileFu module Helper def js_enabled_mobile_device? is_device?('iphone') || is_device?('ipod') || is_device?('ipad') || is_device?('mobileexplorer') || is_device?('android') end def stylesheet_link_tag_with_mobilization(*sources) mobilized_sources = Array.new # Figure out...
42.465116
130
0.663198
62245162c3509672aba4ecb570d537f220b76815
186
Deface::Override.new( virtual_path: 'spree/layouts/admin', name: 'panels_admin_sidebar_menu', insert_bottom: '#main-sidebar', partial: 'spree/admin/shared/panels_sidebar_menu' )
26.571429
51
0.758065
bfa36005347d7873430b01985810add5f54ac493
1,429
# coding: utf-8 lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "rbcore/version" Gem::Specification.new do |spec| spec.name = "rbcore" spec.version = Rbcore::VERSION spec.authors = ["stephenw"] spec.email = ["admin@stephenw...
35.725
96
0.659202
33d8676bd916b5edf8e7e442f2c0a16884efb0f7
2,618
=begin #Custom Workflow Actions #Create custom workflow actions The version of the OpenAPI document: v4 Generated by: https://openapi-generator.tech OpenAPI Generator version: 4.3.1 =end require 'spec_helper' require 'json' require 'date' # Unit tests for Hubspot::Automation::Actions::ExtensionActionDefinitionInp...
29.088889
103
0.73071
019362099ff9224e4dd6179e7d5902c19daa4cf9
295
require 'twilio-ruby' response = Twilio::TwiML::VoiceResponse.new response.dial do |dial| dial.client do |client| client.identity('user_jane') client.parameter(name: 'FirstName', value: 'Jane') client.parameter(name: 'LastName', value: 'Doe') end end puts response
22.692308
58
0.681356
1843acb0cc084beca299eef2d6db6c660c9e9415
10,928
# frozen_string_literal: true require 'spec_helper' describe Gitlab::QuickActions::Extractor do let(:definitions) do Class.new do include Gitlab::QuickActions::Dsl command(:reopen, :open) { } command(:assign) { } command(:labels) { } command(:power) { } command(:noop_command...
32.915663
99
0.621065
039f8e48a5967c5291ffaadbcb0cf1e0300fa038
1,459
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
27.528302
74
0.689513
394a6a014a4e05ef03ce474d0b4ea1349c9b752f
948
module Bmg class OutputPreferences DEFAULT_PREFS = { attributes_ordering: nil, extra_attributes: :after } def initialize(options) @options = DEFAULT_PREFS.merge(options) end attr_reader :options def self.dress(arg) return arg if arg.is_a?(OutputPreferences) arg...
21.066667
60
0.607595
21f00cfc2d65abfc680a76cf2d1e7ee459216f08
12,577
# -------------------------------------------------------------------------- # # Copyright 2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs # # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # # no...
34.552198
79
0.576608
b9126b87faec746ff3887a772169dd8eba67de5d
1,286
require_relative "../task2" describe Frequency do before { @file = "sample_files/fasta/sample.fasta" } let(:fasta) { Frequency.new(@file) } before { fasta.get_freq } describe '#get_freq' do it "is defined" do expect(Frequency.method_defined?(:get_freq)).to be true end end describe 'parse' do it "...
23.381818
67
0.70451
797fdadc4f6508fd80bda8021399bfd67d6d11ee
160
class AddTitleAndPostToPosts < ActiveRecord::Migration[6.0] def change add_column :posts, :title, :string add_column :posts, :post, :string end end
22.857143
59
0.725
f7bebb46eff007ea44832c31e3385a85371f0209
796
class HomeController < ApplicationController def index require 'net/http' require 'json' @url = 'https://api.coinmarketcap.com/v1/ticker/' @uri = URI(@url) @response = Net::HTTP.get(@uri) @coins = JSON.parse(@response) @my_coins = ['BTC','XRP','ADA','STEEM'] end def lookup @url =...
22.111111
55
0.609296
1a49e806644718622452881382740b2441cf181d
1,060
class Stylist attr_reader(:stylist_name, :client_id, :id) define_method(:initialize) do |attributes| @stylist_name = attributes.fetch(:stylist_name) if attributes.has_key?(:client_id) @client_id = attributes.fetch(:client_id) if attributes.has_key?(:id) @id = attributes.fetch(:id) end ...
25.238095
114
0.661321
7997eacebb21e4cdfa5076db61394f7cc08a1c63
1,718
# # Be sure to run `pod lib lint ZJBTableViewModel.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'Z...
39.045455
112
0.66298
18470260dd4878f3c80a1f14d9c79c783256a5d7
2,437
require 'chunks/wiki' # Includes the contents of another page for rendering. # The include command looks like this: "[[!include PageName]]". # It is a WikiReference since it refers to another page (PageName) # and the wiki content using this command must be notified # of changes to that page. # If the included page co...
32.932432
82
0.707838
1aeb3f7099e3eb10d36d6d3454989aa411a7df4b
2,521
# frozen_string_literal: true # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
35.013889
102
0.594605
871ebc6fdc1c5617b1ab88bb2f6f42eaf63caf36
38
module Rdupes VERSION = '0.3.0' end
9.5
19
0.657895
2112165411f261cd383c2c37d76fe0f9e8184ecf
881
# frozen_string_literal: true require "rails_helper" describe DiscourseCalendar::EnsureConsistency do before { SiteSetting.calendar_enabled = true } it "works" do op = create_post(raw: "[calendar]\n[/calendar]") SiteSetting.holiday_calendar_topic_id = op.topic_id post = create_post(raw: "Some Event...
25.911765
76
0.730988
4afe1e2bf9dc864c099f622493efda94decbc831
9,169
# frozen_string_literal: true require 'spec_helper' require 'middleman-core' describe Middleman::Util do describe '::path_match' do it 'matches a literal string' do expect(Middleman::Util.path_match('/index.html', '/index.html')).to be true end it "won't match a wrong string" do expect(Midd...
40.214912
143
0.658196
edfcc94175c0e7be4eb6109e4bcd3e76b4ec29b8
1,076
# frozen_string_literal: true module LeetCode # 150. Evaluate Reverse Polish Notation module LC150 # Description: # Evaluate the value of an arithmetic expression in Reverse Polish Notation. # Valid operators are +, -, *, /. # Each operand may be an integer or another expression. # # Exampl...
22.416667
80
0.502788
ede96e38e7e070311424887cf40c2dc8dbc4b847
3,999
#============================================================================== # ** Scene_Character #------------------------------------------------------------------------------ # Esta classe lida com cena de seleção e criação de personagens. #------------------------------------------------------------------------...
31.242188
106
0.63866
b957158b478d0ac08ecf8fd4f314ecc1aeaf82a0
2,613
Gem::Specification.new do |s| s.name = 'wice_grid' s.version = '4.1.0' s.authors = ['Yuri Leikind and contributors'] s.email = ['patrick@yamasolutions.com'] s.homepage = 'https://github.com/patricklindsay/wice_grid' s.summary = 'A Rails grid plugin to quickly create g...
47.509091
145
0.68274
18c352490301e3bdb4a73785e622f4a839df3c1c
1,620
# # Be sure to run `pod lib lint HFSuperImages.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'HFSup...
37.674419
106
0.641975
0139caf8905f185a0d2d7029455bdaa232a8e546
1,216
module TextFilters include ActionView::Helpers::DateHelper include ActionView::Helpers::TextHelper def markdown(text) RDiscount.new(text).to_html end def shorten(input, words = 15, truncate_string = "…") if input.nil? return "" end wordlist = input.split(/ /).reject{ |s| s =...
27.022222
94
0.585526
f7e06ae8f06cdc6859fb915461b009a0cc285550
192
module EnjuTrunk class Engine < ::Rails::Engine config.generators do |g| g.test_framework :rspec g.fixture_replacement :factory_girl, dir: 'spec/factories' end end end
21.333333
64
0.692708
b965a6732b683e6c866b343e16192836f87929c8
1,865
# 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.domainregistry.ie/property_nameservers_with_ip.expected # # and regenerate the tests with the following rake task # # $ rake genspec:parsers # require 'sp...
38.061224
97
0.694906
5d3b3d51d0ee71dbeef3cc28e0bbf600add37805
1,942
require "set" require "../utils" def load_data(input_file) lines = File.read(input_file).strip.split("\n") lines.map { |a| a.chars } end def enumerate_cuke_map(cukemap, &fn) e = Enumerator.new do |yielder| cukemap.each_with_index do |row, i| row.each_with_index do |x, j| yielder << [x, i, j] ...
19.816327
73
0.639032