25 April 2014

The Ruby Reflector

Topic

Comma-Separated Values

  Source Favicon
By Swirrl of Swirrl Blog 22 hours ago.
Email

tools for transforming CSV files and Excel spreadsheets to RDF Data Cube datasets ( without the need for programming )

tools for managing a collection of concept schemes

tools for selecting URIs from external reference data

quality checks that make sure any generated RDF meets the required standards

So, like the DaPaaS project , we're excited about being part of this because it will help us make Linked Data easier to create and easier to exploit; bringing the benefits …

ricroberts.com Read
  Source Favicon
By Shannon Behrens of JJinuxLand 1 day ago.
Email

You can log to syslog or log CSV to files. He showed his typical logging configuration.

He showed his guidelines / heuristics for all the settings, including how to finetune things. They're really good! See his slides.

As of version 9.3, you don't need to tweak Linux kernel parameters anymore.

Do not mess with fsync or synchronous_commit.

Most settings require a server reload to take effect. Some things require a server restart. Some can be set on a per-session basis. Here's …

jjinux.blogspot.com Read
  Source Favicon
Email

blocks updates to MyISAM, MEMORY, CSV and ARCHIVE tables;

blocks DDL against any tables;

does not block updates to temporary and log tables.

Unlike FTWRL , the LOCK TABLES FOR BACKUP statement:

does not invalidate the Query Cache;

never waits for SELECT queries to complete regardless of the storage engines involved;

never blocks SELECT s, or updates to InnoDB, Blackhole and Federated tables.

In other words, it does exactly what backup utilities need: block non-transactional …

mysqlperformanceblog.com Read
  Source Favicon
By Kurtz of Viget.com Blogs 1 month ago.
Email

You define your seeds in the formats you love: YML, JSON, and CSV are supported out of the box.

Step 2:

db/seeds/development.rb include Sprig :: Helpers sprig User

You tell Sprig which classes should be seeded for the current environment. Sprig finds your lovely seed files and does the rest.

Step 3:

No wait... That's it.

Relational Seeding for Relational Data

All real-world applications contain relationships between models. Sprig allows seeds to reference one another …

viget.com Read
  Source Favicon
By Jaime Sicam of MySQL Performance Blog 2 months ago.
Email

CSV output

You can also opt to generate CSV output and use LOAD DATA INFILE to import the CSV data to your table. Under the EXPORT TYPES section, select the CSV tab. Inside the Generate frame, select "Prompt to download" and click the "Generate" button.

Upload the CSV file under the /tmp directory of your MySQL server and import it via the MySQL console: # mysql test LOAD DATA INFILE '/tmp/dataDec-11-2013.csv' INTO TABLE employees FIELDS TERMINATED …

mysqlperformanceblog.com Read
  Source Favicon
By John Resig of John Resig 5 months ago.
Email

Download Encoded, Gzipped, CSV and Convert to HTML

This is the big one:

Select HTTP Get Request and http://nodestreams.com/input/people.csv.gz .

Select Un-Gzip (note that some of the characters are encoded incorrectly, we need to fix this!).

Select Change Encoding (even though it comes out as a buffer, this is correct, as we'll see in a moment).

Select Parse CSV as Object .

Select Convert Object w/ Handlebars (with the default table row HTML …

ejohn.org Read
  Source Favicon
Email

The hotel data comes from POIplaza and comes formatted in CSV. We are going to read from the disk, parse the data, and build a quad tree from it.

The code to build the quad tree will reside in TBCoordinateQuadTreeController typedef struct TBHotelInfo { char* hotelName; char* hotelPhoneNumber; } TBHotelInfo;

TBQuadTreeNodeData TBDataFromLine(NSString *line) { // Example line: // -80.26262, 25.81015, Everglades Motel, USA-United States, +1 305-888-8797 …

robots.thoughtbot.com Read
  Source Favicon
Email

…regular expressions or read each line and split(',') , but there are many nuances to the CSV format. Ruby's stdlib includes CSV support to help us realize this dream with minimal hassle.

The documentation is unclear on the differences between methods of opening a CSV, nor does it help realize this Ruby data structure easily. We'll be walking through the discovery of this from the documentation, but if you want the final solution jump down to the last code …

technicalpickles.com Read
  Source Favicon
By Shanley of Heroku 9 months ago.
Email

…platform activity - a pattern that can indicate spam operations. We use the JSON or CSV version of the dataclip to bring this data into abuse prevention apps for closer scanning. The lets our security team work better and faster - we don't have to hardcode complicated queries into our apps, there is no need to redeploy if we want to change a query, and we don't have to give our security apps full access to the underlying databases - just to the behavior patterns we've identified. …

blog.heroku.com Read
  Source Favicon
On igvita.com 10 months ago.
Email

…satisfy your curiousity, all you need to do is download and import ~400GB of raw SQL/ CSV data. Easy, right? Yeah, not really. Instead, wouldn't it be nice if we had the full dataset of all the HTTP Archive data to query on demand, and with ad-hoc questions?

Google BigQuery + HTTP Archive

Well, good news, now you can satisfy your curiosity in minutes (or seconds, even). The full HTTP Archive dataset is now available on BigQuery! To get started, signup for BigQuery and …

igvita.com Read