testing [links|http://www.google.com]
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 | |
import os | |
import sys | |
import json | |
import re | |
import requests | |
def sanitize(title): | |
cleaned = re.sub('[^a-zA-Z0-9]+', '_', title) |
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 cv2 | |
import mediapipe as mp | |
import numpy as np | |
import math | |
import sys | |
LEFT_EYE = 33 | |
RIGHT_EYE = 263 | |
def main(): |
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 itertools | |
I_PATTERN = [5,0,7,2,1,4,3,6] | |
J_PATTERN = [6,3,0,5,2,7,4,1] | |
def swapi(items): | |
return swap_with_pattern(items, I_PATTERN) | |
def swapj(items): | |
return swap_with_pattern(items, J_PATTERN) |
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 2015 Netflix, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 json | |
# Usage: | |
# | |
# curl -O http://lilyserver:12060/repository/schema/fieldType | |
# curl -O http://lilyserver:12060/repository/schema/recordType | |
# python schema_json.py > schema.json | |
# lily-import schema.json | |
# |
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
require 'nokogiri' | |
require 'open-uri' | |
def get_image_url() | |
# Find the url for today's dilbert comic on the home page | |
doc = Nokogiri::HTML(open("http://www.dilbert.com/")) | |
doc.css('div.STR_Image img').attr('src') | |
end | |
def update_feed(image_url) |
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
class base { | |
$basepackages = [ | |
"acidrip", "ack-grep", "apparix", "apt-utils", "audacity", "apt-cacher", "apache2", "atop", | |
"bzr", "bwm-ng", | |
"chromium-browser", "chromium-codecs-ffmpeg", "clusterssh", "compizconfig-settings-manager", "curl", "calibre", "cheese", "clojure", | |
"dconf-tools", "desktopcouch-ubuntuone", "devscripts", "dvdrip", "dvdbackup", "dsh", "dos2unix", | |
"ec2-ami-tools", "ec2-api-tools", | |
"ffmpeg", "freemind", | |
"gcompris", "gcompris-sound-nl", "gimp", "git-svn", "gitk", "gnuplot", "groovy", "grpn", "gtk-recordmydesktop", "gddrescue", "gconf-editor", "glade", "graphviz", | |
"htop", |
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
karel@tomato:~/work/outerthought/whirr$ ruby build-tools/update-versions 12345 | |
Updating to version 12345 ... | |
build-tools/update-versions:61:in `process_module': undefined method `inner_html=' for nil:NilClass (NoMethodError) | |
from build-tools/update-versions:54:in `edit_pom' | |
from build-tools/update-versions:60:in `process_module' | |
from build-tools/update-versions:73 | |
from build-tools/update-versions:73:in `each' | |
from build-tools/update-versions:73 | |
from build-tools/update-versions:54:in `edit_pom' | |
from build-tools/update-versions:67 |
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
# define 'classes': collections of useful role combinations | |
whirr.instance-class.web=role1+role2 | |
whirr.instance-class.db=role3+role4 | |
# define profiles. these could describe hardware, image, memory, ... | |
whirr.instance-descriptor.lightweight.hardwareId=x1.large | |
whirr.instance-descriptor.heavyweight.hardwareId=x4.large | |
# cluster: | |
whirr.instance-templates=3 web/heavyweight, 1 db/lightweight, 1 db/heavyweight |
NewerOlder