In the middle of the desert you can say anything you want
find
find $LOCATION -name $REQUIRED_FILES -type f -mtime +1 -delete
for files older than one dayfind $LOCATION -name $REQUIRED_FILES -type f -mmin +360 -delete
for the same in minutesAlso relevant is mtime, ctime, and atime - modification time, change time, access time.
mtime changes when you write to the file. It is the age of the data in the file. Whenever mtime changes, so does ctime. But ctime changes a few extra times. For example, it will change if you change the owner or the permissions on the file.
TF_CPP_MIN_LOG_LEVEL=3 python3 tensors.py
does the magic needed
Inserted the following in config.py
:
config.bind('a', 'set-cmd-text -s :open -t')
, to make a
an alias for O
This is really really neat when running shell scripts that run other shell scripts etc.
ps fax
gives a nice tree. Can be combined with other stuff, so ps faux
also works.
TODO actually read through the man pages about this.
>>> exec(open("C:\\test.py").read())
for Python 3, and \
>>> execfile('C:\\test.py')
for Python 2. Works with relative path.Or, from the same SO thread, one can do just import filename_without_extension
, even if it doesn’t follow the structure with main() etc., in my experience.
This is probably one of the most SEO titles I’ve ever created, but I think it applies to all of them.
expand_dims
)# 't' is a tensor of shape [2]
tf.shape(tf.expand_dims(t, 0)) # [1, 2]
tf.shape(tf.expand_dims(t, 1)) # [2, 1]
tf.shape(tf.expand_dims(t, -1)) # [2, 1]
screen
scrolling<C-a>+Esc
– and then you can move with whatever usual ways there are, esp. arrow keys and Page up/downThis answer: sound - How to record output to speakers? - Ask Ubuntu mentions “Sound recorder”, and it works very well. Has weird settings about staying on top, running on startup etc that have to be changed.
9fb017224a344dc5f028b5a6b8000a8afb30f6fb
How to increment a variable in bash? - Ask Ubuntu
var=$((var + 1))
is the most portable one.
some_command >file.log 2>&1
is the only one that works for me in all cases. (shell - Redirect stderr and stdout in Bash - Stack Overflow)
"$@"
are the arguments one can iterate through, and "@#"
is their number.
Use vi shortcuts in terminal | Vim Tips Wiki | FANDOM powered by Wikia – add
set editing-mode vi set keymap vi-command
to ~/.inputrc
or /etc/inputrc
and restart terminal.
I can use !2332
-style stuff inside commands as I type them! mycommand !23
if !23 is test
would run as mycommand test
.
IPFS is the Distributed Web – it looks very interesting, I should read the whitepaper or some basic intro (A Beginner’s Guide to IPFS – HackerNoon.com)
zip
add to zipfile while ignoring directorieszip -j fileone filetwo ~/home/me/some/directory/file myzipfile.zip
. -j
means “junk directory structure”
tf.squeeze
to remove dimensions of [1]If I had a tensor of dimension [1, 2, 3], tf.squeze() would turn it into [2, 3]. tf.squeeze | TensorFlow Core r1.14 | TensorFlow.
It removes any dimensions of shape 1 it finds. If I provide an axis
parameter, it will only look at that dimension.
fixum
– a fixed pay. \
Elided - definition of elided by The Free Dictionary
tr.v. e·lid·ed, e·lid·ing, e·lides
1. a. To omit or slur over (a syllable, for example) in pronunciation. b. To strike out (something written). 2. a. To eliminate or leave out of consideration. b. To cut short; abridge.
First seen as “[elided 10 identical lines from previous traceback]” in Tensorflow/Python
For a more systematic understanding: * jtoy/awesome-tensorflow: TensorFlow - A curated list of dedicated resources http://tensorflow.org is a list of nice stuff, not necessarily meant to be read in the same order * astorfi/TensorFlow-Roadmap: Organized & Useful Resources about Deep Learning with TensorFlow has a more “more GIFs to the god of GIFs” feel to it, but is meant to be read in a sequential order, and the resources look very nice.