Skip to content

Instantly share code, notes, and snippets.

@habnabit
habnabit / pkgpurge.py
Created February 26, 2013 07:00
purge packages since pkgutil can't
#!/usr/bin/python
import subprocess
import plistlib
import os.path
import errno
def check_output(cmd, *a, **kw):
proc = subprocess.Popen(cmd, *a, **kw)
stdout, stderr = proc.communicate()
if proc.returncode:
# -*- coding: utf-8 -*-
#
# Copyright 2013 Liftoff Software Corporation
#
# For license information see LICENSE.txt
# Meta
__version__ = '1.0.0'
__version_info__ = (1, 0, 0)
__license__ = "Apache 2.0"
import sqlite3
from collections import defaultdict
DATABASE = 'C:/Misc/myscripts/workprototype/workprototype.db'
conn = sqlite3.connect(database=DATABASE)
curs = conn.cursor()
prod_dict = {}
curs.execute('select name, desc from companies')
from ometa.grammar import OMeta
from ometa.interp import TrampolinedGrammarInterpreter
from parsley import makeGrammar
import sys
grammar = """
hex_digit = digit | 'A' | 'B' | 'C' | 'D' | 'E' | 'F'
import pprint
import sys
import oauth2
from twisted.internet import defer, task
from twisted.web.client import Agent, HTTPConnectionPool
import twits
This file has been truncated, but you can view the full file.
{"series": ["py27__C impl__all", "py27__py impl__all", "pypy__C impl__all", "pypy__C impl__first", "pypy__C impl__last", "pypy__py impl__all", "pypy__py impl__first", "pypy__py impl__last"], "benchmarks": [["lines:1m_lines__chunk_kb:2__length:10m", [[2.14279580116, 2.14249491692, 2.1622941494, 2.13530087471, 2.10460186005, 2.08753490448, 2.04609394073, 2.08531999588, 2.07630991936, 2.08709096909, 2.08721089363, 2.10943388939, 2.11120796204, 2.09325695038, 2.08585691452, 2.08312487602, 2.07958984375, 2.10070896149, 2.09706497192, 2.07089400291, 2.07461309433, 2.09783196449, 2.12072515488, 2.12280893326, 2.11985516548, 2.09099698067, 2.09562802315, 2.14534115791, 2.12346696854, 2.09102487564, 2.12976622581, 2.15593194962, 2.09182405472, 2.11156988144, 2.06978988647, 2.09079623222, 2.08487010002, 2.08858203888, 2.06922602654, 2.09331703186, 2.07288813591, 2.08446097374, 2.08769893646, 2.09053015709, 2.09105992317, 2.07839393616, 2.09628486633, 2.09186601639, 2.07222104073, 2.06711816788, 2.08442497253, 2.0901851
tests/quickcheck.rs:126:20: 126:21 error: the type parameter `R` is not constrained by the impl trait, self type, or predicates [E0207]
tests/quickcheck.rs:126 impl<T: Arbitrary, R> Arbitrary for T where R: Default + Restriction<T> {
use std::io;
use std::io::BufRead;
fn do_the_work() -> io::Result<()> {
let stdin = io::stdin();
for line in stdin.lock().lines() {
let line = try!(line);
let splut: Result<Vec<i32>, _> = line.split(" ").map(|s| s.parse()).take(3).collect();
match splut {
#![feature(unsize, associated_consts, zero_one, core_intrinsics)]
extern crate rand;
use rand::{Rand, Rng};
use std::boxed::Box;
use std::{fmt, num, ops};
use std::marker::{PhantomData, Unsize};