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
alias readme='markdown README.md | lynx -stdin' |
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
#!/bin/bash | |
# randomizing_pipe() | |
# | |
# by Carlos McEvilly | |
# License: Apache | |
# | |
# A bash function wrapping a famous perl random shuffle, adding on | |
# the ability to pass in a fixed seed for repeatability. | |
# |
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
#!/bin/bash | |
# create-subset.sh | |
# | |
# Create a throwaway subset/ directory containing files copied from an existing source | |
# training/ directory. Assumes .jpg. Once you are done with the (redundant) subset/ and | |
# want to clean it up, it's recommended to use remove-subset.sh instead of manual | |
# commands, since with these scripts we are operating close to training data and we | |
# don't want a mistake to result in the deletion of the wrong directory. |
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
#!/bin/bash | |
# CAUTION: This is experimental. It's working well for me, but I may move to | |
# using symbolic links instead of doing this. | |
# | |
# partition-for-testing.sh | |
# | |
# Moves a percentage of your image data from subdirectories under training/ | |
# to corresponding subdirectories under testing/, which it creates for you. | |
# |
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
#!/bin/bash | |
# td-make-random-backgrounds.sh | |
# | |
# Flatteringly adapted from the examples here: | |
# https://www.imagemagick.org/Usage/backgrounds/ | |
# | |
# - credit goes to the above site for these examples | |
# - this covers all but the tiling examples | |
# - running multiple times gives different random output, overwriting each time |
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
function rmdir() { | |
[[ -e "$@/.DS_Store" ]] && /bin/rm "$@/.DS_Store" | |
/bin/rmdir "$@" | |
} | |
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
#!/bin/bash | |
# hashit - wrapper around openssl providing easy command-line access to common hash functions | |
# | |
# by Carlos McEvilly | |
# | |
# 'hashit' creates symlinks to itself, named after | |
# common hashing schemes, and then the script can | |
# be invoked via any so-named symlink with a text | |
# string or filename argument in order to obtain |
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 asyncio | |
import aiofiles | |
import aiohttp | |
import logging | |
import re | |
import sys | |
import os | |
import lxml.html |
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
#!/bin/bash | |
# 1) edit the jira_base URL below | |
# 2) edit the project list below | |
# 3) save and make executable. Run in any directory where you have a branch named | |
# something like PROJ-1234. Browser opens with the JIRA ticket loaded. | |
export jira_base=https://jira.yourdomain.yourtld | |
export projects='(?:PROJ1|PROJ2)' | |
export jira=`git branch | grep '*' | perl -pe 's/.*?($ENV{'projects'}-\d+)\D?.*/$1/' -` |
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
#!/bin/bash | |
export branch=`git branch | grep '*' | cut -c2-` | |
echo -n $branch | pbcopy |