Skip to content

Instantly share code, notes, and snippets.

[vagrant@localhost ~]$ pip list
abacus (1.0.28, /vagrant)
Babel (0.9.4)
backports.ssl-match-hostname (3.4.0.2)
certifi (14.05.14)
chardet (2.0.1)
distribute (0.6.10)
ethtool (0.6)
eventlet (0.15.2)
Flask (0.10.1)
[
[
"DFW",
"262",
"3",
"50,275",
"1",
"29,100",
"2,335",
"360",
PERFORMANCE_FLAVORS = {
"c": {"name": "standard", "reserved": 2048.0},
"a": {"name": "performance2", "reserved": 8192.0},
"b": {"name": "performance1", "reserved": 38912.0},
"h": {"name": "hadoop", "reserved": 4096.0},
"m": {"name": "onmetal", "reserved": 0.0}
"compute1": {"name": "compute1", "reserved": 7000.0},
"memory1": {"name": "memory1", "reserved": 38911.0}
}
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 8000 is already in use
on the host machine.
To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port:
config.vm.network :forwarded_port, guest: 80, host: 1234
nels.nelson@sol:~/src/abacus-fork[inframon-34]$ vagrant up
Bringing machine 'abacus' up with 'virtualbox' provider...
Bringing machine 'abacus_build' up with 'virtualbox' provider...
[abacus] Importing base box 'centos-6.5-64-vagrant'...
[abacus] Matching MAC address for NAT networking...
[abacus] Clearing any previously set forwarded ports...
[abacus] Creating shared folders metadata...
[abacus] Clearing any previously set network interfaces...
[abacus] Preparing network interfaces based on configuration...
[abacus] Forwarding ports...
@nelsnelson
nelsnelson / brainfuck url
Created March 11, 2015 19:37
brainfuck url
+ url = ("http://%s:%s/render/?target=alias(transformNull(asPercent(diff"
+ "Series(sumSeries(derivative(servers.production.f5-networks."
+ "icontrol.load-balancer-1.public-api-ssl-v4.http_total_requests),"
+ "derivative(servers.production.f5-networks.icontrol.load-balancer-2."
+ "public-api-ssl-v4.http_total_requests)),sumSeries(derivative"
$ virtualenv .venv
New python executable in .venv/bin/python
Installing setuptools, pip...done.
(.venv)$ source .venv/bin/activate
(.venv)$ pip install --upgrade --requirement requirements.txt
Obtaining galaxy-api-master from [email protected]:Galaxy/python-galaxy_api.git@eb65e4a5c6fe55200de9857e2d148eaaf6d18462#egg=galaxy_api-master (from -r requirements.txt (line 1))
Cloning [email protected]:Galaxy/python-galaxy_api.git (to eb65e4a5c6fe55200de9857e2d148eaaf6d18462) to ./.venv/src/galaxy-api-master
Could not find a tag or branch 'eb65e4a5c6fe55200de9857e2d148eaaf6d18462', assuming commit.
Running setup.py (path:/home/nels.nelson/src/hubble/.venv/src/galaxy-api-master/setup.py) egg_info for package galaxy-api-master
Successfully installed galaxy-api-master cli-tools numpy PyYAML requests six stevedore simplejson pymongo argparse setuptools pbr pip
Cleaning up...
(.venv)nels.nelson@durga:~/src/hubble$ python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to hubble.egg-info/requires.txt
writing hubble.egg-info/PKG-INFO
writing top-level names to hubble.egg-info/top_level.txt
writing dependency_links to hubble.egg-info/dependency_links.txt
$ cat compute/capacity/galaxy.yaml
galaxy:
name: 'agent-galaxy'
product: 'compute'
feature: 'capacity'
location:
region: 'iad'
cell: 'iad1'
galaxy:
url: 'http://galaxy.ohthree.com'
@nelsnelson
nelsnelson / demand_not_none_keyword_args.py
Last active August 29, 2015 14:23
What is the best way to verify that a specific set of named keyword argument parameters of a method are not None, and be able to refer to those parameters, by name, in a log message reporting the missing parameters, but not causing the method to explicitly fail?
def _possibly_deprecated_someday(
required_a,
required_b,
named_only_for_readability_a=None,
named_only_for_readability_b=None,
named_only_for_readability_c=None,
named_only_for_readability_d=None):
"""Does some complicated stuff."""
required_keywords = [