query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Convert a string value in to given type, type can be one of datetime.datetime, datetime.date and datetime.time. Uses current locale and timezone settings to convert the value.
def _parse_datetime(value, type=datetime.datetime): assert type in (datetime.datetime, datetime.date, datetime.time) if not isinstance(value, basestring): return value #TODO: use current locale and timezone info to parse to value formats = { datetime.datetime: '%Y-%m-%d %H:%M:%S', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _type_convert(self, value):\n if value is None:\n return value\n\n try:\n return datetime.datetime.strptime(value, \"%Y-%m-%d %H:%M:%S\")\n except ValueError:\n pass\n\n try:\n return int(value)\n except ValueError:\n pas...
[ "0.7504813", "0.6699153", "0.6594165", "0.6546857", "0.64849734", "0.6314421", "0.6287953", "0.6278388", "0.6217169", "0.60698295", "0.6042053", "0.60261947", "0.60256886", "0.5981932", "0.59376043", "0.59363985", "0.59323305", "0.59245753", "0.5917688", "0.59000576", "0.5861...
0.76290923
0
EEG Signal Simulation Simulate an artificial EEG signal. This is a crude implementation based on the MNEPython raw simulation example. Help is needed to improve this function.
def eeg_simulate(duration=1, length=None, sampling_rate=1000, noise=0.1, random_state=None): # Try loading mne try: import mne import mne.datasets import mne.simulation except ImportError as e: raise ImportError( "The 'mne' module is required for this function to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_noise(emg):\n MAX_AMPLITUDE = 32767\n\n # Sampling\n # 1 second of data requires 600 frames. And 600 fps is 600 Hz, sampling rate of EMG.\n Ts = 1/EMG_F_SAMPLE\n\n # Time vector\n t = np.arange(0, len(emg)/EMG_F_SAMPLE, Ts) # each unit of t is a second\n\n # Noise\n randAmplitudeSc...
[ "0.61956763", "0.610275", "0.5993526", "0.597416", "0.59077984", "0.59017754", "0.5880396", "0.58016926", "0.5760875", "0.5706816", "0.5699131", "0.5676859", "0.567066", "0.56360096", "0.56196326", "0.5602858", "0.55992264", "0.55836403", "0.5576451", "0.5570734", "0.55598336...
0.698078
0
Query the tracklets table for the total number of tracklets associated to this SSM object with their status. The status tells whether the tracklet was not found ('U). We are only interested in clean tracklets whose detections are brighter than LIMITING_MAG and that have been observerd before maxMJD.
def objectTracklets(ssmObject, maxMJD, limitingMag=LIMITING_MAG): # Get a cursor from the DB connection. cursor = Conection.connect(DB_USER, DB_PASSWD, instance, DB_HOST) # Select al the tracklets associated with ssmObject. # TODO: Is using ext_epoch right? sql = 'select tracklet_id, status fro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tubclean_count(self):\n if self.is_info_v2:\n result = DeviceStatus.int_or_none(self._data.get(\"tclCount\"))\n else:\n result = self._data.get(\"TclCount\")\n if result is None:\n result = \"N/A\"\n return self._update_feature(WashDeviceFeatures.TUB...
[ "0.54586697", "0.54425967", "0.51669234", "0.515886", "0.5096581", "0.5061716", "0.49336", "0.48054257", "0.47217533", "0.4708356", "0.47045496", "0.46993577", "0.469208", "0.46712843", "0.466063", "0.46598294", "0.465898", "0.46517268", "0.46492374", "0.46242303", "0.462415"...
0.6052711
0
Find the fraction of the total number of clean tracklets theoretically associated with the given SSM object that MOPS actually associated with it. ssmObject is the ssm_id
def processObject(ssmObject, maxMJD): percentFound = -1. # Get a cursor from the DB connection. cursor = Conection.connect(DB_USER, DB_PASSWD, instance, DB_HOST) # Fnd all the visible tracklets associated with the object. Each tracklet is # an array of the form [tracklet_id, status]. Statu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def objectTracklets(ssmObject, maxMJD, limitingMag=LIMITING_MAG):\n # Get a cursor from the DB connection.\n cursor = Conection.connect(DB_USER, DB_PASSWD, instance, DB_HOST)\n \n # Select al the tracklets associated with ssmObject.\n # TODO: Is using ext_epoch right?\n sql = 'select tracklet_id,...
[ "0.54343474", "0.5389818", "0.5329431", "0.53050345", "0.52252626", "0.52009857", "0.516708", "0.5143384", "0.51321924", "0.5112056", "0.5111174", "0.5042978", "0.5042217", "0.5034905", "0.5014961", "0.49824715", "0.49607834", "0.4958764", "0.49410716", "0.49187186", "0.49155...
0.71355146
0
Find the SSM orbits associated with the given instance. Also return the maximum MJD that the precovery pipeline is working on.
def listObjects(instance): # Get a cursor from the DB connection. cursor = Conection.connect(DB_USER, DB_PASSWD, instance, DB_HOST) # Compose the SQL query to find all the orbits/SSM objects. We do this with # a simle query to the derivedobjects table since we realy only need the # ssm_id valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def completedPrecoveryMaxDate(instance):\n # Get a cursor from the DB connection.\n cursor = Conection.connect(DB_USER, DB_PASSWD, instance, DB_HOST)\n \n # Fetch the maximum MJD precovery has processed.\n sql = 'select max(epoch_mjd) from detections d, tracklet_attrib ta '\n sql += 'where d.det_...
[ "0.49544078", "0.48614013", "0.4803768", "0.47599295", "0.46683034", "0.46434867", "0.45607504", "0.45236927", "0.45087636", "0.45051718", "0.45051718", "0.4498567", "0.44935858", "0.4478318", "0.44600636", "0.44428247", "0.44174296", "0.43791753", "0.43775365", "0.43559694", ...
0.5541556
0
Get paper_id from `hit'.
def _paper_id(hit: DD) -> str: return hit["_source"]["paper_id"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hit_id(self):\n return self.assignment.HITId", "def find_issue_id(self):", "def _get_id(results, index):\n return results[index]['_id']", "def dangling_pic(pic):\n ppl = pic.person_set.fetch(100)\n if not ppl:\n return pic.key().id()", "def hit(self):\n return self._hit", ...
[ "0.69868296", "0.56247854", "0.5616075", "0.5425608", "0.53989947", "0.5375978", "0.52967244", "0.52966356", "0.5277519", "0.52638745", "0.524657", "0.5234392", "0.52156657", "0.5189373", "0.518699", "0.5174917", "0.5170238", "0.5169146", "0.51510876", "0.51510876", "0.515108...
0.86228186
0
Get title from `hit'.
def _title(hit: DD) -> str: return hit["_source"]["title"]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_title(self, obj):\n title = obj.habit.title\n return title", "def get_title():", "def get_title(self):\n return self.metadata['title']", "def title(self):\n return self.get(self._names[\"title\"])", "def title(self):\n return self.get(self._names[\"title\"])", "...
[ "0.74535805", "0.72680277", "0.70484865", "0.68149185", "0.68149185", "0.67732847", "0.6760391", "0.6757609", "0.6750882", "0.6747287", "0.6747287", "0.6747287", "0.67468166", "0.6732499", "0.6732499", "0.6732499", "0.6717095", "0.66841376", "0.66783696", "0.66464376", "0.663...
0.89552915
0
Test `join` filter function.
def test_join(self): test_cases = [ Case( description="lists of strings", val=["a", "b"], args=[ "#", ], kwargs={}, expect="a#b", ), Case( desc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_join_and(self):\n self.assertEqual(join_and(self.fruits_singular, plural=False),\n \"apple, a orange and a banana\")\n self.assertEqual(join_and(self.fruits_plural, plural=True),\n \"apples, oranges and bananas\")\n self.assertEqual(join...
[ "0.68004614", "0.6535712", "0.6305247", "0.59191144", "0.58536106", "0.58509207", "0.5828059", "0.56852114", "0.56152767", "0.5599719", "0.55828947", "0.5563236", "0.5553356", "0.55384237", "0.55197346", "0.5468807", "0.5425347", "0.54054934", "0.53015125", "0.5295291", "0.52...
0.7226226
0
Test `first` filter function.
def test_first(self): test_cases = [ Case( description="lists of strings", val=["a", "b"], args=[], kwargs={}, expect="a", ), Case( description="lists of things", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def first(iterable: Iterable[T1], predicate: Callable[[T1], bool]) -> Union[T1, None]:\n for x in iterable:\n if predicate(x):\n return x\n return None", "def _first(self, \n iterable, \n condition=lambda x: True):\n try:\n return next(x for x...
[ "0.67819643", "0.6583545", "0.6578263", "0.65747654", "0.6469289", "0.6452934", "0.6449825", "0.6402848", "0.63544303", "0.63225055", "0.6258148", "0.6254651", "0.6247087", "0.62392735", "0.62146485", "0.62146485", "0.615671", "0.61102223", "0.6039504", "0.60003775", "0.59562...
0.69991195
0
Test `last` filter function.
def test_last(self): test_cases = [ Case( description="lists of strings", val=["a", "b"], args=[], kwargs={}, expect="b", ), Case( description="lists of things", v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_last(n, result):\n from last import last\n assert last(n) == result", "def test_9999_last(self):\n self.lasttest = True", "def test_last_element(self):\n self.assertEqual(functions.last_element([1, 2, 3]), 3)\n self.assertEqual(functions.last_element([]), None)", "def test...
[ "0.6690879", "0.66017205", "0.65425724", "0.61579126", "0.6045275", "0.6015733", "0.599462", "0.59935486", "0.59502226", "0.5896181", "0.58830184", "0.5843675", "0.57821405", "0.57237977", "0.5683516", "0.56639475", "0.56478554", "0.5635642", "0.5617747", "0.55998707", "0.557...
0.6940046
0
Test `concat` filter function.
def test_concat(self): test_cases = [ Case( description="lists of strings", val=["a", "b"], args=[["c", "d"]], kwargs={}, expect=["a", "b", "c", "d"], ), Case( description="missin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testConcatSourceMultipleButOneConcatable(self):\n env = self.env\n\n # Even if multiple input files, if only one is concat-able, won't concat.\n cs = env.ConcatSource('foo3.cc', ['a.cc', 'd.o'])\n self.assertEqual(map(str, cs), ['d.o', 'a.cc'])", "def test_evaluate_concat_expressi...
[ "0.65016174", "0.64184755", "0.6282409", "0.5935726", "0.59030414", "0.5607358", "0.5581276", "0.55731755", "0.5568929", "0.5547763", "0.55458635", "0.55448776", "0.5541933", "0.553369", "0.5527253", "0.5473628", "0.544644", "0.5384779", "0.53693026", "0.535711", "0.532056", ...
0.72020715
0
Test `map` filter function.
def test_map(self): test_cases = [ Case( description="lists of objects", val=[{"title": "foo"}, {"title": "bar"}, {"title": "baz"}], args=["title"], kwargs={}, expect=["foo", "bar", "baz"], ), Ca...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __map_and_filter(_input: MutableSequence[T],\n _map: Callable[[T], Any] = lambda x: x,\n _filter: Callable[[T], bool] = lambda x: True) -> MutableSequence[Any]:\n\n return [_map(x) for x in _input if _filter(x)]", "def custom_filter(function, iterable):\n map_lis...
[ "0.6945921", "0.6697105", "0.6596213", "0.6476732", "0.62312645", "0.61732423", "0.60880965", "0.6084054", "0.60769737", "0.607596", "0.606519", "0.6056232", "0.60424167", "0.59891844", "0.5942686", "0.59221935", "0.59039664", "0.58928454", "0.5885066", "0.5878272", "0.585578...
0.67475384
1
Test `reverse` filter function.
def test_reverse(self): test_cases = [ Case( description="lists of strings", val=["b", "a", "B", "A"], args=[], kwargs={}, expect=["A", "B", "a", "b"], ), Case( description="lists...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_reverse(self):\n t = Reverse(Quantize())\n assert t.reverse(8.6) == 9\n assert t.reverse(8.4) == 8\n assert t.reverse(5.3) == 5\n assert numpy.all(t.reverse([8.6, 5.3]) == numpy.array([9, 5], dtype=int))", "def test_reverse(self):\n t = Quantize()\n asser...
[ "0.66847414", "0.6667177", "0.6579335", "0.6499214", "0.6478599", "0.6319221", "0.6278729", "0.6268115", "0.6027764", "0.5967647", "0.58728814", "0.585832", "0.5847677", "0.5824535", "0.58035773", "0.5802626", "0.5715419", "0.5714377", "0.5682833", "0.5658598", "0.56185347", ...
0.7016158
0
Test `sort_natural` filter function.
def test_sort_natural(self): test_cases = [ Case( description="lists of strings", val=["b", "a", "C", "B", "A"], args=[], kwargs={}, expect=["a", "A", "b", "B", "C"], ), Case( des...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_version_sorting(self):\n assert natsort(['1', '5', '10', '50']) == ['1', '5', '10', '50']", "def natural_sort(sequence, comparison_callable=natural_sort_comparison):\n sequence.sort(comparison_callable)", "def natural_sort( l ): \n convert = lambda text: int(text) if text.isdigit() else t...
[ "0.65320396", "0.619571", "0.61323243", "0.6105644", "0.6093698", "0.6048497", "0.60407436", "0.6026955", "0.6009246", "0.59946877", "0.5951541", "0.59253305", "0.590383", "0.58909464", "0.5858026", "0.58571583", "0.5835636", "0.5825835", "0.5791668", "0.5790346", "0.57736903...
0.7430661
0
Test `uniq` filter function.
def test_uniq(self): test_cases = [ Case( description="lists of strings", val=["a", "b", "b", "a"], args=[], kwargs={}, expect=["a", "b"], ), Case( description="lists of things", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unique():\n\n def _apply_fn(dataset):\n return dataset.unique()\n\n return _apply_fn", "def uniq(input, output, fields, delimiter, encoding, verbose, format_in, format_out, zipfile, filter):\n if verbose:\n enableVerbose()\n options = {}\n options['output'] = output\n options['fields'...
[ "0.63492405", "0.62281924", "0.6093811", "0.59848446", "0.5980171", "0.59633833", "0.59403497", "0.59102774", "0.5889821", "0.5874548", "0.5850808", "0.57886237", "0.5765051", "0.5734143", "0.57336146", "0.57023686", "0.5699716", "0.5691954", "0.568361", "0.5671094", "0.56442...
0.76420027
0
Test `compact` filter function.
def test_compact(self): test_cases = [ Case( description="lists with nil", val=["b", "a", None, "A"], args=[], kwargs={}, expect=["b", "a", "A"], ), Case( description="empty list"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_compact(self, name):", "def compact(items):\n return filter(lambda item: item is not None and len(item) > 0, items)", "def test_filter_mixed_function(self):\n for none_type in (False, True):\n for all_type in (False, True):\n for any_type in (False, True, None):\n ...
[ "0.63996834", "0.61731136", "0.61543494", "0.6071144", "0.59451234", "0.5849943", "0.581691", "0.5800044", "0.574214", "0.573533", "0.57180494", "0.57152534", "0.56675535", "0.56581366", "0.56312007", "0.55737156", "0.5543245", "0.5501316", "0.5498039", "0.54955107", "0.54908...
0.7841796
0
u""" Get Minimal AWS Linux AMI ID
def minimal_linux_ami(self): client = self.aws.get_client('ec2') try: res = client.describe_images(Owners=['self', '099720109477'], Filters=[ { 'Name': 'virt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_self_instance_id():\n\n logging.debug('get_self_instance_id()')\n response = urllib2.urlopen('http://169.254.169.254/1.0/meta-data/instance-id')\n instance_id = response.read()\n return instance_id", "def get_ami_keyname ( app_name ) :\n return app_name + '.ami'", "def get_ami_by_id ( ec2...
[ "0.68473345", "0.6364349", "0.62722474", "0.61129767", "0.606595", "0.5926506", "0.5893706", "0.589055", "0.58329403", "0.58002704", "0.5794514", "0.5773664", "0.57633007", "0.57095546", "0.57048184", "0.56966126", "0.5679263", "0.5651188", "0.5651188", "0.5651188", "0.565118...
0.7679751
0
Deletes all tables from the database Returns None
def delete_all_tables(self): if self.__dbfile is not None: for table_name in list(LocalData.table_info.keys()): if self.table_exists(table_name): self._conn.execute("DROP TABLE %s" % table_name) self._conn.commit()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_db():\n for name in TABLES:\n result = execute_query('truncate table {};'.format(name)), ())", "def clean_db():\n db = get_db()\n tables = db.tables\n for table in tables:\n db[table].drop()", "def tear_down():\n db.flush()\n for table in metadata.tables.values...
[ "0.84315497", "0.82127285", "0.8170458", "0.8093179", "0.8075382", "0.79561704", "0.78853303", "0.7793635", "0.77400386", "0.7737219", "0.77196485", "0.77169883", "0.7667539", "0.75941366", "0.7584116", "0.7528714", "0.7509895", "0.74784756", "0.74581003", "0.74393415", "0.74...
0.8532715
0
Test that SpecificLocation will selfcreate an ID object if none is given
def test_specific_location_init_without_arguments() -> None: # init works without arguments loc = SpecificLocation() assert isinstance(loc.id, UID)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_specific_location_init_with_specific_id() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n\n loc = SpecificLocation(id=uid)\n\n assert loc.id == uid", "def test_create_location(self):\n location = self.location\n\n self.assertTrue(isinstance(l...
[ "0.8358078", "0.6789458", "0.6717033", "0.66556245", "0.6602681", "0.6558521", "0.6484271", "0.6427122", "0.63308305", "0.62980676", "0.62751615", "0.62623805", "0.62326145", "0.62217927", "0.6214734", "0.6178322", "0.6151656", "0.6114206", "0.60996836", "0.6031524", "0.60150...
0.7678006
1
Test that SpecificLocation will use the ID you pass into the constructor
def test_specific_location_init_with_specific_id() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) loc = SpecificLocation(id=uid) assert loc.id == uid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_specific_location_init_without_arguments() -> None:\n\n # init works without arguments\n loc = SpecificLocation()\n\n assert isinstance(loc.id, UID)", "def get_location_by_id(self, location_id):", "def __init__(self, location_id, x=0, y=0):\r\n self.location_id = location_id\r\n ...
[ "0.7857052", "0.6929304", "0.68323725", "0.67941", "0.67722225", "0.672715", "0.6719905", "0.6682997", "0.66164076", "0.6570459", "0.63615984", "0.6358354", "0.62723994", "0.6271754", "0.6270507", "0.62166953", "0.61853737", "0.61331964", "0.61279035", "0.6127604", "0.6056048...
0.87963134
0
Tests that SpecificLocation generates a pretty representation.
def test_pprint() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid, name="location") assert obj.pprint == "📌 location (SpecificLocation)@<UID:🙍🛖>"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_formatted_location(self):\n\t\tformatted_location = get_formatted_location('seoul', 'south korea')\n\t\tself.assertEqual(formatted_location, 'Seoul, South Korea')", "def test_compound_with_location(self):\n self.assertEqual(self.compound_with_loc.location, 'extracellular')", "def describe_l...
[ "0.64041483", "0.6394315", "0.6256238", "0.6169211", "0.61543375", "0.6110976", "0.60569775", "0.6009788", "0.59648657", "0.5960665", "0.57977366", "0.57535416", "0.55598515", "0.55481315", "0.5548042", "0.5547863", "0.55326045", "0.55230683", "0.54892486", "0.5475312", "0.54...
0.70316887
0
Tests that default SpecificLocation serialization works as expected to Protobuf
def test_default_serialization() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid, name="Test") blob = sy.serialize(obj, to_proto=True) assert sy.serialize(obj) == blob
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_proto_serialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid, name=\"Test\")\n\n blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid), name=\"Test\")\n\n assert sy.serialize(obj, to_proto=True) == blob\...
[ "0.7711845", "0.75500697", "0.7217684", "0.6926107", "0.6428363", "0.64130694", "0.6011315", "0.5987244", "0.58243567", "0.5751032", "0.56994116", "0.5697481", "0.5630711", "0.5615444", "0.560221", "0.55844355", "0.5583882", "0.5381914", "0.53770804", "0.5376579", "0.5345937"...
0.7852183
0
Tests that default SpecificLocation deserialization works as expected from Protobuf
def test_default_deserialization() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid, name="Test") blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid)) obj2 = sy.deserialize(blob=blob) assert obj == obj2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_proto_deserialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid)\n\n blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid))\n\n obj2 = sy.deserialize(blob=blob, from_proto=True)\n assert obj == obj2", ...
[ "0.7662707", "0.7108986", "0.6969302", "0.6869886", "0.6192624", "0.60881054", "0.59459627", "0.57979983", "0.5787996", "0.57652116", "0.57554007", "0.57256055", "0.57252336", "0.56568176", "0.56436545", "0.5626855", "0.56126255", "0.55936146", "0.5572628", "0.5544999", "0.55...
0.7796891
0
Tests that default SpecificLocation serialization works as expected to Protobuf
def test_proto_serialization() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid, name="Test") blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid), name="Test") assert sy.serialize(obj, to_proto=True) == blob assert sy.se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_serialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid, name=\"Test\")\n\n blob = sy.serialize(obj, to_proto=True)\n\n assert sy.serialize(obj) == blob", "def test_default_deserialization() -> None:\n\n ...
[ "0.7852183", "0.75500697", "0.7217684", "0.6926107", "0.6428363", "0.64130694", "0.6011315", "0.5987244", "0.58243567", "0.5751032", "0.56994116", "0.5697481", "0.5630711", "0.5615444", "0.560221", "0.55844355", "0.5583882", "0.5381914", "0.53770804", "0.5376579", "0.5345937"...
0.7711845
1
Tests that default SpecificLocation deserialization works as expected from Protobuf
def test_proto_deserialization() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid) blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid)) obj2 = sy.deserialize(blob=blob, from_proto=True) assert obj == obj2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_deserialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid, name=\"Test\")\n\n blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid))\n\n obj2 = sy.deserialize(blob=blob)\n assert obj == obj2", ...
[ "0.77971804", "0.7109227", "0.6970353", "0.68700683", "0.6193557", "0.60889876", "0.5947199", "0.57988137", "0.57877314", "0.576459", "0.5755967", "0.57254654", "0.5725275", "0.56569904", "0.5644605", "0.5625937", "0.56136805", "0.5595943", "0.5573725", "0.5545526", "0.551871...
0.76633465
1
Tests that binary SpecificLocation serializes as expected
def test_binary_serialization() -> None: uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684)) obj = SpecificLocation(id=uid, name="Test") blob = ( b"\n/syft.core.io.location.specific.SpecificLocation\x12\x1a\n\x12\n\x10" + b"\xfb\x1b\xb0g[\xb7LI\xbe\xce\xe7\x00\xab\n\x15...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_serialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid, name=\"Test\")\n\n blob = sy.serialize(obj, to_proto=True)\n\n assert sy.serialize(obj) == blob", "def test_binary_deserialization() -> None:\n\n b...
[ "0.7375597", "0.72204155", "0.6941698", "0.6747669", "0.6687572", "0.66465783", "0.6593975", "0.65680665", "0.63872945", "0.63758487", "0.62996614", "0.6264945", "0.61968005", "0.6076474", "0.60626924", "0.6027337", "0.5995509", "0.59866995", "0.59510314", "0.5870925", "0.585...
0.7700117
0
Test that binary SpecificLocation deserialization works as expected
def test_binary_deserialization() -> None: blob = ( b"\n/syft.core.io.location.specific.SpecificLocation\x12\x1a\n\x12\n\x10" + b"\xfb\x1b\xb0g[\xb7LI\xbe\xce\xe7\x00\xab\n\x15\x14\x12\x04Test" ) obj = sy.deserialize(blob=blob, from_bytes=True) assert obj == SpecificLocation( i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_deserialization() -> None:\n\n uid = UID(value=uuid.UUID(int=333779996850170035686993356951732753684))\n obj = SpecificLocation(id=uid, name=\"Test\")\n\n blob = SpecificLocation.get_protobuf_schema()(id=sy.serialize(uid))\n\n obj2 = sy.deserialize(blob=blob)\n assert obj == obj2", ...
[ "0.7560681", "0.74002177", "0.7336826", "0.7013086", "0.6905292", "0.66269207", "0.64547575", "0.63303447", "0.6209737", "0.6172043", "0.61616814", "0.6142617", "0.61180305", "0.6067025", "0.6018473", "0.593757", "0.59359664", "0.5935091", "0.5915604", "0.5915578", "0.584693"...
0.8264405
0
Takes a semicolondelimited list of values and constructs a SQL WHERE clause to select those values within a given field and table.
def whereClause(table, field, values): # Add field delimiters fieldDelimited = arcpy.AddFieldDelimiters(arcpy.Describe(table).path, field) # Split multivalue at semicolons and strip quotes valueList = [value[1:-1] if (value.startswith("'") and value.endswith("'")) els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_where_clause(table, field, valueList):\n # Add DBMS-specific field delimiters\n fieldDelimited = arcpy.AddFieldDelimiters(arcpy.Describe(table).path, field)\n # Determine field type\n fieldType = arcpy.ListFields(table, field)[0].type\n # Add single-quotes for string field values\n if s...
[ "0.7853446", "0.6152071", "0.5823842", "0.5747859", "0.5664342", "0.56641", "0.56417346", "0.5615715", "0.5549794", "0.55107397", "0.5508221", "0.53860664", "0.53816307", "0.53534734", "0.53163993", "0.5313791", "0.53075683", "0.53036475", "0.52948624", "0.5281941", "0.525382...
0.7653736
1
Return a sorted list of mobs that have that name for the purposes of iteration. This method may be expanded in the future to allow searching for mobs by other traits.
def get_named(self, name): if type(name) is str: named = [mob for mob in self.contents() if mob.nombre == name] else: named = [mob for mob in self.contents() if mob.nombre == name.nombre] named.sort(key=lambda o: o.nombre) return named
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def monomer_names(self):\n output = set()\n for item in self.monomers():\n if item in self.pyranose_fac:\n output.add(self.pyranose_fac[item][\"name\"])\n return list(output)", "def name(self):\n return [o.name for o in self.obs]", "def get_cards(self, name...
[ "0.6153555", "0.594157", "0.591578", "0.58488035", "0.57634735", "0.573525", "0.5705173", "0.5702694", "0.5682394", "0.5681273", "0.5596956", "0.5593977", "0.5591041", "0.55547523", "0.55317295", "0.54679155", "0.54432535", "0.54290605", "0.54099905", "0.53774685", "0.5377313...
0.7485591
0
Return the time in seconds shifted by the simulation start time (e.g. as specified in the inp file). This is, this is the time since 12 AM on the first day.
def _shifted_time(self): return self.sim_time + self.options.time.start_clocktime
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _prev_shifted_time(self):\n return self._prev_sim_time + self.options.time.start_clocktime", "def startTime(self) -> float:\n try: return self.times[0]\n except IndexError: return 0.0", "def calculate_time(start_time):\r\n return round(time() - start_time, 2)", "def get_time(cls):...
[ "0.7487089", "0.7112895", "0.70894873", "0.68668205", "0.6815268", "0.6798686", "0.6756169", "0.67303437", "0.6724895", "0.66210204", "0.661483", "0.6612274", "0.65881646", "0.65733826", "0.6572052", "0.6566302", "0.6539889", "0.65108466", "0.65106434", "0.6473942", "0.646286...
0.76229405
0
Return the time in seconds of the previous solve shifted by the simulation start time. That is, this is the time from 12 AM on the first day to the time at the previous hydraulic timestep.
def _prev_shifted_time(self): return self._prev_sim_time + self.options.time.start_clocktime
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _shifted_time(self):\n return self.sim_time + self.options.time.start_clocktime", "def sim_step(self):\n return traci.simulation.getCurrentTime()/1000 # milliseconds to seconds", "def get_simulation_time(self):\n if not self.simulation_init_time:\n return 0\n if self...
[ "0.7158862", "0.67761683", "0.66555315", "0.66283196", "0.64012426", "0.64009786", "0.6364507", "0.63604295", "0.6347445", "0.6292934", "0.6258326", "0.625451", "0.61905634", "0.6159625", "0.6156674", "0.6154028", "0.61382556", "0.6125578", "0.6115283", "0.6097853", "0.608191...
0.75587815
0
Return the clocktime day of the simulation
def _clock_day(self): return int(self._shifted_time / 86400)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_of_day(self):\n return self.time_of_day_value", "def day(self):\n return 0", "def day(self):\n return 0", "def unit_day(self):\n return (self.time_base * 60.0) * 24.0", "def time_of_the_day(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"time_of...
[ "0.72421193", "0.7015691", "0.7015691", "0.6804973", "0.67424273", "0.6686264", "0.66749734", "0.65851897", "0.6573514", "0.6541982", "0.65127045", "0.6437197", "0.6330646", "0.63277256", "0.63277256", "0.62924594", "0.62924594", "0.62924594", "0.62901354", "0.6270266", "0.62...
0.75825566
0
The link registry (as property) or a generator for iteration (as function call) Returns LinkRegistry
def links(self): return self._link_reg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def registry(self):\n return self.__registry", "def registry(self):\n return self._registry", "def view_registry(self) -> None:\n\n arr = self.load_links()[0]\n for i,v in enumerate(arr):\n print(f\"<{i}: {v}>\\n\")\n pass", "def internal_registry(self) -> Dict[s...
[ "0.65705675", "0.64430135", "0.6358416", "0.63083994", "0.6102733", "0.604913", "0.5927782", "0.5793796", "0.5768209", "0.5747865", "0.570079", "0.5636082", "0.5598207", "0.5594115", "0.5587638", "0.55498993", "0.5464956", "0.5436829", "0.5404893", "0.5389639", "0.5378682", ...
0.6896771
0
The pattern registry (as property) or a generator for iteration (as function call) Returns PatternRegistry
def patterns(self): return self._pattern_reg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def MakePattern(self,content):\n return self.register(Pattern(content,reg=self))", "def get_pattern(self):\n if self.pattern is None:\n pattern_str = self.blueprint.pattern()\n pattern_file = self.remgr.lookup_pattern_file(self.blueprint, self.provider)\n self.patte...
[ "0.65146554", "0.64546156", "0.633061", "0.6302383", "0.62347597", "0.62250704", "0.6207318", "0.61989623", "0.619185", "0.61466134", "0.60196435", "0.60170513", "0.59838694", "0.59704536", "0.5863253", "0.5800555", "0.57989776", "0.5760038", "0.5692418", "0.56686074", "0.566...
0.6674461
0
The curve registry (as property) or a generator for iteration (as function call) Returns CurveRegistry
def curves(self): return self._curve_reg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_curve(self, curve):\n key = tuple(curve.points())\n if key not in self.curves:\n # new curve (lock and register)\n curve.is_locked = True # points list must not change, else not valid key\n self.curves[key] = curve\n return self.curves[key]", "de...
[ "0.63213986", "0.6279888", "0.6143379", "0.5865785", "0.58409965", "0.57949567", "0.57655513", "0.5734903", "0.56743884", "0.5640423", "0.5621362", "0.5588055", "0.5549895", "0.55485934", "0.5528997", "0.55288696", "0.5470255", "0.5464915", "0.54572403", "0.5440797", "0.54024...
0.7048159
0
Returns a generator to iterate over all sources Returns A generator in the format (name, object).
def sources(self): for source_name, source in self._sources.items(): yield source_name, source
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __iter__(self):\n for source in self._sources:\n for row in source.__iter__():\n yield row", "def Sources():\n return _sources", "def sources(source):\n\n source2 = models.Source(name=u\"Bob's Funerals.com\", url=u\"http://www.bobsfunerals.com\")\n source3 = models...
[ "0.6933318", "0.6585145", "0.63167036", "0.62444586", "0.6230182", "0.62263227", "0.6188514", "0.6182752", "0.6164078", "0.6110404", "0.6073849", "0.6025064", "0.5983164", "0.5980554", "0.59729177", "0.5920594", "0.5912745", "0.5887372", "0.5886389", "0.5871467", "0.5869842",...
0.7837107
0
Returns a generator to iterate over all controls Returns A generator in the format (name, object).
def controls(self): for control_name, control in self._controls.items(): yield control_name, control
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_controls(self, recurse: bool) -> Iterator[cat.Control]:\n if self._catalog.groups:\n for group in self._catalog.groups:\n controls = self._get_all_controls_in_group(group, recurse)\n for control in controls:\n yield control\n if ...
[ "0.6908673", "0.6539071", "0.628452", "0.5979725", "0.58603287", "0.5804641", "0.5767439", "0.5740077", "0.5725284", "0.5711476", "0.5673429", "0.5667829", "0.5641358", "0.56149", "0.5614355", "0.5590635", "0.5561186", "0.55272454", "0.5511409", "0.55027884", "0.55009913", ...
0.81733114
0
Iterator over all junctions
def junctions(self): return self._node_reg.junctions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def junctions(self):\n for node_name in self._junctions:\n yield node_name, self._data[node_name]", "def __iter__(self):\n return iter(self.adjacent)", "def iteredges(self):\n for source, targets in self.successors.items():\n for target in targets:\n yi...
[ "0.8278087", "0.6693829", "0.66877705", "0.64899516", "0.6466883", "0.6348325", "0.6335292", "0.6325255", "0.6298924", "0.62037104", "0.6182745", "0.6135457", "0.611039", "0.61055434", "0.6095036", "0.604867", "0.6037925", "0.6037925", "0.6037925", "0.6037925", "0.6032833", ...
0.6854161
1
Iterator over all tanks
def tanks(self): return self._node_reg.tanks
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tanks(self):\n for node_name in self._tanks:\n yield node_name, self._data[node_name]", "def __iter__(self):\n for bucket in self._table:\n if bucket is not None:\n for key in bucket:\n yield key", "def IterRetainedRanks(\n self: ...
[ "0.80246234", "0.61414534", "0.6067089", "0.60653913", "0.60528237", "0.59743404", "0.59675145", "0.59599507", "0.59582263", "0.5940111", "0.5920663", "0.59127057", "0.58748466", "0.5863908", "0.5848202", "0.581613", "0.581613", "0.581613", "0.581613", "0.5812649", "0.5805785...
0.6538602
1
Adds a tank to the water network model
def add_tank(self, name, elevation=0.0, init_level=3.048, min_level=0.0, max_level=6.096, diameter=15.24, min_vol=0.0, vol_curve=None, overflow=False, coordinates=None): self._node_reg.add_tank(name, elevation, init_level, min_level, max_level, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_tank(self, name, elevation=0.0, init_level=3.048,\n min_level=0.0, max_level=6.096, diameter=15.24,\n min_vol=0.0, vol_curve=None, overflow=False, \n coordinates=None):\n assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, \"name ...
[ "0.59383786", "0.5583475", "0.55089575", "0.55066186", "0.54286695", "0.53669107", "0.535145", "0.5351197", "0.5335581", "0.53225297", "0.53063965", "0.5265405", "0.5245383", "0.5238348", "0.51864153", "0.5177752", "0.51733613", "0.51558095", "0.5112751", "0.5104057", "0.5101...
0.6289887
0
Adds a reservoir to the water network model
def add_reservoir(self, name, base_head=0.0, head_pattern=None, coordinates=None): self._node_reg.add_reservoir(name, base_head, head_pattern, coordinates)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_reservoir(self, name, base_head=0.0, head_pattern=None, coordinates=None):\n assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, \"name must be a string with less than 32 characters and contain no spaces\"\n assert isinstance(base_head, (int, float)), \"base_head must be...
[ "0.61060196", "0.6085037", "0.5708459", "0.57015747", "0.55982244", "0.5592088", "0.5579086", "0.5543703", "0.55212134", "0.5517631", "0.54950887", "0.54280555", "0.5407858", "0.53472775", "0.53240216", "0.531642", "0.5312082", "0.52957845", "0.5283269", "0.5282811", "0.52827...
0.65088904
0
Adds a pipe to the water network model
def add_pipe(self, name, start_node_name, end_node_name, length=304.8, diameter=0.3048, roughness=100, minor_loss=0.0, initial_status='OPEN', check_valve=False): self._link_reg.add_pipe(name, start_node_name, end_node_name, length, diameter, ro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, pipe_element):\n self.__iadd__(pipe_element)", "def __iadd__(self, pipe_element):\n if isinstance(pipe_element, Preprocessing):\n self.preprocessing = pipe_element\n elif isinstance(pipe_element, CallbackElement):\n pipe_element.needs_y = True\n ...
[ "0.70902383", "0.639606", "0.60840946", "0.58341885", "0.583066", "0.57448953", "0.5718142", "0.5681793", "0.5593915", "0.5527294", "0.5476688", "0.5435575", "0.5421555", "0.53581893", "0.5324393", "0.5309517", "0.5289012", "0.527887", "0.5258997", "0.52400005", "0.5194908", ...
0.66412914
1
Adds a pump to the water network model
def add_pump(self, name, start_node_name, end_node_name, pump_type='POWER', pump_parameter=50.0, speed=1.0, pattern=None, initial_status='OPEN'): self._link_reg.add_pump(name, start_node_name, end_node_name, pump_type, pump_parameter, speed, pattern, initial_sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_pump(self, name, start_node_name, end_node_name, pump_type='POWER',\n pump_parameter=50.0, speed=1.0, pattern=None, initial_status='OPEN'):\n assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, \"name must be a string with less than 32 characters and contain no ...
[ "0.6452546", "0.5804844", "0.53684664", "0.5346167", "0.5280994", "0.5154602", "0.5111471", "0.5105995", "0.50667065", "0.50452876", "0.50355077", "0.50345284", "0.50326157", "0.4998017", "0.495867", "0.49376225", "0.49181387", "0.4901064", "0.49007452", "0.48770928", "0.4859...
0.66224295
0
Adds a valve to the water network model
def add_valve(self, name, start_node_name, end_node_name, diameter=0.3048, valve_type='PRV', minor_loss=0.0, initial_setting=0.0, initial_status='ACTIVE'): self._link_reg.add_valve(name, start_node_name, end_node_name, diameter, valve_type, mi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_valve(self, name, start_node_name, end_node_name,\n diameter=0.3048, valve_type='PRV', minor_loss=0.0, \n initial_setting=0.0, initial_status='ACTIVE'):\n assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, \"name must be a string with less than ...
[ "0.643315", "0.5798691", "0.5605155", "0.5582534", "0.55659705", "0.55612314", "0.5479006", "0.54574764", "0.54148215", "0.5413817", "0.53985167", "0.5379142", "0.53286594", "0.53122795", "0.5277096", "0.5270513", "0.5226005", "0.5203529", "0.51670414", "0.51572764", "0.51478...
0.6613797
0
Adds a curve to the water network model
def add_curve(self, name, curve_type, xy_tuples_list): self._curve_reg.add_curve(name, curve_type, xy_tuples_list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_curve(self):\n pv_name = self._get_full_pv_name(self.pv_name_line_edt.text())\n color = random_color()\n for k, v in self.channel_map.items():\n if color == v.color:\n color = random_color()\n\n self.add_y_channel(pv_name=pv_name, curve_name=pv_name, co...
[ "0.6272838", "0.6218104", "0.6078385", "0.5991374", "0.58583546", "0.5828755", "0.5766712", "0.57254916", "0.5713772", "0.56235594", "0.5622298", "0.55829", "0.5549861", "0.55252457", "0.54938287", "0.5488295", "0.54653907", "0.5412902", "0.5401338", "0.53959215", "0.5330481"...
0.6482353
0
Removes a pattern from the water network model
def remove_pattern(self, name): self._pattern_reg.__delitem__(name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_pattern(input_txt,pattern):\r\n r = re.findall(pattern,input_txt)\r\n\r\n for i in r:\r\n input_txt = re.sub(i,'',input_txt)\r\n return input_txt", "def delete(self, pattern, pattern_type=None):\n\t\tpattern = convert_pattern(pattern, pattern_type)\n\t\twith self.AutoSplitlines():\n\t\...
[ "0.6203475", "0.5598266", "0.55046695", "0.5405062", "0.539219", "0.5379158", "0.53727037", "0.53561664", "0.53032506", "0.52915484", "0.5265123", "0.52626526", "0.52523774", "0.5230492", "0.52108836", "0.51926154", "0.5167957", "0.5167639", "0.5162403", "0.5161164", "0.51583...
0.61529595
1
Removes a curve from the water network model
def remove_curve(self, name): self._curve_reg.__delitem__(name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_curve(self, pv_name):\n curve = self.chart.findCurve(pv_name)\n if curve:\n self.chart.removeYChannel(curve)\n del self.channel_map[pv_name]\n self.chart.removeLegendItem(pv_name)\n\n widgets = self.findChildren((QCheckBox, QLabel, QPushButton, Q...
[ "0.6330724", "0.62075675", "0.56893647", "0.56485957", "0.5623504", "0.56010044", "0.5583296", "0.55401576", "0.5525893", "0.54791206", "0.544778", "0.5441997", "0.5441997", "0.54373914", "0.53785205", "0.5366104", "0.5363655", "0.5363136", "0.5342044", "0.5332126", "0.529939...
0.6684406
0
Removes a source from the water network model
def remove_source(self, name): logger.warning('You are deleting a source. This could have unintended \ side effects. If you are replacing values, use get_source(name) \ and modify it instead.') source = self._sources[name] self._pattern_reg.remove_usage(source.strength_ti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RemoveSource(self,source):\n self._sources.RemoveSource(source)", "def RemoveSource(self, source):\n self._sources.remove(source)", "def removeModelSource(self, modelSource):\n self._modelSources.remove(modelSource)\n if modelSource.isLoaded():\n self._reload()", "d...
[ "0.77114284", "0.74407005", "0.71957576", "0.69854724", "0.64353293", "0.64186805", "0.6345265", "0.63194674", "0.6298371", "0.62230206", "0.6152543", "0.6127164", "0.60954565", "0.60934883", "0.6064978", "0.60586363", "0.6038401", "0.5981567", "0.5934729", "0.5830534", "0.58...
0.7522891
1
Get a specific curve
def get_curve(self, name): return self._curve_reg[name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCurve(self, *args):\n return _libsbml.GeneralGlyph_getCurve(self, *args)", "def getCurve(self, *args):\n return _libsbml.ReferenceGlyph_getCurve(self, *args)", "def curve(self, index):\n if index >= len(self) or len(self) == 0:\n print('ERROR Class Graph method Curve: can...
[ "0.7430819", "0.73042256", "0.7285898", "0.72660524", "0.70774084", "0.7035105", "0.70314497", "0.6966334", "0.6909233", "0.6722947", "0.6711495", "0.6628271", "0.6575409", "0.6557469", "0.6466138", "0.6451115", "0.63523614", "0.62281936", "0.61431664", "0.6096783", "0.608139...
0.74706084
0
Get a specific source
def get_source(self, name): return self._sources[name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_source(self):\n\t\treturn self.source.get_source()", "def getSource():", "def get_source(self):\n return self.source", "def get_source(self):", "def source():\n\n source = models.Source(name=u\"Joe's Funerals.com\", url=u\"http://www.joesfunerals.com\")\n return source", "def _get_so...
[ "0.7696782", "0.7522081", "0.7431137", "0.7377622", "0.72502756", "0.7175143", "0.7173024", "0.7112712", "0.7101868", "0.70995736", "0.7044947", "0.7036322", "0.70349556", "0.7008906", "0.6993891", "0.6992051", "0.6958572", "0.6942624", "0.6923416", "0.68866533", "0.6872768",...
0.76889575
1
Get a list of junction names Returns list of strings
def junction_name_list(self): return list(self._node_reg.junction_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def junction_names(self):\n return self._junctions", "def junctions(self):\n return self._node_reg.junctions", "def junctions(self):\n for node_name in self._junctions:\n yield node_name, self._data[node_name]", "def get_names(cat):\n res = []\n while cat...
[ "0.8087006", "0.69687134", "0.68006426", "0.6432575", "0.63967204", "0.6359245", "0.6332422", "0.6287477", "0.6035099", "0.59415925", "0.5880238", "0.5832492", "0.5803015", "0.57876426", "0.57208526", "0.57171524", "0.5715702", "0.568492", "0.5673629", "0.5627065", "0.5626552...
0.8256131
0
Get a list of tanks names Returns list of strings
def tank_name_list(self): return list(self._node_reg.tank_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tank_names(self):\n return self._tanks", "def tanks(self):\n for node_name in self._tanks:\n yield node_name, self._data[node_name]", "def rank_names(self):\n return ['Domain', # 0\n 'Phylum', # 1\n 'Class', # 2\n 'Order...
[ "0.8056458", "0.6646708", "0.6427893", "0.6385724", "0.6325658", "0.62808025", "0.6279592", "0.6128254", "0.60252315", "0.5951407", "0.5919693", "0.59042984", "0.58878714", "0.5863227", "0.585431", "0.584664", "0.58040273", "0.57890725", "0.578157", "0.5747603", "0.57416886",...
0.75850743
1
Get a list of reservoir names Returns list of strings
def reservoir_name_list(self): return list(self._node_reg.reservoir_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reservoir_names(self):\n return self._reservoirs", "def names(self) -> list[str]:", "def getNames(self) -> List[unicode]:\n ...", "def donor_names():\n names = list()\n for name in donor_db:\n names = names + [name[0]]\n return names", "def itemnames():\n g = ['KIS_NA_3...
[ "0.84352976", "0.6965079", "0.6796028", "0.671071", "0.6577268", "0.65600306", "0.6528046", "0.6493303", "0.6435559", "0.62036914", "0.61941165", "0.61810017", "0.6166763", "0.6131687", "0.6107919", "0.61021644", "0.60691506", "0.60660154", "0.6060537", "0.6058289", "0.605265...
0.8379338
1
Get a list of link names Returns list of strings
def link_name_list(self): return list(self._link_reg.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_kdl_link_names(self):\n num_links = self._urdf_chain.getNrOfSegments()\n link_names = []\n for i in range(num_links):\n link_names.append(self._urdf_chain.getSegment(i).getName())\n return copy.deepcopy(link_names)", "def list(self):\n\t\treturn self.link_words", ...
[ "0.7595612", "0.7404677", "0.72829336", "0.7264005", "0.72046065", "0.69500434", "0.69243145", "0.69173944", "0.68098545", "0.6758766", "0.6710052", "0.67067623", "0.65946317", "0.65372044", "0.65343434", "0.65168136", "0.64991564", "0.6481789", "0.64781207", "0.6465065", "0....
0.7673522
0
Get a list of pipe names Returns list of strings
def pipe_name_list(self): return list(self._link_reg.pipe_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pipe_names(self):\n return self._pipes", "def pipes(self): \n return self._link_reg.pipes", "def get_pipeline_names() -> Iterable[str]:\n for item in sorted((SRC / \"pipelines\").iterdir()):\n if not item.name.startswith(\"_\") and not item.is_file():\n yield item....
[ "0.82978183", "0.71116775", "0.65844274", "0.6444399", "0.6193895", "0.61290246", "0.6103078", "0.6090233", "0.6083763", "0.6083763", "0.6031202", "0.60280323", "0.60100174", "0.59890234", "0.59890234", "0.5932565", "0.59230214", "0.58982307", "0.5873035", "0.583595", "0.5787...
0.84123486
0
Get a list of pump names (both types included) Returns list of strings
def pump_name_list(self): return list(self._link_reg.pump_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pump_names(self):\n return self._pumps", "def power_pump_name_list(self):\n return list(self._link_reg.power_pump_names)", "def power_pump_names(self):\n return self._power_pumps", "def get_pump_stringlist(self):\n return text_pump", "def head_pump_name_list(self):\n ...
[ "0.7911566", "0.75667715", "0.70810467", "0.68184704", "0.67374855", "0.6724712", "0.6678243", "0.6582998", "0.6389015", "0.6045076", "0.5974296", "0.59574044", "0.5891369", "0.5801314", "0.5729742", "0.5713783", "0.56620663", "0.565727", "0.56552035", "0.565081", "0.56356615...
0.8058499
0
Get a list of head pump names Returns list of strings
def head_pump_name_list(self): return list(self._link_reg.head_pump_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def head_pump_names(self):\n return self._head_pumps", "def pump_name_list(self):\n return list(self._link_reg.pump_names)", "def power_pump_name_list(self):\n return list(self._link_reg.power_pump_names)", "def pump_names(self):\n return self._pumps", "def head_pumps(self):\n ...
[ "0.81699145", "0.74455684", "0.6964368", "0.6947486", "0.63413054", "0.6206856", "0.6171997", "0.6103357", "0.6101508", "0.609973", "0.60207105", "0.6008463", "0.5996784", "0.5958609", "0.59400934", "0.5917989", "0.5891312", "0.5883272", "0.5867631", "0.58626765", "0.58320594...
0.8411579
0
Get a list of power pump names Returns list of strings
def power_pump_name_list(self): return list(self._link_reg.power_pump_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def power_pump_names(self):\n return self._power_pumps", "def pump_name_list(self):\n return list(self._link_reg.pump_names)", "def pump_names(self):\n return self._pumps", "def head_pump_name_list(self):\n return list(self._link_reg.head_pump_names)", "def get_pump_stringlist(s...
[ "0.8048565", "0.80370945", "0.798992", "0.6704519", "0.66724175", "0.6669718", "0.6619897", "0.66024184", "0.63278764", "0.62715787", "0.6242387", "0.61856943", "0.608296", "0.60596144", "0.5981608", "0.5979851", "0.5920514", "0.58885986", "0.58619136", "0.5823269", "0.582233...
0.8360706
0
Get a list of valve names (all types included) Returns list of strings
def valve_name_list(self): return list(self._link_reg.valve_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def valve_names(self):\n return self._valves", "def names(self) -> list[str]:", "def names(self):\n if type(self.name) is types.StringType:\n return [self.name]\n else:\n return list(self.name)", "def all_values(cls) -> List[str]:\n return list(member.value f...
[ "0.75549895", "0.6897611", "0.68669784", "0.68631047", "0.6844718", "0.67509496", "0.66171193", "0.65831435", "0.65557593", "0.6527351", "0.6493272", "0.64087355", "0.63995713", "0.63643575", "0.6360965", "0.63165", "0.6314579", "0.62659514", "0.6198061", "0.6177901", "0.6140...
0.7783707
0
Get a list of prv names Returns list of strings
def prv_name_list(self): return list(self._link_reg.prv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prv_names(self):\n return self._prvs", "def names(self) -> list[str]:", "def getNames(self) -> List[unicode]:\n ...", "def names(cls) -> List[str]:", "def get_names(self):\r\n names = []\r\n for p in self.people:\r\n names.append(p.get_name())\r\n return na...
[ "0.7555528", "0.73201424", "0.70572925", "0.6875848", "0.6829884", "0.6716961", "0.6604352", "0.6572593", "0.6521208", "0.6510447", "0.645756", "0.63750947", "0.63750947", "0.6340543", "0.6340543", "0.6325614", "0.6278456", "0.62449247", "0.61938864", "0.6189884", "0.6185686"...
0.8030329
0
Get a list of psv names Returns list of strings
def psv_name_list(self): return list(self._link_reg.psv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def psv_names(self):\n return self._psvs", "def names(self) -> list[str]:", "def getNames(self) -> List[unicode]:\n ...", "def names(cls) -> List[str]:", "def psvs(self):\n for name in self._psvs:\n yield name, self._data[name]", "def names(self) -> List:\n ...", ...
[ "0.7399235", "0.7064878", "0.6588478", "0.6548767", "0.6485365", "0.6352624", "0.63394755", "0.6327527", "0.6327527", "0.63156044", "0.6274496", "0.62336254", "0.6201393", "0.61899", "0.61899", "0.6181303", "0.6138216", "0.61024606", "0.6079889", "0.6078942", "0.60608804", ...
0.72743374
1
Get a list of pbv names Returns list of strings
def pbv_name_list(self): return list(self._link_reg.pbv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pbv_names(self):\n return self._pbvs", "def gpv_name_list(self):\n return list(self._link_reg.gpv_names)", "def psv_name_list(self):\n return list(self._link_reg.psv_names)", "def pbvs(self):\n for name in self._pbvs:\n yield name, self._data[name]", "def gpv_name...
[ "0.82071203", "0.71072763", "0.69930744", "0.68813866", "0.66668886", "0.6622456", "0.6417987", "0.63324535", "0.6273439", "0.6254718", "0.6246069", "0.6238829", "0.62047076", "0.61949503", "0.6152581", "0.60600245", "0.59967786", "0.59805226", "0.5975194", "0.5934706", "0.58...
0.8257615
0
Get a list of tcv names Returns list of strings
def tcv_name_list(self): return list(self._link_reg.tcv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tcv_names(self):\n return self._tcvs", "def names(self) -> list[str]:", "def names(cls) -> List[str]:", "def getNames(self) -> List[unicode]:\n ...", "def get_names(self):\n import tc\n opts_list = []\n for k, v in self.__class__.__dict__.iteritems():\n if ...
[ "0.8012389", "0.7307783", "0.7146537", "0.709622", "0.6900165", "0.6722755", "0.6684833", "0.6668676", "0.66517746", "0.6465502", "0.6454279", "0.62444496", "0.6233946", "0.6233946", "0.6201808", "0.61725366", "0.61725366", "0.6156361", "0.6143343", "0.6134101", "0.6115569", ...
0.82840574
0
Get a list of fcv names Returns list of strings
def fcv_name_list(self): return list(self._link_reg.fcv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fcv_names(self):\n return self._fcvs", "def get_fnames(self):\n return self.fnames[:]", "def names(self) -> list[str]:", "def names(cls) -> List[str]:", "def getFeatureNames(self):\n return [\"f100\", \"f103\", \"f104\"]", "def tcv_name_list(self):\n return list(self._link...
[ "0.78478754", "0.712436", "0.7058395", "0.69252557", "0.6803095", "0.6760557", "0.6676739", "0.6672468", "0.65755755", "0.65727544", "0.6418178", "0.63568324", "0.63470227", "0.63281006", "0.63159966", "0.6260134", "0.62199223", "0.62199223", "0.621741", "0.621741", "0.617696...
0.8191783
0
Get a list of gpv names Returns list of strings
def gpv_name_list(self): return list(self._link_reg.gpv_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gpv_names(self):\n return self._gpvs", "def get_vgs() -> List[str]:\n p = subprocess.run(\n [\"vgs\", \"--reportformat\", \"json\"], check=True, capture_output=True\n )\n output = json.loads(p.stdout)\n return [vg[\"vg_name\"] for vg in output[\"report\"][0][\"vg\"]]", "def psv_na...
[ "0.8337195", "0.7465264", "0.71278745", "0.69160676", "0.67721885", "0.674753", "0.66832805", "0.6682054", "0.6636047", "0.6615088", "0.6587514", "0.6531277", "0.6456293", "0.64385325", "0.64284253", "0.6414002", "0.6388162", "0.63829565", "0.6365987", "0.6354151", "0.6301887...
0.84747857
0
Get a list of pattern names Returns list of strings
def pattern_name_list(self): return list(self._pattern_reg.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def names(self) -> list[str]:", "def _get_wild_tasks(self, pattern):\n wild_list = []\n for t_name in self._def_order:\n if fnmatch.fnmatch(t_name, pattern):\n wild_list.append(t_name)\n return wild_list", "def pattern_filter(patterns, name):\n return [pat ...
[ "0.6853399", "0.6688259", "0.66735446", "0.662816", "0.6604652", "0.6583273", "0.6579248", "0.65776634", "0.6446731", "0.64373344", "0.639123", "0.6373305", "0.62809545", "0.6243343", "0.62412816", "0.623562", "0.6233539", "0.6227802", "0.6211251", "0.619828", "0.6139878", ...
0.8001064
0
Get a list of curve names Returns list of strings
def curve_name_list(self): return list(self._curve_reg.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pump_curve_names(self):\n return list(self._pump_curves)", "def _curveNamesToList(settings):\n return [getattr(GroupName, val) for val in settings.eccCurves]", "def efficiency_curve_names(self):\n return list(self._efficiency_curves)", "def volume_curve_names(self):\n return l...
[ "0.7918395", "0.78808326", "0.77684337", "0.7411239", "0.71585196", "0.6744637", "0.6661399", "0.6598523", "0.6596619", "0.65196663", "0.6311063", "0.62766385", "0.6136272", "0.6124383", "0.5961749", "0.5954731", "0.5933657", "0.5894027", "0.58754605", "0.5824049", "0.5807217...
0.81836087
0
Get a list of source names Returns list of strings
def source_name_list(self): return list(self._sources.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source(self) -> list:\n sources = self.source_control.list_sources()\n sources_list = [source['label'] for source in sources]\n return sources_list", "def source_list(self):\n return [g[\"name\"] for g in self._galleries]", "def get_names(source):\n names = [row[\"name\"] for...
[ "0.7640286", "0.7293398", "0.7200503", "0.7097758", "0.7097758", "0.696268", "0.6953154", "0.68827164", "0.68759656", "0.68512136", "0.6798987", "0.6763301", "0.66584516", "0.66349", "0.6595274", "0.657544", "0.6540999", "0.6520172", "0.6509632", "0.65048426", "0.650278", "...
0.8032265
0
Get a list of control/rule names Returns list of strings
def control_name_list(self): return list(self._controls.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_rule_names(self):\n return self.rules.keys()", "def get_rules(self):\n rules = []\n for item in self.name:\n rules.append(item)\n return rules", "def _get_control_names(self, interface, form):\n return sorted([control.name\n for contro...
[ "0.71425015", "0.68443525", "0.6620647", "0.6553509", "0.6531148", "0.63990444", "0.63443166", "0.63027054", "0.6252463", "0.6241359", "0.6145582", "0.61365986", "0.6088305", "0.60836315", "0.60831684", "0.60462165", "0.60083985", "0.5993568", "0.5942411", "0.5872572", "0.586...
0.729938
0
The number of junctions
def num_junctions(self): return len(self._node_reg.junction_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_links(self):\n count=0.0\n for cluster in self.clusters:\n if self.clusters[cluster] == self.clusters[cluster].antecessor:\n numberofmembers=self.clusters[cluster].number_of_members\n count+=numberofmembers\n return count", "def len(self):\n start = self.head\...
[ "0.7173659", "0.69816774", "0.69730014", "0.6608103", "0.65723664", "0.6569851", "0.6567663", "0.65596044", "0.65587217", "0.65556127", "0.6511058", "0.647438", "0.6459975", "0.6436464", "0.64354825", "0.6421428", "0.64130574", "0.6397925", "0.637273", "0.636859", "0.6362135"...
0.77778614
0
The number of tanks
def num_tanks(self): return len(self._node_reg.tank_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tanks(self):\n return self._node_reg.tanks", "def num_janks(self, interval=None):\n return len(self.jank_intervals(interval=interval))", "def n_trees(self):\n return len(self.data_kd)", "def getNumTiles(self):\n\t\treturn self.numTiles", "def rank():\n return 0", "def getNumTi...
[ "0.7776518", "0.7585978", "0.6880398", "0.6690311", "0.65511477", "0.65338445", "0.65303934", "0.65251786", "0.6523661", "0.6511023", "0.6502101", "0.6457421", "0.64225304", "0.6412317", "0.63993996", "0.63987553", "0.63728577", "0.6364467", "0.6339812", "0.63004667", "0.6282...
0.8292153
0
The number of reservoirs
def num_reservoirs(self): return len(self._node_reg.reservoir_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count():", "def get_num_slots(self):\n # Your code here\n return self.capacity", "def get_num_slots(self):\n # Your code here\n return len(self.data)", "def Count(self) -> int:", "def Count(self) -> int:", "def Count(self) -> int:", "def Count(self) -> int:", "def rese...
[ "0.67223126", "0.66856825", "0.65716654", "0.6531035", "0.6531035", "0.6531035", "0.6531035", "0.6511663", "0.6507631", "0.6439152", "0.6438949", "0.642677", "0.6345383", "0.63144374", "0.6282734", "0.6279368", "0.6278311", "0.627725", "0.627725", "0.6232956", "0.6221794", ...
0.7678594
0
The number of pipes
def num_pipes(self): return len(self._link_reg.pipe_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_pipe_length(self, pipe):\n\n if pipe not in self.components:\n raise KeyError(\n '{} is not recognized as an existing pipe'.format(pipe))\n\n return self.components[pipe].get_length()", "def get_number_of_output_ports(self):\n return 1", "def ShowPipeStats...
[ "0.6861697", "0.67390794", "0.6627592", "0.655506", "0.6550658", "0.6462149", "0.6444095", "0.6358948", "0.6337157", "0.6326174", "0.63176036", "0.6302765", "0.625705", "0.62213284", "0.6208864", "0.6206694", "0.61970145", "0.6150049", "0.6144482", "0.6142951", "0.6136111", ...
0.8202305
0
The number of pumps
def num_pumps(self): return len(self._link_reg.pump_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_nrof_pumps(self):\n pumps = 0\n for p in self.pump_array:\n if p:\n pumps += 1\n return pumps", "def num_wires(self):", "def count():", "def npulses(self):\n return self.header.pulse_count", "def numpsus():\n click.echo(_wrapper_get_num_psus(...
[ "0.82744265", "0.6849408", "0.67384434", "0.6730982", "0.66905665", "0.660744", "0.6517272", "0.6517272", "0.6517272", "0.6517272", "0.6470648", "0.6430279", "0.642148", "0.641826", "0.64141464", "0.6402074", "0.6397082", "0.639609", "0.63788354", "0.63788354", "0.63771194", ...
0.77231
1
The number of valves
def num_valves(self): return len(self._link_reg.valve_names)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nvar(self):\n return len(self.v)", "def __len__(self):\n return self.nb_iterations", "def count(self):\n return self.vcount", "def valency(self):\n return len(self.neighbors())", "def num_params(self):", "def __len__(self):\n return len(self._varvals)", "def __len__(s...
[ "0.7356873", "0.7152376", "0.7128234", "0.7079117", "0.70560277", "0.7013356", "0.6965341", "0.69152635", "0.6889811", "0.6839744", "0.68240225", "0.6792508", "0.67643374", "0.67640054", "0.67554945", "0.6729148", "0.67072624", "0.669019", "0.6684467", "0.6675353", "0.6675353...
0.8071682
0
The number of patterns
def num_patterns(self): return len(self._pattern_reg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __len__(self) -> int:\n n_fuzzy_patterns = sum(len(p[\"patterns\"]) for p in self.fuzzy_patterns.values())\n n_regex_patterns = sum(len(p[\"patterns\"]) for p in self.regex_patterns.values())\n return n_fuzzy_patterns + n_regex_patterns", "def npatterns(self):\n return len(self.pa...
[ "0.8040715", "0.80276746", "0.79672825", "0.7956098", "0.77537733", "0.76355374", "0.70745206", "0.6905691", "0.6862375", "0.68336916", "0.66170734", "0.6587431", "0.6543572", "0.6543572", "0.6543572", "0.6543572", "0.6514328", "0.65043736", "0.6479225", "0.64716905", "0.6465...
0.81838506
0
The number of curves
def num_curves(self): return len(self._curve_reg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def curve_number(self):", "def getNumCurveSegments(self):\n return _libsbml.Curve_getNumCurveSegments(self)", "def num_quadrature_points(self) -> int:", "def numpoints(self):\n return len(self.pars) + 1 # so dof is 1", "def num_sigmas(self):\n return 2*self.n + 1", "def numberOfPoin...
[ "0.69003946", "0.68829596", "0.68708044", "0.67858136", "0.66785693", "0.6449481", "0.6299548", "0.6258773", "0.62481177", "0.62191", "0.6205878", "0.6196767", "0.6180489", "0.61516505", "0.61496425", "0.61298734", "0.61173856", "0.60934234", "0.60934234", "0.6089018", "0.608...
0.8231799
0
The number of sources
def num_sources(self): return len(self._sources)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_all_srcs_count(dataset: linux.LinuxSourcesDataset):\n # FIXME(cec): This value does not appear to stable across platforms, but it\n # should be.\n assert abs(len(dataset.all_srcs) - 26091) < 1000", "def fileCount(self):\n pass", "def getFileCount(self) -> int:\n ...", "def __number_...
[ "0.74113506", "0.7155835", "0.69133234", "0.6856751", "0.68429273", "0.68368053", "0.68331873", "0.68192124", "0.6790306", "0.67514884", "0.67217726", "0.6709941", "0.6708362", "0.66989625", "0.66856146", "0.6671262", "0.66590977", "0.66583157", "0.66367596", "0.66367596", "0...
0.8289444
0
The number of controls
def num_controls(self): return len(self._controls)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_count_of_controls(self, recurse: bool) -> int:\n return len(list(self.get_all_controls(recurse)))", "def count(self):\r\n\r\n return len(self.widgets_list)", "def XPCountChildWidgets(inWidget):\n pass", "def __len__(self):\n return len(self._forms)", "def CountButtons(self):...
[ "0.75083387", "0.7496899", "0.7116853", "0.68915015", "0.68793744", "0.68754846", "0.66907966", "0.66517556", "0.6629138", "0.65655446", "0.6551462", "0.64709383", "0.64610255", "0.6443094", "0.6413949", "0.6412288", "0.64081395", "0.63826525", "0.63275117", "0.63180983", "0....
0.81790185
0
Assign demands using values in a DataFrame. New demands are specified in a pandas DataFrame indexed by time (in seconds). The method resets junction demands by creating a new demand pattern and using a base demand of 1. The demand pattern is resampled to match the water network model pattern timestep. This method can b...
def assign_demand(self, demand, pattern_prefix='ResetDemand'): for junc_name in demand.columns: # Extract the node demand pattern and resample to match the pattern timestep demand_pattern = demand.loc[:, junc_name] demand_pattern.index = pd.TimedeltaIndex(demand_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_analysis_time(self, t):\n for z in self.zones:\n z.set_demand_rate_per_t(t)", "def __init__(self, data_frame, mins_set):\n # super(FeaturePrevDelays, self).__init__()\n self.df = data_frame.copy()\n self.mins_set = mins_set", "def set_model_df_at_time_step(self):\...
[ "0.5316171", "0.50743294", "0.5053788", "0.5013383", "0.49570274", "0.49486694", "0.4925754", "0.48887652", "0.4883495", "0.4799642", "0.4782267", "0.47726718", "0.47573262", "0.4728699", "0.4728453", "0.47173283", "0.47091067", "0.46539465", "0.4650706", "0.46276408", "0.462...
0.73366606
0
Query link attributes, for example get all pipe diameters > threshold
def query_link_attribute(self, attribute, operation=None, value=None, link_type=None): link_attribute_dict = {} for name, link in self.links(link_type): try: if operation == None and value == None: link_attribute_dict[name] = getattr(link, attribute) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attr(graph: nx.Graph, attr: str):\n return [data[attr] for _, _, data in graph.edges.data()]", "def get_attributes(\n attribute_category: Optional[str] = Query(None, alias='attributeCategory'),\n attribute_db_id: Optional[str] = Query(None, alias='attributeDbId'),\n attribute_name: Optional[s...
[ "0.5418465", "0.5310432", "0.52736616", "0.52311105", "0.5068784", "0.50490856", "0.5038029", "0.5005454", "0.4983717", "0.49739105", "0.4949673", "0.49282217", "0.4916343", "0.48925012", "0.4888643", "0.48490494", "0.4836985", "0.48068938", "0.4806892", "0.4803262", "0.47883...
0.62613106
0
Convert all controls to rules. Note that for an exact match between controls and rules, the rule timestep must be very small.
def convert_controls_to_rules(self, priority=3): for name in self.control_name_list: control = self.get_control(name) if isinstance(control, Control): act = control.actions()[0] cond = control.condition rule = Rule(cond, act, priority=prior...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_all_rules(self):\n\n def compatible(pattern1, pattern2, direction):\n \"\"\"Returns `True` if `pattern2` is compatible with `pattern1` in the `direction`,\n otherwise return `False`.\"\"\"\n if direction == 0:\n return pattern1[:-1] == pattern2[1:]\n ...
[ "0.6332641", "0.59601104", "0.58393854", "0.57896286", "0.5788332", "0.5754123", "0.56642663", "0.56304467", "0.55068797", "0.5395985", "0.5301954", "0.5270951", "0.5237025", "0.5214121", "0.5211153", "0.5207527", "0.5184299", "0.5180485", "0.51692605", "0.5154638", "0.514249...
0.6874837
0
Adds a pattern to the water network model. The pattern can be either a list of values (list, numpy array, etc.) or
def add_pattern(self, name, pattern=None): assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, "name must be a string with less than 32 characters and contain no spaces" assert isinstance(pattern, (list, np.ndarray, Pattern)), "pattern must be a list or Pattern" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_pattern(self, start, stop, pattern):\n self.coord2pattern[start] = []\n self.coord2pattern[start].append(pattern)", "def add_pattern(self, pattern):\n self.patterns.append(pattern)", "def add_pattern(self, name, pattern=None):\n self._pattern_reg.add_pattern(name, pattern)",...
[ "0.7099591", "0.7086511", "0.66157454", "0.6437363", "0.64248204", "0.62355673", "0.60420597", "0.60162663", "0.5999167", "0.59823906", "0.59552026", "0.59552026", "0.5909474", "0.57770187", "0.57718015", "0.5771128", "0.572893", "0.5681611", "0.5672396", "0.5663754", "0.5653...
0.7114446
0
A new default pattern object
def default_pattern(self): return self.DefaultPattern(self._options)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, pattern):\r\n self.pattern = pattern", "def _parse_pattern(cls, pattern, default_pattern: str = \"*\") -> Pattern:\n pattern = pattern or default_pattern\n if pattern is None:\n return None\n\n return Pattern(pattern)", "def __init__(self, pattern1, pat...
[ "0.7807499", "0.7243514", "0.7193833", "0.71809846", "0.7046036", "0.69185525", "0.6883249", "0.6868047", "0.6684589", "0.66810167", "0.6515232", "0.64147526", "0.6365711", "0.6365275", "0.6349147", "0.6279269", "0.62461793", "0.6243432", "0.6231972", "0.62051904", "0.618304"...
0.7329583
1
Sets curve type. WARNING this does not check to make sure key is typed before assigning it you could end up with a curve that is used for more than one type
def set_curve_type(self, key, curve_type): if curve_type is None: return curve_type = curve_type.upper() if curve_type == 'HEAD': self._pump_curves.add(key) elif curve_type == 'HEADLOSS': self._headloss_curves.add(key) elif curve_type == 'VOLUM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_curve(self, key_curve):\n self.curve = key_curve", "def set_type(self,typ):\n self._typ = typ\n if typ == 'Sine':\n self._type = 7\n elif typ == 'Sawtooth up':\n self._type = 0\n elif typ == 'Sawtooth down':\n self._type = 1\n elif typ == 'Square':\n self._type =...
[ "0.6818262", "0.634501", "0.6043398", "0.6023125", "0.59724844", "0.5956123", "0.5896204", "0.58441633", "0.57730615", "0.57210946", "0.5714673", "0.568932", "0.56837136", "0.5655091", "0.5635704", "0.5634768", "0.5588842", "0.5548922", "0.5517519", "0.55156165", "0.5504896",...
0.82946426
0
List of names of all curves without types
def untyped_curve_names(self): defined = set(self._data.keys()) untyped = defined.difference(self._pump_curves, self._efficiency_curves, self._headloss_curves, self._volume_curves) return list(untyped)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def curve_name_list(self):\n return list(self._curve_reg.keys())", "def pump_curve_names(self):\n return list(self._pump_curves)", "def efficiency_curve_names(self):\n return list(self._efficiency_curves)", "def volume_curve_names(self):\n return list(self._volume_curves)", "def...
[ "0.728905", "0.7177009", "0.7102774", "0.6995169", "0.6821574", "0.6692155", "0.6231177", "0.6144938", "0.6102462", "0.5912403", "0.5880008", "0.58158827", "0.577501", "0.57147944", "0.5695711", "0.5672398", "0.56616974", "0.562902", "0.5619223", "0.56168723", "0.56018364", ...
0.79089075
0
Generator to get all pump curves Yields
def pump_curves(self): for key in self._pump_curves: yield key, self._data[key]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pumps(self):\n for name in self._pumps:\n yield name, self._data[name]", "def iterCurves(self):\n for c in range(self.length()):\n yield self.curve(c)", "def _generators(self):\n return self.free_group.generators", "def semigroup_generators(self):", "def ticke...
[ "0.6955307", "0.69123983", "0.65011305", "0.62952924", "0.6177036", "0.6140256", "0.6089721", "0.6075028", "0.6056255", "0.60330725", "0.600164", "0.5999505", "0.5998696", "0.596925", "0.5952728", "0.5864612", "0.5799862", "0.5788411", "0.5763655", "0.5734014", "0.57314366", ...
0.7948479
0
List of names of all pump curves
def pump_curve_names(self): return list(self._pump_curves)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def curve_name_list(self):\n return list(self._curve_reg.keys())", "def volume_curve_names(self):\n return list(self._volume_curves)", "def pump_names(self):\n return self._pumps", "def efficiency_curve_names(self):\n return list(self._efficiency_curves)", "def power_pump_names(...
[ "0.70650846", "0.7049732", "0.7011603", "0.69478863", "0.6671471", "0.66613317", "0.6562465", "0.6556188", "0.64959246", "0.6474869", "0.6210788", "0.6114254", "0.6050862", "0.59828776", "0.5880972", "0.5876053", "0.584949", "0.5795343", "0.5747948", "0.56924325", "0.56870025...
0.8472442
0
Generator to get all efficiency curves Yields
def efficiency_curves(self): for key in self._efficiency_curves: yield key, self._data[key]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iterCurves(self):\n for c in range(self.length()):\n yield self.curve(c)", "def pump_curves(self):\n for key in self._pump_curves:\n yield key, self._data[key]", "def ticker_generator():\n return (v for v in load_equities().values)", "def price_generator(self, start...
[ "0.6970686", "0.6494462", "0.62896115", "0.6112059", "0.6069281", "0.597246", "0.5970973", "0.5869654", "0.57763106", "0.5729279", "0.572446", "0.5703407", "0.56768227", "0.56695676", "0.5640674", "0.5629118", "0.56185347", "0.5613104", "0.5579484", "0.55687636", "0.5509577",...
0.76868105
0
List of names of all efficiency curves
def efficiency_curve_names(self): return list(self._efficiency_curves)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def curve_name_list(self):\n return list(self._curve_reg.keys())", "def pump_curve_names(self):\n return list(self._pump_curves)", "def headloss_curve_names(self):\n return list(self._headloss_curves)", "def curves(self):\n return self._curve_reg", "def _curveNamesToList(setting...
[ "0.7176187", "0.69882613", "0.67914665", "0.65645057", "0.6549786", "0.64903426", "0.6471656", "0.6310284", "0.60815775", "0.5918206", "0.58251923", "0.57553005", "0.5725963", "0.56404936", "0.5589268", "0.55174005", "0.55129546", "0.5444234", "0.54081243", "0.5403793", "0.53...
0.8754546
0
Generator to get all headloss curves Yields
def headloss_curves(self): for key in self._headloss_curves: yield key, self._data[key]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def headloss_curve_names(self):\n return list(self._headloss_curves)", "def train_step_generators(self, X):\n self.generator.zero_grad()\n self.encoder.zero_grad()\n\n Z = self.noise_fn(self.batch_size)\n\n X_hat = self.generator(Z)\n Z_hat = self.encoder(X)\n X_t...
[ "0.653499", "0.58579487", "0.5785109", "0.5771209", "0.5686856", "0.56332576", "0.5609146", "0.5551279", "0.5526352", "0.5490106", "0.54891896", "0.54797685", "0.5459814", "0.54216856", "0.5384982", "0.5376042", "0.5357695", "0.5339628", "0.53098184", "0.53075767", "0.5277881...
0.8314999
0
List of names of all headloss curves
def headloss_curve_names(self): return list(self._headloss_curves)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def headloss_curves(self):\n for key in self._headloss_curves:\n yield key, self._data[key]", "def curve_name_list(self):\n return list(self._curve_reg.keys())", "def pump_curve_names(self):\n return list(self._pump_curves)", "def efficiency_curve_names(self):\n return ...
[ "0.6845803", "0.66282517", "0.66168493", "0.6473944", "0.64283067", "0.63984525", "0.6389227", "0.6074509", "0.60124904", "0.5980222", "0.58355063", "0.58134836", "0.5809034", "0.5795786", "0.5734508", "0.5719799", "0.5690162", "0.5683712", "0.5629307", "0.5604088", "0.560026...
0.8896076
0
Generator to get all volume curves Yields
def volume_curves(self): for key in self._volume_curves: yield key, self._data[key]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iterCurves(self):\n for c in range(self.length()):\n yield self.curve(c)", "def pump_curves(self):\n for key in self._pump_curves:\n yield key, self._data[key]", "def get_volume_batch_generators(self):\n # volgeninfo = []\n def create_volgen(shape, w, paddi...
[ "0.7373252", "0.69593436", "0.6485614", "0.6443177", "0.61216885", "0.5960025", "0.5958581", "0.59274405", "0.58617693", "0.5826482", "0.5809247", "0.58030605", "0.57921374", "0.5754389", "0.5730487", "0.57225156", "0.56956106", "0.56815445", "0.5673956", "0.5630475", "0.5621...
0.8090784
0
List of names of all volume curves
def volume_curve_names(self): return list(self._volume_curves)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pump_curve_names(self):\n return list(self._pump_curves)", "def curve_name_list(self):\n return list(self._curve_reg.keys())", "def efficiency_curve_names(self):\n return list(self._efficiency_curves)", "def volume_curves(self):\n for key in self._volume_curves:\n y...
[ "0.7351649", "0.7243365", "0.70367044", "0.6640773", "0.6593199", "0.65358555", "0.62840873", "0.6125034", "0.6002183", "0.5953892", "0.5941448", "0.5912211", "0.5876153", "0.5815371", "0.5799234", "0.579767", "0.57827914", "0.5756231", "0.5700889", "0.56664133", "0.5654718",...
0.8836443
0
Returns a generator to iterate over all nodes of a specific node type. If no node type is specified, the generator iterates over all nodes.
def __call__(self, node_type=None): if node_type==None: for node_name, node in self._data.items(): yield node_name, node elif node_type==Junction: for node_name in self._junctions: yield node_name, self._data[node_name] elif node_type==Tank...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodes_iter(self) -> Generator:\n for n in self.graph.nodes(data=True):\n yield n", "def node_gen(self):\n for n in self.child_list:\n yield from n.node_gen\n yield self", "def get_nodes_by_type(self, node_type=None):\n target_nodes = []\n if node_typ...
[ "0.6656627", "0.6592198", "0.64690566", "0.6432494", "0.6153438", "0.6133566", "0.60828686", "0.6074038", "0.60599685", "0.6046766", "0.60308146", "0.5862091", "0.58604354", "0.5841883", "0.58378714", "0.5809017", "0.57915753", "0.5784165", "0.5725038", "0.5722978", "0.570692...
0.7499164
0
Adds a tank to the water network model.
def add_tank(self, name, elevation=0.0, init_level=3.048, min_level=0.0, max_level=6.096, diameter=15.24, min_vol=0.0, vol_curve=None, overflow=False, coordinates=None): assert isinstance(name, str) and len(name) < 32 and name.find(' ') == -1, "name must be a ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_tank(self, name, elevation=0.0, init_level=3.048,\n min_level=0.0, max_level=6.096, diameter=15.24,\n min_vol=0.0, vol_curve=None, overflow=False, coordinates=None):\n self._node_reg.add_tank(name, elevation, init_level, min_level, \n ma...
[ "0.63137543", "0.55525565", "0.5492671", "0.5472554", "0.5433488", "0.53404385", "0.5299355", "0.5268483", "0.5242195", "0.5218148", "0.51868045", "0.5135821", "0.51356757", "0.51308405", "0.511713", "0.5112451", "0.5082069", "0.5050836", "0.50369924", "0.5035343", "0.5015549...
0.59282255
1
List of names of all junctions
def junction_names(self): return self._junctions
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def junction_name_list(self):\n return list(self._node_reg.junction_names)", "def junctions(self):\n return self._node_reg.junctions", "def junctions(self):\n for node_name in self._junctions:\n yield node_name, self._data[node_name]", "def junction_char(self):\n ...", ...
[ "0.85728174", "0.77329415", "0.7549278", "0.6560675", "0.62946075", "0.6288291", "0.62225926", "0.61713374", "0.6107669", "0.61055756", "0.6003041", "0.6001774", "0.5998919", "0.5970804", "0.59657425", "0.594276", "0.59211296", "0.58707106", "0.58707106", "0.5866867", "0.5866...
0.85988754
0
Generator to get all junctions Yields
def junctions(self): for node_name in self._junctions: yield node_name, self._data[node_name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def junctions(self):\n return self._node_reg.junctions", "def iteredges(self):\n for source, targets in self.successors.items():\n for target in targets:\n yield source, target", "def __iter__(self):\n leaf_paths, leaf_vals = self._find_combinatorial_leaves()\n ...
[ "0.695294", "0.6529823", "0.6474808", "0.60850096", "0.6082278", "0.5956198", "0.5954295", "0.5935453", "0.5934156", "0.5906857", "0.5890785", "0.588711", "0.5857223", "0.58099526", "0.58058184", "0.57999444", "0.5799198", "0.5794269", "0.5787864", "0.5780796", "0.5733086", ...
0.8599879
0
Generator to get all tanks Yields
def tanks(self): for node_name in self._tanks: yield node_name, self._data[node_name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sequence(self):\n for tn in self._testnodes:\n yield tn", "def __iter__(self):\n for benchclass in sorted(self.classes.values()):\n yield benchclass", "def tanks(self):\n return self._node_reg.tanks", "def __iter__(self):\n for benchinst in sorted(self.in...
[ "0.6375296", "0.6296786", "0.6217762", "0.5907048", "0.5903566", "0.5794458", "0.5770278", "0.5761144", "0.5734883", "0.5724717", "0.57015395", "0.5697612", "0.567935", "0.5654618", "0.5636768", "0.56305444", "0.56232035", "0.56223494", "0.56080455", "0.5574875", "0.55670696"...
0.79621655
0
Generator to get all reservoirs Yields
def reservoirs(self): for node_name in self._reservoirs: yield node_name, self._data[node_name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generators(self):\n return self.free_group.generators", "def __iter__(self):\n yield from self.gen", "def iterator(self):\n yield", "def sequences(self):\n # i am one\n yield self\n # nothing further\n return", "def iter_sequence(self):\n for res...
[ "0.6724822", "0.65291315", "0.6520068", "0.64708203", "0.64076495", "0.6373286", "0.6365344", "0.619911", "0.6189909", "0.6157703", "0.614191", "0.6108884", "0.610793", "0.60956895", "0.6089938", "0.60685253", "0.60475975", "0.603563", "0.6025875", "0.60146135", "0.6003946", ...
0.73494977
0