Skip to content

Instantly share code, notes, and snippets.

View pavdmyt's full-sized avatar
🛠️
Focusing

Pavel Dmytrenko pavdmyt

🛠️
Focusing
View GitHub Profile
#!/bin/bash
# Turn off SWAP
sysctl vm.swappiness=0
echo 'vm.swappiness = 0' >> /etc/sysctl.conf
@pavdmyt
pavdmyt / get_block_time.sh
Created September 29, 2020 09:45
Print Prometheus block's minTime and maxTime
#!/bin/bash
# Given a Prometheus block name, prints timerange
# for the metrics stored inside.
#
# Usage example:
# for b in `cat block_names.txt`; do ./get_block_time.sh $b; done
TIMEZONE="EEST"
BLOCK_DIR="/srv/prometheus_data/$1"
@pavdmyt
pavdmyt / scrape_team_data.py
Last active January 12, 2021 19:12
A script to scrape data about Formula 1 teams from Wikipedia pages.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A script to scrape data and stats about Formula 1 teams from Wikipedia pages.
Results are exported into a CSV file.
"""
import logging
from datetime import datetime