View solving.rb
require 'ricosat'
require 'net/https'
class DepSolver
NotVariable = Struct.new :name, :number
class Variable < NotVariable
def initialize name, number
@not = NotVariable.new name, -number
super
View heap_utils.rb
require 'json'
require 'fiddle'
module HeapUtils
SIZEOF_HEAP_PAGE_HEADER_STRUCT = Fiddle::SIZEOF_VOIDP
HEAP_PAGE_ALIGN_LOG = 14
HEAP_PAGE_ALIGN = 1 << HEAP_PAGE_ALIGN_LOG
HEAP_PAGE_ALIGN_MASK = ~(~0 << HEAP_PAGE_ALIGN_LOG)
# SIZEOF_RVALUE = 56 # Only when GC_DEBUG is enabled
View scheme.swift
/*
I am trying to implement cons / car / cdr in terms of lambdas, then
implement `each` to walk the cons cells, but I can't seem to get the `each`
function to work :(
*/
@discardableResult func cons(_ x: Any, _ y: Any) -> (((Any, Any) -> Any) -> Any) {
return { m in m(x, y) }
}
View wheemo.rb
###
# Find WeMo Insight switches and turn them on or off.
#
# Usage:
#
# WheeMo::Switch.each do |switch|
# p switch.friendly_name
# if switch.on?
# switch.off!
# else
View blah.txt
This file has been truncated, but you can view the full file.
1 " '"
1 " Time columns will become time zone aware in Rails 5.1. This\n still causes `String`s to be parsed as if they were in `Time.zone`,\n and `Time`s to be converted to `Time.zone`.\n\n To keep the old behavior, you must add the following to your initializer:\n\n config.active_record.time_zone_aware_types = [:datetime]\n\n To silence this deprecation warning, add the following:\n\n config.active_record.time_zone_aware_types = [:datetime, :time]\n"
1 " WARNING: Active Record does not support composite primary key.\n\n "
1 " def "
1 " "
1 " CONSTRAINT "
1 " Passing string to define callback is deprecated and will be removed\n in Rails 5.1 without replacement.\n"
View moved.txt
{:considered=>
{:T_NONE=>47774,
:T_OBJECT=>2662,
:T_CLASS=>2570,
:T_MODULE=>421,
:T_FLOAT=>2,
:T_STRING=>31274,
:T_REGEXP=>859,
:T_ARRAY=>16727,
:T_HASH=>1042,
View arghh.rb
require 'json'
require 'objspace'
require 'fileutils'
require 'stringio'
require 'pp'
FileUtils.mkdir_p("tmp")
ObjectSpace.trace_object_allocations_start
View wow.rb
require 'rugged'
require 'timeout'
THREADS = (ENV['T'] || 1).to_i
WORK = (ENV['W'] || 20).to_i
def time_it
start = Process.clock_gettime Process::CLOCK_MONOTONIC, :float_millisecond
yield
Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_millisecond) - start
View set_cov_result.rb
require 'coverage'
module Coverage
class << self
alias :old_result :result
alias :old_peek_result :peek_result
attr_writer :result
def result
View x.rb
require 'active_support/all'
module A
extend ActiveSupport::Concern
module ClassMethods
def omg
end
end
end