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
// Copyright (c) 2022 Sebastian Pipping <[email protected]> | |
// Licensed under the GPL v2 or later | |
#include <errno.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <gmodule.h> |
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 bash | |
# Copyright (c) 2022 Sebastian Pipping <[email protected]> | |
# Licensed under the GPL v2 or late | |
set -e -u -o pipefail | |
: ${DLL_HOME:?environment variable not set but required} | |
: ${BUILD_DIR:?environment variable not set but required} | |
direct_dependencies_of() { |
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
# Copyright (c) 2024 Sebastian Pipping <[email protected]> | |
# Licensed under the MIT license | |
import math | |
import pylab | |
from matplotlib import pyplot | |
START = 100 | |
DAYS = 365 |
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 | |
# Copyright (c) 2015 by pyte authors and contributors | |
# Copyright (c) 2023 by Sebastian Pipping <[email protected]> | |
# | |
# Licensed under LGPL v3, see pyte's LICENSE file for more details. | |
# | |
# Based on pyte's example "capture.py" | |
# https://raw.githubusercontent.com/selectel/pyte/master/examples/capture.py | |
import os |
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
# Finds Git branches that were tracking a remote branch that no longer exists today. | |
# For Python >=3.8, all else is end-of-life. | |
# | |
# Copyright (c) 2023 Sebastian Pipping <[email protected]> | |
# Licensed under GPL v3 or later | |
import re | |
from subprocess import check_output | |
# NOTE: See "man git-check-ref-format" for colon (":") being disallowed in references |
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
'''Licensed under the MIT License :)''' | |
import pefile | |
import pprint | |
pe = pefile.PE('example.exe') | |
string_version_info = {} | |
for fileinfo in pe.FileInfo[0]: |
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 | |
# Copyright (C) 2023 Sebastian Pipping <[email protected]> | |
# Licensed under the MIT license | |
# | |
# Version 2023-05-27 20:38 UTC+2 | |
# | |
# Inspired by https://github.com/weddige/django-hibp/blob/main/django_hibp.py | |
# of django-hibp by Konstantin Weddige (@weddige). | |
import getpass |
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
# Demo of finding the nth permutation of a list in-place in Python >=3.8 | |
# Copyright (c) 2023 Sebastian Pipping <[email protected]> | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
from copy import copy | |
from math import factorial | |
from typing import List | |
from unittest import TestCase, TestLoader, TextTestRunner | |
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
# Copyright (c) 2022 Sebastian Pipping <[email protected]> | |
# Licensed under the Apache license version 2.0 | |
# | |
# Needs Python >=3.6 | |
# Version 2022-02-01 17:50 UTC+1 | |
_full_block_char = '\u2588' | |
_ansi_escape = '\u001b' | |
_ansi_reset = f'{_ansi_escape}[0m' | |
_demo_text = 2 * _full_block_char |
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
# Copyright (c) 2021 Sebastian Pipping <[email protected]> | |
# Licensed under the Apache license version 2.0 | |
# | |
# Creates an XML file with a given number of prefixed XML attributes | |
# on a single XML tag. | |
# Needs Python >=3.6 and PyPI package "base58" | |
# | |
# 2021-12-31 00:47 UTC+1 | |
import argparse |
NewerOlder