Get gdal development libraries:
$ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
$ sudo apt-get update
$ sudo apt-get install libgdal-dev
Create and activate a virtual environment:
| (ns tetris.core | |
| (:import (java.awt Color Dimension BorderLayout) | |
| (javax.swing JPanel JFrame JOptionPane JButton JLabel) | |
| (java.awt.event KeyListener)) | |
| (:use clojure.contrib.import-static deflayout.core | |
| clojure.contrib.swing-utils) | |
| (:gen-class)) | |
| (import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_DOWN VK_UP VK_SPACE) |
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| # coding=UTF-8 | |
| from __future__ import division | |
| import re | |
| # This is a naive text summarization algorithm | |
| # Created by Shlomi Babluki | |
| # April, 2013 | |
| class SummaryTool(object): |
Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki
| # !/usr/bin/env python | |
| import numpy as np | |
| from scipy import ndimage, misc | |
| import sys, math, os | |
| from PIL import Image | |
| def cubemap(filename): | |
| SIZE = 1024 | |
| HSIZE = SIZE / 2.0 |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
BeagleBoard came out with a new iteration called PocketBeagle in late september 2017. The new Beagle is minimalistic in nature, consisting primarily of an SD Card Reader, a Micro USB Interface, and the Octavo Systems OSD3358 1GHz ARM® Cortex-A8 System-in-Package (SIP).
The getting started page for the BeagleBoard truly gets you going quick with Linux. However, those of us looking to learn embedded systems, are left high and dry. The resources on uses of the PocketBeagle/BeagleBoard for "bare metal" programming are much fewer in number than those for getting started with Linux.
When I bought the PocketBeagle, it was still very new. There were few resources online for "bare metal" booting/programming. This gist will hopefully document some of the problems I encountered while learning how to boot the PocketBeagle into my own code.
The manual for the AM335x is 5000+
| import numpy as np | |
| from scipy.signal import filtfilt, butter | |
| from quaternion import quaternion, from_rotation_vector, rotate_vectors | |
| def estimate_orientation(a, w, t, alpha=0.9, g_ref=(0., 0., 1.), | |
| theta_min=1e-6, highpass=.01, lowpass=.05): | |
| """ Estimate orientation with a complementary filter. | |
| Fuse linear acceleration and angular velocity measurements to obtain an |