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
Returns the name of the class.
def name(self): return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def className(self):\n namevalue = self.__class__.__name__\n return str(namevalue)", "def class_name(cls):\n return cls.__name__", "def class_name(cls):\n return cls.__name__", "def f_get_class_name(self):\n return self.__class__.__name__", "def name(self) -> str:\n return...
[ "0.88993603", "0.88347316", "0.88347316", "0.883211", "0.8819767", "0.8817658", "0.8806164", "0.87430435", "0.85597485", "0.8538126", "0.8421521", "0.8307945", "0.8271088", "0.82666683", "0.8091975", "0.8052826", "0.8052826", "0.80181473", "0.800687", "0.800687", "0.800687", ...
0.0
-1
Sets the name of this class to the given name.
def name(self, name): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\n self.class_name = name", "def set_name(self, name):\r\n self.__name = name", "def set_name(self, name):\n self.__name = name", "def set_name(self, name):\n self.__name = name", "def setname(self, name):\n self.__name = name", "def set_name(se...
[ "0.92215306", "0.88581187", "0.88570124", "0.88570124", "0.8806531", "0.8734174", "0.87288237", "0.8720197", "0.8720197", "0.8720197", "0.8720197", "0.8720197", "0.8707534", "0.86965436", "0.8648208", "0.86241555", "0.86241555", "0.8609386", "0.84949774", "0.84511447", "0.845...
0.80974764
53
Some simple tests of softmax to get you started.
def __test_softmax(): test1 = softmax(tf.constant(np.array([[1001, 1002], [3, 4]]), dtype=tf.float32)) with tf.Session() as sess: test1 = sess.run(test1) __test_all_close("Softmax test 1", test1, np.array([[0.26894142, 0.73105858], [0.268941...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_softmax_basic():\n print(\"Running basic tests...\")\n test1 = softmax(np.array([1, 2]))\n print('test1', test1)\n ans1 = np.array([0.26894142, 0.73105858])\n assert np.allclose(test1, ans1, rtol=1e-05, atol=1e-06)\n\n test2 = softmax(np.array([[1001, 1002], [3, 4]]))\n print('test2',...
[ "0.8116499", "0.77225614", "0.7486755", "0.73800886", "0.7283141", "0.72779024", "0.71839833", "0.71364516", "0.7128197", "0.7128197", "0.7122751", "0.70955795", "0.7094116", "0.70760494", "0.70665264", "0.7064367", "0.70514035", "0.70447326", "0.7034743", "0.7031193", "0.702...
0.794297
1
Some simple tests of cross_entropy_loss to get you started.
def __test_cross_entropy_loss(): y = np.array([[0, 1], [1, 0], [1, 0]]) yhat = np.array([[.5, .5], [.5, .5], [.5, .5]]) test1 = cross_entropy_loss(tf.constant(y, dtype=tf.int32), tf.constant(yhat, dtype=tf.float32)) with tf.Session() as sess: test1 = sess.run(test1) expected = -3 * np.log(....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_cross_entropy(self):\n loss = losses.cross_entropy_with_logits(\n logits=self.logits, targets=self.targets)\n kl = loss.mean()\n\n expected_loss = -(jnp.log(0.9) + jnp.log(0.1) + jnp.log(0.9)) / 3\n\n self.assertAlmostEqual(kl, expected_loss)", "def test_dice_crossentropy_loss():\n ...
[ "0.82755613", "0.78304213", "0.72712684", "0.7239404", "0.7227094", "0.72051513", "0.71910083", "0.7070185", "0.7020111", "0.69459105", "0.6841313", "0.6788655", "0.6786951", "0.6761507", "0.6754371", "0.671068", "0.6704314", "0.67020065", "0.66917175", "0.66852397", "0.66787...
0.84563804
0
Close any open data connection.
def close(self) -> None: # Make sure we don't leak connections after finising insertion. if self.__batch: raise Exception('Logic error, opened a batch without closing!') if self.__session is not None: self.__session.close() if self.__conn is not None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self):\n self.data.close()", "def close(self): \n\t\tself.connection = None", "def close_connections(self):\n self._connection.close_connection()", "def close(self):\n self._connection.close()", "def close(self):\n self.connection = None", "def close(self):\n try:...
[ "0.7820663", "0.7574135", "0.7539795", "0.7532327", "0.7517971", "0.74852216", "0.74800974", "0.7371049", "0.7371049", "0.7371049", "0.7371049", "0.7371049", "0.7371049", "0.7371049", "0.7364353", "0.73604417", "0.7354591", "0.7351972", "0.7347524", "0.7346699", "0.7344706", ...
0.68124825
87
Constructs a ResNet50 model.
def resnet50(pretrained=False, **kwargs): model = ResNet(Bottleneck, [3, 4, 6, 3], **kwargs) if pretrained: model.load_state_dict(model_zoo.load_url(model_urls['resnet50'])) fc = transfer_fc(model.fc) model.fc = fc return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resnet50(**kwargs):\n model = ResNet(Bottleneck, [3, 4, 6, 3], **kwargs)\n return model", "def resnet50(pretrained=False, **kwargs):\n model = ResNet(Bottleneck, [3, 4, 6, 3], **kwargs)\n if pretrained:\n model.load_state_dict(model_zoo.load_url(model_urls['resnet50']))\n return...
[ "0.75524974", "0.7472704", "0.7472704", "0.7472704", "0.7472704", "0.74527013", "0.7383889", "0.7383889", "0.7358949", "0.7353506", "0.72408795", "0.72408795", "0.7188833", "0.715541", "0.7098599", "0.701485", "0.6966069", "0.6867757", "0.68214357", "0.67993224", "0.6731626",...
0.7554943
0
Save Verse.DICT to file
def save_manual_file(filename): if not filename: return with open(filename, "w") as file: for value in Verse.DICT.values(): file.write(str(value["scansion"]) + "\t" + value["comment"] + "\n")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self):\n if not os.path.exists(self.dictionary_save_path) and self.dictionary_save_path != \"\":\n os.makedirs(self.dictionary_save_path)\n with open(self.dictionary_save_path + \"dictionary\", 'w') as f:\n f.write(\"{}\\n\".format(len(self.dictionary)))\n\n ...
[ "0.68741155", "0.6828163", "0.6712714", "0.66687375", "0.6650131", "0.66389066", "0.6588908", "0.65626913", "0.652439", "0.6452474", "0.64231807", "0.64148605", "0.6411962", "0.64060104", "0.6405783", "0.63432", "0.6319164", "0.6312772", "0.62979496", "0.6286753", "0.62529236...
0.6615852
6
Returns properly encoded system PATH variable string.
def _GetSystemPath(): return encoding_util.GetEncodedValue(os.environ, "PATH")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_path(path):\n if is_windows(): return path.replace('/', '\\\\')\n else: return path.replace('\\\\', '/')", "def shell_path() -> str:\n try:\n return os.environ[\"PATH\"]\n except KeyError:\n raise ShellError(1, \"Environment symbol `PATH` is not set\")", "def get_path(self)...
[ "0.68709195", "0.6716573", "0.6617902", "0.641805", "0.63599396", "0.61198056", "0.61192733", "0.6037984", "0.5999578", "0.59767264", "0.5953169", "0.59403676", "0.59384656", "0.5928515", "0.592036", "0.5908992", "0.5889995", "0.5856778", "0.5833663", "0.57652295", "0.5724638...
0.7920022
0
Create a logger. This sucks, the logging module sucks, but it'll do for now.
def file_logger(filename): handler = logging.FileHandler(filename) formatter = logging.Formatter() handler.setFormatter(formatter) log = logging.getLogger(filename) log.addHandler(handler) log.setLevel(logging.DEBUG) return log, handler
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_logger() -> logging.Logger:\n pass # TODO: Replace with implementation!", "def create_logger():\r\n global logger\r\n logger = logging.getLogger(logger_name)\r\n\r\n formatter = logging.Formatter(fmt='%(asctime)s %(levelname)s %(message)s')\r\n \r\n handler = logging.StreamHandler()...
[ "0.84182733", "0.819534", "0.7961672", "0.7803998", "0.7756251", "0.76918125", "0.7573778", "0.75721204", "0.75514233", "0.7508683", "0.74483263", "0.7435324", "0.7368805", "0.7337912", "0.73327154", "0.7243721", "0.72144574", "0.71814203", "0.7160558", "0.7136752", "0.713190...
0.0
-1
Create a logger. This sucks.
def stream_logger(stream): handler = logging.StreamHandler(stream) formatter = logging.Formatter() handler.setFormatter(formatter) log = logging.getLogger() log.addHandler(handler) log.setLevel(logging.DEBUG) return log, handler
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_logger() -> logging.Logger:\n pass # TODO: Replace with implementation!", "def create_logger():\r\n global logger\r\n logger = logging.getLogger(logger_name)\r\n\r\n formatter = logging.Formatter(fmt='%(asctime)s %(levelname)s %(message)s')\r\n \r\n handler = logging.StreamHandler()...
[ "0.858545", "0.8148361", "0.78952116", "0.7860929", "0.7735865", "0.7679383", "0.76768506", "0.7592697", "0.75904876", "0.7455566", "0.7434225", "0.73339474", "0.73096603", "0.7309638", "0.7294183", "0.7264974", "0.7243274", "0.7234114", "0.72298795", "0.7225147", "0.72191125...
0.0
-1
Return imported YAML library with Manubot configuration. The representers are only applied to yaml.dump, not yaml.safe_dump.
def get_configured_yaml() -> ModuleType: import yaml from manubot.cite.csl_item import CSL_Item yaml.add_representer(str, _yaml_str_representer) # CSL_Item: pyyaml chokes on dict subclass # https://github.com/yaml/pyyaml/issues/142 # https://stackoverflow.com/a/50181505/4651668 yaml.add_re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yamlConfigForParsingPlugins():\n parameters = \"\"\"\njoinPaths: !joinPaths\n - a\n - b\n - \"c\"\nrunPageTemplates: !findRunPageTemplates\n - \"templates\"\nbcrypt: !bcrypt\n bcryptLogRounds: 12\n user: \"pass\"\nbcryptNoUser: !bcrypt\n bcryptLogRounds: 12\n null: null\nsecretKey: !...
[ "0.593774", "0.5921726", "0.58664435", "0.57701933", "0.5768193", "0.57167166", "0.5663204", "0.5656816", "0.55872715", "0.55870515", "0.557856", "0.55684394", "0.55563956", "0.55385125", "0.55040747", "0.5460034", "0.5431224", "0.54245484", "0.53808296", "0.5364813", "0.5351...
0.6522517
0
Calculates derivative. Calculates the derivative of the current point(contour_points[target_index]) and returned it.
def calculate_derivative(contour_points, target_index): # Makes currrent point's bezier instance. nodes = np.asfortranarray([ [float(contour_points[target_index+i].x) for i in range(-3, 1)], [float(contour_points[target_index+i].y) for i in range(-3, 1)] ]) # Extends the curve for th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def derivative ( self ):\n return self.__derivative", "def GetDerivative(self, *args):\n return _ITKCostFunctionsPython.itkSingleValuedCostFunction_GetDerivative(self, *args)", "def GetDerivative(self, *args):\n return _ITKCostFunctionsPython.itkMultipleValuedCostFunction_GetDerivative(sel...
[ "0.65168947", "0.6490821", "0.6485603", "0.64399743", "0.6324974", "0.6288673", "0.6273341", "0.6135904", "0.6100651", "0.60959804", "0.60452104", "0.60360706", "0.6001115", "0.59732074", "0.5969094", "0.59659034", "0.5959729", "0.5948182", "0.59239936", "0.59065986", "0.5906...
0.8038241
0
Override the default Equals behavior
def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.id == other.id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n pass", "def __eq__(self, other):\n pass", "def __eq__(self, other):\n raise NotImplementedError('must be implemented by subclass')", "def __eq__(self, other):\n raise NotImplementedError('must be implemented by subclass')", "def __eq__(self, ot...
[ "0.8262612", "0.8262612", "0.81877613", "0.81877613", "0.81877613", "0.81877613", "0.8174912", "0.81672645", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.80995893", "0.8097035", ...
0.0
-1
Get the value of the indexth node in the linked list. If the index is invalid, return 1.
def get(self, index): if index < 0 or index >= self.size: return -1 if self.head is None: return -1 curr = self.head for i in range(index): curr = curr.next return curr.val
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, index: int) -> int:\n node = self.get_node(index)\n if node:\n return node.val\n else:\n return -1", "def get(self, index: int) -> int:\n cnt = 0\n cur = self.head \n while cur != None:\n if(cnt == index):\n r...
[ "0.8309071", "0.8223403", "0.81012017", "0.79819065", "0.7971722", "0.79658747", "0.7951939", "0.79279983", "0.7905674", "0.7799605", "0.7734565", "0.77311933", "0.76516724", "0.758455", "0.7507213", "0.74742204", "0.7455023", "0.7386918", "0.7386918", "0.7384269", "0.7336994...
0.79492354
7
Add a node of value val before the first element of the linked list. After the insertion, the new node will be the first node of the linked list.
def addAtHead(self, val): node = Node(val) node.next = self.head self.head = node self.size += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, val):\n new_node = Node(val)\n new_node.next = self.head\n self.head = new_node", "def addAtHead(self, val):\n node = ListNode(val)\n if self.head == None:\n self.head = node\n else:\n node.next = self.head\n self.head = ...
[ "0.78883785", "0.78117585", "0.77152324", "0.7666402", "0.76329917", "0.75957716", "0.7585832", "0.7570062", "0.75018936", "0.7492881", "0.74778414", "0.746273", "0.74288386", "0.74069875", "0.7381592", "0.7285144", "0.72472924", "0.7235549", "0.71726453", "0.7145138", "0.712...
0.73486614
16
Append a node of value val to the last element of the linked list.
def addAtTail(self, val): curr = self.head if curr is None: self.head = Node(val) else: while curr.next is not None: curr = curr.next curr.next = Node(val) self.size += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append(self, val):\n inserted_node = DblNode(val, previous_node=self.tail)\n self.tail.next_node = inserted_node\n self.tail = inserted_node", "def addAtTail(self, val):\n if self.head is None:\n self.addAtHead(val)\n else:\n new_node = Node(val)\n ...
[ "0.8013819", "0.7980081", "0.789393", "0.78565055", "0.7784458", "0.77449065", "0.7737547", "0.772186", "0.7691112", "0.76322484", "0.7627508", "0.75500035", "0.7531419", "0.75245756", "0.74506587", "0.741579", "0.73200387", "0.7240789", "0.72233355", "0.72202706", "0.7215777...
0.7879933
4
Add a node of value val before the indexth node in the linked list. If index equals to the length of linked list, the node will be appended to the end of linked list. If index is greater than the length, the node will not be inserted.
def addAtIndex(self, index, val): if index < 0 or index > self.size: return if index == 0: self.addAtHead(val) else: curr = self.head for i in range(index - 1): curr = curr.next node = Node(val) node.next = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addAtIndex(self, index, val):\n if index < 0:\n new_node = ListNode(val)\n new_node.next = self.head\n self.head = new_node\n\n if index <= self.length:\n prev = None\n curr = self.head\n for i in range(1, index + 1):\n ...
[ "0.8003979", "0.790325", "0.7841176", "0.77997273", "0.77550274", "0.7741106", "0.77407724", "0.77287096", "0.7707012", "0.7616886", "0.7594934", "0.75006837", "0.7280381", "0.7210167", "0.715475", "0.7088678", "0.70231116", "0.70229185", "0.7017948", "0.6930423", "0.69222456...
0.7611314
10
Initialize your data structure here. Set the size of the queue to be k.
def __init__(self, k): self.__start = 0 self.__size = 0 self.__buffer = [0] * k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, k):\n self.queue = []\n self.size = k", "def __init__(self, k):\n self.queue = [0]*k\n self.headIndex = 0\n self.count = 0\n self.capacity = k", "def __init__(self, k: int):\n self.queue = [0]*k\n self.headIndex = 0\n self.count ...
[ "0.8516807", "0.84724", "0.8442024", "0.8408613", "0.83645415", "0.83013344", "0.80668235", "0.806671", "0.7867507", "0.7859787", "0.7746976", "0.7680882", "0.7668859", "0.750372", "0.7387494", "0.71958184", "0.7129887", "0.69766885", "0.6914721", "0.6911065", "0.6890327", ...
0.7602852
13
Get the front item from the queue.
def Front(self): return -1 if self.isEmpty() else self.__buffer[self.__start]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getFront(self):\n\t\tfront = self.queue[self.front]\n\t\treturn front\n\t\tpass", "def front(self):\n return self.queue[0] if not self.empty() else None", "def Front(self):\r\n if (len(self.queue) >= 1):\r\n return self.queue[0]\r\n else:\r\n return -1", "def fr...
[ "0.90385115", "0.89434814", "0.846308", "0.8426328", "0.8357853", "0.83309764", "0.83309764", "0.83211964", "0.83211964", "0.82988536", "0.8279939", "0.8216258", "0.8213497", "0.8213348", "0.8209029", "0.8205413", "0.81683636", "0.812805", "0.81277895", "0.8076473", "0.799508...
0.0
-1
Get the last item from the queue.
def Rear(self): return -1 if self.isEmpty() else self.__buffer[(self.__start+self.__size-1) % len(self.__buffer)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last(self):\n if self.is_empty():\n raise ValueError('Queue is empty!')\n return self.last_node().element().value()", "def last(self):\n return self.deque[-1]", "def last_item(self):\n return self.container[self.length-1]", "def Rear(self):\r\n if (len(self.q...
[ "0.8244891", "0.80609196", "0.8023466", "0.7784921", "0.7630132", "0.7629511", "0.7605435", "0.7593071", "0.7584468", "0.7563749", "0.75438356", "0.7542674", "0.7518186", "0.7494399", "0.7468868", "0.74622655", "0.74451274", "0.73947567", "0.7388928", "0.7386501", "0.737388",...
0.0
-1
Checks whether the circular queue is empty or not.
def isEmpty(self): return self.__size == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_empty(self):\n return self.queue == []", "def is_empty(self):\n return len(self.the_queue) == 0", "def is_empty(self):\n return len(self.queue) == 0", "def is_empty(self):\n return len(self.queue) == 0", "def is_empty(self):\n return len(self.__queue) > 0", "def ...
[ "0.84928405", "0.84619516", "0.84307104", "0.84307104", "0.8396348", "0.82843876", "0.82479286", "0.82338643", "0.81947076", "0.818461", "0.81779855", "0.8165327", "0.81190103", "0.81030047", "0.80961347", "0.8043779", "0.7957547", "0.79135734", "0.7910127", "0.7910127", "0.7...
0.0
-1
Checks whether the circular queue is full or not.
def isFull(self): return self.__size == len(self.__buffer)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isFull(self):\n return len(self.queue) == self.size", "def isFull(self):\r\n if (len(self.queue) == self.maxlen):\r\n return True\r\n else:\r\n return False", "def is_empty(self):\n return len(self.__queue) > 0", "def is_empty(self):\n return len(s...
[ "0.8474897", "0.8299446", "0.78827846", "0.78359354", "0.7824723", "0.78241485", "0.78241485", "0.7629068", "0.76110935", "0.7610511", "0.7585372", "0.7577803", "0.75310093", "0.7526118", "0.7490002", "0.7479669", "0.7473411", "0.7449628", "0.7448342", "0.74354005", "0.742098...
0.70143217
56
implement least squares via stochastic gradient descent
def least_squares_SGD(y, tx, initial_w, max_iters, gamma, debug = False): losses, ws = stochastic_gradient_descent(y, tx, initial_w, 1, max_iters, gamma, loss_f = model_linear.compute_loss, grad_f = model_linear.compute_gradient, debug = debug) return get_last_ans(ws, losses)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def least_squares_SGD(y, tx, initial_w, max_iters, gamma, batch_size=10, verbose=False):\n return stochastic_gradient_descent(y, tx, initial_w, max_iters, gamma, compute_mse, \n compute_mse_gradient, batch_size=batch_size, verbose=verbose)", "def least_squares_GD(y, tx, i...
[ "0.7713663", "0.7399112", "0.7314648", "0.72934103", "0.7264953", "0.72349495", "0.7231738", "0.7199636", "0.7190521", "0.71503747", "0.7126688", "0.7089232", "0.7088193", "0.7085474", "0.7060664", "0.70444363", "0.70313966", "0.7007319", "0.69230396", "0.6890908", "0.6888962...
0.746161
1
will check if we are in a docker
def in_docker(): rc, out, _ = j.sals.process.execute("cat /proc/1/cgroup", die=False, showout=False) if rc == 0 and "/docker/" in out: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def in_host():\n return not in_docker()", "def _is_docker(self) -> bool:\n from hubble.executor.helper import is_valid_docker_uri\n\n uses = getattr(self.args, 'uses', '')\n return is_valid_docker_uri(uses)", "def docker_available(): # type: () -> bool\n return bool(get_docker_comma...
[ "0.8458904", "0.809344", "0.7883601", "0.75312924", "0.7276401", "0.72710556", "0.7029961", "0.69248396", "0.6880985", "0.65386", "0.6535134", "0.6500579", "0.64642185", "0.64261025", "0.64251274", "0.63883233", "0.6352976", "0.6335942", "0.6308638", "0.63045645", "0.6279545"...
0.8364324
1
Load whole airport data into a dataframe
def airport_file_to_df(self): df = pd.read_csv( filepath_or_buffer=os.path.join(ROOT_DIR, "raw", "airports.csv".format(self.year)), sep=",", encoding="utf-8", usecols=["iata", "airport", "city", "state", "country", "lat", "long"] ) return df
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(fpath: str, station: Dict[str, Any]) -> pd.DataFrame:\n df = pd.read_csv(\n fpath,\n skiprows=station['header_line_num']-1,\n usecols=['date', 'rain'],\n )\n\n # format the date from a string to a proper datetime object\n df['date'] = pd.to_datetime(df['date'])\n\n ...
[ "0.6659389", "0.66449785", "0.6596504", "0.65827024", "0.6493813", "0.6390243", "0.63661164", "0.6343414", "0.6336618", "0.63281745", "0.63073593", "0.63018715", "0.6297033", "0.6285237", "0.6273086", "0.62721324", "0.6254697", "0.6240144", "0.6236223", "0.62351614", "0.62321...
0.7906225
0
Add airport informations (origin and destination) and rename columns to match the target table.
def transform(self, df: pd.DataFrame, df_airport: pd.DataFrame): df_res = df.merge( right=df_airport, how="inner", left_on="Origin", right_on="iata" ) df_res = df_res.rename(columns={ "iata": "origin_airport_iata", "airport": "origin_airport_name", "city": "origin_city", "state": "origin_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _remap_column_names(self, frame):\n\n frame[TransactionColumns.BANK.name] = self.INSTITUTION\n frame[TransactionColumns.ACCOUNT.name] = self.account\n frame.rename(columns=self._FIELD_2_TRANSACTION, inplace=True)\n frame[TransactionColumns.CHECK_NO.name] = None\n return frame...
[ "0.56621367", "0.54898053", "0.54139084", "0.52983475", "0.5281964", "0.525134", "0.51139855", "0.5079652", "0.5055528", "0.49718857", "0.4937306", "0.49153677", "0.48871973", "0.4878678", "0.48639172", "0.48448083", "0.48340496", "0.48268515", "0.48252338", "0.48113808", "0....
0.63960326
0
Get a list of templates to skip.
def getautoskip(): with codecs.open(archivo, 'r', 'utf-8') as f: txt = f.read() toreturn = txt.split('{{')[1:] return toreturn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_required_template_names() -> list[str]:\n return [\n \"blog_list_of_posts.html\",\n \"post.html\",\n \"post_body.html\",\n \"episode.html\",\n ]", "def test_list_unregistered_templates(self):\n pass", "def request_skip(self):\n for function in self.tree.s...
[ "0.64313555", "0.6054875", "0.59604436", "0.5833261", "0.5818439", "0.57474774", "0.5742147", "0.5717891", "0.56412756", "0.55445886", "0.55273885", "0.5520093", "0.5509917", "0.55063206", "0.55022866", "0.5484455", "0.54806983", "0.54538655", "0.5453126", "0.53953165", "0.53...
0.0
-1
The user pressed the OK button.
def ok_file(self): self.changename = self.entry.get() self.root.destroy()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OnButtonAboutOKButton(self, event):\r\n\t\tself.OnButtonOKButton()", "def okay_button1(self, i):\n if i.text() == \"OK\":\n print(\"Entry added\")", "def buttonOK_Clicked( self, event ):\n\t\tself.EndModal(wx.ID_OK)", "def okay_button2(self, i):\n if i.text() == \"OK\":\n ...
[ "0.78227097", "0.77021873", "0.76173836", "0.7427406", "0.7367486", "0.7358861", "0.72156703", "0.72156703", "0.72156703", "0.7118075", "0.7026149", "0.6983627", "0.6969694", "0.69321054", "0.6900308", "0.689739", "0.6861374", "0.6817439", "0.6808068", "0.6774355", "0.6761273...
0.0
-1
The name of this Resource.
def name(self) -> str: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self.raw_resource[\"name\"]", "def name(self):\n\n return self.resource[\"metadata\"][\"name\"]", "def get_resource_name(self):\n return self._resource_name" ]
[ "0.9066503", "0.8839653", "0.87209827" ]
0.8323005
72
The name of the Resource Group in which this Resource exists.
def resource_group_name(self) -> str: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_group_name(self):\n return self.instance_metadata.resource_group_name", "def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_gro...
[ "0.8559763", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.85397774", "0.8447364", "0.83971024", "0.83971024", "0.83971024", "0.83971024", "0.83971024", "0.83971024", ...
0.88448405
0
The type of this Resource. (e.g. `Microsoft.Network/virtualNetworks`).
def type(self) -> 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(cls):\n pass", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pu...
[ "0.7655658", "0.7655658", "0.7599685", "0.74894416", "0.74894416", "0.74894416", "0.74894416", "0.74894416", "0.73403925", "0.7302756", "0.72448605", "0.71936756", "0.71739274", "0.7154752", "0.71466047", "0.7139716", "0.71327376", "0.71052384", "0.709081", "0.70687807", "0.7...
0.71139526
46
SE Vx, byte Skip next instruction if Vx = kk.
def SE_Vx_byte(self, x, byte): if self.V[x] == byte: self.IP += 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_skip_next_if_vx_equals_kk(self, cpu):\n for x in range(0x0, 0xF):\n for v in range(0x0, 0xFF):\n cpu.V_register[x] = v\n for kk in range(0x0, 0xFF):\n cpu.opcode = 0x3000 | (x << 8) | kk\n for pc in [cpu.memory_start, cp...
[ "0.74364245", "0.73301995", "0.6521184", "0.6446971", "0.638669", "0.63786757", "0.6324784", "0.6233308", "0.57251954", "0.560877", "0.56072503", "0.5293012", "0.5264943", "0.5160183", "0.51565355", "0.5098932", "0.5097601", "0.50800997", "0.507372", "0.5054179", "0.5049199",...
0.7068386
2
SNE Vx, Vy Skip next instruction if Vx != Vy.
def SNE_Vx_Vy(self, x, y): if self.V[x] != self.V[y]: self.IP += 2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_skip_next_if_vx_not_equals_vy(self, cpu):\n for x in range(0x0, 0xF):\n for y in range(0x0, 0xF):\n cpu.opcode = 0x9000 | (x << 8) | (y << 4)\n if x != y:\n for v1 in range(0x0, 0xFF):\n for v2 in range(0x0, 0xFF):\n...
[ "0.7286332", "0.7285615", "0.6667106", "0.65609515", "0.6467941", "0.6418625", "0.63930404", "0.63357997", "0.6212689", "0.6133428", "0.6101485", "0.60515356", "0.6044929", "0.60316503", "0.60236573", "0.6007567", "0.59802157", "0.59429055", "0.594024", "0.59288514", "0.59028...
0.7482641
0
LD F, Vx Set I = location of sprite for digit Vx.
def LD_F_Vx(self, x): self.I = self.FONTSET_BASE + self.V[x] * 5
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_i_to_vx_sprite(self, cpu):\n for sprite in range(0x0, 0xF+1):\n for x in range(0x0, 0xF):\n cpu.opcode = 0xF029 | (x << 8)\n cpu.V_register[x] = sprite\n cpu.set_i_to_vx_sprite()\n assert(cpu.I == 5*sprite)", "def LD_I_Vx(...
[ "0.6885706", "0.63188356", "0.62720793", "0.60514563", "0.55746275", "0.55687076", "0.5503805", "0.5445693", "0.5425867", "0.54019946", "0.5349497", "0.5333186", "0.52959013", "0.52762663", "0.52504086", "0.5247195", "0.52422416", "0.5236254", "0.5225421", "0.52254003", "0.52...
0.670664
1
Returns an handler for the given model. If the model has not been registered, it raises a ModelNotRegistered exception.
def get_handler_for_model(self, model): try: return self._registry[model] except KeyError: raise ModelNotRegistered('Model {} is not handled'.format(model))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_registered_controller(self, model):\n return self._registry[model]", "def _get_device_handler_or_manager(device_model: str, is_manager: bool = False):\n\n LIST = HANDLERS_LIST\n handlers_list = device_data_handlers\n if is_manager:\n LIST = MANAGERS_LIST\n handlers_list = de...
[ "0.6651551", "0.6477823", "0.64591926", "0.60027087", "0.5836573", "0.5810458", "0.5679168", "0.56649196", "0.5656835", "0.5612268", "0.5611851", "0.5610348", "0.560756", "0.56045043", "0.5526375", "0.54408294", "0.5437013", "0.53842616", "0.53716993", "0.5344872", "0.5344081...
0.91294223
0
Returns a list of all the registered handlers.
def get_registered_handlers(self): return list(self._registry.values())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_handlers(self):\n\n # Get handlers \n logger.debug(\"%s: Returned %d handlers.\" % \\\n (self.__class__.__name__, len(self._handlers)))\n return self._handlers[:]", "def get_handlers(self):\n return self._handlers", "def get_handlers(self):\n # TOD...
[ "0.8398399", "0.8204768", "0.7949165", "0.76912004", "0.76632965", "0.7570377", "0.7506144", "0.74596107", "0.7447235", "0.7439526", "0.740927", "0.7377787", "0.7320181", "0.7272332", "0.72511816", "0.7241781", "0.71628493", "0.7110159", "0.7073531", "0.68987185", "0.6885192"...
0.86359733
0
Identify test data directory.
def __dir_test_data(): if Util.__calculated_dir_test_data is None: if (os.path.basename(os.path.abspath(os.path.curdir))) == Util.__C_DIR_TESTS: Util.__calculated_dir_test_data = Util.__C_DIR_TEST_DATA else: Util.__calculated_dir_test_data = os.path.join(U...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_data_dir(self):\n return os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data')", "def data_dir():\n return os.path.join(os.path.dirname(_here), 'test', 'data')", "def test_data_directory(test_directory):\n return os.path.join(test_directory, \"test_data\")", "def data_dir():\...
[ "0.8527499", "0.8354162", "0.82812095", "0.81605893", "0.78204185", "0.7799942", "0.75744677", "0.7519844", "0.7429512", "0.740115", "0.73935795", "0.7362983", "0.7341663", "0.7263582", "0.72337323", "0.721906", "0.72189635", "0.71959627", "0.71959627", "0.71441317", "0.70867...
0.7689456
6
Creates a dictionary of model attributes that will be used in the templates.
def model_attributes(self, app_label, model): model_name = model.__name__ model_name_plural = self.model_name_plural(model) slug_field = self.get_unique_slug_field_name(model) slug_field_name = slug_field.name if slug_field else "slug" lookup_field = slug_field_name if slug_field...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attributes(self) -> Dict[str, str]:\n pass", "def get_attributes(self):\n \n retdict = {}\n retdict['s'] = str(self.s)\n if self.t != None:\n retdict['t'] = str(self.t)\n retdict['a'] = str(self.a)\n retdict['b'] = str(self.b)\n retdict['c'] ...
[ "0.7038142", "0.6931104", "0.69259876", "0.69259876", "0.69259876", "0.68659824", "0.67626953", "0.666049", "0.6636217", "0.6600909", "0.65992427", "0.65954316", "0.6533479", "0.65183604", "0.64892316", "0.64890444", "0.6452411", "0.64383346", "0.6437866", "0.64309675", "0.64...
0.7289496
0
Gets the pluralized version of a model. Simply adds an 's' to model name if verbose_name_plural isn't set.
def model_name_plural(self, model): if isinstance(model._meta.verbose_name_plural, str): return model._meta.verbose_name_plural return "%ss" % model.__name__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def object_verbose_name_plural(instance):\n return instance._meta.verbose_name_plural", "def verbose_name_plural(self):\r\n if hasattr(self, \"queryset\"):\r\n return self.queryset.model._meta.verbose_name_plural\r\n return getattr(self.list, \"verbose_name_plural\", \"items\")", "d...
[ "0.7556271", "0.7274825", "0.65540975", "0.61808133", "0.61808133", "0.6117601", "0.6097287", "0.6041025", "0.60367537", "0.59125644", "0.59080726", "0.5896851", "0.5882163", "0.5845321", "0.5841604", "0.58332694", "0.5828617", "0.5730506", "0.57221365", "0.5722122", "0.56825...
0.80876535
0
Determines if model has exactly 1 SlugField that is unique. If so, returns it. Otherwise returns None.
def get_unique_slug_field_name(self, model): slug_fields = [] for field in model._meta.fields: if field.unique and isinstance(field, SlugField): slug_fields.append(field) if len(slug_fields) == 1: return slug_fields[0] return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_unique_slug(model_instance, slugable_field_name, slug_field_name):\n slug = slugify(getattr(model_instance, slugable_field_name))\n unique_slug = slug\n extension = 1\n ModelClass = model_instance.__class__\n\n while ModelClass._default_manager.filter(\n **{slug_field_name: unique...
[ "0.678756", "0.66747767", "0.6661217", "0.65907776", "0.6337914", "0.6215497", "0.61463004", "0.6094866", "0.60670626", "0.60614896", "0.6054351", "0.5901422", "0.5879561", "0.58726484", "0.5836169", "0.58235985", "0.5767295", "0.5760011", "0.57220167", "0.57108957", "0.57047...
0.7540934
0
Return the first_name plus the last_name, with a space in between.
def get_full_name(self): full_name = '%s %s' % (self.first_name, self.last_name) return full_name.strip()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def full_name(first_name, last_name):\n return first_name + \" \" + last_name", "def full_name(first_name, last_name):\n\t\n\treturn first_name + \" \" + last_name", "def get_formated_name(first_name,last_name):\n\tfull_name = first_name + '' + last_name\n\treturn full_name.title()", "def get_full_name(se...
[ "0.83423895", "0.822749", "0.8099993", "0.8067763", "0.80529904", "0.80450237", "0.79947114", "0.79939914", "0.79939914", "0.79939914", "0.7978832", "0.7962727", "0.795738", "0.7940426", "0.7937037", "0.79338825", "0.7915137", "0.79015857", "0.78931606", "0.7869594", "0.78568...
0.77866274
45
Use this API to get a particular FAQ by its slug.
async def getFaqBySlug(self, slug=None, body=""): payload = {} if slug: payload["slug"] = slug # Parameter validation schema = ContentValidator.getFaqBySlug() schema.dump(schema.load(payload)) url_with_params = await create_url_with...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def getFaqCategoryBySlug(self, slug=None, body=\"\"):\n payload = {}\n \n if slug:\n payload[\"slug\"] = slug\n \n # Parameter validation\n schema = ContentValidator.getFaqCategoryBySlug()\n schema.dump(schema.load(payload))\n \n\n url...
[ "0.69117576", "0.66380435", "0.59498876", "0.57452995", "0.5704018", "0.5659172", "0.56494164", "0.56483966", "0.5626758", "0.55384237", "0.5267914", "0.5149648", "0.51302886", "0.5122067", "0.5053282", "0.50272375", "0.4998647", "0.4968013", "0.49519274", "0.49391976", "0.49...
0.7499888
0
FAQs can be divided into categories. Use this API to get the category to which an FAQ belongs.
async def getFaqCategoryBySlug(self, slug=None, body=""): payload = {} if slug: payload["slug"] = slug # Parameter validation schema = ContentValidator.getFaqCategoryBySlug() schema.dump(schema.load(payload)) url_with_params = await...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def getFaqCategories(self, body=\"\"):\n payload = {}\n \n # Parameter validation\n schema = ContentValidator.getFaqCategories()\n schema.dump(schema.load(payload))\n \n\n url_with_params = await create_url_with_params(api_url=self._urls[\"getFaqCategories\"],...
[ "0.7001433", "0.63693815", "0.60071945", "0.56680036", "0.5631384", "0.56281495", "0.54089606", "0.52465737", "0.5189639", "0.51873624", "0.5147827", "0.5121962", "0.5118571", "0.51037145", "0.5097784", "0.5077737", "0.5057474", "0.5054739", "0.50475454", "0.5046843", "0.5038...
0.6525683
1
FAQs can be divided into categories. Use this API to get all the FAQs belonging to a category by using the category slug.
async def getFaqsByCategorySlug(self, slug=None, body=""): payload = {} if slug: payload["slug"] = slug # Parameter validation schema = ContentValidator.getFaqsByCategorySlug() schema.dump(schema.load(payload)) url_with_params = awa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def getFaqCategoryBySlug(self, slug=None, body=\"\"):\n payload = {}\n \n if slug:\n payload[\"slug\"] = slug\n \n # Parameter validation\n schema = ContentValidator.getFaqCategoryBySlug()\n schema.dump(schema.load(payload))\n \n\n url...
[ "0.6689114", "0.63668984", "0.58249927", "0.55853456", "0.55143356", "0.53432447", "0.53191555", "0.5222679", "0.51000047", "0.50922894", "0.50499177", "0.49972624", "0.49667555", "0.4836557", "0.48078102", "0.47570392", "0.46799952", "0.46671933", "0.46625438", "0.46495274", ...
0.6820087
0
Use this API to get the details of a page using its slug. Details include the title, seo, publish status, feature image, tags, meta, etc.
async def getPage(self, slug=None, root_id=None, body=""): payload = {} if slug: payload["slug"] = slug if root_id: payload["root_id"] = root_id # Parameter validation schema = ContentValidator.getPage() schema.dump(schem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def page_by_slug(slug):\n try:\n page = Page.objects.get(slug=slug)\n if page.__class__ == 'Page':\n page = page.get_content_model()\n return page\n except Page.DoesNotExist:\n return None", "def read_page(request, slug):\n pg = get_object_or_404(Page, slug=slug)\n...
[ "0.70100313", "0.6863857", "0.681746", "0.681746", "0.67723936", "0.63475823", "0.63395137", "0.5939157", "0.5932573", "0.59257805", "0.59186614", "0.58810145", "0.5874588", "0.58664453", "0.57925683", "0.57745945", "0.57391155", "0.5727054", "0.5577584", "0.5564995", "0.5561...
0.5985974
7
Given a phrase, returns dictionary keyed by wordlength, with the value for each length being the set of words of that length.
def word_lengths(sentence): word_count_dict = {} sentence = sentence.split() for word in sentence: length = len(word) if length not in word_count_dict: word_count_dict[length] = {word} else: set = word_count_dict[length] set.add(word) return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def words(phrase):\n\twordlist = phrase.split()\n\tunique_wordlist = []\n\tword_freq = []\n\n \n\twhile wordlist:\n\t\tword_freq.append(wordlist.count(wordlist[0])) #count the instances of a word and add it to the frequencies list\n\t\tunique_wordlist.append(wordlist[0]) #add the word into a unique words list\n\...
[ "0.73862916", "0.7294041", "0.69293463", "0.69142956", "0.69129694", "0.69100845", "0.68157953", "0.6771838", "0.6753204", "0.65726614", "0.64319354", "0.641262", "0.63981867", "0.6374552", "0.6368066", "0.63313115", "0.63140893", "0.62272125", "0.62174827", "0.62155706", "0....
0.7546341
0
Returns number of communities in a graph with protesters.
def communities_with_protesters(partition, active_nodes): return len(set([partition[node] for node in active_nodes]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def graph_count(self) -> int:\n return int(self.graph_tuple_stats.graph_count)", "def _num_conn_comp(graph):\n\n return nx.number_connected_components(graph)", "def community_detection(net_G):\r\n if list(nx.isolates(net_G)) == []:\r\n part = community.best_partition(net_G)\r\n #valu...
[ "0.69038945", "0.68219763", "0.6680992", "0.65567905", "0.64550257", "0.628265", "0.6237036", "0.61756694", "0.61535025", "0.6134865", "0.6124203", "0.60811836", "0.60651904", "0.6047539", "0.60285914", "0.6018835", "0.598462", "0.5984384", "0.5976117", "0.59673095", "0.59610...
0.73932827
0
Sanitize the given module name, by replacing dashes and points with underscores and prefixing it with a letter if it doesn't start with one
def sanitize_module_name(module_name): module_name = module_name.replace('-', '_').replace('.', '_') if module_name[0] not in string.ascii_letters: module_name = "a" + module_name return module_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sanitize_name(name):\n # For now just change dashes to underscores. Fix this more in the future\n return name.replace(\"-\", \"_\")", "def normalize_package_name(_s: str) -> str:\n return _s.replace('_', '-').lower()", "def sanitize(name):\n return re.sub('\\\\W|^(?=\\\\d)', '_', name)", "def...
[ "0.74661726", "0.7390322", "0.738279", "0.73728025", "0.73215675", "0.71473014", "0.7110625", "0.70800406", "0.696068", "0.6923166", "0.68970203", "0.6882816", "0.6820549", "0.67580235", "0.6749752", "0.6744259", "0.67357314", "0.666284", "0.6661025", "0.66549826", "0.6651471...
0.8870305
0
Get the user using his id.
def load_user(user_id): return app.user_models.query.get(int(user_id))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_by_id(self, id):\n\t\treturn self.users.get(id)", "def get_user(id):\n pass", "def get(id):\n return User.query.filter_by(id=id).first()", "def getUser(self, id : int) -> bbUser.bbUser:\n id = self.validateID(id)\n return self.users[id]", "def get_single_user(self, id):...
[ "0.88242954", "0.8625638", "0.85628754", "0.85550064", "0.84677327", "0.831085", "0.8250933", "0.824084", "0.8212091", "0.82117796", "0.81719273", "0.81702894", "0.8155541", "0.81507707", "0.81507707", "0.81507707", "0.81507707", "0.81479746", "0.81387264", "0.81364435", "0.8...
0.0
-1
2D gaussian mask should give the same result as MATLAB's fspecial('gaussian',[shape],[sigma])
def gaussian_filter(shape=(3,3),sigma=0.5): m,n = [(ss-1.)/2. for ss in shape] y,x = np.ogrid[-m:m+1,-n:n+1] h = np.exp( -(x*x + y*y) / (2.*sigma*sigma)) h[ h < np.finfo(h.dtype).eps*h.max() ] = 0 sumh = h.sum() if sumh != 0: h /= sumh return h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gaussian(size,sigma):\n a,b=np.ogrid[-size/2:size/2,-size/2:size/2]\n mask = a**2+b**2\n mask = np.exp(-mask.astype('float')/(2*float(sigma**2)))\n return mask", "def fspecial_gaussian(shape=(3, 3), sigma=0.5):\n m, n = [(ss - 1.) / 2. for ss in shape]\n y, x = np.ogrid[-m:m + 1, -n:n + 1]\...
[ "0.7829996", "0.7562562", "0.7226179", "0.69486", "0.6848839", "0.67880386", "0.67694354", "0.6750549", "0.6750549", "0.6715692", "0.67122644", "0.66872513", "0.6681216", "0.667548", "0.6641507", "0.6611443", "0.65841174", "0.6566251", "0.65596884", "0.6504947", "0.650428", ...
0.7155936
3
Set user id on the authentication element.
def set_userId(self, userId): self.authentication.userId = userId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_user_id(uid):\n local.user_id = uid", "def id_user(self, id_user):\n\n self._id_user = id_user", "def user(self, user):\n self.user_id = user.get_id()", "def user_id(self, user_id):\n\n self._user_id = user_id", "def user_id(self, user_id):\n\n self._user_id = user_id...
[ "0.7731242", "0.7423856", "0.7084753", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.7015129", "0.6914687", "0.68349355", "0.6621181", "0.6557694", ...
0.753551
1
Return a list of specific handlers to add.
def u2handlers(self): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def handlers(self, handlers):\n return self._set_list_field(\"handlers\", handlers)", "def get_handlers(self):\n raise NotImplementedError()", "def get_registered_handlers(self):\n return list(self._registry.values())", "def _handlers(self):\n settings = self.get_settings(prefix='...
[ "0.7840387", "0.7550813", "0.7512386", "0.7480777", "0.7473117", "0.7466465", "0.7383157", "0.73604494", "0.7229366", "0.7164129", "0.71406853", "0.70482945", "0.69705725", "0.6924775", "0.67772883", "0.6757758", "0.6735616", "0.67216146", "0.66720325", "0.66670525", "0.66307...
0.74748504
4
Sets the learning rate to the initial LR decayed by schedule
def adjust_learning_rate(optimizer, epoch, lr, schedule, gamma): if epoch in schedule: lr *= gamma for param_group in optimizer.param_groups: param_group['lr'] = lr return lr
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_learning_rate(self):\n\n if (self.FLAGS.learning_rate_decay is \"exponential\"):\n self.learning_rate = tf.train.exponential_decay(\n self.FLAGS.learning_rate,\n self.global_step,\n self....
[ "0.7852993", "0.77019083", "0.76754516", "0.75673544", "0.75453514", "0.75384814", "0.75384814", "0.7535456", "0.75212693", "0.75207776", "0.7494479", "0.74851584", "0.7484886", "0.7483564", "0.7481505", "0.7477694", "0.7477694", "0.7456255", "0.744756", "0.7425182", "0.74234...
0.75614065
4
use the noto fonts glyphsnames to subset fonts with premade subsettings
def subsetter(self, font, subset): options = Options() options.layout_features = "*" # keep all GSUB/GPOS features # options.no_layout_closure = True # TESTING options.glyph_names = False # keep post glyph names options.legacy_cmap = True # keep non-Unicode cmaps optio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_font_options(self): # real signature unknown; restored from __doc__\n pass", "def test_filter_glyph_list(tmpdir):\n path = \"%s/dummy/font.ufo\" % DATA_DIR\n out = str(tmpdir / basename(path)) + \".out\"\n\n psautohint([path, '-o', out, '-g', 'FOO,BAR,a'])", "def setDislinFont(font='def...
[ "0.66556597", "0.6248147", "0.6179089", "0.61380213", "0.6064163", "0.6041499", "0.600369", "0.59758765", "0.5908379", "0.5901268", "0.58798873", "0.5848031", "0.5783353", "0.5770893", "0.5735266", "0.57059574", "0.5700567", "0.56879455", "0.5671752", "0.5668817", "0.56612533...
0.6332503
1
Takes in a list of images and returns softmax probabilities.
def get_output(self, images, auto_resize=True): if auto_resize: images_ = [imresize(im, (224, 224)) for im in images] else: images_ = images feed_dict = {self.input_images: images_} return sess.run(vgg.output, feed_dict)[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(inputs):\n probs = np.exp(inputs)\n # print(probs.shape)\n # t = np.sum(probs, axis=0)\n # print(t.shape)\n\n probs /= np.sum(probs, axis=0)[np.newaxis,:]\n return probs", "def softmax(inputs):\n return np.exp(inputs) / float(sum(np.exp(inputs)))", "def softmax(inputs):\n re...
[ "0.7229563", "0.69309795", "0.69309795", "0.6860059", "0.67136097", "0.67083424", "0.66942865", "0.66816014", "0.6662083", "0.6648828", "0.66391826", "0.65939695", "0.65699035", "0.6557525", "0.65518683", "0.6540223", "0.6539922", "0.6539634", "0.6514581", "0.6498803", "0.649...
0.0
-1
Similar to `build_detection_test_loader`. But this function uses the given `dataset_name` argument (instead of the names in cfg),
def build_detection_validation_loader(cfg, dataset_name, mapper=None): dataset_dicts = get_detection_dataset_dicts( [dataset_name], filter_empty=True, proposal_files=[ cfg.DATASETS.PROPOSAL_FILES_TEST[list(cfg.DATASETS.TEST).index(dataset_name)] ] if cfg.MODEL.LOA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_loader(config):\n train_transform = [T.Resize((256, 128)), T.RandomHorizontalFlip(), T.ToTensor(),\n T.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])]\n train_transform = T.Compose(train_transform)\n\n test_transform = [T.Resize((256, 128)), T.ToTensor(),\n ...
[ "0.6788498", "0.67591876", "0.67232555", "0.6715352", "0.6696712", "0.6672159", "0.66554046", "0.6592471", "0.657241", "0.6567502", "0.64973843", "0.6483956", "0.6474645", "0.64252865", "0.6411598", "0.6395815", "0.6355563", "0.63543713", "0.6353162", "0.63466626", "0.6338528...
0.73647726
0
Close the database for reading and writing.
def disconnect_database(self, *args, **kwargs): return self._get_storage().disconnect_database(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close(self):\n self.__database__.close()", "def close(self):\n self.db.close()", "def close(self):\n\t\tself.db.close()", "def close(self):\n self._flush()\n self.database.close()", "def close(self):\n if self._dbopen:\n self._dbcon.close()", "def close(s...
[ "0.8463008", "0.84258205", "0.8408799", "0.8231113", "0.81987804", "0.81899166", "0.81878835", "0.81878835", "0.81878835", "0.8161446", "0.8152891", "0.8123089", "0.8014449", "0.78891134", "0.7851659", "0.78432095", "0.7839918", "0.78354055", "0.782388", "0.7800099", "0.77545...
0.0
-1
Return a handle to a table. Return a handle to the named table or, if `table_name` is None, return the default table.
def table(self, table_name): return self._get_storage().table(table_name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def table(self, name):\r\n if name in self._tables:\r\n return _tables[name]\r\n\r\n table = Table(name, self._storage)", "def _find_table(name):\n tables = Base.metadata.tables\n table = tables.get(name, None)\n if table is not None:\n return table\n else:\n ra...
[ "0.7211526", "0.7185832", "0.71178675", "0.70990646", "0.6875322", "0.6677856", "0.6598781", "0.65982735", "0.6587353", "0.6444237", "0.64084977", "0.63542485", "0.6335634", "0.63164586", "0.63017493", "0.62850404", "0.6253907", "0.6237299", "0.6168726", "0.61619496", "0.6136...
0.7356708
0
Check if the specified table contains at least one matching record.
def contains(self, keys, table_name=None, match_any=False): return self._get_storage().contains(keys, table_name=table_name, match_any=match_any)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_table(self, table):\n return table in self.get_table_list(\".\" in table)", "def tableExists(self):\n return self.entity in self.db.table_list().run(self.r)", "def exists(self, table, **where):\n # Format the list of where statements\n wheres = ' AND '.join([str(attr) + '=\\...
[ "0.7103445", "0.68185383", "0.6792904", "0.67654175", "0.67261976", "0.671485", "0.66289026", "0.6615048", "0.6497535", "0.649392", "0.6479588", "0.6462632", "0.64504313", "0.6446454", "0.6439619", "0.6435336", "0.6431566", "0.6314508", "0.6258654", "0.62547547", "0.6252885",...
0.64302367
17
Returns the artist who created this song
def get_artist(self): return self._artist
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def artist(self) -> str:\n return self._artist", "def _get_artist(self):\n artists = FileRecord.query(FileRecord.artist).distinct().filter(\n FileRecord.album == self.name).filter(\n FileRecord.year == self.year).all()\n\n if len(artists) > 1:\n return \"Vari...
[ "0.73809946", "0.7198314", "0.7157294", "0.68040055", "0.6735328", "0.67289495", "0.6645259", "0.6644259", "0.6644259", "0.6604644", "0.65305537", "0.6423161", "0.6369817", "0.63470834", "0.6176685", "0.6175997", "0.61631584", "0.6145632", "0.6134165", "0.6107771", "0.6013648...
0.74559695
0
Returns the album of this song
def get_album(self): return self._album
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_album(self) -> Optional[str]:\n return self.album", "def album(self):\n return self.getItunesAttribute('Album')", "def album(self, q, page=None):\r\n return self.get('album', q, page)", "def media_album_name(self):\n return self._state.get(\"album\", None)", "def media_a...
[ "0.8354817", "0.8152058", "0.7854589", "0.76479477", "0.7641639", "0.7536395", "0.7404028", "0.73878264", "0.7335357", "0.7330007", "0.7311308", "0.7227984", "0.7198041", "0.7163033", "0.7156849", "0.7127095", "0.7065019", "0.70378876", "0.70336187", "0.69360375", "0.6899951"...
0.8804532
0
Returns the length of this song, in seconds
def get_length(self): return self._length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def duration(self):\n with audioread.audio_open(self.path) as f:\n return f.duration", "def duration_in_seconds(self):\n \"Should not set track length\"\n return self.duration / float(self.samplerate)", "def duration(self):\n return self.sound.nframes", "def get_song_le...
[ "0.8130784", "0.8110904", "0.7905917", "0.7767962", "0.75074184", "0.74720335", "0.73685634", "0.73509544", "0.7323418", "0.7202941", "0.7194014", "0.71590406", "0.7139402", "0.71188754", "0.7099309", "0.70889336", "0.70889336", "0.7080455", "0.70798653", "0.7053993", "0.7048...
0.67044073
73
Calculates and yields primes < n
def primes(n): sieve = [True] * n yield 2 for i in xrange(3,int(n**0.5)+1,2): if sieve[i]: yield i sieve[i*i::2*i] = [False]*((n-i*i-1)/(2*i)+1) for i in xrange(i+2,n,2): if sieve[i]: yield i
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def primes(n):\n return [i for i in xrange(1, n + 1) if mr_prime(i)]", "def n_primes(n):\n primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59,\n 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127,\n 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, ...
[ "0.84324646", "0.82192767", "0.8193618", "0.8068991", "0.8054155", "0.7988035", "0.7961792", "0.7947864", "0.7947864", "0.7940755", "0.7929328", "0.79261935", "0.7925104", "0.79238695", "0.79061687", "0.7893661", "0.7889107", "0.78784305", "0.7862809", "0.78457385", "0.776581...
0.8430284
1
The command line arguments of pcs changed after version 0.10 This will return True if the new arguments are needed and false if the old ones are needed
def __use_new_commands(): pcs_version = __salt__["pkg.version"]("pcs") log.debug("PCS package version %s", pcs_version) if __salt__["pkg.version_cmp"](pcs_version, "0.10") == 1: log.debug("New version, new command") return True else: log.debug("Old Version") return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_args(self):\n parser = get_base_arguments(get_parser())\n parser = get_tc_arguments(parser)\n # Disable \"Do not use len(SEQ) as condition value\"\n # pylint: disable=C1801\n if len(sys.argv) < 2:\n self.logger.error(\"Icetea called with no arguments! \")\n ...
[ "0.6636751", "0.65251344", "0.64792866", "0.6444512", "0.639075", "0.6386434", "0.6326525", "0.6317759", "0.62748235", "0.6270728", "0.6195709", "0.61469275", "0.6124438", "0.6093208", "0.6058393", "0.6034823", "0.6026891", "0.60232675", "0.60097325", "0.5992825", "0.59866565...
0.6425746
4
Initialises a new 'CustomerAgreement' instance.
def __init__(self, billingCycle='', loadMgmt='', budgetBill='', PricingStructures=None, CustomerAccount=None, StandardIndustryCode=None, AuxiliaryAgreements=None, MeterReadings=None, Equipments=None, ServiceSupplier=None, ServiceLocations=None, DemandResponseProgram=None, ServiceDeliveryPoints=None, Customer=None, EndD...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, reference_currency=None, collateral_currencies=None, isda_agreement_version=None, margin_call_frequency=None, valuation_agent=None, threshold_amount=None, rounding_decimal_places=None, initial_margin_amount=None, minimum_transfer_amount=None, id=None, local_vars_configuration=None): # noqa: E50...
[ "0.5560271", "0.55025905", "0.53421146", "0.52545744", "0.5239787", "0.5207285", "0.5189182", "0.5110448", "0.50712836", "0.5054161", "0.5047381", "0.5027798", "0.5004114", "0.4978209", "0.49780476", "0.49631843", "0.4938607", "0.4928457", "0.49206722", "0.49123427", "0.49046...
0.7045754
0
return the one_hot of the sequence 4m A(1,0,0,0) T(0,1,0,0) G(0,0,1,0) C(0,0,0,1)
def sequence_to_onehot(seq): seq_one_hot = [] for i in range(MAX_SEQ_LENGTH): if i < len(seq): if seq[i] == 'A': seq_one_hot.append([1,0,0,0]) elif seq[i] == 'T': seq_one_hot.append([0,1,0,0]) elif seq[i] == 'G': seq_one...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def one_hot(y_):\n y_ = y_.reshape(len(y_))\n n_values = int(np.max(y_)) + 1\n n_values = 6\n return np.eye(n_values)[np.array(y_, dtype=np.int32)] # Returns FLOATS", "def create_one_hot(sequence):\n\n transformed = []\n for x in sequence:\n transformed.append(cs.DNA[x])\n return np....
[ "0.7490806", "0.74137825", "0.73722225", "0.73671025", "0.73526984", "0.7340748", "0.7326515", "0.73197997", "0.73163545", "0.7237635", "0.72001696", "0.718289", "0.7176523", "0.71586925", "0.7155651", "0.71464", "0.7138941", "0.7138394", "0.71226555", "0.7098165", "0.7092717...
0.7393075
2
Apply a filter to an image. Return the filtered image. Args
def my_imfilter(image, filter): assert filter.shape[0] % 2 == 1 assert filter.shape[1] % 2 == 1 p1 = filter.shape[0]//2 p2 = filter.shape[1]//2 pad1 = np.pad(image[:,:,0],((p1,p1),(p2,p2)),'reflect') pad2 = np.pad(image[:,:,1],((p1,p1),(p2,p2)),'reflect') pad3 = np.pad(image[:,:,2],((p1,p1),(p2,p2)),'re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def apply_filter(image, filter):\n filteredImage = create_image(image)\n # Apply Filter:\n # FIXME!\n \n return filteredImage", "def apply_filter(self, image):\n pass", "def apply_filter(image: np.ndarray) -> np.ndarray:\n # choose filters to apply\n return clahe(image)", ...
[ "0.87050194", "0.8577328", "0.789635", "0.78476924", "0.74183196", "0.74042034", "0.73501676", "0.73410016", "0.7230276", "0.71371377", "0.7123918", "0.70556855", "0.7036421", "0.69757044", "0.6963151", "0.68209845", "0.67944956", "0.6790125", "0.67808336", "0.6771555", "0.67...
0.72854114
8
write the dataset to a csv
def write(self): self.df.to_csv('/home/austin/Desktop/Falcon/realestate/Falcon/Datasets/mls.csv')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_csv(self, filename): # DONE\n self.data.to_csv(filename)", "def to_csv(self, dataset):\n save_as = filedialog.asksaveasfilename(defaultextension='.csv')\n try:\n with open(save_as, 'w', newline='') as file:\n scribe = csv.writer(file)\n scrib...
[ "0.80760974", "0.7616917", "0.7569226", "0.75641024", "0.75641024", "0.75229764", "0.7473607", "0.74391955", "0.73852146", "0.73619896", "0.7352372", "0.733434", "0.73102236", "0.7285246", "0.72594595", "0.72275954", "0.71837956", "0.71803963", "0.71022844", "0.7100507", "0.7...
0.74163246
8
Loads a yaml configuration file as an object structure
def load(self, filename: str = None): if not filename: filename = 'config.yml' if (f := self.__home / filename).exists(): filename = f elif (f := Path(filename)).exists(): filename = f else: raise FileNotFoundError(f'File {filename} not fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yaml_to_object(yaml_file):\n with open(yaml_file) as f:\n config = yaml_load(f, Loader=yaml_FullLoader)\n return dict_to_object(config)", "def from_yaml_file(cls, file_path: str) -> Config:\n return cls(**read_yaml_file(file_path))", "def loadseasoning(self):\n stream = open(self...
[ "0.7507063", "0.7449801", "0.7417804", "0.7399789", "0.7390216", "0.73578817", "0.7334768", "0.7331954", "0.7324057", "0.7318939", "0.7308404", "0.73040783", "0.7280579", "0.7250144", "0.7223496", "0.7206316", "0.72006875", "0.71960753", "0.7187995", "0.71673167", "0.71639", ...
0.0
-1
Returns a Unicode object on success, or None on failure
def _decode_utf8(value): try: return value if not isinstance(value, bytes) else value.decode('utf-8', 'ignore') except UnicodeDecodeError: return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_unicode(obj, *args):\n try:\n return unicode(obj, *args)\n except UnicodeDecodeError:\n # obj is byte string\n ascii_text = str(obj).encode('string_escape')\n return unicode(ascii_text)", "def safe_unicode(obj, *args):\n try:\n return unicode(obj, *args)\n ...
[ "0.67826205", "0.67826205", "0.67826205", "0.67826205", "0.67826205", "0.67826205", "0.67361075", "0.6734314", "0.67029154", "0.65620774", "0.65504277", "0.6539829", "0.6496718", "0.6396318", "0.6364479", "0.6342836", "0.6241755", "0.62179846", "0.62041414", "0.62021273", "0....
0.5728342
67
Preprocesses the question for the Google Search Removes all `REMOVE_WORDS` from the question
def simplify_ques(question, debug=False): if not isinstance(question, str): raise TypeError('Please provide a string for a question.') if debug is True: load_json() neg = False qwords = question.lower().split() for i in qwords: if i in NEGATIVE_WORDS: neg = True...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter(q_words):\n filtered_words = [\"how\",\"what\"]\n for word in q_words:\n if word in filtered_words:\n q_words.remove(word)", "def removestopwords(query):\n wordlist = [word for word in query.split() if word not in stopwords.words('english')]\n return \" \".join(wordlist)"...
[ "0.66722363", "0.6408077", "0.6384918", "0.61704385", "0.616641", "0.6161607", "0.60554904", "0.6018296", "0.5951694", "0.5936889", "0.58976793", "0.58905303", "0.58900696", "0.58892083", "0.5888693", "0.587662", "0.5854611", "0.57928175", "0.5779182", "0.5757962", "0.574085"...
0.573449
21
Function returns the distance between two locations
def dist(loc1, loc2): # convert decimal degrees to radians lon1, lat1, lon2, lat2 = map(radians, [loc1[1], loc1[0], loc2[1], loc2[0]]) # haversine formula dlon = lon2 - lon1 dlat = lat2 - lat1 a = sin(dlat/2)**2 + cos(lat1) * cos(lat2) * sin(dlon/2)**2 c = 2 * asin(sqrt(a)) # Radius of e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_distance(location_1, location_2):\n x = location_2.x - location_1.x\n y = location_2.y - location_1.y\n z = location_2.z - location_1.z\n norm = np.linalg.norm([x, y, z]) + np.finfo(float).eps\n return norm", "def compute_distance(location_1, location_2):\n x = location_2.x - locati...
[ "0.809777", "0.809777", "0.80741364", "0.8040383", "0.7888292", "0.78860706", "0.77872443", "0.77662736", "0.7762591", "0.7760368", "0.77503574", "0.7727802", "0.770432", "0.76934165", "0.7693275", "0.7687362", "0.7678311", "0.7664628", "0.763699", "0.7632451", "0.7632451", ...
0.75750333
32
Sets the key of this NfcExternalAuthenticateParameter.
def key(self, key): self._key = key
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_AuthenticationKey(self, value):\n super(AddressValidationInputSet, self)._set_input('AuthenticationKey', value)", "def set_key(self, key):\n self.key = key", "def api_key_set(self, api_key):\n self.request('/v1.1/auth_key', 'POST', body={'auth_key': api_key})", "def key(self, key...
[ "0.66299444", "0.60973585", "0.5898051", "0.5764172", "0.5764172", "0.5754311", "0.5695962", "0.5639525", "0.56360424", "0.5591371", "0.55335385", "0.5467428", "0.5461032", "0.5445838", "0.5429676", "0.5420895", "0.5414082", "0.5414082", "0.5399726", "0.53554904", "0.5315399"...
0.57324386
7
Sets the group of this NfcExternalAuthenticateParameter.
def group(self, group): self._group = group
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_group(self, group):\n # Implemented from template for osid.resource.ResourceForm.set_group_template\n if self.get_group_metadata().is_read_only():\n raise errors.NoAccess()\n if not self._is_valid_boolean(group):\n raise errors.InvalidArgument()\n self._my_...
[ "0.6336011", "0.6313144", "0.6233906", "0.61659485", "0.60154444", "0.5975283", "0.59112173", "0.5673408", "0.56586045", "0.550334", "0.5474468", "0.53433293", "0.5340583", "0.5244215", "0.52425414", "0.51665586", "0.51606286", "0.5145038", "0.50929946", "0.5081686", "0.50517...
0.59115
7
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, NfcExternalAuthenticateParameter): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.80886984", "0.80886984", "0.8055307", "0.7983415", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", "0.79673034", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, NfcExternalAuthenticateParameter): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Simple modification of the original Keras code (by ar) Resizes the images contained in a 4D tensor of shape `[batch, channels, height, width]` (for 'th' dim_ordering) `[batch, height, width, channels]` (for 'tf' dim_ordering) by a factor of `(height_factor, width_factor)`. Both factors should be positive integers. Retu...
def resize_images_interpolated(X, height_factor, width_factor, order, dim_ordering): resizeMethod = 0 if order==0: resizeMethod = tf.image.ResizeMethod.NEAREST_NEIGHBOR elif order==1: resizeMethod = tf.image.ResizeMethod.BILINEAR elif order==2: resizeMethod = tf.image.ResizeMetho...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resize(img, size):\n img = tf.expand_dims(img, 0)\n return tf.image.resize_bilinear(img, size)[0,:,:,:]", "def resize_function(input):\n\n from keras.backend import tf as ktf\n return ktf.image.resize_images(input, (64, 64))", "def resize(input, size):\n layer = tf.image.resize_images(input,...
[ "0.7210159", "0.71267325", "0.7124862", "0.68217766", "0.6597559", "0.6570181", "0.65301025", "0.64871544", "0.6441071", "0.64013517", "0.6340521", "0.63241935", "0.6298846", "0.62939924", "0.62922984", "0.6289562", "0.62833196", "0.62314355", "0.6231074", "0.6201142", "0.619...
0.6901633
3
Convert date to humanfriendly string
def date2text(date=None): return date.strftime('%-d %B %Y')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def shortDate(self, date):\n return u'%s %02i' % (date.pMonth(), date.day())", "def _format_date(self, date, humanize=True):\n if date:\n if humanize and date in self.special_dates:\n rv = self.special_dates[date]\n else:\n rv = date.strftime(self...
[ "0.7646069", "0.7542128", "0.7446271", "0.734577", "0.7187054", "0.7180567", "0.7171925", "0.71676594", "0.7102639", "0.7032009", "0.69991195", "0.69940716", "0.6989126", "0.6989126", "0.69868064", "0.69626355", "0.69552207", "0.69354737", "0.6924401", "0.6923568", "0.6921298...
0.6982552
15
Get the UUID of the filesystem.
def uuid(self): if openmediavault.string.is_fs_uuid(self._id): return self._id return self.get_udev_property('ID_FS_UUID')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sysfs_uuid_file(self):\n if not self.sysfs_dm_dir:\n return None\n return os.path.join(self.sysfs_dm_dir, 'uuid')", "def get_uuid(disk):\n\n #TODO\n return \"Unknown\"", "def retr_uuid(self):\n\n if not self.name:\n msg = _(\n \"Cannot retriev...
[ "0.76526815", "0.7091248", "0.690946", "0.69047445", "0.67019546", "0.6673943", "0.65741336", "0.65330386", "0.6526803", "0.652608", "0.652608", "0.652608", "0.65182", "0.6502258", "0.64961404", "0.64801985", "0.6479089", "0.64691734", "0.64691734", "0.64504695", "0.64460623"...
0.81910235
0
Get the filesystem label.
def get_label(self): return openmediavault.string.unescape_blank( self.get_udev_property('ID_FS_LABEL_ENC', '') )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getFsLabel(partitionDevice):\n if os.path.exists('/dev/{0}'.format(partitionDevice)) and S_ISBLK(os.stat('/dev/{0}'.format(partitionDevice)).st_mode):\n path = '/dev/{0}'.format(partitionDevice)\n elif os.path.isfile(partitionDevice):\n path = partitionDevice\n else:\n label = False\n path = Fal...
[ "0.746374", "0.7332579", "0.73153836", "0.72647125", "0.7245252", "0.72324", "0.71579206", "0.7141542", "0.7141542", "0.7141542", "0.7141542", "0.71189433", "0.708878", "0.70831764", "0.7069987", "0.7018412", "0.7009333", "0.69888955", "0.69742584", "0.69420815", "0.69420815"...
0.81680924
0
Load the latest weight
def load_model(self) -> ChessModel: agent = ChessModel(self.config) agent.load_latest() agent.model.summary() return agent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _load_weight_if_possible(self):\n try:\n self.keras_model.load_weights(self.model.WEIGHT_PATH)\n print('Weights loaded!')\n except OSError:\n print('No file with weights available! Starting from scratch...')", "def load_weight(model):\n file = h5py.File(WEIGH...
[ "0.69520485", "0.6532991", "0.65138423", "0.6456068", "0.6448063", "0.64261794", "0.64025337", "0.6399093", "0.63264287", "0.6275512", "0.6275512", "0.6274525", "0.61809546", "0.6152271", "0.6152271", "0.6050625", "0.60435086", "0.6034042", "0.602204", "0.60138506", "0.601024...
0.0
-1
converts a pt to the time (in seconds)
def pts_to_time_seconds(pts: int, base: Fraction) -> Fraction: return pts * base
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_seconds(time):\n return 3600 * time", "def t_sec(self):\n return self.t/self.parameters['time_conversion']", "def pts2ms(pts, dt):\n return pts*dt", "def convert_time(t):\n minutes = int(t/60)\n seconds = int(t-60*minutes)\n return minutes, seconds", "def convert_time(t):\n ...
[ "0.69706786", "0.6759927", "0.67124104", "0.66093636", "0.646135", "0.64066386", "0.63756174", "0.63265187", "0.6282416", "0.6268403", "0.62551665", "0.62320936", "0.62316704", "0.621215", "0.6209157", "0.6201843", "0.61845344", "0.61569214", "0.6151107", "0.61467576", "0.611...
0.7167953
0
Gets the path to the launcher module for this platform.
def GetLauncherPath(self): return os.path.dirname(__file__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def launcher_path() -> Optional[str]:\n return u.resource(LAUNCHER_SCRIPT)", "def get_executable(self) -> str:\n ...", "def module_path():\r\n if hasattr(sys, \"frozen\"):\r\n return os.path.dirname(sys.executable)\r\n return os.path.dirname(__file__)", "def executable_path(self):\n ...
[ "0.7383376", "0.72590375", "0.6936366", "0.6911875", "0.6796319", "0.6784066", "0.67681557", "0.6658519", "0.6656655", "0.6628676", "0.6504173", "0.6469604", "0.6430754", "0.64216006", "0.63772464", "0.63674897", "0.6342251", "0.6299916", "0.6288803", "0.6263917", "0.6257476"...
0.7842676
1
Add multiple words to the dictionary
def add_words(self, words): for word in words: self.add(word)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_words_from_dict(self, kind: str, fn: str, words: Any) -> None:\n for word in words or []:\n self.words.add(word)\n self.words.add(word.lower())", "def add_words(self, words, value):\n if words is None:\n return\n value = str(value) # make safe for js...
[ "0.7598729", "0.750916", "0.74387145", "0.73832816", "0.71525794", "0.70418906", "0.6887178", "0.6877341", "0.681814", "0.6758984", "0.6758839", "0.67458004", "0.67008066", "0.6698552", "0.6660256", "0.6650359", "0.6638516", "0.6618615", "0.660035", "0.65974146", "0.65938973"...
0.74576986
2
Test that json files can be loaded correctly
def test_load_json(orders_json): allocator = RecipeAllocator() result = allocator.load_json("tests/orders.json") print(f"orders_json: {orders_json}") assert result == orders_json
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_loader_loads_from_file():\n base_json = 'tests/test_json.json'\n json_test = {\"foo\": \"bar\"}\n assert whenzat.loader(base_json) == json_test", "def test_loads_a_non_object_json_file(self):\n from test.resources import simple_json\n self.assertEqual(simple_json._data, 'test')", ...
[ "0.8587056", "0.84447414", "0.8126125", "0.80304873", "0.79438853", "0.78398967", "0.77613515", "0.7757732", "0.7595687", "0.7585131", "0.74276924", "0.73984987", "0.7381226", "0.737049", "0.7333423", "0.72949296", "0.728384", "0.725577", "0.7243197", "0.7242693", "0.7237779"...
0.7564098
10
Test that categories can be extracted from json files correctly
def test_get_categories_from_json(): allocator = RecipeAllocator() allocator.load_data( orders_dir="tests/orders.json", recipes_dir="tests/recipes.json" ) allocator.get_categories_from_json() assert list(allocator.portion_categories_dict.keys()) == [ "two_portions", "four_por...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_extract_categories():\n pass", "def test_get_categories(self):\n pass", "def test_get_categories(self):\n res = self.client().get('/api/categories')\n self.assertEqual(res.status_code, 200)\n data = json.loads(res.data)\n self.assertTrue(data)", "def test_get_ca...
[ "0.75041324", "0.72096366", "0.71814483", "0.7156712", "0.7145003", "0.71103036", "0.7106232", "0.66758996", "0.6610628", "0.6601047", "0.65424615", "0.65282416", "0.65122175", "0.64946866", "0.6432191", "0.63926166", "0.6365334", "0.63423455", "0.63289547", "0.63289547", "0....
0.8136007
0
Open api access page if it isn't opened.
def tab_api_access(self): access_page = self._open(self.app.page_access) access_page.label_api_access.click() return access_page.tab_api_access
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_open_api(self):\n response = self.client.get(self.initiatives_url)\n self.assertEqual(response.status_code, status.HTTP_200_OK)", "def test_open(self):\n page, resources = self.ghost.open(base_url)\n self.assertEqual(page.url, base_url)\n \n self.ghost.click(\"#...
[ "0.63898647", "0.61023915", "0.60443187", "0.6024425", "0.58788836", "0.58657485", "0.5779132", "0.5757413", "0.5756918", "0.5711744", "0.57033306", "0.5699371", "0.5685617", "0.5639727", "0.5618179", "0.5495588", "0.54922557", "0.5479115", "0.54559195", "0.54393166", "0.5436...
0.5848657
6
Finds the item in the given list which has the same ID than the given dictionary. A dictionary is equivalent to another if they have the same value for
def _find_equivalent(searched_dict, dicts_list): for id_key in ('id', 'uid', 'name'): # Recognize the ID key used, if any local_id = searched_dict.get(id_key) if local_id: # Found an ID for other_item in dicts_list: if other_item.get(id_key) == local_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def person_in_list(position: OrderedDict, lst: List[OrderedDict]):\n for p in filter(lambda x: x[\"person\"] == position[\"person\"], lst):\n return p\n return None", "def fusion_api_get_dict_from_list(self, listofDict, key, value):\n for d in listofDict:\n if d[key] == value:\n ...
[ "0.6347677", "0.6335078", "0.62809587", "0.62545633", "0.62362057", "0.61314595", "0.6102546", "0.6091976", "0.5972123", "0.5958997", "0.5882322", "0.5877458", "0.5811349", "0.5796329", "0.5774017", "0.5752524", "0.5716982", "0.5675061", "0.5590086", "0.5589621", "0.5580261",...
0.81545305
0
Restore all the trainable parameters.
def restore_state(self, ckpt): raise NotImplemented()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _restore(self):\n self._logger = LOGGER\n self._param_store = pyro.get_param_store()\n self.set_state(self.best_params)\n self._alpha_guide_prior_params = dict(\n self._param_store.named_parameters()\n )", "def restore(self):\n if os.path.isfile( \\\n ...
[ "0.81894547", "0.7642425", "0.73436195", "0.723572", "0.7223209", "0.7155516", "0.7067638", "0.70288104", "0.70212895", "0.6974257", "0.69497544", "0.69497234", "0.6934912", "0.6858172", "0.68492454", "0.68410087", "0.68262255", "0.6825476", "0.6795705", "0.6765946", "0.67401...
0.0
-1
Compute total energy (electronic plus nuclear).
def energy_tot(P,F,H,molecule): return energy_el(P,F,H) + energy_n(molecule)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def energy(self):\n sum_energy = 0.0\n for i in range(0,self.natoms-1):\n for j in range(i+1,self.natoms):\n rij = (self.atoms[i].xyz - self.atoms[j].xyz)\n rij = rij - self.pbc_correction(rij)\n mag_rij = la.norm(rij)\n ...
[ "0.758138", "0.7533512", "0.74761057", "0.74581164", "0.74268687", "0.74156", "0.7360615", "0.7335781", "0.7311625", "0.72944653", "0.72828263", "0.7213342", "0.7186917", "0.71844345", "0.7182761", "0.71494603", "0.7128248", "0.7093887", "0.70740545", "0.7050431", "0.70134115...
0.7727161
0
Pass x through fully connected layer.
def tf_fc(x, n_features): # input shape x_shape = x.get_shape().as_list() assert(len(x_shape) == 2) x_features = x_shape[1] # weights and bias weight_shape = (x_features, n_features) weight_stddev = math.sqrt(2.0 / n_features) weight = tf.Variable( tf.random_normal(weight_sh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, x):\n #print('output of fetures.children() : %s'%str([i for i in self.features.children()]))\n #print(\"shape of input is %s\" % str(x.size()))\n for layer_no, layer in enumerate(self.features.children()):\n\n if layer_no is 23:\n y = layer(x)\n ...
[ "0.75648767", "0.7471438", "0.74131364", "0.7347603", "0.7290887", "0.7229976", "0.72173905", "0.71911675", "0.7154021", "0.71113724", "0.70700043", "0.70588493", "0.7028113", "0.70262504", "0.69793534", "0.6966426", "0.6959983", "0.6928277", "0.6928277", "0.6928277", "0.6920...
0.0
-1
Visualize images and their predicted class probabilities.
def visualize_test_results(X, y, pred, signnames): assert(X.shape[0] == 14) nrows = 2 ncols = 7 nlabels = 43 fig, axes = plt.subplots(nrows = 2 * nrows, ncols = ncols, figsize = (10, 10)) for i in range(nrows): for j in range(ncols): aximg = axes[2*i, j] axprobs =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visualize_predictions(self, images, preds, targets):\n\n class_names = ['angry', 'happy', 'sad']\n images = images[:8]\n preds = preds[:8]\n targets = targets[:8]\n\n # determine size of the grid based for the given batch size\n num_rows = int(torch.tensor(len(images))...
[ "0.811035", "0.7693043", "0.7561492", "0.75402737", "0.7501955", "0.73155814", "0.72567016", "0.7091485", "0.70192885", "0.7005025", "0.69976175", "0.6951671", "0.6940958", "0.693418", "0.69252175", "0.69167346", "0.69122905", "0.69008064", "0.68576396", "0.68535054", "0.6838...
0.0
-1
Return list of players
def players(self) -> List[Player]: return [self.white_player, self.black_player]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _player_list(self):\n game = self.ctrl.game\n return game.players[self.i_to_player_id(0)], game.players[self.i_to_player_id(1)]", "def get_players(self):\r\n return self.players.values()", "def players(self):\n return self._get(\"players\")", "def players(self):\n retur...
[ "0.82688266", "0.8188844", "0.8163242", "0.79744625", "0.7972607", "0.7882977", "0.7838446", "0.7773849", "0.7766938", "0.7760488", "0.7752363", "0.772903", "0.77100956", "0.77039784", "0.76636064", "0.7656262", "0.76427835", "0.7613308", "0.761083", "0.7594784", "0.7506523",...
0.75184226
20
Sets the category of this LibraryItemQuery.
def category(self, category): self._category = category
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_category(self, category):\n\n\t\tif category is not None and not isinstance(category, str):\n\t\t\traise SDKException(Constants.DATA_TYPE_ERROR, 'KEY: category EXPECTED TYPE: str', None, None)\n\t\t\n\t\tself.__category = category\n\t\tself.__key_modified['category'] = 1", "def category(self, category: s...
[ "0.7395649", "0.7275444", "0.709381", "0.7034113", "0.6953392", "0.63351184", "0.6216576", "0.6136754", "0.59834373", "0.5938862", "0.5928713", "0.57130563", "0.5682418", "0.5581962", "0.55302596", "0.5516326", "0.5459351", "0.53784126", "0.52990174", "0.52738017", "0.5262390...
0.71715504
4
Sets the price_high of this LibraryItemQuery.
def price_high(self, price_high): self._price_high = price_high
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bid_high(self, bid_high):\n\n self._bid_high = bid_high", "def price_low(self, price_low):\n\n self._price_low = price_low", "def high(self, high: float):\n if high is None:\n raise ValueError(\"Invalid value for `high`, must not be `None`\") # noqa: E501\n\n self._h...
[ "0.72497165", "0.69250435", "0.675932", "0.6685596", "0.6351186", "0.6110559", "0.60887194", "0.60098106", "0.5985678", "0.5965527", "0.5965527", "0.5965527", "0.5965527", "0.5854015", "0.58061814", "0.57623935", "0.57620835", "0.5704622", "0.5675035", "0.5626796", "0.5547651...
0.8587676
0
Sets the price_low of this LibraryItemQuery.
def price_low(self, price_low): self._price_low = price_low
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def low(self, low: float):\n if low is None:\n raise ValueError(\"Invalid value for `low`, must not be `None`\") # noqa: E501\n\n self._low = low", "def low(self, low):\n\n self._low = low", "def bid_low(self, bid_low):\n\n self._bid_low = bid_low", "def price_high(sel...
[ "0.72209525", "0.7079322", "0.6918289", "0.6692108", "0.6513208", "0.6406729", "0.63459533", "0.6009022", "0.583074", "0.58128196", "0.5769905", "0.5759873", "0.5745925", "0.56998664", "0.5691532", "0.5691532", "0.5691532", "0.5691532", "0.56835145", "0.5648042", "0.5646476",...
0.8627758
0
Sets the published_dts_begin of this LibraryItemQuery.
def published_dts_begin(self, published_dts_begin): self._published_dts_begin = published_dts_begin
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def published_dts_end(self, published_dts_end):\n\n self._published_dts_end = published_dts_end", "def published(self, published):\n if published is None:\n raise ValueError(\"Invalid value for `published`, must not be `None`\") # noqa: E501\n\n self._published = published", "d...
[ "0.63737565", "0.5493262", "0.5383861", "0.53633964", "0.529519", "0.51750314", "0.50870585", "0.5061792", "0.5060035", "0.501842", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.50168115", "0.49505895", "0.4...
0.83737487
0
Sets the published_dts_end of this LibraryItemQuery.
def published_dts_end(self, published_dts_end): self._published_dts_end = published_dts_end
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def published_dts_begin(self, published_dts_begin):\n\n self._published_dts_begin = published_dts_begin", "def end_date(self, end_date):\n\n self._end_date = end_date", "def end_date(self, end_date):\n\n self._end_date = end_date", "def end_date(self, end_date):\n\n self._end_date...
[ "0.61879903", "0.57973766", "0.57973766", "0.57973766", "0.57973766", "0.57973766", "0.57973766", "0.57973766", "0.57973766", "0.57918996", "0.5521442", "0.55114937", "0.5460978", "0.5441232", "0.53918684", "0.5286144", "0.52664363", "0.5234245", "0.52309155", "0.5188391", "0...
0.83605564
0
Sets the source_of_published of this LibraryItemQuery.
def source_of_published(self, source_of_published): self._source_of_published = source_of_published
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_source(self, source):\n self.data['source'] = source", "def _set_published(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGBool, is_leaf=True, yang_name=\"published\", rest_name=\"published\", parent=self, path_helper=self._...
[ "0.5152805", "0.5092919", "0.50655425", "0.5037759", "0.5037759", "0.5037759", "0.5037759", "0.5037759", "0.5037759", "0.5037759", "0.4983101", "0.4972346", "0.4937148", "0.49194947", "0.4907625", "0.4894094", "0.4894094", "0.4873407", "0.48249686", "0.48145923", "0.47818664"...
0.8274632
0
Sets the type of this LibraryItemQuery.
def type(self, type): self._type = type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self._type = type", "def setType(self, newType):\n self._itemType = newType", "def item_data_type(self, item_data_type):\n\n self._item_data_type = ...
[ "0.6839614", "0.6839614", "0.6828347", "0.67603576", "0.6535172", "0.65259516", "0.64664686", "0.64118505", "0.637606", "0.637606", "0.6339547", "0.6339547", "0.6339547", "0.6199214", "0.6083598", "0.6083598", "0.60766613", "0.60565776", "0.60449374", "0.60345787", "0.6034578...
0.6419984
27