Skip to content

Instantly share code, notes, and snippets.

View peeterskris's full-sized avatar

Kris Peeters peeterskris

View GitHub Profile
### Keybase proof
I hereby claim:
* I am peeterskris on github.
* I am peeterskris (https://keybase.io/peeterskris) on keybase.
* I have a public key ASDcPsjJYHBg734X3mgkfmGZjbju5WaD7K0sFXg2PIgSUwo
To claim this, I am signing this object:
stations_url = 'https://irail.be/stations/NMBS'
folder = 'data/'
response = requests.get(stations_url, headers={'accept': 'application/json'}, verify=False)
if response.ok:
data = json.loads(response.content)
filename = path.join(folder, 'stations.json')
with open(filename, 'w') as outfile:
json.dump(data, outfile, indent=4)
def retrieve_stations(stations_url, folder):
response = requests.get(stations_url, headers={'accept': 'application/json'}, verify=False)
if response.ok:
data = json.loads(response.content)
filename = path.join(folder, 'stations.json')
with open(filename, 'w') as outfile:
json.dump(data, outfile, indent=4)
from ftplib import FTP
import ftplib
from datetime import datetime
import os
import pickle
FTP_SERVER = '83.247.110.3'
FTP_FOLDER = '/'
DESTINATION = '/volume1/Cluster/data/nl-traffic/'
#DESTINATION = 'out/'
[cluster]
nuc[01:06]
[cluster-manager]
nuc01
- hosts: cluster
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/ambari/ubuntu12/1.x/updates/1.7.0 Ambari main' update_cache=no
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/GA/2.2.0.0 HDP main' update_cache=no
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu12 HDP-UTILS main' update_cache=no
- apt_key: keyserver=keyserver.ubuntu.com id=B9733A7A07513CAD
- hosts: cluster
vars:
http_port: 80
max_clients: 200
remote_user: root
tasks:
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/ambari/ubuntu12/1.x/updates/1.7.0 Ambari main' update_cache=no
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/HDP/ubuntu12/2.x/GA/2.2.0.0 HDP main' update_cache=no
- apt_repository: repo='deb http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu12 HDP-UTILS main' update_cache=no
- apt_key: keyserver=keyserver.ubuntu.com id=B9733A7A07513CAD
using System;
using Vertica.Data.VerticaClient;
namespace ConsoleApplication1
{
class Program
{
public static void Main(string[] args)
{