As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <[email protected]> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Spurred by recent events (https://news.ycombinator.com/item?id=8244700), this is a quick set of jotted-down thoughts about the state of "Semantic" Versioning, and why we should be fighting the good fight against it.
For a long time in the history of software, version numbers indicated the relative progress and change in a given piece of software. A major release (1.x.x) was major, a minor release (x.1.x) was minor, and a patch release was just a small patch. You could evaluate a given piece of software by name + version, and get a feeling for how far away version 2.0.1 was from version 2.8.0.
But Semantic Versioning (henceforth, SemVer), as specified at http://semver.org/, changes this to prioritize a mechanistic understanding of a codebase over a human one. Any "breaking" change to the software must be accompanied with a new major version number. It's alright for robots, but bad for us.
SemVer tries to compress a huge amount of information — the nature of the change, the percentage of users that wil
# Steps to build and install tmux from source. | |
# Takes < 25 seconds on EC2 env [even on a low-end config instance]. | |
VERSION=2.7 | |
sudo yum -y remove tmux | |
sudo yum -y install wget tar libevent-devel ncurses-devel | |
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz | |
tar xzf tmux-${VERSION}.tar.gz | |
rm -f tmux-${VERSION}.tar.gz | |
cd tmux-${VERSION} |
%pyspark | |
import matplotlib.pyplot as plt; plt.rcdefaults() | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import StringIO | |
def show(p): | |
img = StringIO.StringIO() | |
p.savefig(img, format='svg') |
from tensorflow.python.ops import tensor_array_ops
from tensorflow.python.framework import dtypes
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import variable_scope as vs
from tensorflow.python.ops import rnn
from tensorflow.python.ops import nn
from tensorflow.python.ops import init_ops
from tensorflow.core.example import example_pb2 | |
import tensorflow as tf | |
import glob, struct | |
def text_generator(example_generator): | |
"""Generates article and abstract text from tf.Example. | |
Args: | |
example_generator: a generator of tf.Examples from file. See data.example_generator""" | |
while True: |
You have docker volume on one host and want to move that volume to another host. For example, you want to transfer PostgreSQL container with it's volume to another host.
Actually, there is no in-a-box solution from Docker, so we need to:
# This example pyproject.toml is for a basic pip+setuptools setup. | |
# If you use a project management tool (like Poetry), then | |
# those tools will have slightly different configurations or additions. | |
# I highly recommend using a project management tool for your project. | |
# Project management is a highly opinionated subject. | |
# There are a lot of good, robust tools in this space now (as of 2023) | |
# Two that I've used and recommend are Poetry and PDM. | |
# Poetry is more mature, PDM is recent, both work well. | |
# - Poetry: https://python-poetry.org/ |