Summary: If appending to a PostGIS table with GDAL/OGR is taking a long time, try setting the PG_USE_COPY config option to YES (eg. adding –config PG_USE_COPY YES to your command line). This should speed it up, but beware that if there are concurrent writes to your table at the same time as OGR is accessing […]
I ran into a situation recently where I needed to create a Windows 10 bootable USB stick. I could easily download a Windows 10 ISO file, but I knew that it needed some ‘special magic’ to write it to a USB stick that would boot properly. I tried various solutions (including windiskwriter) but none of […]
Note: This blog post has been updated with a new command for creating an osx-64 environment, after I was contacted by someone from Anaconda telling me a newer, easier way to do this I came across some conda packages that didn’t work properly on my M1 Mac (Apple Silicon – ARM processor) the other day. […]
Just a quick one today to document the solution to a problem I ran into earlier today. I was using Microsoft Planetary Computer to access some Landsat satellite data, and I wanted to run it through the Segment Anything model from Meta, to segment out agricultural fields from the image. I tried to do this […]
This is a very brief post to explain how I managed to speed up the viewing (that is, listing of files/directories) in Samba shares accessed via OS X. So, a bit of background: I have a file server at home which has some shared folders on it, shared using the SMB protocol. This is the […]
Jupyter (formerly known as IPython) notebooks are great – but have you ever accidentally deleted a cell that contained a really important function that you want to keep? Well, this post might help you get it back. So, imagine you have a notebook with the following code: and then you accidentally delete the top cell, with […]
Summary: Microsoft now provides a single, small installer to get all that you need to compile Python 2.7 binary packages on Windows! This is just a brief post to share the news on something that I didn’t know about until yesterday – but that would have saved me a lot of trouble! You may have experienced […]
Like a lot of academics, I write many documents in LaTeX – including almost all of my academic papers, and my PhD thesis! So, anything that can make my life easier is of interest to me. I was recently discussing this with a colleague (a co-author on a paper actually), and realised that lots of […]
(This is really Part 2 of IPython tips, tricks & notes – Part 1, but I thought I’d give it a more self-explanatory title) IPython (sorry, Jupyter!) notebooks are really great for interactively exploring data, and then turning your analyses into something which can easily be sent to a non-technical colleague (by adding some Markdown and […]
Google have recently introduced a new way of loading their javascript APIs: their Google API Loader. To use it, all you do is add a script tag in your HTML: <script src=”https://www.google.com/jsapi”></script> You can then load whatever Google APIs you want using code like this: google.load(‘visualization’, ‘1.0’); google.load(‘jquery’, ‘1’); google.load(‘maps’, ‘3’); google.setOnLoadCallback(function() { console.log(‘Callback’) }); […]