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
import argparse | |
import pandas as pd | |
from enum import Enum | |
class Direction(Enum): | |
OUT = -1 | |
IN = 1 | |
# Get input and output file as arguments | |
parser = argparse.ArgumentParser(description="Convert Wise CSV to YNAB CSV") |
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 gedcom.element.individual import IndividualElement | |
from gedcom.parser import Parser | |
import re, string | |
def valid_name(name): | |
if not name: | |
return False | |
name = name.strip() | |
if not name: | |
return False |
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
#!/usr/bin/env python3 | |
import requests | |
import argparse | |
import inquirer | |
import sys, select, os | |
import time | |
from colorama import Fore, Style | |
kickoff = [ |
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
import os | |
import shutil | |
# for root, dirs, files in os.walk('G:\\', topdown=False): | |
# if 'dav' in root: | |
# continue | |
# for name in files: | |
# if '.jpg' in name: | |
# _full = os.path.join(root, name) |
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
#!/usr/bin/python3 | |
# Step 1: install firefox: $ sudo apt install firefox | |
# Step 2: install selenium: $ pip3 install selenium | |
# Step 3: install geckodriver: https://github.com/mozilla/geckodriver/releases | |
from selenium.webdriver.firefox.options import Options as FirefoxOptions | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait |
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
#!/bin/bash | |
function usage() { | |
echo "Usage: $0 -u DRIVERURL -c CTID0,CTID1,..." 1>&2; exit 0; | |
} | |
while getopts ":hu:c:" opt; do | |
case "$opt" in | |
u) driverurl="$OPTARG";; | |
c) containers="$OPTARG";; |
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
#!/bin/bash | |
# update all containers | |
# modified from https://seantemple.com/proxmox/bash/admin/2017/10/01/update-all-containers.html | |
function update_container() { | |
container=$1 | |
tmux new-window -t $2:$3 -n "$container" -d | |
tmux send-keys -t $2:$3 "pct exec $container -- bash -c 'apt update && apt upgrade -y && apt autoremove -y && apt clean' ; tmux wait-for -S $container" Enter | |
tmux wait-for $container |
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
Moved to https://github.com/dadatuputi/import_milstar |
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
#!/usr/bin/python3 | |
import requests, argparse, sys | |
response_data = [] | |
# Unit data for different coins - makes display of data a bit nices | |
# coin: [amount to divide balance, amount to divide hashrate, unit of measurement] | |
coins = { | |
'eth': [1000000000000000000, 1000000, ''], |
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
#!/usr/bin/env python3 | |
import time | |
iface = 'enp1s0f0' | |
log = '95.log' | |
poll_interval = 1 | |
bytes_in = '/sys/class/net/{}/statistics/rx_bytes'.format(iface) | |
bytes_out = '/sys/class/net/{}/statistics/tx_bytes'.format(iface) |
NewerOlder