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/python | |
import sys | |
import usb.core | |
import usb.util | |
VENDOR_ID = 0x0801 | |
PRODUCT_ID = 0x0002 | |
DATA_SIZE = 337 |
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 | |
URL="http://shop.ritter-sport.de/b2c/schokolade/social-media-limited-edition/einhorn.html" | |
SITE=$(curl -s "${URL}") | |
if echo "${SITE}" | grep "out-of-stock" > /dev/null 2> /dev/null; then | |
echo "OK: Sckokolade ist immer noch ausverkauft"; | |
exit 0; | |
fi; |
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
# NMEA to GPX converter | |
# Peter Pearson | |
# version 0.11 | |
import csv | |
import sys | |
import time | |
from time import strftime | |
def convert_dms_to_dec(value, dir): |
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 numpy as np | |
import sys | |
import os | |
import cv2 | |
import shutil | |
log = open('log.txt','a') | |
img = cv2.imread(sys.argv[1],1) | |
origimg = img | |
height, width, channels = img.shape |
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 sys | |
import os | |
import requests | |
import subprocess | |
import urllib3 | |
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) | |
param=sys.argv[1] | |
baseUrl = "https://media.niu.de/magazines/%s" % (param) |
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 socket | |
import sys | |
class DNSQuery: | |
def __init__(self, data): | |
self.data=data | |
self.domain='' | |
typ = (ord(data[2]) >> 3) & 15 # Opcode bits | |
if typ == 0: # Standard query |
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
# output: | |
# [2.88, 2.88, 2.88, 2.88, 3.2, 3.2, 3.2, 3.2, 3.2, 3.52] | |
# [2.88, 2.88, 2.88, 3.2, 3.2, 3.2, 3.2, 3.52] | |
# [2.88, 2.88, 2.88, 0, 3.2, 3.2, 3.2, 3.2, 0, 3.52] | |
a = [2.88,2.88,2.88,2.88,3.2,3.2,3.2,3.2,3.2,3.52] | |
b = [2.88,2.88,2.88,3.2,3.2,3.2,3.2,3.52] | |
def zero_pad_gen(a, b, _sentinel=object()): | |
a = iter(a) |
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 python | |
import re | |
import sys | |
def print_memory_of_pid(pid, only_writable=True): | |
""" | |
Run as root, take an integer PID and return the contents of memory to STDOUT | |
""" | |
memory_permissions = 'rw' if only_writable else 'r' |
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
<html> | |
<head> | |
<style> | |
body { | |
font-family: 'Open Sans', Helvetica, Arial; | |
font-size: 12pt; | |
color: #666; | |
margin-top: 40px; | |
text-align: center; | |
} |