Skip to main content

Posts

Showing posts from 2015

RPITX - a transmitter along frequencies from 130kHz to 500MHz

Great news. Raspberry Pi can now emit RF signals along a much wider range than previously publicized. It is three years since a team at Robotics Imperial College London wrote PiFM, a FM transmitter based on C and Python for the Raspberry Pi. PiFM enabled even novice Raspberians to setup a fm transmitter. RPITX by Evariste Okcestbon sets a new standard and may see a wide range of applications compared to PiFM. By design it is both more versatile and closer to the needs of a radio amateur. It is able to transmit at lower frequencies than even the HackRF, as it includes frequencies between 130kHz and 1MHz, though it is not capable of transmitting above 500MHz at this point. Innovations in electronics are still possible on Raspberry Pi, a modest platform for the auteur with the modest budget and a deep understanding of a well-documented interface and architecture. RPITX is available from GitHub. A third argument in the fcntl function open lacked in several source files (9th november …

URL parameters

I have used URL parameters a few times for survey reporting. Elements which require custom markup are often more easily defined as separate webpages, these can then be embedded as iframes and tested thoroughly on their own.
Example: Custom image on webpage We use two  URL parameters to form the source of a custom image on a webpage.
www.exampleurl.com?textvar=1&anothertextvar=ext  

A simple javascript in the header makes parsing of variables possible:
<!doctype html>  
 <html class="no-js" lang="en">  
 <head>  
 <meta charset="utf-8" />  
 <script>  
 function gup( name )  
 {  
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
  var regexS = "[\\?&]"+name+"=([^&#]*)";  
  var regex = new RegExp( regexS );  
  var results = regex.exec( window.location.href );  
  if( results == null )  
   return "";  
  else  
   return results[1];  
 }  
 </script>  
 </head…

Frie Danske Data - Danish Online and Live Data Sources

Der er en lang række offentligt tilgængelige datakilder, der på hustands, postnummer, kommunalt og regionalt niveau beskriver borgerne og deres ejendomme. Nedenstående liste er ikke komplet, men giver adgang til mange centrale oplysninger. Et par af siderne kræver (gratis) login, hvis man vil tilgå data uhindret.
Send venligst mail med forslag eller opdateringer, også til sider med data fra forskning eller konsulentrapporter …
There are a variety of public available Danish data sources on household, zip code, municipal and regional level. The following list is not exhaustive, but provides access to many key details.
A couple of pages require (free) login for unrestricted access.
Please send mail with suggestions or updates, also to pdfs or pages of data from research or consultancy reports ...

Data vedrørende landskab, infrastruktur, geografi og adresser: Data regarding landscape, infrastructure, geography and addresses:
http://gst.dk/
http://www.aws.dk/
https://www.mastedatabasen.dk/
htt…

Preparing data. A basic example using R-base

The data editing and formatting phase is one of the most important steps in fitting a structural equation model (SEM), whether it is covariance based as in SPSS AMOS and LISREL or a partial least squares model as in smartPLS and warpPLS.
Often you receive data from surveys with a plenitude of different data types: numeric, integer, ordinal, factor, indicator, text comments.
One of the first steps is to decide what to include in an analysis. Should we transform data and perform analysis of marginal distributions before running a CB-SEM, study relations between ordinal variables with LISREL or just clean up data and do a robust exploratory PLS-SEM?
We are going to scrap unused variables and perform tasks such as imputation or calculation of indicators of factor levels beforehand, split data into several sheets or files with appropriate keys or identifiers. Then comes the formatting issue. Lots of survey data come as  SPSS sav files or in the SAS sas7dbat file format, and if your analyzi…

Selvstændig bibeskæftigelse

Er du jobsøgende akademiker, kender du udfordringerne med at få økonomien til at hænge sammen. Samtidig vil du opleve, at manglende kontakt med arbejdsmarkedet sløver din profil og erfaringsgrundlag. Det er dog muligt at ansøge om godkendelse som jobsøgende med selvstændig bibeskæftigelse.

Reglerne for selvstændig bibeskætigelse er kort sagt, at du kan godkendes til selvstændig bibeskæftigelse, hvis du kan levere dine kerneydelser udenfor almindelig arbejdstid 8-18.  Bemærk, at der står kan levere. Som akademiker på dagpenge kan du i stort omfang tilrettelægge din egen hverdag, men du må ikke være afhængig af at holde møder med klienter, sådan som f.eks. psykologer er i forbindelse med deres konsultationer.


Du må heller ikke investere i inventar, marketing eller have en salgshjemmeside. Du må som alle andre borgere have en præsentationshjemmeside, der tegner en profil af dig som professionel med en række faglige kompetencer, men der må ikke være kalender (med mulighed for booking) ell…

Webscraping with AutoHotKeys and Python

Searching for novel data for a big data Power BI showcase I came accross Bilzonen.dk and Bilbasen.dk.

How do we extract data from a site without any knowledge of it's API?
Python, urllib and BeautifulSoup are commonly described as standard tools for webscraping although they lack the features and rendering qualities of real browsers. There seems to be a race for an ultimate webscraping Python package, although the web is constantly changing and most data are text based.



In the sections below I will cover three different data acquisition strategies.
In conclusion I suggest you combine tools and prepare to learn the intricacies of regular expressions.

We will use AutoHotKeys, spreadsheets and Python with packages such as re, requests and csv.


Scraping Bilbasen.dk: AutoHotKeys, Python packages requests, re and csv You can download script based automation software on this page: autohotkey.com Once installed you write AutoHotKey scripts in a text editor and save it as a file with postf…

HackRF on Windows 8

This technical note is based on an extract from thread. I have made several changes and added recommendations. I have experienced lot of latency using GnuRadio and HackRF on Pentoo Linux, so I wanted to try out GnuRadio on Windows.



HackRF One is a transceiver, so besides SDR capabilities, it can also transmit signals, inkluding sweeping a given range, uniform and Gaussian signals. Pentoo Linux provides the most direct access to HackRF and toolboxes. Install Pentoo Linux on a separate drive, then you can use osmocom_siggen from a terminal to transmit signals such as near-field GSM bursts, which will only be detectable within a meter.









Installation of MGWin and cmake: Download and install the following packages:
- MinGW Setup (Go to the Installer directory and download setup file)
- CMake (I am using CMake 3.2.2 and I installed it in C:\CMake, this path is important in the commands we must send in the MinGW shell)
Download and extract the packages respectively in the path C:\MinGW\msys\…

Grading with Microsoft Access 2013

Grading more than one hundred hand-ins this weekend.

The students get points and acknowledgements.
Error correction and handling of rules for grading are easily implemented in Microsoft Access 2013.

Mailing of individual comments and grades are then handled in Excel.

It is not something extraordinary. However, the ease of implementation, quality, look and feel of the interface is noticeable.

PDF manipulations

2015-05-11: Warning.
Cannot be used unchanged with Python3. It is recommended to install pdf, argparse and pyPDF with pip install (set paths in Windows to both Python27 folder and Python/Scripts folder)

As a teacher in Advanced Engineering Mathematics I grade a lot of home work. The students upload Maple output pdf files to the campus website and I access the files in a class/student_id folder structure obtained from a zip file. I move the pdf files to the top-layer and merge them using the shell and python scripts below. Once done I can easily print out files with four pages on each sheet to reduce waste and optimize the process of commenting and grading.

Utilities: Mingw, pdfmerge.py (modification of script found on the internet) and pyPDF:


#!/usr/bin/env python
# -*- coding: utf-8 -*-

#In pyPDF folder (find the package on the internet)
#python setup.py install


#Example - first oneline moves pdf files the second append files and add blanks as necessary
#mv --backup=numbered **/*.pdf .
#pyt…

An exercise in evaluation of quarterly figures

I have chosen to emphasize quantifiable knowledge, i.e. knowledge you are able to list, visualize and
connect based on quarterly figures, company report, BI, customer intelligence, relevant business media. A specification of steps in an analysis, which will also contain qualitative elements.
Inspiration is drawn from Luc de Brabanderes "Thinking in new boxes". 

http://thinkinginnewboxes.com/



“When I see the quarterly figures of my competitors, I see no reason to change my strategy for the
future”

1. “see”
· Map the company’s relative position to competitors, including recent development and trends.
· Compare the present state map with the strategic plan in effect.
· Is there a need for a new combination of figures or connections (new boxes)?

2. “figures”
· I assume the strategy of the company is welldefined,
without ambiguities and documented in a
white paper or company report, i.e. we decide how to perceive and which concepts to use in a description
of company, market and strategy.
· Try …