repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
5
179
func_name
stringlengths
1
109
whole_func_string
stringlengths
100
30.9k
language
stringclasses
1 value
func_code_string
stringlengths
100
30.9k
func_code_tokens
listlengths
20
3.12k
func_documentation_string
stringlengths
1
29.9k
func_documentation_tokens
listlengths
1
893
split_name
stringclasses
1 value
func_code_url
stringlengths
91
272
formatted_prompt
stringlengths
344
61k
input_ids
listlengths
512
512
attention_mask
listlengths
512
512
labels
listlengths
512
512
signaturit/python-sdk
signaturit_sdk/signaturit_client.py
SignaturitClient.remove_user
def remove_user(self, user_id): """ Remove a user from your team :param user_id: Id of user """ url = self.TEAM_USERS_ID_URL % user_id connection = Connection(self.token) connection.set_url(self.production, url) return connection.delete_request()
python
def remove_user(self, user_id): """ Remove a user from your team :param user_id: Id of user """ url = self.TEAM_USERS_ID_URL % user_id connection = Connection(self.token) connection.set_url(self.production, url) return connection.delete_request()
[ "def", "remove_user", "(", "self", ",", "user_id", ")", ":", "url", "=", "self", ".", "TEAM_USERS_ID_URL", "%", "user_id", "connection", "=", "Connection", "(", "self", ".", "token", ")", "connection", ".", "set_url", "(", "self", ".", "production", ",", ...
Remove a user from your team :param user_id: Id of user
[ "Remove", "a", "user", "from", "your", "team", ":", "param", "user_id", ":", "Id", "of", "user" ]
train
https://github.com/signaturit/python-sdk/blob/2419c6d9675d901244f807ae360dc58aa46109a9/signaturit_sdk/signaturit_client.py#L546-L557
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Remove a user from your team :param user_id: Id of user ### Response: def remove_user(self, user_id): """ ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
jilljenn/tryalgo
tryalgo/laser_mirrors.py
solve
def solve(succ, orien, i, direc): """Can a laser leaving mirror i in direction direc reach exit ? :param i: mirror index :param direc: direction leaving mirror i :param orient: orient[i]=orientation of mirror i :param succ: succ[i][direc]=succ mirror reached when leaving i in direc...
python
def solve(succ, orien, i, direc): """Can a laser leaving mirror i in direction direc reach exit ? :param i: mirror index :param direc: direction leaving mirror i :param orient: orient[i]=orientation of mirror i :param succ: succ[i][direc]=succ mirror reached when leaving i in direc...
[ "def", "solve", "(", "succ", ",", "orien", ",", "i", ",", "direc", ")", ":", "assert", "orien", "[", "i", "]", "is", "not", "None", "j", "=", "succ", "[", "i", "]", "[", "direc", "]", "if", "j", "is", "None", ":", "# basic case", "return", "Fal...
Can a laser leaving mirror i in direction direc reach exit ? :param i: mirror index :param direc: direction leaving mirror i :param orient: orient[i]=orientation of mirror i :param succ: succ[i][direc]=succ mirror reached when leaving i in direction direc
[ "Can", "a", "laser", "leaving", "mirror", "i", "in", "direction", "direc", "reach", "exit", "?" ]
train
https://github.com/jilljenn/tryalgo/blob/89a4dd9655e7b6b0a176f72b4c60d0196420dfe1/tryalgo/laser_mirrors.py#L57-L80
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Can a laser leaving mirror i in direction direc reach exit ? :param i: mirror index :param direc: direction leaving mi...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6854, ...
fprimex/zdesk
zdesk/zdesk_api.py
ZendeskAPI.community_post_create
def community_post_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/help_center/posts#create-post" api_path = "/api/v2/community/posts.json" return self.call(api_path, method="POST", data=data, **kwargs)
python
def community_post_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/help_center/posts#create-post" api_path = "/api/v2/community/posts.json" return self.call(api_path, method="POST", data=data, **kwargs)
[ "def", "community_post_create", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "api_path", "=", "\"/api/v2/community/posts.json\"", "return", "self", ".", "call", "(", "api_path", ",", "method", "=", "\"POST\"", ",", "data", "=", "data", ",", ...
https://developer.zendesk.com/rest_api/docs/help_center/posts#create-post
[ "https", ":", "//", "developer", ".", "zendesk", ".", "com", "/", "rest_api", "/", "docs", "/", "help_center", "/", "posts#create", "-", "post" ]
train
https://github.com/fprimex/zdesk/blob/851611c13b4d530e9df31390b3ec709baf0a0188/zdesk/zdesk_api.py#L822-L825
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: https://developer.zendesk.com/rest_api/docs/help_center/posts#create-post ### Response: def community_post_create(self, data, ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2485, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2485, ...
Sanji-IO/sanji
sanji/message.py
Message.to_dict
def to_dict(self): """ to_dict will clean all protected and private properties """ return dict( (k, self.__dict__[k]) for k in self.__dict__ if k.find("_") != 0)
python
def to_dict(self): """ to_dict will clean all protected and private properties """ return dict( (k, self.__dict__[k]) for k in self.__dict__ if k.find("_") != 0)
[ "def", "to_dict", "(", "self", ")", ":", "return", "dict", "(", "(", "k", ",", "self", ".", "__dict__", "[", "k", "]", ")", "for", "k", "in", "self", ".", "__dict__", "if", "k", ".", "find", "(", "\"_\"", ")", "!=", "0", ")" ]
to_dict will clean all protected and private properties
[ "to_dict", "will", "clean", "all", "protected", "and", "private", "properties" ]
train
https://github.com/Sanji-IO/sanji/blob/5c54cc2772bdfeae3337f785de1957237b828b34/sanji/message.py#L160-L165
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: to_dict will clean all protected and private properties ### Response: def to_dict(self): """ to_dict will clea...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 998, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 998, 5...
non-Jedi/gyr
gyr/matrix_objects.py
Event.user
def user(self): """Creates a User object when requested.""" try: return self._user except AttributeError: self._user = MatrixUser(self.mxid, self.Api(identity=self.mxid)) return self._user
python
def user(self): """Creates a User object when requested.""" try: return self._user except AttributeError: self._user = MatrixUser(self.mxid, self.Api(identity=self.mxid)) return self._user
[ "def", "user", "(", "self", ")", ":", "try", ":", "return", "self", ".", "_user", "except", "AttributeError", ":", "self", ".", "_user", "=", "MatrixUser", "(", "self", ".", "mxid", ",", "self", ".", "Api", "(", "identity", "=", "self", ".", "mxid", ...
Creates a User object when requested.
[ "Creates", "a", "User", "object", "when", "requested", "." ]
train
https://github.com/non-Jedi/gyr/blob/9f7bfe033b9d3bbfd3a9e8aea02e35526b53125e/gyr/matrix_objects.py#L49-L55
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Creates a User object when requested. ### Response: def user(self): """Creates a User object when requested.""" ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
ApproxEng/approxeng.input
src/python/approxeng/input/__init__.py
TriggerAxis._input_to_raw_value
def _input_to_raw_value(self, value: int) -> float: """ Convert the value read from evdev to a 0.0 to 1.0 range. :internal: :param value: a value ranging from the defined minimum to the defined maximum value. :return: 0.0 at minimum, 1.0 at maximum, line...
python
def _input_to_raw_value(self, value: int) -> float: """ Convert the value read from evdev to a 0.0 to 1.0 range. :internal: :param value: a value ranging from the defined minimum to the defined maximum value. :return: 0.0 at minimum, 1.0 at maximum, line...
[ "def", "_input_to_raw_value", "(", "self", ",", "value", ":", "int", ")", "->", "float", ":", "return", "(", "float", "(", "value", ")", "-", "self", ".", "min_raw_value", ")", "/", "self", ".", "max_raw_value" ]
Convert the value read from evdev to a 0.0 to 1.0 range. :internal: :param value: a value ranging from the defined minimum to the defined maximum value. :return: 0.0 at minimum, 1.0 at maximum, linearly interpolating between those two points.
[ "Convert", "the", "value", "read", "from", "evdev", "to", "a", "0", ".", "0", "to", "1", ".", "0", "range", "." ]
train
https://github.com/ApproxEng/approxeng.input/blob/0cdf8eed6bfd26ca3b20b4478f352787f60ae8ef/src/python/approxeng/input/__init__.py#L513-L524
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Convert the value read from evdev to a 0.0 to 1.0 range. :internal: :param value: a value ranging...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
ga4gh/ga4gh-server
ga4gh/server/datarepo.py
AbstractDataRepository.getOntologyByName
def getOntologyByName(self, name): """ Returns an ontology by name """ if name not in self._ontologyNameMap: raise exceptions.OntologyNameNotFoundException(name) return self._ontologyNameMap[name]
python
def getOntologyByName(self, name): """ Returns an ontology by name """ if name not in self._ontologyNameMap: raise exceptions.OntologyNameNotFoundException(name) return self._ontologyNameMap[name]
[ "def", "getOntologyByName", "(", "self", ",", "name", ")", ":", "if", "name", "not", "in", "self", ".", "_ontologyNameMap", ":", "raise", "exceptions", ".", "OntologyNameNotFoundException", "(", "name", ")", "return", "self", ".", "_ontologyNameMap", "[", "nam...
Returns an ontology by name
[ "Returns", "an", "ontology", "by", "name" ]
train
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L162-L168
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Returns an ontology by name ### Response: def getOntologyByName(self, name): """ Returns an ontology by name ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
AgeOfLearning/coeus-unity-python-framework
coeus_unity/commands.py
await_any_transforms_exist
def await_any_transforms_exist(cli, transform_paths, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS): """ Waits for a transform to exist based on does_exist. :param cli: :param transform_paths: An array of transform paths [...] :param does_exist: Whether or not to await...
python
def await_any_transforms_exist(cli, transform_paths, does_exist=DEFAULT_TRANSFORM_EXISTS, timeout_seconds=DEFAULT_TIMEOUT_SECONDS): """ Waits for a transform to exist based on does_exist. :param cli: :param transform_paths: An array of transform paths [...] :param does_exist: Whether or not to await...
[ "def", "await_any_transforms_exist", "(", "cli", ",", "transform_paths", ",", "does_exist", "=", "DEFAULT_TRANSFORM_EXISTS", ",", "timeout_seconds", "=", "DEFAULT_TIMEOUT_SECONDS", ")", ":", "message_payload", "=", "{", "\"transform_paths\"", ":", "transform_paths", ",", ...
Waits for a transform to exist based on does_exist. :param cli: :param transform_paths: An array of transform paths [...] :param does_exist: Whether or not to await for exist state (True | False) :param timeout_seconds: How long until this returns with failure :return: bool
[ "Waits", "for", "a", "transform", "to", "exist", "based", "on", "does_exist", ".", ":", "param", "cli", ":", ":", "param", "transform_paths", ":", "An", "array", "of", "transform", "paths", "[", "...", "]", ":", "param", "does_exist", ":", "Whether", "or...
train
https://github.com/AgeOfLearning/coeus-unity-python-framework/blob/cf8ca6800ace1425d917ea2628dbd05ed959fdd7/coeus_unity/commands.py#L52-L72
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Waits for a transform to exist based on does_exist. :param cli: :param transform_paths: An array of transform paths [.....
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 54, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 54, 57...
buildbot/buildbot
master/buildbot/plugins/db.py
_PluginDB.add_namespace
def add_namespace(self, namespace, interface=None, check_extras=True, load_now=False): """ register given namespace in global database of plugins in case it's already registered, return the registration """ tempo = self._namespaces.get(namespace) i...
python
def add_namespace(self, namespace, interface=None, check_extras=True, load_now=False): """ register given namespace in global database of plugins in case it's already registered, return the registration """ tempo = self._namespaces.get(namespace) i...
[ "def", "add_namespace", "(", "self", ",", "namespace", ",", "interface", "=", "None", ",", "check_extras", "=", "True", ",", "load_now", "=", "False", ")", ":", "tempo", "=", "self", ".", "_namespaces", ".", "get", "(", "namespace", ")", "if", "tempo", ...
register given namespace in global database of plugins in case it's already registered, return the registration
[ "register", "given", "namespace", "in", "global", "database", "of", "plugins" ]
train
https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/plugins/db.py#L287-L303
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: register given namespace in global database of plugins in case it's already registered, return the registration ### R...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6477, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6477, ...
KelSolaar/Umbra
umbra/ui/visual_accelerators.py
highlight_current_line
def highlight_current_line(editor): """ Highlights given editor current line. :param editor: Document editor. :type editor: QWidget :return: Method success. :rtype: bool """ format = editor.language.theme.get("accelerator.line") if not format: return False extra_select...
python
def highlight_current_line(editor): """ Highlights given editor current line. :param editor: Document editor. :type editor: QWidget :return: Method success. :rtype: bool """ format = editor.language.theme.get("accelerator.line") if not format: return False extra_select...
[ "def", "highlight_current_line", "(", "editor", ")", ":", "format", "=", "editor", ".", "language", ".", "theme", ".", "get", "(", "\"accelerator.line\"", ")", "if", "not", "format", ":", "return", "False", "extra_selections", "=", "editor", ".", "extraSelecti...
Highlights given editor current line. :param editor: Document editor. :type editor: QWidget :return: Method success. :rtype: bool
[ "Highlights", "given", "editor", "current", "line", "." ]
train
https://github.com/KelSolaar/Umbra/blob/66f45f08d9d723787f1191989f8b0dda84b412ce/umbra/ui/visual_accelerators.py#L42-L65
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Highlights given editor current line. :param editor: Document editor. :type editor: QWidget :return: Method succes...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 97406, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 97406, ...
bwohlberg/sporco
sporco/cnvrep.py
Pcn
def Pcn(x, dsz, Nv, dimN=2, dimC=1, crp=False, zm=False): """Constraint set projection for convolutional dictionary update problem. Parameters ---------- x : array_like Input array dsz : tuple Filter support size(s), specified using the same format as the `dsz` parameter of :...
python
def Pcn(x, dsz, Nv, dimN=2, dimC=1, crp=False, zm=False): """Constraint set projection for convolutional dictionary update problem. Parameters ---------- x : array_like Input array dsz : tuple Filter support size(s), specified using the same format as the `dsz` parameter of :...
[ "def", "Pcn", "(", "x", ",", "dsz", ",", "Nv", ",", "dimN", "=", "2", ",", "dimC", "=", "1", ",", "crp", "=", "False", ",", "zm", "=", "False", ")", ":", "if", "crp", ":", "def", "zpadfn", "(", "x", ")", ":", "return", "x", "else", ":", "...
Constraint set projection for convolutional dictionary update problem. Parameters ---------- x : array_like Input array dsz : tuple Filter support size(s), specified using the same format as the `dsz` parameter of :func:`bcrop` Nv : tuple Sizes of problem spatial indice...
[ "Constraint", "set", "projection", "for", "convolutional", "dictionary", "update", "problem", "." ]
train
https://github.com/bwohlberg/sporco/blob/8946a04331106f4e39904fbdf2dc7351900baa04/sporco/cnvrep.py#L842-L886
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Constraint set projection for convolutional dictionary update problem. Parameters ---------- x : array_like ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 18372, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 18372, ...
AmesCornish/buttersink
buttersink/Store.py
Volume.writeInfo
def writeInfo(self, stream): """ Write information about diffs into a file stream for use later. """ for (fromUUID, size) in Diff.theKnownSizes[self.uuid].iteritems(): self.writeInfoLine(stream, fromUUID, size)
python
def writeInfo(self, stream): """ Write information about diffs into a file stream for use later. """ for (fromUUID, size) in Diff.theKnownSizes[self.uuid].iteritems(): self.writeInfoLine(stream, fromUUID, size)
[ "def", "writeInfo", "(", "self", ",", "stream", ")", ":", "for", "(", "fromUUID", ",", "size", ")", "in", "Diff", ".", "theKnownSizes", "[", "self", ".", "uuid", "]", ".", "iteritems", "(", ")", ":", "self", ".", "writeInfoLine", "(", "stream", ",", ...
Write information about diffs into a file stream for use later.
[ "Write", "information", "about", "diffs", "into", "a", "file", "stream", "for", "use", "later", "." ]
train
https://github.com/AmesCornish/buttersink/blob/5cc37e30d9f8071fcf3497dca8b8a91b910321ea/buttersink/Store.py#L438-L441
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Write information about diffs into a file stream for use later. ### Response: def writeInfo(self, stream): """ Write i...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8144, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8144, ...
uranusjr/django-gunicorn
djgunicorn/config.py
post_worker_init
def post_worker_init(worker): """Hook into Gunicorn to display message after launching. This mimics the behaviour of Django's stock runserver command. """ quit_command = 'CTRL-BREAK' if sys.platform == 'win32' else 'CONTROL-C' sys.stdout.write( "Django version {djangover}, Gunicorn version ...
python
def post_worker_init(worker): """Hook into Gunicorn to display message after launching. This mimics the behaviour of Django's stock runserver command. """ quit_command = 'CTRL-BREAK' if sys.platform == 'win32' else 'CONTROL-C' sys.stdout.write( "Django version {djangover}, Gunicorn version ...
[ "def", "post_worker_init", "(", "worker", ")", ":", "quit_command", "=", "'CTRL-BREAK'", "if", "sys", ".", "platform", "==", "'win32'", "else", "'CONTROL-C'", "sys", ".", "stdout", ".", "write", "(", "\"Django version {djangover}, Gunicorn version {gunicornver}, \"", ...
Hook into Gunicorn to display message after launching. This mimics the behaviour of Django's stock runserver command.
[ "Hook", "into", "Gunicorn", "to", "display", "message", "after", "launching", "." ]
train
https://github.com/uranusjr/django-gunicorn/blob/4fb16f48048ff5fff8f889a007f376236646497b/djgunicorn/config.py#L18-L35
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Hook into Gunicorn to display message after launching. This mimics the behaviour of Django's stock runserver command. ###...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 32779, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 32779, ...
xenon-middleware/pyxenon
xenon/server.py
find_free_port
def find_free_port(): """Finds a free port.""" with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock: sock.bind(('', 0)) return sock.getsockname()[1]
python
def find_free_port(): """Finds a free port.""" with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock: sock.bind(('', 0)) return sock.getsockname()[1]
[ "def", "find_free_port", "(", ")", ":", "with", "closing", "(", "socket", ".", "socket", "(", "socket", ".", "AF_INET", ",", "socket", ".", "SOCK_STREAM", ")", ")", "as", "sock", ":", "sock", ".", "bind", "(", "(", "''", ",", "0", ")", ")", "return...
Finds a free port.
[ "Finds", "a", "free", "port", "." ]
train
https://github.com/xenon-middleware/pyxenon/blob/d61109ad339ee9bb9f0723471d532727b0f235ad/xenon/server.py#L39-L43
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Finds a free port. ### Response: def find_free_port(): """Finds a free port.""" with closing(socket.socket(socket.AF_I...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 37, 88...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 37, 88...
dixudx/rtcclient
rtcclient/query.py
Query.runSavedQueryByUrl
def runSavedQueryByUrl(self, saved_query_url, returned_properties=None): """Query workitems using the saved query url :param saved_query_url: the saved query url :param returned_properties: the returned properties that you want. Refer to :class:`rtcclient.client.RTCClient` for more ...
python
def runSavedQueryByUrl(self, saved_query_url, returned_properties=None): """Query workitems using the saved query url :param saved_query_url: the saved query url :param returned_properties: the returned properties that you want. Refer to :class:`rtcclient.client.RTCClient` for more ...
[ "def", "runSavedQueryByUrl", "(", "self", ",", "saved_query_url", ",", "returned_properties", "=", "None", ")", ":", "try", ":", "if", "\"=\"", "not", "in", "saved_query_url", ":", "raise", "exception", ".", "BadValue", "(", ")", "saved_query_id", "=", "saved_...
Query workitems using the saved query url :param saved_query_url: the saved query url :param returned_properties: the returned properties that you want. Refer to :class:`rtcclient.client.RTCClient` for more explanations :return: a :class:`list` that contains the queried ...
[ "Query", "workitems", "using", "the", "saved", "query", "url" ]
train
https://github.com/dixudx/rtcclient/blob/1721dd0b047478f5bdd6359b07a2c503cfafd86f/rtcclient/query.py#L184-L206
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Query workitems using the saved query url :param saved_query_url: the saved query url :param returned_properti...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2929, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2929, ...
mgraffg/EvoDAG
EvoDAG/base.py
EvoDAG.predict
def predict(self, v=None, X=None): """In classification this returns the classes, in regression it is equivalent to the decision function""" if X is None: X = v v = None m = self.model(v=v) return m.predict(X)
python
def predict(self, v=None, X=None): """In classification this returns the classes, in regression it is equivalent to the decision function""" if X is None: X = v v = None m = self.model(v=v) return m.predict(X)
[ "def", "predict", "(", "self", ",", "v", "=", "None", ",", "X", "=", "None", ")", ":", "if", "X", "is", "None", ":", "X", "=", "v", "v", "=", "None", "m", "=", "self", ".", "model", "(", "v", "=", "v", ")", "return", "m", ".", "predict", ...
In classification this returns the classes, in regression it is equivalent to the decision function
[ "In", "classification", "this", "returns", "the", "classes", "in", "regression", "it", "is", "equivalent", "to", "the", "decision", "function" ]
train
https://github.com/mgraffg/EvoDAG/blob/e11fa1fd1ca9e69cca92696c86661a3dc7b3a1d5/EvoDAG/base.py#L598-L605
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: In classification this returns the classes, in regression it is equivalent to the decision function ### Response: def ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 644, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 644, 2...
newville/wxmplot
examples/tifffile.py
_replace_by
def _replace_by(module_function, warn=False): """Try replace decorated function by module.function.""" def decorate(func, module_function=module_function, warn=warn): sys.path.append(os.path.dirname(__file__)) try: module, function = module_function.split('.') func, oldfu...
python
def _replace_by(module_function, warn=False): """Try replace decorated function by module.function.""" def decorate(func, module_function=module_function, warn=warn): sys.path.append(os.path.dirname(__file__)) try: module, function = module_function.split('.') func, oldfu...
[ "def", "_replace_by", "(", "module_function", ",", "warn", "=", "False", ")", ":", "def", "decorate", "(", "func", ",", "module_function", "=", "module_function", ",", "warn", "=", "warn", ")", ":", "sys", ".", "path", ".", "append", "(", "os", ".", "p...
Try replace decorated function by module.function.
[ "Try", "replace", "decorated", "function", "by", "module", ".", "function", "." ]
train
https://github.com/newville/wxmplot/blob/8e0dc037453e5cdf18c968dc5a3d29efd761edee/examples/tifffile.py#L1517-L1531
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Try replace decorated function by module.function. ### Response: def _replace_by(module_function, warn=False): """Try repl...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 22170, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 22170, ...
mbedmicro/pyOCD
pyocd/utility/conversion.py
u64_to_hex16le
def u64_to_hex16le(val): """! @brief Create 16-digit hexadecimal string from 64-bit register value""" return ''.join("%02x" % (x & 0xFF) for x in ( val, val >> 8, val >> 16, val >> 24, val >> 32, val >> 40, val >> 48, val >> 56, ))
python
def u64_to_hex16le(val): """! @brief Create 16-digit hexadecimal string from 64-bit register value""" return ''.join("%02x" % (x & 0xFF) for x in ( val, val >> 8, val >> 16, val >> 24, val >> 32, val >> 40, val >> 48, val >> 56, ))
[ "def", "u64_to_hex16le", "(", "val", ")", ":", "return", "''", ".", "join", "(", "\"%02x\"", "%", "(", "x", "&", "0xFF", ")", "for", "x", "in", "(", "val", ",", "val", ">>", "8", ",", "val", ">>", "16", ",", "val", ">>", "24", ",", "val", ">>...
! @brief Create 16-digit hexadecimal string from 64-bit register value
[ "!" ]
train
https://github.com/mbedmicro/pyOCD/blob/41a174718a9739f3cbe785c2ba21cb7fd1310c6f/pyocd/utility/conversion.py#L92-L103
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: ! @brief Create 16-digit hexadecimal string from 64-bit register value ### Response: def u64_to_hex16le(val): """! @brief ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 0, 571...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 0, 571...
jsvine/spectra
spectra/grapefruit.py
Color.RgbToWebSafe
def RgbToWebSafe(r, g, b, alt=False): '''Convert the color from RGB to 'web safe' RGB Parameters: :r: The Red component value [0...1] :g: The Green component value [0...1] :b: The Blue component value [0...1] :alt: If True, use the alternative color inste...
python
def RgbToWebSafe(r, g, b, alt=False): '''Convert the color from RGB to 'web safe' RGB Parameters: :r: The Red component value [0...1] :g: The Green component value [0...1] :b: The Blue component value [0...1] :alt: If True, use the alternative color inste...
[ "def", "RgbToWebSafe", "(", "r", ",", "g", ",", "b", ",", "alt", "=", "False", ")", ":", "webSafeComponent", "=", "Color", ".", "_WebSafeComponent", "return", "tuple", "(", "(", "webSafeComponent", "(", "v", ",", "alt", ")", "for", "v", "in", "(", "r...
Convert the color from RGB to 'web safe' RGB Parameters: :r: The Red component value [0...1] :g: The Green component value [0...1] :b: The Blue component value [0...1] :alt: If True, use the alternative color instead of the nearest one. Can be used fo...
[ "Convert", "the", "color", "from", "RGB", "to", "web", "safe", "RGB" ]
train
https://github.com/jsvine/spectra/blob/2269a0ae9b5923154b15bd661fb81179608f7ec2/spectra/grapefruit.py#L1080-L1106
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Convert the color from RGB to 'web safe' RGB Parameters: :r: The Red component value [0...1] :g: ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
aio-libs/aiohttp
aiohttp/web_protocol.py
RequestHandler.handle_error
def handle_error(self, request: BaseRequest, status: int=500, exc: Optional[BaseException]=None, message: Optional[str]=None) -> StreamResponse: """Handle errors. Returns HTTP response with specific status code. Logs ad...
python
def handle_error(self, request: BaseRequest, status: int=500, exc: Optional[BaseException]=None, message: Optional[str]=None) -> StreamResponse: """Handle errors. Returns HTTP response with specific status code. Logs ad...
[ "def", "handle_error", "(", "self", ",", "request", ":", "BaseRequest", ",", "status", ":", "int", "=", "500", ",", "exc", ":", "Optional", "[", "BaseException", "]", "=", "None", ",", "message", ":", "Optional", "[", "str", "]", "=", "None", ")", "-...
Handle errors. Returns HTTP response with specific status code. Logs additional information. It always closes current connection.
[ "Handle", "errors", "." ]
train
https://github.com/aio-libs/aiohttp/blob/9504fe2affaaff673fa4f3754c1c44221f8ba47d/aiohttp/web_protocol.py#L511-L556
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Handle errors. Returns HTTP response with specific status code. Logs additional information. It always closes ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 7144, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 7144, ...
jbloomlab/phydms
phydmslib/models.py
ExpCM._update_B
def _update_B(self): """Update `B`.""" for param in self.freeparams: if param == 'mu': continue paramval = getattr(self, param) if isinstance(paramval, float): self.B[param] = broadcastMatrixMultiply(self.Ainv, b...
python
def _update_B(self): """Update `B`.""" for param in self.freeparams: if param == 'mu': continue paramval = getattr(self, param) if isinstance(paramval, float): self.B[param] = broadcastMatrixMultiply(self.Ainv, b...
[ "def", "_update_B", "(", "self", ")", ":", "for", "param", "in", "self", ".", "freeparams", ":", "if", "param", "==", "'mu'", ":", "continue", "paramval", "=", "getattr", "(", "self", ",", "param", ")", "if", "isinstance", "(", "paramval", ",", "float"...
Update `B`.
[ "Update", "B", "." ]
train
https://github.com/jbloomlab/phydms/blob/9cdebc10bafbe543c552d79486c7f950780ed3c0/phydmslib/models.py#L774-L788
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Update `B`. ### Response: def _update_B(self): """Update `B`.""" for param in self.freeparams: if ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4387, ...
tornadoweb/tornado
tornado/http1connection.py
HTTP1Connection.write_headers
def write_headers( self, start_line: Union[httputil.RequestStartLine, httputil.ResponseStartLine], headers: httputil.HTTPHeaders, chunk: bytes = None, ) -> "Future[None]": """Implements `.HTTPConnection.write_headers`.""" lines = [] if self.is_client: ...
python
def write_headers( self, start_line: Union[httputil.RequestStartLine, httputil.ResponseStartLine], headers: httputil.HTTPHeaders, chunk: bytes = None, ) -> "Future[None]": """Implements `.HTTPConnection.write_headers`.""" lines = [] if self.is_client: ...
[ "def", "write_headers", "(", "self", ",", "start_line", ":", "Union", "[", "httputil", ".", "RequestStartLine", ",", "httputil", ".", "ResponseStartLine", "]", ",", "headers", ":", "httputil", ".", "HTTPHeaders", ",", "chunk", ":", "bytes", "=", "None", ",",...
Implements `.HTTPConnection.write_headers`.
[ "Implements", ".", "HTTPConnection", ".", "write_headers", "." ]
train
https://github.com/tornadoweb/tornado/blob/b8b481770bcdb333a69afde5cce7eaa449128326/tornado/http1connection.py#L376-L465
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Implements `.HTTPConnection.write_headers`. ### Response: def write_headers( self, start_line: Union[httputil....
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1453, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1453, ...
chaoss/grimoirelab-sortinghat
sortinghat/parser.py
create_organizations_parser
def create_organizations_parser(stream): """Create an organizations parser for the given stream. Factory function that creates an organizations parser for the given stream. The stream is only used to guess the type of the required parser. :param stream: stream used to guess the type of the parser ...
python
def create_organizations_parser(stream): """Create an organizations parser for the given stream. Factory function that creates an organizations parser for the given stream. The stream is only used to guess the type of the required parser. :param stream: stream used to guess the type of the parser ...
[ "def", "create_organizations_parser", "(", "stream", ")", ":", "import", "sortinghat", ".", "parsing", "as", "parsing", "# First, try with default parser", "for", "p", "in", "parsing", ".", "SORTINGHAT_ORGS_PARSERS", ":", "klass", "=", "parsing", ".", "SORTINGHAT_ORGS...
Create an organizations parser for the given stream. Factory function that creates an organizations parser for the given stream. The stream is only used to guess the type of the required parser. :param stream: stream used to guess the type of the parser :returns: an organizations parser :rai...
[ "Create", "an", "organizations", "parser", "for", "the", "given", "stream", "." ]
train
https://github.com/chaoss/grimoirelab-sortinghat/blob/391cd37a75fea26311dc6908bc1c953c540a8e04/sortinghat/parser.py#L44-L68
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create an organizations parser for the given stream. Factory function that creates an organizations parser for the giv...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
jkwill87/teletype
teletype/components/config.py
set_char
def set_char(key, value): """ Updates charters used to render components. """ global _chars category = _get_char_category(key) if not category: raise KeyError _chars[category][key] = value
python
def set_char(key, value): """ Updates charters used to render components. """ global _chars category = _get_char_category(key) if not category: raise KeyError _chars[category][key] = value
[ "def", "set_char", "(", "key", ",", "value", ")", ":", "global", "_chars", "category", "=", "_get_char_category", "(", "key", ")", "if", "not", "category", ":", "raise", "KeyError", "_chars", "[", "category", "]", "[", "key", "]", "=", "value" ]
Updates charters used to render components.
[ "Updates", "charters", "used", "to", "render", "components", "." ]
train
https://github.com/jkwill87/teletype/blob/8ba95c56dcb5e4d7f6ae155eb6cdabfdfaf346cf/teletype/components/config.py#L40-L47
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Updates charters used to render components. ### Response: def set_char(key, value): """ Updates charters used to render co...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38191, ...
cockroachdb/cockroachdb-python
cockroachdb/sqlalchemy/transaction.py
run_transaction
def run_transaction(transactor, callback): """Run a transaction with retries. ``callback()`` will be called with one argument to execute the transaction. ``callback`` may be called more than once; it should have no side effects other than writes to the database on the given connection. ``callback``...
python
def run_transaction(transactor, callback): """Run a transaction with retries. ``callback()`` will be called with one argument to execute the transaction. ``callback`` may be called more than once; it should have no side effects other than writes to the database on the given connection. ``callback``...
[ "def", "run_transaction", "(", "transactor", ",", "callback", ")", ":", "if", "isinstance", "(", "transactor", ",", "sqlalchemy", ".", "engine", ".", "Connection", ")", ":", "return", "_txn_retry_loop", "(", "transactor", ",", "callback", ")", "elif", "isinsta...
Run a transaction with retries. ``callback()`` will be called with one argument to execute the transaction. ``callback`` may be called more than once; it should have no side effects other than writes to the database on the given connection. ``callback`` should not call ``commit()` or ``rollback()``; ...
[ "Run", "a", "transaction", "with", "retries", "." ]
train
https://github.com/cockroachdb/cockroachdb-python/blob/5a23e5fb4dc4386828fd147155becba58f0a7c4f/cockroachdb/sqlalchemy/transaction.py#L10-L33
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Run a transaction with retries. ``callback()`` will be called with one argument to execute the transaction. ``callback...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6869, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6869, ...
inveniosoftware/invenio-collections
invenio_collections/ext.py
_AppState.collections
def collections(self, values): """Set list of collections.""" # if cache server is configured, save collection list if self.cache: self.cache.set( self.app.config['COLLECTIONS_CACHE_KEY'], values)
python
def collections(self, values): """Set list of collections.""" # if cache server is configured, save collection list if self.cache: self.cache.set( self.app.config['COLLECTIONS_CACHE_KEY'], values)
[ "def", "collections", "(", "self", ",", "values", ")", ":", "# if cache server is configured, save collection list", "if", "self", ".", "cache", ":", "self", ".", "cache", ".", "set", "(", "self", ".", "app", ".", "config", "[", "'COLLECTIONS_CACHE_KEY'", "]", ...
Set list of collections.
[ "Set", "list", "of", "collections", "." ]
train
https://github.com/inveniosoftware/invenio-collections/blob/f3adca45c6d00a4dbf1f48fd501e8a68fe347f2f/invenio_collections/ext.py#L63-L68
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Set list of collections. ### Response: def collections(self, values): """Set list of collections.""" # if cach...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1681, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1681, ...
oceanprotocol/squid-py
squid_py/ocean/ocean_assets.py
OceanAssets.create
def create(self, metadata, publisher_account, service_descriptors=None, providers=None, use_secret_store=True): """ Register an asset in both the keeper's DIDRegistry (on-chain) and in the Metadata store ( Aquarius). :param metadata: dict conforming to the ...
python
def create(self, metadata, publisher_account, service_descriptors=None, providers=None, use_secret_store=True): """ Register an asset in both the keeper's DIDRegistry (on-chain) and in the Metadata store ( Aquarius). :param metadata: dict conforming to the ...
[ "def", "create", "(", "self", ",", "metadata", ",", "publisher_account", ",", "service_descriptors", "=", "None", ",", "providers", "=", "None", ",", "use_secret_store", "=", "True", ")", ":", "assert", "isinstance", "(", "metadata", ",", "dict", ")", ",", ...
Register an asset in both the keeper's DIDRegistry (on-chain) and in the Metadata store ( Aquarius). :param metadata: dict conforming to the Metadata accepted by Ocean Protocol. :param publisher_account: Account of the publisher registering this asset :param service_descriptors: list of...
[ "Register", "an", "asset", "in", "both", "the", "keeper", "s", "DIDRegistry", "(", "on", "-", "chain", ")", "and", "in", "the", "Metadata", "store", "(", "Aquarius", ")", "." ]
train
https://github.com/oceanprotocol/squid-py/blob/43a5b7431627e4c9ab7382ed9eb8153e96ed4483/squid_py/ocean/ocean_assets.py#L56-L195
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Register an asset in both the keeper's DIDRegistry (on-chain) and in the Metadata store ( Aquarius). :param me...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8861, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8861, ...
StackStorm/pybind
pybind/slxos/v17r_1_01a/cfm_state/__init__.py
cfm_state._set_dmm
def _set_dmm(self, v, load=False): """ Setter method for dmm, mapped from YANG variable /cfm_state/dmm (container) If this variable is read-only (config: false) in the source YANG file, then _set_dmm is considered as a private method. Backends looking to populate this variable should do so via c...
python
def _set_dmm(self, v, load=False): """ Setter method for dmm, mapped from YANG variable /cfm_state/dmm (container) If this variable is read-only (config: false) in the source YANG file, then _set_dmm is considered as a private method. Backends looking to populate this variable should do so via c...
[ "def", "_set_dmm", "(", "self", ",", "v", ",", "load", "=", "False", ")", ":", "if", "hasattr", "(", "v", ",", "\"_utype\"", ")", ":", "v", "=", "v", ".", "_utype", "(", "v", ")", "try", ":", "t", "=", "YANGDynClass", "(", "v", ",", "base", "...
Setter method for dmm, mapped from YANG variable /cfm_state/dmm (container) If this variable is read-only (config: false) in the source YANG file, then _set_dmm is considered as a private method. Backends looking to populate this variable should do so via calling thisObj._set_dmm() directly. YANG D...
[ "Setter", "method", "for", "dmm", "mapped", "from", "YANG", "variable", "/", "cfm_state", "/", "dmm", "(", "container", ")", "If", "this", "variable", "is", "read", "-", "only", "(", "config", ":", "false", ")", "in", "the", "source", "YANG", "file", "...
train
https://github.com/StackStorm/pybind/blob/44c467e71b2b425be63867aba6e6fa28b2cfe7fb/pybind/slxos/v17r_1_01a/cfm_state/__init__.py#L252-L275
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Setter method for dmm, mapped from YANG variable /cfm_state/dmm (container) If this variable is read-only (config: false) i...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 45394, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 45394, ...
ktbyers/netmiko
netmiko/cisco/cisco_ios.py
InLineTransfer.config_md5
def config_md5(self, source_config): """Compute MD5 hash of file.""" file_contents = source_config + "\n" # Cisco IOS automatically adds this file_contents = file_contents.encode("UTF-8") return hashlib.md5(file_contents).hexdigest()
python
def config_md5(self, source_config): """Compute MD5 hash of file.""" file_contents = source_config + "\n" # Cisco IOS automatically adds this file_contents = file_contents.encode("UTF-8") return hashlib.md5(file_contents).hexdigest()
[ "def", "config_md5", "(", "self", ",", "source_config", ")", ":", "file_contents", "=", "source_config", "+", "\"\\n\"", "# Cisco IOS automatically adds this", "file_contents", "=", "file_contents", ".", "encode", "(", "\"UTF-8\"", ")", "return", "hashlib", ".", "md...
Compute MD5 hash of file.
[ "Compute", "MD5", "hash", "of", "file", "." ]
train
https://github.com/ktbyers/netmiko/blob/54e6116c0b4664de2123081937e0a9a27bdfdfea/netmiko/cisco/cisco_ios.py#L174-L178
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Compute MD5 hash of file. ### Response: def config_md5(self, source_config): """Compute MD5 hash of file.""" f...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 47354, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 47354, ...
modlinltd/django-advanced-filters
advanced_filters/forms.py
AdvancedFilterQueryForm._build_query_dict
def _build_query_dict(self, formdata=None): """ Take submitted data from form and create a query dict to be used in a Q object (or filter) """ if self.is_valid() and formdata is None: formdata = self.cleaned_data key = "{field}__{operator}".format(**formdata) ...
python
def _build_query_dict(self, formdata=None): """ Take submitted data from form and create a query dict to be used in a Q object (or filter) """ if self.is_valid() and formdata is None: formdata = self.cleaned_data key = "{field}__{operator}".format(**formdata) ...
[ "def", "_build_query_dict", "(", "self", ",", "formdata", "=", "None", ")", ":", "if", "self", ".", "is_valid", "(", ")", "and", "formdata", "is", "None", ":", "formdata", "=", "self", ".", "cleaned_data", "key", "=", "\"{field}__{operator}\"", ".", "forma...
Take submitted data from form and create a query dict to be used in a Q object (or filter)
[ "Take", "submitted", "data", "from", "form", "and", "create", "a", "query", "dict", "to", "be", "used", "in", "a", "Q", "object", "(", "or", "filter", ")" ]
train
https://github.com/modlinltd/django-advanced-filters/blob/ba51e6946d1652796a82b2b95cceffbe1190a227/advanced_filters/forms.py#L86-L100
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Take submitted data from form and create a query dict to be used in a Q object (or filter) ### Response: def _build_qu...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 18293, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 18293, ...
huyingxi/Synonyms
synonyms/utils.py
deaccent
def deaccent(text): """ Remove accentuation from the given string. Input text is either a unicode string or utf8 encoded bytestring. Return input string with accents removed, as unicode. >>> deaccent("Šéf chomutovských komunistů dostal poštou bílý prášek") u'Sef chomutovskych komunistu dostal post...
python
def deaccent(text): """ Remove accentuation from the given string. Input text is either a unicode string or utf8 encoded bytestring. Return input string with accents removed, as unicode. >>> deaccent("Šéf chomutovských komunistů dostal poštou bílý prášek") u'Sef chomutovskych komunistu dostal post...
[ "def", "deaccent", "(", "text", ")", ":", "if", "not", "isinstance", "(", "text", ",", "unicode", ")", ":", "# assume utf8 for byte strings, use default (strict) error handling", "text", "=", "text", ".", "decode", "(", "'utf8'", ")", "norm", "=", "unicodedata", ...
Remove accentuation from the given string. Input text is either a unicode string or utf8 encoded bytestring. Return input string with accents removed, as unicode. >>> deaccent("Šéf chomutovských komunistů dostal poštou bílý prášek") u'Sef chomutovskych komunistu dostal postou bily prasek'
[ "Remove", "accentuation", "from", "the", "given", "string", ".", "Input", "text", "is", "either", "a", "unicode", "string", "or", "utf8", "encoded", "bytestring", "." ]
train
https://github.com/huyingxi/Synonyms/blob/fe7450d51d9ad825fdba86b9377da9dc76ae26a4/synonyms/utils.py#L140-L155
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Remove accentuation from the given string. Input text is either a unicode string or utf8 encoded bytestring. Return input ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
pantsbuild/pants
src/python/pants/pantsd/service/scheduler_service.py
SchedulerService.run
def run(self): """Main service entrypoint.""" while not self._state.is_terminating: self._process_event_queue() self._state.maybe_pause()
python
def run(self): """Main service entrypoint.""" while not self._state.is_terminating: self._process_event_queue() self._state.maybe_pause()
[ "def", "run", "(", "self", ")", ":", "while", "not", "self", ".", "_state", ".", "is_terminating", ":", "self", ".", "_process_event_queue", "(", ")", "self", ".", "_state", ".", "maybe_pause", "(", ")" ]
Main service entrypoint.
[ "Main", "service", "entrypoint", "." ]
train
https://github.com/pantsbuild/pants/blob/b72e650da0df685824ffdcc71988b8c282d0962d/src/python/pants/pantsd/service/scheduler_service.py#L238-L242
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Main service entrypoint. ### Response: def run(self): """Main service entrypoint.""" while not self._state.is_terminat...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6334, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6334, ...
Kozea/pygal
pygal/util.py
round_to_float
def round_to_float(number, precision): """Round a float to a precision""" rounded = Decimal(str(floor((number + precision / 2) // precision)) ) * Decimal(str(precision)) return float(rounded)
python
def round_to_float(number, precision): """Round a float to a precision""" rounded = Decimal(str(floor((number + precision / 2) // precision)) ) * Decimal(str(precision)) return float(rounded)
[ "def", "round_to_float", "(", "number", ",", "precision", ")", ":", "rounded", "=", "Decimal", "(", "str", "(", "floor", "(", "(", "number", "+", "precision", "/", "2", ")", "//", "precision", ")", ")", ")", "*", "Decimal", "(", "str", "(", "precisio...
Round a float to a precision
[ "Round", "a", "float", "to", "a", "precision" ]
train
https://github.com/Kozea/pygal/blob/5e25c98a59a0642eecd9fcc5dbfeeb2190fbb5e7/pygal/util.py#L68-L72
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Round a float to a precision ### Response: def round_to_float(number, precision): """Round a float to a precision""" r...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 28597, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 28597, ...
LogicalDash/LiSE
LiSE/LiSE/cache.py
NodeContentsCache.truncate_loc
def truncate_loc(self, character, location, branch, turn, tick): """Remove future data about a particular location Return True if I deleted anything, False otherwise. """ r = False branches_turns = self.branches[character, location][branch] branches_turns.truncate(turn)...
python
def truncate_loc(self, character, location, branch, turn, tick): """Remove future data about a particular location Return True if I deleted anything, False otherwise. """ r = False branches_turns = self.branches[character, location][branch] branches_turns.truncate(turn)...
[ "def", "truncate_loc", "(", "self", ",", "character", ",", "location", ",", "branch", ",", "turn", ",", "tick", ")", ":", "r", "=", "False", "branches_turns", "=", "self", ".", "branches", "[", "character", ",", "location", "]", "[", "branch", "]", "br...
Remove future data about a particular location Return True if I deleted anything, False otherwise.
[ "Remove", "future", "data", "about", "a", "particular", "location" ]
train
https://github.com/LogicalDash/LiSE/blob/fe6fd4f0a7c1780e065f4c9babb9bc443af6bb84/LiSE/LiSE/cache.py#L635-L686
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Remove future data about a particular location Return True if I deleted anything, False otherwise. ### Response: def ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13319, ...
rigetti/grove
grove/tomography/state_tomography.py
state_tomography_programs
def state_tomography_programs(state_prep, qubits=None, rotation_generator=tomography.default_rotations): """ Yield tomographic sequences that prepare a state with Quil program `state_prep` and then append tomographic rotations on the specified `qubits`. If `qubits is None`, it ...
python
def state_tomography_programs(state_prep, qubits=None, rotation_generator=tomography.default_rotations): """ Yield tomographic sequences that prepare a state with Quil program `state_prep` and then append tomographic rotations on the specified `qubits`. If `qubits is None`, it ...
[ "def", "state_tomography_programs", "(", "state_prep", ",", "qubits", "=", "None", ",", "rotation_generator", "=", "tomography", ".", "default_rotations", ")", ":", "if", "qubits", "is", "None", ":", "qubits", "=", "state_prep", ".", "get_qubits", "(", ")", "f...
Yield tomographic sequences that prepare a state with Quil program `state_prep` and then append tomographic rotations on the specified `qubits`. If `qubits is None`, it assumes all qubits in the program should be tomographically rotated. :param Program state_prep: The program to prepare the state to be tom...
[ "Yield", "tomographic", "sequences", "that", "prepare", "a", "state", "with", "Quil", "program", "state_prep", "and", "then", "append", "tomographic", "rotations", "on", "the", "specified", "qubits", ".", "If", "qubits", "is", "None", "it", "assumes", "all", "...
train
https://github.com/rigetti/grove/blob/dc6bf6ec63e8c435fe52b1e00f707d5ce4cdb9b3/grove/tomography/state_tomography.py#L223-L244
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Yield tomographic sequences that prepare a state with Quil program `state_prep` and then append tomographic rotations on th...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 56, 82...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 56, 82...
sdispater/orator
orator/migrations/database_migration_repository.py
DatabaseMigrationRepository.log
def log(self, file, batch): """ Log that a migration was run. :type file: str :type batch: int """ record = {"migration": file, "batch": batch} self.table().insert(**record)
python
def log(self, file, batch): """ Log that a migration was run. :type file: str :type batch: int """ record = {"migration": file, "batch": batch} self.table().insert(**record)
[ "def", "log", "(", "self", ",", "file", ",", "batch", ")", ":", "record", "=", "{", "\"migration\"", ":", "file", ",", "\"batch\"", ":", "batch", "}", "self", ".", "table", "(", ")", ".", "insert", "(", "*", "*", "record", ")" ]
Log that a migration was run. :type file: str :type batch: int
[ "Log", "that", "a", "migration", "was", "run", "." ]
train
https://github.com/sdispater/orator/blob/bd90bf198ee897751848f9a92e49d18e60a74136/orator/migrations/database_migration_repository.py#L34-L43
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Log that a migration was run. :type file: str :type batch: int ### Response: def log(self, file, batch): ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2250, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2250, ...
getsentry/sentry-python
sentry_sdk/utils.py
event_hint_with_exc_info
def event_hint_with_exc_info(exc_info=None): # type: (ExcInfo) -> Dict[str, Optional[ExcInfo]] """Creates a hint with the exc info filled in.""" if exc_info is None: exc_info = sys.exc_info() else: exc_info = exc_info_from_error(exc_info) if exc_info[0] is None: exc_info = No...
python
def event_hint_with_exc_info(exc_info=None): # type: (ExcInfo) -> Dict[str, Optional[ExcInfo]] """Creates a hint with the exc info filled in.""" if exc_info is None: exc_info = sys.exc_info() else: exc_info = exc_info_from_error(exc_info) if exc_info[0] is None: exc_info = No...
[ "def", "event_hint_with_exc_info", "(", "exc_info", "=", "None", ")", ":", "# type: (ExcInfo) -> Dict[str, Optional[ExcInfo]]", "if", "exc_info", "is", "None", ":", "exc_info", "=", "sys", ".", "exc_info", "(", ")", "else", ":", "exc_info", "=", "exc_info_from_error...
Creates a hint with the exc info filled in.
[ "Creates", "a", "hint", "with", "the", "exc", "info", "filled", "in", "." ]
train
https://github.com/getsentry/sentry-python/blob/a1d77722bdce0b94660ebf50b5c4a4645916d084/sentry_sdk/utils.py#L81-L90
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Creates a hint with the exc info filled in. ### Response: def event_hint_with_exc_info(exc_info=None): # type: (ExcInfo) -...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
riga/law
law/cli/software.py
remove_software_cache
def remove_software_cache(sw_dir=None): """ Removes the software cache directory at *sw_dir* which is evaluated with :py:func:`get_sw_dir`. """ sw_dir = get_sw_dir(sw_dir) if os.path.exists(sw_dir): shutil.rmtree(sw_dir)
python
def remove_software_cache(sw_dir=None): """ Removes the software cache directory at *sw_dir* which is evaluated with :py:func:`get_sw_dir`. """ sw_dir = get_sw_dir(sw_dir) if os.path.exists(sw_dir): shutil.rmtree(sw_dir)
[ "def", "remove_software_cache", "(", "sw_dir", "=", "None", ")", ":", "sw_dir", "=", "get_sw_dir", "(", "sw_dir", ")", "if", "os", ".", "path", ".", "exists", "(", "sw_dir", ")", ":", "shutil", ".", "rmtree", "(", "sw_dir", ")" ]
Removes the software cache directory at *sw_dir* which is evaluated with :py:func:`get_sw_dir`.
[ "Removes", "the", "software", "cache", "directory", "at", "*", "sw_dir", "*", "which", "is", "evaluated", "with", ":", "py", ":", "func", ":", "get_sw_dir", "." ]
train
https://github.com/riga/law/blob/479f84ce06ecf3bafe9d33cb7b8fc52e39fb80a1/law/cli/software.py#L89-L95
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Removes the software cache directory at *sw_dir* which is evaluated with :py:func:`get_sw_dir`. ### Response: def remove_softw...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
wecatch/app-turbo
turbo/util.py
to_basestring
def to_basestring(value): """Converts a string argument to a subclass of basestring. In python2, byte and unicode strings are mostly interchangeable, so functions that deal with a user-supplied argument in combination with ascii string constants can use either and should return the type the user su...
python
def to_basestring(value): """Converts a string argument to a subclass of basestring. In python2, byte and unicode strings are mostly interchangeable, so functions that deal with a user-supplied argument in combination with ascii string constants can use either and should return the type the user su...
[ "def", "to_basestring", "(", "value", ")", ":", "if", "isinstance", "(", "value", ",", "_BASESTRING_TYPES", ")", ":", "return", "value", "if", "not", "isinstance", "(", "value", ",", "bytes", ")", ":", "raise", "TypeError", "(", "\"Expected bytes, unicode, or ...
Converts a string argument to a subclass of basestring. In python2, byte and unicode strings are mostly interchangeable, so functions that deal with a user-supplied argument in combination with ascii string constants can use either and should return the type the user supplied. In python3, the two type...
[ "Converts", "a", "string", "argument", "to", "a", "subclass", "of", "basestring", "." ]
train
https://github.com/wecatch/app-turbo/blob/75faf97371a9a138c53f92168d0a486636cb8a9c/turbo/util.py#L364-L379
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Converts a string argument to a subclass of basestring. In python2, byte and unicode strings are mostly interchangeable, ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
ga4gh/ga4gh-server
ga4gh/server/datarepo.py
SqlDataRepository.insertDataset
def insertDataset(self, dataset): """ Inserts the specified dataset into this repository. """ try: models.Dataset.create( id=dataset.getId(), name=dataset.getLocalId(), description=dataset.getDescription(), attri...
python
def insertDataset(self, dataset): """ Inserts the specified dataset into this repository. """ try: models.Dataset.create( id=dataset.getId(), name=dataset.getLocalId(), description=dataset.getDescription(), attri...
[ "def", "insertDataset", "(", "self", ",", "dataset", ")", ":", "try", ":", "models", ".", "Dataset", ".", "create", "(", "id", "=", "dataset", ".", "getId", "(", ")", ",", "name", "=", "dataset", ".", "getLocalId", "(", ")", ",", "description", "=", ...
Inserts the specified dataset into this repository.
[ "Inserts", "the", "specified", "dataset", "into", "this", "repository", "." ]
train
https://github.com/ga4gh/ga4gh-server/blob/1aa18922ef136db8604f6f098cb1732cba6f2a76/ga4gh/server/datarepo.py#L848-L860
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Inserts the specified dataset into this repository. ### Response: def insertDataset(self, dataset): """ Insert...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14099, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14099, ...
3ll3d00d/vibe
backend/src/analyser/common/targetcontroller.py
TargetController.storeFromHinge
def storeFromHinge(self, name, hingePoints): """ Stores a new item in the cache if it is allowed in. :param name: the name. :param hingePoints: the hinge points. :return: true if it is stored. """ if name not in self._cache: if self._valid(hingePoints...
python
def storeFromHinge(self, name, hingePoints): """ Stores a new item in the cache if it is allowed in. :param name: the name. :param hingePoints: the hinge points. :return: true if it is stored. """ if name not in self._cache: if self._valid(hingePoints...
[ "def", "storeFromHinge", "(", "self", ",", "name", ",", "hingePoints", ")", ":", "if", "name", "not", "in", "self", ".", "_cache", ":", "if", "self", ".", "_valid", "(", "hingePoints", ")", ":", "self", ".", "_cache", "[", "name", "]", "=", "{", "'...
Stores a new item in the cache if it is allowed in. :param name: the name. :param hingePoints: the hinge points. :return: true if it is stored.
[ "Stores", "a", "new", "item", "in", "the", "cache", "if", "it", "is", "allowed", "in", ".", ":", "param", "name", ":", "the", "name", ".", ":", "param", "hingePoints", ":", "the", "hinge", "points", ".", ":", "return", ":", "true", "if", "it", "is"...
train
https://github.com/3ll3d00d/vibe/blob/124b029f13ac746723e92cb47e9cb56edd2e54b5/backend/src/analyser/common/targetcontroller.py#L23-L35
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Stores a new item in the cache if it is allowed in. :param name: the name. :param hingePoints: the hinge points...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 70126, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 70126, ...
Desiiii/weeb.py
weeb/client.py
Client.generate_waifu_insult
async def generate_waifu_insult(self, avatar): """Generate a waifu insult image. This function is a coroutine. Parameters: avatar: str - http/s url pointing to an image, has to have proper headers and be a direct link to an image Return Type: image data""" if not i...
python
async def generate_waifu_insult(self, avatar): """Generate a waifu insult image. This function is a coroutine. Parameters: avatar: str - http/s url pointing to an image, has to have proper headers and be a direct link to an image Return Type: image data""" if not i...
[ "async", "def", "generate_waifu_insult", "(", "self", ",", "avatar", ")", ":", "if", "not", "isinstance", "(", "avatar", ",", "str", ")", ":", "raise", "TypeError", "(", "\"type of 'avatar' must be str.\"", ")", "async", "with", "aiohttp", ".", "ClientSession", ...
Generate a waifu insult image. This function is a coroutine. Parameters: avatar: str - http/s url pointing to an image, has to have proper headers and be a direct link to an image Return Type: image data
[ "Generate", "a", "waifu", "insult", "image", "." ]
train
https://github.com/Desiiii/weeb.py/blob/5174c22e0cd34cb77f69ad18fbe87ee1fad51859/weeb/client.py#L131-L147
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Generate a waifu insult image. This function is a coroutine. Parameters: avatar: str - http/s url...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 32215, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 32215, ...
pmorissette/bt
bt/core.py
StrategyBase.close
def close(self, child): """ Close a child position - alias for rebalance(0, child). This will also flatten (close out all) the child's children. Args: * child (str): Child, specified by name. """ c = self.children[child] # flatten if children not None...
python
def close(self, child): """ Close a child position - alias for rebalance(0, child). This will also flatten (close out all) the child's children. Args: * child (str): Child, specified by name. """ c = self.children[child] # flatten if children not None...
[ "def", "close", "(", "self", ",", "child", ")", ":", "c", "=", "self", ".", "children", "[", "child", "]", "# flatten if children not None", "if", "c", ".", "children", "is", "not", "None", "and", "len", "(", "c", ".", "children", ")", "!=", "0", ":"...
Close a child position - alias for rebalance(0, child). This will also flatten (close out all) the child's children. Args: * child (str): Child, specified by name.
[ "Close", "a", "child", "position", "-", "alias", "for", "rebalance", "(", "0", "child", ")", ".", "This", "will", "also", "flatten", "(", "close", "out", "all", ")", "the", "child", "s", "children", "." ]
train
https://github.com/pmorissette/bt/blob/0363e6fa100d9392dd18e32e3d8379d5e83c28fa/bt/core.py#L724-L738
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Close a child position - alias for rebalance(0, child). This will also flatten (close out all) the child's children. ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8084, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 8084, ...
flaviogrossi/sockjs-cyclone
sockjs/cyclone/sessioncontainer.py
SessionContainer.add
def add(self, session): """ Add session to the container. @param session: Session object """ self._items[session.session_id] = session if session.expiry is not None: self._queue.push(session)
python
def add(self, session): """ Add session to the container. @param session: Session object """ self._items[session.session_id] = session if session.expiry is not None: self._queue.push(session)
[ "def", "add", "(", "self", ",", "session", ")", ":", "self", ".", "_items", "[", "session", ".", "session_id", "]", "=", "session", "if", "session", ".", "expiry", "is", "not", "None", ":", "self", ".", "_queue", ".", "push", "(", "session", ")" ]
Add session to the container. @param session: Session object
[ "Add", "session", "to", "the", "container", "." ]
train
https://github.com/flaviogrossi/sockjs-cyclone/blob/d3ca053ec1aa1e85f652347bff562c2319be37a2/sockjs/cyclone/sessioncontainer.py#L12-L20
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Add session to the container. @param session: Session object ### Response: def add(self, session): """ Add se...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2261, ...
mailgun/talon
talon/quotations.py
remove_initial_spaces_and_mark_message_lines
def remove_initial_spaces_and_mark_message_lines(lines): """ Removes the initial spaces in each line before marking message lines. This ensures headers can be identified if they are indented with spaces. """ i = 0 while i < len(lines): lines[i] = lines[i].lstrip(' ') i += 1 ...
python
def remove_initial_spaces_and_mark_message_lines(lines): """ Removes the initial spaces in each line before marking message lines. This ensures headers can be identified if they are indented with spaces. """ i = 0 while i < len(lines): lines[i] = lines[i].lstrip(' ') i += 1 ...
[ "def", "remove_initial_spaces_and_mark_message_lines", "(", "lines", ")", ":", "i", "=", "0", "while", "i", "<", "len", "(", "lines", ")", ":", "lines", "[", "i", "]", "=", "lines", "[", "i", "]", ".", "lstrip", "(", "' '", ")", "i", "+=", "1", "re...
Removes the initial spaces in each line before marking message lines. This ensures headers can be identified if they are indented with spaces.
[ "Removes", "the", "initial", "spaces", "in", "each", "line", "before", "marking", "message", "lines", "." ]
train
https://github.com/mailgun/talon/blob/cdd84563dd329c4f887591807870d10015e0c7a7/talon/quotations.py#L219-L229
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Removes the initial spaces in each line before marking message lines. This ensures headers can be identified if they are i...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
Microsoft/nni
examples/trials/weight_sharing/ga_squad/train_model.py
GAG.build_char_states
def build_char_states(self, char_embed, is_training, reuse, char_ids, char_lengths): """Build char embedding network for the QA model.""" max_char_length = self.cfg.max_char_length inputs = dropout(tf.nn.embedding_lookup(char_embed, char_ids), self.cfg.dropout, is_train...
python
def build_char_states(self, char_embed, is_training, reuse, char_ids, char_lengths): """Build char embedding network for the QA model.""" max_char_length = self.cfg.max_char_length inputs = dropout(tf.nn.embedding_lookup(char_embed, char_ids), self.cfg.dropout, is_train...
[ "def", "build_char_states", "(", "self", ",", "char_embed", ",", "is_training", ",", "reuse", ",", "char_ids", ",", "char_lengths", ")", ":", "max_char_length", "=", "self", ".", "cfg", ".", "max_char_length", "inputs", "=", "dropout", "(", "tf", ".", "nn", ...
Build char embedding network for the QA model.
[ "Build", "char", "embedding", "network", "for", "the", "QA", "model", "." ]
train
https://github.com/Microsoft/nni/blob/c7cc8db32da8d2ec77a382a55089f4e17247ce41/examples/trials/weight_sharing/ga_squad/train_model.py#L234-L263
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Build char embedding network for the QA model. ### Response: def build_char_states(self, char_embed, is_training, reuse, char_...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 11313, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 11313, ...
richardkiss/pycoin
pycoin/ecdsa/intstream.py
_from_bytes
def _from_bytes(bytes, byteorder="big", signed=False): """This is the same functionality as ``int.from_bytes`` in python 3""" return int.from_bytes(bytes, byteorder=byteorder, signed=signed)
python
def _from_bytes(bytes, byteorder="big", signed=False): """This is the same functionality as ``int.from_bytes`` in python 3""" return int.from_bytes(bytes, byteorder=byteorder, signed=signed)
[ "def", "_from_bytes", "(", "bytes", ",", "byteorder", "=", "\"big\"", ",", "signed", "=", "False", ")", ":", "return", "int", ".", "from_bytes", "(", "bytes", ",", "byteorder", "=", "byteorder", ",", "signed", "=", "signed", ")" ]
This is the same functionality as ``int.from_bytes`` in python 3
[ "This", "is", "the", "same", "functionality", "as", "int", ".", "from_bytes", "in", "python", "3" ]
train
https://github.com/richardkiss/pycoin/blob/1e8d0d9fe20ce0347b97847bb529cd1bd84c7442/pycoin/ecdsa/intstream.py#L10-L12
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: This is the same functionality as ``int.from_bytes`` in python 3 ### Response: def _from_bytes(bytes, byteorder="big", signed=...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2028, ...
DLR-RM/RAFCON
source/rafcon/gui/mygaphas/tools.py
ConnectionTool._handle_temporary_connection
def _handle_temporary_connection(self, old_sink, new_sink, of_target=True): """Connect connection to new_sink If new_sink is set, the connection origin or target will be set to new_sink. The connection to old_sink is being removed. :param gaphas.aspect.ConnectionSink old_sink: Old sink...
python
def _handle_temporary_connection(self, old_sink, new_sink, of_target=True): """Connect connection to new_sink If new_sink is set, the connection origin or target will be set to new_sink. The connection to old_sink is being removed. :param gaphas.aspect.ConnectionSink old_sink: Old sink...
[ "def", "_handle_temporary_connection", "(", "self", ",", "old_sink", ",", "new_sink", ",", "of_target", "=", "True", ")", ":", "def", "sink_set_and_differs", "(", "sink_a", ",", "sink_b", ")", ":", "if", "not", "sink_a", ":", "return", "False", "if", "not", ...
Connect connection to new_sink If new_sink is set, the connection origin or target will be set to new_sink. The connection to old_sink is being removed. :param gaphas.aspect.ConnectionSink old_sink: Old sink (if existing) :param gaphas.aspect.ConnectionSink new_sink: New sink (if exist...
[ "Connect", "connection", "to", "new_sink" ]
train
https://github.com/DLR-RM/RAFCON/blob/24942ef1a904531f49ab8830a1dbb604441be498/source/rafcon/gui/mygaphas/tools.py#L601-L628
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Connect connection to new_sink If new_sink is set, the connection origin or target will be set to new_sink. The connec...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14953, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14953, ...
jonathf/chaospy
chaospy/poly/shaping.py
transpose
def transpose(vari): """ Transpose a shapeable quantety. Args: vari (chaospy.poly.base.Poly, numpy.ndarray): Quantety of interest. Returns: (chaospy.poly.base.Poly, numpy.ndarray): Same type as ``vari``. Examples: >>> P = chaospy.reshape(chaospy.pra...
python
def transpose(vari): """ Transpose a shapeable quantety. Args: vari (chaospy.poly.base.Poly, numpy.ndarray): Quantety of interest. Returns: (chaospy.poly.base.Poly, numpy.ndarray): Same type as ``vari``. Examples: >>> P = chaospy.reshape(chaospy.pra...
[ "def", "transpose", "(", "vari", ")", ":", "if", "isinstance", "(", "vari", ",", "Poly", ")", ":", "core", "=", "vari", ".", "A", ".", "copy", "(", ")", "for", "key", "in", "vari", ".", "keys", ":", "core", "[", "key", "]", "=", "transpose", "(...
Transpose a shapeable quantety. Args: vari (chaospy.poly.base.Poly, numpy.ndarray): Quantety of interest. Returns: (chaospy.poly.base.Poly, numpy.ndarray): Same type as ``vari``. Examples: >>> P = chaospy.reshape(chaospy.prange(4), (2,2)) >>> print(...
[ "Transpose", "a", "shapeable", "quantety", "." ]
train
https://github.com/jonathf/chaospy/blob/25ecfa7bf5608dc10c0b31d142ded0e3755f5d74/chaospy/poly/shaping.py#L114-L139
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Transpose a shapeable quantety. Args: vari (chaospy.poly.base.Poly, numpy.ndarray): Quantety of intere...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 89298, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 89298, ...
pycampers/zproc
zproc/state/state.py
State.fork
def fork(self, server_address: str = None, *, namespace: str = None) -> "State": r""" "Forks" this State object. Takes the same args as the :py:class:`State` constructor, except that they automatically default to the values provided during the creation of this State object. If ...
python
def fork(self, server_address: str = None, *, namespace: str = None) -> "State": r""" "Forks" this State object. Takes the same args as the :py:class:`State` constructor, except that they automatically default to the values provided during the creation of this State object. If ...
[ "def", "fork", "(", "self", ",", "server_address", ":", "str", "=", "None", ",", "*", ",", "namespace", ":", "str", "=", "None", ")", "->", "\"State\"", ":", "if", "server_address", "is", "None", ":", "server_address", "=", "self", ".", "server_address",...
r""" "Forks" this State object. Takes the same args as the :py:class:`State` constructor, except that they automatically default to the values provided during the creation of this State object. If no args are provided to this function, then it shall create a new :py:class:`Stat...
[ "r", "Forks", "this", "State", "object", "." ]
train
https://github.com/pycampers/zproc/blob/352a3c7166e2ccc3597c28385a8354b5a22afdc2/zproc/state/state.py#L183-L203
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: r""" "Forks" this State object. Takes the same args as the :py:class:`State` constructor, except that ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 81, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 81, 72...
iotile/coretools
iotilebuild/iotile/build/config/scons-local-3.0.1/SCons/Tool/__init__.py
createProgBuilder
def createProgBuilder(env): """This is a utility function that creates the Program Builder in an Environment if it is not there already. If it is already there, we return the existing one. """ try: program = env['BUILDERS']['Program'] except KeyError: import SCons.Defaults ...
python
def createProgBuilder(env): """This is a utility function that creates the Program Builder in an Environment if it is not there already. If it is already there, we return the existing one. """ try: program = env['BUILDERS']['Program'] except KeyError: import SCons.Defaults ...
[ "def", "createProgBuilder", "(", "env", ")", ":", "try", ":", "program", "=", "env", "[", "'BUILDERS'", "]", "[", "'Program'", "]", "except", "KeyError", ":", "import", "SCons", ".", "Defaults", "program", "=", "SCons", ".", "Builder", ".", "Builder", "(...
This is a utility function that creates the Program Builder in an Environment if it is not there already. If it is already there, we return the existing one.
[ "This", "is", "a", "utility", "function", "that", "creates", "the", "Program", "Builder", "in", "an", "Environment", "if", "it", "is", "not", "there", "already", "." ]
train
https://github.com/iotile/coretools/blob/2d794f5f1346b841b0dcd16c9d284e9bf2f3c6ec/iotilebuild/iotile/build/config/scons-local-3.0.1/SCons/Tool/__init__.py#L306-L326
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: This is a utility function that creates the Program Builder in an Environment if it is not there already. If it is alr...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2028, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 2028, ...
lingthio/Flask-User
flask_user/user_manager__views.py
UserManager__Views.invite_user_view
def invite_user_view(self): """ Allows users to send invitations to register an account """ invite_user_form = self.InviteUserFormClass(request.form) if request.method == 'POST' and invite_user_form.validate(): # Find User and UserEmail by email email = invite_user_form...
python
def invite_user_view(self): """ Allows users to send invitations to register an account """ invite_user_form = self.InviteUserFormClass(request.form) if request.method == 'POST' and invite_user_form.validate(): # Find User and UserEmail by email email = invite_user_form...
[ "def", "invite_user_view", "(", "self", ")", ":", "invite_user_form", "=", "self", ".", "InviteUserFormClass", "(", "request", ".", "form", ")", "if", "request", ".", "method", "==", "'POST'", "and", "invite_user_form", ".", "validate", "(", ")", ":", "# Fin...
Allows users to send invitations to register an account
[ "Allows", "users", "to", "send", "invitations", "to", "register", "an", "account" ]
train
https://github.com/lingthio/Flask-User/blob/a379fa0a281789618c484b459cb41236779b95b1/flask_user/user_manager__views.py#L313-L355
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Allows users to send invitations to register an account ### Response: def invite_user_view(self): """ Allows users to ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 80695, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 80695, ...
wakatime/wakatime
wakatime/packages/pygments/formatters/__init__.py
load_formatter_from_file
def load_formatter_from_file(filename, formattername="CustomFormatter", **options): """Load a formatter from a file. This method expects a file located relative to the current working directory, which contains a class named CustomFormatter. By default, it expects the Format...
python
def load_formatter_from_file(filename, formattername="CustomFormatter", **options): """Load a formatter from a file. This method expects a file located relative to the current working directory, which contains a class named CustomFormatter. By default, it expects the Format...
[ "def", "load_formatter_from_file", "(", "filename", ",", "formattername", "=", "\"CustomFormatter\"", ",", "*", "*", "options", ")", ":", "try", ":", "# This empty dict will contain the namespace for the exec'd file", "custom_namespace", "=", "{", "}", "exec", "(", "ope...
Load a formatter from a file. This method expects a file located relative to the current working directory, which contains a class named CustomFormatter. By default, it expects the Formatter to be named CustomFormatter; you can specify your own class name as the second argument to this function. U...
[ "Load", "a", "formatter", "from", "a", "file", "." ]
train
https://github.com/wakatime/wakatime/blob/74519ace04e8472f3a3993269963732b9946a01d/wakatime/packages/pygments/formatters/__init__.py#L82-L114
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Load a formatter from a file. This method expects a file located relative to the current working directory, which cont...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6003, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6003, ...
markfinger/assembla
assembla/lib.py
assembla_filter
def assembla_filter(func): """ Filters :data for the objects in it which possess attributes equal in name/value to a key/value in kwargs. Each key/value combination in kwargs is compared against the object, so multiple keyword arguments can be passed in to constrain the filtering. """ @wrap...
python
def assembla_filter(func): """ Filters :data for the objects in it which possess attributes equal in name/value to a key/value in kwargs. Each key/value combination in kwargs is compared against the object, so multiple keyword arguments can be passed in to constrain the filtering. """ @wrap...
[ "def", "assembla_filter", "(", "func", ")", ":", "@", "wraps", "(", "func", ")", "def", "wrapper", "(", "class_instance", ",", "*", "*", "kwargs", ")", ":", "# Get the result", "extra_params", "=", "kwargs", ".", "get", "(", "'extra_params'", ",", "None", ...
Filters :data for the objects in it which possess attributes equal in name/value to a key/value in kwargs. Each key/value combination in kwargs is compared against the object, so multiple keyword arguments can be passed in to constrain the filtering.
[ "Filters", ":", "data", "for", "the", "objects", "in", "it", "which", "possess", "attributes", "equal", "in", "name", "/", "value", "to", "a", "key", "/", "value", "in", "kwargs", "." ]
train
https://github.com/markfinger/assembla/blob/967a77a5ba718df94f60e832b6e0cf14c72426aa/assembla/lib.py#L43-L76
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Filters :data for the objects in it which possess attributes equal in name/value to a key/value in kwargs. Each key/va...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 29451, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 29451, ...
bcbio/bcbio-nextgen
bcbio/variation/genotype.py
batch_for_variantcall
def batch_for_variantcall(samples): """Prepare a set of samples for parallel variant calling. CWL input target that groups samples into batches and variant callers for parallel processing. If doing joint calling, with `tools_on: [gvcf]`, split the sample into individuals instead of combining into ...
python
def batch_for_variantcall(samples): """Prepare a set of samples for parallel variant calling. CWL input target that groups samples into batches and variant callers for parallel processing. If doing joint calling, with `tools_on: [gvcf]`, split the sample into individuals instead of combining into ...
[ "def", "batch_for_variantcall", "(", "samples", ")", ":", "sample_order", "=", "[", "dd", ".", "get_sample_name", "(", "utils", ".", "to_single_data", "(", "x", ")", ")", "for", "x", "in", "samples", "]", "to_process", ",", "extras", "=", "_dup_samples_by_va...
Prepare a set of samples for parallel variant calling. CWL input target that groups samples into batches and variant callers for parallel processing. If doing joint calling, with `tools_on: [gvcf]`, split the sample into individuals instead of combining into a batch.
[ "Prepare", "a", "set", "of", "samples", "for", "parallel", "variant", "calling", "." ]
train
https://github.com/bcbio/bcbio-nextgen/blob/6a9348c0054ccd5baffd22f1bb7d0422f6978b20/bcbio/variation/genotype.py#L241-L272
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Prepare a set of samples for parallel variant calling. CWL input target that groups samples into batches and variant calle...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 51690, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 51690, ...
biocore-ntnu/epic
epic/matrixes/matrixes.py
create_matrixes
def create_matrixes(chip, input, df, args): # type: (Iterable[pd.DataFrame], Iterable[pd.DataFrame], pd.DataFrame, Namespace) -> List[pd.DataFrame] "Creates matrixes which can be written to file as is (matrix) or as bedGraph." genome = args.chromosome_sizes chip = put_dfs_in_chromosome_dict(chip) ...
python
def create_matrixes(chip, input, df, args): # type: (Iterable[pd.DataFrame], Iterable[pd.DataFrame], pd.DataFrame, Namespace) -> List[pd.DataFrame] "Creates matrixes which can be written to file as is (matrix) or as bedGraph." genome = args.chromosome_sizes chip = put_dfs_in_chromosome_dict(chip) ...
[ "def", "create_matrixes", "(", "chip", ",", "input", ",", "df", ",", "args", ")", ":", "# type: (Iterable[pd.DataFrame], Iterable[pd.DataFrame], pd.DataFrame, Namespace) -> List[pd.DataFrame]", "genome", "=", "args", ".", "chromosome_sizes", "chip", "=", "put_dfs_in_chromosom...
Creates matrixes which can be written to file as is (matrix) or as bedGraph.
[ "Creates", "matrixes", "which", "can", "be", "written", "to", "file", "as", "is", "(", "matrix", ")", "or", "as", "bedGraph", "." ]
train
https://github.com/biocore-ntnu/epic/blob/ed0024939ec6182a0a39d59d845ff14a4889a6ef/epic/matrixes/matrixes.py#L148-L168
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Creates matrixes which can be written to file as is (matrix) or as bedGraph. ### Response: def create_matrixes(chip, input, df...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 55968, ...
linkedin/Zopkio
zopkio/deployer.py
Deployer.hangup
def hangup(self, unique_id, configs=None): """ Issue a signal to hangup the specified process :Parameter unique_id: the name of the process """ self._send_signal(unique_id, signal.SIGHUP, configs)
python
def hangup(self, unique_id, configs=None): """ Issue a signal to hangup the specified process :Parameter unique_id: the name of the process """ self._send_signal(unique_id, signal.SIGHUP, configs)
[ "def", "hangup", "(", "self", ",", "unique_id", ",", "configs", "=", "None", ")", ":", "self", ".", "_send_signal", "(", "unique_id", ",", "signal", ".", "SIGHUP", ",", "configs", ")" ]
Issue a signal to hangup the specified process :Parameter unique_id: the name of the process
[ "Issue", "a", "signal", "to", "hangup", "the", "specified", "process" ]
train
https://github.com/linkedin/Zopkio/blob/a06e35a884cd26eedca0aac8ba6b9b40c417a01c/zopkio/deployer.py#L224-L230
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Issue a signal to hangup the specified process :Parameter unique_id: the name of the process ### Response: def hangup(sel...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 43106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 43106, ...
pantsbuild/pants
src/python/pants/backend/python/tasks/resolve_requirements_task_base.py
ResolveRequirementsTaskBase.merged_pex
def merged_pex(cls, path, pex_info, interpreter, pexes, interpeter_constraints=None): """Yields a pex builder at path with the given pexes already merged. :rtype: :class:`pex.pex_builder.PEXBuilder` """ pex_paths = [pex.path() for pex in pexes if pex] if pex_paths: pex_info = pex_info.copy() ...
python
def merged_pex(cls, path, pex_info, interpreter, pexes, interpeter_constraints=None): """Yields a pex builder at path with the given pexes already merged. :rtype: :class:`pex.pex_builder.PEXBuilder` """ pex_paths = [pex.path() for pex in pexes if pex] if pex_paths: pex_info = pex_info.copy() ...
[ "def", "merged_pex", "(", "cls", ",", "path", ",", "pex_info", ",", "interpreter", ",", "pexes", ",", "interpeter_constraints", "=", "None", ")", ":", "pex_paths", "=", "[", "pex", ".", "path", "(", ")", "for", "pex", "in", "pexes", "if", "pex", "]", ...
Yields a pex builder at path with the given pexes already merged. :rtype: :class:`pex.pex_builder.PEXBuilder`
[ "Yields", "a", "pex", "builder", "at", "path", "with", "the", "given", "pexes", "already", "merged", "." ]
train
https://github.com/pantsbuild/pants/blob/b72e650da0df685824ffdcc71988b8c282d0962d/src/python/pants/backend/python/tasks/resolve_requirements_task_base.py#L121-L136
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Yields a pex builder at path with the given pexes already merged. :rtype: :class:`pex.pex_builder.PEXBuilder` ### Respons...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 56, 70...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 56, 70...
infobloxopen/infoblox-client
infoblox_client/connector.py
Connector.create_object
def create_object(self, obj_type, payload, return_fields=None): """Create an Infoblox object of type 'obj_type' Args: obj_type (str): Infoblox object type, e.g. 'network', 'range', etc. payload (dict): Payload with data to send ...
python
def create_object(self, obj_type, payload, return_fields=None): """Create an Infoblox object of type 'obj_type' Args: obj_type (str): Infoblox object type, e.g. 'network', 'range', etc. payload (dict): Payload with data to send ...
[ "def", "create_object", "(", "self", ",", "obj_type", ",", "payload", ",", "return_fields", "=", "None", ")", ":", "self", ".", "_validate_obj_type_or_die", "(", "obj_type", ")", "query_params", "=", "self", ".", "_build_query_params", "(", "return_fields", "=",...
Create an Infoblox object of type 'obj_type' Args: obj_type (str): Infoblox object type, e.g. 'network', 'range', etc. payload (dict): Payload with data to send return_fields (list): List of fields to be returned Returns...
[ "Create", "an", "Infoblox", "object", "of", "type", "obj_type" ]
train
https://github.com/infobloxopen/infoblox-client/blob/edeec62db1935784c728731b2ae7cf0fcc9bf84d/infoblox_client/connector.py#L345-L387
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create an Infoblox object of type 'obj_type' Args: obj_type (str): Infoblox object type, ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
deepmind/sonnet
sonnet/python/modules/basic.py
BatchReshape.transpose
def transpose(self, name=None): """Returns transpose batch reshape.""" if name is None: name = self.module_name + "_transpose" return BatchReshape(shape=lambda: self.input_shape, preserve_dims=self._preserve_dims, name=name)
python
def transpose(self, name=None): """Returns transpose batch reshape.""" if name is None: name = self.module_name + "_transpose" return BatchReshape(shape=lambda: self.input_shape, preserve_dims=self._preserve_dims, name=name)
[ "def", "transpose", "(", "self", ",", "name", "=", "None", ")", ":", "if", "name", "is", "None", ":", "name", "=", "self", ".", "module_name", "+", "\"_transpose\"", "return", "BatchReshape", "(", "shape", "=", "lambda", ":", "self", ".", "input_shape", ...
Returns transpose batch reshape.
[ "Returns", "transpose", "batch", "reshape", "." ]
train
https://github.com/deepmind/sonnet/blob/00612ca3178964d86b556e062694d808ff81fcca/sonnet/python/modules/basic.py#L868-L874
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Returns transpose batch reshape. ### Response: def transpose(self, name=None): """Returns transpose batch reshape.""" ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
saltstack/salt
salt/modules/git.py
stash
def stash(cwd, action='save', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout...
python
def stash(cwd, action='save', opts='', git_opts='', user=None, password=None, ignore_retcode=False, output_encoding=None): ''' Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout...
[ "def", "stash", "(", "cwd", ",", "action", "=", "'save'", ",", "opts", "=", "''", ",", "git_opts", "=", "''", ",", "user", "=", "None", ",", "password", "=", "None", ",", "ignore_retcode", "=", "False", ",", "output_encoding", "=", "None", ")", ":", ...
Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout opts Any additional options to add to the command line, in a single string. Use this to complete the ``git stash`` command by adding the remaining arguments (i.e. ``'save <st...
[ "Interface", "to", "git", "-", "stash", "(", "1", ")", "_", "returns", "the", "stdout", "from", "the", "git", "command" ]
train
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/git.py#L4544-L4623
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Interface to `git-stash(1)`_, returns the stdout from the git command cwd The path to the git checkout opts ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 5160, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 5160, ...
osrg/ryu
ryu/cmd/of_config_cli.py
Cmd.do_list_cap
def do_list_cap(self, line): """list_cap <peer> """ def f(p, args): for i in p.netconf.server_capabilities: print(i) self._request(line, f)
python
def do_list_cap(self, line): """list_cap <peer> """ def f(p, args): for i in p.netconf.server_capabilities: print(i) self._request(line, f)
[ "def", "do_list_cap", "(", "self", ",", "line", ")", ":", "def", "f", "(", "p", ",", "args", ")", ":", "for", "i", "in", "p", ".", "netconf", ".", "server_capabilities", ":", "print", "(", "i", ")", "self", ".", "_request", "(", "line", ",", "f",...
list_cap <peer>
[ "list_cap", "<peer", ">" ]
train
https://github.com/osrg/ryu/blob/6f906e72c92e10bd0264c9b91a2f7bb85b97780c/ryu/cmd/of_config_cli.py#L104-L112
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: list_cap <peer> ### Response: def do_list_cap(self, line): """list_cap <peer> """ def f(p, args): ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1638, ...
acoomans/flask-autodoc
examples/factory/blog/frontend.py
post_post
def post_post(): """Create a new post. Form Data: title, content, authorid. """ authorid = request.form.get('authorid', None) Post(request.form['title'], request.form['content'], users[authorid]) return redirect("/posts")
python
def post_post(): """Create a new post. Form Data: title, content, authorid. """ authorid = request.form.get('authorid', None) Post(request.form['title'], request.form['content'], users[authorid]) return redirect("/posts")
[ "def", "post_post", "(", ")", ":", "authorid", "=", "request", ".", "form", ".", "get", "(", "'authorid'", ",", "None", ")", "Post", "(", "request", ".", "form", "[", "'title'", "]", ",", "request", ".", "form", "[", "'content'", "]", ",", "users", ...
Create a new post. Form Data: title, content, authorid.
[ "Create", "a", "new", "post", ".", "Form", "Data", ":", "title", "content", "authorid", "." ]
train
https://github.com/acoomans/flask-autodoc/blob/6c77c8935b71fbf3243b5e589c5c255d0299d853/examples/factory/blog/frontend.py#L59-L67
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create a new post. Form Data: title, content, authorid. ### Response: def post_post(): """Create a new post. Form ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
dedupeio/dedupe
dedupe/api.py
GazetteerMatching.match
def match(self, messy_data, threshold=0.5, n_matches=1, generator=False): # pragma: no cover """Identifies pairs of records that refer to the same entity, returns tuples containing a set of record ids and a confidence score as a float between 0 and 1. The record_ids within each set should refer...
python
def match(self, messy_data, threshold=0.5, n_matches=1, generator=False): # pragma: no cover """Identifies pairs of records that refer to the same entity, returns tuples containing a set of record ids and a confidence score as a float between 0 and 1. The record_ids within each set should refer...
[ "def", "match", "(", "self", ",", "messy_data", ",", "threshold", "=", "0.5", ",", "n_matches", "=", "1", ",", "generator", "=", "False", ")", ":", "# pragma: no cover", "blocked_pairs", "=", "self", ".", "_blockData", "(", "messy_data", ")", "clusters", "...
Identifies pairs of records that refer to the same entity, returns tuples containing a set of record ids and a confidence score as a float between 0 and 1. The record_ids within each set should refer to the same entity and the confidence score is the estimated probability that the record...
[ "Identifies", "pairs", "of", "records", "that", "refer", "to", "the", "same", "entity", "returns", "tuples", "containing", "a", "set", "of", "record", "ids", "and", "a", "confidence", "score", "as", "a", "float", "between", "0", "and", "1", ".", "The", "...
train
https://github.com/dedupeio/dedupe/blob/9f7c9f84473a4bcacf0f2b11152d8ed3eb35d48b/dedupe/api.py#L920-L955
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Identifies pairs of records that refer to the same entity, returns tuples containing a set of record ids and a confiden...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 29401, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 29401, ...
apache/spark
python/pyspark/sql/functions.py
when
def when(condition, value): """Evaluates a list of conditions and returns one of multiple possible result expressions. If :func:`Column.otherwise` is not invoked, None is returned for unmatched conditions. :param condition: a boolean :class:`Column` expression. :param value: a literal value, or a :clas...
python
def when(condition, value): """Evaluates a list of conditions and returns one of multiple possible result expressions. If :func:`Column.otherwise` is not invoked, None is returned for unmatched conditions. :param condition: a boolean :class:`Column` expression. :param value: a literal value, or a :clas...
[ "def", "when", "(", "condition", ",", "value", ")", ":", "sc", "=", "SparkContext", ".", "_active_spark_context", "if", "not", "isinstance", "(", "condition", ",", "Column", ")", ":", "raise", "TypeError", "(", "\"condition should be a Column\"", ")", "v", "="...
Evaluates a list of conditions and returns one of multiple possible result expressions. If :func:`Column.otherwise` is not invoked, None is returned for unmatched conditions. :param condition: a boolean :class:`Column` expression. :param value: a literal value, or a :class:`Column` expression. >>> df....
[ "Evaluates", "a", "list", "of", "conditions", "and", "returns", "one", "of", "multiple", "possible", "result", "expressions", ".", "If", ":", "func", ":", "Column", ".", "otherwise", "is", "not", "invoked", "None", "is", "returned", "for", "unmatched", "cond...
train
https://github.com/apache/spark/blob/618d6bff71073c8c93501ab7392c3cc579730f0b/python/pyspark/sql/functions.py#L756-L774
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Evaluates a list of conditions and returns one of multiple possible result expressions. If :func:`Column.otherwise` is not ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 36, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 36, 26...
Pipoline/rocket-python
rocketchat/api.py
RocketChatAPI.get_user_info
def get_user_info(self, user_id, **kwargs): """ Retrieves information about a user, the result is only limited to what the callee has access to view. :param user_id: :param kwargs: :return: """ return GetUserInfo(settings=self.settings, **kwargs).call( ...
python
def get_user_info(self, user_id, **kwargs): """ Retrieves information about a user, the result is only limited to what the callee has access to view. :param user_id: :param kwargs: :return: """ return GetUserInfo(settings=self.settings, **kwargs).call( ...
[ "def", "get_user_info", "(", "self", ",", "user_id", ",", "*", "*", "kwargs", ")", ":", "return", "GetUserInfo", "(", "settings", "=", "self", ".", "settings", ",", "*", "*", "kwargs", ")", ".", "call", "(", "user_id", "=", "user_id", ",", "*", "*", ...
Retrieves information about a user, the result is only limited to what the callee has access to view. :param user_id: :param kwargs: :return:
[ "Retrieves", "information", "about", "a", "user", "the", "result", "is", "only", "limited", "to", "what", "the", "callee", "has", "access", "to", "view", ".", ":", "param", "user_id", ":", ":", "param", "kwargs", ":", ":", "return", ":" ]
train
https://github.com/Pipoline/rocket-python/blob/643ece8a9db106922e019984a859ca04283262ff/rocketchat/api.py#L180-L191
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Retrieves information about a user, the result is only limited to what the callee has access to view. :param us...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12289, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12289, ...
eqcorrscan/EQcorrscan
eqcorrscan/utils/mag_calc.py
calc_b_value
def calc_b_value(magnitudes, completeness, max_mag=None, plotvar=True): """ Calculate the b-value for a range of completeness magnitudes. Calculates a power-law fit to given magnitudes for each completeness magnitude. Plots the b-values and residuals for the fitted catalogue against the completene...
python
def calc_b_value(magnitudes, completeness, max_mag=None, plotvar=True): """ Calculate the b-value for a range of completeness magnitudes. Calculates a power-law fit to given magnitudes for each completeness magnitude. Plots the b-values and residuals for the fitted catalogue against the completene...
[ "def", "calc_b_value", "(", "magnitudes", ",", "completeness", ",", "max_mag", "=", "None", ",", "plotvar", "=", "True", ")", ":", "b_values", "=", "[", "]", "# Calculate the cdf for all magnitudes", "counts", "=", "Counter", "(", "magnitudes", ")", "cdf", "="...
Calculate the b-value for a range of completeness magnitudes. Calculates a power-law fit to given magnitudes for each completeness magnitude. Plots the b-values and residuals for the fitted catalogue against the completeness values. Computes fits using numpy.polyfit, which uses a least-squares techniq...
[ "Calculate", "the", "b", "-", "value", "for", "a", "range", "of", "completeness", "magnitudes", "." ]
train
https://github.com/eqcorrscan/EQcorrscan/blob/3121b4aca801ee5d38f56ca297ce1c0f9515d9ff/eqcorrscan/utils/mag_calc.py#L132-L228
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Calculate the b-value for a range of completeness magnitudes. Calculates a power-law fit to given magnitudes for each comp...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48966, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48966, ...
carpedm20/fbchat
fbchat/_client.py
Client.setDefaultThread
def setDefaultThread(self, thread_id, thread_type): """ Sets default thread to send messages to :param thread_id: User/Group ID to default to. See :ref:`intro_threads` :param thread_type: See :ref:`intro_threads` :type thread_type: models.ThreadType """ self._def...
python
def setDefaultThread(self, thread_id, thread_type): """ Sets default thread to send messages to :param thread_id: User/Group ID to default to. See :ref:`intro_threads` :param thread_type: See :ref:`intro_threads` :type thread_type: models.ThreadType """ self._def...
[ "def", "setDefaultThread", "(", "self", ",", "thread_id", ",", "thread_type", ")", ":", "self", ".", "_default_thread_id", "=", "thread_id", "self", ".", "_default_thread_type", "=", "thread_type" ]
Sets default thread to send messages to :param thread_id: User/Group ID to default to. See :ref:`intro_threads` :param thread_type: See :ref:`intro_threads` :type thread_type: models.ThreadType
[ "Sets", "default", "thread", "to", "send", "messages", "to" ]
train
https://github.com/carpedm20/fbchat/blob/f480d68b5773473e6daba7f66075ee30e8d737a8/fbchat/_client.py#L550-L559
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Sets default thread to send messages to :param thread_id: User/Group ID to default to. See :ref:`intro_threads` ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 31275, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 31275, ...
SKA-ScienceDataProcessor/integration-prototype
sip/execution_control/configuration_db/sip_config_db/scheduling/workflow_definitions.py
get_workflow
def get_workflow(workflow_id: str, workflow_version: str) -> dict: """Get a workflow definition from the Configuration Database. Args: workflow_id (str): Workflow identifier workflow_version (str): Workflow version Returns: dict, Workflow definition dictionary """ name = "...
python
def get_workflow(workflow_id: str, workflow_version: str) -> dict: """Get a workflow definition from the Configuration Database. Args: workflow_id (str): Workflow identifier workflow_version (str): Workflow version Returns: dict, Workflow definition dictionary """ name = "...
[ "def", "get_workflow", "(", "workflow_id", ":", "str", ",", "workflow_version", ":", "str", ")", "->", "dict", ":", "name", "=", "\"workflow_definitions:{}:{}\"", ".", "format", "(", "workflow_id", ",", "workflow_version", ")", "workflow", "=", "DB", ".", "get...
Get a workflow definition from the Configuration Database. Args: workflow_id (str): Workflow identifier workflow_version (str): Workflow version Returns: dict, Workflow definition dictionary
[ "Get", "a", "workflow", "definition", "from", "the", "Configuration", "Database", "." ]
train
https://github.com/SKA-ScienceDataProcessor/integration-prototype/blob/8c8006de6ad71dcd44114b0338780738079c87d4/sip/execution_control/configuration_db/sip_config_db/scheduling/workflow_definitions.py#L91-L105
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Get a workflow definition from the Configuration Database. Args: workflow_id (str): Workflow identifier wo...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1991, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1991, ...
brocade/pynos
pynos/versions/ver_6/ver_6_0_1/yang/brocade_common_def.py
brocade_common_def.router_fabric_virtual_gateway_address_family_ipv6_enable_global
def router_fabric_virtual_gateway_address_family_ipv6_enable_global(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") router = ET.SubElement(config, "router", xmlns="urn:brocade.com:mgmt:brocade-common-def") fabric_virtual_gateway = ET.SubElement(router, "...
python
def router_fabric_virtual_gateway_address_family_ipv6_enable_global(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") router = ET.SubElement(config, "router", xmlns="urn:brocade.com:mgmt:brocade-common-def") fabric_virtual_gateway = ET.SubElement(router, "...
[ "def", "router_fabric_virtual_gateway_address_family_ipv6_enable_global", "(", "self", ",", "*", "*", "kwargs", ")", ":", "config", "=", "ET", ".", "Element", "(", "\"config\"", ")", "router", "=", "ET", ".", "SubElement", "(", "config", ",", "\"router\"", ",", ...
Auto Generated Code
[ "Auto", "Generated", "Code" ]
train
https://github.com/brocade/pynos/blob/bd8a34e98f322de3fc06750827d8bbc3a0c00380/pynos/versions/ver_6/ver_6_0_1/yang/brocade_common_def.py#L1164-L1175
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Auto Generated Code ### Response: def router_fabric_virtual_gateway_address_family_ipv6_enable_global(self, **kwargs): ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13556, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 13556, ...
stevearc/dynamo3
dynamo3/connection.py
DynamoDBConnection.put_item
def put_item(self, tablename, item, expected=None, returns=NONE, return_capacity=None, expect_or=False, **kwargs): """ Store an item, overwriting existing data This uses the older version of the DynamoDB API. See also: :meth:`~.put_item2`. Parameters --...
python
def put_item(self, tablename, item, expected=None, returns=NONE, return_capacity=None, expect_or=False, **kwargs): """ Store an item, overwriting existing data This uses the older version of the DynamoDB API. See also: :meth:`~.put_item2`. Parameters --...
[ "def", "put_item", "(", "self", ",", "tablename", ",", "item", ",", "expected", "=", "None", ",", "returns", "=", "NONE", ",", "return_capacity", "=", "None", ",", "expect_or", "=", "False", ",", "*", "*", "kwargs", ")", ":", "keywords", "=", "{", "}...
Store an item, overwriting existing data This uses the older version of the DynamoDB API. See also: :meth:`~.put_item2`. Parameters ---------- tablename : str Name of the table to write item : dict Item data expected : dict, optional ...
[ "Store", "an", "item", "overwriting", "existing", "data" ]
train
https://github.com/stevearc/dynamo3/blob/f897c40ece28586272dbcab8f0d99a14a1831dda/dynamo3/connection.py#L466-L513
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Store an item, overwriting existing data This uses the older version of the DynamoDB API. See also: :meth:`~.p...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6221, ...
atl/py-smartdc
smartdc/datacenter.py
DataCenter.delete_key
def delete_key(self, key_id): """ :: DELETE /:login/keys/:key :param key_id: identifier for an individual key record for the account :type key_id: :py:class:`basestring` Deletes an SSH key from the server identified by `key_id`. """ ...
python
def delete_key(self, key_id): """ :: DELETE /:login/keys/:key :param key_id: identifier for an individual key record for the account :type key_id: :py:class:`basestring` Deletes an SSH key from the server identified by `key_id`. """ ...
[ "def", "delete_key", "(", "self", ",", "key_id", ")", ":", "j", ",", "r", "=", "self", ".", "request", "(", "'DELETE'", ",", "'/keys/'", "+", "str", "(", "key_id", ")", ")", "r", ".", "raise_for_status", "(", ")", "return", "j" ]
:: DELETE /:login/keys/:key :param key_id: identifier for an individual key record for the account :type key_id: :py:class:`basestring` Deletes an SSH key from the server identified by `key_id`.
[ "::", "DELETE", "/", ":", "login", "/", "keys", "/", ":", "key", ":", "param", "key_id", ":", "identifier", "for", "an", "individual", "key", "record", "for", "the", "account", ":", "type", "key_id", ":", ":", "py", ":", "class", ":", "basestring", "...
train
https://github.com/atl/py-smartdc/blob/cc5cd5910e19004cc46e376ce035affe28fc798e/smartdc/datacenter.py#L430-L443
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: :: DELETE /:login/keys/:key :param key_id: identifier for an individual key record for th...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 50677, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 50677, ...
saltstack/salt
salt/modules/file.py
restorecon
def restorecon(path, recursive=False): ''' Reset the SELinux context on a given path CLI Example: .. code-block:: bash salt '*' file.restorecon /home/user/.ssh/authorized_keys ''' if recursive: cmd = ['restorecon', '-FR', path] else: cmd = ['restorecon', '-F', pat...
python
def restorecon(path, recursive=False): ''' Reset the SELinux context on a given path CLI Example: .. code-block:: bash salt '*' file.restorecon /home/user/.ssh/authorized_keys ''' if recursive: cmd = ['restorecon', '-FR', path] else: cmd = ['restorecon', '-F', pat...
[ "def", "restorecon", "(", "path", ",", "recursive", "=", "False", ")", ":", "if", "recursive", ":", "cmd", "=", "[", "'restorecon'", ",", "'-FR'", ",", "path", "]", "else", ":", "cmd", "=", "[", "'restorecon'", ",", "'-F'", ",", "path", "]", "return"...
Reset the SELinux context on a given path CLI Example: .. code-block:: bash salt '*' file.restorecon /home/user/.ssh/authorized_keys
[ "Reset", "the", "SELinux", "context", "on", "a", "given", "path" ]
train
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/file.py#L3866-L3880
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Reset the SELinux context on a given path CLI Example: .. code-block:: bash salt '*' file.restorecon /home/...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 15172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 15172, ...
pyviz/holoviews
holoviews/core/spaces.py
DynamicMap.relabel
def relabel(self, label=None, group=None, depth=1): """Clone object and apply new group and/or label. Applies relabeling to children up to the supplied depth. Args: label (str, optional): New label to apply to returned object group (str, optional): New group to apply to...
python
def relabel(self, label=None, group=None, depth=1): """Clone object and apply new group and/or label. Applies relabeling to children up to the supplied depth. Args: label (str, optional): New label to apply to returned object group (str, optional): New group to apply to...
[ "def", "relabel", "(", "self", ",", "label", "=", "None", ",", "group", "=", "None", ",", "depth", "=", "1", ")", ":", "relabelled", "=", "super", "(", "DynamicMap", ",", "self", ")", ".", "relabel", "(", "label", ",", "group", ",", "depth", ")", ...
Clone object and apply new group and/or label. Applies relabeling to children up to the supplied depth. Args: label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to wh...
[ "Clone", "object", "and", "apply", "new", "group", "and", "/", "or", "label", "." ]
train
https://github.com/pyviz/holoviews/blob/ae0dd2f3de448b0ca5e9065aabd6ef8d84c7e655/holoviews/core/spaces.py#L1435-L1461
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Clone object and apply new group and/or label. Applies relabeling to children up to the supplied depth. Args:...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38777, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38777, ...
openstack/hacking
hacking/core.py
is_import_exception
def is_import_exception(mod): """Check module name to see if import has been whitelisted. Import based rules should not run on any whitelisted module """ return (mod in IMPORT_EXCEPTIONS or any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
python
def is_import_exception(mod): """Check module name to see if import has been whitelisted. Import based rules should not run on any whitelisted module """ return (mod in IMPORT_EXCEPTIONS or any(mod.startswith(m + '.') for m in IMPORT_EXCEPTIONS))
[ "def", "is_import_exception", "(", "mod", ")", ":", "return", "(", "mod", "in", "IMPORT_EXCEPTIONS", "or", "any", "(", "mod", ".", "startswith", "(", "m", "+", "'.'", ")", "for", "m", "in", "IMPORT_EXCEPTIONS", ")", ")" ]
Check module name to see if import has been whitelisted. Import based rules should not run on any whitelisted module
[ "Check", "module", "name", "to", "see", "if", "import", "has", "been", "whitelisted", "." ]
train
https://github.com/openstack/hacking/blob/10e58f907181cac91d3b2af422c2458b04a1ec79/hacking/core.py#L91-L97
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Check module name to see if import has been whitelisted. Import based rules should not run on any whitelisted module #...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4061, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4061, ...
mkoura/dump2polarion
dump2polarion/csv2sqlite_cli.py
dump2sqlite
def dump2sqlite(records, output_file): """Dumps tests results to database.""" results_keys = list(records.results[0].keys()) pad_data = [] for key in REQUIRED_KEYS: if key not in results_keys: results_keys.append(key) pad_data.append("") conn = sqlite3.connect(os.pa...
python
def dump2sqlite(records, output_file): """Dumps tests results to database.""" results_keys = list(records.results[0].keys()) pad_data = [] for key in REQUIRED_KEYS: if key not in results_keys: results_keys.append(key) pad_data.append("") conn = sqlite3.connect(os.pa...
[ "def", "dump2sqlite", "(", "records", ",", "output_file", ")", ":", "results_keys", "=", "list", "(", "records", ".", "results", "[", "0", "]", ".", "keys", "(", ")", ")", "pad_data", "=", "[", "]", "for", "key", "in", "REQUIRED_KEYS", ":", "if", "ke...
Dumps tests results to database.
[ "Dumps", "tests", "results", "to", "database", "." ]
train
https://github.com/mkoura/dump2polarion/blob/f4bd24e9d5070e282aad15f1e8bb514c0525cd37/dump2polarion/csv2sqlite_cli.py#L42-L77
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Dumps tests results to database. ### Response: def dump2sqlite(records, output_file): """Dumps tests results to database."...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 35, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 35, 12...
nicolargo/glances
glances/plugins/glances_fs.py
Plugin.update
def update(self): """Update the FS stats using the input method.""" # Init new stats stats = self.get_init_value() if self.input_method == 'local': # Update stats using the standard system lib # Grab the stats using the psutil disk_partitions # If 'a...
python
def update(self): """Update the FS stats using the input method.""" # Init new stats stats = self.get_init_value() if self.input_method == 'local': # Update stats using the standard system lib # Grab the stats using the psutil disk_partitions # If 'a...
[ "def", "update", "(", "self", ")", ":", "# Init new stats", "stats", "=", "self", ".", "get_init_value", "(", ")", "if", "self", ".", "input_method", "==", "'local'", ":", "# Update stats using the standard system lib", "# Grab the stats using the psutil disk_partitions",...
Update the FS stats using the input method.
[ "Update", "the", "FS", "stats", "using", "the", "input", "method", "." ]
train
https://github.com/nicolargo/glances/blob/5bd4d587a736e0d2b03170b56926841d2a3eb7ee/glances/plugins/glances_fs.py#L88-L181
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Update the FS stats using the input method. ### Response: def update(self): """Update the FS stats using the input met...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4387, ...
bram85/topydo
topydo/ui/CLIApplicationBase.py
_retrieve_archive
def _retrieve_archive(): """ Returns a tuple with archive content: the first element is a TodoListBase and the second element is a TodoFile. """ archive_file = TodoFile.TodoFile(config().archive()) archive = TodoListBase.TodoListBase(archive_file.read()) return (archive, archive_file)
python
def _retrieve_archive(): """ Returns a tuple with archive content: the first element is a TodoListBase and the second element is a TodoFile. """ archive_file = TodoFile.TodoFile(config().archive()) archive = TodoListBase.TodoListBase(archive_file.read()) return (archive, archive_file)
[ "def", "_retrieve_archive", "(", ")", ":", "archive_file", "=", "TodoFile", ".", "TodoFile", "(", "config", "(", ")", ".", "archive", "(", ")", ")", "archive", "=", "TodoListBase", ".", "TodoListBase", "(", "archive_file", ".", "read", "(", ")", ")", "re...
Returns a tuple with archive content: the first element is a TodoListBase and the second element is a TodoFile.
[ "Returns", "a", "tuple", "with", "archive", "content", ":", "the", "first", "element", "is", "a", "TodoListBase", "and", "the", "second", "element", "is", "a", "TodoFile", "." ]
train
https://github.com/bram85/topydo/blob/b59fcfca5361869a6b78d4c9808c7c6cd0a18b58/topydo/ui/CLIApplicationBase.py#L154-L162
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Returns a tuple with archive content: the first element is a TodoListBase and the second element is a TodoFile. ### Respon...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 16851, ...
mikedh/trimesh
trimesh/proximity.py
closest_point
def closest_point(mesh, points): """ Given a mesh and a list of points, find the closest point on any triangle. Parameters ---------- mesh : Trimesh object points : (m,3) float, points in space Returns ---------- closest : (m,3) float, closest point on triangles for each po...
python
def closest_point(mesh, points): """ Given a mesh and a list of points, find the closest point on any triangle. Parameters ---------- mesh : Trimesh object points : (m,3) float, points in space Returns ---------- closest : (m,3) float, closest point on triangles for each po...
[ "def", "closest_point", "(", "mesh", ",", "points", ")", ":", "points", "=", "np", ".", "asanyarray", "(", "points", ",", "dtype", "=", "np", ".", "float64", ")", "if", "not", "util", ".", "is_shape", "(", "points", ",", "(", "-", "1", ",", "3", ...
Given a mesh and a list of points, find the closest point on any triangle. Parameters ---------- mesh : Trimesh object points : (m,3) float, points in space Returns ---------- closest : (m,3) float, closest point on triangles for each point distance : (m,) float, distance ...
[ "Given", "a", "mesh", "and", "a", "list", "of", "points", "find", "the", "closest", "point", "on", "any", "triangle", "." ]
train
https://github.com/mikedh/trimesh/blob/25e059bf6d4caa74f62ffd58ce4f61a90ee4e518/trimesh/proximity.py#L112-L202
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Given a mesh and a list of points, find the closest point on any triangle. Parameters ---------- mesh : Trimesh ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 22818, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 22818, ...
FNNDSC/pftree
pftree/pftree.py
pftree.tree_construct
def tree_construct(self, *args, **kwargs): """ Processes the <l_files> list of files from the tree_probe() and builds the input/output dictionary structures. Optionally execute a constructCallback function, and return results """ l_files = [] ...
python
def tree_construct(self, *args, **kwargs): """ Processes the <l_files> list of files from the tree_probe() and builds the input/output dictionary structures. Optionally execute a constructCallback function, and return results """ l_files = [] ...
[ "def", "tree_construct", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "l_files", "=", "[", "]", "d_constructCallback", "=", "{", "}", "fn_constructCallback", "=", "None", "for", "k", ",", "v", "in", "kwargs", ".", "items", "(", "...
Processes the <l_files> list of files from the tree_probe() and builds the input/output dictionary structures. Optionally execute a constructCallback function, and return results
[ "Processes", "the", "<l_files", ">", "list", "of", "files", "from", "the", "tree_probe", "()", "and", "builds", "the", "input", "/", "output", "dictionary", "structures", "." ]
train
https://github.com/FNNDSC/pftree/blob/b841e337c976bce151735f9d5dd95eded62aa094/pftree/pftree.py#L241-L273
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Processes the <l_files> list of files from the tree_probe() and builds the input/output dictionary structures. ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 93827, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 93827, ...
etal/biofrills
biofrills/pairutils.py
identity_abs
def identity_abs(aseq, bseq): """Compute absolute identity (# matching sites) between sequence strings.""" assert len(aseq) == len(bseq) return sum(a == b for a, b in zip(aseq, bseq) if not (a in '-.' and b in '-.'))
python
def identity_abs(aseq, bseq): """Compute absolute identity (# matching sites) between sequence strings.""" assert len(aseq) == len(bseq) return sum(a == b for a, b in zip(aseq, bseq) if not (a in '-.' and b in '-.'))
[ "def", "identity_abs", "(", "aseq", ",", "bseq", ")", ":", "assert", "len", "(", "aseq", ")", "==", "len", "(", "bseq", ")", "return", "sum", "(", "a", "==", "b", "for", "a", ",", "b", "in", "zip", "(", "aseq", ",", "bseq", ")", "if", "not", ...
Compute absolute identity (# matching sites) between sequence strings.
[ "Compute", "absolute", "identity", "(", "#", "matching", "sites", ")", "between", "sequence", "strings", "." ]
train
https://github.com/etal/biofrills/blob/36684bb6c7632f96215e8b2b4ebc86640f331bcd/biofrills/pairutils.py#L119-L124
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Compute absolute identity (# matching sites) between sequence strings. ### Response: def identity_abs(aseq, bseq): """Comp...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 47354, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 47354, ...
quantmind/pulsar
examples/philosophers/manage.py
DiningPhilosophers.release_forks
async def release_forks(self, philosopher): '''The ``philosopher`` has just eaten and is ready to release both forks. This method releases them, one by one, by sending the ``put_down`` action to the monitor. ''' forks = self.forks self.forks = [] self.sta...
python
async def release_forks(self, philosopher): '''The ``philosopher`` has just eaten and is ready to release both forks. This method releases them, one by one, by sending the ``put_down`` action to the monitor. ''' forks = self.forks self.forks = [] self.sta...
[ "async", "def", "release_forks", "(", "self", ",", "philosopher", ")", ":", "forks", "=", "self", ".", "forks", "self", ".", "forks", "=", "[", "]", "self", ".", "started_waiting", "=", "0", "for", "fork", "in", "forks", ":", "philosopher", ".", "logge...
The ``philosopher`` has just eaten and is ready to release both forks. This method releases them, one by one, by sending the ``put_down`` action to the monitor.
[ "The", "philosopher", "has", "just", "eaten", "and", "is", "ready", "to", "release", "both", "forks", "." ]
train
https://github.com/quantmind/pulsar/blob/fee44e871954aa6ca36d00bb5a3739abfdb89b26/examples/philosophers/manage.py#L177-L190
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: The ``philosopher`` has just eaten and is ready to release both forks. This method releases them, one by one, ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 791, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 791, 1...
Microsoft/LightGBM
python-package/lightgbm/engine.py
train
def train(params, train_set, num_boost_round=100, valid_sets=None, valid_names=None, fobj=None, feval=None, init_model=None, feature_name='auto', categorical_feature='auto', early_stopping_rounds=None, evals_result=None, verbose_eval=True, learning_rates=None, ...
python
def train(params, train_set, num_boost_round=100, valid_sets=None, valid_names=None, fobj=None, feval=None, init_model=None, feature_name='auto', categorical_feature='auto', early_stopping_rounds=None, evals_result=None, verbose_eval=True, learning_rates=None, ...
[ "def", "train", "(", "params", ",", "train_set", ",", "num_boost_round", "=", "100", ",", "valid_sets", "=", "None", ",", "valid_names", "=", "None", ",", "fobj", "=", "None", ",", "feval", "=", "None", ",", "init_model", "=", "None", ",", "feature_name"...
Perform the training with given parameters. Parameters ---------- params : dict Parameters for training. train_set : Dataset Data to be trained on. num_boost_round : int, optional (default=100) Number of boosting iterations. valid_sets : list of Datasets or None, optiona...
[ "Perform", "the", "training", "with", "given", "parameters", "." ]
train
https://github.com/Microsoft/LightGBM/blob/8d2ec69f4f685b0ab1c4624d59ee2d3287bb3147/python-package/lightgbm/engine.py#L19-L245
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Perform the training with given parameters. Parameters ---------- params : dict Parameters for training. ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48051, ...
adaptive-learning/proso-apps
proso_models/models.py
ItemManager.get_graph
def get_graph(self, item_ids, language=None): """ Get a subgraph of items reachable from the given set of items through any relation. Args: item_ids (list): items which are taken as roots for the reachability language (str): if specified, filter out items which a...
python
def get_graph(self, item_ids, language=None): """ Get a subgraph of items reachable from the given set of items through any relation. Args: item_ids (list): items which are taken as roots for the reachability language (str): if specified, filter out items which a...
[ "def", "get_graph", "(", "self", ",", "item_ids", ",", "language", "=", "None", ")", ":", "def", "_related", "(", "item_ids", ")", ":", "if", "item_ids", "is", "None", ":", "items", "=", "Item", ".", "objects", ".", "filter", "(", "active", "=", "Tru...
Get a subgraph of items reachable from the given set of items through any relation. Args: item_ids (list): items which are taken as roots for the reachability language (str): if specified, filter out items which are not available in the given language Re...
[ "Get", "a", "subgraph", "of", "items", "reachable", "from", "the", "given", "set", "of", "items", "through", "any", "relation", "." ]
train
https://github.com/adaptive-learning/proso-apps/blob/8278c72e498d6ef8d392cc47b48473f4ec037142/proso_models/models.py#L507-L532
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Get a subgraph of items reachable from the given set of items through any relation. Args: item_ids...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1991, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 1991, ...
ipfs/py-ipfs-api
ipfsapi/client.py
Client.pin_rm
def pin_rm(self, path, *paths, **kwargs): """Removes a pinned object from local storage. Removes the pin from the given object allowing it to be garbage collected if needed. .. code-block:: python >>> c.pin_rm('QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d') {...
python
def pin_rm(self, path, *paths, **kwargs): """Removes a pinned object from local storage. Removes the pin from the given object allowing it to be garbage collected if needed. .. code-block:: python >>> c.pin_rm('QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d') {...
[ "def", "pin_rm", "(", "self", ",", "path", ",", "*", "paths", ",", "*", "*", "kwargs", ")", ":", "#PY2: No support for kw-only parameters after glob parameters", "if", "\"recursive\"", "in", "kwargs", ":", "kwargs", ".", "setdefault", "(", "\"opts\"", ",", "{", ...
Removes a pinned object from local storage. Removes the pin from the given object allowing it to be garbage collected if needed. .. code-block:: python >>> c.pin_rm('QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyGZ5d') {'Pins': ['QmfZY61ukoQuCX8e5Pt7v8pRfhkyxwZKZMTodAtmvyG...
[ "Removes", "a", "pinned", "object", "from", "local", "storage", "." ]
train
https://github.com/ipfs/py-ipfs-api/blob/7574dad04877b45dbe4ad321dcfa9e880eb2d90c/ipfsapi/client.py#L1055-L1083
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Removes a pinned object from local storage. Removes the pin from the given object allowing it to be garbage co...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6728, ...
davidfokkema/artist
artist/utils.py
create_graph_name
def create_graph_name(suffix='', dirname=None): """Create a graph name using the name of the caller. :param suffix: optional suffix to add to name :param dirname: optional directory name :return: path for the named graph :rtype: string """ if suffix: suffix = '-%s' % suffix ca...
python
def create_graph_name(suffix='', dirname=None): """Create a graph name using the name of the caller. :param suffix: optional suffix to add to name :param dirname: optional directory name :return: path for the named graph :rtype: string """ if suffix: suffix = '-%s' % suffix ca...
[ "def", "create_graph_name", "(", "suffix", "=", "''", ",", "dirname", "=", "None", ")", ":", "if", "suffix", ":", "suffix", "=", "'-%s'", "%", "suffix", "caller", "=", "get_callers_name", "(", "level", "=", "3", ")", "name", "=", "'%s%s%s%s'", "%", "("...
Create a graph name using the name of the caller. :param suffix: optional suffix to add to name :param dirname: optional directory name :return: path for the named graph :rtype: string
[ "Create", "a", "graph", "name", "using", "the", "name", "of", "the", "caller", "." ]
train
https://github.com/davidfokkema/artist/blob/26ae7987522622710f2910980770c50012fda47d/artist/utils.py#L51-L67
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create a graph name using the name of the caller. :param suffix: optional suffix to add to name :param dirname: option...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
elifesciences/elife-tools
elifetools/parseJATS.py
version_history
def version_history(soup, html_flag=True): "extract the article version history details" convert = lambda xml_string: xml_to_html(html_flag, xml_string) version_history = [] related_object_tags = raw_parser.related_object(raw_parser.article_meta(soup)) for tag in related_object_tags: article...
python
def version_history(soup, html_flag=True): "extract the article version history details" convert = lambda xml_string: xml_to_html(html_flag, xml_string) version_history = [] related_object_tags = raw_parser.related_object(raw_parser.article_meta(soup)) for tag in related_object_tags: article...
[ "def", "version_history", "(", "soup", ",", "html_flag", "=", "True", ")", ":", "convert", "=", "lambda", "xml_string", ":", "xml_to_html", "(", "html_flag", ",", "xml_string", ")", "version_history", "=", "[", "]", "related_object_tags", "=", "raw_parser", "....
extract the article version history details
[ "extract", "the", "article", "version", "history", "details" ]
train
https://github.com/elifesciences/elife-tools/blob/4b9e38cbe485c61a4ed7cbd8970c6b318334fd86/elifetools/parseJATS.py#L131-L150
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: extract the article version history details ### Response: def version_history(soup, html_flag=True): "extract the article ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 24396, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 24396, ...
SBRG/ssbio
ssbio/protein/sequence/properties/scratch.py
SCRATCH.sspro_summary
def sspro_summary(self): """Parse the SSpro output file and return a summary of secondary structure composition. The output file is just a FASTA formatted file, so you can get residue level information by parsing it like a normal sequence file. Returns: dict: Percentage...
python
def sspro_summary(self): """Parse the SSpro output file and return a summary of secondary structure composition. The output file is just a FASTA formatted file, so you can get residue level information by parsing it like a normal sequence file. Returns: dict: Percentage...
[ "def", "sspro_summary", "(", "self", ")", ":", "summary", "=", "{", "}", "records", "=", "ssbio", ".", "protein", ".", "sequence", ".", "utils", ".", "fasta", ".", "load_fasta_file", "(", "self", ".", "out_sspro", ")", "for", "r", "in", "records", ":",...
Parse the SSpro output file and return a summary of secondary structure composition. The output file is just a FASTA formatted file, so you can get residue level information by parsing it like a normal sequence file. Returns: dict: Percentage of: H: helix ...
[ "Parse", "the", "SSpro", "output", "file", "and", "return", "a", "summary", "of", "secondary", "structure", "composition", "." ]
train
https://github.com/SBRG/ssbio/blob/e9449e64ffc1a1f5ad07e5849aa12a650095f8a2/ssbio/protein/sequence/properties/scratch.py#L80-L104
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Parse the SSpro output file and return a summary of secondary structure composition. The output file is just a FASTA f...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14802, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 14802, ...
trezor/python-trezor
trezorlib/cosi.py
sign_with_privkey
def sign_with_privkey( digest: bytes, privkey: Ed25519PrivateKey, global_pubkey: Ed25519PublicPoint, nonce: int, global_commit: Ed25519PublicPoint, ) -> Ed25519Signature: """Create a CoSi signature of `digest` with the supplied private key. This function needs to know the global public key a...
python
def sign_with_privkey( digest: bytes, privkey: Ed25519PrivateKey, global_pubkey: Ed25519PublicPoint, nonce: int, global_commit: Ed25519PublicPoint, ) -> Ed25519Signature: """Create a CoSi signature of `digest` with the supplied private key. This function needs to know the global public key a...
[ "def", "sign_with_privkey", "(", "digest", ":", "bytes", ",", "privkey", ":", "Ed25519PrivateKey", ",", "global_pubkey", ":", "Ed25519PublicPoint", ",", "nonce", ":", "int", ",", "global_commit", ":", "Ed25519PublicPoint", ",", ")", "->", "Ed25519Signature", ":", ...
Create a CoSi signature of `digest` with the supplied private key. This function needs to know the global public key and global commitment.
[ "Create", "a", "CoSi", "signature", "of", "digest", "with", "the", "supplied", "private", "key", ".", "This", "function", "needs", "to", "know", "the", "global", "public", "key", "and", "global", "commitment", "." ]
train
https://github.com/trezor/python-trezor/blob/2813522b05cef4e0e545a101f8b3559a3183b45b/trezorlib/cosi.py#L104-L118
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create a CoSi signature of `digest` with the supplied private key. This function needs to know the global public key and gl...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
botswana-harvard/edc-registration
edc_registration/signals.py
update_registered_subject_from_model_on_post_save
def update_registered_subject_from_model_on_post_save(sender, instance, raw, created, using, **kwargs): """Updates RegisteredSubject from models using UpdatesOrCreatesRegistrationModelMixin.""" if not raw and not kwargs.get('update_fields'): try: instance.registration_update_or_create() ...
python
def update_registered_subject_from_model_on_post_save(sender, instance, raw, created, using, **kwargs): """Updates RegisteredSubject from models using UpdatesOrCreatesRegistrationModelMixin.""" if not raw and not kwargs.get('update_fields'): try: instance.registration_update_or_create() ...
[ "def", "update_registered_subject_from_model_on_post_save", "(", "sender", ",", "instance", ",", "raw", ",", "created", ",", "using", ",", "*", "*", "kwargs", ")", ":", "if", "not", "raw", "and", "not", "kwargs", ".", "get", "(", "'update_fields'", ")", ":",...
Updates RegisteredSubject from models using UpdatesOrCreatesRegistrationModelMixin.
[ "Updates", "RegisteredSubject", "from", "models", "using", "UpdatesOrCreatesRegistrationModelMixin", "." ]
train
https://github.com/botswana-harvard/edc-registration/blob/3daca624a496945fd4536488f6f80790bbecc081/edc_registration/signals.py#L7-L14
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Updates RegisteredSubject from models using UpdatesOrCreatesRegistrationModelMixin. ### Response: def update_registered_subjec...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 38191, ...
sigsep/sigsep-mus-eval
museval/metrics.py
_zeropad
def _zeropad(sig, N, axis=0): """pads with N zeros at the end of the signal, along given axis""" # ensures concatenation dimension is the first sig = np.moveaxis(sig, axis, 0) # zero pad out = np.zeros((sig.shape[0] + N,) + sig.shape[1:]) out[:sig.shape[0], ...] = sig # put back axis in plac...
python
def _zeropad(sig, N, axis=0): """pads with N zeros at the end of the signal, along given axis""" # ensures concatenation dimension is the first sig = np.moveaxis(sig, axis, 0) # zero pad out = np.zeros((sig.shape[0] + N,) + sig.shape[1:]) out[:sig.shape[0], ...] = sig # put back axis in plac...
[ "def", "_zeropad", "(", "sig", ",", "N", ",", "axis", "=", "0", ")", ":", "# ensures concatenation dimension is the first", "sig", "=", "np", ".", "moveaxis", "(", "sig", ",", "axis", ",", "0", ")", "# zero pad", "out", "=", "np", ".", "zeros", "(", "(...
pads with N zeros at the end of the signal, along given axis
[ "pads", "with", "N", "zeros", "at", "the", "end", "of", "the", "signal", "along", "given", "axis" ]
train
https://github.com/sigsep/sigsep-mus-eval/blob/a7c9af3647f0c0bb9bbaeccec0b1a6a9e09d1e2d/museval/metrics.py#L488-L497
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: pads with N zeros at the end of the signal, along given axis ### Response: def _zeropad(sig, N, axis=0): """pads with N ze...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 79, 78...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 79, 78...
JasonKessler/scattertext
scattertext/TermDocMatrixFactory.py
TermDocMatrixFactory.censor_entity_types
def censor_entity_types(self, entity_types): # type: (set) -> TermDocMatrixFactory ''' Entity types to exclude from feature construction. Terms matching specificed entities, instead of labeled by their lower case orthographic form or lemma, will be labeled by their entity type. ...
python
def censor_entity_types(self, entity_types): # type: (set) -> TermDocMatrixFactory ''' Entity types to exclude from feature construction. Terms matching specificed entities, instead of labeled by their lower case orthographic form or lemma, will be labeled by their entity type. ...
[ "def", "censor_entity_types", "(", "self", ",", "entity_types", ")", ":", "# type: (set) -> TermDocMatrixFactory", "assert", "type", "(", "entity_types", ")", "==", "set", "self", ".", "_entity_types_to_censor", "=", "entity_types", "self", ".", "_feats_from_spacy_doc",...
Entity types to exclude from feature construction. Terms matching specificed entities, instead of labeled by their lower case orthographic form or lemma, will be labeled by their entity type. Parameters ---------- entity_types : set of entity types outputted by spaCy '...
[ "Entity", "types", "to", "exclude", "from", "feature", "construction", ".", "Terms", "matching", "specificed", "entities", "instead", "of", "labeled", "by", "their", "lower", "case", "orthographic", "form", "or", "lemma", "will", "be", "labeled", "by", "their", ...
train
https://github.com/JasonKessler/scattertext/blob/cacf1f687d218ee8cae3fc05cc901db824bb1b81/scattertext/TermDocMatrixFactory.py#L149-L172
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Entity types to exclude from feature construction. Terms matching specificed entities, instead of labeled by their lowe...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 3106, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 3106, ...
erikrose/more-itertools
more_itertools/more.py
map_reduce
def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): """Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it ...
python
def map_reduce(iterable, keyfunc, valuefunc=None, reducefunc=None): """Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it ...
[ "def", "map_reduce", "(", "iterable", ",", "keyfunc", ",", "valuefunc", "=", "None", ",", "reducefunc", "=", "None", ")", ":", "valuefunc", "=", "(", "lambda", "x", ":", "x", ")", "if", "(", "valuefunc", "is", "None", ")", "else", "valuefunc", "ret", ...
Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*, and then summarizes them by category with *reducefunc*. *valuefunc* defaults to the identity function if it is unspecified. If *reducefunc* is unspecified, no summarization takes ...
[ "Return", "a", "dictionary", "that", "maps", "the", "items", "in", "*", "iterable", "*", "to", "categories", "defined", "by", "*", "keyfunc", "*", "transforms", "them", "with", "*", "valuefunc", "*", "and", "then", "summarizes", "them", "by", "category", "...
train
https://github.com/erikrose/more-itertools/blob/6a91b4e25c8e12fcf9fc2b53cf8ee0fba293e6f9/more_itertools/more.py#L2190-L2254
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Return a dictionary that maps the items in *iterable* to categories defined by *keyfunc*, transforms them with *valuefunc*,...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 5715, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 5715, ...
ikegami-yukino/jaconv
jaconv/jaconv.py
normalize
def normalize(text, mode='NFKC', ignore=''): """Convert Half-width (Hankaku) Katakana to Full-width (Zenkaku) Katakana, Full-width (Zenkaku) ASCII and DIGIT to Half-width (Hankaku) ASCII and DIGIT. Additionally, Full-width wave dash (〜) etc. are normalized Parameters ---------- text : str ...
python
def normalize(text, mode='NFKC', ignore=''): """Convert Half-width (Hankaku) Katakana to Full-width (Zenkaku) Katakana, Full-width (Zenkaku) ASCII and DIGIT to Half-width (Hankaku) ASCII and DIGIT. Additionally, Full-width wave dash (〜) etc. are normalized Parameters ---------- text : str ...
[ "def", "normalize", "(", "text", ",", "mode", "=", "'NFKC'", ",", "ignore", "=", "''", ")", ":", "text", "=", "text", ".", "replace", "(", "'〜', ", "'", "').re", "p", "l", "ace('~'", ",", " 'ー')", "", "", "", "text", "=", "text", ".", "replace", ...
Convert Half-width (Hankaku) Katakana to Full-width (Zenkaku) Katakana, Full-width (Zenkaku) ASCII and DIGIT to Half-width (Hankaku) ASCII and DIGIT. Additionally, Full-width wave dash (〜) etc. are normalized Parameters ---------- text : str Source string. mode : str Unicode...
[ "Convert", "Half", "-", "width", "(", "Hankaku", ")", "Katakana", "to", "Full", "-", "width", "(", "Zenkaku", ")", "Katakana", "Full", "-", "width", "(", "Zenkaku", ")", "ASCII", "and", "DIGIT", "to", "Half", "-", "width", "(", "Hankaku", ")", "ASCII",...
train
https://github.com/ikegami-yukino/jaconv/blob/5319e4c6b4676ab27b5e9ebec9a299d09a5a62d7/jaconv/jaconv.py#L232-L264
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Convert Half-width (Hankaku) Katakana to Full-width (Zenkaku) Katakana, Full-width (Zenkaku) ASCII and DIGIT to Half-width ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 12281, ...
pytroll/satpy
satpy/readers/goes_imager_nc.py
GOESNCFileHandler.calibrate
def calibrate(self, counts, calibration, channel): """Perform calibration""" # Convert 16bit counts from netCDF4 file to the original 10bit # GVAR counts by dividing by 32. See [FAQ]. counts = counts / 32. coefs = CALIB_COEFS[self.platform_name][channel] if calibration =...
python
def calibrate(self, counts, calibration, channel): """Perform calibration""" # Convert 16bit counts from netCDF4 file to the original 10bit # GVAR counts by dividing by 32. See [FAQ]. counts = counts / 32. coefs = CALIB_COEFS[self.platform_name][channel] if calibration =...
[ "def", "calibrate", "(", "self", ",", "counts", ",", "calibration", ",", "channel", ")", ":", "# Convert 16bit counts from netCDF4 file to the original 10bit", "# GVAR counts by dividing by 32. See [FAQ].", "counts", "=", "counts", "/", "32.", "coefs", "=", "CALIB_COEFS", ...
Perform calibration
[ "Perform", "calibration" ]
train
https://github.com/pytroll/satpy/blob/1f21d20ac686b745fb0da9b4030d139893e066dd/satpy/readers/goes_imager_nc.py#L1001-L1021
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Perform calibration ### Response: def calibrate(self, counts, calibration, channel): """Perform calibration""" ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 48051, ...
prompt-toolkit/pymux
pymux/key_bindings.py
PymuxKeyBindings._load_prefix_binding
def _load_prefix_binding(self): """ Load the prefix key binding. """ pymux = self.pymux # Remove previous binding. if self._prefix_binding: self.custom_key_bindings.remove_binding(self._prefix_binding) # Create new Python binding. @self.custo...
python
def _load_prefix_binding(self): """ Load the prefix key binding. """ pymux = self.pymux # Remove previous binding. if self._prefix_binding: self.custom_key_bindings.remove_binding(self._prefix_binding) # Create new Python binding. @self.custo...
[ "def", "_load_prefix_binding", "(", "self", ")", ":", "pymux", "=", "self", ".", "pymux", "# Remove previous binding.", "if", "self", ".", "_prefix_binding", ":", "self", ".", "custom_key_bindings", ".", "remove_binding", "(", "self", ".", "_prefix_binding", ")", ...
Load the prefix key binding.
[ "Load", "the", "prefix", "key", "binding", "." ]
train
https://github.com/prompt-toolkit/pymux/blob/3f66e62b9de4b2251c7f9afad6c516dc5a30ec67/pymux/key_bindings.py#L50-L68
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Load the prefix key binding. ### Response: def _load_prefix_binding(self): """ Load the prefix key binding. ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6003, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 6003, ...
happyleavesaoc/aoc-mgz
mgz/enums.py
GameActionModeEnum
def GameActionModeEnum(ctx): """Game Action Modes.""" return Enum( ctx, diplomacy=0, speed=1, instant_build=2, quick_build=4, allied_victory=5, cheat=6, unk0=9, spy=10, unk1=11, farm_queue=13, farm_unqueue=14, ...
python
def GameActionModeEnum(ctx): """Game Action Modes.""" return Enum( ctx, diplomacy=0, speed=1, instant_build=2, quick_build=4, allied_victory=5, cheat=6, unk0=9, spy=10, unk1=11, farm_queue=13, farm_unqueue=14, ...
[ "def", "GameActionModeEnum", "(", "ctx", ")", ":", "return", "Enum", "(", "ctx", ",", "diplomacy", "=", "0", ",", "speed", "=", "1", ",", "instant_build", "=", "2", ",", "quick_build", "=", "4", ",", "allied_victory", "=", "5", ",", "cheat", "=", "6"...
Game Action Modes.
[ "Game", "Action", "Modes", "." ]
train
https://github.com/happyleavesaoc/aoc-mgz/blob/13fc379cc062d7640bfa028eed9c0d45d37a7b2b/mgz/enums.py#L250-L266
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Game Action Modes. ### Response: def GameActionModeEnum(ctx): """Game Action Modes.""" return Enum( ctx, ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4973, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4973, ...
DarkEnergySurvey/ugali
ugali/utils/config.py
Config._createFilenames
def _createFilenames(self): """ Create a masked records array of all filenames for the given set of pixels and store the existence of those files in the mask values. Parameters: ----------- None Returns: -------- recarray : pixels and mask value ...
python
def _createFilenames(self): """ Create a masked records array of all filenames for the given set of pixels and store the existence of those files in the mask values. Parameters: ----------- None Returns: -------- recarray : pixels and mask value ...
[ "def", "_createFilenames", "(", "self", ")", ":", "nside_catalog", "=", "self", "[", "'coords'", "]", "[", "'nside_catalog'", "]", "npix", "=", "hp", ".", "nside2npix", "(", "nside_catalog", ")", "pixels", "=", "np", ".", "arange", "(", "npix", ")", "cat...
Create a masked records array of all filenames for the given set of pixels and store the existence of those files in the mask values. Parameters: ----------- None Returns: -------- recarray : pixels and mask value
[ "Create", "a", "masked", "records", "array", "of", "all", "filenames", "for", "the", "given", "set", "of", "pixels", "and", "store", "the", "existence", "of", "those", "files", "in", "the", "mask", "values", "." ]
train
https://github.com/DarkEnergySurvey/ugali/blob/21e890b4117fc810afb6fb058e8055d564f03382/ugali/utils/config.py#L252-L303
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: Create a masked records array of all filenames for the given set of pixels and store the existence of those files in th...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 4110, ...
uber/tchannel-python
tchannel/tornado/message_factory.py
MessageFactory.build
def build(self, message): """buffer all the streaming messages based on the message id. Reconstruct all fragments together. :param message: incoming message :return: next complete message or None if streaming is not done """ context = None ...
python
def build(self, message): """buffer all the streaming messages based on the message id. Reconstruct all fragments together. :param message: incoming message :return: next complete message or None if streaming is not done """ context = None ...
[ "def", "build", "(", "self", ",", "message", ")", ":", "context", "=", "None", "if", "message", ".", "message_type", "in", "[", "Types", ".", "CALL_REQ", ",", "Types", ".", "CALL_RES", "]", ":", "self", ".", "verify_message", "(", "message", ")", "cont...
buffer all the streaming messages based on the message id. Reconstruct all fragments together. :param message: incoming message :return: next complete message or None if streaming is not done
[ "buffer", "all", "the", "streaming", "messages", "based", "on", "the", "message", "id", ".", "Reconstruct", "all", "fragments", "together", "." ]
train
https://github.com/uber/tchannel-python/blob/ee08cce6234f24fd2373774988186dd374306c43/tchannel/tornado/message_factory.py#L226-L309
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: buffer all the streaming messages based on the message id. Reconstruct all fragments together. :param message:...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 7726, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 7726, ...
geertj/gruvi
lib/gruvi/http.py
HttpRequest.end_request
def end_request(self): """End the request body.""" if not self._chunked: return trailers = [(n, get_header(self._headers, n)) for n in self._trailer] \ if self._trailer else None ending = create_chunked_body_end(trailers) self._protocol.writer....
python
def end_request(self): """End the request body.""" if not self._chunked: return trailers = [(n, get_header(self._headers, n)) for n in self._trailer] \ if self._trailer else None ending = create_chunked_body_end(trailers) self._protocol.writer....
[ "def", "end_request", "(", "self", ")", ":", "if", "not", "self", ".", "_chunked", ":", "return", "trailers", "=", "[", "(", "n", ",", "get_header", "(", "self", ".", "_headers", ",", "n", ")", ")", "for", "n", "in", "self", ".", "_trailer", "]", ...
End the request body.
[ "End", "the", "request", "body", "." ]
train
https://github.com/geertj/gruvi/blob/1d77ca439600b6ea7a19aa1ee85dca0f3be3f3f8/lib/gruvi/http.py#L600-L607
<|startoftext|> ### Instruction: You are a Senior Software Developer and a helpful AI programming assistant. Generate only Python code without explanations. Respond only in English. ### Task: End the request body. ### Response: def end_request(self): """End the request body.""" if not self._chunked: ...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 3812, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 128000, 27, 91, 2527, 14450, 428, 91, 397, 14711, 30151, 512, 2675, 527, 264, 19903, 4476, 25922, 323, 264, 11190, 15592, 15840, 18328, 13, 20400, 1193, 13325, 2082, 2085, 41941, 13, 40633, 1193, 304, 6498, 382, 14711, 5546, 512, 3812, ...