HNHacker News
TopNewBestAskShowJobs

hellabites

4 karma · joined February 23, 2014

submissionscomments
hellabites··on Problem solving with Unix commands
Just because I like GNU parallel:

    parallel -kj1 'f="{}"; [[ -f "${f/data/A}" ]] || echo $f' ::: *_data.csv
hellabites··on Problem solving with Unix commands
This is better relative to the `sed` solution as it handles the `0000` case well.
hellabites··on Problem solving with Unix commands
I didn't realize Zsh (and Bash) was capable of removing zero padding in that way.

Everybody has there own style, but I would prefer to print the missing file pattern and avoid loops.

If you have GNU parallel installed (works in bash)

     parallel -kj1 '! [[ -f "{}" ]] && echo {} || :' ::: $(jot -w %04d_A.csv - 1 501)
or if preferred

     parallel -kj1 '! [[ -f "{}" ]] && echo {} || :' ::: {0001..0500}_A.csv
hellabites··on Problem solving with Unix commands
Just for fun some bash:

    for k in $(seq -f %04.f 1 501); do 
        f="${k}_A.csv"
        ! [[ -f "$f" ]] && echo $f || :
    done
or more succinctly,

    for k in {0001..0501}_A.csv; do
        ! [[ -f "$f" ]] && echo $f || :
    done
and if you have GNU parallel installed:

    parallel -kj1 '! [[ -f "{}" ]] && echo {} || :' ::: {0001..0501}_A.csv
hellabites··on Raspberry Pi Pet Detector Camera Using Python, TensorFlow, and Twilio [video]
My cat perpetually wants to go outside.
hellabites··on Goldman Sachs Report Explores Use of Bitcoin as Currency
Gold had intrinsic value before electronics, but for basically the same reason: it's immutable.

The bitcoin blockchain is also immutable.

hellabites··on Org-Mode Is One of the Most Reasonable Markup Languages to Use for Text
Github flavored markdown does do tables (in a manner that's almost equivalent to org): https://github.com/adam-p/markdown-here/wiki/Markdown-Cheats...
hellabites··on Decomposing a function into its even and odd parts
Your algorithm had a bit of a typo--you want to subtract (resp. add) to calculate the odd and even parts of a function.

If you don't have a nearly symmetric span of x values, you may need to do extrapolation to obtain one, which may be difficult.

I brought up Fourier analysis not as a means to replace the decomposition described in the blog, but to connect it. I think it's neat that Fourier transformations can be viewed as a parity decomposition.

hellabites··on Decomposing a function into its even and odd parts
This can be rather difficult for general data where an explicit equation isn't obvious (even though it'll work quite often as pointed out by johncolanduoni below).

[I think it's neat that] for sufficiently smooth and periodic data, a Fourier transform will do exactly this (decompose a function into its even and odd parts)!

hellabites··on Jupiter’s Great Red Spot Likely a Massive Heat Source
Two fluids with a density difference and a velocity gradient usually have a common force acting upon them, e.g. gravity, which enforces so-said interface. Perturbations to the average interface are restored via this force, and these perturbations are called gravity waves.

KH Instabilities give rise to gravity waves.

hellabites··on Jupiter’s Great Red Spot Likely a Massive Heat Source
Gravity is the result of an appropriately accelerating frame (i.e. the curvature of spacetime).
hellabites··on Jupiter’s Great Red Spot Likely a Massive Heat Source
Name seems fine to me.

From the first paragraph of the wiki-page:

In fluid dynamics, gravity waves are waves generated in a fluid medium or at the interface between two media when the force of gravity or buoyancy tries to restore equilibrium. An example of such an interface is that between the atmosphere and the ocean, which gives rise to wind waves.

hellabites··on What are the most popular random seeds?
Disappointed by the lack of 1337.
hellabites··on Intel's roadmap for Optane SSDs with 1,000x performance
They claim that it has an unlimited number of write cycles.
hellabites··on Death Valley National Park: First Observation of Rocks in Motion
Don't know why this is being downvoted. It's important for scientists to use the correct, well-established terms when discussing their research. This is most true for formal publications.

Velocity is a vector quantity--it describes a directional rate of change. Speed is the magnitude of the velocity. When they use the term velocity, they mean speed. For example, even in the abstract:

"along trajectories determined by the direction and velocity of the wind"

Velocity has a direction! The use of direction in this sentence is redundant to anyone that has had a college level physics course. This trend of using "velocity" instead of "speed" continues through the entire paper. I find this very upsetting.

Of course, it may seem pedantic, but good science is pedantic.

I'm surprised that it made it through peer-review like this.

hellabites··on Death Valley National Park: First Observation of Rocks in Motion
They use the term velocity to mean speed a lot :(.
hellabites··on Tmux 1.9 released
No, but I am very thankful for your posted workaround.