This file contains hidden or 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
sudo open /System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardSetupAssistant |
This file contains hidden or 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 botocore.session | |
from botocore import monitoring | |
from opentelemetry.trace import get_tracer | |
from opentelemetry import trace | |
from opentelemetry.trace import SpanKind | |
from opentelemetry.semconv.trace import SpanAttributes | |
from opentelemetry.trace.status import Status, StatusCode | |
from opentelemetry.instrumentation.utils import ( | |
http_status_to_status_code, | |
) |
This file contains hidden or 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
const [lastVisit, setLastVisit] = useState(null); | |
useEffect( | |
() => | |
history.listen((e) => { | |
logEvent(TrackEvents.PAGE_VISIT, { route: e.pathname }); | |
const now = Date.now() / 1000; | |
lastVisit && | |
logEvent(TrackEvents.PAGE_LEAVE, { | |
route: lastVisit.path, |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"io/ioutil" | |
) | |
import "github.com/thrift-iterator/go" | |
import "github.com/thrift-iterator/go/general" |
This file contains hidden or 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
from plugin import TraceParentLogger | |
def create_app(): | |
config = get_api_settings() | |
app = FastAPI... | |
.... | |
app.add_middleware(RawContextMiddleware, plugins=(TraceParentLogger(),) |
This file contains hidden or 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
FROM python:3.9.5-slim-buster | |
ENV PYTHONUNBUFFERED 1 | |
RUN adduser \ | |
--disabled-password \ | |
--gecos "" \ | |
--home /app \ | |
app |
This file contains hidden or 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
# python3 script to determine | |
# 1 flash, 1 bit bright,3 bits paper,3 bits ink | |
if __name__ == '__main__': | |
colors = { | |
"INK_BLACK": 0x00, | |
"INK_BLUE": 0x01, | |
"INK_RED": 0x02, | |
"INK_MAGENTA": 0x03, | |
"INK_GREEN": 0x04, | |
"INK_CYAN": 0x05, |
This file contains hidden or 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
""" | |
Converts in batch 7zip files to zip | |
""" | |
import zipfile | |
import glob | |
from io import BytesIO | |
import argparse | |
# Uncomment to use macos hack brew version of of libarchive | |
# import os |
This file contains hidden or 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 | |
until nc -nz $1 22 -w 5 &>/dev/null; do :; done |
This file contains hidden or 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
""" | |
Obtained from | |
https://stackoverflow.com/questions/41564291/parquet-build-with-hdfs-getmerge-recovery | |
""" | |
import sys | |
import locale | |
import os | |
import re | |
import io |