This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Map the tablet to cover a particular window, while maintaining its aspect | |
# ratio. If run from the terminal, it allows the user to click on the window | |
# for mapping. Otherwise, use the currently focused window. Should the | |
# window aspect ratio not match the tablet aspect ratio, the tablet will | |
# cover an additional area of the screen, to maintain the correct aspect | |
# ratio. By default, the window will be aligned with the top-left corner | |
# of the tablet, but options adjust the horizontal (-l, -c, -r) and vertical | |
# (-t, -m, -b) alignment. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: good bad ugly good-bad bad-good good-dep bad-dep ugly-dep good-bad-dep bad-good-dep | |
good: | |
./good.sh | |
bad: | |
./bad.sh | |
ugly: | |
./ugly.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import Ubuntu.Components 0.1 | |
import Ubuntu.Components.ListItems 0.1 | |
MainView { | |
width: units.gu(50) | |
height: units.gu(75) | |
Page { | |
id: page |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import os | |
def argsort(seq): | |
# http://stackoverflow.com/questions/3071415/efficient-method-to-calculate-the-rank-vector-of-a-list-in-python | |
return sorted(range(len(seq)), key = seq.__getitem__) | |
def check_file(f, start_commit, omit_commits): | |
if not f.endswith('.vala'): | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2009, 2010, 2012 Jorn Baayen | |
# Copyright 2012 Robert Schroll | |
# | |
# Released under the BSD license. | |
# | |
# Based on code proposed for inclusion with Reinteract. This version uses | |
# matplotlib's TexManager to display the LaTeX instead of Lasem, but works | |
# similarly otherwise. | |
import gtk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
%s mount-point | |
Print to a file information on the highlighted text of a selected file on | |
the reader at mount-point. The output file is tab-separated data of the | |
form: | |
page highlight-range mark-start mark-end mark-type marked-text | |
mark-start and mark-end are the 'pdfloc' data defining where the marked |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gobject as _gobject | |
class _ResizeBox(_gtk.VBox): | |
def __init__(self, figure): | |
_gtk.VBox.__init__(self) | |
self.figure = figure | |
# Rounding errors slowly accumlate in the figure height, shrinking it down | |
# over time. So we make a copy here and use that to keep resetting the | |
# canvas to the proper size. |
NewerOlder