I hereby claim:
- I am k-khr on github.
- I am kihara (https://keybase.io/kihara) on keybase.
- I have a public key ASCY2PnvMS_Iqm940fwsWaQW1blb3AzPPtN1CZpBcrTvVAo
To claim this, I am signing this object:
| # .cells[123] は出力したいセルの番号に変える | |
| jq '.cells[123] | reduce .outputs[] as $e ([]; . + $e.text) | join("")' < foo.ipynb | perl -pe "s/%/%%/g" | xargs printf |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| PID=$1 | |
| while [ ! -z "`ps aux | awk '{print $2}' | grep -o $PID`" ]; do | |
| sleep 5 | |
| done | |
| echo -e $'\e]9;Process '${PID}' finished\007' |
| #!/usr/bin/env python3 | |
| """ | |
| show_svgz.py | |
| open a .svgz file in a web browser | |
| Usage: | |
| $ show_svgz.py foo.svgz | |
| """ |
| #!/usr/bin/env python3 | |
| import sqlite3 | |
| # Edit here | |
| PLACES_SQLITE_PATH = '/Users/$USER/Library/Application Support/Firefox/Profiles/.../places.sqlite' # find path at about:profiles | |
| DEL_KEYWORDS = [ | |
| "youtube", | |
| "youtu.be", | |
| "twitter", |
| #!/usr/bin/env python3 | |
| # | |
| # Usage: | |
| # optpng [-h] [-i] [-vf filter] [-s scale] file [file ...] | |
| # | |
| import argparse | |
| import os | |
| import subprocess | |
| def exec(infile, in_place = False, vf = None, scale = None): |
| PROGRAM main | |
| IMPLICIT NONE | |
| INTEGER, PARAMETER :: slen = 1024 | |
| CHARACTER(LEN=slen) :: a | |
| a = "./foo/bar/baz.qux" | |
| WRITE(*, *) TRIM(get_basename(a, ext=.TRUE.)) | |
| WRITE(*, *) TRIM(get_basename(a)) |
| #!/usr/bin/env python3 | |
| # USAGE | |
| # $ ./gp_np.py | |
| # | |
| # +----------------------------------------------------------------------+ | |
| # 16 |-+ + + + + + + B +-| | |
| # | y=2x (w linespoints) ***A*** | | |
| # 14 |-+ y=4x (w points) B +-| | |
| # | | |
| #!/usr/bin/env ruby | |
| palette_path = "#{File.basename(ARGV[0])}_palette.png" | |
| outfile = "#{File.basename(ARGV[0])}.gif" | |
| ffmpeg_command = "ffmpeg -i #{ARGV[0]} -vf 'palettegen' #{palette_path} && ffmpeg -i #{ARGV[0]} -i #{palette_path} -filter_complex 'paletteuse' -r 7 #{outfile}" | |
| %x(#{ffmpeg_command}) | |
| %x(rm #{palette_path}) |
| # /etc/udev/hwdb.d/90-custom-keyboard.hwdb | |
| # https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes | |
| # for USB keyboard | |
| # `lsusb` to fill id | |
| evdev:input:b0003v<vendor_id>p<product_id>e<version_id> | |
| KEYBOARD_KEY_70039=zenkakuhankaku | |
| # for note PC | |
| evdev:atkbd:dmi:* |