I hereby claim:
- I am pepoluan on github.
- I am pepoluan (https://keybase.io/pepoluan) on keybase.
- I have a public key ASD3184JHBHYutCiRnsXJIrOjz5XDGtzsnfOQElHSpivZgo
To claim this, I am signing this object:
| #!/usr/bin/env python3 | |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
| # | |
| # Copyright (C) 2024, Pandu POLUAN | |
| import fileinput | |
| import re |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
| # Context: https://stackoverflow.com/a/56701174/149900 | |
| from io import StringIO | |
| WHITESPACE = " \t\r\n" |
| import pprint | |
| import random | |
| import timeit | |
| MEMBS_COUNT = 100 | |
| indexes = list(range(MEMBS_COUNT)) | |
| random.shuffle(indexes) | |
| orig_dict = {} |
| #!/usr/bin/env python3.9 | |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
| import os | |
| import time | |
| import xxhash | |
| from collections import namedtuple |
| logger = logging.getLogger() | |
| logger.setLevel(logging.DEBUG) | |
| facility = 23 # local7; see RFC 5424 | |
| formatter = RFC5424Formatter(appname="my-awesome", facility=facility) | |
| syslog_handler = UTF8DatagramHandler("127.0.0.1", 514) | |
| syslog_handler.setFormatter(formatter) | |
| syslog_handler.setLevel(logging.DEBUG) | |
| logger.addHandler(syslog_handler) |
| # This code is released to the Public Domain. | |
| # Alternatively, you can use one of the following licenses: Unlicense OR CC0-1.0 OR WTFPL OR MIT-0 OR BSD-3-Clause | |
| # IMPORTANT: | |
| # Please do note that this does NOT attempt to perform complex guessing e.g. CP437 or CP850 or GB18030 or JIS or... | |
| # Well, you get the idea. | |
| # This function will simply try to guess the most common *Unicode* encoding, i.e., UTF-8, UTF-16, and UTF-32 | |
| # More ... 'exotic' unicode encoding such as UCS-1, UCS-2, UTF-7, etc are NOT detected. (They would likely be | |
| # detected as "utf-8" by this function) | |
| # If you need more 'advanced' detection, use the heavyweight "chardet" library instead. |
| # This code is released to the Public Domain. | |
| # Alternatively, you can use one of the following licenses: Unlicense OR CC0-1.0 OR WTFPL OR MIT-0 OR BSD-3-Clause | |
| param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string] $server, | |
| [string] $iface = "Wi-Fi", # EDIT AS NEEDED | |
| [string] $dns_service = "dnscrypt-proxy" # EDIT AS NEEDED | |
| ) |
I hereby claim:
To claim this, I am signing this object:
| import os | |
| import socket | |
| import sys | |
| import struct | |
| import contextlib | |
| # Reference for the data structure / interaction: | |
| # https://tools.ietf.org/html/draft-miller-ssh-agent-00 | |
| # Good to read: |
| ' 1. Open Excel's VBA Editor using Alt-F11 | |
| ' 2. Right-Click on the "VBAProject (Spreadsheet_Name)" entry and choose "Insert > Module" | |
| ' 3. Paste the below code starting from the line beginning with "Function" up to and including the line "End Function" | |
| ' 4. Now you can use the User-Defined Function in your spreadsheet | |
| ' | |
| ' SYNTAX: | |
| ' =Byteify(Cell, [AssumeBinaryPrefix=False]) | |
| ' Cell : The Cell Reference (if actually a range, it will use the top left cell only) | |
| ' AssumeBinaryPrefix : KB, MB, GB will be assumed to be powers of 1024 (in other words, same as KiB, MiB, GiB) | |
| ' |