query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
read the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def read_namespaced_pod(self, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.read_namespaced_pod_with_http_info(namespace, name, **kwargs) else: (data) = self.read_namespaced_pod_with_http_info(namespace, name, *...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_namespaced_pod_template(self, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.read_namespaced_pod_template_with_http_info(namespace, name, **kwargs)\n else:\n (data) = self.read_namespaced_pod_templ...
[ "0.61289823", "0.58412105", "0.57368153", "0.56378204", "0.5514217", "0.5418408", "0.53266174", "0.5191487", "0.51739377", "0.51630324", "0.5134086", "0.512865", "0.5116361", "0.509101", "0.5010026", "0.49487", "0.49220082", "0.48722613", "0.48157832", "0.4804738", "0.4784046...
0.72560424
0
read the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def read_namespaced_pod_with_http_info(self, namespace, name, **kwargs): all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_namespaced_pod(self, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.read_namespaced_pod_with_http_info(namespace, name, **kwargs)\n else:\n (data) = self.read_namespaced_pod_with_http_info(namespac...
[ "0.72567", "0.61307937", "0.5842518", "0.56399375", "0.5516068", "0.54210347", "0.53304875", "0.51952374", "0.51764846", "0.5166051", "0.51367664", "0.5131331", "0.51179886", "0.509273", "0.5009313", "0.4949356", "0.49228543", "0.48742065", "0.48148948", "0.48045436", "0.4783...
0.57385904
3
read scale of the specified Scale This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def read_namespaced_scale_scale(self, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.read_namespaced_scale_scale_with_http_info(namespace, name, **kwargs) else: (data) = self.read_namespaced_scale_scale_with_http...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_namespaced_scale_scale(self, namespace, name, **kwargs):\n\n all_params = ['namespace', 'name', 'pretty']\n all_params.append('callback')\n\n params = locals()\n for key, val in iteritems(params['kwargs']):\n if key not in all_params:\n raise TypeError...
[ "0.6678146", "0.6542401", "0.64564985", "0.6413476", "0.6082352", "0.60789704", "0.6075536", "0.60483974", "0.603341", "0.59757626", "0.59072286", "0.58852476", "0.58340734", "0.5663561", "0.5620697", "0.56197774", "0.5601677", "0.5595625", "0.5572859", "0.5540439", "0.551779...
0.73544097
0
read scale of the specified Scale This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def read_namespaced_scale_scale_with_http_info(self, namespace, name, **kwargs): all_params = ['namespace', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_namespaced_scale_scale(self, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.read_namespaced_scale_scale_with_http_info(namespace, name, **kwargs)\n else:\n (data) = self.read_namespaced_scale_scale...
[ "0.73544097", "0.6678146", "0.6542401", "0.6413476", "0.6082352", "0.60789704", "0.6075536", "0.60483974", "0.603341", "0.59757626", "0.59072286", "0.58852476", "0.58340734", "0.5663561", "0.5620697", "0.56197774", "0.5601677", "0.5595625", "0.5572859", "0.5540439", "0.551779...
0.64564985
3
read the specified ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def read_namespaced_service_account_with_http_info(self, namespace, name, **kwargs): all_params = ['namespace', 'name', 'pretty', 'export', 'exact'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_namespaced_service_account(self, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.read_namespaced_service_account_with_http_info(namespace, name, **kwargs)\n else:\n (data) = self.read_namespaced_ser...
[ "0.72971934", "0.5942379", "0.58608127", "0.56464183", "0.54746914", "0.5445511", "0.5445511", "0.5420275", "0.5390594", "0.53177375", "0.53004426", "0.52916884", "0.52916884", "0.52916884", "0.5274409", "0.5226559", "0.5208776", "0.5131483", "0.5127523", "0.51255137", "0.509...
0.5863007
2
replace the specified ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_config_map(self, body, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_config_map_with_http_info(body, namespace, name, **kwargs) else: (data) = self.replace_namespaced_co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ReplaceConfigMap(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceConfigMap')\n return self._RunMethod(\n config, request, global_params=global_params)", "def ReplaceConfigMap(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceConfig...
[ "0.70331234", "0.70331234", "0.59647655", "0.59243035", "0.5784421", "0.5690522", "0.5605454", "0.5584996", "0.55806535", "0.54996675", "0.53971004", "0.53613514", "0.53304374", "0.5284254", "0.5263873", "0.523871", "0.5235917", "0.5209231", "0.5204115", "0.5183601", "0.51744...
0.7009243
2
replace the specified ConfigMap This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_config_map_with_http_info(self, body, namespace, name, **kwargs): all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']):...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ReplaceConfigMap(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceConfigMap')\n return self._RunMethod(\n config, request, global_params=global_params)", "def ReplaceConfigMap(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceConfig...
[ "0.70331234", "0.70331234", "0.7009243", "0.59243035", "0.5784421", "0.5690522", "0.5605454", "0.5584996", "0.55806535", "0.54996675", "0.53971004", "0.53613514", "0.53304374", "0.5284254", "0.5263873", "0.523871", "0.5235917", "0.5209231", "0.5204115", "0.5183601", "0.517446...
0.59647655
3
replace the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_endpoints(self, body, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_endpoints_with_http_info(body, namespace, name, **kwargs) else: (data) = self.replace_namespaced_endp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_endpoints_with_http_info(self, body, namespace, name, **kwargs):\n\n all_params = ['body', 'namespace', 'name', 'pretty']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n\n params = locals()\n for key, val in iteritems(params[...
[ "0.5533379", "0.5314579", "0.52257127", "0.49439174", "0.4934612", "0.4806422", "0.4787247", "0.47150612", "0.47091046", "0.46474752", "0.46057153", "0.45961672", "0.45905036", "0.45685446", "0.45685446", "0.456501", "0.45255518", "0.45217088", "0.45127705", "0.44853395", "0....
0.7061691
0
replace the specified Endpoints This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_endpoints_with_http_info(self, body, namespace, name, **kwargs): all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_endpoints(self, body, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.replace_namespaced_endpoints_with_http_info(body, namespace, name, **kwargs)\n else:\n (data) = self.replace_names...
[ "0.70616496", "0.5315282", "0.52239364", "0.49410528", "0.49355417", "0.48043472", "0.4786785", "0.47153094", "0.4710137", "0.46469042", "0.46063113", "0.4597523", "0.45895153", "0.45691898", "0.45691898", "0.4564807", "0.45280775", "0.45215788", "0.4513788", "0.44862428", "0...
0.55322856
1
replace the specified LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_limit_range(self, body, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_limit_range_with_http_info(body, namespace, name, **kwargs) else: (data) = self.replace_namespaced_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def patch_namespaced_limit_range(self, body, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.patch_namespaced_limit_range_with_http_info(body, namespace, name, **kwargs)\n else:\n (data) = self.patch_namespa...
[ "0.6552195", "0.6410582", "0.60512143", "0.58866954", "0.58159447", "0.577692", "0.56899536", "0.56667715", "0.56349933", "0.5590775", "0.5585976", "0.5579346", "0.55602795", "0.55452335", "0.55441594", "0.55370677", "0.5536457", "0.5529405", "0.55207103", "0.55207103", "0.55...
0.752555
0
replace the specified LimitRange This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_limit_range_with_http_info(self, body, namespace, name, **kwargs): all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs'])...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_limit_range(self, body, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.replace_namespaced_limit_range_with_http_info(body, namespace, name, **kwargs)\n else:\n (data) = self.replace_n...
[ "0.7525064", "0.6550916", "0.60531837", "0.5887018", "0.581531", "0.5778277", "0.5691277", "0.5668329", "0.5635367", "0.55912834", "0.5587198", "0.55801064", "0.5560935", "0.55466074", "0.55455476", "0.5538401", "0.5536282", "0.5528713", "0.5522398", "0.5522398", "0.5522398",...
0.6410254
2
replace the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_namespace(self, body, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_namespace_with_http_info(body, name, **kwargs) else: (data) = self.replace_namespaced_namespace_with_http_info(b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ReplaceNamespace(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceNamespace')\n return self._RunMethod(\n config, request, global_params=global_params)", "def ReplaceNamespace(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceNamesp...
[ "0.7423651", "0.7423651", "0.6633841", "0.6234464", "0.6184255", "0.6172935", "0.601851", "0.59678394", "0.5961481", "0.586582", "0.5791096", "0.56741476", "0.56396514", "0.56312895", "0.5548566", "0.5523733", "0.5523733", "0.53780574", "0.53778344", "0.5355604", "0.5347412",...
0.7396898
2
replace the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_namespace_with_http_info(self, body, name, **kwargs): all_params = ['body', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): if key not i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ReplaceNamespace(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceNamespace')\n return self._RunMethod(\n config, request, global_params=global_params)", "def ReplaceNamespace(self, request, global_params=None):\n config = self.GetMethodConfig('ReplaceNamesp...
[ "0.7423651", "0.7423651", "0.7396898", "0.6633841", "0.6234464", "0.6184255", "0.6172935", "0.59678394", "0.5961481", "0.586582", "0.5791096", "0.56741476", "0.56396514", "0.56312895", "0.5548566", "0.5523733", "0.5523733", "0.53780574", "0.53778344", "0.5355604", "0.5347412"...
0.601851
7
replace finalize of the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_namespace_finalize(self, body, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_namespace_finalize_with_http_info(body, name, **kwargs) else: (data) = self.replace_namespaced_namespac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_namespace_finalize_with_http_info(self, body, name, **kwargs):\n\n all_params = ['body', 'name', 'pretty']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n\n params = locals()\n for key, val in iteritems(params['kwargs']):\n ...
[ "0.7112196", "0.622159", "0.6195497", "0.6195497", "0.5777356", "0.569573", "0.5689545", "0.53908694", "0.5126826", "0.5021472", "0.5016575", "0.5012486", "0.4950633", "0.49499562", "0.48992968", "0.48989484", "0.4890914", "0.4890485", "0.4830479", "0.48160914", "0.48160914",...
0.77896774
0
replace finalize of the specified Namespace This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_namespace_finalize_with_http_info(self, body, name, **kwargs): all_params = ['body', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_namespace_finalize(self, body, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.replace_namespaced_namespace_finalize_with_http_info(body, name, **kwargs)\n else:\n (data) = self.replace_namespace...
[ "0.7789972", "0.6222905", "0.61954683", "0.61954683", "0.5777594", "0.56960034", "0.56892496", "0.5392547", "0.51282465", "0.5021666", "0.5018111", "0.5013489", "0.4951791", "0.49512124", "0.4900465", "0.49001607", "0.48927823", "0.4891714", "0.48296458", "0.481747", "0.48174...
0.7110148
1
replace the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_pod(self, body, namespace, name, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.replace_namespaced_pod_with_http_info(body, namespace, name, **kwargs) else: (data) = self.replace_namespaced_pod_with_http_in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_pod_template(self, body, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.replace_namespaced_pod_template_with_http_info(body, namespace, name, **kwargs)\n else:\n (data) = self.replace...
[ "0.669213", "0.59862125", "0.5969962", "0.5863013", "0.5440005", "0.5275444", "0.52495897", "0.5216777", "0.51670897", "0.5097129", "0.5051701", "0.5042771", "0.50045216", "0.49770045", "0.48180997", "0.4817907", "0.48166212", "0.48145664", "0.48110718", "0.48080257", "0.4806...
0.75253856
0
replace the specified Pod This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def replace_namespaced_pod_with_http_info(self, body, namespace, name, **kwargs): all_params = ['body', 'namespace', 'name', 'pretty'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in iteritems(params['kwargs']): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_namespaced_pod(self, body, namespace, name, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.replace_namespaced_pod_with_http_info(body, namespace, name, **kwargs)\n else:\n (data) = self.replace_namespaced_pod_wi...
[ "0.7526899", "0.6693259", "0.59861493", "0.5862848", "0.54430145", "0.52783275", "0.52494264", "0.52159905", "0.5168387", "0.50953805", "0.5052778", "0.5043503", "0.5006266", "0.49785903", "0.48207688", "0.4817463", "0.4817154", "0.481519", "0.48151776", "0.48098806", "0.4809...
0.5969032
3
watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_pod_template_list(self, namespace, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_namespaced_pod_template_list_with_http_info(namespace, **kwargs) else: (data) = self.watch_namespaced_pod_template_list_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_pod_template_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_pod_template_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_pod_template_list_with_http_info(**kwargs)\n return ...
[ "0.78836584", "0.73493284", "0.7297493", "0.67642254", "0.64876384", "0.63821447", "0.6305387", "0.614365", "0.61015576", "0.5994356", "0.59220207", "0.57890797", "0.5750464", "0.5741921", "0.56843686", "0.53184867", "0.53112644", "0.52679306", "0.52121884", "0.5206036", "0.5...
0.71880394
3
watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_pod_template_list_with_http_info(self, namespace, **kwargs): all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_pod_template_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_pod_template_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_pod_template_list_with_http_info(**kwargs)\n return ...
[ "0.78836584", "0.73493284", "0.7297493", "0.71880394", "0.67642254", "0.63821447", "0.6305387", "0.614365", "0.61015576", "0.5994356", "0.59220207", "0.57890797", "0.5750464", "0.5741921", "0.56843686", "0.53184867", "0.53112644", "0.52679306", "0.52121884", "0.5206036", "0.5...
0.64876384
5
watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_resource_quota_list(self, namespace, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_namespaced_resource_quota_list_with_http_info(namespace, **kwargs) else: (data) = self.watch_namespaced_resource_quota...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_resource_quota_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_resource_quota_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_resource_quota_list_with_http_info(**kwargs)\n r...
[ "0.79410774", "0.7055521", "0.6343788", "0.622212", "0.59712625", "0.596336", "0.5781582", "0.5764735", "0.5490953", "0.53334224", "0.5321176", "0.52967453", "0.5295173", "0.5227051", "0.5203714", "0.5118016", "0.5070246", "0.50641733", "0.5060582", "0.5008747", "0.4977521", ...
0.6861388
2
watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_resource_quota_list_with_http_info(self, namespace, **kwargs): all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_resource_quota_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_resource_quota_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_resource_quota_list_with_http_info(**kwargs)\n r...
[ "0.79410774", "0.7055521", "0.6861388", "0.622212", "0.59712625", "0.596336", "0.5781582", "0.5764735", "0.5490953", "0.53334224", "0.5321176", "0.52967453", "0.5295173", "0.5227051", "0.5203714", "0.5118016", "0.5070246", "0.50641733", "0.5060582", "0.5008747", "0.4977521", ...
0.6343788
3
watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_service_account_list(self, namespace, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_namespaced_service_account_list_with_http_info(namespace, **kwargs) else: (data) = self.watch_namespaced_service_acco...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_service_account_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_service_account_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_service_account_list_with_http_info(**kwargs)\n ...
[ "0.82846886", "0.73977906", "0.6862404", "0.62710696", "0.6154109", "0.59526783", "0.5897932", "0.5700451", "0.56287235", "0.5439392", "0.5374688", "0.5334669", "0.53299445", "0.526852", "0.51782984", "0.51022243", "0.5059746", "0.50425845", "0.49982294", "0.49525148", "0.494...
0.70085746
2
watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_namespaced_service_account_list_with_http_info(self, namespace, **kwargs): all_params = ['namespace', 'pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_service_account_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_service_account_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_service_account_list_with_http_info(**kwargs)\n ...
[ "0.8284557", "0.7397957", "0.7009002", "0.6859951", "0.6151768", "0.59525794", "0.5896713", "0.56988746", "0.5627285", "0.5439038", "0.53761196", "0.53345025", "0.53322184", "0.526854", "0.5178728", "0.51042014", "0.5058756", "0.5042655", "0.499822", "0.49550304", "0.49473184...
0.6271353
4
watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_pod_template_list(self, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_pod_template_list_with_http_info(**kwargs) else: (data) = self.watch_pod_template_list_with_http_info(**kwargs) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_pod_template_list_with_http_info(self, **kwargs):\n\n all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n\n params = locals()\n for ke...
[ "0.7348035", "0.72965664", "0.7186516", "0.67648137", "0.6486414", "0.63809913", "0.6306132", "0.614341", "0.60979915", "0.5991997", "0.5918853", "0.5787042", "0.5750218", "0.57428443", "0.5684714", "0.53193146", "0.5311856", "0.52676606", "0.5211711", "0.5204807", "0.5141262...
0.78812575
0
watch individual changes to a list of PodTemplate This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_pod_template_list_with_http_info(self, **kwargs): all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in it...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_pod_template_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_pod_template_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_pod_template_list_with_http_info(**kwargs)\n return ...
[ "0.7883346", "0.72964317", "0.71885973", "0.6763051", "0.6488065", "0.6381691", "0.6304838", "0.61450344", "0.61017317", "0.5995105", "0.5921175", "0.579043", "0.5751431", "0.5741636", "0.5682035", "0.5319638", "0.53097254", "0.52695143", "0.5210473", "0.52059263", "0.5139795...
0.7349121
1
watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_resource_quota_list(self, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_resource_quota_list_with_http_info(**kwargs) else: (data) = self.watch_resource_quota_list_with_http_info(**kwargs) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_resource_quota_list_with_http_info(self, **kwargs):\n\n all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n\n params = locals()\n for ...
[ "0.70565635", "0.68639094", "0.63456714", "0.6224663", "0.5972328", "0.5965061", "0.5781391", "0.57644415", "0.54934573", "0.533472", "0.5321825", "0.5298", "0.5297986", "0.5229136", "0.5204761", "0.51188976", "0.50722027", "0.50641334", "0.5060628", "0.5009847", "0.49797785"...
0.79430175
0
watch individual changes to a list of ResourceQuota This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_resource_quota_list_with_http_info(self, **kwargs): all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_resource_quota_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_resource_quota_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_resource_quota_list_with_http_info(**kwargs)\n r...
[ "0.7942391", "0.68621755", "0.6344638", "0.6222668", "0.59717214", "0.5963255", "0.5782048", "0.5766091", "0.5490003", "0.5334248", "0.53223044", "0.5295872", "0.529553", "0.5227533", "0.5203224", "0.5118823", "0.5067438", "0.50623447", "0.5059526", "0.50103265", "0.49779508"...
0.7056099
1
watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_service_account_list(self, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.watch_service_account_list_with_http_info(**kwargs) else: (data) = self.watch_service_account_list_with_http_info(**kwargs) return da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_service_account_list_with_http_info(self, **kwargs):\n\n all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds']\n all_params.append('callback')\n all_params.append('_return_http_data_only')\n\n params = locals()\n for...
[ "0.73977906", "0.70085746", "0.6862404", "0.62710696", "0.6154109", "0.59526783", "0.5897932", "0.5700451", "0.56287235", "0.5439392", "0.5374688", "0.5334669", "0.53299445", "0.526852", "0.51782984", "0.51022243", "0.5059746", "0.50425845", "0.49982294", "0.49525148", "0.494...
0.82846886
0
watch individual changes to a list of ServiceAccount This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def watch_service_account_list_with_http_info(self, **kwargs): all_params = ['pretty', 'label_selector', 'field_selector', 'watch', 'resource_version', 'timeout_seconds'] all_params.append('callback') all_params.append('_return_http_data_only') params = locals() for key, val in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def watch_service_account_list(self, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.watch_service_account_list_with_http_info(**kwargs)\n else:\n (data) = self.watch_service_account_list_with_http_info(**kwargs)\n ...
[ "0.8284557", "0.7009002", "0.6859951", "0.6271353", "0.6151768", "0.59525794", "0.5896713", "0.56988746", "0.5627285", "0.5439038", "0.53761196", "0.53345025", "0.53322184", "0.526854", "0.5178728", "0.51042014", "0.5058756", "0.5042655", "0.499822", "0.49550304", "0.49473184...
0.7397957
1
Return list of groups user is a member of. user can be a User or Group.
def member_groups(self, user): if not hasattr(user, '_group_member_groups'): # be sure to use "slow" version of is_member to prevent it recursing back user._group_member_groups = [self[group] for group in self.root.keys() \ if self[group].is_member(user, slow=Tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getUserGroups(self, user):\n return [gu[0] for gu in grp.getgrall() if user in gu[3]]", "def get_user_groups(user: User) -> [Group]:\n groups = []\n for group in Group.objects:\n if user in group.participants:\n groups.append(group)\n return list(groups)", "def listUserGro...
[ "0.8253796", "0.7808511", "0.7656633", "0.75908345", "0.75318694", "0.7506675", "0.7333462", "0.7288092", "0.72774667", "0.71662503", "0.7038226", "0.695777", "0.6907317", "0.6881648", "0.68630683", "0.6815287", "0.67617387", "0.6753299", "0.66183066", "0.6612948", "0.6572963...
0.80426466
1
Close both the client and server sockets after finishing data transfer.
def disconnect(self): self.server_sock.close() self.client_sock.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self):\n self._state = ServerState.CLOSED\n self.sock.close()\n clients = list(self._clients.values())\n for conn in clients:\n conn.close()\n for thread in self._get_threads():\n thread.join()", "def server_close(self):\n\t\tself.socket.close()"...
[ "0.76988053", "0.7692049", "0.76449263", "0.7632787", "0.7607139", "0.7507071", "0.7490313", "0.7354508", "0.7287723", "0.7266592", "0.7244388", "0.7205918", "0.7158204", "0.7135323", "0.70962924", "0.70962924", "0.70962924", "0.70962924", "0.70962924", "0.70962924", "0.70955...
0.73555225
7
Return the ID associated with this assignment.
def assignment_id(self): return self.assignment.AssignmentId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def getId(self):\n r...
[ "0.7760306", "0.7760306", "0.7760306", "0.7760306", "0.7760306", "0.7760306", "0.7695142", "0.7692076", "0.76733494", "0.7670567", "0.7670567", "0.7645275", "0.76365674", "0.76365674", "0.76365674", "0.76365674", "0.76365674", "0.76365674", "0.76365674", "0.76365674", "0.7636...
0.840713
0
Return the ID associated with this HIT.
def hit_id(self): return self.assignment.HITId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def id(self):\n return self.cached_data[\"id\"]", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self...
[ "0.76492316", "0.7382315", "0.7382315", "0.7382315", "0.7382315", "0.7382315", "0.7382315", "0.7367617", "0.73058504", "0.7303115", "0.72853714", "0.7275398", "0.7275398", "0.7259213", "0.7259213", "0.7259213", "0.7259213", "0.7259213", "0.7259213", "0.7259213", "0.7259213", ...
0.8355036
0
Returns the import lines associated with a type or a set of seen tuples.
def cython_import_lines(self, x): if not isinstance(x, Set): x = self.cython_import_tuples(x) x = [tup for tup in x if 0 < len(tup)] return set([self._cython_import_cases[len(tup)](tup) for tup in x])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_import_table_types(imports: Iterable[TExtern]) -> Tuple[TableType, ...]:\n return tuple(item for item in imports if isinstance(item, TableType))", "def cython_import_tuples(self, t, seen=None):\n t = self.canon(t)\n if seen is None:\n seen = set()\n if isinstance(t, bas...
[ "0.6350462", "0.6327747", "0.6222825", "0.61673814", "0.59940124", "0.5888051", "0.5804359", "0.5796117", "0.57384473", "0.56613517", "0.5637791", "0.5602994", "0.5546113", "0.5489912", "0.54794896", "0.54780644", "0.5434702", "0.5425276", "0.5414726", "0.54088247", "0.535161...
0.6069407
4
This function will add a template specialization so that it may be used normally with the rest of the type system.
def register_specialization(self, t, cython_c_type=None, cython_cy_type=None, cython_py_type=None, cython_cimport=None, cython_cyimport=None, cython_pyimport=None): t = self.canon(t) if cython_c_type is not None: self.cython_cty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addGenericNode():\n return render_template(\"addGenericNode.html\")", "def make_template(paramspec, func, name, f_globals, template_map):\n template = template_map.get(name)\n if template is not None:\n if f_globals.get(name) is not template:\n msg = \"template '%s' was deleted bef...
[ "0.53633684", "0.53095776", "0.52218366", "0.51087373", "0.49300152", "0.48889345", "0.48258212", "0.47488755", "0.4731984", "0.4677573", "0.46723267", "0.46469495", "0.4620926", "0.46044168", "0.4584153", "0.45576143", "0.4557559", "0.45284966", "0.4492663", "0.4486073", "0....
0.57194483
0
Registers a variable and its namespace in the typesystem.
def register_variable_namespace(self, name, namespace, t=None): if name in self.variable_namespace: old = self.variable_namespace[name] if old != namespace: msg = ("overwriting namespace for variable {0}:\n" " old: {1}\n" " ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def define_variable(self, var, value):\n self.namespace[var] = value", "def register_var(tiling_var, val):\n globals()[tiling_var] = val", "def register_variable(self, var: ScalarVariable, nested: bool = True):\n variable_reference = len(self.vars)\n self.vars[variable_reference] = var\...
[ "0.71470577", "0.6968829", "0.68942004", "0.63682187", "0.63094497", "0.6307267", "0.62726843", "0.6129053", "0.6079226", "0.59827596", "0.5961582", "0.5947678", "0.58338636", "0.5821872", "0.5786343", "0.5783826", "0.5780788", "0.5772949", "0.5757162", "0.5757162", "0.572007...
0.70607704
1
This is a repr string of the raw type (self.t), mostly useful for comments.
def type(self): if self._type is None: self._type = repr(self.t) return self._type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n repr_parts = ['<', self.__class__.__name__]\n self._add_type_specific_repr_fields(repr_parts)\n repr_parts.append('>')\n return ''.join(repr_parts)", "def __repr__(self):\n\n name = self.__class__.__name__\n\n return '%s(\\'%s\\')' % (name, self.raw...
[ "0.78834224", "0.76659375", "0.7640787", "0.7569614", "0.74665", "0.7459856", "0.7459856", "0.7459856", "0.74534446", "0.7398366", "0.73037", "0.72789776", "0.7263292", "0.7249002", "0.72148883", "0.71894324", "0.7188298", "0.71806437", "0.71777004", "0.7174546", "0.7166632",...
0.74394494
9
This is a repr string of the raw type (self.t) without predicates.
def type_nopred(self): if self._type_nopred is None: self._type_nopred = repr(self.t_nopred) return self._type_nopred
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __repr__(self):\n class_name = self.__class__.__name__\n dtype = 'unchanged' if self.dtype is None else self.dtype\n return f\"<katdal.{class_name} '{self.name}': type '{dtype}' at {id(self):#x}>\"", "def __repr__(self):\n repr_parts = ['<', self.__class__.__name__]\n self....
[ "0.7838803", "0.77883756", "0.7766576", "0.76322573", "0.75349605", "0.74764794", "0.7442732", "0.735252", "0.7303832", "0.7303832", "0.7303832", "0.7272009", "0.7270068", "0.7260415", "0.72170466", "0.7198876", "0.71622986", "0.71530217", "0.71045357", "0.7091785", "0.708469...
0.70934147
19
Add a new album to the list.
def add_album(self, album): self.album.append(album)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_album(self, album):\n self.albums.append(album)", "def add_album(self, album):\n self.albums.append(album)", "def add_album(self, album):\n\n self.albums.append(album)", "def add_album(self, album):\n\n self.albums.append(album)", "def add_album(self):\n item = se...
[ "0.8646252", "0.8646252", "0.85363644", "0.85363644", "0.8086117", "0.7794568", "0.7240579", "0.70352155", "0.6680298", "0.66170067", "0.66073763", "0.65907615", "0.65280664", "0.6434373", "0.63971716", "0.63881", "0.6365138", "0.6218499", "0.6209882", "0.6188895", "0.617267"...
0.85728043
2
Return the commandline parser for the pull command.
def pull_parser(): usage = "usage: %prog [tx_options] pull [options]" description = "This command pulls all outstanding changes from the remote "\ "Transifex server to the local repository. By default, only the "\ "files that are watched by Transifex will be updated but if you "\ "want t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pull_parser():\n description = \\\n \"This command pulls all outstanding changes from the remote \"\\\n \"Transifex server to the local repository. By default, only the \"\\\n \"files that are watched by Transifex will be updated but if you \"\\\n \"want to fetch the translations...
[ "0.7026735", "0.6330801", "0.6223567", "0.6131527", "0.61306995", "0.6056057", "0.60318947", "0.59981817", "0.5942442", "0.59291327", "0.58916205", "0.5839435", "0.5836275", "0.5835498", "0.5808554", "0.58056235", "0.5770418", "0.5749853", "0.57466984", "0.5724496", "0.571959...
0.70009404
1
Get an instance of a model according to parameters in the configuration. Also, check if the provided parameters fit to the signature of the model class and log default values if not defined via the configuration.
def get_instance(name, parameters, _log, _seed): # Get the mode class model_cls = getattr(models, name) # Inspect if the constructor specification fits with additional_parameters signature = inspect.signature(model_cls) available_parameters = signature.parameters for key in parameters.keys(): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_model(parameters):\n if MODEL == 6:\n return get_model_6(parameters)\n elif MODEL == 5:\n return get_model_5(parameters)\n elif MODEL == 4:\n return get_model_4(parameters)\n elif MODEL == 3:\n if CROSS_VALIDATION:\n return get_cv_model_3(parameters)\n ...
[ "0.6240885", "0.6202174", "0.6138862", "0.60684526", "0.6062431", "0.6055852", "0.603071", "0.59301597", "0.59271336", "0.59080005", "0.5894653", "0.58874226", "0.58734417", "0.5864442", "0.58621424", "0.5846692", "0.58324915", "0.5806208", "0.5791656", "0.5785118", "0.577862...
0.72584003
0
Load image path and convert it to ndarray.
def path_to_tensor(img_path, dim): # Load RGB image img = image.load_img(img_path, target_size=(dim,dim)) # Convert to (dim, dim,3) tensor x = image.img_to_array(img) return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_img(path: str) -> np.ndarray:\n \n return np.array(Image.open(path))", "def loadImage(self, path: str) -> ndarray:\n try:\n self.img = np.asarray(Image.open(path))\n\n except FileNotFoundError:\n\n print(\"NO such File {}\".format(path))\n return None...
[ "0.84457064", "0.8198136", "0.8187843", "0.81137615", "0.77778065", "0.77267754", "0.77267754", "0.7726401", "0.7701343", "0.76471746", "0.7543347", "0.74524313", "0.74383646", "0.7410178", "0.73701584", "0.7353274", "0.73215234", "0.7320859", "0.7186031", "0.7117919", "0.711...
0.0
-1
The name of the resource group. The name is case insensitive.
def resource_group_name(self) -> pulumi.Input[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def group_name(self) -> str:\n return pulumi.get(self, \"group_name\")", "def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")", "def resource_gr...
[ "0.8591477", "0.8364604", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.8203347", "0.81754756", "0.8084906", "0.8084906", "0.8084906", "0.8084906", "0.8084906", "0.8084906", ...
0.80879456
32
Image name. Use .default for image creation.
def image_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "image_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_image_name(self) -> str:\n dirname = os.path.basename(os.getcwd())\n default_image_name = f\"{dirname}_{self.config_name}\"\n image_name = self.config_options.get(\"image\", default_image_name)\n return image_name", "def imageNamed(imageName):\n\t\treturn os.path.join(AppVars...
[ "0.7648612", "0.76325023", "0.7548255", "0.75282174", "0.74309987", "0.7428102", "0.7193053", "0.7188331", "0.7065129", "0.7038036", "0.691315", "0.689037", "0.6862804", "0.6830238", "0.68226635", "0.681616", "0.6748755", "0.6740354", "0.67213315", "0.66840696", "0.6635317", ...
0.7475217
5
Get an existing Image resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None) -> 'Image': opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = ImageInitArgs.__new__(ImageInitArgs) __props__.__dict__["component_id"] = N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_image(self, name_or_id, ignore_missing=False):\n return self._find(image.Image, name_or_id,\n ignore_missing=ignore_missing)", "def get_image_by_id(id):\n return Image.objects.get(id=id)", "def get_image(id: Optional[int] = None,\n name: Optional[str] = ...
[ "0.598949", "0.59603137", "0.5923011", "0.58021617", "0.57542235", "0.569378", "0.56506634", "0.5605022", "0.5575167", "0.55706984", "0.5503223", "0.54792225", "0.54620594", "0.5452979", "0.5446874", "0.54444593", "0.54428375", "0.5437279", "0.5420964", "0.54145086", "0.54032...
0.62631416
0
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
def type(self) -> pulumi.Output[str]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"resource_type\")", "def ...
[ "0.79186237", "0.79186237", "0.7866329", "0.7866329", "0.7866329", "0.7866329", "0.7866329", "0.7707275", "0.7553122", "0.7282215", "0.70594025", "0.6979668", "0.69211996", "0.68696827", "0.6728482", "0.6704254", "0.6653542", "0.66455746", "0.6639357", "0.6639357", "0.6639357...
0.0
-1
Reshaping happens during the call to forward.
def reshape(self, bottom, top): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, input):\n batch_size = input.size(0)\n shape = (batch_size, *self.shape)\n out = input.reshape(shape)\n return out", "def _reshape(self):\n self._frame._setup(width=self._width,height=self._height,\n startx=self._x,starty=self._y)", ...
[ "0.7052694", "0.66112494", "0.6553348", "0.6553348", "0.6445214", "0.6263273", "0.6219224", "0.62077326", "0.6204762", "0.612587", "0.612587", "0.6098139", "0.6093421", "0.6090613", "0.60858375", "0.60803044", "0.6076111", "0.60631406", "0.60622656", "0.60548824", "0.60481465...
0.57463765
85
Construct a Hash object from a hex string.
def from_value(cls: Type[Hash], value: str) -> Hash: if not isinstance(value, str): raise XRPLBinaryCodecException( f"Invalid type to construct a {cls.__name__}: expected str," f" received {value.__class__.__name__}." ) return cls(bytes.fromhex(va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_hex(cls, hexstr, width, height=NOT_SET, *, align='left'):\n byteseq = bytes.fromhex(hexstr)\n return cls.from_bytes(byteseq, width, height, align=align)", "def from_hex_str(value):\n \n return SHex(value)", "def from_hex(hexstr, width, height):\n return Glyph.from_bytes(bina...
[ "0.7459718", "0.7122893", "0.68986326", "0.6859291", "0.68158686", "0.680758", "0.6783451", "0.65942067", "0.654938", "0.64145595", "0.6404631", "0.6330756", "0.62058014", "0.6107771", "0.6071438", "0.60000116", "0.5948939", "0.59165114", "0.5893124", "0.5864486", "0.58135605...
0.69265956
2
Visualizes input image, segmentation map and overlay view.
def vis_segmentation(image, seg_map): plt.figure(figsize=(20, 20)) seg_image = label_to_color_image(seg_map).astype(np.uint8) plt.imshow(seg_image) plt.axis('off') plt.savefig(str(image_id)+'_seg.jpg',bbox_inches='tight') plt.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vis_segmentation(image, seg_map):\n plt.figure(figsize=(15, 5))\n grid_spec = gridspec.GridSpec(1, 4, width_ratios=[6, 6, 6, 1])\n\n plt.subplot(grid_spec[0])\n plt.imshow(image)\n plt.axis('off')\n plt.title('input image')\n\n plt.subplot(grid_spec[1])\n seg_image = label_to_color_image(seg_map).astyp...
[ "0.69926476", "0.69773686", "0.6961605", "0.69606674", "0.6953871", "0.6872205", "0.6867784", "0.68528426", "0.66746914", "0.66683316", "0.6647922", "0.664309", "0.66321903", "0.66207135", "0.6601977", "0.65702325", "0.64633095", "0.6454649", "0.63971007", "0.63927853", "0.63...
0.6615741
14
Given a filename, return a package and relative path.
def SplitPackage(filename): full_path = os.path.realpath(filename) parent, child = os.path.split(full_path) while parent != '/' and os.path.exists(os.path.join(parent, '__init__.py')): child = os.path.join(os.path.basename(parent), child) parent = os.path.dirname(parent) return parent, child
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_package_path():\n package_name = get_package_name()\n return package_name.replace('.', '/')", "def package_to_path(package):\n return package.replace('.','/')", "def name(self):\n\n if self.package:\n directory = self.package.directory\n if self.package.resolve_root:\n dire...
[ "0.713564", "0.6944532", "0.6876699", "0.68552005", "0.67888904", "0.6738926", "0.6653331", "0.66297996", "0.6596145", "0.65556824", "0.65269583", "0.65239894", "0.65172064", "0.65091854", "0.6480374", "0.6478411", "0.64773566", "0.64559644", "0.6440805", "0.6393659", "0.6389...
0.62424225
32
Paths with a tilde should expand to the user's home directory
def test_tilde_home(monkeypatch): config = get_config("home.conf") def mock_sweep(name, path, *args, **kwargs): # pylint: disable = unused-argument assert Path(path) == Path.home() monkeypatch.setattr(console, "sweep", mock_sweep) console.pushbroom(config, dry_run=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homedir():\n return os.path.expanduser('~')", "def ensure_expandusr(path):\n return os.path.expanduser(path) if '~' in path else path", "def pwd_unexpanduser ( fspath, uid ):\n home_dir = get_home_dir ( uid )\n if not fspath.startswith ( home_dir ):\n return fspath\n elif len ( fspath ) ==...
[ "0.7902612", "0.7628396", "0.7597035", "0.7590174", "0.74646634", "0.7354301", "0.7259356", "0.7214438", "0.7183385", "0.693922", "0.69201434", "0.67227805", "0.66624725", "0.66227376", "0.6597347", "0.6581848", "0.65642744", "0.65275127", "0.6443453", "0.6382387", "0.6363237...
0.5566474
75
Getting the features from the data. This is the important part of the procedure.
def get_all_features_from_data(data, sr): length = data.shape[0] chroma_stft_mean = np.mean(librosa.feature.chroma_stft(y=data, sr=sr)) chroma_stft_var = np.var(librosa.feature.chroma_stft(y=data, sr=sr)) rms_mean = np.mean(librosa.feature.rms(y=data)) rms_var = np.var(librosa.feature.rms(y=data)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generateFeatures(self, data):\n pass", "def extractFeatures(self, datum):\n abstract", "def extract_features(self, data):\n\n # TODO: Should feature extraction be done on the testing data? In the lecture notes\n # TODO: it is not done with the training data, but with the test da...
[ "0.78642905", "0.75108975", "0.74675584", "0.73983294", "0.73955065", "0.72812635", "0.71724135", "0.7164343", "0.71587265", "0.70526963", "0.7039788", "0.70130116", "0.68657464", "0.6860904", "0.68576723", "0.6853107", "0.68471605", "0.6842768", "0.68222946", "0.67810196", "...
0.6236753
94
Extract bbox coordinates from the region.
def region_coordinates(region: Region) -> CoordinatePair: y_ul, x_ul, y_br, x_br = region.bbox return CoordinatePair(x_ul, y_ul, x_br, y_br)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bbox(self):\n lower = (self.x.min(), self.y.min())\n upper = (self.x.max(), self.y.max())\n return (lower, upper)", "def getbbox(self):\n pass", "def bbox(self):\n return np.array(\n [[self.position[0], self.position[1]], [self.position[0], self.position[1]]]\n...
[ "0.7181448", "0.7173708", "0.71650785", "0.71160024", "0.70851284", "0.7083885", "0.6923465", "0.69184506", "0.691373", "0.6896445", "0.6879116", "0.68715465", "0.683045", "0.6798824", "0.67983115", "0.67968327", "0.6794191", "0.67738223", "0.67702824", "0.671416", "0.665963"...
0.69366235
6
determine the type of the current room based on contrasting player coords and dungeon grid info
def find_current_room(self, all_rooms, room_to_find): # essentially loops like this are the bridge between the 'surface' grid and the 'room type' grid. # since they aren't the same object, we have to find the -corresponding- room in the second grid # by matching coordinates with the first grid, which is exactly ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_room_type(self):\n\t\t# otherwise gamelog room will just stay fixed at value obtained during construction\n\t\tself.current_room = self.grid.current_room_type", "def get_room_type(self):\n\t\troom_type = ''\n\t\tnum = randint(1,8)\n\n\t\tif num >= 1 and num <= 4:\n\t\t\troom_type = 'Empty'\n\t\telif n...
[ "0.689819", "0.6476364", "0.6368173", "0.63577515", "0.5926679", "0.5887706", "0.58769643", "0.58769643", "0.5741252", "0.57232785", "0.56315655", "0.5614049", "0.56122494", "0.55858856", "0.5580994", "0.55763066", "0.55681634", "0.55646926", "0.5492839", "0.54818237", "0.541...
0.7706344
0
This needs to be called continually to update room as current_room_type changes
def update_room_type(self): # otherwise gamelog room will just stay fixed at value obtained during construction self.current_room = self.grid.current_room_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def room_type(self):\n return self._room_type", "def room_type(self):\n return self._room_type", "def room_type(self, room_type):\n if room_type is None:\n raise ValueError(\"Invalid value for `room_type`, must not be `None`\")\n\n self._room_type = room_type", "def add...
[ "0.6763909", "0.6763909", "0.66841614", "0.6564001", "0.6337712", "0.6077961", "0.60016125", "0.5993037", "0.59699845", "0.5968958", "0.59482485", "0.59279555", "0.5927248", "0.58470666", "0.57703674", "0.57597", "0.5751638", "0.57460546", "0.5652659", "0.56306195", "0.56221"...
0.8751777
0
Reinforcement Learning. Applies RL according to current reinforcement `reward` and backpropagated reinforcement `maximum_fitness`.
def apply_reinforcement_learning(self, reward: int, p: float) -> None: for cl in self: cl.update_reward(reward + cl.cfg.gamma * p) cl.update_intermediate_reward(reward)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getReward(self):\n# def evaluateFitness(self):\n fitness = 0.0\n distance = self.env.getDistance()\n speed = self.env.getSpeed()\n theta = self.env.getOrientation()\n\n ## implementation 101\n timeBonus = (self.maxTime - self.t)/self.maxTime\n alpha = 1....
[ "0.6729833", "0.644695", "0.6412044", "0.63698584", "0.62068415", "0.6185792", "0.6102406", "0.60766566", "0.6035592", "0.6016082", "0.5995725", "0.5972784", "0.59272426", "0.5854179", "0.5852578", "0.58337444", "0.5823252", "0.5822714", "0.57927316", "0.5755892", "0.5747922"...
0.61348295
6
Return `self` upon entering the runtime context.
def __enter__(self): return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __enter__(self):\n self.run()\n return self", "def __enter__(self):\r\n if not self._engine:\r\n self.restart()\r\n return self", "def __enter__(self):\n self.__within_context = True\n if not self.__initialized:\n self.__initialization__()\n ...
[ "0.7494422", "0.7242243", "0.7202831", "0.71421313", "0.71421313", "0.70471823", "0.70426357", "0.6985253", "0.69103134", "0.6866943", "0.6845752", "0.675523", "0.67466706", "0.6707064", "0.66929275", "0.66451114", "0.66451114", "0.6615485", "0.6615485", "0.6598014", "0.65813...
0.66764975
33
Draw square boxes on image
def draw_box(image, boxes, box_color=(255, 255, 255)): for box in boxes: cv2.rectangle(image, (box[0], box[1]), (box[2], box[3]), box_color, 3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_box(image, boxes, box_color=(255, 255, 255)):\r\n for box in boxes:\r\n cv2.rectangle(image,\r\n (box[0], box[1]),\r\n (box[2], box[3]), box_color)", "def draw_boxs(img,boxs,width=3,color=(0,0,255)):\n box_img = copy.deepcopy(img)\n ...
[ "0.7683415", "0.76742995", "0.7414958", "0.7382073", "0.7288738", "0.7260211", "0.72561073", "0.72557825", "0.72088903", "0.7179151", "0.70811963", "0.7079645", "0.70626694", "0.70623374", "0.69493574", "0.69225556", "0.6887776", "0.6861324", "0.6850174", "0.68244785", "0.679...
0.76874757
0
Initializes a new user model.
def __init__(self, response_model_ctor, user_sampler, slate_size): if not response_model_ctor: raise TypeError('response_model_ctor is a required callable') self._user_sampler = user_sampler self._user_state = self._user_sampler.sample_user() self._response_model_ctor = response_model_ctor se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, **kwargs):\n super(User, self).__init__(**kwargs)\n\n # Set default role for a regular new User\n self.role = Role.query.filter_by(default=True).first()", "def __init__(self, *args, **kwargs):\n\n Model.__init__(self, *args, **kwargs)\n\n self.collection = '...
[ "0.69789696", "0.67296", "0.6692362", "0.6670878", "0.65573275", "0.6522834", "0.6508219", "0.64903724", "0.6462156", "0.6462012", "0.64294523", "0.64183235", "0.6374757", "0.63648945", "0.63379836", "0.63280904", "0.6311814", "0.63066053", "0.6281518", "0.6275057", "0.626944...
0.0
-1
Returns a constructor for the type of response this model will create.
def get_response_model_ctor(self): return self._response_model_ctor
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_response_constructor(self) -> Union[type, Callable]:\n return NetworkResponse", "def _create_response_model(self, data):\n pass", "def create(cls, _):\n return cls", "def __constructor__(self):\n return type(self)", "def create_response(self, request, data, response_...
[ "0.69658923", "0.68894917", "0.6460491", "0.6437879", "0.6356214", "0.6289054", "0.62588686", "0.6257454", "0.6257454", "0.6167989", "0.61023104", "0.6096847", "0.6048063", "0.5993791", "0.59864205", "0.59704506", "0.59505075", "0.59396905", "0.5893526", "0.5885719", "0.58758...
0.69152427
1
Returns true if the filename has an image extension.
def IsImage(self, filename): mimetype = mimetypes.guess_type(filename)[0] if not mimetype: return False return mimetype.startswith("image/")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_image_file(filename, extensions):\n return filename.lower().endswith(extensions)", "def is_image_file(filename):\r\n filename_lower = filename.lower()\r\n return any(filename_lower.endswith(ext) for ext in IMG_EXTENSIONS)", "def is_image_file(filename):\n return has_file_allowed_extension(fi...
[ "0.8713787", "0.8664626", "0.8598234", "0.8492011", "0.84568226", "0.8386487", "0.832399", "0.82931346", "0.826978", "0.81092566", "0.80846995", "0.8057107", "0.788372", "0.78661186", "0.78389114", "0.7787767", "0.778439", "0.7730222", "0.77047366", "0.76208603", "0.76208603"...
0.77577055
17
Closes this database connection. You should use close() after all your sqls are executed over
def close(self): if getattr(self, "_db", None) is not None: self._db.close() self._db = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self):\n Log.debug('DB -> close')\n # 关闭数据库连接\n self.conn.close()", "def close_database(self):\n if self._conn is not None:\n self._conn.close()\n self._conn = None", "def close(self):\r\n debug.write(\"[SourceRPG] handling SQL close\", 1)\r\n ...
[ "0.8312353", "0.8168511", "0.810722", "0.8093784", "0.80118656", "0.79992497", "0.79875016", "0.7975218", "0.7949781", "0.79471785", "0.79374903", "0.78910387", "0.7855474", "0.78442997", "0.78386873", "0.78319657", "0.78117865", "0.7772928", "0.7763668", "0.77614546", "0.775...
0.7486832
32
Gets the list of banks. Please note this method is a mapping from the paynlsdk.client.transaction.Transaction.get_banks() method, that returns the internal List object of banks.
def get_list() -> List[BankDetails]: from paynlsdk.client.transaction import Transaction return Transaction.get_banks().banks
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_banks() -> List[BankDetails]:\n from paynlsdk.api.transaction.getbanks import Request\n client = APIClient()\n request = Request()\n client.perform_request(request)\n return request.response.banks", "def banks(self):\n return self.__banks", "def banks(self):\n ...
[ "0.8654134", "0.77936774", "0.77936774", "0.77936774", "0.77936774", "0.77936774", "0.77936774", "0.77936774", "0.6665569", "0.6665569", "0.6665569", "0.6665569", "0.6665569", "0.6665569", "0.6665569", "0.65089977", "0.6361464", "0.6251302", "0.60403275", "0.60057026", "0.600...
0.8399104
1
Get variable from MODEL_VARIABLES collection with initializer seeded from its name, not id
def get_model_variable(name, **kwargs): if kwargs.get('initializer') is None: kwargs['initializer'] = default_initializer(seed=get_seed_from_name(name), dtype=kwargs.get('dtype', tf.float32)) elif hasattr(kwargs['initializer'], 'seed') and kwargs['initializer'].seed is None: kwargs['initializer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_variable_from_model(model,varname):\n variables = model.getVariables()\n itvar = variables.iterator()\n for i in xrange(len(variables)):\n currentvar = itvar.Next()\n if currentvar.GetName() == varname:\n return currentvar\n return None", "def get_var(my_vars: dict, n...
[ "0.6998734", "0.6622158", "0.6510546", "0.6485467", "0.64809453", "0.6438531", "0.6372909", "0.6231107", "0.62161946", "0.6211909", "0.61617017", "0.61312854", "0.61312854", "0.61312854", "0.6118046", "0.61137587", "0.60860264", "0.6083659", "0.6039945", "0.60329455", "0.6030...
0.664146
1
Like tf.group(), but returns tf.constant(0) instead of tf.no_op(), which makes it suitable for use in tf.cond().
def group(*ops): with tf.control_dependencies(ops): return tf.constant(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def true_fn(thunk):\n\n def result():\n with tf.control_dependencies([thunk()]):\n return tf.no_op()\n\n return result", "def _tf_remove_noise_op(self):\n remove_noise_ops = list()\n for var, noise in zip(self.model_variables, self.noise):\n remove_noise_ops.append(tf1....
[ "0.5864202", "0.57944286", "0.56275386", "0.55796117", "0.5453107", "0.5399279", "0.5215421", "0.5198154", "0.51661533", "0.5108012", "0.51059777", "0.5075368", "0.50704163", "0.50618136", "0.50474447", "0.5038324", "0.5014155", "0.5000767", "0.49992824", "0.49674386", "0.495...
0.8214232
0
Torch7 style maxnorm. After gradients are applied in a training step, the weights of each layer are clipped. This maxnorm applies to convolutional layers as well as fully connected layers and does not apply to biases.
def maxnorm(norm_val=7): weights = [v for v in tf.global_variables() if ('weights' in v.name)] for weight in weights: op_name = '{}/maxnorm'.format(weight.name.split('/weights')[0]) maxnorm_update = weight.assign( tf.clip_by_norm(weight, norm_val, axes=[0], name=op_nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clip_grad_norm(self, model: nn.Module, max_norm: float) -> None:\n\n if self.accumulate_step < self.accumulate_size:\n pass\n else:\n self.optim.clip_grad_norm(model, max_norm)", "def clip_grad_norm_(\n self,\n max_norm: Union[float, int],\n norm_type: Union...
[ "0.72164625", "0.7000151", "0.69275415", "0.68440175", "0.66998667", "0.6624446", "0.65868104", "0.6558636", "0.6545179", "0.64369893", "0.6364003", "0.62383497", "0.6205696", "0.6186037", "0.60801", "0.5925556", "0.59245735", "0.5889145", "0.5804216", "0.577506", "0.5761749"...
0.705157
1
Finds values k largest entries for the last dimension and returns them in the order they originally appeared. If the input is a vector (rank1), finds the k largest entries in the vector and outputs their values and indices as vectors. Thus values[j] is the jth largest entry in input, and its index is indices[j]. For ma...
def order_preserving_k_max(input_tensor, k): ndims = input_tensor.shape.ndims # get indices of topk elements indices = tf.nn.top_k(input_tensor, k, sorted=False).indices#shape [d1,d2..,dn-1,k] # sort indices of topk elements indices = tf.nn.top_k(indices, k, sorted=True).values#shape [d1,d2..,d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_k_largest(lst, k):\n sorted_lst = sorted([(val, index) for index, val in enumerate(lst)])\n return list(reversed(sorted_lst[-k:]))", "def fetch_top_k(vect, mat, k):\n resultant = np.dot(mat, vect)\n arglist = np.argsort(resultant)\n arglist = arglist[-1:(-1 - k):-1]\n return arglist, r...
[ "0.74412715", "0.7364224", "0.73060775", "0.7255456", "0.70574224", "0.6939543", "0.68887436", "0.6882649", "0.6826162", "0.6823947", "0.6783091", "0.6744027", "0.6717284", "0.6693063", "0.6684043", "0.6679808", "0.65482914", "0.6510028", "0.64773804", "0.647146", "0.6465469"...
0.6945157
5
Returns the kcrust of G. The kcrust is the graph G with the kcore removed.
def k_crust(G, k=None, core_number=None): # Default for k is one less than in _core_subgraph, so just inline. # Filter is c[v] <= k if core_number is None: core_number = find_cores(G) if k is None: k = max(core_number.values()) - 1 nodes = (v for v in core_number if core_number[v]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k_core(G, k=None, core_number=None):\n\n def k_filter(v, k, c):\n return c[v] >= k\n\n return _core_subgraph(G, k_filter, k, core_number)", "def getGC(self):\n numGC = self.sequence.upper().count(\"G\") + self.sequence.upper().count(\"C\")\n self.gc = float(numGC)/len(self.sequence...
[ "0.6385755", "0.59054255", "0.5891297", "0.5712753", "0.5689108", "0.56852335", "0.56576717", "0.5619688", "0.5619688", "0.5573303", "0.5529116", "0.5504322", "0.54745734", "0.546971", "0.5468586", "0.5468586", "0.5468586", "0.5459498", "0.5457972", "0.54476565", "0.5441494",...
0.7385849
0
Gets the resources of this WorkspaceEntityAllOf.
def resources(self): return self._resources
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resources(self):\n return list(self.get_resources_for_type(gdef.ResType_All))", "def _get_all_resources(self):\n all_resources = []\n for resource in ResourceModel.scan():\n all_resources.append(resource)\n return all_resources", "def get_all_resources(self) -> list[R...
[ "0.7507287", "0.7499453", "0.74974227", "0.70157844", "0.691287", "0.68473494", "0.6799267", "0.6797496", "0.6797496", "0.6617967", "0.6607417", "0.660303", "0.65859246", "0.65544945", "0.65544945", "0.65544945", "0.65544945", "0.65544945", "0.65544945", "0.6529596", "0.64823...
0.6913973
5
Increases indentation level and adjusts indentation string.
def _increaseindentation(self): self._indentlist.append(self._curindent) if not self._equalsigns[-1]: self._curindent = self._curindent + self._indent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def increase_code_indent(self) -> None:\n self._parent_node.increase_code_indent()", "def indent(self):\n self.indent_level += self.INDENT_STEP", "def indent(self):\n self.indent_level += self.INDENT_STEP", "def indent(string, level=1):\n spaces = ' ' * (level * 4)\n return \"%s%s\...
[ "0.72753567", "0.7210775", "0.7210775", "0.7075141", "0.70399714", "0.70126915", "0.699211", "0.6867546", "0.68022585", "0.6727229", "0.67193717", "0.6692529", "0.6684161", "0.66284263", "0.6561104", "0.6560388", "0.6558288", "0.6551814", "0.6538331", "0.6534036", "0.6523062"...
0.79082125
0
Convert a set of `InputExample`s to a list of `InputFeatures`.
def convert_examples_to_features(examples, label_list, max_seq_length, tokenizer): features = [] for (ex_index, example) in enumerate(examples): if ex_index % 10000 == 0: print("Writing example %d of %d" % (ex_index, len(examples))) feature = convert_single_example(e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_examples_to_features(examples, tokenizer, is_training, args):\n all_features = []\n positive_features = 0\n negative_features = 0\n logger.info(\"Converting a list of NqExamples into InputFeatures ...\")\n for index, example in enumerate(tqdm(examples)):\n example_index = example[...
[ "0.7313619", "0.7043189", "0.69537574", "0.6944703", "0.68829805", "0.68499136", "0.6838839", "0.6821367", "0.6765219", "0.67009884", "0.66914606", "0.6658505", "0.6588142", "0.65752536", "0.65514153", "0.64245003", "0.6417711", "0.633485", "0.63252825", "0.63159335", "0.6282...
0.68623215
5
Creates a classification model.
def create_model(is_predicting, input_ids, input_mask, segment_ids, labels, num_labels): BERT_MODEL_HUB = "https://tfhub.dev/google/bert_uncased_L-12_H-768_A-12/1" bert_module = hub.Module( BERT_MODEL_HUB, trainable=True) bert_inputs = dict( input_ids=input_ids, input_mask=input_mask, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_model(self):\n self.classifier = DecisionTreeClassifier(max_depth=1)", "def create_model(self, C : float =1):\n self.classifier = RandomForestClassifier(max_depth=5)", "def create_model():\n\n # Create a sequential model (a simple NN is created) adding a softmax activation at the en...
[ "0.7451048", "0.716728", "0.70753753", "0.69427526", "0.69337225", "0.69306064", "0.6929345", "0.68631464", "0.68004555", "0.6769279", "0.6737084", "0.66838384", "0.66709864", "0.660953", "0.65912193", "0.6564333", "0.6534873", "0.6526978", "0.6525293", "0.6521778", "0.651739...
0.0
-1
Returns the path to the root folder of the experiment.
def output_path(self) -> str: if self._output_path is None: if not self._root_folder: self._root_folder = self._env.experiments_folder folder = os.path.join(self._root_folder, self.key) if not os.path.exists(folder): os.makedirs(folder) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_root_folder() -> Path:\n return Path(__file__).parent.parent", "def getRootPath()->str:\n if '--develop' in sys.argv:\n return eel._get_real_path('public') + '/'\n\n return eel._get_real_path('build') + '/'", "def getRelativeRootExperimentPath(self):\n return userId + \"/\" + \\\...
[ "0.80035096", "0.7927236", "0.7888841", "0.7845371", "0.7838125", "0.77557373", "0.77001494", "0.7654139", "0.7621852", "0.76073587", "0.76045436", "0.7551055", "0.75420254", "0.75420254", "0.7526352", "0.75117654", "0.7506533", "0.74333435", "0.7365528", "0.7313269", "0.7301...
0.71898925
25
Returns the name of the experiment.
def name(self) -> str: return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def experiment_name(self):\n # type: () -> string_types\n return self._experiment_name", "def get_name() -> str:\n pass", "def name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"name\")", "def name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"name\")"...
[ "0.8997045", "0.72250617", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216", "0.71156216",...
0.0
-1
Returns the key of the experiment.
def key(self) -> str: return self._key
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def key(self) -> str:\n return pulumi.get(self, \"key\")", "def key(self) -> str:\n return pulumi.get(self, \"key\")", "def key(self) -> str:\n return pulumi.get(self, \"key\")", "def key(self) -> str:\n return pulumi.get(self, \"key\")", "def key(self) -> str:\n return p...
[ "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965", "0.81004965"...
0.7597631
79
Get all parameters saved in experiment metadata Returns Dictionary of parameters in experiment metadata.
def params(self) -> dict: if not self.exp_metadata.parameters: self.exp_metadata.parameters = {} return self.exp_metadata.parameters
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_parameters(self):\n d = Algorithm.get_parameters(self)\n d.update({\n 'M': d.pop('population_size', self.population_size),\n 'num_tests': self.num_tests,\n 'num_searches': self.num_searches,\n 'num_searches_best': self.num_searches_best,\n ...
[ "0.6564775", "0.655918", "0.65582025", "0.6553709", "0.6525668", "0.6504159", "0.64515305", "0.64307314", "0.64307314", "0.64307314", "0.64307314", "0.64307314", "0.63961726", "0.639412", "0.63800716", "0.63401216", "0.63139826", "0.63129795", "0.6309134", "0.63009036", "0.63...
0.7654681
0
Initialize the tensorboard logger via tensorboardX Summary Writer. Should be only used if manual changes on the Summary Writer configurations are required.
def init_tensorboard_logger(self, **kwargs): self._tensorboard_logger = SummaryWriter(logdir=self.tensorboard_path, **kwargs) self.log.info("Tensorboard Logger initialized in: " + str(self.tensorboard_path)) return self._tensorboard_logger
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_tensorboard(self):\n self.writer = SummaryWriter(log_dir=self.log_dir)", "def initialize_summary(self):\n if self.need_logs:\n self.summary_writer = tf.summary.create_file_writer(self.log_dir)\n if self.verbose > 0:\n full_log_path = os.path.abspath(se...
[ "0.7759092", "0.7696703", "0.72331685", "0.7204192", "0.72003067", "0.7179548", "0.7138571", "0.640374", "0.6379246", "0.63568395", "0.62425405", "0.6236441", "0.6197348", "0.6181546", "0.6063226", "0.60446495", "0.5939318", "0.59059405", "0.57761616", "0.5675656", "0.5615506...
0.83511245
0
Run the gui and program.
def main(): root = tk.Tk() root.geometry("250x100+300+300") TrendProg(root) root.mainloop()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run():\n gui = GUI()\n gui.mainloop()", "def run_gui(game):\n gui = GUI(game)\n gui.start()", "def main():\n app = QApplication(sys.argv)\n app_window = Gui()\n app_window.show()\n sys.exit(app.exec_())", "def run(self):\n self.ui['main_window'].widgets['main'].show_all()\n...
[ "0.81460315", "0.7663372", "0.7296287", "0.72824997", "0.72778565", "0.72256553", "0.7212638", "0.71543854", "0.7092738", "0.7032763", "0.70209104", "0.7002369", "0.69722646", "0.69345784", "0.6929633", "0.68498343", "0.6839675", "0.6825255", "0.6806089", "0.6797806", "0.6769...
0.0
-1
Swapping the running average of params and the current params for saving parameters using polyak averaging
def swap(self): for group in self.param_groups: for p in group['params']: state = self.state[p] new = p.data p.data = state['exp_avg_param'] state['exp_avg_param'] = new
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_and_store(self):\n # Initialization assumptions\n z = self.draw_normal_initial()\n gradient = self.cv_gradient_initial(z)\n gradient[np.isnan(gradient)] = 0\n variance = np.power(gradient,2) \n final_parameters = self.current_parameters()\n final_sampl...
[ "0.64159817", "0.64159817", "0.62217474", "0.62217474", "0.61541367", "0.6141915", "0.6136973", "0.6090567", "0.6029247", "0.59909755", "0.5967463", "0.5965821", "0.5959663", "0.59425735", "0.59056664", "0.58724535", "0.58724535", "0.5864924", "0.5849023", "0.5820523", "0.580...
0.7146599
0
check if ImageNet dataset exists (DO NOT assign train/val here).
def prepare_data(self, *args, **kwargs) -> None: if not (self.root / "train").exists(): raise ValueError( f"Please download and set ImageNet-1k train data under {self.root}." ) if not (self.root / "val").exists(): raise ValueError( f"Pl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_dataset(self):\n return self._dataset is not None", "def check_dataset_exists(dataset):\n result = subprocess.call(['das_client.py', '--query', 'dataset dataset=%s' % dataset])\n return result == 0", "def exists_dataset(self, dataset):\n assert dataset, \"Must input a valid dataset name....
[ "0.68156195", "0.6572214", "0.64759994", "0.6423003", "0.63784856", "0.63408035", "0.63105446", "0.630541", "0.630191", "0.6241443", "0.6223602", "0.62200814", "0.6180664", "0.6178709", "0.61739683", "0.6120484", "0.61084133", "0.61077416", "0.60903895", "0.60879344", "0.6070...
0.6703237
1
Returns an arg_scope to use for dynamic convolution ops containing activation function, batch norm function and batch norm parameters based on the configuration. Note that if the batch_norm parameteres are not specified in the config (i.e. left to default) then batch norm is excluded from the arg_scope. The batch norm ...
def build(dynamic_hyperparams_config, is_training): if not isinstance(dynamic_hyperparams_config, hyperparams_pb2.Hyperparams): raise ValueError('dynamic_hyperparams_config not of type ' 'hyperparams_pb.Hyperparams.') batch_norm = None batch_norm_params = None if dy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def densenet_arg_scope(weight_decay=0.0001,\n batch_norm_decay=0.997,\n batch_norm_epsilon=1e-5,\n batch_norm_scale=True,\n activation_fn=tf.nn.relu,\n use_batch_norm=True):\n batch_norm_params = {\n ...
[ "0.6843026", "0.67404616", "0.65202105", "0.6406418", "0.6402436", "0.63414556", "0.63395023", "0.61978674", "0.61635715", "0.61244476", "0.609867", "0.60621697", "0.6045559", "0.6041577", "0.5825708", "0.5773355", "0.5625885", "0.5521125", "0.548674", "0.54683644", "0.541924...
0.69861835
0
Try to get the list without being authenticated.
def test_not_auth(self): rv = self.get('/queue/') self.assertJSONError(rv, 'TagalleryMissingLoginInformation') return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_list(self, user=None):\n request = self.factory.get(self.list_url, format='json')\n force_authenticate(request, user)\n resp = self.list_view(request)\n resp.render()\n return resp", "def test_list_users_without_authenticate(self):\n response = self.client.get(r...
[ "0.72467244", "0.66703403", "0.66256607", "0.66220737", "0.6517655", "0.6515371", "0.6491584", "0.6473098", "0.64541227", "0.64537704", "0.63811934", "0.6371709", "0.6346605", "0.6328033", "0.62846893", "0.628048", "0.6253004", "0.6251493", "0.62488896", "0.62199557", "0.6209...
0.0
-1
Create a flask app with endpoints of raml config.
def create_app(name, config, db_api): app = Flask(name) app.logger.addHandler(logging.StreamHandler(sys.stdout)) app.logger.setLevel(logging.DEBUG) api = ramlfications.parse('etc/ramls/documents_api.raml') # 1. collect all methods for same endpoint pattern _resources = resource_restructure(api...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_app():\n logging.basicConfig(\n level=REANA_LOG_LEVEL,\n format=REANA_LOG_FORMAT\n )\n app = Flask(__name__)\n app.config.from_object('reana_server.config')\n app.secret_key = \"hyper secret key\"\n\n # Register API routes\n from .rest import ping, secrets, users, work...
[ "0.7708214", "0.7581686", "0.7577191", "0.75376457", "0.7520156", "0.74219793", "0.74206215", "0.74029374", "0.73879874", "0.73872286", "0.73612744", "0.73503697", "0.734313", "0.73190325", "0.73137134", "0.7307385", "0.7283077", "0.7278387", "0.7274643", "0.72675854", "0.726...
0.8163953
0
Sets up the window, label, and buttons.
def __init__(self): #Creates the window. EasyFrame.__init__(self, "Calculator", resizable = False) #Creates the data model Calculator. self.calculator = Calculator() #Keeps track of when the user enters an input. self.operatorEntered = False #Creates the color...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setupWindow(self):\n\n\t\tself.main_menu_window = MenuFrame.MainMenuFrame(self.uiCoordinator)\n\t\tself.menu_window = self.main_menu_window._mf\n\t\tself.score_window = self.main_menu_window._hf\n\t\tself.instructions_window = self.main_menu_window._if\n\t\tself.menu_window.playButton.focus_set()", "def init...
[ "0.74738705", "0.7384735", "0.73241526", "0.7298941", "0.721418", "0.7149575", "0.7039317", "0.70376295", "0.7010425", "0.7000127", "0.69840807", "0.6950503", "0.69338006", "0.6925361", "0.69248295", "0.6918405", "0.6896163", "0.68806607", "0.6876855", "0.68680435", "0.686045...
0.0
-1
Build argparse parser and return arguments from sys.argv.
def getParserArgs(): parser = argparse.ArgumentParser(description="Parse radio configurator output into header file.") parser.add_argument('-o', '--output_dir', type=str, default=None, help="The output dir.") parser.add_argument('-p', '--phy_name', type=str, default="PHY_RAIL", help="Build configuration for a spe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_arg_parser():\n\n main = ArgumentParser(description='AMFinder command-line arguments.',\n allow_abbrev=False,\n formatter_class=RawTextHelpFormatter)\n\n subparsers = main.add_subparsers(dest='run_mode', required=True,\n ...
[ "0.782141", "0.7672785", "0.76488775", "0.7600381", "0.75123173", "0.7483938", "0.74301857", "0.7347517", "0.7302632", "0.72919977", "0.72910887", "0.72847766", "0.72469634", "0.72448796", "0.7226694", "0.7215899", "0.7210028", "0.72052956", "0.71840054", "0.7180814", "0.7180...
0.0
-1
Calculate the QSNR between two tensors
def qsnr(orig, quant): qerr = orig - quant sum_err = np.sum(qerr * qerr) sum_orig = np.sum(orig * orig) if sum_err > 0: if sum_orig < sum_err: if sum_orig == 0: return -math.inf else: # Means error is larger than signal retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def psnr(im1, im2):\n\n def log10(real_number):\n \"\"\" Calculate the base-ten log of a given real number.\n\n Args:\n real_number: a real number.\n Returns:\n the base-ten log of the given real number.\n \"\"\"\n numerator = tf.math.log(real_number)\n ...
[ "0.6341072", "0.60930747", "0.6031045", "0.59354186", "0.57803565", "0.5763093", "0.57286125", "0.5530971", "0.54750836", "0.5470545", "0.5468285", "0.54677963", "0.54630816", "0.54557693", "0.5428262", "0.54207903", "0.54153985", "0.5412094", "0.54108083", "0.5408355", "0.54...
0.57994425
4
Calculate the QSNR when a tensor is quantized
def calculate_qsnr(npa, bit_size, frac_bits): qnpa = np.floor((npa * 2.0 ** frac_bits) + 0.5) max_value = 2**(bit_size - 1) - 1 min_value = -max_value - 1 qnpa = np.clip(qnpa, min_value, max_value) qnpa = (qnpa / 2.0 ** frac_bits) return qsnr(npa, qnpa)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qsnr(orig, quant):\n qerr = orig - quant\n sum_err = np.sum(qerr * qerr)\n sum_orig = np.sum(orig * orig)\n if sum_err > 0:\n if sum_orig < sum_err:\n if sum_orig == 0:\n return -math.inf\n else:\n # Means error is larger than signal\n ...
[ "0.6629407", "0.6436966", "0.632662", "0.6063881", "0.5961386", "0.5892781", "0.58670235", "0.58572304", "0.5786534", "0.57753235", "0.5757169", "0.5745312", "0.57197034", "0.57085246", "0.5687587", "0.56799066", "0.56645143", "0.5618976", "0.56103665", "0.55938184", "0.55918...
0.65738094
1
It applies the given function to each item in the iterable by spawing a number of worker processes. Each item should be tuple containing the arguments for the function.
def _doMap(self, func, iterable): name = "Mapper" sys.stderr.write("Master[%s phase]: starting\n" % name) pipes = [mp.Pipe() for _ in range(self.num_workers)] proc = [mp.Process(target=spawn_mapper(func), name=name, args=(q,)) for q in pipes] for p in proc: p.daemon =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_calculation_to_threads(iterable, func, args):\n args_list = []\n batches = list(split_iterable_to_batches(iterable))\n for batch in batches:\n temp = list(args)\n temp.insert(0, batch)\n args_list.append(tuple(temp))\n with Pool(NUM_THREADS) as p:\n results = p.sta...
[ "0.7254102", "0.6811815", "0.6780157", "0.6751505", "0.6751505", "0.6751505", "0.6751505", "0.6751505", "0.6702388", "0.6635066", "0.65289", "0.6506772", "0.6471789", "0.64153486", "0.64141583", "0.6413644", "0.63885117", "0.6310999", "0.631065", "0.62814415", "0.627808", "...
0.6406559
16
It applies the given function to each item in the iterable by spawing a number of worker processes. Each item should be tuple containing the arguments for the function.
def _doReduce(self, func): name = "Reducer" sys.stderr.write("Master[%s phase]: starting\n" % name) proc = [mp.Process(target=spawn_reducer(func), name=name) for _ in range(self.num_workers)] for p in proc: p.daemon = True p.start() for p in proc: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_calculation_to_threads(iterable, func, args):\n args_list = []\n batches = list(split_iterable_to_batches(iterable))\n for batch in batches:\n temp = list(args)\n temp.insert(0, batch)\n args_list.append(tuple(temp))\n with Pool(NUM_THREADS) as p:\n results = p.sta...
[ "0.7253993", "0.68095744", "0.6779158", "0.6750937", "0.6750937", "0.6750937", "0.6750937", "0.6750937", "0.6702896", "0.6635508", "0.6527423", "0.6506403", "0.6472981", "0.64139634", "0.64136153", "0.64131683", "0.64065", "0.6390018", "0.6312187", "0.6310306", "0.6280842", ...
0.0
-1
Numerically stable implementation of sigmoid sigmoid(x) = 1 / (1 + exp(x) Namely,
def sigmoid(x): return amath.exp(amath.minimum(0, x)) / (1 + amath.exp(-abs(x)))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sigmoid(x):\n return 1 / (1 + exp(-x))", "def sigmoid(x):\n return 1 / (1 + exp(-x))", "def sigmoid(x):\n return 1 / (1 + math.exp(-x))", "def sigmoid(x):\r\n return 1 / (1 + np.exp(-x))", "def sigmoid(x):\n return 1 / (1 + math.exp(-x))", "def sigmoid(x):\n\n return 1 / (1 + math.exp...
[ "0.9161328", "0.9161328", "0.91235834", "0.9098419", "0.9094457", "0.9086827", "0.9086827", "0.90638906", "0.9058168", "0.9058168", "0.9058168", "0.9058168", "0.9058168", "0.9058168", "0.90521413", "0.90488285", "0.9026868", "0.9024745", "0.9019162", "0.90175104", "0.90061754...
0.8549054
40
Setting the learning rate
def set_learning_rate(self, rate): self.SGD.set_learning_rate(rate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_learning_rate(self):\r\n\r\n self.n_steps += 1\r\n lr = self.factor * self._get_lr_scale()\r\n for param_group in self._optimizer.param_groups:\r\n param_group['lr'] = lr", "def learning_rate(epoch):\n self.lr = self.lr / 1.00000001\n return self....
[ "0.7883929", "0.7836366", "0.7834718", "0.7815578", "0.77550715", "0.76793456", "0.7638497", "0.76190627", "0.76190627", "0.7612708", "0.7612708", "0.7604057", "0.75915486", "0.7575968", "0.75722873", "0.7564557", "0.75532037", "0.75489986", "0.7526663", "0.7514581", "0.75112...
0.8286136
0
Setting the learning rate
def set_learning_rate(self, rates): for (layer, rate) in zip(self.layers, rates): layer.set_learning_rate(rate)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_learning_rate(self, rate):\n self.SGD.set_learning_rate(rate)", "def _update_learning_rate(self):\r\n\r\n self.n_steps += 1\r\n lr = self.factor * self._get_lr_scale()\r\n for param_group in self._optimizer.param_groups:\r\n param_group['lr'] = lr", "def learning_...
[ "0.8286136", "0.7883929", "0.7836366", "0.7834718", "0.7815578", "0.77550715", "0.76793456", "0.7638497", "0.76190627", "0.76190627", "0.7612708", "0.7612708", "0.7604057", "0.75915486", "0.7575968", "0.75722873", "0.7564557", "0.75532037", "0.75489986", "0.7526663", "0.75145...
0.7224572
75
Compute u_tilde, which determines the energy of the hidden variables. The energy is defined as the inner product of hidden variables and u_tilde.
def _get_u_tilde(self, log_sigmoid=False): u_tilde = amath.zeros(self.dim_hidden) u_tilde += self.variables["b_h"] u_tilde += amath.tensordot(self.fifo.to_array(), self.variables["U"], axes=2) if DEBUG: u_tilde_naive = amath.zeros(self.dim_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def knotvector_u(self):\n return self._knot_vector_u", "def set_U_exp(self):\n self.set_T_lm()\n self.set_Qdot_exp()\n self.exh.U_exp = ( self.exh.Qdot_exp / (self.width *\n self.length * self.cool.ducts * self.delta_T_lm_array) ) \n self.cool.U_exp = ( self.cool.Qdot_e...
[ "0.6266905", "0.60554415", "0.6007931", "0.5793211", "0.57844716", "0.57480854", "0.5730475", "0.56947976", "0.568538", "0.56835365", "0.567276", "0.5657852", "0.55954194", "0.5583355", "0.5578917", "0.5558427", "0.55581665", "0.55384386", "0.55287015", "0.5499313", "0.548435...
0.78071135
0
Get select parameter instance from a dictionary serialization.
def from_dict(doc: Dict, validate: Optional[bool] = True) -> Select: if validate: util.validate_doc( doc, mandatory=pd.MANDATORY + ['values'], optional=pd.OPTIONAL, exception=err.InvalidParameterError ) for val i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_dict(cls, dikt) -> 'Parameters':\n return util.deserialize_model(dikt, cls)", "def from_dict(cls, dikt) -> 'EavDataAttributeOptionInterface':\n return deserialize_model(dikt, cls)", "def from_dict(cls, dikt) -> 'HosAuthenticationLogsParam':\n return util.deserialize_model(dikt, cl...
[ "0.68189895", "0.6182785", "0.60864174", "0.5985301", "0.5907492", "0.5889687", "0.5834356", "0.5729028", "0.5729028", "0.5729028", "0.5729028", "0.5729028", "0.5729028", "0.57264477", "0.5702357", "0.5687665", "0.5628156", "0.5628156", "0.56096226", "0.5592661", "0.5585766",...
0.6309112
1
Return a SQLAlchemy database engine.
def get_engine(settings: dict) -> sqlalchemy.engine.base.Engine: engine = create_engine(settings['sqlalchemy.url'], pool_recycle=3600) return engine
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_db_engine():\n # get database connection url\n connection_url = get_db_connection_url()\n\n # Create engine from connection url\n engine = create_engine(connection_url)\n\n return engine", "def get_database_engine() -> Engine:\n return engine", "def get_engine(db_params: Dict[str, str...
[ "0.89859104", "0.8957143", "0.8389312", "0.8182193", "0.79091626", "0.7854836", "0.7834186", "0.7802849", "0.7802849", "0.7802849", "0.7802849", "0.77832955", "0.77067125", "0.7698464", "0.7549901", "0.74196523", "0.7409052", "0.7281419", "0.7266251", "0.72596395", "0.7233348...
0.74365425
15
Create datetime now with pytx UTC timezone.
def datetime_utcnow() -> datetime: return datetime.now(tz=pytz.timezone('UTC'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nowUTC():\n return datetime.datetime.now(pytz.utc)", "def datetime_utc_now() -> datetime:\n return datetime.now(timezone.utc)", "def utc_now():\n return datetime.now(tz=timezone.utc)", "def now_utc() -> datetime:\n return datetime.now(timezone.utc)", "def now():\n return datetime.datetim...
[ "0.80685484", "0.79951584", "0.7922154", "0.78983724", "0.7862415", "0.7860015", "0.78393406", "0.7705348", "0.7703887", "0.7700647", "0.7585176", "0.75721276", "0.7540259", "0.75354993", "0.7478213", "0.7445538", "0.73615056", "0.73108274", "0.72481084", "0.7229157", "0.7219...
0.7738988
7
Returns the path to the toplevel directory of current project
def get_project_root(repo=None): if repo is None: repo = get_repo() return repo.git.rev_parse(u"--show-toplevel")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_project_root() -> pl.Path:\n return pl.Path(__file__).parent.parent", "def get_project_root():\n return str(Path(__file__).parent.parent)", "def get_project_root():\n return str(Path(__file__).parent.parent)", "def get_project_root():\n return Path(__file__).parent.parent", "def get_pro...
[ "0.8438261", "0.8335189", "0.8335189", "0.8318421", "0.82943785", "0.82619417", "0.82619417", "0.82619417", "0.82619417", "0.81889457", "0.81851214", "0.8081055", "0.80066735", "0.7977336", "0.7783989", "0.77591527", "0.7701959", "0.7669172", "0.7647242", "0.7629766", "0.7605...
0.7027059
64
Unique identifier that uniquely identifies this listener.
def uuid(self): return self._uuid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listener_id(self) -> str:\n return pulumi.get(self, \"listener_id\")", "def listener_id(self) -> str:\n return pulumi.get(self, \"listener_id\")", "def listener_id(self) -> str:\n return pulumi.get(self, \"listener_id\")", "def unique_id(self) -> str:\n return \"cid_listener\"...
[ "0.8341716", "0.8341716", "0.8341716", "0.83173174", "0.8053242", "0.8053242", "0.78550756", "0.7570067", "0.7570067", "0.7383685", "0.722216", "0.6989688", "0.69441146", "0.6914998", "0.6908386", "0.6908386", "0.69058186", "0.69058186", "0.69058186", "0.68964666", "0.6864221...
0.0
-1
Checks if the event can trigger a notification.
def can_trigger_notification(self, event_type): if event_type in self.DISALLOWED_NOTIFICATION_EVENTS: return False else: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_notify(self, last_notification):\n return (\n features.is_enabled(features.EMAIL_NOTIFICATIONS)\n and self.notification_settings.via_email\n and api.can_email_user(self.user)\n and super().can_notify(last_notification)\n )", "def non_compliant_not...
[ "0.6998167", "0.69191664", "0.69191664", "0.65326613", "0.6475244", "0.6459234", "0.6380957", "0.6380957", "0.6380957", "0.6347419", "0.6335025", "0.63038874", "0.63038874", "0.630382", "0.6301354", "0.6235123", "0.6211978", "0.61613226", "0.61613226", "0.6149474", "0.6066255...
0.8520992
0
The name or ARN of the Lambda Layer, which you want to grant access to.
def layer_name(self) -> pulumi.Input[str]: return pulumi.get(self, "layer_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def layer_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"layer_name\")", "def layer_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"layer_name\")", "def acl_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"acl_name\")", "def lambda_arn_lo...
[ "0.5627799", "0.5575423", "0.5254363", "0.5234327", "0.5168648", "0.5117131", "0.5072278", "0.50700253", "0.50589323", "0.50474364", "0.4998746", "0.49899146", "0.4976987", "0.49668998", "0.49144915", "0.49144915", "0.49144915", "0.49144915", "0.49144915", "0.49111262", "0.49...
0.5789086
0