This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A script to resample your FLAC files *and* make sure they conform to the FLAC Subset | |
# specification so they will play in pretty much all hardware players - e.g. portable | |
# music players like those made by COWON - all this while minimizing file sizes. | |
# Requirements: | |
# - Bash 4 or newer (for the globstar) | |
# - sox | |
# - flac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# INSTALLATION | |
# ------------ | |
# Put this script in the bin directory of your virtualenv and make it user executable: | |
# $ cp pip_upgrade_all.sh /path/to/your_virtualenv/bin/ | |
# $ chmod u+x /path/to/your_virtualenv/bin/pip_upgrade_all.sh | |
# USAGE | |
# ----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def same_row(i,j): return (i/9 == j/9) | |
def same_col(i,j): return (i-j) % 9 == 0 | |
def same_block(i,j): return (i/27 == j/27 and i%9/3 == j%9/3) | |
class InconsistentPositionError(Exception): | |
pass | |
def still_consistent(a): |
NewerOlder