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
1125635716f5c48845c616830e834692a8c69a3c
164
class AddAdminToUsers < ActiveRecord::Migration[4.2] def change add_column :users, :admin, :boolean, :default => false add_index :users, :admin end end
23.428571
58
0.707317
bfb0f7435ab921494eebf035d1cbff974f74874c
283
class ChangeDefaultValueMarkingSchemeType < ActiveRecord::Migration[4.2] def self.up change_column :assignments, :marking_scheme_type, :string, :default => 'rubric' end def self.down change_column :assignments, :marking_scheme_type, :string, :default => nil end end
28.3
83
0.75265
e92099a016dd9883fe7bee2b98572e346ab603ac
2,166
class Libsoup < Formula desc "HTTP client/server library for GNOME" homepage "https://wiki.gnome.org/Projects/libsoup" url "https://download.gnome.org/sources/libsoup/2.68/libsoup-2.68.4.tar.xz" sha256 "2d50b12922cc516ab6a7c35844d42f9c8a331668bbdf139232743d82582b3294" bottle do sha256 "70b8fe5ee13ee2bb2c...
29.671233
102
0.661127
1aa026f4347abd638a2ae6dc17f019bdad5742bc
1,272
#-- # =============================================================================== # Copyright (c) 2005,2006,2007,2008 Christopher Kleckner # All rights reserved # # This file is part of the Rio library for ruby. # # Rio is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
30.285714
82
0.633648
214f04b862233e04821c69f82497434c775ebfd9
2,181
module ScoobySnacks class BlacklightConfiguration def self.add_all_fields(config) self.add_show_fields(config) self.add_search_fields(config) self.add_facet_fields(config) self.add_sort_fields(config) self.add_search_result_display_fields(config) end def self.add_show_f...
31.608696
121
0.673544
1a4192d1825e5ce5123dca65825e3e70987a7f83
1,472
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. require 'uri' require 'cgi' require 'date' require 'json' require 'base64' require 'erb' require 'securerandom' require 'time' require 'timeliness' require 'faraday' require ...
44.606061
141
0.669158
6a14589ad014f911c27885ef992bb2d7d49ba59d
808
Pod::Spec.new do |s| s.name = "socket.IO" s.version = "0.4.1" s.summary = "socket.io v0.7.2+ for iOS devices." s.description = <<-DESC Interface to communicate between Objective C and Socket.IO with the help of websockets. It's based on fpotter's socketio-cocoa and uses other libraries/cl...
38.47619
232
0.626238
6ad5f78df855de00b178bccb718d0176ec1ab913
4,205
class ManageIQ::Providers::Redhat::InfraManager::Vm < ManageIQ::Providers::InfraManager::Vm include_concern 'Operations' include_concern 'RemoteConsole' include_concern 'Reconfigure' include_concern 'ManageIQ::Providers::Redhat::InfraManager::VmOrTemplateShared' supports :migrate do if blank? || orphaned...
30.693431
130
0.673246
6a9ae4ac517a15b950d605cf7642e3fed7dca4ec
421
cask 'dropzone' do version '3.6.4' sha256 '41fcdb7eb2f8bbcaa1a860e8aa63a9fdf66932168bcb693485fdbdb26d422a93' url "https://aptonic.com/dropzone3/sparkle/Dropzone-#{version}.zip" appcast 'https://aptonic.com/sparkle/updates.xml', checkpoint: 'c31c4a066ab90115e80741f800a518c0d3546f581b9fa9d7d0fb08fc5ff0...
32.384615
88
0.767221
d5dc9f7f544836b7191913965ca7cc138a4c1ad4
23
module SebusHelper end
7.666667
18
0.869565
1870b8850a811ff3ee2467d0cd51102db1e1b6db
1,506
# -*- encoding: utf-8 -*- # stub: nio4r 2.3.1 ruby lib # stub: ext/nio4r/extconf.rb Gem::Specification.new do |s| s.name = "nio4r".freeze s.version = "2.3.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.auth...
37.65
173
0.672643
ac88805529b5a56ceb96025db73c6ad055a9396d
975
require 'spec_helper' describe Taobao do describe 'set the public API key' do it 'should have rw access' do Taobao.public_key = :test Taobao.public_key.should == :test end end describe 'set the private API key' do it 'should be write-only' do Taobao.private_key = :test expect ...
30.46875
66
0.674872
0351cec1ad5260efd50d7d4df6dae1f19e66f137
68
module Jsl module Identity VERSION = '1.1.6'.freeze end end
11.333333
28
0.661765
7a268ac0bc68929e282b8fe5db9e8ad021834bfb
5,328
class Qemu < Formula desc "Emulator for x86 and PowerPC" homepage "https://www.qemu.org/" url "https://download.qemu.org/qemu-6.1.0.tar.xz" sha256 "eebc089db3414bbeedf1e464beda0a7515aad30f73261abc246c9b27503a3c96" license "GPL-2.0-only" revision 1 head "https://git.qemu.org/git/qemu.git", branch: "master"...
43.317073
99
0.725038
d5509e971b322e9c218c24232fd7598aefc2e413
746
name 'zabbix' maintainer 'Nacer Laradji' maintainer_email 'nacer.laradji@gmail.com' license 'Apache 2.0' description 'Installs/Configures Zabbix Agent/Server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.8.0' supports 'ubuntu', '>= 10.04' supports 'debian', '>= 6.0' supports 'redh...
25.724138
72
0.686327
e9925916ad652746b24dc50b257988712913397d
2,531
# frozen_string_literal: true require "rails_helper" require "generator_spec/test_case" require File.expand_path("../../../lib/generators/active_job_reporter/install_generator", __FILE__) RSpec.describe ActiveJobReporter::InstallGenerator, type: :generator do include GeneratorSpec::TestCase destination File.expan...
27.813187
99
0.580008
38fd90f344aa663d4408a3d6d856dc317bd8c098
29
module UserQuizzesHelper end
9.666667
24
0.896552
f882d1c612345eb1dd1186f6bdd35e477e67f0f1
1,389
#-- encoding: UTF-8 #-- copyright # OpenProject is a project management system. # Copyright (C) 2012-2018 the OpenProject Foundation (OPF) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject,...
39.685714
91
0.758819
b95659cdc5d307cf935f10892345916b4167ff91
595
class Topic < ActiveRecord::Base has_many :replies, :dependent => :destroy, :order => 'replies.created_at DESC' belongs_to :project # pretend find and count were extended and accept an extra option # if there is a :foo option, prepend its value to collection def self.find(*args) more = [] more << arg...
29.75
80
0.677311
f7930534e13215abe6218d29d39a48071ccdb233
81
require 'sinatra' get '/' do File.read(File.join('public', "index.html")) end
11.571429
45
0.654321
5dc8cd446f020b523115834a8e619249faf8bc13
2,109
# frozen_string_literal: true module Files class UserCipherUse attr_reader :options, :attributes def initialize(attributes = {}, options = {}) @attributes = attributes || {} @options = options || {} end # int64 - UserCipherUse ID def id @attributes[:id] end # string -...
34.57377
204
0.675676
bfd73496199b7829668723e39532e591a4082ee7
7,232
# frozen_string_literal: true require "dry/initializer" require "dry/ability/t" module Dry module Ability module Controller # @private class Resource include Initializer[undefined: false].define -> do param :mediator, T.Instance(ResourceMediator) param :controller, T.In...
33.022831
123
0.616427
b9269cc6733fc57b06c84604f5594ce0a2a165a1
456
module Gelauto class ArrayType < GenericType def self.introspect(obj) new.tap do |var| obj.each { |elem| var[:elem] << Gelauto.introspect(elem) } end end def initialize super(::Array, [:elem]) end def to_sig if self[:elem].empty? 'T::Array' else ...
17.538462
66
0.54386
1d5356f6b8c6a508d26a5413d14ecfdd531bd0d6
1,890
RailsAdmin.config do |config| config.parent_controller = '::ApplicationController' config.authenticate_with do if current_user.nil? redirect_to main_app.login_path elsif !current_user.is_staff redirect_to main_app.root_path end end config.current_user_method do current_user end ...
21.477273
87
0.654497
1cda37ed3a7f9a26ccf7ddff4c925319a6a8aafc
6,106
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either lic...
35.5
245
0.666557
5ddae9fa5da314009091ed1124d77e110877fc02
1,174
# This code was automatically generated using xdrgen # DO NOT EDIT or your changes may be overwritten require 'xdr' # === xdr source ============================================================ # # struct LiquidityPoolEntry # { # PoolID liquidityPoolID; # # union switch (LiquidityPoolType type) # ...
29.35
80
0.508518
b9fb78731c5df94a97f5532ea2fd13a64495108e
399
require "shopify_api" module ShopifyUtil module Product # **USE WITH CAUTION** Permanently remove all products from Shopify. # # @return [void] def self.clean!() raise "You can't run this in production" if Rails.env.production?() raise "You can't run this in development" if Rails.env.deve...
24.9375
75
0.654135
1afdc4b4c2b0c625884b9d61c2299ab8c3bcacde
10,329
# frozen_string_literal: true require 'rubygems' require 'rubygems/dependency_list' require 'rubygems/package' require 'rubygems/installer' require 'rubygems/spec_fetcher' require 'rubygems/user_interaction' require 'rubygems/available_set' require 'rubygems/deprecate' ## # Installs a gem along with all its dependenci...
30.559172
89
0.636557
ff3ccded934b56b03c551a16ec24bbf286fa6f91
43
module WizardsTeam VERSION = "0.1.0" end
10.75
19
0.697674
1a225fe04d55d29cce96b79af44b66a4fbfdc49b
3,456
#!/usr/bin/env ruby require "erb" require "fileutils" require "nokogiri" require "open3" require "shellwords" # {{{ class String def blank? self.match(/^\s+$/) end end class MarkdownDocument def initialize(contents) @contents = contents end def self.from_filename(filename) self.new(File.read(...
22.441558
80
0.642361
4aad40d58e27cb81816382f492a88b7ea209e2ae
2,684
require "formula" class Stunnel < Formula homepage "https://www.stunnel.org/" url "ftp://ftp.nluug.nl/pub/networking/stunnel/stunnel-5.05.tar.gz" mirror "https://www.stunnel.org/downloads/stunnel-5.05.tar.gz" sha256 "c7e1653345150db7e48d00e1129cf571c7c85de8e7e1aa70b21cf1d76b1e31ef" bottle do sha1 "f1b57...
36.27027
84
0.596125
abdd0493fa04808b82a766e972e34764065ac888
1,673
class Efl < Formula desc "Enlightenment Foundation Libraries" homepage "https://www.enlightenment.org" url "https://download.enlightenment.org/rel/libs/efl/efl-1.18.4.tar.xz" sha256 "39ebc07e37437d6ecdeb0f645783484e28a882b38f7e619ad12c2bf9b5548025" revision 2 bottle do sha256 "b4966eb8e1147ae7f7b68e500...
26.555556
92
0.720263
39ee96ececda6d6a08872146a2202e922c2a106a
2,838
# frozen_string_literal: true require 'erb_lint/runner_config_resolver' module ERBLint class RunnerConfig class Error < StandardError; end def initialize(config = nil, file_loader = nil) @config = (config || {}).dup.deep_stringify_keys resolver.resolve_inheritance_from_gems(@config, @config.de...
30.516129
90
0.654686
ff6c5251aa06b1b1358cd621bcd2052fd31034f9
188
class Views::DataPassingSystemSpec::ImplicitVariableReadInner < Fortitude::Widgets::Html5 implicit_shared_variable_access true def content p "inner widget foo: #{@foo}" end end
23.5
89
0.776596
616a24a11b0a47f324c2920224c24602581bfff7
906
# frozen_string_literal: true # We have this module because it was relying on devise methods in a # helper, which cannot be tested. Helpers do not extend active controller # and do not have access to devise variables in tests. # # convention is to break out controller level 'helper methods' into a module # and view 'h...
37.75
117
0.771523
b9a5aae2a9be0fab50e2d263ae7e55bf0f977c88
485
# frozen_string_literal: true class MeType < BaseObject description "Information about the logged-in user" field :id, ID, null: false, hash_key: "uid", description: "User identifier." field :type, String, null: false, description: "Type." field :name, String, null: false, description: "User name." field :be...
25.526316
78
0.717526
794370af0ad4f632682ebea0e2001bfd1de3d1dc
10,282
require 'spec_helper' require 'raven/instance' RSpec.describe Raven::Instance do let(:event) { Raven::Event.new(:id => "event_id") } let(:options) { { :key => "value" } } let(:context) { nil } let(:configuration) do config = Raven::Configuration.new config.dsn = "dummy://12345:67890@sentry.localdomain:...
30.96988
123
0.659697
28ef8feff6595bdb1d2f7e6fb8819e73d256b5c0
503
require 'acrobat' require 'pry' app = Acrobat::App.new #app.show Acrobat::App.run do |app| dir = Pathname(__dir__) form_path = dir + '6030.17.antenna.pdf' puts "Working on #{form_path}" doc1 = app.open(form_path) doc1.show fields = {'city' => 'Salt Lake City', 'state' => 'Utah', '...
21.869565
64
0.568588
288cf04a5b219bbf9fa5c9abbf17c34205d19377
974
Gem::Specification.new do |s| s.name = "bugsnag" s.version = File.read("VERSION").strip s.authors = ["James Smith"] s.email = "james@bugsnag.com" s.description = "Ruby notifier for bugsnag.com" s.summary = "Ruby notifier for bugsnag.com" s.homepage = "http://github.com/bugsnag/bugsnag-ruby" s.licenses...
26.324324
63
0.667351
6a7093a8da3c726308afed9015946d1347ad033f
11,934
require "erb" require "test/unit" require 'rss-assertions' require "rss" module RSS class TestCase < Test::Unit::TestCase include ERB::Util include RSS include Assertions XMLDECL_VERSION = "1.0" XMLDECL_ENCODING = "UTF-8" XMLDECL_STANDALONE = "no" RDF_ABOUT = "http://www.xml.com/xml/...
24.914405
81
0.614379
218b5e55af492dd4e72b7fb10f7fdf939ea23d75
374
require 'devise' require 'rmagick' require 'carrierwave' require 'activemerchant' require 'activeadmin' module AuthForum class Engine < ::Rails::Engine isolate_namespace AuthForum config.to_prepare do ApplicationController.helper(ActionView::Helpers::ApplicationHelper) end initializer :auth_foru...
23.375
74
0.751337
389e159fcdaf026e62162c2f58f24a8f7d4f010b
276
if node["platform_family"] != "windows" openssl_x509_certificate "/tmp/mycert.pem" do common_name "www.f00bar.com" org "Foo Bar" org_unit "Lab" country "US" expire 360 end openssl_rsa_private_key "/tmp/server.key" do key_length 2048 end end
17.25
47
0.677536
26d9ee911adafd61340eb61c4e6f0c575358ab09
1,013
class ErrorsController < ApplicationController def not_found error = CloudController::Errors::NotFound.new_from_details('NotFound') presenter = ErrorPresenter.new(error, Rails.env.test?, V3ErrorHasher.new(error)) render status: :not_found, json: presenter end def internal_error error = request.en...
38.961538
109
0.76308
797a525a83fd653d98dcd0f9b8b4d264d4e8dd8e
3,310
class GitBasedDomainImportService def queue_import(git_repo_id, branch_or_tag, tenant_id) git_repo = GitRepository.find_by(:id => git_repo_id) ref_type = if git_repo.git_branches.any? { |git_branch| git_branch.name == branch_or_tag } "branch" else "tag" ...
27.131148
94
0.626586
bf994128cb00a0327a5bb0b451c4ad0518b41674
1,372
# coding: utf-8 lib = File.expand_path("../lib", __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require "turmali/version" Gem::Specification.new do |spec| spec.name = "turmali" spec.version = Turmali::VERSION spec.authors = ["Eiffel Qiu"] spec.email = ["eiffelqiu...
35.179487
96
0.663265
61ba5072df103087614f61f5486118b7a4b8387e
304
FactoryBot.define do factory :user do sequence(:github_id) {|n| "#{Faker::Lorem.word}#{n}" } name { Faker::Name.name } sequence(:token) {|n| "123456#{n}"} location { Faker::Address.city } sequence(:latitude) {|n| n + 6.22964} sequence(:longitude) {|n| n + -75.587482} end end
27.636364
58
0.601974
1a6f95408d091939c6b1d3a45829394d51c66bde
512
# For render class EventsController < ApplicationController include LinesHelper def index events = Event.where(line: current_line) .order_by(created_at: :desc) @events = paginate_results(events) respond_to do |format| format.html { render partial: 'events/events' } forma...
21.333333
53
0.644531
18020ce3f9d64953ffdf53b3a441e5ea803e203e
2,249
module Nexpose module JsonSerializer @@namespace = 'Nexpose' def deserialize(data) data.each do |key, value| if respond_to?(key) property = value if value.respond_to? :each obj = resolve_type(key) unless obj.nil? if value.is_a?(Array) ...
24.445652
116
0.587817
18dce6e8004f56c38661c316cb2f457a4a8cdb3c
1,681
# -*- encoding: utf-8 -*- # stub: digest-crc 0.4.1 ruby lib Gem::Specification.new do |s| s.name = "digest-crc".freeze s.version = "0.4.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Postmodern"...
41
112
0.66627
f86c381db421f4d85fcd22b64ffe4c07ec426caa
2,183
## # $Id$ ## ## # This file is part of the Metasploit Framework and may be subject to # redistribution and commercial restrictions. Please see the Metasploit # web site for more information on licensing and terms of use. # http://metasploit.com/ ## require 'msf/core' class Metasploit3 < Msf::Auxiliary include Ms...
24.255556
71
0.585891
082d987de7ee472a08da6dc8a4f44913ff8cbd85
4,427
module XeroGateway class BaseRecord class UnsupportedAttributeType < StandardError; end class_attribute :element_name class_attribute :attribute_definitions class_attribute :attribute_definitions_readonly # The source XML record that initialized this instance. attr_reader :source_xml c...
31.397163
135
0.634515
e81bee08d1fab3702175506fc6cb36a55d61f157
2,483
class StaticArray def initialize(capacity) @store = Array.new(capacity) end def [](i) validate!(i) @store[i] end def []=(i, val) validate!(i) @store[i] = val end def length @store.length end private def validate!(i) raise "Overflow error" unless i.between?(0, @store....
17.485915
67
0.571889
abe0beb1a6da5bade55a2bbedd0a365faf20ca8e
744
class SessionsController < ApplicationController def new end def create @user = User.find_by(email: params[:session][:email].downcase) if @user && @user.authenticate(params[:session][:password]) if @user.activated? log_in @user params[:session][:remember_me] == '1' ? remember(@use...
25.655172
79
0.634409
1aee1190dfe797fb1d38db49a9227c1ae4329efa
28,397
module Shoes #this class represents a whole Shoes App. class App < Qt::Application #:nodoc: all def initialize opts = {}, blk #:nodoc: super ARGV #set the application icon to the shoes logo set_window_icon(Qt::Icon.new "#{File.expand_path(File.dirname(__FILE__))}/../../static/blue_shoes.jpg...
36.5
336
0.685108
f7f0cd7f352e8045364e9220d56efa83de42699d
2,379
#!/usr/bin/env ruby # Encoding: utf-8 # # Copyright:: Copyright 2011, Google Inc. All Rights Reserved. # # License:: Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
32.589041
79
0.675074
26eb010c21464b3164a5869b06003feb5c125856
798
# # Cookbook Name:: krb5 # Recipe:: kadmin # # Copyright © 2014 Cask Data, 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 r...
29.555556
74
0.745614
039718379f3fde9fda9628c1fe56ea649349cc0c
241
require 'redis' require 'active_support/all' require "htmon/icinga/version" require "htmon/icinga/module" module Htmon module Icinga def self.redis @redis end def self.redis= r @redis = r end end end
12.684211
30
0.647303
4a2328744893e264fd15d13d836d0448004405c2
4,143
# encoding: utf-8 require "cases/helper" module ActiveRecord module ConnectionAdapters class MysqlAdapterTest < ActiveRecord::TestCase def setup @conn = ActiveRecord::Base.connection @conn.exec_query('drop table if exists ex') @conn.exec_query(<<-eosql) CREATE TABLE `ex` ...
32.880952
91
0.625392
38be95480fd0480b1968981fa9384684fe23c56a
1,221
require 'spec_helper' describe 'designate::generic_service' do shared_examples_for 'designate::generic_service' do let :pre_condition do 'include designate' end let :params do { :package_name => 'foo', :service_name => 'food', :enabled => true, :mana...
23.037736
65
0.555283
1c4bd1fb25c2d099946ea99817c8d0c0d13a867c
71
require 'test_helper' class Ffprober::ParserTest < Minitest::Test end
14.2
43
0.788732
f87fdc9e8074ac3b845c717808d944ed27f3cc80
40,396
require File.expand_path("../../../spec_helper", __FILE__) class DesignViewModel < CouchRest::Model::Base use_database DB property :name property :title design do view :by_name view :by_just_name, :map => "function(doc) { emit(doc['name'], null); }" end end describe "Design View" do describe "(u...
36.100089
131
0.570205
38480ba1a24b5ff10619c1e9234184abf88eba05
5,636
# frozen_string_literal: true require 'colorize' require 'twisty_puzzles/utils/array_helper' module TwistyPuzzles # Module to print and display cube and Skewb states. module CubePrintHelper include Utils::ArrayHelper def color_symbol(color) case color when :orange then :light_red when :...
35.006211
97
0.677608
1ca0df8f0de911df56b7e28cd90c36652f1dc3bb
486
cask :v1 => 'font-poppins' do version '2.000' sha256 '86f53a3d50baaadca0d7a1aaf4d69e4d8d3a3d8a9fe67bc3d9b0c0db000e0f39' url 'https://github.com/itfoundry/poppins/releases/download/v2.000/poppins-2_000.zip' appcast 'https://github.com/itfoundry/poppins/releases.atom' homepage 'https://github.com/itfoundry/pop...
30.375
87
0.759259
6a21d5c703fb57ddb9baca49539a75cc05fc303f
171
# frozen_string_literal: true require 'test_helper' class CaptionsControllerTest < ActionDispatch::IntegrationTest # test "the truth" do # assert true # end end
17.1
62
0.754386
1c2e5c69f06647e6ac089afba23f559f65d15ff6
55
class User < ApplicationRecord has_many :books end
13.75
30
0.763636
ff2c72d41b582322cd76f523992b7faf5a514b8c
9,241
module CommunitySteps def save_name_and_action(community_id, groups) created_translations = TranslationService::API::Api.translations.create(community_id, groups) created_translations[:data].map { |translation| translation[:translation_key] } end end World(CommunitySteps) Given /^there are following comm...
38.504167
214
0.722433
38c5ccb7cd95cec055bed17d9aff66c8c2254ef6
439
# Load the Rails application. require_relative 'application' # Initialize the Rails application. Rails.application.initialize! require_relative './settings' ActionMailer::Base.smtp_settings = { user_name: ENV['SENDGRID_USERNAME'], password: ENV['SENDGRID_PASSWORD'], domain: 'coc-beacon.org', host: 'coc-beacon...
24.388889
38
0.751708
e9768b218ce060d03579a35589a7d823c046281f
5,527
# # Author:: Bryan W. Berry (<bryan.berry@gmail.com>) # Author:: Daniel DeLeo (<dan@kallistec.com>) # Copyright:: Copyright (c) 2012 Bryan W. Berry # Copyright:: Copyright (c) 2012 Daniel DeLeo # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use ...
28.055838
90
0.627103
39f2c4b35cc5f7cb5b63a667ec684eacb9238caf
2,178
class KentTools < Formula desc "Utilities for the UCSC Genome Browser" homepage "http://genome.ucsc.edu/" url "http://hgdownload.cse.ucsc.edu/admin/exe/userApps.v316.src.tgz" head "git://genome-source.cse.ucsc.edu/kent.git" sha256 "1190e52702ff2661ac48fe4f0ef9f966718f44ec09596a6f77c8049c638a59fe" bottle do...
30.676056
95
0.685491
7950febad6c0fda0ad5cba1585f959b9d47dbefa
71
module Bootstrap module Willpaginate VERSION = "0.0.8" end end
11.833333
21
0.690141
f83b8b4d04561be06a8db082672d10775fb5f30f
451
cask 'gn-growler-utility' do version '3.1' sha256 '5de013f7447e4c7f712951035994e759b9168525ee52b1f2e77f04b664bbf1b4' url "http://wafflesoftware.net/growlergn/download/GNGrowler-#{version.delete('.')}.zip" name 'Growler for Google Notifier' homepage 'http://wafflesoftware.net/growlergn/' license :unknown ...
37.583333
115
0.767184
1877235e4bfe17e08152c4ef4fbbb4a8385c13b4
13,960
# This class is used to manage tasks using the Task Scheduler V2 API # # https://msdn.microsoft.com/en-us/library/windows/desktop/aa383600(v=vs.85).aspx # require_relative './error' require_relative './trigger' module PuppetX module PuppetLabs module ScheduledTask class Task # The name of the root folder for tasks ...
31.441441
148
0.711246
39933dbb985ae48c52364ded3de0db4b744a75a0
1,626
class IntouchCronJobsController < ApplicationController unloadable layout 'admin' before_action :require_admin accept_api_auth :index def init hash = { 'cron_feedback_regular_notification' => { 'class' => 'CronFeedbackRegularNotification', 'cron' => '*/5 * * * *' }, ...
26.655738
107
0.632841
e255fbd8425a4dd28d0a699afa5409865983c8a5
846
# # Copyright 2019 ThoughtWorks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
31.333333
74
0.758865
f770bc7dabf8c55fd3d16d53390feb548f108d21
1,137
require 'test_helper' class UsersLoginTest < ActionDispatch::IntegrationTest def setup @user = users(:jdoe) end test "login with invalid information" do get login_path assert_template 'sessions/new' post login_path, params: { session: { email: "", password: "" } } assert_template 'sessi...
29.153846
69
0.664028
3380cf64580e6011045ec79b29d6590f5166c68e
815
cask "cookie" do version "6.5" sha256 :no_check url "https://sweetpproductions.com/products/cookieapp/Cookie.dmg" name "Cookie" desc "Protection from tracking and online profiling" homepage "https://sweetpproductions.com/" livecheck do url "https://sweetpproductions.com/products/cookieapp/appcast.xm...
29.107143
70
0.73865
28031c7f071c56fc848697dee7439ae6dca8a556
994
# -*- encoding: utf-8 -*- $:.push File.expand_path("../lib", __FILE__) require "authlogic_device_tokens/version" Gem::Specification.new do |s| s.name = %q{authlogic_device_tokens} s.version = AuthlogicDeviceTokens::VERSION s.authors = ["Jesus Laiz (aka zheileman)"] s.date = %q{2013-01-...
35.5
98
0.657948
61447fe78ae02360970f8e89cf9bb75721f02ede
2,081
# -*- encoding: utf-8 -*- # stub: io-like 0.3.0 ruby lib Gem::Specification.new do |s| s.name = "io-like".freeze s.version = "0.3.0" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["Jeremy Bopp".free...
83.24
781
0.745315
1a0dccd0c2c2501b71013facecbe034eac60a295
2,549
module Zuck # Including this module does three things: # # 1. Lets you use `x[:foo]` to access keys of the # underlying Hash # 2. Lets you use `x[:foo] = :bar` to set values in # the underlying Hash # 3. Lets you define which keys are to be expected in # the underlying hash. These keys w...
21.974138
73
0.547666
26ab2a7e355511975ec7923232faf7b83c668142
1,253
require File.dirname(__FILE__) + '/../../spec_helper' include PoolParty::Resources describe "directory" do describe "instances" do before(:each) do @directory = directory({:name => "/etc/apache2/puppetmaster.conf"}) end it "should turn the one hash instance into a string" do @directory.to_st...
30.560976
76
0.610535
28e516b9cec286c7752da82f89f2d123c09078bb
227
class CreatePredicateParams < ActiveRecord::Migration[5.0] def change create_table :predicate_params do |t| t.text :name t.text :param_type t.integer :predicate_id t.timestamps end end end
17.461538
58
0.674009
62ebff3996fbd06f80e278e698ffce31e096a7ea
2,036
Pod::Spec.new do |s| s.name = 'FirebaseStorageSwift' s.version = '8.2.0-beta' s.summary = 'Swift Extensions for Google Cloud Storage' s.description = <<-DESC Firebase Storage provides robust, secure file uploads and downloads from Firebase SDKs, powered b...
35.719298
120
0.644401
d5cdf78368ebaf80f1663ce832cc4cea392a97a4
519
# frozen_string_literal: true require_relative "solution.rb" module Hangman class Board attr_accessor :letters def initialize(letters = [*("A".."Z")]) @letters = letters end def remove_letter(index) if !index.nil? letters[index] = " " end end def update_dude(bad_...
20.76
133
0.487476
bb8ebb00781596f6dc975bd648cd2f9475984ed1
3,104
require 'faraday' require 'multi_json' require 'twitter/api' require 'twitter/configurable' require 'twitter/error/client_error' require 'twitter/error/decode_error' require 'twitter/rate_limit' require 'simple_oauth' require 'uri' module Twitter # Wrapper for the Twitter REST API # # @note All methods have been...
30.732673
151
0.658505
1ad56bb53d9a9edd2ab0b1b51e7cb20cb924ee95
5,993
# frozen_string_literal: true require 'spec_helper' RSpec.describe OpenWeather::Endpoints::Stations do include_context 'API client' describe '#register_station' do it 'registers a station', vcr: { cassette_name: 'stations/register_success' } do data = client.register_station( external_id: 'SF_T...
30.733333
133
0.621058
7ab104a06e18bf3e906f9c96178cdcd4a08d5edb
414
# Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::RecoveryServicesBackup::Mgmt::V2019_05_13 module Models # # Defines values for OverwriteOptions # module OverwriteOptions Invalid = "Inv...
24.352941
70
0.714976
088b1d123e2f15e6c69640644fa8884644449eac
1,551
# This module is included in your application controller which makes # several methods available to all controllers and views. Here's a # common example you might add to your application layout file. # # <% if logged_in? %> # Welcome <%=h current_user.username %>! Not you? # <%= link_to "Log out", logout_pat...
28.2
94
0.70922
f825d2ad7f3c8a848a4d98a8a4412338f3f35fb4
28,842
require File.join(File.dirname(__FILE__), 'spec_helper') context "DB#create_table" do before do @db = SchemaDummyDatabase.new end specify "should accept the table name" do @db.create_table(:cats) {} @db.sqls.should == ['CREATE TABLE cats ()'] end specify "should accept the table name in multi...
34.707581
273
0.65526
18faa368908d76ca7a86f4eefedb7de949e08196
839
class UsersController < ApplicationController before_action :logged_out?, only: [:show, :songs] def new if logged_in? redirect_to root_path end @user = User.new end def create @user = User.new(user_params) if @user.save ses...
22.078947
63
0.54112
288198f072576c1a2ef3cf1243ea4f4a7a225d28
6,589
require 'active_record' require 'after_commit' require 'yaml' require 'cgi' require 'thinking_sphinx/core/array' require 'thinking_sphinx/core/string' require 'thinking_sphinx/property' require 'thinking_sphinx/active_record' require 'thinking_sphinx/association' require 'thinking_sphinx/attribute' require 'thinking_s...
29.415179
84
0.735468
1c56cdd1868bd4bbdf9ddf0ef8ade46ef344b560
270
# encoding: utf-8 require 'spec_helper' describe Function::Numeric::Exponentiation, '.call' do subject { object.call(left, right) } let(:object) { described_class } let(:left) { 2 } let(:right) { 2 } it { should eql(4) } end
19.285714
54
0.574074
b93a98c48d367962450616503e9cd553dfe6329f
475
# Test class to test observer pattern with in-built observer require 'rspec' require_relative '../src/employee' require_relative '../src/payroll' describe 'Observable' do it 'updates observers' do name = 'Salone Gupta' salary = 50000 payroll = Payroll.new employee = Employee.new(name, salary) ...
20.652174
60
0.711579
284d60c555623ef930368c7d55dac21ab6d4f2ce
2,423
require 'registry_record' require 'source_record' require 'statistical_abstract' require './header' require 'pp' # Parse enumchrons for Statistical Abstract registry records deprecate_count = 0 source_count = 0 oclcnums = StatisticalAbstract.oclcs # Each StatAb RegRec RegistryRecord.where(oclcnum_t:{"$in":oclc...
29.54878
119
0.694593
1813b5625ed6ad372819110d60c2cee428156122
4,144
class Devise::CasSessionsController < Devise::SessionsController include DeviseCasAuthenticatable::SingleSignOut::DestroySession unless Rails.version =~/^4/ unloadable end skip_before_action :verify_authenticity_token, only: [:single_sign_out] def new if memcache_checker.session_store_memcache? && ...
29.390071
131
0.724903
f8faf2594b261184a9536518f519237cd1572bc8
2,876
# encoding: utf-8 require 'ffaker/name' module FFaker # guapolo github.com/guapolo module NameMX include FFaker::Name extend ModuleUtils extend self MALE_PREFIXES = %w(Sr. C.).freeze FEMALE_PREFIXES = %w(Sra. Srita. C.).freeze PREFIXES = %w(Sr. Sra. Srita. C.).freeze # Full name acc...
27.653846
85
0.644645
5d17aa85b78b745710bd116366d61c98a9eb0d26
2,370
# # Ops-Pipeline - Templates for automating the production and consumption of images # and containers. # # Copyright 2016 Capital One Services, 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 Licen...
29.625
89
0.727004
d5d5499373137ce2e5676095e6d20caa3e0a951e
154
if defined?(Capistrano::Configuration.instance) require 'a9n/capistrano/ver2x.rb' else load File.expand_path('../capistrano/tasks.cap', __FILE__) end
25.666667
60
0.772727
2165932d991c997f5ea0149ad65505264c76a974
1,119
describe :dir_pos, shared: true do before :each do @dir = Dir.open DirSpecs.mock_dir end after :each do @dir.close rescue nil end it "returns an Integer representing the current position in the directory" do @dir.send(@method).should be_kind_of(Integer) @dir.send(@method).should be_kind_of(I...
21.519231
79
0.65773
1db6ca6b05320db694dac7744370d97466f9b17e
7,588
class GitPushService < BaseService attr_accessor :push_data, :push_commits include Gitlab::CurrentSettings include Gitlab::Access # The N most recent commits to process in a single push payload. PROCESS_COMMIT_LIMIT = 100 # This method will be called after each git update # and only if the provided user...
32.706897
159
0.72272
26257c2b0b2dd9c9709db52621b6c25f9fa7058e
108
module KonoUtils module Object module Cell class Shows::Base < Base end end end end
12
30
0.62037