def is_vouched_mozillian(self):

        MOZILLIANS_API_BASE_URL = constance.config.MOZILLIANS_API_BASE_URL
        MOZILLIANS_API_APPNAME = constance.config.MOZILLIANS_API_APPNAME
        MOZILLIANS_API_KEY = constance.config.MOZILLIANS_API_KEY
        MOZILLIANS_API_CACHE_KEY_PREFIX = constance.config.MOZILLIANS_API_CACHE_KEY_PREFIX
        MOZILLIANS_API_CACHE_TIMEOUT = constance.config.MOZILLIANS_API_CACHE_TIMEOUT

        if not MOZILLIANS_API_KEY:
            logging.warning("'MOZILLIANS_API_KEY' not set up.")
            return False

        email = self.user.email
        # /api/v1/users/?app_name=foobar&app_key=12345&email=test@example.com
        url = '%s/users/?%s' % (MOZILLIANS_API_BASE_URL, urllib.urlencode({
            'app_name': MOZILLIANS_API_APPNAME,
            'app_key': MOZILLIANS_API_KEY,
            'email': email
        }))

        # Cache the HTTP request to the API to minimize hits
        cache_key = '%s:%s' % (MOZILLIANS_API_CACHE_KEY_PREFIX,
                               hashlib.md5(url.encode('utf-8')).hexdigest())
        content = cache.get(cache_key)
        if not content:
            resp = requests.get(url)
            if not resp.status_code == 200:
                logging.error("Failed request to mozillians.org API: %s" %
                              resp.status_code)
                return False
            else:
                content = resp.content
                cache.set(cache_key, content, MOZILLIANS_API_CACHE_TIMEOUT)

        try:
            content = json.loads(content)
        except ValueError:
            logging.error("Failed parsing mozillians.org response")
            return False

        for obj in content.get('objects', []):
            if obj['email'].lower() == email.lower():
                return obj['is_vouched']

        return False
Create a new static IP address.p
dataset/ETHPy150Open lmorchard/badg.us/badgus/profiles/models.py/UserProfile.is_vouched_mozillian--crossover with--dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/cloudsigma.py/CloudSigma_1_0_NodeDriver.ex_static_ip_create