Skip to content

Instantly share code, notes, and snippets.

mpi group by hostname

dll injection python

How to Paste Terminal Output in MS Office

This guide explains how to save terminal output, convert it into HTML, and then paste it into your MS Office document with the correct formatting.


1. Save the Terminal Output

First, save your terminal output into a text file. Here are a few methods:

P2P TCP connection via UDP hole punching and QUIC

import os
import urllib.request
import urllib.parse
import json
import datetime
import re
# Flickr APIキーを設定
FLICKR_API_KEY = ""
SEARCH_QUERY = "cat" # 検索ワード

Sleep until an absolute time with asyncio

UDP hole punching

QUIC study

CHECK_CUDA sample cpp

CUDAのサンプルコードでよくみるCHECK_CUDAマクロをC++的な書き方に書き換え
Rewriting the CHECK_CUDA macro often seen in CUDA sample code to a C++-like writing style

RAIIによるリソース破棄も実装
Resource destruction by RAII is also implemented

import sqlite3
import random
import string
import time
import sys
import os
num_records = 65536
num_str_columns_list = (1, 2, 4, 8, 16, 32, 64, 128, 256)
dbfn = "tmp.db"