curl --head http://google.com # or, the same: curl -I http://google.com
HTTP/1.1 301 Moved Permanently Location: http://www.google.com/ Content-Type: text/html; charset=UTF-8 Date: Tue, 24 Jan 2012 20:22:14 GMT Expires: Thu, 23 Feb 2012 20:22:14 GMT Cache-Control: public, max-age=2592000 Server: gws Content-Length: 219 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN
For a pure Python solution, check out this post.
This tip is from here.
“The Tesseract OCR engine was one of the top 3 engines in the 1995 UNLV Accuracy test. Between 1995 and 2006 it had little work done on it, but it is probably one of the most accurate open source OCR engines available. The source code will read a binary, grey or color image and output text. Image input is managed by the Leptonica Image Processing Library which can read a wide variety of image formats.” (source)
As so many times, the Ubuntu repos are out-of-date again :( Via apt-get you can install version 2.
The two versions can co-exist. V2 is installed to
/usr/bin/tesseract while v3 is installed to
There is a Python library for Tesseract called pytesser.
I’ve integrated pytesser in my jabbapylib library, supporting Tesseract v2 and v3 too.
Installing tesseract v3 from source is now integrated in jabbatron.
“EPUB and MOBI editions of FCM #56 are now online!
(back issues are being worked on)
Click the link beside the cover.”
I suggest using Calibre with your e-book reader. You can install it via apt-get.
Major Hayden has a nice post on SIGTERM and SIGKILL.
Here I sum it up. When you execute “
kill 123“, it sends a SIGTERM signal to process 123. In this case the process has a chance to clean up (e.g. free resources) before exiting. The brutal “
kill -9 123” sends a SIGKILL signal and terminates the process immediately, i.e. no time for cleaning up. Be nice and first try SIGTERM.
In Python, you can kill a process the following way:
import os import signal os.kill(pid, signal.SIGTERM)
Geek rap “kill -9”
At the Racker Hacker blog you can find several posts related to server administration.
You want to store some sensitive data in your Dropbox folder, e.g. passwords. How to protect these data?
I wanted to store some credentials that I wanted to access from several machines. In my Dropbox folder I created a 10 MB Truecrypt volume. I mounted it and put the sensitive data in it.
play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14
Even better if you add this to your
alias engage="play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14"
#!/bin/sh # Engage Warp Drive # Requires package 'sox' # http://www.reddit.com/r/linux/comments/n8a2k/commandline_star_trek_engine_noise_comment_from/ # odokemono # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c36xkjx # original # play -n -c1 synth whitenoise band -n 100 20 band -n 50 20 gain +25 fade h 1 864000 1 # noname-_- # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c373gpa # stereo # play -c2 -n synth whitenoise band -n 100 24 band -n 300 100 gain +20 # braclayrab # http://www.reddit.com/r/scifi/comments/n7q5x/want_to_pretend_you_are_aboard_the_enterprise_for/c372pyy # TNG # play -n -c1 synth whitenoise band 100 20 compand .3,.8 -1,-10 gain +20 play -n -c1 synth whitenoise lowpass -1 120 lowpass -1 120 lowpass -1 120 gain +14