Programming & Scripting

How to perform HTTP requests with python - Part 1: The standard Library

HTTP is the protocol used by the World Wide Web, that's why being able to interact with it programmatically is essential: scraping a web page , communicating with a service APIs, or even simply downloading a file, are all tasks based on this interaction. Python makes such operations very easy: some useful functions are already provided in the standard library, and for more complex tasks it's possible (and even recommended) to use the external requests module. In this first article of the...
Read More...

Introduction to eBay APIs with Python

In this series of article about Ebay APIs and their use via python and the Ebay python SDK, we see how to setup our working environment and work with the Finding, Trading and Merchandising APIs. Introduction to eBay APIs with python Ebay is one of the biggest e-commerce sites, used by millions of people to buy or sell items worldwide. The Ebay APIs make us able to programmatically perform a lot of operations like managing our online store, finding and comparing prices and more. In this series...
Read More...

Introduction to Ebay API with Python: The Merchandising API - Part 4

The Ebay Merchandising API is the focus of this fourth and last article of the series dedicated to python and Ebay APIs. This API provides less calls than the ones we previously saw, but among them, one that can be very useful: getMostWatchedItems : we will focus on it. In this tutorial you will learn: What are the calls provided by the Merchandising API How to use the getMostWatchedItems call Introduction to Ebay API with python: The Merchandising API - Part 4
Read More...

Introduction to Ebay API with Python: The Trading API - Part 3

This is the third article of the series dedicated to Ebay APIs and their use via python. In the first article we saw how to setup our working environment , creating a developer and a sandbox "test" account, generating our API keys and installing the python SDK. In the second article we approached the Finding API , focusing on the findItemsByKeywords call. In this article we will introduce the Trading API . In this tutorial you will learn: What are some of the most useful "Trading API" calls...
Read More...

Introduction to Ebay API with Python: The Finding API - Part 2

In the previous article we saw how to perform the preliminary steps to prepare our working environment, create an Ebay developer and a sandbox account and generate the keys and credentials needed to execute API calls. In this new chapter we will create our first request and perform our first call focusing on the "Finding API" In this tutorial you will learn: What are the possible "Finding API" calls; What are the parameters you can use to customize you call; How to build a request with the...
Read More...

Introduction to Ebay API with Python: Obtaining keys and accessing the sandbox - Part 1

Ebay is one of the biggest ecommerce sites. Many people use it to search and buy products, and many stores use it to enlarge their audience and expand their business range. If we want to operate programmatically on Ebay, for example to mass create or modify a set of items, or quickly confront prices, we must use the dedicated application programming interfaces. In this tutorial we will see how to prepare our working environment in order to use python to interact with the Ebay APIs. In this...
Read More...

Introduction to higher order functions in Javascript

By definition, an higher order function is a function which, at least, receives one or more other functions as arguments or returns another function as its result. In this tutorial we will focus on standard library functions as filter, map and reduce: we will see when they can be useful and how to use them. In this tutorial you will learn: What is an higher order function. Why we can use higher order functions in Javascript. How and when to use filter, map and reduce functions.
Read More...

How to use arrow functions in Javascript

The arrow functions syntax was introduced with ECMAScript6: by using this new syntax, in some (but not all) cases, we can produce more concise and readable code, especially when our function contains only one expression. In this tutorial we will see how we can define an arrow function, what are the differences with standard functions and what are the cases in which the use of arrow functions is not appropriate. In this tutorial you will learn: What is an arrow function. How an arrow function...
Read More...

Javascript promises tutorial with examples

While previously available via third party libraries, promises were introduced in Javascript, as a native feature, with ECMAScript6. They provide an alternative to callbacks when dealing with asynchronous code, providing, among the other things, a cleaner way to handle errors. In this tutorial we will see how promises work, how to create them and how to use their methods. In this tutorial you will learn: What is a Javascript promise. How to create a Javascript promise. How promises can be used...
Read More...

How to perform python input/output operations on files with python open function

The manipulation of files is an operation which sooner or later we'll need to perform in our programs. The python built-in open function returns a file object , which lets us interact with files in different modes: we will see them in this article. In this python tutorial you will learn: How to use the python open function. What are the various modes of operation which can be used with the python open function. How to interact with a file object. Why is important to close a file object, and...
Read More...

How to use arrays in bash script

Objective After following this tutorial you should be able to understand how bash arrays work and how to perform the basic operations on them. Requirements No special system privileges are required to follow this tutorial Difficulty EASY Introduction Bash , the Bourne Again Shell , it's the default shell on practically all major linux distributions: it is really powerful and can be also considered as a programming language, although not as sophisticated or feature-reach as python or other...
Read More...

Check Java Version

There are several ways on how to check what version of Java is installed on your system. Most likely the simplest way is to directly use the java binary in combination with the -version option. To do so run java -version on your terminal. $ java -version Check Java Version Furthermore, execute the following command to check the version of the current default Java compiler javac : $ javac -version In case you are looking for a system agnostic way on how to check the Java version installed on...
Read More...

Java Hello World example on Linux

Objective The objective is to write, compile and execute a basic Hello World java example program. Requirements The only requirement is installed java on your Linux system . Difficulty EASY Conventions
Read More...

How to manage the expansion of empty or unset bash variables

Objective The object of this tutorial is to learn how to modify bash behavior when expanding unset or empty variables using dedicated syntax. Requirements No special system privileges are required to follow this tutorial Difficulty EASY Introduction Variables expansion is one of the most common feature used in the shell: when a variable exists and is part of a command, it is "expanded", so that is substituted by its value. The expansion of empty variables, is one of those things, that if not...
Read More...

Introduction to python web scraping and the Beautiful Soup library

Objective Learning how to extract information out of an html page using python and the Beautiful Soup library. Requirements Understanding of the basics of python and object oriented programming Difficulty EASY Conventions # - requires given linux command to be executed with root privileges either directly as a root user or by use of sudo command $ - given linux command to be executed as a regular non-privileged user Introduction Web scraping is a technique which consist in the extraction of...
Read More...

How to create a hot standby with PostgreSQL

Objective Our objective is to create a copy of a PostgreSQL database that is constantly synchronizing with the original one and accepts read-only queries. Operating System and Software Versions Operating system: Red Hat Enterprise Linux 7.5 Software: PostgreSQL server 9.2 Requirements Privileged access to both master and slave systems Difficulty MEDIUM Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command $ -...
Read More...

Introduction to MariaDB and MySQL triggers

Objective Understanding and learning to use MariaDB and MySQL triggers. Requirements No particular requirements needed Difficulty EASY Conventions # - requires given linux command to be executed with root privileges either directly as a root user or by use of sudo command $ - given linux command to be executed as a regular non-privileged user Introduction MySQL/MariaDB triggers are stored programs associated with a table in a database, and used to automatically perform some actions when an...
Read More...

PostgreSQL performance tuning for faster query execution

Objective Our objective is to make a dummy query execution run faster on PostgreSQL database using only the built in tools available in the database. Operating System and Software Versions Operating System: Red Hat Enterprise Linux 7.5 Software: PostgreSQL server 9.2 Requirements PostgreSQL server base install up and running. Access to the command line tool psql and ownership of the example database. Difficulty EASY Conventions # - requires given linux commands to be executed with root...
Read More...

Introduction to database joins with mariadb and mysql join examples

Objective Learn to know the different type of joins and how to use them working with mysql or mariadb databases Requirements No particular requirements Difficulty EASY Conventions # - requires given linux command to be executed with root privileges either directly as a root user or by use of sudo command $ - given linux command to be executed as a regular non-privileged user Introduction In a relational database system the data is organized in tables, composed by rows and columns. Each row is...
Read More...

Advanced Python Concepts

This tutorial covers advanced python concepts such as Python classes, constructors, encapsulation, inheritance, polymorphism and creating Python packages and modules. Therefore, if you do not have any prior Python knowledge we refer you to our Python Fundamentals Tutorial. Python Classes Python Constructors Python Encapsulation Python Inheritance Python Polymorphism Python Packages and Modules
Read More...