try-parse-json for javascript
Try to parse different data types from strings and objects of strings
Tries to execute a function and discards any error that occurs
try parse to something console con display.
Parse JSON with more helpful errors
A JavaScript parser for Google Closure Compiler and JSDoc type expressions.
Error-tolerant ECMAScript parser
Big-friendly JSON. Asynchronous streaming functions for large JSON data sets.
Parse json safely and at max speed
try to parse json or return undefined
Library to work against complex domain names, subdomains and URIs.
Apple's property list parser/builder for Node.js and browsers
functional try-catch wrapper
Small footprint URL parser that works seamlessly across Node.js and browser environments
A 373-byte Spec-Compliant Runtime-Only Implementation of the ECMAScript Try Operator Proposal Result class
Parse HTML character references
Validate XML, Parse XML, Build XML without C/C++ based libraries
JavaScript parser and stringifier for YAML
JSON.parse with context information on error
Utilities for reading and parsing Changeset's config
Node.js path.parse() ponyfill
Gets the job done when JSON.stringify can't
Snyk package loading system with policy detection
JSON.parse with context information on error
Pure-Rust ITU-T H.263 baseline video decoder for oxideav
A parser for the analysis of chemical elements, formulas and equations.
A simple country parser library. Currently contains all ISO 3166-1 countries.
A library for parsing FreeDesktop entry files and Systemd unit files
Tree-sitter based code parser and security pattern matcher for Parsentry
Library to parse real-time metadata embedded in video files or telemetry from other sources.
Identify file's coding, type and other detail information.
Parses blocks of text to find phone numbers (including phonetic numbers), emails, and bad url. Useful for finding scammers who tend to try to post their phone number in messages.
Trying to parse Markdown in a very simple and unit-testable way. Don't know if I can cover all of Markdown yet.
punndit_youtube is a Ruby client for parsing the YouTube API v2 using JSON objects. This is a lot cleaner and simpler method than trying to use the XML data provided. This is for simple tasks involving YouTube like getting a Playlist(s), Channel, or single video information. This version does not currently support advances searches on the YouTube API.
Converts text formatted with an exceedingly simple markup language into valid HTML (iron clad guarantee!) - perfect for comments on your blog. Textile isn't good for this because not only does it do too much (do commenters really need subscript?), but it can also output invalid HTML (try a <b> tag over multiple lines...). Whitelisting HTML is another option, but you still need some sort of parsing if you want syntax highlighting. Integrates with CodeRay for sexy syntax highlighting.
According to https://www.w3.org/TR/WCAG20-TECHS/H93.html, we should avoid duplicate id values on web pages, because there are "errors that are known to cause problems for assistive technologies when they are trying to parse content that has the same id attribute on different elements". Find Identical is a Ruby Gem that scans HTMLdocuments for duplicate ID attributes and list that on screen, helping to making sure the Web page does not have duplicate id values.
Oedipus Lex is a lexer generator in the same family as Rexical and Rex. Oedipus Lex is my independent lexer fork of Rexical. Rexical was in turn a fork of Rex. We've been unable to contact the author of rex in order to take it over, fix it up, extend it, and relicense it to MIT. So, Oedipus was written clean-room in order to bypass licensing constraints (and because bootstrapping is fun). Oedipus brings a lot of extras to the table and at this point is only historically related to rexical. The syntax has changed enough that any rexical lexer will have to be tweaked to work inside of oedipus. At the very least, you need to add slashes to all your regexps. Oedipus, like rexical, is based primarily on generating code much like you would a hand-written lexer. It is _not_ a table or hash driven lexer. It uses StrScanner within a multi-level case statement. As such, Oedipus matches on the _first_ match, not the longest (like lex and its ilk). This documentation is not meant to bypass any prerequisite knowledge on lexing or parsing. If you'd like to study the subject in further detail, please try [TIN321] or the [LLVM Tutorial] or some other good resource for CS learning. Books... books are good. I like books.
== ABOUT A simple program and library to conjugate french verbs. Parses responses to requests to an online reference site. === Executable ConjugateFR comes with the executable binary +conjugatefr+. To view information about it's supported arguments, run conjugatefr --help === Custom Renderers To make a custom renderer, just type require conjugatefr/renderer and then make a class that extends +Renderer+. An example is as follows: require 'conjugatefr/renderer' class ExampleRenderer < Renderer def pre puts "This goes before the words." end def word (name, words) print "#{name}:" words.each do |word| print " #{word}" end end def post puts "This goes after the words." end def description; "Renders an example format."; end end # Add to the Renderers list (For CLI and other programs that use it.) $renderers["Example"] = ExampleRenderer.new To try this out, save it as +erend.rb+ and then run: conjugatefr -R ./erend.rb -r Example It will produce the output: This goes before the words. someword: someconjugation etc etc ... (more words will be here) This goes after the words. === The Library The library can be included with +require conjugatefr+. It includes the +ConjugateFR+ class.
## Dinosaur Catalog It may not be immediately evident, but I am a huge fan of dinosaurs. They're huge and dangerous and have cool names like Giganotosaurus (not to be confused with Gigantosaurus). ... Anyway. I need to catalog some dinosaurs for my newest project, DinoDex. I've got a CSV file for the dinosaur facts, and I need the code to read all the dinosaur facts and do some basic manipulations with the data. ### Requirements Go check out the CSVs and come back. Done? Cool, I've just got a few features I need: 1. I loaded my favorite dinosaurs into a CSV file you'll need to parse. I don't know a lot about African Dinosaurs though, so I downloaded one from The Pirate Bay. It isn't formatted as well as mine, but please try to parse it anyway. 2. I have friends who ask me a lot of questions about dinosaurs (I'm kind of a big deal). Please make sure the dinodex is able to answer these things for me: * Grab all the dinosaurs that were bipeds. * Grab all the dinosaurs that were carnivores (fish and insects count). * Grab dinosaurs for specific periods (no need to differentiate between Early and Late Cretaceous, btw). * Grab only big (> 2 tons) or small dinosaurs. * Just to be sure, I'd love to be able to combine criteria at will, even better if I can chain filter calls together. 3. For a given dino, I'd like to be able to print all the known facts about that dinosaur. If there are facts missing, please don't print empty values, just skip that heading. Make sure to print Early / Late etc for the periods. 4. Also, I'll probably want to print all the dinosaurs in a given collection (after filtering, etc). #### Extra Credit 1. I would love to have a way to do (and chain) generic search by parameters. I can pass in a hash, and I'd like to get the proper list of dinos back out. 2. CSV isn't may favorite format in the world. Can you implement a JSON export feature? Happy Hunting. (Giganotosaurus was the largest hunting dinosaur, at 46 feet long and up to 8 tons! Suh-weet.)
# Excel to Code [](https://travis-ci.org/tamc/excel_to_code) excel_to_c - roughly translate some Excel files into C. excel_to_ruby - roughly translate some Excel files into Ruby. This allows spreadsheets to be: 1. Embedded in other programs, such as web servers, or optimisers 2. Without depending on any Microsoft code For example, running [these commands](examples/simple/compile.sh) turns [this spreadsheet](examples/simple/simple.xlsx) into [this Ruby code](examples/simple/ruby/simple.rb) or [this C code](examples/simple/c/simple.c). # Install Requires Ruby. Install by: gem install excel_to_code # Run To just have a go: excel_to_c <excel_file_name> This will produce a file called excelspreadsheet.c For a more complex spreadsheet: excel_to_c --compile --run-tests --settable <name of input worksheet> --prune-except <name of output worksheet> <excel file name> See the full list of options: excel_to_c --help # Gotchas, limitations and bugs 0. No custom functions, no macros for generating results 1. Results are cached. So you must call reset(), then set values, then read values. 2. It must be possible to replace INDIRECT and OFFSET formula with standard references at compile time (e.g., INDIRECT("A"&"1") is fine, INDIRECT(userInput&"3") is not. 3. Doesn't implement all functions. [See which functions are implemented](docs/Which_functions_are_implemented.md). 4. Doesn't implement references that involve range unions and lists (but does implement standard ranges) 5. Sometimes gives cells as being empty, when excel would give the cell as having a numeric value of zero 6. The generated C version does not multithread and will give bad results if you try. 7. The generated code uses floating point, rather than fully precise arithmetic, so results can differ slightly. 8. The generated code uses the sprintf approach to rounding (even-odd) rather than excel's 0.5 rounds away from zero. 9. Ranges like this: Sheet1!A10:Sheet1!B20 and 3D ranges don't work. Report bugs: <https://github.com/tamc/excel_to_code/issues> # Changelog See [Changes](CHANGES.md). # License See [License](LICENSE.md) # Hacking Source code: <https://github.com/tamc/excel_to_code> Documentation: * [Installing from source](docs/installing_from_source.md) * [Structure of this project](docs/structure_of_this_project.md) * [How does the calculation work](docs/how_does_the_calculation_work.md) * [How to fix parsing errors](docs/How_to_fix_parsing_errors.md) * [How to implement a new Excel function](docs/How_to_add_a_missing_function.md) Some notes on how Excel works under the hood: * [The Excel file structure](docs/implementation/excel_file_structure.md) * [Relationships](docs/implementation/relationships.md) * [Workbooks](docs/implementation/workbook.md) * [Worksheets](docs/implementation/worksheets.md) * [Cells](docs/implementation/cell.md) * [Tables](docs/implementation/tables.md) * [Shared Strings](docs/implementation/shared_strings.md) * [Array formulae](docs/implementation/array_formulae.md)
$Id: README.txt 204 2010-11-30 02:20:04Z pwilkins $ sm-transcript reads results of SLS processing and produces transcripts for the SpokenMedia browser. For each file in the source folder whose extension matches the source type, a file of destination type is created in the destination folder. All of these parameters have default values. Note: Examples of the commands you enter in the terminal are for *nix. The command prompt in the examples is: felix$ <command line> If you are a Windows user, make the usual adjustments. Requirements: sm-transcript is written in Ruby and packaged as a RubyGem. Since Ruby is not a compiled language, you will need to have Ruby installed on your machine to run sm-transcript. You can determine if Ruby is installed by typing "ruby -v" at a terminal prompt. It should return the version of Ruby that is installed. If Ruby is not installed on your machine, navigate to http://www.ruby-lang.org/ and follow the installation instructions. sm-transcript was developed using Ruby 1.8. Other Ruby versions have not been tested as of this release. Installation: You can get sm-transcript as either a RubyGem or as source from svn. The preferred way to install this package is as a Rubygem. You can download and install the gem with this command: felix$ sudo gem install [--verbose] sm-transcript This command downloads the most recent version of the gem from rubygems.org and makes it active. Previous versions of the gem remain installed, but are deactivated. You must use "sudo" to properly install the gem. If you execute "gem install" (omitting the "sudo") the gem is installed in your home gem repository and it isn't in your path without additional configuration. Note: You need sudo privileges to run the command as written. If you can't sudo, then you can install it locally and will need some additional configuration. Contact me (or your local Ruby wizard) for assistance. The executable is now in your path. You can cleanly uninstall the gem with this command: felix$ sudo gem uninstall sm-transcript If you have access to our svn repository, you are welcome to check out the code. Be warned that the trunk tip is not necessarily stable. It changes frequently as enhancements (and bug fixes) are added. (note that the 'smb_transcript' in the command line below is not a typo.) svn co svn+ssh://svn.mit.edu/oeit-tsa/SMB/smb_transcript/trunk sm_transcript build the gem by running this command from the directory you installed the source. This is what it looks like on my machine: felix$ rake gem The gem will be built and put in ./pkg You can now use the gem installation instructions above. Using the App: Run with no command line parameters, the app reads *.wrd files out of ./results and writes *.t1.html files to ./transcripts. These directories are relative to where sm_transcript is called. Note: destination files are overwritten without a warning prompt. If you want to preserve an existing output file, rename it before running the app again. For example, run the app by navigating to the bin folder and enter projects/sm_transcript/bin felix$ sm_transcript This command run from this folder will read *.wrd files from bin/results and write *-t1.html to bin/transcripts. Usage: sm_transcript [options] --srcdir PATH Read files from this folder (Default: ./results) --destdir PATH Write files to this folder (Default: ./transcripts) --srctype wrd | seg | txt | ttml | srt Kind of file to process (Default: wrd) --desttype html | ttml | datajs | json Kind of file to output (Default: html) -h, --help Show this message There is a serious gotch'a in specifying the srctype parameter: it must match the case of the file extension that you're processing. This means that if the srt files that you are processing have the extension .SRT, then you must specify the srctype as "SRT". Pretty lame, I know. I will update the gem with a fix shortly. My apologies until then. Troubleshooting: sm-transcript requires additional gems to operate. The RubyGem installation should install dependencies automatically, but when it doesn't, you get an error that includes ... no such file to load -- builder (LoadError) in the first few lines when you run sm-transcript, the problem is a missing dependent gem. (the error above indicates that the Builder gem is missing.) Try installing the missing gem. For the error above, the command looks like this on my computer: felix$ sudo gem install builder See "Required Gems" below for more information. A warning message such as: "WARNING: Nokogiri was built against LibXML version 2.7.6, but has dynamically loaded 2.7.7"" may be safely ignored. If you continue to have trouble, feel free to contact me. Upgrading: You can easily upgrade by simply executing the same command you used to install the gem. Running install again will add the newer version and make it active. By default the most recent version is used, but older versions are still available, simply inactive. If are using svn, you should already know what to do. Required Gems: builder - create structured data, such as XML extensions - added for the 'require_relative' command. (To get this command in Ruby 1.8 you need to install this gem, for Ruby 1.9 the command is already part of the core.) htmlentities - html parsing json - create JSON structured data nokogiri - xml parsing library optparse - option parsing of command line ostruct - open data structures ppcommand - pp is a pretty printer. It is used only for debugging rake - make for Ruby rubygems - support for gems (shouldn't be needed for Ruby 1.9) shoulda - enhancement for Test::Unit This command installs gems on OSX and Linux: felix$ sudo gem install <gem name> I recommend running the following command to update to latest version of rubygems before loading new gems. felix$ sudo gem update --system Unit Tests: You may run all unit tests by navigating to the test folder and running rake with no parameters (the default rake task runs all tests). On my computer, it looks like this: projects/sm_transcript/test felix$ rake Release Notes: Initial Version - runs under Ruby 1.8.x. version 0.0.4 - fixes bug when processing .WRD files with CRLF line endings. version 0.0.5 - removed due to posting error version 0.0.6 - added srctype of ttml and desttype of json, fixed bug where beginning time of word was actually for previous word. version 0.0.7 - added srt as srctype version 0.0.8 - fixed bug that dropped last phrase from transcripts version 1.0.0 - declared this version 1.0.0 to conform more closely with gem numbering conventions. All tests run successfully. To Do: - specify individual files for processing rather than folders - fix bug in srt processing: can't read Creole srt content. - allow user to modify the "t1" file extension for addition languages of the same transcript. - update code to run under Ruby 1.9
Contentful API wrapper library exposing an ActiveRecord-like interface
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.