8be8a8a2403d10fde3e6e44344cbf021bcef1fa9,pliers/stimuli/api.py,TweetStimFactory,validate_keys,#TweetStimFactory#,55
Before Change
def validate_keys(self):
verify_dependencies(["twitter"])
try:
self.api.VerifyCredentials()
return True
except twitter.error.TwitterError:
return False
def get_status(self, status_id):
if self.validate_keys():
status = self.api.GetStatus(status_id)
return TweetStim(status)
After Change
self.access_token_secret]
def validate_keys(self):
if all(k in self.validated_keys for k in self.api_keys):
return True
else:
valid = self.check_valid_keys()
if valid:
for k in self.api_keys:
self.validate_keys.add(k)
return valid
def check_valid_keys(self):
verify_dependencies(["twitter"])
try:
self.api.VerifyCredentials()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: tyarkoni/pliers
Commit Name: 8be8a8a2403d10fde3e6e44344cbf021bcef1fa9
Time: 2018-03-05
Author: quinten.mcnamara@gmail.com
File Name: pliers/stimuli/api.py
Class Name: TweetStimFactory
Method Name: validate_keys
Project Name: mathics/Mathics
Commit Name: deed936ca0bfa5998af0225fab99c47bd2bc4b6d
Time: 2020-09-06
Author: pablo-escobar@riseup.net
File Name: mathics/builtin/linalg.py
Class Name: Eigenvalues
Method Name: apply
Project Name: DistrictDataLabs/yellowbrick
Commit Name: ca14cf72e3e4bd3a6136cafad8701ac41f48f09b
Time: 2018-08-25
Author: davidwaterman@gmail.com
File Name: yellowbrick/cluster/elbow.py
Class Name: KElbowVisualizer
Method Name: __init__