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
1d575c770a9d8eeb5fb355323760f7d0e7a564a2
595
require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) Pod::Spec.new do |s| s.name = "react-native-liphy" s.version = package["version"] s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors ...
28.333333
107
0.6
ac3ab389a866a3b87c0291794a9bf4b8e200d5ea
221
combination = -> (n) do -> (r) do # https://en.wikipedia.org/wiki/Combination (n-r+1..n).inject(:*) / (1..r).inject(:*) end end n = gets.to_i r = gets.to_i nCr = combination.(n) puts nCr.(r)
17
51
0.524887
62ab302bd928cf0ab6d2675c874cf3880e5204f0
398
class AuthDigestNginxModule < Formula desc "Digest Authentication for Nginx" homepage "https://github.com/samizdatco/nginx-http-auth-digest" url "https://github.com/samizdatco/nginx-http-auth-digest/archive/cd86418.tar.gz" version "0.2.2" sha256 "fe683831f832aae4737de1e1026a4454017c2d5f98cb88b08c5411dc380062f...
28.428571
83
0.776382
2121c78d4902b31b7d9284ab2f47e64e64635484
483
class SessionsController < ApplicationController def create user = User.authenticate(params[:session][:email], params[:session][:password]) if user.nil? flash.now[:error] = t(:"flash.sign_in_error") render "new" else sign_in user flash[:success] = t(:"flash.sign_in") redir...
23
83
0.641822
087bd108b57e00f72ce1e3c26a0a006aab623d84
131
require 'rails_helper' RSpec.describe OrderExchange, type: :model do pending "add some examples to (or delete) #{__FILE__}" end
21.833333
56
0.755725
187bb3cb5ea01c3f1c4dc54067d4c67b81e50d4f
4,916
namespace :shf do desc 'load conditions to DB' task load_conditions: [:environment] do # Schedules for when alerts are sent: std_reminder_after_schedule = [2, 9, 14, 30, 60] std_reminder_before_schedule = [60, 30, 14, 2] # See the ConditionResponder class for defintions of the different possible ...
37.526718
148
0.542107
d5200eb56e8f300cf5a1fcdf2ee17c5207d425e1
3,435
require 'test/unit' require 'jruby-kafka' require 'util/producer' require 'util/consumer' class TestKafka < Test::Unit::TestCase def test_01_run topic = 'test_run' send_test_messages topic queue = SizedQueue.new(20) consumer = Kafka::Consumer.new(consumer_options({:topic => topic })) streams = co...
25.827068
72
0.605822
6ad089d7ba44b8953fca7700075916321adf53a9
192
# -*- encoding : ascii-8bit -*- require 'ethereum/db/base_db' require 'ethereum/db/ephem_db' require 'ethereum/db/overlay_db' require 'ethereum/db/refcount_db' require 'ethereum/db/level_db'
24
33
0.760417
38836b97a9db5e7bace456d21fca9c9fb42d4339
19,132
# Copyright © 2020 MUSC Foundation for Research Development~ # All rights reserved.~ # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:~ # 1. Redistributions of source code must retain the above copyright notice, this list o...
40.277895
239
0.645568
4a8650a97fd9818ea5be27e8177568a5941ba463
2,424
require File.join(File.dirname(__FILE__), "lib/fpm/version") Gem::Specification.new do |spec| files = [] dirs = %w{lib bin templates} dirs.each do |dir| files += Dir["#{dir}/**/*"] end files << "LICENSE" files << "CONTRIBUTORS" files << "CHANGELOG.rst" files = files.reject { |path| path =~ /\.pyc$...
32.756757
94
0.685231
e2c188500eb5f05770c0fe541fd31100341d864d
1,342
module Puppet::Parser::Functions newfunction(:zookeeper_servers_url, type: :rvalue, doc: <<-EOS This function converts an array of ZooKeeper hostnames into a combined URL for ZooKeeper HA. Optionally you can pass custom path in ZooKeeper and default ZooKeeper port (applies only for servers without specified port) Us...
30.5
112
0.628167
9110c4423f4d69e5acc66d106c521d9e235b7769
339
require "bundler/setup" require "exception_file_notifier" require 'exception_notification' RSpec.configure do |config| # Enable flags like --only-failures and --next-failure config.example_status_persistence_file_path = ".rspec_status" config.expect_with :rspec do |c| c.syntax = :expect end end # ENV["RA...
22.6
63
0.752212
086b9b1f398d13623baf6ee1fb879836f0e62264
3,937
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.442105
102
0.758192
62f0f28871349832acc1ec10c1594b3a2186e72a
3,956
require 'spec_helper' describe "gws_attendance_time_card", type: :feature, dbscope: :example, js: true do let(:site) { gws_site } let(:user) { gws_user } let(:now) { Time.zone.now } let(:this_month) { now.beginning_of_month } let(:prev_month) { this_month - 1.month } let(:next_month) { this_month + 1.month...
34.4
119
0.67998
e268cf6e95b54eeac058f908630aeeaa2d6f0b5c
640
module Admin class ChartsController < Admin::ApplicationController def new end def show end def data chart_data = Admin::ChartProcessor.call( chart_params[:resource], chart_params[:group_attribute], chart_params[:attribute_to_apply_function], chart_params[:f...
20.645161
102
0.679688
6163303a025ca75f15b53f3f8685371391b2421a
7,265
require 'minitest/unit' class Module # :nodoc: def infect_an_assertion meth, new_name, dont_flip = false # :nodoc: # warn "%-22p -> %p %p" % [meth, new_name, dont_flip] self.class_eval <<-EOM def #{new_name} *args case when #{!!dont_flip} then Minitest::Spec.current.#{meth}(se...
25.671378
111
0.60468
1c8ae400beed59b0c8c8994730e1cc97558e07ef
1,359
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/monitoring/dashboard/v1/widget.proto require 'google/protobuf' require 'google/api/field_behavior_pb' require 'google/monitoring/dashboard/v1/alertchart_pb' require 'google/monitoring/dashboard/v1/scorecard_pb' require 'google/monitoring/dash...
35.763158
125
0.733628
ed230f48cef00e7a494b1e9cd812bc7e4d9eaed3
5,061
#!/usr/bin/env ruby # # Copyright 2011-2013, Dell # 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/LICENSE-...
35.640845
147
0.582098
e95045c1d4c6f10eff3f8e049105236e3c00debf
707
require 'java' require 'lwjgl.jar' require 'slick.jar' java_import org.newdawn.slick.Image require 'breakout/image_context' require 'breakout/collision' class Breakout class Ball include Breakout::ImageContext include Breakout::Collision attr_accessor :x, :y, :velocity, :angle def initialize ...
18.605263
65
0.601132
01df495f7a6ecaa7d6265d1fe50e5b533866270a
132
class User < ApplicationRecord has_secure_password validates :username, presence: true, uniqueness: {case_sensitive: true} end
22
73
0.795455
4a4344f916c013836cc68fc6de328201439c00e9
1,044
# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |gem| gem.name = "fluent-plugin-sumologic_output" gem.version = "0.0.7" gem.authors = ["Steven Adams"] gem.email = ["stevezau@gmail.com"] g...
37.285714
77
0.658046
33ef68c103bef67cfc015e50534c1d2e447dbd03
224
require 'tzinfo/timezone_definition' module TZInfo module Definitions module Etc module Zulu include TimezoneDefinition linked_timezone 'Etc/Zulu', 'Etc/UTC' end end end end
16
45
0.647321
ab00ba9b7cbe9ce8737172efd5234c0dfe1de83d
5,091
module Blather class Stream # @private class SASL < Features class UnknownMechanism < BlatherError register :sasl_unknown_mechanism end MECHANISMS = %w[ digest-md5 plain anonymous ].freeze SASL_NS = 'urn:ietf:params:xml:ns:xmpp-sasl'.freeze register SASL_NS de...
26.65445
119
0.548812
01532caacbb4cd0b41267d745f745101a1c0cb13
17,508
# Cannon Mallory # malloc3@uw.edu # # Methods for transferring items into and out of collections needs 'Standard Libs/Units' needs 'Standard Libs/AssociationManagement' needs 'Small Instruments/Pipettors' needs 'Collection Management/CollectionLocation' needs 'Collection Management/CollectionData' needs 'Collection Ma...
39.080357
89
0.594186
08828f039b434fa6726fc020eb5f98002cc2f87a
4,789
require 'uri' module GreenButtonData class Configuration attr_accessor :base_url, :application_information_path, :authorization_path, :interval_block_path, :local_time_parameters_path, :meter_reading_path, ...
29.380368
93
0.651284
28175fec086b28970a2a82e3c646b6f5e466f77d
561
cask "ghosttile" do version "15,1510040474" sha256 "6f723c7489a272a82648a3fb2a4ad0f91f6bd3d79eea748ea20a046a3aefe0ab" # dl.devmate.com/im.kernelpanic.GhostTile/ was verified as official when first introduced to the cask url "https://dl.devmate.com/im.kernelpanic.GhostTile/#{version.before_comma}/#{version.afte...
40.071429
140
0.786096
f7727ef031c6df9e3e48f373a542ec85ba3c7ece
7,816
# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: google/cloud/billing/v1/cloud_billing.proto for package 'google.cloud.billing.v1' # Original file comments: # Copyright 2019 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
61.0625
162
0.672723
39923bc15e0e4d26ceb5d78c90d0475889458601
2,526
class Vdirsyncer < Formula include Language::Python::Virtualenv desc "Synchronize calendars and contacts" homepage "https://github.com/pimutils/vdirsyncer" url "https://github.com/pimutils/vdirsyncer.git", :tag => "0.16.7", :revision => "dcf5f701b7b5c21a8f4e8c80243db3e0baff1313" head "https:...
33.68
100
0.655186
e88746dc5566ae1b706cb964f82aeb86651a9545
90,038
# frozen_string_literal: false require 'test/unit' class TestString < Test::Unit::TestCase ENUMERATOR_WANTARRAY = RUBY_VERSION >= "3.0.0" def initialize(*args) @cls = String @aref_re_nth = true @aref_re_silent = false @aref_slicebang_silent = true super end def S(*args) @cls.new(*args...
29.10084
101
0.568682
39a4d3792551c11b7140552e9b14ab62b5e58dfe
1,128
cask "silentknight" do version "1.17,2021.10" sha256 "9f0bae8ae2d7941d45d547044421a7e65b0ee6c15459359f3d21bea4fecc2736" url "https://eclecticlightdotcom.files.wordpress.com/#{version.after_comma.major}/#{version.after_comma.minor}/silentknight#{version.before_comma.no_dots}.zip", verified: "eclecticlightdo...
36.387097
162
0.726064
b93e1061169b21c79b011ab355f696a11b9c276a
277
require_relative '../section' module UI::Sections class CategoryNavItem < UI::Section element :title, '.link-list-primary__text' elements :categories, '.link-list-secondary__item' elements :selected_categories, '.link-list-secondary__text.is-selected' end end
27.7
75
0.750903
b9975edfa104b109c3b8d054e6e9402e4376616a
2,448
class PkgConfig < Formula desc "Manage compile and link flags for libraries" homepage "https://freedesktop.org/wiki/Software/pkg-config/" url "https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz" sha256 "6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591" license "GPL-2.0-or-late...
36
94
0.65768
d56cbe2d221b99dc25b441c6010da4e0961fef2a
854
# Customer Address # Postal addresses belonging to a customer. # https://developer.bigcommerce.com/api/stores/v2/customers/addresses module Bigcommerce class CustomerAddress < Resource include Bigcommerce::SubresourceActions.new uri: 'v2/customers/%d/addresses/%d' property :id property :customer_id ...
24.4
83
0.708431
f8ed23bc42f53790d6265a4280294b9102ad92d4
1,246
class TektoncdCli < Formula desc "CLI for interacting with TektonCD" homepage "https://github.com/tektoncd/cli" url "https://github.com/tektoncd/cli/archive/v0.5.1.tar.gz" sha256 "a6f812d84dd7f22a677e1c3aedc6af793c2b6eeff5a07c0b3736c661566df141" bottle do cellar :any_skip_relocation sha256 "9e4e2ad1...
35.6
94
0.752006
03d0adb335ab286ef18838fcdfc0d5ba859ec466
41
module CiBlockIo VERSION = "1.7.7" end
10.25
19
0.682927
116345e1034ba74babbbee13bf5ee8348860d34f
1,317
require 'azure_generic_resource' class AzurePublicIp < AzureGenericResource name 'azure_public_ip' desc 'Verifies settings for public IP address' example <<-EXAMPLE describe azure_public_ip(resource_group: 'example', name: 'name') do its(name) { should eq 'name'} end EXAMPLE def initialize(opt...
30.627907
104
0.742597
03c64eb9a5defacc9f307528a17f9f4c27c57d6b
625
# frozen_string_literal: true require 'simplecov' SimpleCov.start do add_group 'unit tests', 'test/unit' add_group 'system tests', 'test/system' add_group 'lib', 'lib/' end require 'bundler' begin Bundler.setup(:default, :development) rescue Bundler::BundlerError => e warn e.message warn 'Run `bundle ins...
21.551724
66
0.7488
28c0e4f4081536febae628b5467b8a7411cbad13
1,529
require 'rails_helper' RSpec.describe Tasks::Create do let(:user) { create :user } let(:project) { create :project, user: user } describe 'Failure' do context 'project not found' do subject { described_class.call(params: { project_id: 0 }, current_user: user) } specify { expect { subject }.to r...
29.980392
92
0.64552
262d5608ccac56f231ebc6ec028d52a4797b5224
5,998
require 'spec_helper' describe Caracal::Core::Models::StyleModel do subject do described_class.new do id 'Normal' name 'normal' font 'Arial' size 20 line 360 end end #------------------------------------------------------------- # Configuration ...
28.561905
173
0.564355
d5eb02b202f0078fa50a41ffcb03763f970b0441
3,578
class Libhttpseverywhere < Formula desc "Bring HTTPSEverywhere to desktop apps" homepage "https://github.com/gnome/libhttpseverywhere" url "https://download.gnome.org/sources/libhttpseverywhere/0.8/libhttpseverywhere-0.8.3.tar.xz" sha256 "1c006f5633842a2b131c1cf644ab929556fc27968a60da55c00955bd4934b6ca" licen...
34.07619
122
0.655674
87baed124375c1dafa4ac5c3079a49ef4812d184
2,376
module BlacklightAdvancedSearch # implementation for AdvancedHelper module AdvancedHelperBehavior # Fill in default from existing search, if present # -- if you are using same search fields for basic # search and advanced, will even fill in properly if existing # search used basic search on same fie...
40.965517
186
0.664141
ff1c22fd0c8a71c8d0f1d8a336787a8ca3423e8d
371
require 'test_helper' require 'generators/configure/configure_generator' class ConfigureGeneratorTest < Rails::Generators::TestCase tests ConfigureGenerator destination Rails.root.join('tmp/generators') setup :prepare_destination # test "generator runs without errors" do # assert_nothing_raised do # ...
24.733333
58
0.762803
ac3fdfbefd3cf022968917f0d260c8941964205b
357
# Helper functions relating to time formatting module TimeHelper def range_to_ampm(range) start_hour = range[0..1].to_i end_hour = range[6..7].to_i (((start_hour-1)%12)+1).to_s + range[2..4] + ((start_hour%24)<12?' a.m. - ':' p.m. - ') + (((end_hour-1)%12)+1).to_s + range[8..10] + ((end_hour...
39.666667
176
0.57423
8779084e7f1971dafb8aa7e6ea37a403158de294
343
# frozen_string_literal: true module Bridgetown module Drops class PageDrop < Drop extend Forwardable mutable false def_delegators :@obj, :content, :dir, :name, :path, :url, :pager private def_delegator :@obj, :data, :fallback_data def relative_url @obj.relative_url ...
18.052632
70
0.650146
e9ef4855227fd18e335a8d661925ce17bbfc62c5
3,808
class AdvocacySite def self.get_blocks(request) [ { type: "block", title_actual: "TAKE ACTION", text: "", color1: "118, 101, 160", color2: "166, 155, 193", image: "/images/advocacy3.jpg", links: [ { text_actual: "Let...
29.75
118
0.470063
bb4f51742089e2a606dd57c4b7ecd8909322ef26
4,457
class GraphTool < Formula include Language::Python::Virtualenv desc "Efficient network analysis for Python 3" homepage "https://graph-tool.skewed.de/" url "https://downloads.skewed.de/graph-tool/graph-tool-2.27.tar.bz2" sha256 "4740c69720dfbebf8fb3e77057b3e6a257ccf0432cdaf7345f873247390e4313" revision 3 ...
36.532787
145
0.755665
1c3cc6c158e17c6f04447be810a0e799471013d6
180
# frozen_string_literal: true class CertbotRenewWorker include Sidekiq::Worker def perform(*) `sudo certbot renew --force-renewal & sudo service nginx restart` end end
18
69
0.75
3894b6d63861f036fff1d2ff1852ee69b395b1b5
195
module NumbersAndWords module Strategies module FiguresConverter module Languages class Ua < Base include Families::Cyrillic end end end end end
16.25
36
0.630769
d517b7c833758d61f342c6f383e0a7bd62fdc7db
231
module Forms::LabelledFieldRenderer def render super do result = ActiveSupport::SafeBuffer.new result << label_tag(name, label) if field.label? result << yield if block_given? result end end end
21
54
0.670996
f74d6acc18fb04f13c85fadca31df8790e8592bc
1,182
cask "visual-studio" do version "8.10.15.32" sha256 "0b0d36b752c084d53f4d1ea3afd99cb538da2600327902e11baec0e5036944db" url "https://dl.xamarin.com/VsMac/VisualStudioForMac-#{version}.dmg", verified: "dl.xamarin.com/VsMac/" name "Microsoft Visual Studio" desc "Integrated development environment" homep...
33.771429
95
0.70643
615cd862fe9ac5617df9d0d3327a3d4e00576908
195
describe 'format' do URL_TEST_DATA.each_pair do |url, result| it "#{url}" do parsed = MDUrl::Url.urlParse(url) expect(MDUrl::Format.format(parsed)).to eq url end end end
19.5
52
0.646154
bfd33ea4d2467bf4b134784c108f918b3075edad
1,522
require 'digest' module ThinSearch class QueryExpression SINGLE_QUOTE = "'".freeze DOUBLE_QUOTE = '"'.freeze class Token attr_accessor :quote_mark attr_accessor :value def self.quote_mark(s) if s.start_with?(SINGLE_QUOTE) && s.end_with?(SINGLE_QUOTE) then SINGLE_QUOT...
19.265823
75
0.545992
7abdcd228272daef4b0d1795901ae79fb68b9db0
228
#!/usr/bin/env ruby $LOAD_PATH.unshift "examples" require 'acme/payment' payment = Acme::Payment.new \ from: 'jrandom@example.com', to: 'otherperson@example.com', amount: 150_00 payment.process until payment.finished?
14.25
39
0.72807
ed4d887a1f2c0336da48807adf29311f97f6bb62
306
Rails.application.routes.draw do get 'start_page/select' root 'start_page#select', as: "course_selection" get 'all', to: 'week#courses' get 'week/select' get 'default', to: 'week#default' # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end
27.818182
101
0.72549
f71c7c66d3ace4926cebfe919905a75fcb6c6403
611
Rails.application.routes.draw do root 'static_pages#home' get '/help', to: 'static_pages#help' get '/about', to: 'static_pages#about' get '/contact', to: 'static_pages#contact' get '/signup', to: 'users#new' post '/signup', to: 'users#create' get '/login', to: 'sessions#new' post '/login', to: 'sessions...
38.1875
67
0.677578
b94509531e654bb7be9c5f4590dc81e47f1dc195
662
require_relative 'boot' require 'rails/all' # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Practiceapp class Application < Rails::Application # Initialize configuration defaults for originally generated Rai...
33.1
82
0.765861
acb5cedde45437bf6c2ad6ab4bb23638688e3568
34,129
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
44.438802
131
0.573032
d5d53ee1657d4ddaa80c8289fe027d624b75d4e3
1,008
require_relative "lib/blorgh/version" Gem::Specification.new do |spec| spec.name = "blorgh" spec.version = Blorgh::VERSION spec.authors = ["Enow Mbi"] spec.email = ["benowmbi@yahoo.com"] spec.homepage = "https://github.com/enowmbi/blorgh" spec.summary = "Summary of Blorgh." sp...
40.32
96
0.684524
034d7ada65bdb5561ad812f913cde6900e9dcd59
12,048
name "kkafka" maintainer "Jim Dowling" maintainer_email "jdowling@kth.se" license "Apache v2.0" description 'Installs/Configures/Runs kkafka. Karamelized version of https://github.com/mthssdrbrg/kafka-cookbook' version "2.5.0" recipe "kkafka::install", "Installs kafk...
30.044888
190
0.594124
7940cbdbb448bba611f6504f615a99f0a5c9bc85
672
require 'securerandom' require 'wgif/downloader' module WGif class Converter def initialize(args) @url = args[:url] @trim_from = args[:trim_from] @duration = args[:duration] @frames = args[:frames] end def video_to_frames clip = video.trim(trim_from, duration) clip.t...
19.764706
97
0.629464
7905a382e00e23c312ac22de171baa200d3d8aef
2,377
class Scalapack < Formula desc "High-performance linear algebra for distributed memory machines" homepage "https://www.netlib.org/scalapack/" url "https://www.netlib.org/scalapack/scalapack-2.1.0.tgz" sha256 "61d9216cf81d246944720cfce96255878a3f85dec13b9351f1fa0fd6768220a6" license "BSD-3-Clause" revision 2...
40.982759
125
0.678586
8738d61351cf7c4d55656162fff0ec0da83ac317
119
require 'test_helper' class Attr1Test < ActiveSupport::TestCase # test "the truth" do # assert true # end end
14.875
41
0.697479
e80a364a1e908211461dc85dc313a3c691ee855c
1,329
class SigrokCli < Formula desc "Command-line client for sigrok" homepage "https://sigrok.org/" url "https://sigrok.org/download/source/sigrok-cli/sigrok-cli-0.7.0.tar.gz" sha256 "5669d968c2de3dfc6adfda76e83789b6ba76368407c832438cef5e7099a65e1c" bottle do root_url "https://archive.org/download/brewsci/bot...
34.076923
105
0.733634
28fc3ac53d8ee708ceb147c9244b0bc4bc2eaa30
2,063
# Encoding: utf-8 # ASP.NET Core Buildpack # Copyright 2014-2016 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.org/licenses/LICENSE-2.0...
33.274194
119
0.60446
01afc9a1e8a007c3ded7bd87134a2e17a2faa974
1,390
# -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = %q{dot_xen} s.version = "0.0.2" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Corey Donohoe"] s.autorequire = %q{dot_xen} s.date = %q{2008-10-14} s.description = %q{A ...
40.882353
219
0.67554
1c87dd45066032acbfd60e5ec9648f24c53d5d2d
2,127
class Jobseekers::AlertMailer < Jobseekers::BaseMailer ALERT_MAILER_TEST_VARIANTS = %w[present_subject_line subject_line_variant_1 subject_line_variant_2 subject_line_variant_3 subject_line_variant_4 subject_line_variant_5].freeze after_action :jobseeker self.delivery_job = AlertMailerJob helper DatesHelper ...
34.306452
201
0.732017
210ea7f08e789d5639f6e4c9408880a6f3270e7a
6,469
require 'rails_helper' RSpec.describe QuestionsController, type: :controller do let(:user) { create(:user) } before { login(user) } describe 'GET #new' do before { get :new } it 'renders new view' do expect(response).to render_template :new end it 'has new question instance' do ex...
29.404545
113
0.628691
18b67f53777cedaaf12c07a46cda86d4f067be3d
71
class Baza::Sqlspecs def initialize(args) @args = args end end
11.833333
22
0.676056
b9509f05d5cbfeea9326a09473f1085049f6c1ab
2,656
class AssetUploader < Kithe::AssetUploader # gives us md5, sha1, sha512 plugin :kithe_checksum_signatures # Used by our browse_everything integration, let's us set a hash with remote # URL location, to be fetched on promotion. plugin :kithe_accept_remote_url # Re-set shrine derivatives setting, to put DE...
36.383562
102
0.733057
acba5fbc5de292a349b4879aefd55cb3d06a94f5
1,292
# # Cookbook Name:: masala_haproxy # Recipe:: datadog # # Copyright 2016, Paytm Labs # # 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 # # Unl...
35.888889
86
0.714396
62963e0065fff731623345654c930dffd851de73
1,958
module Quarry class Template # Models the `template.yml` file. # class Config # Lookup glob for `config.yml` file. GLOB = TEMPLATE_DIRECTORY + '/config.{yml,yaml}' # def initialize(template) @template = template @file = Dir.glob(template.path + GLOB).first ...
20.395833
67
0.497957
6a909496522bdcb78ade1dcbb00ae3558fe9b9e9
1,297
class UsersController < ApplicationController get '/users/comics' do @comics = current_user.comics erb :'/users/user_comics' end get '/signup' do if !logged_in? erb :'/users/create_user' else redirect to '/comics' end end post '/signup' do user = User.new(params) if...
20.919355
72
0.597533
266471e6d2b0e02e8c76bd6087725e5350e773e6
128
require "lingua_franca/version" require "lingua_franca/rails/engine" if defined?(::Rails) require "lingua_franca/lingua_franca"
32
57
0.820313
28ab1c3b518f48ef2d3baf67aeeca7715dbc35ee
2,142
require "trycourier/version" require "net/http" require "json" require "openssl" module Courier class ResponseError < StandardError; end class InputError < StandardError; end class SendResponse attr_reader :code attr_reader :message_id def initialize(code, message_id) @code = code @mess...
31.970149
102
0.635387
ac9e8de8aff92c4a498e76a0295b4b84fb2eb9c9
765
Pod::Spec.new do |s| s.name = "RxModal" s.version = "1.0.2" s.summary = "Subscribe to your modal flows" s.description = <<-DESC RxModal helps you handle any modal flow as a simple Observable sequence. DESC s.homepage = "https://github.com/RxSwiftCommunity/RxModal" s.license ...
36.428571
104
0.601307
7a7a1b4175fecdeb523bacb459860ecc99f73ed8
134
class AddConfirmedAtToUser < ActiveRecord::Migration[6.0][5.0] def change add_column :users, :confirmed_at, :datetime end end
22.333333
62
0.746269
f81163ffedf525de3cc156dba12edd4da604722c
535
require 'spec_helper' describe 'copperegg_revealcloud' do describe command('2>&1 /usr/local/revealcloud/revealcloud -V') do its(:exit_status) { should eq 0 } its(:stdout) { should match 'RevealCloud' } end describe service('revealcloud') do it { should be_running } it { should be_enabled } en...
23.26087
67
0.654206
391bc9adc9d9b5925f22cb72cfb45df838e1fa92
350
# frozen_string_literal: true require 'togglv8' require 'date' require 'json' require 'toggl/worktime/version' require 'toggl/worktime/config' require 'toggl/worktime/merger' require 'toggl/worktime/time' require 'toggl/worktime/driver' require 'toggl/worktime/calendar' require 'tty-table' module Toggl # Main modul...
18.421053
33
0.782857
112ded83531437eacc5c779b48d81a432f9fc711
264
class Movie < ApplicationRecord validates :imdb, :score, :title, :summary, :year, :genres, presence: true validates :imdb, uniqueness: true validates :score, inclusion: 0..10 validates :year, numericality: { greater_than: 0 } has_one_attached :image end
33
75
0.734848
f82746a5840fa950a44798866f75c754203edadf
131
# frozen_string_literal: true FactoryBot.define do factory :affiliate do sequence(:name) { |n| "Affiliate #{n}" } end end
16.375
44
0.687023
08a09ebacc1f49ee8601fea7a449d0eda78625f0
2,306
require 'global_id' require 'active_support/message_verifier' require 'time' class SignedGlobalID < GlobalID class ExpiredMessage < StandardError; end class << self attr_accessor :verifier def parse(sgid, options = {}) if sgid.is_a? self sgid else super verify(sgid, options), ...
25.622222
162
0.678231
b9481f964c60db86667a3254544d226744dff15c
1,361
class Dcadec < Formula desc "DTS Coherent Acoustics decoder with support for HD extensions" homepage "https://github.com/foo86/dcadec" url "https://github.com/foo86/dcadec.git", :tag => "v0.2.0", :revision => "0e074384c9569e921f8facfe3863912cdb400596" head "https://github.com/foo86/dcadec.git" bo...
37.805556
93
0.766348
bb42ef5700a2bdef720c8a5656b8cd0732121d4b
8,407
require "pact_broker/logging" require "pact_broker/matrix/unresolved_selector" require "pact_broker/date_helper" require "pact_broker/db/clean/selector" module PactBroker module DB class CleanIncremental DEFAULT_KEEP_SELECTORS = [ PactBroker::DB::Clean::Selector.new(tag: true, latest: true), ...
34.314286
156
0.616272
edc9a9723a43be7aa1781ea7c203a6b23263736a
159
class RemoveSauceLabsEmailTemplate < ActiveRecord::Migration def up EmailTemplate.where(name: 'saucelabs_report').delete_all end def down end end
17.666667
60
0.773585
f7251b461a728decd86919a684da0a136f192c1c
1,740
module ApplicationHelper def login_helper style = '' if current_user.is_a?(GuestUser) (link_to 'Register', new_user_registration_path, class: style) + " ".html_safe + (link_to 'Login', new_user_session_path, class: style) else link_to 'Logout', destroy_user_session_path, method: :delet...
24.166667
156
0.597126
11789c0455fcbe68c6e8ae8ab624456627a8ea31
141
class RemoveBatchIdFromResource < ActiveRecord::Migration[6.0][5.1] def change remove_column :resources, :batch_id, :integer end end
23.5
67
0.758865
bf13a54b52876f4a93d267f4b64fbacfcbdb0811
190
# Read about factories at https://github.com/thoughtbot/factory_girl FactoryGirl.define do factory :review do user_id 1 score 1 remarks "MyText" follow_up false end end
17.272727
68
0.721053
03ef9632068e2405c06f30a440a54ecc55ba8d64
117
class User < ApplicationRecord has_many :photos has_secure_password validates :name, presence: true end
11.7
34
0.74359
38ecf0614bccf0a86bb512b5cad1ddf4b94f9a6f
1,374
# frozen_string_literal: true # :nocov: module Sail # Graphql # # Module to include type definitions # for GraphQL APIs. module Graphql autoload :Mutations, "sail/mutations" module Types # :nodoc: extend ActiveSupport::Concern included do field :sail_get, ::GraphQL::Types::JSON,...
31.227273
139
0.641194
61d9dbef59d7d0e6c4241a2f25de8972870b2aae
47
module ContentfulRails VERSION = "0.3.0" end
11.75
22
0.723404
f7449d65ae526b0f74095dff5b0568c71f9620d7
2,404
# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rai...
45.358491
126
0.750416
03b9ea4ae60489882b2cbb616f2270041cd3b2cc
275
# frozen_string_literal: true require 'oj' module SimpleJson module Json class Oj def self.encode(json) ::Oj.dump(json, mode: :rails) end def self.decode(json_string) ::Oj.load(json_string, mode: :rails) end end end end
15.277778
44
0.610909
01b0a4d6f1e7434dd7bf8bb1054d5c241476ba6f
371
require 'livingstyleguide/filters/highlights' require 'livingstyleguide/filters/full_width' require 'livingstyleguide/filters/haml' require 'livingstyleguide/filters/javascript' require 'livingstyleguide/filters/coffee_script' require 'livingstyleguide/filters/add_wrapper_class' require 'livingstyleguide/filters/font_e...
37.1
52
0.867925
ff3d2686fcce4637c89aa1bd18cc8d54b9002276
5,799
# Copyright (c) 2018-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: MIT # DO NOT MODIFY. THIS CODE IS GENERATED. CHANGES WILL BE OVERWRITTEN. # vcenter - VMware vCenter Server provides a centralized platform for managing your VMware vSphere environments require 'date' module VSphereAutomation ...
30.68254
288
0.632868
1ca0e2cc8f292d58dfb0d1466cbce7e743fb174c
1,688
# -*- encoding: utf-8 -*- # stub: jekyll-redirect-from 0.16.0 ruby lib Gem::Specification.new do |s| s.name = "jekyll-redirect-from".freeze s.version = "0.16.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.a...
41.170732
112
0.672986
011f9a4d4f161f2b234590fa499fd8b07b083915
1,300
# encoding: utf-8 require 'open_classes/object' require 'open_classes/module' require 'open_classes/array/together_helper' # Array class Array include TogetherHelper # Arrays bulk reverse. # # together_reverse has alias :treverse # # not empty case # lists = [[1, 2], [5, 6]] # ret = lists.together...
24.074074
50
0.58
266dfc74e3a382fec500db4da700c04b28c8b76b
143
module Inky module Rails VERSION = '1.3.8.0'.freeze end NODE_VERSION, GEM_VERSION = Rails::VERSION.rpartition('.').map(&:freeze) end
20.428571
74
0.685315
1d202adc32a66c4013f5ccd6b2673545bf03c459
2,140
# frozen_string_literal: true require 'spec_helper' RSpec.describe RDStation::Builder::Field do def valid_builder described_class.new('cf_identifier') end describe 'when create a builder' do context 'valid' do let(:initial_parameters) do 'cf_api_identifier' end let(:builder) ...
30.571429
189
0.616355
ff4c2e65cd94c1528316bb7a463ac5457a2e5532
511
require 'fog/rackspace/models/networking_v2/network' module Fog module Rackspace class NetworkingV2 class Networks < Fog::Collection model Fog::Rackspace::NetworkingV2::Network def all data = service.list_networks.body['networks'] load(data) end def get...
21.291667
57
0.60274
edc0abed74c4ea4ff46001bbed0ddaad608413c6
511
class CreateAdReferendumRelationships < ActiveRecord::Migration def change create_table :ad_referendum_relationships do |t| t.belongs_to :ad_referendum, index: true t.belongs_to :tiene_ad_referendum, index: true t.date :desde t.date :hasta t.integer :dia t.integer :mes ...
20.44
63
0.639922