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/python3 | |
import sys; | |
from lxml import etree; | |
def clean(f): | |
print("Processing "+f+"...") | |
tree = etree.parse(f) | |
root = tree.getroot() | |
used_actions=[] |
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/python | |
""" | |
This script was made to generate a big and random | |
file/folder structure quickly and easily. | |
Made by u8sand | |
""" | |
# util functions |
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/python | |
import argparse | |
import re | |
parser = argparse.ArgumentParser(description='Convert to and from ovpn files') | |
parser.add_argument('file', type=str, help='the .config or the .ovpn') | |
args = parser.parse_args() | |
m = re.match(r'(.*)\.(ovpn|conf)', args.file) |
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/python | |
''' | |
Usage: | |
python downsample.py [offset+]amount | |
Examples: | |
cat super_big.csv | python downsample.py 1+4 > big_divided_by_4.csv | |
cat data.csv | python downsample.py 2 > data_halved.csv | |
''' | |
import sys |
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/python | |
import sys | |
for i in sys.stdin: | |
if i.find('Comment') != -1: | |
print(','.join(i.split('\t')), end='') | |
break | |
for l in sys.stdin: | |
print(','.join(l.split('\t')), end='') |
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
''' Generate a truth table ''' | |
from itertools import product | |
import sys | |
args = sys.argv[1:] | |
if args!=[]: | |
bits = int(args[0]) | |
sep1 = '\t' if len(args)<=1 else args[1] | |
sep2 = '\n' if len(args)<=2 else args[2] | |
print(sep2.join([sep1.join(map(str,l)) for l in product(*[(0,1)]*bits))) |
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
class Input(Data): | |
data = ['key', 'mouse'] | |
class Key(dict, Data): | |
data = ('data', 'input',) | |
def __init__(self, parent): | |
dict.__init__(self) | |
self.input = parent |
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
#include "settings.h" | |
#include <QFile> | |
#include <QVariantMap> | |
#include <QJsonDocument> | |
#include <QMetaProperty> | |
#include "util.h" | |
Settings::Settings(QObject *parent): |
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
diff --git a/src/overlayhandler.cpp b/src/overlayhandler.cpp | |
index db5819a..17e97cf 100644 | |
--- a/src/overlayhandler.cpp | |
+++ b/src/overlayhandler.cpp | |
@@ -32,137 +32,137 @@ OverlayHandler::OverlayHandler(QObject *parent): | |
OverlayHandler::~OverlayHandler() | |
{ | |
- for(auto o : overlays) | |
- delete o; |
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 | |
# e.g find . -type f -exec bash rn.sh {} \; | |
p=$(dirname "$1") | |
f=$(basename "$1") | |
l=${f,,} | |
mv "$p/$f" "$p/$l.tmp" | |
sync |
OlderNewer