Connect to DataPoint with the given API key profile name.
173786
def connection(profile_name='default', api_key=None):
    """"""
    if api_key is None:
        profile_fname = datapoint.profile.API_profile_fname(profile_name)
        if not os.path.exists(profile_fname):
            raise ValueError('Profile not found in {}. Please install your API \n'
                             'key with datapoint.profile.install_API_key('
                             '"<YOUR-KEY>")'.format(profile_fname))
        with open(profile_fname) as fh:
            api_key = fh.readlines()
    return Manager(api_key=api_key)
744014
def network_profiles(self, obj):
        """"""

        profile_name_list = self.network_profile_name_list(obj)

        profile_list = []
        for profile_name in profile_name_list:
            profile = Profile()
            flags = DWORD()
            access = DWORD()
            xml = LPWSTR()
            self._wlan_get_profile(self._handle, obj['guid'],
                                   profile_name, byref(xml), byref(flags),
                                   byref(access))
            # fill profile info
            profile.ssid = re.search(r'<name>(.*)</name>', xml.value).group(1)
            auth = re.search(r'<authentication>(.*)</authentication>',
                                 xml.value).group(1).upper()

            profile.akm = []
            if auth not in akm_str_to_value_dict:
                if auth not in auth_str_to_value_dict:
                    profile.auth = AUTH_ALG_OPEN
                else:
                    profile.auth = auth_str_to_value_dict[auth]
                    profile.akm.append(AKM_TYPE_NONE)
            else:
                    profile.auth = AUTH_ALG_OPEN
                    profile.akm.append(akm_str_to_value_dict[auth])

            profile_list.append(profile)

        return profile_list
178217
def authenticate_key(api_key):
    
    user_model = Query()
    user = db.search(user_model.api_key == api_key)[0]
    if user:
        return user['username']
    return False
8973
public static PredictionEndpoint authenticate(RestClient restClient, final String apiKey) {
        return new PredictionEndpointImpl(restClient).withApiKey(apiKey);
    }
254205
def push_to_server(self, data):
        """"""
        output = add_profile(self.customer.pk, data, data)
        output['response'].raise_if_error()
        self.profile_id = output['profile_id']
        self.payment_profile_ids = output['payment_profile_ids']
393577
function(req, res, next) {
    var accessToken = req.accessToken;
    var profileUrl = 'https://apis.live.net/v5.0/me?access_token=' + accessToken;
    request.get({ url: profileUrl, json: true }, function(err, response, profile) {
      if (err) {
        res.status(500).send(err);
        return;
      }
      req.profile = profile;
      next();
    });
  }
597149
public static appfwprofile get(nitro_service service, String name) throws Exception{
		appfwprofile obj = new appfwprofile();
		obj.set_name(name);
		appfwprofile response = (appfwprofile) obj.get_resource(service);
		return response;
	}
1208059
def connect(self, obj, params):
        """"""

        connect_params = WLAN_CONNECTION_PARAMETERS()
        connect_params.wlanConnectionMode = 0  # Profile
        connect_params.dot11BssType = 1  # infra
        profile_name = create_unicode_buffer(params.ssid)

        connect_params.strProfile = profile_name.value
        ret = self._wlan_connect(
            self._handle, obj['guid'], byref(connect_params))
        self._logger.debug('connect result: %d', ret)
781132
def load_profile(self, profile_name):
        """"""
        data = self.storage.get_user_profiles(profile_name)

        for x in data.get_user_views():
            self._graph.add_edge(int(x[0]), int(x[1]), {'weight': float(x[2])})
            self.all_records[int(x[1])] += 1

        return self._graph
850992
public Iterable<DConnection> queryByProfileUrl(java.lang.String profileUrl) {
    return queryByField(null, DConnectionMapper.Field.PROFILEURL.getFieldName(), profileUrl);
  }
12389
def get_profile_data(self, raw_token):
        """"""
        token_data = json.loads(raw_token)
        # This header is the 'magic' that makes this empty GET request work.
        headers = {'Authorization': 'OAuth %s' % token_data['access_token']}

        try:
            response = self.request('get', self.profile_url, headers=headers)
            response.raise_for_status()
        except RequestException as e:
            logger.error('Unable to fetch user profile: {0}'.format(e))
            return None
        else:
            return response.json() or response.text
329893
def _make_contact_point(dataset):
    """"""
    keys = [k for k in ["contactPoint_fn", "contactPoint_hasEmail"]
            if k in dataset]
    if keys:
        dataset["contactPoint"] = {
            key.replace("contactPoint_", ""): dataset.pop(key) for key in keys
        }
    return dataset
271594
async def connect(
            cls, url, *, apikey=None, insecure=False):
        
        profile, session = await bones.SessionAPI.connect(
            url=url, apikey=apikey, insecure=insecure)
        return profile, cls(session)
878004
def _get_connection(self):
        """"""
        kwargs = {
            'username': self.account,
            'api_key': self.secret_key,
        }

        # Only add kwarg for servicenet if True because user could set
        # environment variable 'RACKSPACE_SERVICENET' separately.
        if self.servicenet:
            kwargs['servicenet'] = True

        if self.authurl:
            kwargs['authurl'] = self.authurl

        return cloudfiles.get_connection(**kwargs)
704729
public ApiResponse getStreamingProfile(String name, Map options) throws Exception {
        if (options == null)
            options = ObjectUtils.emptyMap();
        List<String> uri = Arrays.asList("streaming_profiles", name);

        return callApi(HttpMethod.GET, uri, ObjectUtils.emptyMap(), options);

    }
230334
def _get_results_from_api(identifiers, endpoints, api_key, api_secret):
    """"""

    if api_key is not None and api_secret is not None:
        client = housecanary.ApiClient(api_key, api_secret)
    else:
        client = housecanary.ApiClient()

    wrapper = getattr(client, endpoints[0].split('/')[0])

    if len(endpoints) > 1:
        # use component_mget to request multiple endpoints in one call
        return wrapper.component_mget(identifiers, endpoints)
    else:
        return wrapper.fetch_identifier_component(endpoints[0], identifiers)
166004
def api_keys(self, serverid, api_key):
        
        if serverid and api_key:
            self.can_query = True # Yes, we _are_ (will be) configured
        self.serverid = int(serverid)
        self.api_key = api_key
        self.webhook_url = self.__base_url + str(self.serverid) + '/' + self.api_key