source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/
For more commands:
man readline
- Ctrl + a – go to the start of the command line
- Ctrl + e – go to the end of the command line
source: http://www.skorks.com/2009/09/bash-shortcuts-for-maximum-productivity/
For more commands:
man readline
#!/usr/bin/env bash | |
function p() { | |
jq -n \ | |
--arg content "$*" \ | |
'{ | |
"model": "pplx-7b-online", | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "Be precise and concise." |
List of desktop Nvidia GPUS ordered by CUDA core count
Compute Capability from (https://developer.nvidia.com/cuda-gpus) Check the card / architecture / gencode info: (https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/)
GPU | CUDA cores | Memory | Processor frequency | Compute Capability | CUDA Support |
---|---|---|---|---|---|
GeForce GTX TITAN Z | 5760 | 12 GB | 705 / 876 | 3.5 | until CUDA 11 |
NVIDIA TITAN Xp | 3840 | 12 GB | 1582 | 6.1 | CUDA 8+ |
set number | |
color desert | |
syntax on | |
filetype plugin indent on | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab |
#Systemd - How to read live-tail logs of multiple services with journalctl | |
sudo journalctl --follow _SYSTEMD_UNIT=docker.service + _SYSTEMD_UNIT=apache2.service | |
Hint: | |
https://serverfault.com/questions/805775/journalctl-how-to-display-colors-in-its-output/893763#893763 | |
If the original daemon output is already colorized, but the colors are being lost when using journalctl, the `--output cat` option will restore them. |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Copyright (C) 2014 ADDY OSMANI <addyosmani.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
# Change these variables as necessary. | |
MAIN_PACKAGE_PATH := ./cmd/example | |
BINARY_NAME := example | |
# ==================================================================================== # | |
# HELPERS | |
# ==================================================================================== # | |
## help: print this help message | |
.PHONY: help |
# juggling_balls.py | |
import random | |
import turtle | |
class Ball(turtle.Turtle): | |
MAX_VELOCITY = 5 | |
GRAVITY = 0.07 | |
BAT_VELOCITY_CHANGE = 8 |
# juggling_balls_game.py | |
import turtle | |
import time | |
import random | |
from juggling_balls import Ball | |
# Game parameters | |
WIDTH = 600 |
import pygame | |
import random | |
colors = [ | |
(0, 0, 0), | |
(120, 37, 179), | |
(100, 179, 179), | |
(80, 34, 22), | |
(80, 134, 22), | |
(180, 34, 22), |