View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

Git notes

2016-07-08

Categories: git  
Tags: git  

Git notes! How do you set the HEAD without checking out a branch?

git symbolic-ref HEAD refs/heads/remotes/origin/master

Then you can do git lfs fetch (which is faster) followed by git checkout master.

And don’t forget, git clone --no-checkout is also useful too.

Update master without checkout?

git fetch origin master:master

20160708/http://stackoverflow.com/questions/3216360/merge-update-and-pull-git-branches-without-using-checkouts

Servo motors? How do you determine unknown pin-outs on a servo motor, such as that on the inside of my old Minolta camera? Well, I’m still not exactly sure, but this is a helpful resource.

20160704/http://www.jameco.com/Jameco/workshop/howitworks/how-servo-motors-work.html

So, how about a Raspberry Pi oscilloscope? That should help you diagnose the connection.

Cool! Raspberry Pi oscilloscope. Well, this isn’t actually particular to the Raspberry Pi, but it works with the Raspberry Pi. If you ask me, I’d go for the micro one. I like the small size, and it is fast enough for my purposes.

20160704/https://www.raspberrypi.org/blog/bitscope-micro/
20160704/http://www.bitscope.com/pi/
20160704/http://www.bitscope.com/
20160704/http://www.bitscope.com/design/?p=machine
20160704/http://www.bitscope.com/pi/
20160704/http://www.bitscope.com/product/BS05/
20160704/http://www.bitscope.com/product/BS10/

Oh, hey! Let’s revisit that other article referenced above on servo motors. It says the standard time versus angle is represented in the chart. And, that’s also what I’ve got from the other source I found. Well, that sounds pretty good then. I’ve got reliable references to work with.

Read on →

Can ImageMagick work with 16 bits per channel? This would be very useful when doing gamma curve corrections. It looks like it can, I think.

  • Yep, it definitely can. Just make sure you use the -depth 16 operator somewhere before you save as PNG and your PNGs will end up with a larger file size due to having 16 bits per channel.

  • This Color Basics ImageMagick article is very useful. In fact, it’s so useful that it even includes a link to the excellent Gamma error in picture scaling article on 4p8.com that I include below and follow up with discussion.

** Important! In ImageMagick versions before 6.7.5, there was a bug such that the meanings of RGB and sRGB were swapped.

20160704/http://www.imagemagick.org/Usage/color_basics/
20160704/http://www.imagemagick.org/script/convert.php
20160704/http://www.imagemagick.org/script/command-line-options.php#depth
20160704/http://www.imagemagick.org/script/command-line-options.php#level

DuckDuckGo imagemagick 16 bits per channel

Again, I reiterate, albeit grudgingly. When your computer does not have very much space, you often times make a preference to store only executable code that needs to make fast changes to memory internally, and all static data is stored externally in printed documentation. That was the historic modus operandi of computers when they didn’t have very much in the way of storage space.

BUT… what about now that computers have oodles of digital storage space? Well, sometimes you may still run into this problem when working with embedded systems. In that case, your course of action is to store the data only in computer systems that are large enough to contain it all. The small systems will have to do without.

Oh yeah, and when you work with huge amounts of data, yes, you will have to define storage volumes that work with a certain “order of magnitude” of data. Yes, that does mean that some forms cannot store all data.

And what about data originating from paper? Here, you have a particular problem in that you need the software to generate the optimal form data to be completely automated with absolutely no user intervention. In the case that is not possible, the digital storage form will in fact be a liability to manage and a considerable expense, so you might as well only go with the physical paper form in that case.

Read on →

This is an interesting paper on laser triangulation sensors. However, it appears to be old and may be a little bit outdated.

20160703/https://www.ogpnet.com/Assets/uploads/files/OGP/TriangulationSensors.pdf

One thing particular about this research paper is that it comments a lot on 3D scanners that use a position sensitive device (PSD) for the image sensor.

So, are these position-sensitive devices 1D only and must they be lined up in an array to sense an image? Well, let’s see what Wikipedia has to say. Wikipedia has some information on this, but it’s not very interesting.

  • Particularly, it became apparent to me that you could use a PSD sensitive to infrared light as the trackpad on a laptop computer.

20170319/https://en.wikipedia.org/wiki/Position_sensitive_device

So, it turns out that there are actually 2D position-sensitive devices. So, no need to build an array if you are only using a point-laser light source, which is what the paper appears to describe is recommended for such 3D scanners.

Also, the paper notes that a small spot size is needed for good resolution on such devices since they are threshold-driven. Note that this is rather different than the requirement.

Read on →

What were you saying? You were considering optical barcode and modem-style transmission of data if all other transmission modes fail? No way. That is much too slow when you have gigabytes of data to transfer from one device to another. Oops, sorry, but this is just a statement of fact. Just too much data to transfer across such slow links.

But really, if you are willing to tolerate the worst case, you might get a transmission speed of 32 kbits/s, or 4 KB/s. So how long does it take to transfer 32 GB across this link? 97 days. Yeah, that’s awfully long, but if its been decades since the data has been going anywhere, you might be willing to wait for that kind of thing.

Now what about hundreds of terabytes? Seriously, we need a better way than this. Wow, this means that even RS-232 serial port is much too slow of a medium to transfer large amounts of data across. 100 Mbit/s Ethernet? Okay, that’s better. Gigabit Ethernet and USB 3? Still much better.

What is this? What is this?!! My text data in the computer was never supposed to get this big. Megabytes. Okay, fine. I guess I had it coming for me if I know there are other people who have megabytes of text data inside the computer.

And, I guess in another sense, let that be a lesson to me. Let that be a lesson to me in second thinking that all the text data I would ever need, or even more so, that I would ever type out of my own fingers, would be smaller than some certain size. Because, as you can clearly see from this particular example, that is clearly not the case. And, it still doesn’t take into consideration, the fact that speech comes at a much higher rate and at a much greater frequency than text data. So this is only the tip of the iceberg in the severity of data. With an avalanche more of data to come once I turn on speech-to-text technologies.

So how do you do speech to text locally?

20160702/DuckDuckGo raspberry pi speech to text recorder
20160702/DuckDuckGo speech to text linux local train

Read on →

`version_compare` in Ansible

2016-07-01

Categories: ansible  
Tags: ansible  

Wow, in trying to understand version_compare in Ansible. Coming to a discussion forum among the implementors really cleared up how things work. They discussed alternatives of implementing it either as a function or as a “jinja2 filter.” So, that weird syntax style is the alternative that is used for jinja2 filters. Oh, that makes a lot more sense.

20160701/https://groups.google.com/forum/#!msg/ansible-project/P_Rp4fVJYHk/mQMvVPC3g1AJ

It’s too bad that discussion can’t be in the documentation.

  • So what were you saying? You should write some easy to read documentation that does not include the full details, it just does straight to the point? Maybe not. Maybe including the full details makes much more sense than trying to “only include what is relevant.”