Apache Arrow in 5-10 Mins

The below was presented as part of the Belfast Linux Users Groups’ May Technical Meetup. I’m also maintaining this ‘short’ as part of my gradually accumulating ‘python_data_workshop’, so that may be the best place to see updates if you’re reading this any later than 2021. Conditions Theme: ‘Universal Screwdrivers’ Event: BLUG Time: ‘5-10mins’ (take the 10) Slides Transcript Evening folks, and I’m happy to be appearing in what we hope is the last virtual BLUG! We’ve all spent a long time toiling in our own little worlds in relative isolation over the course of this sequence of lockdowns, and its appropriate that now as we begin coming back together, that we’re talking about projects that operate and complement across ecosystems. ...

June 1, 2021 · Andrew Bolster

FIX: CUDA on Debian Jessie

Hopefully a super quick one (while I’m procrastinating from procrastinating). Debian Jessie is a lovely operating system until you try and do anything with it. Lots of Package deprecations etc etc etc. Anyway, I’ve got a history with GPU stuff and I’ve been playing with integrating it into some of my research, but in a bout of insanity I decided while I’m over in Liverpool (for another 4 hours) to wipe my old workstation and bring it over from Ubuntu 15.04 to Jessie (which I’ve been using on my main laptop for a while now). ...

April 15, 2016 · Andrew Bolster

SNMP Monitoring and Configuration for Networks and Linux Host Monitoring

TL:DR: Setting up Observium to perform autodiscovery with dynamic DNS, and sample snmp configs to manage Linux servers This week I’ve taken a ‘break’ from the academics since I nearly killed myself sorting out some research for TrustCom (Fingers crossed), and I’ve been engrossed in redoing the network here in our University of Liverpool research lab. Good network and system monitoring tools are hard to come by, especially for free and with decent OSS tendencies. ...

April 24, 2015 · Andrew Bolster

Unattended Updates in Linux Mint

There’s several very valid tutorials and guides around about getting Ubuntu, Debian and Mint to automatically update and upgrade, but they don’t do much explaining/checking. This is a short post filling in the gaps I observed. Get the package sudo apt-get install unattended-upgrades -y Enable the package scheduler File Being Messed With: /etc/apt/apt.conf.d/20auto-upgrades Log File Being Watched: /var/log/unattended-upgrades/unattended-upgrades.log I’ve got no idea why this isn’t automatic; possibly that in other environments, you only want security level upgrades to core system components rather than updating all regular applications. (Not doing this left me scratching my head for a while wondering why the logs kept saying No packages found that can be upgraded unattended when apt was telling me something completely different. Anyway, put the following into a new file named above. ...

February 6, 2015 · Andrew Bolster

Multiprocessing Niceness in Python

Quick and dirty one that tripped me up. Recently I’ve been doing lots of multiprocessing and joblib-based parallel processing, with loooong simulation times. In an effort to make sure that my machine was still useable during these runs, I changed the ’niceness’ value of the spawned processes… or so I thought. import os ... def thread_mask(args): # Properly Parallel RNG #http://stackoverflow.com/questions/444591/convert-a-string-of-bytes-into-an-int-python myid=current_process()._identity[0] np.random.seed(myid^struct.unpack("<L",os.urandom(4))[0]) os.nice(5) return long_simulation(args) First part is a handy way to make sure that your subprocess simulations actually use different random numbers…. which for Monte Carlo style simulation is pretty damned important… ...

May 7, 2014 · Andrew Bolster

SSH Persistence Redux: Multiple sites and Crontab Laziness

Inspired by a pretty good write up by Cynofield as to his setup for getting a Raspberry Pi to “phone home”, I thought I’d set out how I do it. I have a machine that lives behind a ‘security’ infrastructure that makes my life a living hell. As a result, I set up automatic persistent reverse shells going back to other machines I use, so if I connect to those machines, I can get into the secure environment, without anything nasty being able to get in with me. ...

July 6, 2013 · Andrew Bolster

Fix: Dell Laptops and workstations not rebooting ("Restarting System")

Had an interesting if annoying problem recently that I assumed would just fix itself eventually. But when you’re sick of prodding a power button to force a machine to reboot, you gotta do something. TL;DR**_ if you’re getting messages like “Restarting System” on an attempted reboot, try setting the reboot=pci kernel boot flag_** To do this, at the grub boot menu, press e to edit the current boot parameters. Find the line starting with “linux” (this is the line that actually kicks off the linux kernel) and at the end of that line, put “reboot=pci”. ...

May 3, 2013 · Andrew Bolster

Deus Ex, or How I learned to stop Torrenting and Love Digital Distribution

I am a pirate. I voyage across the root-zones in search for content. Movies available months before local DVD release in a format that my media centre laps up (mostly), I watch once, and don’t take up shelf space for years; TV shows via RSS that I watch at my leisure; and, on the rare occasion that I want to ‘Game’ and not feel like an idiot, I torrent. Today was such a day; I’d had my old memories of Deus Ex (Otherwise known as ‘THE GREATEST GAME IN THE WORLD [Where the lead character can actually talk]) floating around for a week or so, and had locked off a Lazy Sunday to get back into it. Sunday rolls on, and I fire off a friendly torrent. ...

July 29, 2012 · Andrew Bolster

NS-3 Click integration

Intro Click is a modular router library developed at UCLA, allowing Click-definied router networks to be ‘attached’ to an ns-3- nodes layer 3 functionality. It has very little relevance to my own research, but was interesting to play with. In a nutshell, Click is an extention to the linux kernel that provides a highly performant and configurable routing architecture. Requirements Already installed ns-3 git ~/src directory Get ’er dun cd ~/src; git clone git://read.cs.ucla.edu/git/click ; cd click sudo ./configure --enable-nsclick --enable-userlevel; sudo make; sudo make install ...

April 30, 2012 · Andrew Bolster

Python + irclib for IRC Status Updates

IRC, Python, Ubuntu linux. Simples! Same as by Twitter post, but for IRC. Biggest problem with this one was working out that the IRC server needs to be kept alive with the irclib.IRC.process_once() command. This is wrapped in the while loop that assumes that there is other stuff going on for which you are waiting on a condition to be satisfied, but could easily be ignored if one is just sending out one message. Also, the PRIVMSG command can be used to broadcast to a channel, as is used here, or, as the name suggests, to communicate with a specific user. ...

April 10, 2012 · Andrew Bolster