Hat tip My Web Experiences blog.
This is pretty neat. If you have two (or perhaps more) .m4v files that you want to concatenate, there is an open source package called
gpac available for Ubuntu and Debian. Debian packages are available at the project website, and the source code is on a github repo.
The package is also available via the Ubuntu
apt package manager. As of 2016 Dec 18, the latest release available via
apt is 0.5.2, which is a bit behind the latest project release, 0.6.1.
While the package is called
gpac, the command provided by the package used to concatenate M4V files is called
MP4Box, and the syntax is:
$ MP4Box -cat video1.m4v -cat video2.m4v -new combinedvideo.m4v
This took maybe 5 minutes to combine two approx. 1 GB files on my Intel i5 from 2008.
These lychees are also known and sold as “rambutan” in Florida, where I encountered them. Photo below from user David Amsler on Flickr.
I’m working with
os.urandom and I was puzzled by this output:
>>> x = os.urandom(16)
>>> x # ASCII code for 'c' is 99 (decimal)
>>> hex(x) # ASCII code for 'c' is 63 (hexadecimal)
This question on StackOverflow clears things up greatly.
print(x) displays a “mixed hexadecimal/ascii” representation of the
x. Bytes that correspond to ASCII characters are displayed as ASCII characters, and bytes that do not are displayed in hexadecimal notation. Which is a little bit confusing if you aren’t expecting it.
When you are on the Linux command line and you want to view the contents of a file, you can use the
less is a newer pager program that replaces the older pager program,
more. Hence the joke:
less is new and improved, so in almost all cases it will be preferred over
more (maybe there will sometimes be compatibility issues with very old programs, or shell scripts, in which case
more will be used).
Continue reading “Linux pagers: less is more”
As of Nov. 24, 2016, the Standing Rock Sioux have raised $164,315 via their CrowdWise fundraiser. While the detailed data is not readily accessible, I was able to extract information from the scroller and determine the sample mean of $68.30. Raw data follows. I am sure it is only a subset of the total contribution data (probably the most recent 100 donations). Some of the amounts are not given — these are not included in the sample mean calculation:
Continue reading “Standing Rock Sioux Tribe vs. the Dakota Access Pipeline: Donations and Funds Raised”
Note: I’m writing from a Python 3.5 perspective.
There are a few different options for doing cryptographic stuff with Python. I have landed on the
cryptography module which has been working out pretty well for me so far. Here is a short account of how I ended up there…
Continue reading “Python Cryptography Module”
But you’d be forgiven for thinking so.
It is Alexander Grothendieck (1928-2014), who was a famous mathematician in the area of algebraic geometry. Born in Berlin, his father was Alexander “Sascha” Schapiro (aka Sascha Tanaroff), an anarchist and descendent of bourgeois Hasids from Novozybkov, Russia, near the modern-day borders with Belarus and Ukraine. Grothendieck’s mother was Johanna “Hanka” Grothenieck, also an anarchist and a descendant of middle-class German Protestants from Hamburg.
Grothendieck survived the Second World War and entered academia as a mathematician, making significant contributions in the area of algebraic geometry. He eventually became convinced that mathematics was immoral, and descended into a madness of religious passion. One presumes that the photograph above is from this later period.
Via Cliff Pickover on Twitter
DVDs did not play out of the box on my Ubuntu Desktop 16.04 LTS machine. I was able to fix this by doing the following.
First, entered the command:
$ sudo apt install libdvd-pkg
After the package and dependencies finished downloading and installing, it launched a short guided prompt sequence. I answered yes to all prompts — the only one really worth paying attention to was a choice to have the thing automatically update itself. It sounded like it has to build itself from source every time or something, so I guess it is a little non-standard in this regard. The prompts then told me to run the following command, which I did:
$ sudo dpkg-reconfigure libdvd-pkg
This popped up another little pseudo-graphical terminal prompt screen which, if I recall correctly, just asked me if I wanted to install the thing, which I answered in the affirmative.
After I completed these steps, all was well and I can now play the two DVDs I have tested without any problems.
I discovered this fix via a page on the Ubuntu wiki, RestrictedFormats/PlayingDVDs. According to the wiki, the actual software package that does the work is called
libdvdcss2, and the
libdvd-pkg package is a convenience package that makes the install easier.
I’ve encountered a weird little use case for non-breaking hyphens in Microsoft Word, and I have found the way to do it at this blog entry at Allen Wyatt’s Word Tips: Ctrl+Shift+- (or Ctrl+_).
The non-breaking hyphen is used to keep a hyphenated phrase together across a line break. So, for example, the phrase “non-breaking” when occurring at the end of a line would not do this: