Through the kindness of the DAG Hamilton project team, I was able to secure an official svg version of the DAG Hamilton logo. It looks significantly better than the one I had generated with an online image to svg converter and is much smaller and easy to work with (4 kilobytes versus 200 kb). The DAG Hamilton graphviz graph now shows up in Blogger; it is unlikely to show up on the planet(python)…
A quick follow up to the last post: 1) I spelled scalable wrong in the title; hopefully it's fixed. 2) The svg partial logo that rendered in Blogger did not render on the Planet Python feed. 3) The logo svg is too big for Blogger. I need to find a way to make a smaller (file size) one. One more try with svg in Blogger. The png DAG Hamilton logo first: And one more attempt:
Last post I lamented the failure of any the svg graphs I had for DAG Hamilton workflows to render in Blogger. I set out to rectify this and have had some initial success. My first attempt to get svg to show up in Blogger has the DAG Hamilton logo as its subject. My approach was to bring the svg elements down to the most basic primitives I could manage, then scale and translate their individual…
Last time I used a previous post's DAG Hamilton graphviz output to generate a series of functionally highlighted DAG Hamilton workflow graphs. The SVG (scalable vector graphics) versions of these graphs will serve as the input for this post. I was dissatisfied with the quality of the PNG output, or at least how it rendered, fuzzy and illegible. My thought was that an SVG presentation would provide…
Last post featured the DAG Hamilton generated graphviz graph shown below. I'll be dressing this up a little and highlighting some functionality. For the toy example here, the script employed is a bit of overkill. For a bigger workflow, it may come in handy. I'll start with the finished products: 1) A Hamilton logo and a would be company logo get added (manual; the Data Inputs Highlighted subtitle…
Hello. It's been a minute. I was fortunate to attend PYCON US in Pittsburgh earlier this year. DAGWorks had a booth on the expo floor where I discovered Hamilton . The project grabbed my attention as something that could help organize and present my code workflow better. My reaction could be compared to browsing Walmart while picking up a hardware item and seeing the perfect storage medium for…
I had a project where I needed to generate some draft emails programmatically in Outlook. Inserting the company logo and some content related images took some googling to sort through. Ideally I wanted to encode the images as Base64 strings, but Outlook does not allow this. The code below has some html I took from an existing email. Interpolating strings into html and, worse, hand editing it, is…
A while back I did a post on using sqlcmd and dumping data to Excel . At the time I was using Microsoft SQL Server's bcp (bulk copy) utility to dump data to a csv file. Use of bcp is blocked where I am working now. But Powershell and sqlcmd are very much available on the Windows workstations we use. Just as with bcp, smithing text for sqlcmd input can be a little tricky, same with Powershell. But…
This is another simple but common problem in certain business environments: 1) Data are presented via a Microsoft SQL Server Reporting Services report, BUT 2) The user wants the data in Excel, and, further, wants to play with it (pivot, etc.) there. The problem is that the grouping column labels are not in every record, only in the one row that begins the list of records for that group (sanitized…
In engineering and business environments, it is common to have to 1) recreate an equivalent calculation in a different format for a different purpose and check the results against the original calculation. 2) shepherd a calculation process from one vendor system through a transition to another (an upgrade, for example) by hacking a set of provisional scripts together. 3) implement a bunch of…
Lately I had another Excel-VBA-Python one off hack project. Once again there was the dilemma of not being able to use MSSQL's bcp because my query string was too long. sqlcmd can run a query from a big SQL file, but, to the best of my knowledge, it does not do csv dumps. This is a hack. I would normally go to hell for it, but I've done so many other bad hacks I'd have to declare bankruptcy on my…
I have some mining drill hole data that I need to merge into an old vendor FORTRAN input format. Basically I do a series of SQL pulls from the drillhole database to csv files, then merge the data. My methodology has been a bit brute force in matching the separate parts of the drill hole data (lists, opening and closing of files to find matching holes, etc.). My thought was that I could do this…
I have a set of multi-GB Windows folders that I need to archive in 7-zip format each month. I'd prefer not to use the mouse to compress the folders "manually." Also, I didn't want to use the command line with the subprocess module like I have with some other programs. Ideally, I wanted to control 7zip programmatically. The 7-Zip-JBinding libraries offered a means to do this from jython.…
Last post I brute forced the storage of binary image (jpeg) data as text in a Postgresql database, and accordingly brute forced the data's display in the Unix image viewer feh from output from a psql query. It was hackish and I received some negative, but good constructive criticism on how to improve it: 1) use Python's base64 module instead of the binascii one. 2) use bytea as a storage type in…
Last post I set up a toy (literally) Postgresql database for my model train car collection. A big part of the utility of the database is its ability to store images (pictures or photos) of the real life prototype and model train cars. Postgresql (based on my google research) offers a couple methods of doing that. I'll present how I accomplished this here. The method I chose suited my home needs.…
This isn't a Python scripting post, but the next one will be on the same topic. In this post I get a Postgresql database set up on my OpenBSD laptop and get familiar with the Postgresql environment. I primarily use Microsoft SQL Server and vendor supplied database schemas at work. I know Postgresql has a good reputation among open source databases, but I haven't had an opportunity to use it in a…
A couple months back I had a one-off assignment to dump some data from a vendor provided relational database to a csv file and then from there to Excel (essentially a fairly simple ETL - extract, transform, load exercise). It was a little trickier than I had planned it. Disclaimer: this may not be the best approach, but it worked . . . at least twice . . . on two different computers and that was…
This is not a Python-related post per se, but it may be useful to people getting started with UNIX-based, open source software, or even a Windows user who happens to be using a Thinkpad X201 laptop. Background: 1) I use OpenBSD as my operating system because I am striving to learn UNIX and I find that distro the best for me for that purpose. 2) The venerable legacy IBM/current Lenovo Thinkpad line…
I've blogged previously about getting information off of a distant server on my employer's internal SharePoint site. Automating this can be a little challenging, especially when there's a change. My new desktop showed up with Internet Explorer 11 and Windows 7 Enterprise. When I went to run my MineSight multirun (basically a batch file with a GUI front end that our mine planning vendor provides)…
The other day I saw a something retweeted by @leppie (I think) about an experimental hyper-fast vector math driven 3D engine for the dot Net Framework. This led me to investigate whether there is a default implementation of vector math in the dot Net Framework. As it turns out, there is. This is of interest because (I think) this would make IronPython the only Python implementation that has vector…
A few years back I did two or three posts on polygon offset. It was a learning experience that I never quite completed to my satisfaction. A kind visitor to my last post on the subject, Mr. Ahmad Rafsanjani , actually rewrote some of my code in a comment. I gave him a polite weasel answer thanking him, but dropped the effort and never felt quite right about it. Well, as the saying goes, better…
I am returning from MeetBSD in San Jose, California. This isn't a Python-related post per se, but the BSD family of operating systems maintains packages and ports for Python and Python third party libraries, and use of Python on these systems is significant both in the open source development and commercial spheres. The structure of the conference is a brief weekend unconference. Nonetheless some…
The post immediately prior to this one was an attempt to reproduce Windows.Forms Calendar controls in Gtk for cross platform (Windows/*nix) effective rendering. This time I am attempting to get familiar with gtk-sharp/Gtk's version of a grid view - the Gtk.TreeView object. Some of the gtk-sharp documentation suggests the NodeView object would be easier to use. I had some trouble instantiating the…
A number of years ago I did a post on the IronPython Cookbook site about the Windows.Forms Calendar control . I could never get the thing to render nicely on *nix operating systems (BSD family). It sounds as though Windows.Forms development for mono (and in general) is kind of dead, so there is not much hope that solution/example will ever render nicely on *nix. Recently I've been playing with…
Each month I redo 3D block model interpolations for a series of open pits at a distant mine. Those of you who follow my twitter feed often see me tweet, "The 3D geologic block model interpolation chuggeth . . ." What's going on is that I've got all the processing power maxed out dealing with millions of model blocks and thousands of data points. The machine heats up and with the fan sounds like a…