Skip to content

Instantly share code, notes, and snippets.

Dave Evans evansde77

  • Aurora, IL
Block or report user

Report or block evansde77

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
evansde77 /
Last active Dec 5, 2016
Python Environment Setup on MacOSX
# assumes that XCode and XCode command line tools have been installed
# xcode-select --install
# assumes that gfortran has been installed
# install pyenv & set 2.7.11 as current
# See:
# See:
curl -L | bash
evansde77 /
Created Jun 8, 2016
Steps to install libjpeg and pillow on Max OSX 10.11.15 (assumes XCode, XCode command line tools etc)
sudo chmod -R a+rw /usr/local/src
mkdir /usr/local/src
chmod a+rw -R /usr/local/src
curl --remote-name
tar -xzvf jpegsrc.v9b.tar.gz
cd jpeg-9b
./configure --enable-shared --enable-static
sudo make install
sudo ranlib /usr/local/lib/libjpeg.a
evansde77 /
Last active Jun 1, 2016
Playing around with an ascii histogram example
#!/usr/bin/env python
Example wordcount and ascii histogram script
- Writes a data file in a temporary dir
- defines function to parse file into a word iterable
- Histogram class that does the word count and draws it as
ascii strings with various sorting options
Example usage:
evansde77 /
Last active May 26, 2016
Util to convert filenames to python module names as a command line tool
#!/usr/bin/env python
Simple util to convert a python filename like
some_package/some_module/ to some_package.some_module.some_file
style module name.
import argparse
View API endpoint docstring
def post(self):
Create a new user document in the users and cluster users database.
:json string username: required, the requested username
:json string password: required, the requested password
:json string email: required, and email address to be associated
with the account
:json string first_name: required, the user's first name
:json string last_name: required, the user's last name
:json string company: optional, the user's company
evansde77 /
Created Feb 12, 2016
Example of wrapping a nested JSON config object in a simple python object that allows dynamic object.attr style access to the data elements
#!/usr/bin/env python
example of using a simple python object to wrap a JSON
configuration mapping so that it can be accessed as
a python style object using conf.attr1.attr2.value
CONF = {
View provision.log
==> derp: Loading Berkshelf datafile...
==> derp: Sharing cookbooks with VM
==> derp: Updating Vagrant's Berkshelf...
==> derp: Resolving cookbook dependencies...
==> derp: Fetching 'derp' from source at .
==> derp: Fetching 'docker' from source at docker
==> derp: Using apt (2.9.2)
==> derp: Using build-essential (2.2.4)
==> derp: Using chef-sugar (3.3.0)
==> derp: Using compat_resource (12.5.26)
evansde77 / Vagrantfile
Last active Jan 29, 2016
Details for reproducing error in docker cookbook dependency under Vagrant/Chef-solo
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.require_version '>= 1.5.0'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
class MyTest(unittest.TestCase):
harness, setUp, tearDown = make_database_test_harness(**args)
def test_a_thing(self):
print self.harness
function carb_logs(){
knife ssh -x evansde77 role:load_balancer_${CLUSTER} "tail -f /opt/sapi/logs/carburetor_package.log" -a ip.public
You can’t perform that action at this time.