List of command line accessible tools built into the Python standard library.
Base64 en/decoding:
python -m base64 -d [file]
python -m base64 -e [file]
//Extracted 1/10/2022 from my COVID-CO2-tracker project, in case they're useful to anybody. I'm gonna file an issue/suggesting a few places, and it seems polite to dump it here rather than a long preformatted bit in an issue. | |
export const GENERIC_GATT_SERVICE_SHORT_ID_DESCRIPTIONS = new Map([ | |
//these are hex strings, without the 0x. Chrome zero extends the devices... so 0x1800 becomes 0x00001800. | |
// This is a hack to make things easy. | |
['1800', "generic_access"], | |
['1801', "generic_attribute"], | |
['1802', "immediate_alert"], | |
['1803', "link_loss"], |
#!/usr/bin/env python3 | |
def cli(): | |
@command | |
def hello(*args): | |
cmd('echo', 'Hello', *args) | |
import sys | |
from typing import Any, List | |
# Parse input string into a list of all parentheses and atoms (int or str), | |
# exclude whitespaces. | |
def normalize_str(string: str) -> List[str]: | |
str_norm = [] | |
last_c = None | |
for c in string: |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
MIT License | |
Copyright (c) 2019 endolith | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
#-*- coding: utf8 -*- | |
# implementation of recipe on: http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt | |
import numpy as n, pylab as p | |
# variaveis de parametrizacao | |
fa=44100. | |
f=2. | |
# tipos: LPF, HPF, BPF, BPF2, notch | |
# APF, peakingEQ, lowShelf, highShelf |
########################### GTEST | |
# Enable ExternalProject CMake module | |
INCLUDE(ExternalProject) | |
# Set default ExternalProject root directory | |
SET_DIRECTORY_PROPERTIES(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/third_party) | |
# Add gtest | |
# http://stackoverflow.com/questions/9689183/cmake-googletest | |
ExternalProject_Add( |
#!/usr/bin/env python | |
'''Read fully linked TI COFF file, and generate AIS format file | |
Commandline parameters | |
enable sequential read, | |
pll and emifb configuration | |
pinmux configuration | |
enable checksums | |
'Eliot Blennerhassett' <eblennerhassett@audioscience.com> |