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 |
|---|---|---|---|---|---|---|
Formats this date using calendar form, for example 19690720 basic True/False, selects basic form, e.g., 19690720. Default is False truncation | def GetCalendarString(self, basic=False, truncation=NoTruncation):
if self.day is None:
if self.month is None:
if self.week:
raise DateTimeError(
"can't get calendar string with week precision")
if self.year is None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_date(self, data):\r\n if self.datetime_formatting == 'rfc-2822':\r\n return format_date(data)\r\n\r\n return data.isoformat()",
"def __formatDate(self, num):\n if len(num) < 2:\n num = '0'+num\n return num",
"def _format_date(input_date, day_flag, se... | [
"0.60311157",
"0.58007",
"0.56647265",
"0.56438917",
"0.5642807",
"0.56053597",
"0.54343116",
"0.5422428",
"0.5410306",
"0.54023105",
"0.5395332",
"0.53769016",
"0.53595513",
"0.5357019",
"0.53193927",
"0.52996176",
"0.52881414",
"0.5263601",
"0.5241613",
"0.52337486",
"0.522... | 0.6552211 | 0 |
Formats this date using ordinal form, for example 1969201 basic True/False, selects basic form, e.g., 1969201.Default is False truncation | def GetOrdinalString(self, basic=False, truncation=NoTruncation):
century, year, ordinalDay = self.GetOrdinalDay()
if ordinalDay is None:
# same as for calendar strings
return self.GetCalendarString(basic, truncation)
else:
if truncation == NoTruncation:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __formatDate(self, num):\n if len(num) < 2:\n num = '0'+num\n return num",
"def GetOrdinalString(\n self,\n basic=0,\n truncation=0,\n ndp=0,\n zonePrecision=Precision.Complete,\n dp=\",\",\n tDesignator=\"T... | [
"0.6289403",
"0.57984483",
"0.5790359",
"0.5771288",
"0.5765667",
"0.5698245",
"0.56042475",
"0.5602178",
"0.5583595",
"0.5578616",
"0.557785",
"0.5573462",
"0.55716103",
"0.5546931",
"0.5524471",
"0.5520423",
"0.5482463",
"0.54753685",
"0.54540724",
"0.54462266",
"0.54154456... | 0.6125912 | 1 |
Formats this date using week form, for example 1969W297 basic True/False, selects basic form, e.g., 1969W297. Default is False truncation | def GetWeekString(self, basic=False, truncation=NoTruncation):
century, decade, year, week, day = self.GetWeekDay()
if day is None:
if week is None:
# same as the calendar string
return self.GetCalendarString(basic, truncation)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def date_to_week(y, m, d):\r\n return datetime.datetime(y, m, d).strftime(r'%YW%W')",
"def date_week_of_year(date, *, sunday_is_first_day_of_week: bool = False):\n if sunday_is_first_day_of_week:\n return date.strftime(\"%U\")\n else:\n return date.strftime(\"%V\")",
"def date_with_day_o... | [
"0.64124775",
"0.6225047",
"0.5945458",
"0.5922567",
"0.5873666",
"0.5869508",
"0.58374524",
"0.5801019",
"0.5774269",
"0.57505846",
"0.5708486",
"0.56964016",
"0.5655071",
"0.56362695",
"0.55953693",
"0.557234",
"0.55412495",
"0.55311793",
"0.5479055",
"0.54724705",
"0.54558... | 0.6724056 | 0 |
LeapYear returns True if this date is (in) a leap year and False otherwise. Note that leap years fall on all years that divide by 4 except those that divide by 100 but including those that divide by 400. | def LeapYear(self):
if self.year is None:
raise DateTimeError(
"Insufficient precision for leap year calculation")
if self.year % 4: # doesn't divide by 4
return False
elif self.year: # doesn't divide by 100
return True
elif self.ce... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isLeapYear(self):\n return (self._year % 4 == 0 and\n (self._year % 100 != 0 or self._year % 400 == 0))",
"def is_leap_year(self):\n if self.year % 400 == 0:\n return True\n elif self.year % 100 == 0:\n return False\n elif self.year % 4 == 0:\n... | [
"0.8488528",
"0.8269582",
"0.8269582",
"0.8265238",
"0.8233334",
"0.81821555",
"0.811367",
"0.80953074",
"0.8048502",
"0.80156183",
"0.80101466",
"0.7984513",
"0.7975971",
"0.7968858",
"0.7950488",
"0.79429245",
"0.79221284",
"0.792168",
"0.7919215",
"0.7919154",
"0.7884527",... | 0.8329149 | 1 |
Returns a tuple of (hour,minute,second,zone direction,zone offset) as defined in GetTime and GetZone. | def GetTimeAndZone(self):
return self.hour, self.minute, self.second, self.zDirection, self.zOffset | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def utctimetuple(self):\n offset = self.utcoffset()\n if offset:\n self -= offset\n y, m, d = self.year, self.month, self.day\n hh, mm, ss = self.hour, self.minute, self.second\n return _build_struct_time(y, m, d, hh, mm, ss, 0)",
"def GetTime(self):\n return ... | [
"0.65421635",
"0.65087676",
"0.6242266",
"0.61258656",
"0.58964926",
"0.5847104",
"0.58026797",
"0.5802542",
"0.57943493",
"0.57925767",
"0.5730232",
"0.5720724",
"0.5711272",
"0.57005984",
"0.56693137",
"0.561445",
"0.56028926",
"0.55888134",
"0.55880094",
"0.55877244",
"0.5... | 0.8203086 | 0 |
UpdateStructTime changes the hour, minute, second and isdst fields of t, a struct_time, to match the values in this time. isdst is always set to 1 | def UpdateStructTime(self, t):
if not self.Complete():
raise DateTimeError("UpdateStructTime requires a complete time")
t[3] = self.hour
t[4] = self.minute
t[5] = self.second
t[8] = -1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpdateStructTime(self, t):\n self.date.UpdateStructTime(t)\n self.time.UpdateStructTime(t)",
"def UpdateStructTime(self, t):\n if not self.Complete():\n raise DateTimeError(\"UpdateStructTime requires complete date\")\n t[0] = self.century * 100 + self.year\n t[1... | [
"0.80075157",
"0.6960625",
"0.52754",
"0.5093788",
"0.5083209",
"0.50688696",
"0.505344",
"0.50233996",
"0.4956732",
"0.4941154",
"0.49334556",
"0.49287647",
"0.4906301",
"0.4906301",
"0.48946878",
"0.48796442",
"0.48642966",
"0.47915608",
"0.47877473",
"0.4778558",
"0.476136... | 0.77810526 | 1 |
Time can hold partially specified times, we deal with comparisons in a similar way to Date.__cmp__ in that times must have the same precision to be comparable. Although this behaviour is consistent it might seem strange at first as it | def __cmp__(self, other):
if not isinstance(other, Time):
raise TypeError
if self.GetPrecision() != other.GetPrecision():
raise ValueError(
"Incompatible precision for comparison: " + str(other))
zDir = self.GetZoneOffset()
otherZDir = other.GetZon... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _matchTime(self, time: float):\n return self._comparator['Time'] < time",
"def check_time():\n times = get_times()\n time_difference = abs((times['local'] - times['target']).total_seconds())\n return time_difference < post_time_tol_seconds",
"def test_general_subset_invalid_time():\n pas... | [
"0.7218274",
"0.6513318",
"0.6404388",
"0.6403199",
"0.63935935",
"0.63328564",
"0.6318335",
"0.62957954",
"0.62863904",
"0.627176",
"0.6242979",
"0.6178251",
"0.6178251",
"0.6159284",
"0.61410797",
"0.61352104",
"0.6111098",
"0.6096023",
"0.6093109",
"0.60737616",
"0.6073266... | 0.67124844 | 1 |
UpdateStructTime changes the year, month, date, hour, minute and second fields of t, a struct_time, to match the values in this date. | def UpdateStructTime(self, t):
self.date.UpdateStructTime(t)
self.time.UpdateStructTime(t) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UpdateStructTime(self, t):\n if not self.Complete():\n raise DateTimeError(\"UpdateStructTime requires a complete time\")\n t[3] = self.hour\n t[4] = self.minute\n t[5] = self.second\n t[8] = -1",
"def UpdateStructTime(self, t):\n if not self.Complete():\n... | [
"0.8136957",
"0.7983699",
"0.5842707",
"0.5501244",
"0.5400125",
"0.5110482",
"0.5087801",
"0.50174713",
"0.5017022",
"0.50135535",
"0.49094248",
"0.49081317",
"0.48958427",
"0.4876365",
"0.48754254",
"0.48754254",
"0.4823265",
"0.4822224",
"0.48168054",
"0.4796931",
"0.47922... | 0.888156 | 0 |
Constructs a TimePoint from a string representation. Truncated forms are parsed with reference to base. | def from_str(cls, src, base=None, tDesignators="T"):
if type(src) in StringTypes:
p = ISO8601Parser(src)
tp, f = p.ParseTimePointFormat(base, tDesignators)
return tp
else:
raise TypeError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_str(cls, timestamp_str):\n units = timestamp_str.split(\":\")\n seconds_ms = units[-1].split(\".\")\n hours = int(units[0])\n minutes = int(units[1])\n seconds = int(seconds_ms[0])\n milliseconds = int(seconds_ms[1])\n return cls(hours, minutes, seconds, mi... | [
"0.6324874",
"0.605796",
"0.5917742",
"0.5796603",
"0.5753408",
"0.57105887",
"0.56728697",
"0.5617218",
"0.5584315",
"0.5575762",
"0.5562696",
"0.5560282",
"0.55567455",
"0.5513849",
"0.54915214",
"0.54298156",
"0.540465",
"0.5389208",
"0.53866446",
"0.53139895",
"0.53127724... | 0.7465002 | 0 |
Formats this TimePoint using ordinal form, for example 1969201T201740 basic True/False, selects basic form, e.g., 1969201T201740. Default is False truncation | def GetOrdinalString(
self,
basic=0,
truncation=0,
ndp=0,
zonePrecision=Precision.Complete,
dp=",",
tDesignator="T"):
return self.date.GetOrdinalString(basic, truncation) + tDesignator +\
self.time.GetString(basic, N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_data_value(self, value):\n if isinstance(value, bool):\n value = \"true\" if value else \"false\"\n elif isinstance(value, datetime.datetime):\n value = value.strftime(\"%Y-%m-%dT%H:%M:%S\")\n return \"%s\" % value",
"def only_ordinal(number):\n _ordin... | [
"0.5434197",
"0.5268163",
"0.51410455",
"0.50320715",
"0.50300586",
"0.50202215",
"0.4939225",
"0.49258694",
"0.49249548",
"0.4912397",
"0.48663875",
"0.48466504",
"0.48272082",
"0.48239732",
"0.48088363",
"0.4807816",
"0.47984192",
"0.47326642",
"0.47113737",
"0.47053987",
"... | 0.60907304 | 0 |
Constructs a TimePoint from unixTime, the number of seconds since the time origin.The resulting time is in UTC. This method uses python's gmtime(0) to obtain the Unix origin time. | def FromUnixTime(cls, unixTime):
utcTuple = pytime.gmtime(0)
t, overflow = Time.FromStructTime(utcTuple).Offset(seconds=unixTime)
d = Date.FromStructTime(utcTuple).Offset(days=overflow)
return cls(date=d, time=t.WithZone(zDirection=0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_unixtime(self):\n if not self.Complete():\n raise DateTimeError(\"get_unixtime requires complete timepoint\")\n zoffset = self.time.GetZoneOffset()\n if zoffset is None:\n raise DateTimeError(\"get_unixtime requires timezone\")\n elif zoffset == 0:\n ... | [
"0.67560035",
"0.6652053",
"0.66441214",
"0.6569114",
"0.6303727",
"0.6195301",
"0.6144796",
"0.6135113",
"0.60965097",
"0.60522974",
"0.6036487",
"0.6026946",
"0.5911802",
"0.5905643",
"0.58966154",
"0.5851556",
"0.58437127",
"0.57818604",
"0.57163656",
"0.57139033",
"0.5700... | 0.706338 | 0 |
Returns a unix time value representing this time point. | def get_unixtime(self):
if not self.Complete():
raise DateTimeError("get_unixtime requires complete timepoint")
zoffset = self.time.GetZoneOffset()
if zoffset is None:
raise DateTimeError("get_unixtime requires timezone")
elif zoffset == 0:
zt = self
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unixtime(self):\n return time.mktime(\n (self.year or 0, self.month or 0, self.day or 0, self.hour or 0, self.minute or 0, self.second or 0,\n self.dow or 0, self.doy or 0)\n )",
"def getUnixTimeStamp():\n return calendar.timegm(datetime.utcnow().utctimetuple())",
"d... | [
"0.79627705",
"0.7222582",
"0.72103274",
"0.7181688",
"0.71629786",
"0.7128564",
"0.7111882",
"0.71087086",
"0.70909053",
"0.70893455",
"0.6969811",
"0.6939169",
"0.69360566",
"0.68968153",
"0.68921065",
"0.6858193",
"0.68465495",
"0.68135035",
"0.6807116",
"0.6783193",
"0.67... | 0.76794666 | 1 |
Constructs a TimePoint from the current local date and time. | def FromNow(cls):
t = pytime.time()
localTime = pytime.localtime(t)
return cls.FromStructTime(localTime) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def now(cls):\n return DateTime(*time.localtime())",
"def FromNowUTC(cls):\n t = pytime.time()\n utcTime = pytime.gmtime(t)\n return cls.FromStructTime(utcTime).WithZone(zDirection=0)",
"def now(cls, tz=None):\n t = _time.time()\n return cls.fromtimestamp(t, tz)",
"d... | [
"0.6122709",
"0.5958908",
"0.5932133",
"0.5771543",
"0.5771211",
"0.5714865",
"0.568802",
"0.5671255",
"0.56375754",
"0.5602565",
"0.5585798",
"0.55640185",
"0.555307",
"0.5513492",
"0.55076015",
"0.5497981",
"0.5484358",
"0.5479155",
"0.54750097",
"0.54229313",
"0.5403783",
... | 0.6744919 | 0 |
Constructs a TimePoint from the current UTC date and time. | def FromNowUTC(cls):
t = pytime.time()
utcTime = pytime.gmtime(t)
return cls.FromStructTime(utcTime).WithZone(zDirection=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def utcnow(cls):\n t = _time.time()\n return cls.utcfromtimestamp(t)",
"def FromNow(cls):\n t = pytime.time()\n localTime = pytime.localtime(t)\n return cls.FromStructTime(localTime)",
"def utcfromtimestamp(cls, t):\n return cls._fromtimestamp(t, True, None)",
"def n... | [
"0.61733437",
"0.60582864",
"0.60350686",
"0.589435",
"0.583186",
"0.5800294",
"0.57941496",
"0.57737136",
"0.5772167",
"0.5748418",
"0.5730196",
"0.56757534",
"0.56599766",
"0.5637395",
"0.56094176",
"0.56089145",
"0.5587311",
"0.5582854",
"0.55539644",
"0.5523434",
"0.54721... | 0.7068866 | 0 |
Returns a tuple of (value, formatString) or (None,None). formatString is one of "n", "n.n" or "n,n". If allowFraction is False then a fractional format raises an error. | def ParseDurationValue(self, allowFraction=True):
value = self.ParseDIGITRepeat()
if value is None:
return None, None
if self.the_char in ".,":
if not allowFraction:
raise DateTimeError(
"fractional component in duration must have lowes... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frac(num_str, obj_mode=False):\n if obj_mode == False:\n cast_frac = lambda inp: float(Fraction(inp))\n elif obj_mode == True:\n cast_frac = Fraction\n try:\n return cast_frac(num_str)\n except ValueError:\n if num_str == '':\n return cast_frac('0/1')\n ... | [
"0.5516464",
"0.52817243",
"0.5185193",
"0.51794326",
"0.5139217",
"0.50429684",
"0.5020873",
"0.4991828",
"0.4948119",
"0.49453548",
"0.49012697",
"0.48802477",
"0.48762563",
"0.4845734",
"0.48277193",
"0.48180923",
"0.4814494",
"0.4786338",
"0.4773011",
"0.4745563",
"0.4742... | 0.57598084 | 0 |
This function splits camel case into separate words | def camelCaseSplit(text):
matches = re.finditer('.+?(?:(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|$)', text)
return [m.group(0) for m in matches] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def split_uppercase(word):\r\n final_word = ''\r\n for i in word:\r\n final_word += ' %s' % i if i.isupper() else i\r\n\r\n return final_word.strip()",
"def split_capital(phrase):\n format_capital = []\n #words = [phrase]\n #format_capital.append(words[0].isupper())\n \n #words = p... | [
"0.7561148",
"0.74302274",
"0.7386459",
"0.7364253",
"0.7306393",
"0.70641774",
"0.70035785",
"0.69703233",
"0.69154686",
"0.69137603",
"0.69135076",
"0.6885954",
"0.6855707",
"0.6846678",
"0.68344367",
"0.68254817",
"0.68216276",
"0.67984384",
"0.679571",
"0.6779888",
"0.677... | 0.74493116 | 1 |
List models in a project. | def list(self, project_id):
endpoint = "/project/{}/model".format(project_id)
return self._get(endpoint, _ModelSchema(many=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def models_list(request):\n projects = Project.objects.filter(models=1)\n return render(request, 'screenshower/app/models_list.html', {'projects': projects})",
"def ListModels(self, request, context):\n context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)",
"def list(self, *args, **kwargs):\n ... | [
"0.79152936",
"0.7396299",
"0.71830803",
"0.6951597",
"0.6945092",
"0.6849994",
"0.67448294",
"0.6668643",
"0.6567901",
"0.6498854",
"0.64851725",
"0.6481699",
"0.64800274",
"0.6413323",
"0.64063305",
"0.63729674",
"0.63483864",
"0.6324699",
"0.6307377",
"0.62619567",
"0.6261... | 0.7942028 | 0 |
List the versions of a model in the registry. | def list_versions(self, project_id, model_id):
endpoint = "/project/{}/model/{}/version".format(project_id, model_id)
return self._get(endpoint, _ModelVersionSchema(many=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def do_list_versions(**kwargs):\n mle = MLEngineHook()\n model_name = kwargs['dag_run'].conf.get('model_name')\n model_versions = mle.list_versions(PROJECT, model_name)\n kwargs['ti'].xcom_push(key='model_versions', value=model_versions)",
"def ListVersions(self, request, context):\n context.cod... | [
"0.7476473",
"0.6968806",
"0.6945814",
"0.6910091",
"0.68492013",
"0.67806196",
"0.6705519",
"0.66787547",
"0.66321546",
"0.6515155",
"0.65119636",
"0.6478975",
"0.6458911",
"0.6431183",
"0.6391382",
"0.63797146",
"0.62804574",
"0.61845875",
"0.6180273",
"0.6165664",
"0.61535... | 0.7576148 | 0 |
Simple CLI for a NUmber Guessing Game (NGG CLI). | def main():
log("NGG CLI", color="green", figlet=True)
log("Welcome to NGG CLI!", "yellow") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ng(l, b, i):\n def c(str):\n b.l_say(str, i)\n\n def p(str):\n b.l_say(str, i, 0)\n\n def help(l, b, i):\n p('%s=== Number Game Help Guide ===' % ORANGE)\n p('\\tTo start a new game, use %s.ng new%s. You will then be ' % (CYAN, RESET))\n p('\\tgiven an interval, ever... | [
"0.6939428",
"0.6246258",
"0.60306823",
"0.60306823",
"0.5827886",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
"0.5826928",
... | 0.637351 | 1 |
test a shift by dx,dy using pan method | def test_pan():
_a = io.load_vec(os.path.join(path, f1))
_c = _a.piv.pan(1.0, -1.0) # note the use of .piv.
assert np.allclose(_c.coords["x"][0], 1.312480)
assert np.allclose(_c.coords["y"][0], -1.31248) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_pan():\n _c = _a.copy()\n _c = _c.piv.pan(1.0, -1.0) # note the use of .piv.\n assert np.allclose(_c.coords[\"x\"][0], 1.312480)\n assert np.allclose(_c.coords[\"y\"][0], -1.31248)",
"def pan(self, dx, dy):\n d = self.getDistance()\n vr = self.getViewRight()\n vr *= dx*... | [
"0.690588",
"0.62539476",
"0.6154423",
"0.60330296",
"0.59153146",
"0.5658531",
"0.5642843",
"0.55909723",
"0.5532715",
"0.5478135",
"0.5469953",
"0.5446774",
"0.5398293",
"0.537031",
"0.53141296",
"0.53141296",
"0.531386",
"0.52334946",
"0.51988685",
"0.5184004",
"0.5176783"... | 0.6563625 | 1 |
tests setting the new dt | def test_set_get_dt():
data = io.create_sample_dataset()
assert data.attrs["dt"] == 1.0
assert data.piv.dt == 1.0
data.piv.set_dt(2.0)
assert data.attrs["dt"] == 2.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dt(self, _):\n raise NotImplementedError(\n \"We do not support setting dt/ time step except during setup\")",
"def test_set_get_dt():\n data = io.create_sample_Dataset()\n assert data.attrs[\"delta_t\"] == 0.0\n\n data.piv.set_delta_t(2.0)\n assert data.attrs[\"delta_t\"] == 2.... | [
"0.7056691",
"0.6960428",
"0.6936673",
"0.6897115",
"0.6577245",
"0.6459469",
"0.64490354",
"0.62812555",
"0.6240081",
"0.6226313",
"0.62065417",
"0.62065417",
"0.61387527",
"0.61046886",
"0.60846764",
"0.59929615",
"0.5981789",
"0.5883374",
"0.5859649",
"0.5851787",
"0.58341... | 0.72287667 | 0 |
tests curl that is also vorticity | def test_curl():
_a = io.load_vec(os.path.join(path, f1))
_a.piv.vec2scal(property="curl")
assert _a.attrs["variables"][-1] == "vorticity" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_curl():\n _c = _a.copy()\n _c.piv.vec2scal(flow_property=\"curl\")\n\n assert _c[\"w\"].attrs[\"standard_name\"] == \"vorticity\"",
"def test_requests():\n resp = requests.get('http://www.google.com')\n return True if resp.status_code == 200 else False",
"def test_urls_work(url):\n w... | [
"0.6593276",
"0.65311223",
"0.6425243",
"0.6285262",
"0.6247957",
"0.6231689",
"0.6167364",
"0.61448026",
"0.61036676",
"0.6090551",
"0.6047839",
"0.6033975",
"0.60323995",
"0.6023737",
"0.6006356",
"0.599038",
"0.59793335",
"0.59708685",
"0.5966935",
"0.5953404",
"0.594355",... | 0.69430053 | 0 |
Test case for christiandoctrines_id_get Get a single ChristianDoctrine by its id | def test_christiandoctrines_id_get(self):
headers = {
'Accept': 'application/json',
}
response = self.client.open(
'/v0.0.1/christiandoctrines/{id}'.format(id='id_example'),
method='GET',
headers=headers)
self.assert200(response,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_solareclipses_id_get(self):\n pass",
"def test_metrostations_id_get(self):\n pass",
"def test_cyclingleagues_id_get(self):\n pass",
"def test_get_id(self):\n\n self.metadata.create_or_update(data=self.create)\n\n # First pick up by name\n res_name = self.met... | [
"0.6760872",
"0.65164095",
"0.645328",
"0.64164436",
"0.63837415",
"0.637381",
"0.6357469",
"0.6348666",
"0.6338639",
"0.6293266",
"0.6275537",
"0.6274834",
"0.6265995",
"0.6264964",
"0.61286145",
"0.6107147",
"0.6094154",
"0.6090681",
"0.6090681",
"0.6090681",
"0.6090681",
... | 0.66512054 | 1 |
Unit test for doublecompress.c Uses Oct2Py to call the octave version double_compressxv.m | def unit_doublecompress(Verbose=False):
from get_configuration import Get_SWIG_Simulation
# Get Simulation Object, including Pointers to C structures
test_config_files = ["source/configfiles/unit_tests/doublecompress_test.json"]
sim = Get_SWIG_Simulation(test_config_files, Verbose)
# Calculate th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def perform_tests():\n print \"\\n****\\nTesting Doublecompress...\\n\"\n dc_pass = unit_doublecompress()\n if (dc_pass):\n result = 'PASS'\n else:\n result = 'FAIL'\n print \">>> \" + result\n\n return dc_pass",
"def test_compress():\n print('Testing compress')\n\n # Cases ... | [
"0.6566176",
"0.60859174",
"0.5888738",
"0.58693385",
"0.57645285",
"0.55487853",
"0.55210376",
"0.5506815",
"0.5506815",
"0.5505801",
"0.54477817",
"0.5363019",
"0.53435475",
"0.53034425",
"0.525868",
"0.52342796",
"0.5219277",
"0.5198363",
"0.5187116",
"0.5185466",
"0.51466... | 0.75801855 | 0 |
Perform all unit tests for doublecompress.c/h and return a PASS/FAIL boolean. | def perform_tests():
print "\n****\nTesting Doublecompress...\n"
dc_pass = unit_doublecompress()
if (dc_pass):
result = 'PASS'
else:
result = 'FAIL'
print ">>> " + result
return dc_pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unit_doublecompress(Verbose=False):\n\n from get_configuration import Get_SWIG_Simulation\n\n # Get Simulation Object, including Pointers to C structures\n test_config_files = [\"source/configfiles/unit_tests/doublecompress_test.json\"]\n sim = Get_SWIG_Simulation(test_config_files, Verbose)\n\n ... | [
"0.6980046",
"0.6719932",
"0.60160774",
"0.5986958",
"0.59624964",
"0.5954615",
"0.59477985",
"0.5935714",
"0.5780253",
"0.5716293",
"0.5647769",
"0.5639771",
"0.5574951",
"0.5552292",
"0.5536779",
"0.5534533",
"0.5488307",
"0.5451174",
"0.5443359",
"0.5421884",
"0.5395015",
... | 0.86720395 | 0 |
Classifies an article above all the tree, which you can see in node structure Gets Node structure, article, diff_coef, which is metioned above Returns a dictionary, which is used rucursively to create categories and subcategories and ... which this article is in | def article_classification_tree(article: str, node=make_node_structure(), diff_coef=.1) -> dict:
if not node.get_children_dict():
return {}
diction = {}
for category in article_classification(article, node, diff_coef):
diction[category] = article_classification_tree(article, node.get_child... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def article_classification(article: str, node: Node, diff_coef=.1) -> list:\n\n x_test = node.get_vectorizer().transform([article])\n y_pred = node.get_model().predict_proba(x_test).reshape(-1)\n\n result = np.array(list(node.get_children_dict()))[y_pred > (y_pred.max() - diff_coef)]\n\n return result"... | [
"0.67828876",
"0.580559",
"0.565238",
"0.5516238",
"0.54888904",
"0.5372797",
"0.5338573",
"0.53100866",
"0.5291282",
"0.5277046",
"0.52112967",
"0.51765364",
"0.5080656",
"0.5072973",
"0.5041243",
"0.50386095",
"0.5009236",
"0.49799195",
"0.4965747",
"0.49480772",
"0.4947016... | 0.8112684 | 0 |
Show all players with id in players.json in alphabetical order or not according to the user choice | def show_players(self) -> None:
players_list = []
for player in PLAYERS:
data_player = ((
str(player.get("first_name")) + " " +
str(player.get("last_name")) + " | " +
str(player.get("birthday")) + " | " +
str(player.get("genre")... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def show_players_specific_tournament(self) -> None:\n id_choice = check.request_id(TOURNAMENTS)\n tournament_data = TOURNAMENTS.get(doc_id=id_choice)\n if tournament_data.get(\"players\") == {}:\n print(\"\\n This tournaments has no players yet\")\n else:\n players... | [
"0.75460577",
"0.6925172",
"0.662122",
"0.65018445",
"0.64117795",
"0.62326056",
"0.6039298",
"0.60154843",
"0.595802",
"0.5942938",
"0.59348524",
"0.590942",
"0.58476466",
"0.5783551",
"0.5783031",
"0.57642424",
"0.57592744",
"0.5758528",
"0.56998295",
"0.56920516",
"0.56802... | 0.7615844 | 0 |
Show player of specific tournament | def show_players_specific_tournament(self) -> None:
id_choice = check.request_id(TOURNAMENTS)
tournament_data = TOURNAMENTS.get(doc_id=id_choice)
if tournament_data.get("players") == {}:
print("\n This tournaments has no players yet")
else:
players_list = tourname... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tournament(self):\n pass",
"def display_tournament_player_list(self):\r\n tournament_name = self.input_name(\"nom du tournoi\")\r\n tournament = tournaments_table.get(Query().Nom == tournament_name)\r\n player_list = list()\r\n for rated_player in tournament['Classement']:\... | [
"0.6981447",
"0.6793419",
"0.6784374",
"0.66762227",
"0.6477427",
"0.63487387",
"0.6321924",
"0.63151205",
"0.6281794",
"0.6260333",
"0.6196538",
"0.6196334",
"0.61410666",
"0.6126508",
"0.61263525",
"0.6125865",
"0.60329247",
"0.60239154",
"0.6022243",
"0.6020785",
"0.600545... | 0.8030547 | 0 |
Request 8 id of players saved in players.json and return a list of ids | def create_players_id_dict(self) -> list:
players_id = []
self.show_players()
print("\n" + "Enter id of wanted players : ")
while len(players_id) < 8:
while True:
id_choice = check.request_id(PLAYERS)
if check.check_not_same_value(players_id, i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_players_id(player_number):\n database = TinyDB('db.json')\n players_table = database.table('players')\n # getting the last eight players\n id_list = []\n for i in range(1, player_number + 1):\n # getting player\n data = players_table.all()[-i]\n # Obtaining a user ID\n ... | [
"0.7470742",
"0.6991253",
"0.66275984",
"0.6624603",
"0.641931",
"0.6296722",
"0.628128",
"0.6240206",
"0.6214572",
"0.61729085",
"0.61693573",
"0.615972",
"0.61516213",
"0.6151583",
"0.6128112",
"0.6100686",
"0.6087615",
"0.6070218",
"0.6045414",
"0.60428107",
"0.60382414",
... | 0.76639163 | 0 |
Simply display message if players.json are empty | def display_empty_players_file(self) -> None:
utils.clear_terminal()
print("\nNo players has been created yet") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def do_playerlist():\n\n download = urllib.request.urlopen(server_api2)\n data = json.loads(download.read())\n player_list = []\n try:\n for i in data['players']['sample']:\n player_list.append(i['name'])\n except KeyError:\n if data['on... | [
"0.6356104",
"0.6113162",
"0.59505594",
"0.5881741",
"0.5878967",
"0.584136",
"0.58254135",
"0.57647717",
"0.5733628",
"0.56962866",
"0.56821424",
"0.5673475",
"0.55898994",
"0.5588674",
"0.55653924",
"0.5522144",
"0.550445",
"0.54916596",
"0.54665893",
"0.54539055",
"0.54534... | 0.73496026 | 0 |
inserts a line of text to a file, after each line containing a specific string | def append_after(filename="", search_string="", new_string=""):
with open(filename, 'r') as f:
lines = f.readlines()
with open(filename, 'w') as f:
for line in lines:
if search_string in line:
f.write(line)
f.write(new_string)
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def append_after(filename=\"\", search_string=\"\", new_string=\"\"):\n with open(filename, \"r+\") as txt_file:\n lines = []\n for line in txt_file:\n lines.append(line)\n if search_string in line:\n lines.append(new_string)\n with open(filename, \"w+\"... | [
"0.73460144",
"0.73188967",
"0.7307326",
"0.7201569",
"0.7142726",
"0.7142327",
"0.6799034",
"0.67887074",
"0.6714846",
"0.6573208",
"0.65569973",
"0.6455345",
"0.64003253",
"0.6389518",
"0.6370676",
"0.63586074",
"0.627488",
"0.6209781",
"0.61661446",
"0.6145634",
"0.6102443... | 0.7350903 | 0 |
Uses UNCLE to build the number of each nbody clusters specified in the settings.in file. | def buildClusters(self):
oldLatFile = 'needed_files/lat.in'
oldFile = open(oldLatFile, 'r')
oldLines = [line for line in oldFile]
oldFile.close()
newFile = open('enum/lat.in','w')
for i in xrange(len(oldLines)):
if 'Number pairs' in oldLines[i-1] and ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_nb_clusters(self):\n \n print(\"Finding the optimal number of clusters...\")\n \n sample = ro.r.matrix(self.df[self.df[\"filename\"].between(1, 4)][\"active_power\"].to_numpy())\n \n r=ro.r(\"\"\"\n check = function(matrix) {\n n_clust = fviz... | [
"0.6166934",
"0.6090059",
"0.60112536",
"0.5973559",
"0.59174323",
"0.5835875",
"0.58161783",
"0.5799246",
"0.57445395",
"0.5734813",
"0.5667729",
"0.5656728",
"0.56186646",
"0.56018144",
"0.5588197",
"0.55617344",
"0.5551129",
"0.5544107",
"0.5538375",
"0.5520006",
"0.551551... | 0.60994977 | 1 |
If startMethod is not the same for each atomChooses a list of i.i.d. structures from struct_enum.out for each different metal atom, The UNCLE option that we run to choose the training structures should look for a file called 'past_structs.dat' so as not to choose structures from that list. (Dr. Hess added that option i... | def chooseTrainingStructures(self,iteration, startMethod,nNew,ntot):
lastDir = os.getcwd()
natoms = len(self.atoms)
iidStructs = [[]]*natoms
if (iteration == 1 and startMethod == 'empty folders') or natoms == 1: #initialize training_set_structures in enumpast/. Compute iid struc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def enumerate(self):\n if not os.path.isdir('enum'): subprocess.call(['mkdir','enum'])\n infile = open('needed_files/struct_enum.in','r')\n inlines = []\n for line in infile:\n inlines.append(line)\n infile.close()\n \n structFile = open('enum/struct_enum... | [
"0.58579195",
"0.569111",
"0.5684001",
"0.5625636",
"0.5491703",
"0.5471267",
"0.5419827",
"0.5221259",
"0.5216647",
"0.51783824",
"0.5170403",
"0.5136936",
"0.5105469",
"0.5097625",
"0.5095089",
"0.50907356",
"0.5079668",
"0.50673115",
"0.50583243",
"0.5052894",
"0.50310284"... | 0.7737415 | 0 |
Gets total number of structures in enumeration | def getNtot(self,dir):
return int(readfile(dir + '/struct_enum.out')[-1].split()[0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def count(self):\n return len([i for i in self.iteritems()])",
"def __len__(self):\n return len(self._enums)",
"def count(self):\n return self.size()",
"def size(self):\n\t\treturn self._count",
"def size(self):\n ret = 0\n for ii in self.__data:\n ret += int(ii.get_size())\... | [
"0.6824703",
"0.6796373",
"0.6704745",
"0.6684227",
"0.66267043",
"0.6545837",
"0.65361506",
"0.6515884",
"0.6438335",
"0.64224446",
"0.6421904",
"0.64189386",
"0.6402237",
"0.6392048",
"0.6386996",
"0.63749266",
"0.6371249",
"0.63576716",
"0.63453263",
"0.6344213",
"0.629245... | 0.7235647 | 0 |
Creates a directory for each atom in the atom list specified in settings.in. All the VASP and UNCLE files for the atom will be placed in this directory. | def makeAtomDirectories(self):
for atom in self.atoms:
atomDir = os.getcwd() + '/' + atom
if not os.path.isdir(atomDir):
subprocess.call(['mkdir',atomDir]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_directory():\r\n\r\n # Create directory for all lyrics\r\n try:\r\n os.mkdir(markovDir)\r\n except FileExistsError:\r\n pass",
"def CreateDirs(self):\n# First, create a list of directories.\n dnames = []\n tags = ['', '_m', '_mf']\n for entry in self.i... | [
"0.6082272",
"0.606713",
"0.599873",
"0.5985384",
"0.5974638",
"0.59574753",
"0.59574753",
"0.5939133",
"0.5914958",
"0.5829736",
"0.58179426",
"0.5801176",
"0.5781476",
"0.57666725",
"0.576396",
"0.57573605",
"0.57452446",
"0.56806016",
"0.5641607",
"0.56265324",
"0.56227124... | 0.79111665 | 0 |
Propagate an event down to the base level view. An event first trickles down to the bottom level view, and then bubbles back up the view stack. | def _propagate_event(self, event, window):
if self.active_view is None:
return
self._event_bus.propagate_event(event, self.active_view, window) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def handle_event(self, event):\n self.give_sub_event.handle_event(event)",
"def call(self, event):\n self.root.event_generate(event, when=\"tail\")",
"def call(self, event):\n self.frame.event_generate(event, when=\"tail\")",
"def react_to_event(self):\n raise NotImplementedError(... | [
"0.60731107",
"0.59084016",
"0.5793149",
"0.57658976",
"0.5637927",
"0.5627393",
"0.56154233",
"0.55550563",
"0.55541426",
"0.552596",
"0.55187017",
"0.550784",
"0.54867345",
"0.54576814",
"0.544562",
"0.5444484",
"0.544216",
"0.5440826",
"0.540754",
"0.5361798",
"0.53442204"... | 0.7564274 | 0 |
Attach this controller to a window. Once a controller is attached to a window it will block. Events in the | async def attach_to_window(self, window):
try:
while True:
self._poll(window)
window.erase()
self.render(window)
window.update_cursor()
window.refresh()
await asyncio.sleep(0)
except KeyboardInter... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Window(self, w):\r\n\r\n self.window = w\r\n return self",
"def SetWindow(self, w):\r\n\r\n self.window = w",
"def show(self, window):\r\n\r\n return",
"def on_activate(self, caller):\n self.window = GameWindow()\n self.add_window(self.window)",
"def add_window... | [
"0.6167363",
"0.61673355",
"0.6161434",
"0.6100601",
"0.60200405",
"0.58870715",
"0.5881838",
"0.5869799",
"0.5843875",
"0.58101106",
"0.5788466",
"0.5780572",
"0.57512116",
"0.5646469",
"0.5554697",
"0.5553541",
"0.55286634",
"0.55226207",
"0.54758424",
"0.53899294",
"0.5368... | 0.68219286 | 0 |
Sets the new coverage of the test. The physical test file will also be renamed to have the coverage appended to the front. | def set_coverage(self, coverage):
self.coverage = coverage
if os.path.isfile(TESTS_PATH + "/" + self.name):
os.rename(TESTS_PATH + "/" + self.name, TESTS_PATH + "/" \
+ self.app_pkg + "_"+self.timestamp + "_" \
+ str(coverage) + ".sh")
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def coverage():\n print(\"Coverage tests always re-run\")\n with safe_cd(SRC):\n my_env = config_pythonpath()\n # You will need something like this in pytest.ini\n # By default, pytest is VERY restrictive in the file names it will match.\n #\n # [pytest]\n # DJANGO_S... | [
"0.6401834",
"0.61861366",
"0.61683387",
"0.61132556",
"0.59674615",
"0.5901822",
"0.58574665",
"0.5827963",
"0.58016634",
"0.5800805",
"0.5796055",
"0.5757621",
"0.5757477",
"0.5739365",
"0.57314754",
"0.5698605",
"0.56972533",
"0.5687149",
"0.56821626",
"0.5673393",
"0.5663... | 0.81936353 | 0 |
return a list of urls to ps managed by the PSS | def list_ps(cls, pss_url):
pss_url = cls.__get_url(pss_url)
logger.debug("List PS at %s"%pss_url)
pss_dir = saga.advert.directory(pss_url, saga.advert.Create |
saga.advert.CreateParents |
saga.advert.ReadWrite)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_pd(cls, pss_url):\n pds_url = cls.__get_url(pds_url)\n logger.debug(\"List PDS at %s\"%pds_url)\n pds_dir = saga.advert.directory(pds_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.Rea... | [
"0.7140879",
"0.653726",
"0.6411908",
"0.6388741",
"0.63296497",
"0.6311775",
"0.6185315",
"0.6074509",
"0.60267735",
"0.6024672",
"0.5998153",
"0.5941728",
"0.59041774",
"0.58864075",
"0.5875603",
"0.58739895",
"0.58716524",
"0.5864728",
"0.5787926",
"0.5787926",
"0.5770929"... | 0.82921356 | 0 |
return a list of urls to ps managed by the PSS | def list_pd(cls, pss_url):
pds_url = cls.__get_url(pds_url)
logger.debug("List PDS at %s"%pds_url)
pds_dir = saga.advert.directory(pds_url, saga.advert.Create |
saga.advert.CreateParents |
saga.advert.ReadWrite)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_ps(cls, pss_url):\n pss_url = cls.__get_url(pss_url)\n logger.debug(\"List PS at %s\"%pss_url)\n pss_dir = saga.advert.directory(pss_url, saga.advert.Create | \n saga.advert.CreateParents | \n saga.advert.Read... | [
"0.82921326",
"0.653874",
"0.6413279",
"0.6390923",
"0.633152",
"0.63116646",
"0.61851937",
"0.60768485",
"0.6028015",
"0.60264033",
"0.59963876",
"0.59428346",
"0.5906632",
"0.5888624",
"0.5877278",
"0.58748275",
"0.5870361",
"0.5865255",
"0.57893056",
"0.57893056",
"0.57731... | 0.71406835 | 1 |
Calculates new indicator position based on current pitch. | def updateIndicator(self):
newIndicatorX = self.getPosFromPitch(self.listener.pitch)
self.triTip = (newIndicatorX, self.triTip[1])
self.triLeft = (self.triTip[0] - self.width*0.01, self.height*.3)
self.triRight = (self.triTip[0] + self.width*0.01, self.height*.3)
self.indicatorCoords = ( self.triLeft, self... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pitch(self, pitch):\n pass",
"def __calculateOffset(self):\n #if len(self.__XValue) > 0:\n # print(\"GPSBearing: \"+str(round(self.__GPSBearing[-1]))+\", heading: \"+str(round(self.value))+\n # \", x: \"+str(round(self.__XValue[-1]))+\", stdev: \"+str(round(np.std(self... | [
"0.6522374",
"0.62633663",
"0.61403",
"0.60936415",
"0.60467106",
"0.60446906",
"0.60429764",
"0.6034919",
"0.5962873",
"0.5672661",
"0.5647774",
"0.5627969",
"0.5582988",
"0.5535736",
"0.55170625",
"0.5511091",
"0.5506568",
"0.54981196",
"0.54818946",
"0.5465644",
"0.5448044... | 0.64335185 | 1 |
Get screen position of indicator from pitch. | def getPosFromPitch(self, pitch):
# Width of scale:
# self.width - 2*self.margin
# Width of each individual note:
# width of scale / len(Pitch.noteNames)
# Width of each subdivision inside the note:
# width of ind note / self.scaleSubSections
if ( type(self.listener.pitch) == type(None) ):
sel... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pitch(self):\n return self['pitch']",
"def pitch(self):\n return self._pitch",
"def current_probe_position(self):\n\t\t# Obtain encoder feedback and calculate probe position\n\t\tx_position = self.x_mc.current_position() / self.steps_per_cm\n\t\ty_position = self.y_mc.current_position() / sel... | [
"0.64851797",
"0.64164263",
"0.64114904",
"0.6347436",
"0.62937754",
"0.6191977",
"0.6181522",
"0.6140158",
"0.60704404",
"0.6055022",
"0.6024718",
"0.6013377",
"0.5936175",
"0.59327936",
"0.5917486",
"0.5900141",
"0.58691347",
"0.58691347",
"0.58691347",
"0.58618736",
"0.582... | 0.7272576 | 0 |
Calculates new info about current pitch to display. | def updateInfo(self):
if ( self.errorCount == 2 ):
self.pitchText.text = "Unclear microphone input..."
curNote = self.listener.pitch.note
curFreq = self.listener.pitch.freq
self.tuneDelta, self.tuneNeighbor = self.listener.pitch.inTune()
tuneText = "%0.2f Hz off from %s (%0.1f Hz)" % (abs(self.tuneDelta),... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pitch(self, pitch):\n pass",
"def pitch(self):\n return self['pitch']",
"def pitch(self):\n return self._pitch",
"def newPitch(token, pitch, lastPitch):\n pitch.absolute(lastPitch)\n changes.replaceToken(token,\n token.step + ly.pitch.octaveToString(pitch.oct... | [
"0.69431853",
"0.65404475",
"0.63204634",
"0.6193945",
"0.61745614",
"0.60986906",
"0.6051548",
"0.5971109",
"0.5943813",
"0.5887895",
"0.58531415",
"0.5837766",
"0.5800079",
"0.5784507",
"0.56408966",
"0.56292516",
"0.56004333",
"0.55238503",
"0.5481963",
"0.5460267",
"0.545... | 0.70381564 | 0 |
Convert (if necessary) address family name to numeric value. | def NormalizeAddressFamily(self, af):
# ensure address family (af) is valid
if af in self.AF_MAP_BY_NUMBER:
return af
elif af in self.AF_MAP:
# convert AF name to number (e.g. 'inet' becomes 4, 'inet6' becomes 6)
af = self.AF_MAP[af]
else:
raise UnsupportedAFError('Address family... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_number_family(number_str: str, mask: int) -> str:\n number_family = ''\n number_str_len = len(number_str)\n for idx, binary_mask in enumerate(decimal_to_binary(mask, number_str_len)):\n number_family += number_str[idx] if binary_mask == '0' else '*'\n return number_family",
"def addre... | [
"0.59316474",
"0.58998024",
"0.58851534",
"0.5860401",
"0.58235425",
"0.5787867",
"0.5732305",
"0.56197286",
"0.55823547",
"0.55612534",
"0.5500597",
"0.54511064",
"0.5359545",
"0.5355764",
"0.5311285",
"0.53018296",
"0.5243753",
"0.5242974",
"0.5240195",
"0.5229493",
"0.5208... | 0.62958986 | 0 |
Return verified list of appropriate icmptypes. | def NormalizeIcmpTypes(self, icmp_types, protocols, af):
if not icmp_types:
return ['']
# only protocols icmp or icmpv6 can be used with icmp-types
if protocols != ['icmp'] and protocols != ['icmpv6']:
raise UnsupportedFilterError('%s %s' % (
'icmp-types specified for non-icmp protocol... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_check_types():",
"def listVerificationTypes(self):\n return self.get_json('/verificationType')",
"def etypes(self): # -> list[str]:\n ...",
"def getCertificateTypes(self):\n ret = []\n for ct in self.certificateTypes:\n if ct == \"x509\":\n ret.ap... | [
"0.606907",
"0.59195083",
"0.57211316",
"0.56508046",
"0.5586044",
"0.5520569",
"0.5446284",
"0.54309523",
"0.53693205",
"0.523012",
"0.5220658",
"0.5187415",
"0.5184833",
"0.51365936",
"0.5123326",
"0.5120659",
"0.50918657",
"0.5088941",
"0.5084246",
"0.49756548",
"0.4931133... | 0.6916867 | 0 |
Return a term name which is equal or shorter than _TERM_MAX_LENGTH. New term is obtained in two steps. First, if allowed, automatic abbreviation is performed using hardcoded abbreviation table. Second, if allowed, term name is truncated to specified limit. | def FixTermLength(self,
term_name,
abbreviate=False,
truncate=False,
override_max_length=None):
new_term = term_name
if override_max_length is None:
override_max_length = self._TERM_MAX_LENGTH
if abbreviate:
for word... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def abbreviator(max_length):\n \n def abbreviate(text):\n if len(text) <= max_length:\n return text\n else:\n return text[: max_length - 3] + \"...\"\n\n return abbreviate",
"def _truncate_name(orig_str, word_num):\n if not orig_str:\n return orig_str\n tokens = ... | [
"0.69068295",
"0.610185",
"0.59963334",
"0.59946245",
"0.5861028",
"0.57489294",
"0.5744382",
"0.57135934",
"0.5641767",
"0.5536663",
"0.55157727",
"0.55130416",
"0.54997385",
"0.5461334",
"0.54450923",
"0.5429746",
"0.5419327",
"0.5365891",
"0.53508574",
"0.53489125",
"0.533... | 0.7218318 | 0 |
Return a hexadecimal digest of the name object. | def HexDigest(self, name, truncation_length=None):
if truncation_length is None:
truncation_length = 64
name_bytes = name.encode('UTF-8')
return hashlib.sha256(name_bytes).hexdigest()[:truncation_length] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hashname(self):\n return hashlib.md5(self.name.encode('utf-8')).hexdigest()",
"def hexdigest(self):\n return self.hashObject.hexdigest()",
"def hash_cli_name(name):\n from hashlib import blake2b\n return blake2b(name.encode(), digest_size=32).hexdigest()",
"def name_hash(namepart):\n ... | [
"0.76227564",
"0.7453346",
"0.72933936",
"0.71679014",
"0.7166738",
"0.7118155",
"0.6900448",
"0.6831404",
"0.6758074",
"0.6747787",
"0.6685873",
"0.66172093",
"0.66035944",
"0.6568217",
"0.65670246",
"0.65318817",
"0.6527971",
"0.6488435",
"0.6488435",
"0.6488435",
"0.648843... | 0.8001484 | 0 |
Convert a protocol name to a numeric value. | def ProtocolNameToNumber(protocols, proto_to_num, name_to_num_map):
return_proto = []
for protocol in protocols:
if protocol in proto_to_num:
return_proto.append(name_to_num_map[protocol])
else:
return_proto.append(protocol)
return return_proto | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name_to_number(self, name):\r\n try:\r\n return self._numbers[name]\r\n except KeyError:\r\n raise KeyError(\"No field named %s in %r\" % (name, self._numbers.keys()))",
"def decode_network_number(ptype, plen, buf):\n return number.unpack_from(buf, header.size)[0]",
"... | [
"0.6208457",
"0.5929694",
"0.5901976",
"0.58474815",
"0.57029825",
"0.5638023",
"0.55621403",
"0.554133",
"0.55332035",
"0.5522894",
"0.5487925",
"0.54466546",
"0.54262304",
"0.53985983",
"0.5384949",
"0.537553",
"0.5372519",
"0.53687495",
"0.53624064",
"0.53583896",
"0.53525... | 0.6216994 | 0 |
Add repository tagging into the output. | def AddRepositoryTags(prefix='', rid=True, date=True, revision=True,
wrap=False):
tags = []
wrapper = '"' if wrap else ''
# Format print the '$' into the RCS tags in order prevent the tags from
# being interpolated here.
p4_id = '%s%sId:%s%s' % (wrapper, '$', '$', wrapper)
p4_date = '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tagger():",
"def __gitTagList(self):\n self.vcs.gitListTagBranch(self.project.getProjectPath(), True)",
"def tag_repo(deploy_info, location=os.getcwd()):\n\n ensure_dir(location)\n with utils.cd(location):\n cmd = \"\"\"\n /usr/bin/git tag -fa \\\\\n -m 'user {0}' ... | [
"0.64183354",
"0.61213785",
"0.6051812",
"0.5944593",
"0.591629",
"0.578211",
"0.57157874",
"0.5659281",
"0.5655233",
"0.56378603",
"0.5632978",
"0.5630898",
"0.55990887",
"0.55730367",
"0.5563395",
"0.5534452",
"0.55233854",
"0.55143166",
"0.548826",
"0.54208285",
"0.5376026... | 0.6521547 | 0 |
Return a list of occupant types for all huts. This is mainly used for printing information on current status of the hut (whether unoccupied or acquired etc) If the occupant is not `None` the occupant type will be 'enemy' or 'friend'. But if there is no occupant or is already 'acquired' the occupant_type will display th... | def get_occupants(self):
return [x.get_occupant_type() for x in self.huts] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def getEmergencyTypes(self):\n types_list = []\n\n data = await self.director.getItemInfo(self.item_id)\n jsonDictionary = json.loads(data)\n\n if jsonDictionary[0][\"capabilities\"][\"has_fire\"]:\n types_list.append(\"Fire\")\n if jsonDictionary[0][\"capabiliti... | [
"0.6243142",
"0.56909764",
"0.5659106",
"0.56577206",
"0.544552",
"0.5411192",
"0.51990503",
"0.5154871",
"0.51183385",
"0.5096307",
"0.50672597",
"0.50460696",
"0.49878705",
"0.49688363",
"0.49500138",
"0.49298483",
"0.4927684",
"0.49132818",
"0.4906834",
"0.4894242",
"0.488... | 0.82086855 | 0 |
Print the game mission in the console | def show_game_mission(self):
print_bold("Mission:")
print(" 1. Fight with the enemy.")
print(" 2. Bring all the huts in the village under your control")
print("---------------------------------------------------------\n") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def print_mission(self): \n #Download mission from vehicle\n missionlist = self.download_mission()\n \n #Add commands\n for cmd in missionlist:\n commandline=\"%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\t%s\\n\" % (cmd.seq,cmd.current,cmd.frame,cmd.command... | [
"0.8074101",
"0.7802414",
"0.7799927",
"0.6782357",
"0.65915364",
"0.6574719",
"0.6516535",
"0.6389265",
"0.6313511",
"0.6305886",
"0.6258949",
"0.62241596",
"0.6221208",
"0.619874",
"0.61928886",
"0.6130327",
"0.61183006",
"0.61097413",
"0.608984",
"0.60363644",
"0.60332423"... | 0.80750346 | 0 |
Process the user input for choice of hut to enter Returns the hut number to enter based on the user input. This method makes sure that the hut number user has entered is valid. If not, it prompts the user to reenter this information. | def _process_user_choice(self):
verifying_choice = True
idx = 0
print("Current occupants: %s" % self.get_occupants())
while verifying_choice:
user_choice = raw_input("Choose a hut number to enter (1-5): ")
# --------------------------------------------------------... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getHenhouseDisplayMenuChoice ():\r\n while True :\r\n try :\r\n choice = int(input('Select an option: '))\r\n if 0 <= choice <= 2 :\r\n break \r\n else :\r\n print('Please enter a valid option')\r\n except ValueError :\r\n ... | [
"0.64109653",
"0.62263894",
"0.6194485",
"0.6172862",
"0.5975994",
"0.5952109",
"0.5927273",
"0.589624",
"0.5894847",
"0.5838126",
"0.57868975",
"0.5775824",
"0.57646203",
"0.57619727",
"0.57246244",
"0.56762254",
"0.56759924",
"0.56673324",
"0.5646656",
"0.5640004",
"0.56197... | 0.72301716 | 0 |
Randomly occupy the huts with one of, friend, enemy or 'None' | def _occupy_huts(self):
for i in range(5):
choice_lst = ['enemy', 'friend', None]
computer_choice = random.choice(choice_lst)
if computer_choice == 'enemy':
name = 'enemy-' + str(i+1)
self.huts.append(Hut(i+1, OrcRider(name)))
elif ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def occupy_huts():\n huts = []\n occupants = ['enemy', 'friend', 'unoccupied']\n while len(huts) < 5:\n computer_choice = random.choice(occupants)\n huts.append(computer_choice)\n return huts",
"def randomHelmet():\n return random.choice(HELMETS)",
"def get_red():\n # return name... | [
"0.66497874",
"0.6558114",
"0.6469732",
"0.64359075",
"0.6405437",
"0.62771046",
"0.6205605",
"0.6110183",
"0.6102769",
"0.60875654",
"0.60744935",
"0.60478365",
"0.6042598",
"0.60355145",
"0.6011474",
"0.5983928",
"0.5964419",
"0.59475535",
"0.59363985",
"0.5934032",
"0.5933... | 0.69136053 | 0 |
Add a skin path to the current configuration state. If ``discovery`` is enabled, the path will automatically be monitored for changes. The ``indexes`` argument is an optional list of view registrations with the provided names. The ``request_type`` option decides the request type for which to make the registration. | def register_path(config, spec, discovery=False, indexes=[], request_type=None):
package_name, path = resolve_asset_spec(spec)
if package_name is not None:
path = pkg_resources.resource_filename(package_name, path)
else:
path = caller_path(path)
if package_name is None: # absolute file... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_skin( self, target, views, skin_name='Site', skin_path='custom, topic, content, generic, control, Images' ):\n self.skin_name = skin_name\n self.skin_path = skin_path\n\n skins = getToolByName( target, 'portal_skins', None )\n if skins is None:\n return\n\n ski... | [
"0.52020884",
"0.48797432",
"0.47036213",
"0.47002146",
"0.45867845",
"0.45276535",
"0.4520932",
"0.45103517",
"0.447265",
"0.4450312",
"0.44348246",
"0.44156086",
"0.4405821",
"0.43939352",
"0.43877882",
"0.4384183",
"0.43760398",
"0.43514234",
"0.4349834",
"0.43400645",
"0.... | 0.6681504 | 0 |
Loads the Sentiment 140 dataset, with preprocessing Arguments | def load_sentiment_140(data_dir="data", num_words=None, num_rows=None, maxlen=None, test_split=0.2, seed=100,
simple_classifier=False):
if not maxlen:
maxlen = 100
# Load dataset from file
file_dir = data_dir + "/sentiment-140/training.1600000.processed.noemoticon.csv"
s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_train_data(pos_file_name='train_pos_full.csv', neg_file_name='train_neg_full.csv'):\n pos_path = path.join('..', 'data', 'parsed', pos_file_name)\n neg_path = path.join('..', 'data', 'parsed', neg_file_name)\n\n pos_data = pd.read_csv(pos_path, header=None)\n pos_data.columns = ['text']\n p... | [
"0.6553573",
"0.65504044",
"0.6413694",
"0.6387078",
"0.63126004",
"0.62980497",
"0.62966526",
"0.62732714",
"0.6251968",
"0.62356544",
"0.6217227",
"0.6212488",
"0.61900204",
"0.6179025",
"0.61564225",
"0.61428803",
"0.614052",
"0.6135629",
"0.6135321",
"0.6128348",
"0.61275... | 0.7142621 | 0 |
Log into engine as administrator. | def login_as_admin():
users.loginAsUser(
config.VDC_ADMIN_USER, config.VDC_ADMIN_DOMAIN,
config.VDC_PASSWORD, filter=False
)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def login_as_admin(self, username='admin', password='admin'):\n return self.login(**{'username': username, 'password': password})",
"def connectToAdmin():\n connect(url='t3://' + admin_host + ':' + admin_port,\n adminServerName='AdminServer',\n username=admin_username,\n ... | [
"0.7176565",
"0.6739861",
"0.6625097",
"0.6613401",
"0.6605429",
"0.65614206",
"0.65538454",
"0.6474383",
"0.6392441",
"0.63847953",
"0.63789195",
"0.63739824",
"0.636728",
"0.6315065",
"0.6315065",
"0.6308905",
"0.6295946",
"0.629345",
"0.6289722",
"0.62745535",
"0.62532014"... | 0.73660433 | 0 |
Start both motors. `rundirect` command will allow to vary motor performance on the fly by adjusting `duty_cycle_sp` attribute. Doesn't stop until told to stop. Bias determines if there is a bias on one motor to move faster for correction. The bias is simply added to the speed for the current biasDirection | def forward(speed, bias, biasDir):
# todo: check directions for me please
if biasDir == 1:
rightMotor.run_direct(duty_cycle_sp=speed+bias)
leftMotor.run_direct(duty_cycle_sp=speed)
elif biasDir == -1:
rightMotor.run_direct(duty_cycle_sp=speed)
le... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def motor_B(self, direction, speed):\n if direction == 1:\n GPIO.output(self.Motor_B_Pin1, GPIO.HIGH)\n GPIO.output(self.Motor_B_Pin2, GPIO.LOW)\n self.pwm_B.start(100)\n self.pwm_B.ChangeDutyCycle(speed)\n if direction == -1:\n GPIO.output(self.... | [
"0.6224331",
"0.5952258",
"0.590249",
"0.5720424",
"0.5404056",
"0.537829",
"0.5353262",
"0.5336252",
"0.5292444",
"0.52533853",
"0.5243494",
"0.52409536",
"0.52345574",
"0.5230445",
"0.51993316",
"0.5184321",
"0.51791024",
"0.5114285",
"0.5100415",
"0.50611645",
"0.5027267",... | 0.70682174 | 0 |
Verify the output of 'system_platform' function | def test_system_platform():
accepted_values = ['windows', 'linux']
output = sh.system_platform()
assert output in accepted_values | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_os_system(self):\n self.assertEqual(self.settings.OS_SYSTEM, platform.system())",
"def check_platform(target_platform):\n if target_platform == PLATFORM_LINUX:\n pass\n elif target_platform == PLATFORM_WINDOWS:\n # requires wine\n try:\n subprocess.run([\"win... | [
"0.7402488",
"0.73765874",
"0.7269435",
"0.7166334",
"0.706433",
"0.7028891",
"0.6924635",
"0.6917631",
"0.6908076",
"0.67770875",
"0.6775674",
"0.67477757",
"0.672745",
"0.6721273",
"0.6716984",
"0.6715146",
"0.6706232",
"0.6676223",
"0.66573375",
"0.66256523",
"0.66131",
... | 0.84509456 | 0 |
Verify the output of 'format_resource' function | def test_format_resource():
mock_name = "rg-001"
output = sh.format_resource(mock_name)
assert output == "rg-001" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_is_valid_resource():\n mock_name = \"rg-001\"\n output = sh.is_valid_resource(mock_name)\n assert output is True",
"def test_workload_get_command_human_readable(\n workload_get_success, workload_get_success_hr\n):\n hr_output = prepare_workload_get_output(workload_get_success)\n assert... | [
"0.64937514",
"0.6144749",
"0.60763",
"0.6063581",
"0.59908366",
"0.5959676",
"0.59036434",
"0.58681643",
"0.58234644",
"0.58226424",
"0.58003753",
"0.5777817",
"0.5730031",
"0.57299966",
"0.57008356",
"0.56684434",
"0.5653117",
"0.5652297",
"0.5613386",
"0.5596623",
"0.55935... | 0.76800674 | 0 |
Verify the output of 'is_valid_resource' function | def test_is_valid_resource():
mock_name = "rg-001"
output = sh.is_valid_resource(mock_name)
assert output is True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_check_resource(self):\n s1 = System()\n b1 = Books(\"1984\", \"George Orwell\", \"Harvill Secker\", \"1949\", \"0123456789123\")\n self.assertEqual(s1.check_resource(b1), False)\n s1.add_resource(b1)\n self.assertEqual(s1.check_resource(b1), True)",
"def _resource_name... | [
"0.70926225",
"0.6632987",
"0.6630718",
"0.6436435",
"0.6400924",
"0.6346754",
"0.63392484",
"0.6337061",
"0.62401545",
"0.6238799",
"0.6135413",
"0.6118114",
"0.6117826",
"0.60815805",
"0.6058132",
"0.6018527",
"0.6007674",
"0.6001032",
"0.59417886",
"0.5941082",
"0.59347427... | 0.7810775 | 0 |
Verify the output of 'random_password' function | def test_random_password():
output = sh.random_password()
assert isinstance(output, str) is True
assert len(output) == 16 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_check_password():\n assert check_password('Longpassword') == False\n assert check_password('123456') == False\n assert check_password('short') == False\n assert check_password('C0rect') == False\n assert check_password('Correct8') == True",
"def test_generate_secret(self):\n random_sec... | [
"0.74017847",
"0.72623706",
"0.72584105",
"0.7210661",
"0.720449",
"0.71868634",
"0.71583515",
"0.7146903",
"0.70125735",
"0.6999681",
"0.6986031",
"0.69559073",
"0.6949859",
"0.6937893",
"0.693696",
"0.6924991",
"0.6912025",
"0.6911347",
"0.6883031",
"0.6875243",
"0.68527275... | 0.8123155 | 0 |
Verify the output of 'list_differences' function | def test_list_differences():
mock_list_a = ['a', 'b', 'c', 'd', 'e']
mock_list_b = ['a', 'b', 'c']
output = sh.list_differences(mock_list_a, mock_list_b)
assert output == ['d', 'e']
output = sh.list_differences(mock_list_b, mock_list_a)
assert output == [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_check_difference_between_two_lists():\n # same lists, no error\n list1 = list2 = [0, 1, 2]\n util.check_difference_between_two_lists(list1, list2, name=\"same case\")\n\n # diff lists with same unique numbers\n list_1 = [0, 1, 2]\n list_2 = [1, 2, 0]\n with pytest.raises(ValueError) a... | [
"0.73093635",
"0.71023244",
"0.7012757",
"0.6704099",
"0.6681043",
"0.6674949",
"0.66015595",
"0.6591573",
"0.65760916",
"0.6567296",
"0.65616626",
"0.6558527",
"0.6547126",
"0.6513799",
"0.65075797",
"0.64695394",
"0.64616483",
"0.6440873",
"0.63981354",
"0.638816",
"0.63743... | 0.81505835 | 0 |
Verify the output of 'process_id' function | def test_process_id():
output = sh.process_id()
assert isinstance(output, int) and output > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_processid(self):\n self.assertTrue(\n int(self.ospf.parse_state(\n pattern='processid',\n cmd_key='sh_ospf_ints')) == 1, 'OSPF Interface: process ID not found')",
"def check_process(dbcur, process_id):\n sql = \"\"\"select * from process where id = '\"\... | [
"0.74825627",
"0.6971474",
"0.6877758",
"0.6502754",
"0.640636",
"0.6317062",
"0.63126904",
"0.6285647",
"0.62607557",
"0.62258863",
"0.6213967",
"0.61965364",
"0.61815655",
"0.61815655",
"0.61018986",
"0.60734487",
"0.59861445",
"0.5978445",
"0.59657335",
"0.5962974",
"0.593... | 0.81981176 | 0 |
Verify the output of 'process_parent_id' function | def test_process_parent_id():
output = sh.process_parent_id()
assert isinstance(output, int) and output > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_process_id():\n output = sh.process_id()\n assert isinstance(output, int) and output > 0",
"def get_parent_pid(pid):\n\n wmi = win32com.client.GetObject('winmgmts:')\n # noinspection SqlDialectInspection,SqlNoDataSourceInspection\n parent_pids = wmi.ExecQuery(\n 'SELECT ParentProce... | [
"0.69360155",
"0.68315536",
"0.66632384",
"0.65708196",
"0.6495518",
"0.6494205",
"0.6362053",
"0.6315289",
"0.61751837",
"0.6169541",
"0.61215544",
"0.61215544",
"0.60680795",
"0.59970415",
"0.5961881",
"0.5926512",
"0.582809",
"0.5824055",
"0.58003867",
"0.57824874",
"0.576... | 0.8797357 | 0 |
Verify the output of 'current_path' function | def test_current_path():
output = sh.current_path()
assert isinstance(output, str) and len(output) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_path(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"check_path\")",
"def current_dir_ok() :\n\n current_ok = True\n\n current_dir = str(os.environ['PWD'])\n expected_dir = str(os.path.abspath(out_dir))\n\n if not current_dir == expected_dir :\n print \"ERROR current ... | [
"0.67531914",
"0.67101705",
"0.6548491",
"0.63815373",
"0.6233272",
"0.6233272",
"0.62081504",
"0.61196506",
"0.60904706",
"0.6084025",
"0.60738266",
"0.60443056",
"0.6019613",
"0.5900392",
"0.58832717",
"0.58819306",
"0.58666605",
"0.58410656",
"0.58003384",
"0.57874876",
"0... | 0.79191375 | 0 |
Verify the output of 'path_basename' function | def test_path_basename():
mock_path = "E:\\Repos\\pc-setup\\powershell\\provision_python.ps1"
output = sh.path_basename(mock_path)
assert output == "provision_python.ps1" | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def basename(path: str) -> str:\n pass",
"def basename(path):\r\n return split(path)[1]",
"def testBasenamePath(self):\n test_file_path = self._GetTestFilePath(['utmp-linux_libc6'])\n self._SkipIfPathNotExists(test_file_path)\n\n test_helper = dfvfs_helpers.DFVFSFileSystemHelper(None)\n\n path_... | [
"0.75387126",
"0.7183686",
"0.71538955",
"0.7139029",
"0.7134519",
"0.6967882",
"0.674081",
"0.6674592",
"0.64930874",
"0.64804405",
"0.64639074",
"0.64589596",
"0.64555883",
"0.6445215",
"0.63873416",
"0.6379699",
"0.6366947",
"0.6366229",
"0.6353301",
"0.6350111",
"0.633504... | 0.7647868 | 0 |
Craft an AMP response containing as many records as will fit within the size limit. Remaining records are stored as a "continuation", identified by a token that is returned to the client to fetch later via the ContinuationCommand. | def _recordsToResponse(self, records):
fieldsList = []
count = 0
if records:
size = 0
while size < self._maxSize:
try:
record = records.pop()
except (KeyError, IndexError):
# We're done.
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _buffer(self, n=None):\n if self._out_of_scope:\n raise ResultConsumedError(self, _RESULT_OUT_OF_SCOPE_ERROR)\n if self._consumed:\n raise ResultConsumedError(self, _RESULT_CONSUMED_ERROR)\n if n is not None and len(self._record_buffer) >= n:\n return\n ... | [
"0.53557193",
"0.5322775",
"0.5281807",
"0.52735066",
"0.524363",
"0.5193939",
"0.5091012",
"0.49231088",
"0.49192467",
"0.49118719",
"0.49110144",
"0.4897224",
"0.48677567",
"0.48475388",
"0.483681",
"0.482466",
"0.48011813",
"0.47937223",
"0.47919127",
"0.4773665",
"0.47668... | 0.5432548 | 0 |
Craft an AMP response containing as many items as will fit within the size limit. Remaining items are stored as a "continuation", identified by a token that is returned to the client to fetch later via the ContinuationCommand. | def _itemsToResponse(self, items):
itemsToSend = []
count = 0
if items:
size = 0
while size < self._maxSize:
try:
item = items.pop()
except (KeyError, IndexError):
# We're done.
# ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def step_impl(context, size):\n assert len(context.response_json) == int(size)",
"def response_space():",
"def response_chunking(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"response_chunking\")",
"def stream_n_messages(n):\n response = get_dict(\"url\", \"args\", \"headers\", \"orig... | [
"0.5428353",
"0.5276194",
"0.50557584",
"0.50412405",
"0.49756488",
"0.49587438",
"0.49349442",
"0.49303618",
"0.49002728",
"0.4886534",
"0.48853728",
"0.48849902",
"0.487241",
"0.48717028",
"0.48281708",
"0.48274213",
"0.48222074",
"0.48172882",
"0.4801125",
"0.47869977",
"0... | 0.58718246 | 0 |
Turn a record in a dictionary of fields which can be reconstituted within the client | def recordToDict(self, record):
fields = {}
if record is not None:
for field, value in record.fields.iteritems():
# FIXME: need to sort out dealing with enormous groups; we
# can ignore these when sending AMP responses because the
# client wil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def preprocess_record(record):\n automatic_fields = ['created_at', 'modified_at']\n record = serialize_fields(filter_out_dict_keys(record, automatic_fields))\n\n return record",
"def _sanitise_fields(self, record):\n sanitised = {}\n for k, v in record.items():\n new_key = k.rep... | [
"0.75376725",
"0.6702061",
"0.6572023",
"0.65429646",
"0.64269215",
"0.6398658",
"0.6394913",
"0.63934547",
"0.6369725",
"0.6368727",
"0.63439614",
"0.62543195",
"0.62466395",
"0.61455506",
"0.61025786",
"0.6092736",
"0.60618514",
"0.6054564",
"0.6033646",
"0.6030067",
"0.602... | 0.7432842 | 1 |
Coerce the given C{val} to type of C{configDict[key]} | def _coerceOption(self, configDict, key, value):
if key in configDict:
if isinstance(configDict[key], bool):
value = value == "True"
elif isinstance(configDict[key], (int, float, long)):
value = type(configDict[key])(value)
elif isinstance(co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def coerceOption(configDict, key, value):\n if key in configDict:\n if isinstance(configDict[key], bool):\n value = value == \"True\"\n\n elif isinstance(configDict[key], (int, float, long)):\n value = type(configDict[key])(value)\n\n elif isins... | [
"0.6642269",
"0.64682454",
"0.58132166",
"0.5712655",
"0.57071173",
"0.5636776",
"0.5635766",
"0.56199664",
"0.5616287",
"0.5596194",
"0.5555847",
"0.55442125",
"0.5527948",
"0.5423641",
"0.5335233",
"0.5314222",
"0.529805",
"0.5274796",
"0.5247439",
"0.52113086",
"0.52068865... | 0.66664517 | 0 |
Set an option to override a value in the config file. True, False, int, and float options are supported, as well as comma separated lists. Only one option may be given for each option flag, however multiple option flags may be specified. | def opt_option(self, option):
if "=" in option:
path, value = option.split('=')
self._setOverride(
DEFAULT_CONFIG,
path.split('/'),
value,
self.overrides
)
else:
self.opt_option('%s=True' % (... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def opt_option(self, option):\n if \"=\" in option:\n path, value = option.split(\"=\")\n self.setOverride(\n DEFAULT_CONFIG,\n path.split(\"/\"),\n value,\n self.overrides\n )\n else:\n self.opt_o... | [
"0.78451264",
"0.70681787",
"0.6733727",
"0.6711261",
"0.66349",
"0.6577663",
"0.6528208",
"0.64882463",
"0.6443928",
"0.64062303",
"0.63511324",
"0.63351065",
"0.6329237",
"0.6310009",
"0.63006294",
"0.6278292",
"0.6224972",
"0.62127936",
"0.62003744",
"0.6130664",
"0.612441... | 0.7708194 | 1 |
Get all table rows from the first tbody element found in soup parameter | def get_table_rows(soup):
tbody = soup.find('tbody')
return [tr.find_all('td') for tr in tbody.find_all('tr')] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_table_by_id(soup, id):\n # dont include .tbody after the find() for some reason\n html_table = soup.find(id=id)\n if html_table is None:\n return None\n rows = html_table.find_all('tr')[1:]\n return [row.contents for row in rows]",
"def process_table(soup):\n rests = []\n rows... | [
"0.71404964",
"0.7040352",
"0.6871531",
"0.6789087",
"0.64531195",
"0.61592925",
"0.6042625",
"0.60175085",
"0.59792954",
"0.5929166",
"0.5919311",
"0.5864989",
"0.5840617",
"0.58360916",
"0.5779402",
"0.5740975",
"0.5739607",
"0.5673302",
"0.5656826",
"0.56020576",
"0.559752... | 0.7689844 | 0 |
Get the content view area from the kicktipp page. | def get_kicktipp_content(browser: RoboBrowser):
content = browser.find_all(id='kicktipp-content')
if content[0]:
return content[0]
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def current_content(self):\n return self.current_window.content",
"def GetContentWindow(self):\n return self.FindWindow(\"content\")",
"def __call__(self):\n return ILayoutAware(self.context).content",
"def GetPane(self):\r\n \r\n return self.pane",
"def _getContentArea(s... | [
"0.59836257",
"0.59416074",
"0.573304",
"0.5718334",
"0.5627919",
"0.55299896",
"0.55246526",
"0.5503003",
"0.550144",
"0.5439835",
"0.5401629",
"0.5347948",
"0.5335341",
"0.53223467",
"0.532178",
"0.5301802",
"0.5276638",
"0.52707845",
"0.5268684",
"0.52670157",
"0.5233209",... | 0.671086 | 0 |
Place bets on all given communities. | def place_bets(browser: RoboBrowser, communities: list, predictor, override=False, deadline=None, dryrun=False, matchday=None):
for com in communities:
print("Community: {0}".format(com))
matches = parse_match_rows(browser, com, matchday)
submitform = browser.get_form()
for field_hom... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def place_bets(self, market=None, market_bets=None):\n venue = market['event']['venue']\n name = market['marketName']\n if market_bets:\n for strategy_ref, strategy_bets in market_bets.items():\n live_strategy = betbot_db.strategy_repo.is_live(strategy_ref)\n ... | [
"0.61001956",
"0.57336086",
"0.5551799",
"0.55417174",
"0.53878725",
"0.53347605",
"0.52753794",
"0.52518904",
"0.5246189",
"0.5228697",
"0.522792",
"0.51936316",
"0.5184653",
"0.51783067",
"0.5173215",
"0.5148297",
"0.5125859",
"0.5123962",
"0.5123266",
"0.51071364",
"0.5105... | 0.7158739 | 0 |
plot occultation orders for mtp overview page | def makeOverviewPage(orbit_list, mtpConstants, paths, occultationObservationDict, nadirObservationDict):
mtpNumber = mtpConstants["mtpNumber"]
obsTypeNames = {"ingress":"irIngressLow", "egress":"irEgressLow"}
#loop through once to find list of all orders measured
ordersAll = []
for orbit in or... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def order_report():",
"def plot_sorted_accuracies(results):\n ###TODO\n #print(results)\n \n #step 1 -> sort accuracies and get x and y\n # x = setting\n # y = sorted list of accuracies\n #results.sort(key=lambda x:(x['accuracy'])) \n # don't use it ->it will c... | [
"0.6188708",
"0.59705603",
"0.5956688",
"0.59423614",
"0.581761",
"0.5760428",
"0.56943524",
"0.5671908",
"0.5650233",
"0.5555503",
"0.5514867",
"0.540279",
"0.5400018",
"0.53952277",
"0.53590506",
"0.5358435",
"0.53566706",
"0.5345731",
"0.53333133",
"0.5314275",
"0.53101605... | 0.6303185 | 0 |
vscrollbar = Scrollbar(master) vscrollbar.grid(row=0, column=1, sticky=N+S) hscrollbar = Scrollbar(master, orient=HORIZONTAL) hscrollbar.grid(row=1, column=0, sticky=E+W) canvas = Canvas(master, yscrollcommand=vscrollbar.set, xscrollcommand=hscrollbar.set, bg='999999') canvas.grid(row=0, column=0, sticky=N+S+E+W) vscro... | def AppWinFrame(master):
# auto scrolls
vscrollbar = Scrollbar(master)
vscrollbar.pack(side=RIGHT, fill=Y)
canvas = Canvas(master, yscrollcommand=vscrollbar.set, bg='#999999')
frame = Frame(canvas, borderwidth=2, relief=RIDGE, bg="#BFB8FE")
vscrollbar.config(command=canvas.yview)
frame.pack(side=LEFT, fil... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self,master,**kw):\n Frame.__init__(self,master,**kw)\n \n self.canvas=Canvas(self,scrollregion=(0,0,500,500))#,width=300,height=300,scrollregion=(0,0,500,500))\n self.internal_frame=Frame(self.canvas)\n self.hbar=Scrollbar(self,orient=HORIZONTAL)\n self.vbar=... | [
"0.8507373",
"0.7523171",
"0.7226593",
"0.71893096",
"0.7073045",
"0.6998887",
"0.68270934",
"0.6655979",
"0.6654952",
"0.65454537",
"0.6471068",
"0.63823843",
"0.635936",
"0.62776184",
"0.6237337",
"0.6183595",
"0.6153732",
"0.61298877",
"0.6124628",
"0.6080095",
"0.60280615... | 0.82818425 | 1 |
Try to extract data from threshold expression. | def parse_threshold_exp(exp):
# Regex used
number = r"(\d+(?:\.\d*)?)"
color = r"([WwBb])"
half = number + color
full = half + half
re_number = re.compile(r"^"+number+r"$")
re_half = re.compile(r"^"+half+r"$")
re_full = re.compile(r"^"+full+r"$")
# Parsing
if exp == "": # Empty... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def evaluate(self, threshold=0.5):\n pass",
"def _get_pck(self, kp_id, threshold):\n if len(self.data[kp_id]) == 0:\n return None\n\n data = np.array(self.data[kp_id])\n pck = np.mean((data <= threshold).astype('float'))\n return pck",
"def __init__(self, exp):\n ... | [
"0.6275016",
"0.5969183",
"0.5935895",
"0.59351677",
"0.58786726",
"0.58748126",
"0.586746",
"0.5787836",
"0.57735467",
"0.5592178",
"0.55909556",
"0.55786645",
"0.555594",
"0.55175304",
"0.54921883",
"0.5464597",
"0.5463139",
"0.545508",
"0.54243004",
"0.5410539",
"0.5408899... | 0.6682093 | 0 |
Create a Threshold object from an expression. | def __init__(self, exp):
self.min, self.max = parse_threshold_exp(exp)
if self.min == None or self.max == None: # Error occured when parsing
raise Exception("Threshold expression: '{:s}' is invalid.".format(exp)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parse_threshold_exp(exp):\n # Regex used\n number = r\"(\\d+(?:\\.\\d*)?)\"\n color = r\"([WwBb])\"\n half = number + color\n full = half + half\n\n re_number = re.compile(r\"^\"+number+r\"$\")\n re_half = re.compile(r\"^\"+half+r\"$\")\n re_full = re.compile(r\"^\"+full+r\"$\")\n\n ... | [
"0.59799373",
"0.5456655",
"0.50720286",
"0.5037704",
"0.5025464",
"0.49485746",
"0.49417642",
"0.4913881",
"0.49124554",
"0.48948416",
"0.4884498",
"0.48352537",
"0.48344046",
"0.47972414",
"0.47884724",
"0.47574377",
"0.47426808",
"0.47359854",
"0.4734204",
"0.4707607",
"0.... | 0.6444987 | 0 |
Sets the version of this Listing. The version of the listing. | def version(self, version):
self._version = version | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def version(self, version):\n \n self._version = version",
"def version(self, version):\n\n self._version = version",
"def version(self, version):\n\n self._version = version",
"def version(self, version):\n\n self._version = version",
"def version(self, version):\n\n ... | [
"0.7229378",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"0.7204764",
"... | 0.7257909 | 1 |
Gets the tagline of this Listing. The tagline of the listing. | def tagline(self):
return self._tagline | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getLine(self):\n return _libsbml.XMLToken_getLine(self)",
"def get_tag(self):\n return self.tag",
"def getLine(self):\n return _libsbml.SBase_getLine(self)",
"def getLine(self):\n return _libsbml.SBasePlugin_getLine(self)",
"def tag(self):\n return self.tag_",
"def ... | [
"0.67622364",
"0.63997036",
"0.63478005",
"0.6262222",
"0.6098514",
"0.6075437",
"0.605605",
"0.6049765",
"0.60336107",
"0.60215366",
"0.60076064",
"0.59944695",
"0.59792364",
"0.5970892",
"0.5966851",
"0.5966851",
"0.5966851",
"0.5966851",
"0.5802726",
"0.57422805",
"0.57180... | 0.8239116 | 0 |
Sets the tagline of this Listing. The tagline of the listing. | def tagline(self, tagline):
self._tagline = tagline | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_tag(self, tag):\n self.update(tag=tag)",
"def tagline(self):\n return self._tagline",
"def set_tag(self, t) -> None:\n self.tag = t",
"def set_startline(self, line_no):\n self.set_attribute(\"startline\", line_no)",
"def line_style(self, line_style):\n\n self.cont... | [
"0.6100483",
"0.6047296",
"0.5798566",
"0.5764338",
"0.5673966",
"0.5649316",
"0.5629988",
"0.56268173",
"0.56268173",
"0.56268173",
"0.56268173",
"0.56020707",
"0.5582531",
"0.55677855",
"0.55462193",
"0.5512546",
"0.5488909",
"0.54786795",
"0.54657596",
"0.54364645",
"0.543... | 0.816503 | 0 |
Sets the keywords of this Listing. Keywords associated with the listing. | def keywords(self, keywords):
self._keywords = keywords | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def keywords(self, keywords):\n\n self._keywords = keywords",
"def SetupKeywords(self):\n kwlist = u\" \".join(self._keywords)\n self.SetKeyWords(0, kwlist)",
"def setKeywords(self,value):\n self.PDFreactorConfiguration.in1[\"keywords\"] = value",
"def SetKeyWords(self, kw_lst):\n... | [
"0.7726518",
"0.7518018",
"0.7350841",
"0.7108992",
"0.7096946",
"0.6822157",
"0.6642924",
"0.6570114",
"0.6494174",
"0.63918066",
"0.62678164",
"0.62652683",
"0.6251283",
"0.6152986",
"0.6038084",
"0.6029439",
"0.59871435",
"0.59594876",
"0.59410316",
"0.5937035",
"0.5937035... | 0.7723733 | 1 |
Gets the short_description of this Listing. A short description of the listing. | def short_description(self):
return self._short_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def short_description(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"short_description\")",
"def short_description(self):\n return self.name",
"def shortDescription(self):\n return self._line.description",
"def short_description(self):\n description = self.description\n ... | [
"0.73577285",
"0.72625756",
"0.72026336",
"0.7117337",
"0.709271",
"0.7026649",
"0.6991476",
"0.6942552",
"0.6826563",
"0.6826563",
"0.6826563",
"0.6826563",
"0.6801069",
"0.67609227",
"0.6740555",
"0.6733474",
"0.6720813",
"0.671257",
"0.66941947",
"0.66788566",
"0.66788566"... | 0.79243517 | 1 |
Sets the short_description of this Listing. A short description of the listing. | def short_description(self, short_description):
self._short_description = short_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def short_description(self, short_description):\n\n self._short_description = short_description",
"def short_description(self, short_description):\n if short_description is None:\n raise ValueError(\"Invalid value for `short_description`, must not be `None`\")\n\n self._short_desc... | [
"0.8449821",
"0.80678433",
"0.68069285",
"0.6783612",
"0.6783612",
"0.6728136",
"0.66674626",
"0.66212046",
"0.6584278",
"0.6528017",
"0.6505532",
"0.64720845",
"0.64129335",
"0.64046067",
"0.6326431",
"0.6312329",
"0.6312329",
"0.6312329",
"0.6312329",
"0.6290732",
"0.629073... | 0.8429913 | 1 |
Gets the usage_information of this Listing. Usage information for the listing. | def usage_information(self):
return self._usage_information | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getUsageInfo(self):\n return self.jsonRequest(\"/api/v1/usage\", { \"apiKey\": self._apiKey })",
"def get_usage_stats(self) -> UsageStats:\n return self._usage",
"def usage(self):\r\n return usage.Usage(self)",
"def get_usage(self):\n return self.box_usage",
"def get_usage_i... | [
"0.76958585",
"0.68729985",
"0.6765924",
"0.6226989",
"0.6201762",
"0.60590756",
"0.6058347",
"0.5998649",
"0.59470576",
"0.5942935",
"0.5919672",
"0.5896635",
"0.58876365",
"0.5840067",
"0.5839861",
"0.5811322",
"0.5733173",
"0.57162476",
"0.57162476",
"0.570095",
"0.570095"... | 0.8030164 | 0 |
Sets the usage_information of this Listing. Usage information for the listing. | def usage_information(self, usage_information):
self._usage_information = usage_information | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_usage(self, usage):\r\n self._usage = usage",
"def usage(self, usage):\n\n self._usage = usage",
"def usage(self, usage):\n\n self._usage = usage",
"def usage(self, usage):\n\n self._usage = usage",
"def usage_information(self):\n return self._usage_information",
"d... | [
"0.6704771",
"0.6600919",
"0.6600919",
"0.6600919",
"0.6046543",
"0.55667037",
"0.54406595",
"0.5418335",
"0.5297958",
"0.525111",
"0.52360046",
"0.51799953",
"0.51696646",
"0.5168463",
"0.5115039",
"0.50764394",
"0.5067247",
"0.5061697",
"0.506115",
"0.50149447",
"0.50112426... | 0.8244212 | 0 |
Gets the long_description of this Listing. A long description of the listing. | def long_description(self):
return self._long_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def long_description(self) -> str:\n return self._long_description",
"def long_description(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"long_description\")",
"def long_description(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"long_description\")",
"def get... | [
"0.80596477",
"0.758474",
"0.72378236",
"0.71228004",
"0.71099156",
"0.71099156",
"0.71099156",
"0.71099156",
"0.7103312",
"0.7053098",
"0.7048452",
"0.7044788",
"0.7030812",
"0.6991155",
"0.69771314",
"0.6967502",
"0.6952499",
"0.6934183",
"0.69313747",
"0.69313747",
"0.6929... | 0.8087247 | 0 |
Sets the long_description of this Listing. A long description of the listing. | def long_description(self, long_description):
self._long_description = long_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def long_description(self, long_description: str):\n\n self._long_description = long_description",
"def set_longdescription(self, longdesc):\n self.longdescription(longdesc)",
"def long_description(self) -> str:\n return self._long_description",
"def long_description(self):\n retu... | [
"0.86731976",
"0.8560788",
"0.7149375",
"0.7075606",
"0.6908429",
"0.68525",
"0.6844741",
"0.6813715",
"0.6808889",
"0.6801812",
"0.6797638",
"0.6730105",
"0.6693408",
"0.66631347",
"0.66111076",
"0.66111076",
"0.66111076",
"0.66111076",
"0.6571146",
"0.6571146",
"0.6571146",... | 0.8654559 | 1 |
Gets the license_model_description of this Listing. A description of the publisher's licensing model for the listing. | def license_model_description(self):
return self._license_model_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_model_description(self, license_model_description):\n self._license_model_description = license_model_description",
"def license(self): # noqa: A003\n logger.debug(\"Get license\")\n return self._raw_api.license.get()",
"def license_details(self):\n if \"licenseDetails\... | [
"0.65090805",
"0.63407576",
"0.6327641",
"0.6098437",
"0.60412365",
"0.5976658",
"0.59197986",
"0.58929926",
"0.5860846",
"0.5827089",
"0.5769789",
"0.5571917",
"0.5557723",
"0.55281246",
"0.5523411",
"0.55039614",
"0.54873824",
"0.5485993",
"0.54852253",
"0.5459995",
"0.5459... | 0.83493125 | 0 |
Sets the license_model_description of this Listing. A description of the publisher's licensing model for the listing. | def license_model_description(self, license_model_description):
self._license_model_description = license_model_description | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license_model_description(self):\n return self._license_model_description",
"def license(self, license):\n\n self._license = license",
"def set_description(self, sDescription):\n\t\tcall_sdk_function('PrlVirtNet_SetDescription', self.handle, sDescription)",
"def set_description(self, room_d... | [
"0.6921612",
"0.6202522",
"0.5927343",
"0.5893093",
"0.57872677",
"0.5785446",
"0.578273",
"0.5752546",
"0.5752546",
"0.5742983",
"0.5742669",
"0.56861144",
"0.5664043",
"0.5637547",
"0.5637547",
"0.5637547",
"0.5637547",
"0.5637547",
"0.5637547",
"0.5637547",
"0.5637547",
... | 0.8649689 | 0 |
Gets the system_requirements of this Listing. System requirements for the listing. | def system_requirements(self):
return self._system_requirements | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def system_requirements(self, system_requirements):\n self._system_requirements = system_requirements",
"def requirements(self):\n requirements = []\n return requirements",
"def python_requirements(self):\n try:\n dist = self.requirement.pip_requirement.get_dist()\n ... | [
"0.6756265",
"0.630042",
"0.6126706",
"0.5784309",
"0.5776431",
"0.5704219",
"0.5702918",
"0.5696625",
"0.56659317",
"0.56201077",
"0.5616559",
"0.5568308",
"0.5549997",
"0.5487405",
"0.5485939",
"0.548016",
"0.5447736",
"0.5438381",
"0.54212105",
"0.54085964",
"0.53814477",
... | 0.8690019 | 0 |
Sets the system_requirements of this Listing. System requirements for the listing. | def system_requirements(self, system_requirements):
self._system_requirements = system_requirements | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def system_requirements(self):\n return self._system_requirements",
"def _set_system_forces(self, system):\n forces = self.results[self.force_handle]\n system.forces = forces.view(system.n_replicas, system.n_molecules,\n system.max_n_atoms,3) * \\\n ... | [
"0.6983736",
"0.5838846",
"0.5674688",
"0.56331927",
"0.56331927",
"0.5464949",
"0.5319611",
"0.52284116",
"0.52232224",
"0.50656945",
"0.50553805",
"0.50460213",
"0.5040736",
"0.49555758",
"0.49499926",
"0.49416316",
"0.49393702",
"0.49228254",
"0.49070564",
"0.4841495",
"0.... | 0.8679492 | 0 |
Gets the time_released of this Listing. The release date of the listing. | def time_released(self):
return self._time_released | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def release_time(self) -> str:\n return pulumi.get(self, \"release_time\")",
"def release_date(self):\n for item in self.proto.releaseInfo.item:\n if item.label == 'Released on':\n return item.container.value",
"def time_released(self, time_released):\n self._time... | [
"0.7647471",
"0.70362586",
"0.5931893",
"0.5763734",
"0.5631487",
"0.5537523",
"0.5472509",
"0.5465901",
"0.5461748",
"0.5461748",
"0.5450319",
"0.54452556",
"0.5418696",
"0.5418696",
"0.5418696",
"0.54063195",
"0.54048216",
"0.54048216",
"0.53873295",
"0.5381522",
"0.5361360... | 0.7279181 | 1 |
Sets the time_released of this Listing. The release date of the listing. | def time_released(self, time_released):
self._time_released = time_released | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_released(self):\n return self._time_released",
"def release_time(self) -> str:\n return pulumi.get(self, \"release_time\")",
"def set_time_available(self, new_value):\n\n self.available_at = new_value\n self.save()",
"def release_date(self):\n for item in self.prot... | [
"0.5934729",
"0.58847374",
"0.55999017",
"0.5470613",
"0.54162925",
"0.52752566",
"0.5228138",
"0.51995313",
"0.51778126",
"0.51119363",
"0.5065449",
"0.50520337",
"0.5027209",
"0.500003",
"0.49566588",
"0.49566588",
"0.49566588",
"0.49566588",
"0.49566588",
"0.4927865",
"0.4... | 0.77573067 | 0 |
Gets the release_notes of this Listing. Release notes for the listing. | def release_notes(self):
return self._release_notes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_release_notes(self):\n\n notes = self.output.get_header('RELEASE NOTES')\n notes += 'https://{}/{}/{}/releases'.format(HOST_GITHUB, \\\n self.repo, self.product) + '\\n'\n\n notes += self.output.get_sub_header('COMPARISONS')\n n... | [
"0.6843257",
"0.6499268",
"0.64411867",
"0.61444026",
"0.61170226",
"0.6035091",
"0.59695387",
"0.58302104",
"0.58184755",
"0.58065593",
"0.5796641",
"0.57310104",
"0.5706721",
"0.57033986",
"0.568316",
"0.568316",
"0.56737494",
"0.5639619",
"0.5477934",
"0.5467729",
"0.54408... | 0.7991021 | 0 |
Sets the release_notes of this Listing. Release notes for the listing. | def release_notes(self, release_notes):
self._release_notes = release_notes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def revision_notes(self, revision_notes):\n\n self._revision_notes = revision_notes",
"def release_notes(self):\n return self._release_notes",
"def set_note_version_server(cls):\n #Change current working directory to root sdk directory\n Utility.pushd(Settings.rootSdkPath)\n ... | [
"0.6267436",
"0.6157792",
"0.5947801",
"0.58771783",
"0.5817846",
"0.5817846",
"0.5817846",
"0.5817846",
"0.5817846",
"0.5638602",
"0.5454901",
"0.5404618",
"0.52281815",
"0.51389474",
"0.49515978",
"0.4910483",
"0.48980397",
"0.48685953",
"0.4809314",
"0.47723645",
"0.476286... | 0.81215 | 0 |
Sets the categories of this Listing. Categories that the listing belongs to. | def categories(self, categories):
self._categories = categories | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def categories(self, categories):\n\n self._categories = categories",
"def categories(self, categories):\n\n self._categories = categories",
"def categories(self, categories):\n\n self._categories = categories",
"def categories(self, categories):\n\n self._categories = categories"... | [
"0.7307259",
"0.7307259",
"0.7307259",
"0.7307259",
"0.7300853",
"0.68660516",
"0.66410893",
"0.6177779",
"0.6134643",
"0.6062947",
"0.60496455",
"0.58617896",
"0.5834949",
"0.574634",
"0.5729895",
"0.5644923",
"0.5644923",
"0.5644923",
"0.5644923",
"0.5644923",
"0.56407124",... | 0.73104125 | 0 |
Sets the publisher of this Listing. | def publisher(self, publisher):
self._publisher = publisher | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_publisher (self, publisher):\n self.publisher = publisher",
"def publisher(self, publisher):\r\n return publishers.Publisher(self, publisher)",
"def publisher(self):\n return self.get(\"publisher\")",
"def publisher(self) -> str:\n return pulumi.get(self, \"publisher\")",
... | [
"0.83886194",
"0.7004004",
"0.66248053",
"0.63609666",
"0.63609666",
"0.63609666",
"0.63100815",
"0.62869966",
"0.6277295",
"0.6160284",
"0.61506903",
"0.61506903",
"0.6065866",
"0.5782139",
"0.5739575",
"0.5720117",
"0.5717196",
"0.5521795",
"0.5436713",
"0.526103",
"0.52038... | 0.797822 | 1 |
Gets the languages of this Listing. Languages supported by the listing. | def languages(self):
return self._languages | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getLanguages(self):\n return self.__getColumnData(Q_LANGUAGES, 'language')",
"def languages(self):\n return LanguageCodes.english_names",
"def languages(self):\r\n url = '{0}/{1}'.format(self.get_url(), 'languages')\r\n\r\n return http.Request('GET', url), parsers.parse_json",
... | [
"0.77883005",
"0.7666184",
"0.75871485",
"0.75005174",
"0.7490036",
"0.7477735",
"0.74218374",
"0.7164394",
"0.7100529",
"0.70897734",
"0.7082067",
"0.70374054",
"0.696649",
"0.69658625",
"0.6942555",
"0.69273937",
"0.6868959",
"0.67511004",
"0.6733299",
"0.6725548",
"0.66915... | 0.7978811 | 0 |
Sets the languages of this Listing. Languages supported by the listing. | def languages(self, languages):
self._languages = languages | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def languages(self, languages):\n\n self._languages = languages",
"def spoken_languages(self, spoken_languages):\n\n self._spoken_languages = spoken_languages",
"def languages(self):\r\n url = '{0}/{1}'.format(self.get_url(), 'languages')\r\n\r\n return http.Request('GET', url), par... | [
"0.7733243",
"0.67889374",
"0.6149776",
"0.5953575",
"0.58947927",
"0.5871789",
"0.5811527",
"0.57943386",
"0.5733784",
"0.56714165",
"0.5670487",
"0.5616679",
"0.56014025",
"0.55900526",
"0.5583264",
"0.55787045",
"0.55644816",
"0.55644816",
"0.55644816",
"0.55644816",
"0.55... | 0.7791193 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.