Skip to content

Instantly share code, notes, and snippets.

View raven38's full-sized avatar

raven raven38

View GitHub Profile
@uetchy
uetchy / mac-battery-inspector.py
Last active August 20, 2018 05:49
Inspect your MacBook's battery.
#!/usr/bin/env python
from __future__ import print_function
import subprocess
import re
def getIOReg():
cmd = "ioreg -l | grep Capacity"
response = subprocess.check_output(cmd, shell=True)
@SeitaroShinagawa
SeitaroShinagawa / download_celebA-wild.sh
Last active June 7, 2022 17:36
download celebA (not aligned data) from google drive
#!/bin/sh
#download celebA-HQ dataset with bash script
#1. make ~/.bash_aliases and add the following codes to gdrive_download (alias command):
#function gdrive_download () {
# CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
# wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CONFIRM&id=$1" -O $2
# rm -rf /tmp/cookies.txt
@mollifier
mollifier / .zshrc_word-chars
Last active September 11, 2021 05:13
zsh で / や . も単語の区切り文字とみなす設定
# .zshrcに書く
# word-chars で指定した文字が単語の区切りとみなされる。
# M-f, M-b, ^w などの動作に影響する
autoload -Uz select-word-style
select-word-style default
zstyle ':zle:*' word-chars ' /=;@:{}[]()<>,|.'
zstyle ':zle:*' word-style unspecified