Popular recipes tagged "data" but not "python"http://code.activestate.com/recipes/tags/data-python/2016-10-26T17:49:00-07:00ActiveState Code RecipesRead CSV with D and write it to PDF with Python (Python) 2016-10-26T17:49:00-07:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580710-read-csv-with-d-and-write-it-to-pdf-with-python/ <p style="color: grey"> Python recipe 580710 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/formats/">formats</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how to read data from a CSV file with a D program and write that data to a PDF file with a Python program - all in a single command-line invocation (after writing the individual programs, of course).</p> <p>It requires the xtopdf toolkit, which you can get from:</p> <p><a href="https://bitbucket.org/vasudevram/xtopdf" rel="nofollow">https://bitbucket.org/vasudevram/xtopdf</a></p> <p>Instructions for installing xtopdf:</p> <p><a href="http://jugad2.blogspot.in/2012/07/guide-to-installing-and-using-xtopdf.html" rel="nofollow">http://jugad2.blogspot.in/2012/07/guide-to-installing-and-using-xtopdf.html</a></p> <p>xtopdf in turn requires the open source version of the ReportLab toolkit, which you can get from:</p> <p><a href="http://www.reportlab.com/ftp" rel="nofollow">http://www.reportlab.com/ftp</a> (<a href="http://www.reportlab.com/ftp/reportlab-1.21.1.tar.gz%29" rel="nofollow">http://www.reportlab.com/ftp/reportlab-1.21.1.tar.gz)</a></p> <p>It also requires the DMD compiler to compile the D program - this was the version used:</p> <p>DMD32 D Compiler v2.071.2</p> data_dump.py, like the Unix od (octal dump) command (Python) 2015-11-01T12:43:38-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579120-data_dumppy-like-the-unix-od-octal-dump-command/ <p style="color: grey"> Python recipe 579120 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/dump/">dump</a>, <a href="/recipes/tags/hexadecimal/">hexadecimal</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/octal/">octal</a>, <a href="/recipes/tags/od/">od</a>, <a href="/recipes/tags/representation/">representation</a>, <a href="/recipes/tags/unix/">unix</a>, <a href="/recipes/tags/utility/">utility</a>, <a href="/recipes/tags/windows/">windows</a>). </p> <p>This recipe implements a simple data dump tool, roughly like the od command of Unix, which stands for octal dump (though od can also dump data in hex and other formats). This tool dumps data in character and hex formats, in this version. This is data_dump.py version 1.</p> Data (A Class For Arbitrary Data) (Python) 2015-08-03T15:22:40-07:00Alfehttp://code.activestate.com/recipes/users/4182236/http://code.activestate.com/recipes/579092-data-a-class-for-arbitrary-data/ <p style="color: grey"> Python recipe 579092 by <a href="/recipes/users/4182236/">Alfe</a> (<a href="/recipes/tags/class/">class</a>, <a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/lightweight/">lightweight</a>). </p> <p>A class which is designed to be easy to use when one needs a piece of data with a minimum of source required.</p> <p>Usage:</p> <pre class="prettyprint"><code>shop = Data(owner="Homer", address="down the street", ice=Data(flavor="vanilla", amount=3)) print shop Data: owner = 'Homer' ice = Data: amount = 3 flavor = 'vanilla' address = 'down the street' </code></pre> Use PrettyTable and xtopdf to create PDF tables with borders, alignment and padding (Python) 2015-01-24T21:21:27-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/579012-use-prettytable-and-xtopdf-to-create-pdf-tables-wi/ <p style="color: grey"> Python recipe 579012 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/prettytable/">prettytable</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/tabular/">tabular</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how to create tabular data in PDF format, supporting neat borders, and alignment and padding of columns, using the Python libraries called PrettyTable and xtopdf.</p> Kids Level Analogue Data Logger, (Transient Recorder), Program. (Python) 2011-07-31T16:14:48-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577796-kids-level-analogue-data-logger-transient-recorder/ <p style="color: grey"> Python recipe 577796 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/analogue/">analogue</a>, <a href="/recipes/tags/anim/">anim</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/arduino/">arduino</a>, <a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/display/">display</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/logger/">logger</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/program/">program</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). Revision 2. </p> <p>This code is kids level Analogue Data-Logger(/Transient-Recorder), using the Arduino series of dev' boards.</p> <p>It is no where near completion and is a second feeder/feeler upload only.</p> <p>It is designed to work from Classic Text Mode Python from Versions 1.4.0 to 2.7.2 on a Classic AMIGA, WinUAE, Linux and Windows, (32 bit), to Vista. Not tested on Python for Windows 7, (32 bit), nor Mac OSX flavours as I don't have these OSes.</p> <p>Linux versions run from a default root terminal for the time being.</p> <p>The Arduino dev' board IS catered for in the code for the above platforms just thoroughly read the code for more information. It defaults to a DEMO mode so you can see it working...</p> <p>The test code for the Arduino Diecimila Dev Board is here:-</p> <p><a href="http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/" rel="nofollow">http://code.activestate.com/recipes/577625-arduino-diecimila-board-access-inside-winuae-demo/</a></p> <p>Enjoy finding simple solutions to often very difficult problems... ;o)</p> <p>Bazza, G0LCU...</p> Extract data from feedjit (Python) 2011-05-03T19:50:27-07:00jrovegnohttp://code.activestate.com/recipes/users/4170207/http://code.activestate.com/recipes/577683-extract-data-from-feedjit/ <p style="color: grey"> Python recipe 577683 by <a href="/recipes/users/4170207/">jrovegno</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/feedjit/">feedjit</a>). Revision 2. </p> <p>Script to extract data from my live traffic feed from feedjit</p> RFC 822-style parser (Python) 2010-01-09T22:46:42-08:00Karl Dickmanhttp://code.activestate.com/recipes/users/4172760/http://code.activestate.com/recipes/576996-rfc-822-style-parser/ <p style="color: grey"> Python recipe 576996 by <a href="/recipes/users/4172760/">Karl Dickman</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/formats/">formats</a>). Revision 7. </p> <p>In <em>The Art of Unix Programming</em>, Eric S. Raymond describes a data file metaformat based on RFC 822. [http://www.faqs.org/docs/artu/ch05s02.html#id2902039] This is a simple parser for that format.</p> Creating fake data using numpy (Python) 2009-08-07T09:22:34-07:00tat.wrighthttp://code.activestate.com/recipes/users/4171357/http://code.activestate.com/recipes/576870-creating-fake-data-using-numpy/ <p style="color: grey"> Python recipe 576870 by <a href="/recipes/users/4171357/">tat.wright</a> (<a href="/recipes/tags/data/">data</a>, <a href="/recipes/tags/fake/">fake</a>, <a href="/recipes/tags/gaussian/">gaussian</a>, <a href="/recipes/tags/graph/">graph</a>, <a href="/recipes/tags/histogram/">histogram</a>, <a href="/recipes/tags/normal/">normal</a>, <a href="/recipes/tags/sample_data/">sample_data</a>). </p> <p>Create a deliberately bad normal distribution for sample data - varying the badness, mean, standard deviation and range of results shown.</p>