Skip to content

Instantly share code, notes, and snippets.

@xymor
Created December 17, 2015 21:17
Show Gist options
  • Save xymor/5bfbb19ec2a59251559e to your computer and use it in GitHub Desktop.
Save xymor/5bfbb19ec2a59251559e to your computer and use it in GitHub Desktop.
pstore example
require "pstore"
dict = PStore.new("/tmp/store")
dict.transaction do
dict["Parallel computing"] = <<-eos
type of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved at the same time. There are several different forms of parallel computing: bit-level, instruction-level, data, and task parallelism. Parallelism has been employed for many years, mainly in high-performance computing, but interest in it has grown lately due to the physical constraints preventing frequency scaling.
eos
dict["Computing"] = <<-eos
any goaloriented activity requiring, benefiting from, or creating algorithmic processes e.g. through computers. Computing includes designing, developing and building hardware and software systems; processing, structuring, and managing various kinds of information; doing scientific research on and with computers; making computer systems behave intelligently; and creating and using communications and entertainment media. The field of computing includes computer engineering, software engineering, computer science, information systems, and information technology.
eos
dict["Supercomputer"] = <<-eos
a computer with a high-level computational capacity compared to a general-purpose computer. Performance of a supercomputer is measured in floating-point operations per second (FLOPS) instead of million instructions per second (MIPS). As of 2015, there are supercomputers which can perform up to quadrillions of FLOPS.
eos
end
dict.transaction(true) do # begin read-only transaction, no changes allowed
dict.roots.each do |data_root_name|
p data_root_name
p dict[data_root_name]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment