Publications by Python | datawookie

Day 25: Interfacing with Other Languages

30.09.2015

Julia has native support for calling C and FORTRAN functions. There are also add on packages which provide interfaces to C++, R and Python. We’ll have a brief look at the support for C and R here. Further details on these and the other supported languages can be found on github.Why would you want to call other languages from within Julia? Here ...

2644 sym R (2569 sym/11 pcs) 2 img

Review: Mastering Python Scientific Computing

11.01.2016

I was asked to review “Mastering Python Scientific Computing” (authored by Hemant Kumar Mehta and published in 2015 by Packt Publishing). I was disappointed by the book. The title lead me to believe that it would help me to achieve mastery. I don’t feel that it brought me any closer to this goal. To be sure, the book contains a lot of usefu...

2891 sym 2 img

Python: First Steps with MongoDB

28.09.2016

I’m busy working my way through Kyle Banker’s MongoDB in Action. Much of the example code in the book is given in Ruby. Despite the fact that I’d love to learn more about Ruby, for the moment it makes more sense for me to follow along with Python.MongoDB InstallationIf you haven’t already installed MongoDB, now is the time to do it! On a ...

3528 sym Python (1350 sym/15 pcs) 2 img

@pyconza (2018): Data Science and Bayes with Python

15.10.2018

I’ve just returned from PyConZA (2018), held at the Birchwood Hotel in Boksburg North (Johannesburg) on 11-12 October. A great conference with a super selection of talks and great catering.Obviously when the PyCon call for papers came out I was feeling ambitious because I submitted a Workshop and a Talk. They were both accepted, so that put the...

1594 sym

Sliding Puzzle Solvable?

10.04.2019

I’m helping develop a new game concept, which is based on the sliding puzzle game. The idea is to randomise the initial configuration of the puzzle. However, I quickly discovered that half of the resulting configurations were not solvable. Not good! Here are two approaches to getting a solvable puzzle:build it (by randomly moving tiles from a k...

2609 sym Python (781 sym/5 pcs) 2 img

Retail Data: Scraping & API

15.03.2020

I’ve been wanting to gather data on retail prices for quite some time. Finally, just before Christmas 2019, I had some time on my hands, so I started to put something together.The PlanThis was the plan:a fleet of scrapers, each focusing on a specific retailer;the scrapers submit data to a service which would validate the data and persist in a d...

2319 sym 2 img

Persistent Selenium Sessions

28.01.2021

I have a project where I need to have a persistent Selenium session. There’s a script which will leave a browser window open when it exits. When the script runs again it should connect to the same window.Derive a new class from selenium.webdriver.Remote.from selenium import webdriver from selenium.webdriver.common.desired_capabilities import De...

632 sym Python (1493 sym/2 pcs) 2 img

Launching Selenium with JavaScript Disabled

03.02.2021

I have a rather obscure situation where I want to launch Selenium… but with JavaScript disabled.from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.desired_capabilities import DesiredCapabilitiesAfter a bit of Googling it turns out that this is eminently possible by just setting so...

605 sym Python (509 sym/4 pcs) 4 img

Selenium Crawler #1: Docker Host Network

17.04.2021

This post will show you how to set up the following:a Selenium instance anda simple script connecting to Selenium.Both of these will run in Docker containers and will communicate over the host network.Selenium ServiceCreate a Selenium container, exposing port 4444 on the host. This means that port 4444 is mapped directly to port 4444 on the host ...

2201 sym Python (1233 sym/13 pcs) 2 img

Selenium Template #1: Docker Host Network

17.04.2021

This post will show you how to set up the following:a Selenium instance anda simple script connecting to Selenium.Both of these will run in Docker containers and will communicate over the host network.This is part of a series of posts:Part 1: Selenium Template — Docker Host NetworkPart 2: Selenium Template — Docker Bridge NetworkPart 3: Selen...

2457 sym Python (1235 sym/13 pcs) 2 img