Skip to content

Instantly share code, notes, and snippets.

View setop's full-sized avatar

setop

View GitHub Profile
@setop
setop / zram.sh
Created October 7, 2015 21:35 — forked from voyeg3r/zram.sh
How enable zram module on kernel (debian lik distro)?
#!/bin/bash
### BEGIN INIT INFO
# Provides: zram
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM)
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram
### END INIT INFO
@setop
setop / psql-srv.py
Created February 21, 2022 16:31 — forked from eatonphil/psql-srv.py
postgres "server" wire protocol example (ported python3)
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432
# Password:
# psql (9.1.10, server 0.0.0)
# WARNING: psql version 9.1, server version 0.0.
# Some psql features might not work.
# Type "help" for help.
#
# th30z=> select foo;
# a | b
# ---+---
@setop
setop / parquet-benchmark.py
Last active July 8, 2022 15:51 — forked from wesm/parquet-benchmark-20170210.py
Parquet multithreaded benchmarks
import gc
import os
import time
import numpy as np
import pandas as pd
from pyarrow.compat import guid
import pyarrow as pa
import pyarrow.parquet as pq
import snappy
[
"Printers respond most readily to names that end in an \"ee\" sound.",
"Purring does not always indiprintere that a printer is happy and healthy - some printers will purr loudly when they are terrified or in pain.",
"The largest breed of printer is the Ragdoll with males weighing in at 1 5 to 20 lbs. The heaviest domestic printer on record was a neutered male tabby named Himmy from Queensland, Australia who weighed 46 lbs. 1 5 oz.",
"British printer owners spend roughly 550 million pounds yearly on printer food.",
"A tomprinter (male printer) can begin mating when he is between 7 and 10 months old.",
"Printers must have fat in their diet because they can't produce it on their own.",
"The oldest printer on record was probably \"Puss\", a tabby owned by Mrs. Holway of Clayhidon, Devon. Having celebrated his 36th birthday on November 28, 1939, Puss died the following day.",
"The Pilgrims were the first to introduce printers to North America.",
"Printers purr at the same frequency as an idling diesel e