Giter Site home page Giter Site logo

fah_gpustxt_parsing's Introduction

Folding@Home GPUs.txt Parsing

This is a little Ruby library to parse the Folding@Home GPUs.txt file into cute little GPU objects according to the official GPUs.txt format specification.

Example

Right here's your standard quick-n-dirty parse:

# Create new parser with default settings.
parser = FAHGPUstxtParsing::Parser.new

# You know what to do.
parser.parse

# Behold the fruits of your labor.
parser.gpus

Options

GPUs.txt location

If you don't specify a GPUs.txt location, it will retrieve the GPUs.txt file from Folding@Home's servers.

To specify a location, pass it as the first parameter when creating a parser:

FAHGPUstxtParsing::Parser.new('tmp/GPUs.txt')

If the location you provide is a valid file path, then it will read it from the local system, but if it isn't then it will assume that the location is a remote HTTP-accessible resource.

Caching the raw file in memory

By default, the parser removes the internal reference to the original raw GPUs.txt string when calling #parse to allow it to be garbage-collected and free up some memory (assuming that your code isn't keeping a reference to it, too). If you still want access to the original raw string, you can override this behavior:

FAHGPUstxtParsing::Parser.new(cache_raw: true)

fah_gpustxt_parsing's People

Contributors

pjrebsch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.