2016. július 11., hétfő

CUDA accelerated linear algebra with Python and Theano

Theano is a Python module that enables one to construct mathematical expressions with matrices and/or tensors (basically more than 2 dimensional "matrices").


These expressions are than can be evaluated using Python, but Theano can translate the expression into a C program and compile it to binary. This way it can achieve respectable performance.


But wait, there's more! Theano can build the program so certain - or all - parts of it run on a GPU. Yes, on your video card. Modern cards can do calculations in a way that makes them especially fit for doing linear algebra and similar operations. In "similar" I mean the execution of simple operation on lots of data in parallel. A GPU-s can be several (tens or hundreds of) times better, than your CPU.


I'm going to show you how to exploit an NVIDIA GPU, using Python.

Building a radiation detector from scratch 3 - the first detector

The detector will consist of a tin can, two transistors and a DVM. I will also show how to improve and stabilize the basic circuit by adding an extra transistor and an identical "dummy" circuit to cancel leakage current and temperature dependence.

Musings on the ADIF file format

The ADIF file format is a simple way to store and organize Amateur Radio (or HAM Radio) log data.

It is a way amateur radio operators most frequently store their records on the contacts they make (probably after paper).

(For fellow HAMs, my callsign is HA5FTL, see my QRZ.com page for a description of my station and yours truly, and for contact information, if you wish to express your objections and/or approval of one or several of my points made in this article.)


I have to start with a disclaimer.

2014. szeptember 15., hétfő

Building a radiation detector from scratch 2 - a radioactive collection

If you build anything you must test it somehow.

But how on Earth do you test a radiation detector? A successful test would mean that there's radioactivity around! Who would want to go near radioactivity on purpose? How hard does this radioactivity thing make our efforts in testing the detector?

Well I have good news, and bad news.

(Update: new items added: monazite, uranium glass, tritum glow-in-the-dark thingy)

2014. július 29., kedd

Ubuntu: running services inside a chroot

So I got a task the other day: install php 5.5.9 onto a fairly old (10.04.4 LTS "lucid") Ubuntu machine, without breaking the already existing prehistoric php, installed from the default repository.

Also, compiling from the sources was out of question, since my colleges wanted to keep the update procedure as simple as possible.

So how do I install a 14.04.1 LTS "trusty" package onto lucid without wreaking havoc among the packages?

2014. június 28., szombat

Building a radiation detector from scratch 1 - the basics.

Before you begin

If you follow this series of articles and maybe do some research on your own, you'll be able to build a simple radiation detection device and perform some simple, interesting experiments.

I chose to build a simple, but surprisingly effective device called an ionization chamber or ion chamber, which is just a very sensitive current sensor, or resistance measuring device, the difference being only the point of view.

A great source of information on ion chambers is: http://www.techlib.com/science/ion.html

Ion chambers are not Geiger counters, however they work according to the same basic principles, as will later be explained.

You will need to be able use soldering iron, and perform current and voltage measurement. If you don't know how to do these things, it's better to ask someone to show you. Please only perform the tasks written here if you know what you are doing. Soldering requires high temperature. We will work with high voltages at some point, and of course, there will be some radioactivity involved. Any of these things alone can be dangerous, so exercise caution and use common sense. Hurt yourself, blame yourself.

To really build from scratch, one needs to understand the basic principles on which the device operates. I'll describe these basics in two articles, this one will be on nuclear radiation itself, the second will be on basic electronics.

This series of articles should be considered loose notes on these subjects, and will only contain material vital for our purposes that is, building radiation detectors. If you don't understand something, do your research, or ask in the comments.


2014. június 10., kedd

How does iptables hashlimit module work?


Hashlimit is an iptables module that allows one to define rules that in effect will limit traffic speed (bytes / time unit) or frequency (connections / time unit) per target or origin ports / IPs. The inner workings of this module and / or how to make it work correctly remains a mystery for many.

Hashlimit is also close friends with the limit module, only much more powerful, capable of expressing rate limiting per source IP (for example) in a single rule.