This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[cluster] | |
nuc[01:06] | |
[cluster-manager] | |
nuc01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Vertica.Data.VerticaClient; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
public static void Main(string[] args) | |
{ |