Skip to content

Instantly share code, notes, and snippets.

View rodrickbrown's full-sized avatar

Rodrick Brown rodrickbrown

View GitHub Profile
[{'Queue': 0, 'Writes': 0, 'WriteBytes': u'0', 'Name': u'C:'}, {'Queue': 0, 'Wri
tes': 0, 'WriteBytes': u'0', 'Name': u'D:'}, {'Queue': 0, 'Writes': 0, 'WriteByt
es': u'0', 'Name': u'E:'}, {'Queue': 0, 'Writes': 0, 'WriteBytes': u'0', 'Name':
u'_Total'}]
>>>
from checks import AgentCheck
#from md5 import md5
from multiprocessing import Process
import subprocess as sp
import time
import sys
import shlex
class LBMStat(AgentCheck):
def check(self, instance):
//
// main.swift
// Bukimur
//
// Created by Rodrick Brown on 7/8/14.
// Copyright (c) 2014 Rodrick Brown. All rights reserved.
//
import Foundation
import random
class Rummikub(object):
decks = [0,1]
colors = ["red", "blue", "black", "orange"]
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
jokers = ["black", "red"]
bag = []
func dealTiles(n: Int) -> [Dictionary<String, AnyObject>]{
var tiles: [Dictionary<String, AnyObject>] = []
for i in 0...n-1 {
tiles.append(self.bag[i])
self.bag.removeAtIndex(i)
}
//bag[bag.startIndex]
return tiles
}
class SetValidation {
var sets: [Dictionary<String, AnyObject>] = []
init(sets: [Dictionary<String, AnyObject>]) {
self.sets = sets
}
func validGroups(group: [Dictionary<String, AnyObject>]) -> Bool {
if group.count <= 0 {
return false
//
// main.swift
// Bukimur
//
// Created by Rodrick Brown on 7/8/14.
// Copyright (c) 2014 Rodrick Brown. All rights reserved.
//
import Foundation
import random
def merge(left, right):
result = []
i, j = 0,0
while i < len(left) and j < len(right):
if left[i] <= right[j]:
result.append(left[i])
i += 1
//
// main.swift
// Bukimur
//[Dictionary<String, String>]
// Created by Rodrick Brown on 7/8/14.
// Copyright (c) 2014 Rodrick Brown. All rights reserved.
//
import Foundation
//
// main.swift
// Bukimur
// Copyright (c) 2014 Bukimur.io All rights reserved.
import Foundation
class Sets {
var sets = Array<Dictionary<String,Any>>()