This file contains hidden or 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
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n |
This file contains hidden or 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
mkdir $HOME/influxdbv2 | |
docker run -p 9999:9999 --name influxdb --restart=unless-stopped -v $HOME/influxdbv2:/root/.influxdbv2 quay.io/influxdb/influxdb:2.0.0-beta --reporting-disabled |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# https://stackoverflow.com/questions/47113813/using-pyarrow-how-do-you-append-to-parquet-file | |
# Create a virtualenv or pipenv with pyarrow installed | |
import pyarrow as pa | |
import pyarrow.parquet as pq | |
def append_to_parquet_table(ii, filepath=None, writer=None): | |
filename = f"/home/user/files/2020-01-09T{ii:02}_00_00Z_PT1H.parquet" | |
print("Merging: {}".format(filename)) | |
table = pq.read_table(filename) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import requests | |
from requests.packages.urllib3.util.retry import Retry | |
from requests.adapters import HTTPAdapter | |
s = requests.Session() | |
# https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html | |
# backoff_factor (float) – | |
# A backoff factor to apply between attempts after the second try (most errors are resolved immediately | |
# by a second try without a delay). urllib3 will sleep for: |
This file contains hidden or 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
import requests | |
import xml.etree.ElementTree as ET | |
from PIL import Image | |
import numpy as np | |
# Area format is left, bottom, right, top | |
#AREA = [-1.4853, 53.3730, -1.4557, 53.3893] | |
AREA = [0.0422, 52.1648, 0.2204, 52.2532] | |
WIDTH = 1280 |
This file contains hidden or 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 flask import Flask | |
from flask import render_template | |
import csv | |
import json | |
app = Flask(__name__) | |
@app.route('/') | |
def my_runs(): | |
runs = [] |