Skip to content

Instantly share code, notes, and snippets.

View sk1p's full-sized avatar

Alexander Clausen sk1p

  • Jülich, Germany
View GitHub Profile
import numpy as np
import sys
from libertem.api import Context
from libertem.common.buffers import BufferWrapper
def make_max_buffer():
return {
'maxbuf': BufferWrapper(
kind="sig", dtype="float32"
)
@sk1p
sk1p / nc.py
Created February 25, 2021 19:04
A hacked-together read-only splicing netcat
#!/usr/bin/env python3
import socket
import ctypes
import ctypes.util
import fcntl
import errno
import sys
import os
import click
@sk1p
sk1p / lol.py
Last active November 29, 2021 23:11
What if you have filenames with latin1 encoding, but also ones with utf-8 in the same file system tree?
#!/usr/bin/env python3
import os
from typing import List, Dict
import subprocess
import click
def clean_your_shit(bytes_name: bytes) -> bytes:
try: