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
#!/bin/bash | |
if [ "$#" -lt 1 ]; then | |
echo "Usage: $0 executable [args...]" | |
exit 1 | |
fi | |
# Start monitoring GPU memory usage in the background | |
nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits -l 1 > gpu_usage.log & | |
PID=$! |
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
#include <cstdint> | |
#include <opencv2/core.hpp> | |
#include <opencv2/core/base.hpp> | |
#include <opencv2/core/hal/interface.h> | |
#include <opencv2/core/matx.hpp> | |
#include <opencv2/core/types.hpp> | |
#include <opencv2/core/utility.hpp> | |
#include <opencv2/imgcodecs.hpp> | |
#include <opencv2/imgproc.hpp> | |
#include <iostream> |
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
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead. | |
AlignConsecutiveMacros: false | |
AlignConsecutiveAssignments: false | |
AlignConsecutiveDeclarations: false | |
AlignEscapedNewlines: DontAlign | |
AlignOperands: false | |
AlignTrailingComments: false | |
AllowAllArgumentsOnNextLine: false | |
AllowAllConstructorInitializersOnNextLine: false |
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
ARG DEBIAN_FRONTEND=noninteractive | |
FROM busybox:latest | |
ADD https://downloads.raspberrypi.org/raspios_lite_arm64/root.tar.xz / | |
RUN set -xeu && \ | |
mkdir "/rpi-root" && \ | |
tar xaf /root.tar.xz -C /rpi-root |
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 | |
import requests | |
import json | |
import os | |
from http.client import responses | |
token = os.environ.get("HETZNER_API_TOKEN") # abc123 | |
zone_name = os.environ.get("HETZNER_DYNDNS_ZONE") # "mydomain.com" | |
ntfy_topic = os.environ.get("HETZNER_NTFY_TOPIC") # ntfy.sh/... my_topic_name |
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
#define WIN32_LEAN_AND_MEAN | |
#include <Windows.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <locale.h> | |
int main(void) | |
{ | |
if (!OpenClipboard(NULL)) | |
{ |
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
using System; | |
using System.Linq; | |
using System.IO; | |
using System.Drawing; | |
using System.Collections.Generic; | |
namespace ImageConverter | |
{ | |
class Program | |
{ |