Skip to content

Instantly share code, notes, and snippets.

View dlovell's full-sized avatar

Dan Lovell dlovell

  • New York, NY
View GitHub Profile
@dlovell
dlovell / vmware_packer_config.json
Last active December 23, 2015 01:59
vmware packer config json file that works for ubuntu-13.04
{
"builders": [{
"type": "vmware",
"iso_url": "http://releases.ubuntu.com/13.04/ubuntu-13.04-server-amd64.iso",
"iso_checksum": "7d335ca541fc4945b674459cde7bffb9",
"iso_checksum_type": "md5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"shutdown_command": "echo vagrant | sudo -S shutdown -P now",
"disk_size": 8000,
@dlovell
dlovell / ubuntu-12.04.2-server-preseed.cfg
Created September 15, 2013 22:36
ubuntu-12.04.2-server-preseed.cfg
# cribbed from https://gist.github.com/Josiah/6005339
# with modifications from https://help.ubuntu.com/12.04/installation-guide/example-preseed.txt
# time
d-i clock-setup/utc boolean true
d-i time/zone string GMT
# language
d-i pkgsel/install-language-support boolean false
@dlovell
dlovell / middleman_heroku_app.sh
Last active December 26, 2015 04:09
test of basic middleman heroku app with ruby 1.9.3
# create an app
heroku auth:whoami
app_name=$(perl -ne 'print $1 if m/^Creating ([\w\-]+)\.\.\./' <(heroku create))
echo "created app_name=$app_name"
echo "destroy with"
echo "heroku destroy --app $app_name --confirm $app_name"
#
heroku config:set --app $app_name BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git
# per https://devcenter.heroku.com/articles/ruby-versions#migration
heroku config:set --app $app_name PATH=bin:vendor/bundle/ruby/1.9.1/bin:/usr/local/bin:/usr/bin:/bin
@dlovell
dlovell / err
Last active December 26, 2015 10:19
Valgrind with python issue
==30598== Memcheck, a memory error detector
==30598== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==30598== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==30598== Command: python -E -tt -c print\ "hello\ world"
==30598==
==30598== Use of uninitialised value of size 8
==30598== at 0x579750: PyObject_Free (in /usr/bin/python2.7)
==30598== by 0x4589F6: code_dealloc.9725 (in /usr/bin/python2.7)
==30598== by 0x52E7BF: load_source_module.39052 (in /usr/bin/python2.7)
==30598== by 0x52F19A: import_submodule.39106 (in /usr/bin/python2.7)
@dlovell
dlovell / 1360023db0e1f639_out
Last active December 31, 2015 04:09
LocalEngine 'memory leak' @ 1360023db0e1f63936941cf6917f365e657ad8c9 With crosscat repo at /opt/crosscat and mem_usage.py, script.sh, test_local_engine.py all in the current working directory, run 'bash script.sh' to generate the out and err files.
creating local engine
done initialize
done analyze
done del; gc.collect()
creating local engine 0.00390625
done initialize 8.71875
done analyze 376.7734375
done del; gc.collect() 0.0
@dlovell
dlovell / ari.png
Last active December 31, 2015 08:39
UPDATE: Uses commit 7a454761519ac721f39ab52a2602b2bcfd4a0e65 of SHOW_DIAGNOSTICS branch (take a dict of summary functions) UPDATE: Uses commit cd0aee975a5178eecfe0299b817269a7aa17fd22 of SHOW_DIAGNOSTICS branch (add reprocess_summary_func argument to engine.analyze) Demonstrate passing a summary function to engines. Uses commit 1a17f7891fe2dfa42…
ari.png
@dlovell
dlovell / open_master_port_via_starcluster.py
Created December 21, 2013 15:56
script to authorize a port from within 'starcluster shell' Cribbed from [ipcluster._authorize_port](https://github.com/jtriley/StarCluster/blob/develop/starcluster/plugins/ipcluster.py#L263)
# settings
port = 9999
service_name = 'my_service'
cluster_name = 'my_cluster'
protocol = 'tcp'
world_cidr = '0.0.0.0/0'
master = cm.get_cluster(cluster_name).master_node
group = master.cluster_groups[0]
@dlovell
dlovell / config.xml
Last active January 3, 2016 01:39
example jenkins confix.xml for crosscat
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="[email protected]">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
import argparse
#
from experiment_runner.general_utils import Timer
from experiment_runner.ExperimentRunner import ExperimentRunner
import experiment_runner.ExperimentRunner
parser = argparse.ArgumentParser()
parser.add_argument('--dirname', default='geweke_on_schemas', type=str)
parser.add_argument('--dirname_prefix', default=None, type=str)
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1