atlas news
    
PyRight
14  août     16h37
Embedding an Image in an Outlook Email
   nbsp;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 Base strings, but Outlook does not allow this.The code below has...
10  décembre     02h18
Powershell Encoded Command, sqlcmd, and csv Query Output
   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...
20  février     00h34
Filling in Missing Grouping Columns of MSSQL SSRS Report Dumped to Excel
   This is another simple but common problem in certain business environments: Data are presented via a Microsoft SQL Server Reporting Services report, BUT The user wants the data in Excel, and, further, wants to play with it pivot, etc. there. The problem is that the grouping column...
16  février     03h40
Crude Testing of Equivalent Code With assert
   In engineering and business environments, it is common to have to recreate an equivalent calculation in a different format for a different purpose and check the results against the original calculation. shepherd a calculation process from one vendor system through a transition to another ...
11  août     19h45
sqlcmd faux csv dump and parsing with the csv module
   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...
10  juillet     17h46
Using Generators and Coroutines to Merge Tabular Data (Drill Holes)
   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...
18  avril     16h52
7-Zip-JBinding API with jython on Windows
   I have a set of multi GB Windows folders that I need to archive in 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...
12  décembre     04h57
Improved Storing and Displaying Images in Postgresql - bytea
   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...
18  octobre     06h36
Storing and Displaying Images in Postgresql
   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...
    04h53
Setting Up Toy Postgresql Database on OpenBSD
   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...
27  septembre     02h56
MSSQL sqlcmd - bcp csv dump - Excel
   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...
17  mai     15h34
Lenovo Thinkpad X201 Fan Replacement
   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 X laptop.Background: I use OpenBSD as my operating system because I am striving to learn UNIX and I find...
26  mars     16h41
IE and Getting a Text File Off the Web - Selenium Web Tools
   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 and Windows Enterprise. When I went to...
26  novembre     05h06
Polygon Offset Using Vector Math in IronPython
   The other day I saw a something retweeted by leppie I think about an experimental hyper fast vector math driven D 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...
16  novembre     08h09
Polygon Offset With pyeuclid Revisited
   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 ...
03  novembre     18h56
MeetBSD California 2014 Recap
   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...
31  octobre     07h15
Gtk.TreeView (grid view) with mono, gtk-sharp, and IronPython
   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...
    06h25
Mono gtk-sharp IronPython CalendarView
   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...
20  octobre     21h11
subprocess.Popen() or Abusing a Home-grown Windows Executable
   Each month I redo D 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 D geologic block model interpolation chuggeth . . . What’s going on is that I’ve got all the processing power maxed out dealing...
13  octobre     06h42
Downloading a Bunch of MP3’s off the Internet (Foreign Language Tapes)
   A mining bud Jen wrote a blog post lamenting the difficulty of learning a foreign language as an adult in a far off land. This inspired me to clean up my download the Foreign Service Institute French tapes mp ’s, actually script I wrote for myself and publish it. I’m not very astute on...
06  octobre     10h24
Event report: pycon.za
   I managed to squeeze in a day stop in Johannesburg on a recent trip that happily coincided with pycon.za. I love pycon.us and all the other big conferences, but for value, these smaller localized cons can’t be beat. Venue: The Campus, Bryanston Not your average office park. It...
01  septembre     16h59
PDF - Removing Pages and Inserting Nested Bookmarks
   I blogged before about PyPDF and some initial work I had done in response to a request to get a report from Microsoft SQL Server Reporting Services into PDF format. Since then I’ve had better luck with PyPDF using it with Python . . Seldom do I need to make any adjustments to either...
    03h36
Internet Explorer 9 Save Dialog - SendKeys Last Resort
   At work we use Internet Explorer on Windows Enterprise. SharePoint is the favored software for filesharing inside organizational groups. Our mine planning office is in the States; the mine operation whose data I work is in a remote, poorly connected location of the world. Recently...
28  mars     21h05
Editing a PDF file with Python (with a little help from PDFTKBuilder)
   I’m working with a report published with SQL Server Reporting Services SSRS . The report is located on a remote server in Africa. It is inconvenient for management in North America to view the report and print it from a browser slow connection, formatting issues . Instead,...
18  mars     15h36
Windows) LogParser - Install Without Admin Rights
   A twitter acquaintaince zippy recommended the Window’s software LogParser as a replacement for MSSQL bcp for my data transfer needs. I downloaded the msi file from Microsoft and tried to install it. As is true with a lot of software at work, I got a message saying the software can...