Skip to main content

7 posts tagged with "Python"

Python related posts

View All Tags

Fetch using Gitlab API

· 2 min read
Ammar Najjar
Software Architect

Motivation

I use gitlab, and I have many repos that I need to track on daily basis, or even more than once per day. I found it so tyring first of all to clone all those repos when I change my working machine, and then to keep all these repos up to date. For that reason I began to write an automation script to do the boring tasks of my shoulders.

Custom Selenium Webdrivers using Decorators

· 5 min read
Ammar Najjar
Software Architect

The main question:

How to create custom selenium webdriver classes dynamically with a parametrized browser binary path?

The motivation:

Working on website functional testing using selenium webdriver, generates the urge to run tests using different versions of the most commonly used browsers these days, in parallel on the same machine.

Opencv on Openshift

· One min read
Ammar Najjar
Software Architect

When I wanted to intall opencv on my python-2.7 openshift online cartridge I faced the problem of quota limitation to 1GB.

I found this blog post by Stephen Nneji discussed how to use DIY cartridge and install python and opencv manually. Another blog post by Nikhil Kumar used the Python-2.7 cartridge template to reduce the size of compiled opencv.

I collected the complete steps and put them in a single bash script.

To run this script in your openshift Python-2.7 cartridge, run the following command:

$ wget https://raw.githubusercontent.com/ammarnajjar/opencv_on_openshift_online/master/install.sh && bash install.sh

Then test importing opencv:

> python
Python 2.7.11 (default, Mar 31 2016, 20:46:51)
[GCC 5.3.1 20151207 (Red Hat 5.3.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>>

Go to Top