Difficulty 3 · Intermediate

Difficulty level 3 of 5: Intermediate

How to get structured Wikipedia data via DBPedia

Wikipedia contains a wealth of knowledge. While some of that knowledge consists of natural language descriptions, a rich share of information on Wikipedia is encoded in machine-readable format, such as infoboxes and other specially formatted parts. An infobox is rendered…

Quick introduction to RabbitMQ and Celery

I like to code in Python. I also like the concept of asynchronous workers to build loosely coupled applications. Luckily, RabbitMQ and Celery can help me do exactly that. This post is based on a very nice YouTube video by…

PyBrain quickstart and beyond

After pip install bybrain, the PyBrain the quick start essentially goes as follows: from pybrain.tools.shortcuts import buildNetwork from pybrain.structure import TanhLayer from pybrain.datasets import SupervisedDataSet from pybrain.supervised.trainers import BackpropTrainer # Create a neural network with two inputs, three hidden, and…

Log devices on your network

Fing logger (finglogger.sh): #!/bin/sh FING_LOG_FILE= # append current public ip echo `date +”%Y/%m/%d %T”`”;publicip;”`curl -s ipecho.net/plain`”;;;” >> $FING_LOG_FILE # append current fing output /usr/bin/fing -r1 -o log,csv,$FING_LOG_FILE,1000 –silent Add to cron (run every hour): 0 * * * *

How to compute Fibonacci sequence in SQL

Inspired and simplified from a set of slides on using RDBMS for storing, managing, and querying graphs: < pre lang=”sql”> with recursive fib(i,j) as ( select 0,1 union all select j, i+j from fib where j

Screen capturing with PhantomJS

PhantomJS is a headless browsers that you can use, e.g. to test web UIs and to screen capture webpages. I will focus on the last use case. Since PhantomJS knows how to execute Javascript, it can create a screen shot…