query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Converts to UNIX time, in integral nanoseconds format. Note that this function does not check whether the resulting value fits any POSIXspecific limits. If the timestamp does not specify any timezone, it will be assumed to be relative to UTC.
def iso_to_unix_time_nanos(iso_time: ISOTimestamp) -> int: base_ts, decimals, tz_part = iso_timestamp_split(iso_time) if tz_part == '': tz_part = '+00:00' nanos = int(_decimals_to_precision(decimals, 9, True)[1:]) return int(datetime.fromisoformat(base_ts + tz_part).timestamp()) * 1000000000 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timestamp_to_unix(timestamp):\n return timestamp / 1e6", "def unix_time_nanos(dt):\n return timedelta_to_micros(dt - epoch)", "def to_unix_milli(self):\n try:\n dt_obj = duparser.parse(timestamp)\n self.out_unix_milli = str(int((dt_obj - self.epoch_1970).total_seconds()*1...
[ "0.77305764", "0.7307498", "0.71548235", "0.7107422", "0.7024914", "0.6894101", "0.6753237", "0.67198515", "0.67137593", "0.6702075", "0.66435933", "0.66112643", "0.6559937", "0.6508577", "0.64722955", "0.6427392", "0.6353861", "0.63535124", "0.63504905", "0.63390005", "0.633...
0.71510434
3
Returns the variant of an ISO timestamp (i.e. with all trailing zero decimals removed).
def iso_canonical(iso_time: ISOTimestamp) -> ISOTimestamp: base_ts, decimals, tz_part = iso_timestamp_split(iso_time) return ISOTimestamp(base_ts + decimals.rstrip('0.') + tz_part)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iso8601_from_timestamp(timestamp):\r\n return isotime(datetime.datetime.utcfromtimestamp(timestamp))", "def timestamp_to_iso_format(timestamp):\n if timestamp is None:\n return None\n return datetime.isoformat(datetime.utcfromtimestamp(int(timestamp)))", "def ts_datetime(val):\n...
[ "0.718333", "0.7182869", "0.7173197", "0.7109958", "0.7047531", "0.7045196", "0.7007661", "0.69929314", "0.6965312", "0.696498", "0.6913148", "0.6800479", "0.67865264", "0.67472225", "0.6746702", "0.6731819", "0.67231584", "0.66952926", "0.6650464", "0.65840626", "0.64934504"...
0.76028675
0
Load this component from file. After a component has been trained, it will be persisted by calling `persist`. When the pipeline gets loaded again, this component needs to be able to restore itself. Components can rely on any context attributes that are
def load( cls, component_config: Dict[Text, Any], model_dir: Optional[Text] = None, model_metadata: Optional["Metadata"] = None, cached_component: Optional["Component"] = None, **kwargs: Any, ) -> "Component": if cached_component: return cached_com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_load(self):\n filename = QtGui.QFileDialog.getOpenFileName(self, \"Open file\", \"\", \"*.scc\")\n print(\"Load file \", filename)\n if filename == \"\":\n return\n f = open(filename, mode=\"rb\")\n state = pickle.load(f)\n f.close() \n cmp = ComponentRect()\n cmp.set_state...
[ "0.6341166", "0.6339256", "0.61666614", "0.61257803", "0.6102785", "0.60528463", "0.6042129", "0.60231555", "0.60027725", "0.5999614", "0.5963991", "0.5963991", "0.5963991", "0.5963991", "0.595633", "0.595633", "0.59066087", "0.58907324", "0.5881728", "0.5867358", "0.5864468"...
0.0
-1
function check username in db if username or email are not unique raise Exception UniqueUser
def check_user_from_db(username: str, email: str) -> bool: if User.objects.filter(Q(username=username) | Q(email=email)).first(): raise UniqueUser("Пользователь уже существует") else: return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verification_unique_username(value: str) -> str:\n\n user = User.objects.filter(username=value)\n if len(user) == 0:\n return value\n else:\n raise serializers.ValidationError('User with given credentials already exist')", "def validate_username(self, field):\n if User.query.fil...
[ "0.763321", "0.76103336", "0.75762016", "0.75571084", "0.75465095", "0.75437933", "0.74839765", "0.7437656", "0.73810446", "0.7352675", "0.7321911", "0.73105425", "0.7277324", "0.72536963", "0.72183", "0.71968347", "0.7177921", "0.7175084", "0.71706545", "0.7161562", "0.71422...
0.7961227
0
DO NOT EDIT Equality operator
def __eq__(self, other): if self.capacity != other.capacity or self.size != other.size: return False for i in range(self.capacity): if self.table[i] != other.table[i]: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testEquality(self):\n pass", "def __neq__(self, other): \n return not self == other", "def __eq__(self, oth):\n return int(self) != oth", "def values_eq(self, a, b):\r\n return a == b", "def __eq__(self, other):\n return self.value == other or self.value == oth...
[ "0.8105803", "0.75042427", "0.7435849", "0.7404634", "0.7403375", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", "0.73816884", ...
0.0
-1
Plots the NEB band on matplotlib axes object 'ax'. If ax=None returns a new figure object.
def plot_energies(self, np = None, ax=None): if not ax: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) else: fig = None if np: datas = self.results['energies'][np[0]:np[1]] else: datas =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show(self, ax=None):\n import matplotlib.pylab as plt\n\n if ax is None:\n plt.figure()\n ax = plt.subplot(1, 1, 1)\n\n t = (2 * np.pi * np.arange(self.V)) / self.V\n plt.plot(np.cos(t), np.sin(t), '.')\n planar_edges = np.ravel((self.edges * 2 * np.pi) ...
[ "0.66890633", "0.6366829", "0.63237524", "0.6300597", "0.5891654", "0.5826013", "0.5748434", "0.5736921", "0.5736901", "0.57367134", "0.57282287", "0.5707769", "0.5677001", "0.5662539", "0.5651198", "0.563214", "0.5627115", "0.5624495", "0.56081665", "0.56037694", "0.55859894...
0.5143313
93
Sets the id of this Campaign.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id_):\n\n self.id_ = id_", "def campaign_id(self, campaign_id):\n\n self._campaign_id = campaign_id", "def id(self, id):\n if self._configuration.client_side_validation and id is None:\n raise ValueError(\"Inv...
[ "0.74986756", "0.74945664", "0.746911", "0.74265283", "0.73905647", "0.7317896", "0.73153996", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781", "0.7279781",...
0.0
-1
Sets the owner of this Campaign.
def owner(self, owner): self._owner = owner
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_owner(self, owner):\n self.__owner = owner", "def set_owner(self, owner):\n self.settings[\"owner\"] = owner", "def owner(self, owner: str):\n\n self._owner = owner", "def owner(self, owner):\n self._owner = owner", "def owner(self, owner):\n self._owner = owner",...
[ "0.79450965", "0.7802457", "0.75762457", "0.74338454", "0.74338454", "0.74338454", "0.74338454", "0.7232411", "0.71726525", "0.71516806", "0.70218825", "0.7010834", "0.68976986", "0.6737116", "0.6684068", "0.65985876", "0.6283729", "0.6249121", "0.6226729", "0.62061507", "0.6...
0.7474906
5
Sets the status of this Campaign.
def status(self, status): self._status = status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_status(self, status):\n self.status = status", "def set_status(self, status):\n self.status = status", "def set_status(self, status):\n self.status = status", "def SetStatus(self, status):\r\n self.status = status", "def campaign_status(self, campaign_status):\n allow...
[ "0.74978876", "0.74978876", "0.74978876", "0.73635256", "0.7350704", "0.7324146", "0.7231282", "0.710108", "0.7092089", "0.7092089", "0.7092089", "0.7092089", "0.7092089", "0.7092089", "0.7092089", "0.6999518", "0.6986869", "0.6911826", "0.6911826", "0.68538916", "0.68497324"...
0.7106224
12
Sets the guild of this Campaign.
def guild(self, guild): self._guild = guild
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def set_guild(ctx):\n await Config.set_main_guild(ctx.guild)\n await ctx.send(\"Successfully set guild\")", "def guild(self, *args, **kwargs) -> Guild:\n return Guild(self.handle, *args, **kwargs)", "def guild_id(self) -> int:\n ...", "async def on_guild_join(self, guild: discord.Gu...
[ "0.7128769", "0.6212358", "0.5829577", "0.5414054", "0.5369779", "0.5303648", "0.529984", "0.5279953", "0.5220577", "0.5212306", "0.51393735", "0.50967056", "0.5089349", "0.5071492", "0.5065585", "0.50528795", "0.50416934", "0.5023401", "0.50119627", "0.49943042", "0.49615178...
0.7963178
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, Campaign): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, Campaign): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Initialize of error messages and error code.
def __init__(self, status_code, developer_message="", user_message="", error_code="", more_info=""): self.status_code = status_code self.developer_message = developer_message self.user_message = user_message self.error_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, error_num, args, msg):\n\n self.error_num = error_num\n self.args = args\n self.message = msg", "def __init__(self, message_id: str, error_code: str):\n super().__init__(f\"Command failed: {error_code}\")\n self.message_id = message_id\n self.error_cod...
[ "0.7273762", "0.69996125", "0.6971645", "0.69425696", "0.68864506", "0.66862035", "0.66489786", "0.66087216", "0.65550745", "0.6521833", "0.6505588", "0.6479436", "0.6469405", "0.64510316", "0.64510316", "0.64510316", "0.64223343", "0.64164287", "0.63859266", "0.63798094", "0...
0.6491126
11
Compute the absolute slope between the max and min positions.
def slope(tr, sigma=None): tr = tr.astype(float) if sigma is not None: tr = nd.gaussian_filter1d(tr, sigma=sigma) m, M = np.argmin(tr), np.argmax(tr) a = np.abs((tr[m] - tr[M]) / (m - M)) return a
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bounds_slope(regressions):\n max_up_slope = 0\n min_down_slope = 0\n for regression in regressions.itervalues():\n min_slope = regression.find_min_slope()\n max_up_slope = max(max_up_slope, min_slope)\n min_down_slope = min(min_down_slope, min_slope)\n \n return (max_up_slop...
[ "0.7402359", "0.6897132", "0.6721075", "0.6667527", "0.65469605", "0.65165526", "0.65149766", "0.6512953", "0.64722484", "0.64542717", "0.64503366", "0.6390608", "0.6334479", "0.6320201", "0.6277509", "0.6276106", "0.62728274", "0.6269371", "0.6261219", "0.62595695", "0.62382...
0.53917915
87
Compute amount of fluorescence lost compared with no injury.
def missing_fluorescence(tr, sigma=None, height=None, margins=50): tr = tr.astype(float) if height is None: height = np.mean(tr[:margins] + tr[-margins:]) / 2 if sigma is not None: tr = nd.gaussian_filter1d(tr, sigma=sigma) tr = np.clip(tr, 0, height) m = (height - tr).sum() retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discrepancy(self):\n result = 0\n for focal, value in self.items():\n if focal.cardinal > 0:\n result -= value * math.log(self.betP(focal), 2)\n return round(result, 6)", "def get_alcohol_loss():\n F_ton_per_yr = LAOs.wastewater.get_flow('ton/day', fatty_alco...
[ "0.6721761", "0.66143924", "0.6497111", "0.6342206", "0.63265985", "0.6313947", "0.6264217", "0.62625784", "0.62493855", "0.6169288", "0.6140562", "0.612622", "0.6094272", "0.60874826", "0.6079637", "0.60712385", "0.60605216", "0.60576963", "0.6041", "0.6025332", "0.60044664"...
0.0
-1
Initialise object with empty list, with initial length as specified.
def __init__(self, initial_length=2, resizing_factor=2): # Initialise underlying list, with no elements self.main_list = [None] * initial_length # Initialise variable to store number of elements inserted into # main_list, which will always be less than or equal to list length s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, size):\n self.size = size\n self.list = []\n self.len = 0", "def __init__(self, size: int = 100):\n self.data = [None] * size\n self.size = size", "def __init__(self):\n self.l = []\n self.length = 0", "def __init__(self):\n self.__li...
[ "0.77267605", "0.7338416", "0.73213935", "0.72964597", "0.72735673", "0.7240931", "0.722838", "0.71269506", "0.6938839", "0.6930566", "0.69025695", "0.68880624", "0.68245167", "0.68242824", "0.6818017", "0.6756796", "0.674871", "0.67472005", "0.67450845", "0.6733025", "0.6732...
0.77728754
0
Append extension values to main_list. Wraps this object's append method.
def extend(self, extension): for element in extension: self.append(element)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append(self, data):\n # Check to see if main_list is full\n if self.num_elements == len(self.main_list):\n # Increase size of main_list\n self._expand_main_list()\n\n # Add element to mains_list\n self.main_list[self.num_elements] = data\n\n # Increment ...
[ "0.63784933", "0.62613857", "0.6119337", "0.60077035", "0.5801059", "0.5764515", "0.5741589", "0.5692355", "0.56770796", "0.56410056", "0.56161505", "0.55858153", "0.55748826", "0.5564966", "0.55278254", "0.55122167", "0.55082595", "0.5506278", "0.5499155", "0.54988354", "0.5...
0.7104271
0
List existing posts by author
def author_posts(request, author_id): id = int(author_id) user = myUser.objects.get(user_id=id) if user.is_admin: posts = Post.objects.select_related('author').order_by('-modified') else: posts = Post.objects.select_related('author').filter(author_id=id).order_by('-modified') return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n id = self.kwargs['pk']\n target_author=get_object_or_404(Author, pk = id)\n return Post.objects.filter(author=target_author)", "def get_queryset(self):\n author = self.kwargs['author']\n target_author = get_object_or_404(Blog, author=author)\n r...
[ "0.73168504", "0.69798744", "0.6926332", "0.67540336", "0.66806644", "0.66624326", "0.6570822", "0.6417436", "0.6407859", "0.64045256", "0.63876015", "0.63757527", "0.6348504", "0.63385904", "0.625815", "0.62090456", "0.6205668", "0.6199196", "0.61285657", "0.610048", "0.6080...
0.7776829
0
Create single pandas dataframe from the whole dataset
def read(self): self._load_metadata() return self._df.compute()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_to_df(data):\r\n ans = pd.DataFrame(data)\r\n return ans", "def create_dataframe():\r\n\r\n df = pd.read_csv('data/data.csv', header=0)\r\n return df", "def make_dataset(self, df, **kwargs):\n\t\treturn df", "def as_dataframe(self) -> \"pd.DataFrame\":\n import pandas as pd\n\n...
[ "0.7486617", "0.7432619", "0.73501986", "0.7287042", "0.71849173", "0.7162859", "0.7089252", "0.7058989", "0.7042113", "0.70099777", "0.700077", "0.6954582", "0.6932674", "0.6927126", "0.6918636", "0.69159937", "0.68977684", "0.68584853", "0.68559444", "0.6847315", "0.6839976...
0.0
-1
Produce Spark DataFrame equivalent This will ignore all arguments except the urlpath, which will be directly interpreted by Spark. If you need to configure the storage, that must be done on the spark side. This method requires intakespark. See its documentation for how to set up a spark Session.
def to_spark(self): from intake_spark.base import SparkHolder args = [ ['read'], ['parquet', [self._urlpath]] ] sh = SparkHolder(True, args, {}) return sh.setup()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def creat_data_frame(spark, file_path):\n df = spark.read \\\n .format(\"csv\") \\\n .option(\"header\", \"true\") \\\n .option(\"inferSchema\", \"true\")\\\n .option(\"samplingRatio\", 0.01) \\\n .option(\"delimiter\", \",\") \\\n .load(file_path)\n return df", "d...
[ "0.65109795", "0.6420665", "0.6151771", "0.6145918", "0.6073008", "0.5925703", "0.5888745", "0.5829185", "0.5814708", "0.5801262", "0.5727585", "0.57107645", "0.56266254", "0.55880797", "0.5579291", "0.55189544", "0.5494541", "0.5470859", "0.5451357", "0.54500234", "0.5423163...
0.60612524
5
Create a lazy daskdataframe from the parquet data
def _to_dask(self): import dask.dataframe as dd urlpath = self._get_cache(self._urlpath)[0] self._df = dd.read_parquet(urlpath, storage_options=self._storage_options, **self._kwargs) self._load_metadata() return self._df
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _pq2df(data_file):\n df = pd.read_parquet(data_file)\n return df", "def get_dataframe(data_path: PathLike) -> pd.DataFrame:\n path = get_local_data_path(data_path, download_if_missing=True)\n df = pd.read_parquet(path)\n return df", "def get_parquet_data(parquet_data):\n rows ...
[ "0.74006224", "0.6993496", "0.6625131", "0.65917194", "0.6498687", "0.64073044", "0.6207642", "0.6141658", "0.6141658", "0.6118448", "0.6074315", "0.603763", "0.6019344", "0.6009542", "0.5964667", "0.59590507", "0.59506583", "0.5947871", "0.5943091", "0.5875401", "0.57884675"...
0.77403235
0
Get the class name.
def get_name(): return 'nettools'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def f_get_class_name(self):\n return self.__class__.__name__", "def getClassName(self):\n n = type(self).__name__\n return n", "def className(self):\n namevalue = self.__class__.__name__\n return str(namevalue)", "def class_name(self) -> str:\n return pulumi.get(self...
[ "0.88732475", "0.8787986", "0.8768858", "0.87280136", "0.86709225", "0.8636875", "0.8570084", "0.8570084", "0.8543834", "0.82935655", "0.8233277", "0.8083087", "0.8062951", "0.80161786", "0.7958435", "0.78677964", "0.78469104", "0.7787081", "0.7787081", "0.7787081", "0.778708...
0.0
-1
Loads and wraps training and validation datasets
def get_dataset(self, patch_size): x_train, y_train = self.__get_audiomnist(self.__path, kind='train') x_val, y_val = self.__get_audiomnist(self.__path, kind='test') # up and down-sampling x_train = torch.nn.functional.interpolate(x_train, size=patch_size, mode='bilinear') x_va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data():\n print(\"PARSING TRAIN\")\n ys_train, x_train, ids_train = load_pickle_data(\"ys_train\"), load_pickle_data(\"x_train\"), load_pickle_data(\n \"ids_train\")\n if ys_train is None or x_train is None or ids_train is None:\n ys_train, x_train, ids_train = load_csv_data(\"{}/tr...
[ "0.7556521", "0.7507588", "0.74353534", "0.73716986", "0.7366529", "0.7366221", "0.7325571", "0.73177123", "0.7317224", "0.7317224", "0.7291034", "0.7232132", "0.72287387", "0.722123", "0.7207052", "0.7204296", "0.72001773", "0.7171508", "0.7170881", "0.7170224", "0.71624184"...
0.0
-1
Initilize duration predictor loss module.
def __init__(self, offset=1.0, reduction="mean"): super(DurationPredictorLoss, self).__init__() self.criterion = torch.nn.MSELoss(reduction=reduction) self.offset = offset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _initLoss(self):\n\n pass", "def __init__(self, idim, n_layers=2, n_chans=384, kernel_size=3, dropout_rate=0.1, offset=1.0, padding='SAME', dur_loss='mse'):\n super(DurationPredictor, self).__init__()\n self.offset = offset\n self.conv = torch.nn.ModuleList()\n self.kernel_...
[ "0.6840066", "0.65852624", "0.6490715", "0.6490715", "0.6470559", "0.63232154", "0.63232154", "0.61708504", "0.6082787", "0.6070461", "0.6000814", "0.59357077", "0.58821917", "0.57898885", "0.57890826", "0.57880944", "0.5781826", "0.5774776", "0.5753352", "0.57298195", "0.572...
0.705774
0
Approximates the surface area of the soma. Morphologies with only a single soma node are supported.
def calculate_soma_surface(data: Data) -> float: soma = data.morphology.get_soma() return 4.0 * math.pi * soma['radius'] * soma['radius']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def area(self):\n geometry_properties = GProp_GProps()\n brepgprop_SurfaceProperties(self.topods_shape(), geometry_properties)\n return geometry_properties.Mass()", "def area(self):\n geometry_properties = GProp_GProps()\n brepgprop_SurfaceProperties(self.topods_shape(), geomet...
[ "0.6793715", "0.6793715", "0.6622706", "0.64883566", "0.6468993", "0.6422345", "0.6415015", "0.6409395", "0.6404649", "0.6398598", "0.63562185", "0.6340339", "0.63335615", "0.6318837", "0.62751746", "0.62377787", "0.6233935", "0.623329", "0.61989063", "0.6188507", "0.61760646...
0.68359023
0
Calculate the number of soma stems. This is defined as the total number of nonsoma child nodes on soma nodes.
def calculate_number_of_stems(data: Data, node_types: Optional[List[int]]): soma = data.morphology.get_soma() if node_types: return len(data.morphology.get_children_of_node_by_types(soma, node_types)) else: return len(data.morphology.children_of(soma))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size(self):\n if len(self.children) == 0:\n return 1\n else:\n return 1 + sum([x.size() for x in self.children])", "def count_nodes(self):\n if self.children is None:\n return 0\n\n total_count = 0\n for child in self.children:\n ...
[ "0.6496724", "0.6489601", "0.64863837", "0.6358854", "0.6320501", "0.62792164", "0.62403226", "0.62275016", "0.6221042", "0.6220492", "0.6217584", "0.6203689", "0.62026227", "0.61863077", "0.61620855", "0.61483765", "0.6132845", "0.61199963", "0.60924625", "0.60924625", "0.60...
0.7679952
0
Calculates the percent of of nodes that are below the soma. If symmetrize_xz is true, then p
def soma_percentile(data: Data, node_types: Optional[List[int]], symmetrize_xz: bool = True): soma_node = data.morphology.get_root() soma_coord = np.asarray([soma_node['x'], soma_node['y'], soma_node['z']]) nodes = data.morphology.get_node_by_types(node_types=node_ty...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modularity():\n\n q = 0.0\n for idx in range(0, node_count):\n if _tot[idx] > 0.0:\n q += (_in[idx] / m - math.pow(_tot[idx] / m, 2))\n return q", "def acosh(x):\n return 0.0", "def zeta_homo_noparking(network, x): \r\n fun...
[ "0.53837425", "0.52648264", "0.5128658", "0.50363034", "0.4978829", "0.4938814", "0.4933019", "0.49054676", "0.49039277", "0.48990113", "0.4851534", "0.48440623", "0.48337355", "0.48280168", "0.48138943", "0.47951275", "0.47903234", "0.47710928", "0.47640988", "0.47461557", "...
0.5944639
0
This function does a forward pass of the reslu activation function
def forward_pass(self, x): self.x = x return x * (x > 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, x):\n res = self.residual(x)\n x = self.gcn(x)\n x = self.tcn(x) + res\n return self.relu(x)", "def relu_forward(self, x):\n #out = None\n #############################################################################\n # TODO: Implement the ReLU ...
[ "0.7084867", "0.70360905", "0.69673306", "0.6964396", "0.6937225", "0.6936001", "0.69230855", "0.6916168", "0.6861932", "0.68390095", "0.68390095", "0.68390095", "0.68390095", "0.6837413", "0.6814446", "0.6812373", "0.6810301", "0.68046856", "0.67987895", "0.67905504", "0.678...
0.0
-1
This is soft max function it sort of calculates probabilities given all the values. One reason why the scores are exploded using exponent is that, to make the differences larger.
def forward_pass(self, x): self.x = x exp_x = np.exp(x) sum_x = np.sum(axis=1) return exp_x/sum_x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(scores):\n exp_score = np.exp(scores)\n return exp_score / np.sum(exp_score)", "def softmax(values):\n exps = np.exp(values)\n return exps / sum(exps)", "def softmax(x): \n e_x = np.exp(x - np.max(x)) \n return e_x / e_x.sum()", "def softmax(x):\r\n e_x = np.exp(x - n...
[ "0.82793313", "0.8159798", "0.7979578", "0.79111195", "0.79111195", "0.7909509", "0.7893631", "0.7873994", "0.78586787", "0.7847563", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0.78432125", "0...
0.0
-1
This is backward pass of the softmax function. It accepts a grad from above layer and alos the correct class index for each of the sample.
def backward(self, grad, index): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward(self, index, gradOutput):\n self.gradInput = np.dot(gradOutput, self.weight.T)\n if index != -1:\n self.gradWeight[index] += gradOutput #the gradients wrt. the params are accumulated\n self.gradBias += gradOutput\n return self.gradInput", "def backward_pass(sel...
[ "0.7458599", "0.7218232", "0.7177933", "0.71362287", "0.7131838", "0.7130614", "0.7093277", "0.7093277", "0.70736086", "0.70736086", "0.70732707", "0.70716006", "0.70655954", "0.70507294", "0.70388466", "0.7031294", "0.7031294", "0.70190334", "0.6981346", "0.6976908", "0.6940...
0.71456444
3
This function computes the backward pass of the tanh activation using the grad from the above layer and chain rule.
def backward_pass(self, grad): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward(ctx, grad_output):\n input, = ctx.saved_tensors\n\n sp = F.softplus(input)\n grad_sp = -torch.expm1(sp)\n\n tsp = F.tanh(sp)\n grad_tsp = (1 - tsp * tsp) * grad_sp\n grad = input * grad_tsp + tsp\n return grad", "def backward(self, delta):\n if...
[ "0.7196869", "0.708888", "0.70171034", "0.7006034", "0.69441175", "0.6943263", "0.687", "0.67824036", "0.6781166", "0.674998", "0.674998", "0.67266923", "0.67173237", "0.6660002", "0.6646971", "0.66396004", "0.66389734", "0.6623072", "0.66200763", "0.66133016", "0.6612737", ...
0.68895596
6
Symmetrically normalize adjacency matrix.
def normalize_adj(adj): adj = sp.coo_matrix(adj) rowsum = np.array(adj.sum(1)) d_inv_sqrt = np.power(rowsum, -0.5).flatten() d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0. d_mat_inv_sqrt = sp.diags(d_inv_sqrt) return adj.dot(d_mat_inv_sqrt).transpose().dot(d_mat_inv_sqrt).tocoo()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_adj(adj):\n\n rowsum = np.array(adj.sum(1))\n d_inv_sqrt = np.power(rowsum, -0.5).flatten()\n d_inv_sqrt[np.isinf(d_inv_sqrt)] = 0.\n d_mat_inv_sqrt = np.diag(d_inv_sqrt)\n return adj.dot(d_mat_inv_sqrt).transpose().dot(d_mat_inv_sqrt)", "def normalize_adj(adj):\r\n adj = sp.coo_m...
[ "0.788518", "0.7691616", "0.759434", "0.7566608", "0.7335597", "0.730491", "0.72684425", "0.688461", "0.68616927", "0.686005", "0.6832041", "0.682895", "0.6750887", "0.6750057", "0.67278", "0.66282207", "0.6616473", "0.64879745", "0.6486613", "0.63610464", "0.63610464", "0....
0.7698141
4
Convert sparse matrix to tuple representation.
def sparse_to_tuple(sparse_mx): def to_tuple(mx): if not sp.isspmatrix_coo(mx): mx = mx.tocoo() coords = np.vstack((mx.row, mx.col)).transpose() values = mx.data shape = mx.shape return coords, values, shape
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sparse_to_tuple(sparse_mx):\n def to_tuple(mx):\n if not sp.isspmatrix_coo(mx):\n mx = mx.tocoo()\n coords = np.vstack((mx.row, mx.col)).transpose()\n values = mx.data\n shape = mx.shape\n return coords, values, shape\n\n if isinstance(sparse_mx, list):\n ...
[ "0.82655305", "0.82655305", "0.82655305", "0.82655305", "0.82655305", "0.82655305", "0.82655305", "0.82527", "0.82527", "0.8091624", "0.7986327", "0.602773", "0.59843755", "0.5971062", "0.59706587", "0.59447116", "0.59443593", "0.5910293", "0.5910293", "0.5910293", "0.5910293...
0.85870504
0
Test case when pickle file cannot be found.
def test_pickle_file_not_found(self): self.assertRaises(IOError, self.plugin.load_data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_DL_import_wrong_file_serialized(self):\n filepath = '5.txt'\n with open(filepath, 'wb') as file:\n pickle.dump([\"This is a wrong dataset\"], file)\n # Check if exception was raised for wrong data type\n with self.assertRaises(Exception):\n flow_processing...
[ "0.71423703", "0.6703372", "0.66467655", "0.6637873", "0.6549064", "0.6508036", "0.64696574", "0.6416317", "0.63352853", "0.62710446", "0.62688667", "0.61957276", "0.6117061", "0.6084126", "0.6060768", "0.6060192", "0.60449827", "0.6033751", "0.60326844", "0.6031276", "0.6027...
0.7995841
0
Asks user to specify a city, month, and day to analyze.
def get_filters(): city = prompts.city_prompt.launch() _filter = prompts.filter_prompt.launch() if _filter == "Month": month = prompts.month_prompt.launch() day = "All" elif _filter == "Day": day = prompts.day_prompt.launch() month = "All" elif _filter == "Both":...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Raw_Data(city,month,day):\n print(\"The city you have entered is: \",city)\n print(\"The month you have entered is: \",month)\n print(\"The day you have entered is: \",day)", "def get_filters():\n city = None\n month = None\n day = None\n while day == None:\n # TO DO: get user input f...
[ "0.6670955", "0.65355206", "0.64598334", "0.6373697", "0.63487226", "0.6310236", "0.6287051", "0.6259993", "0.62314963", "0.62125754", "0.62053525", "0.61813915", "0.6171331", "0.6169096", "0.61588687", "0.6158631", "0.6153347", "0.6144922", "0.6131542", "0.6105515", "0.61029...
0.0
-1
Loads data for the specified city and filters by month and day if applicable.
def load_data(city, month, day): # load data file into a dataframe df = pd.read_csv(CITY_DATA[city]) # drop the unused 'Unnamed' column df = df.drop("Unnamed: 0", axis=1) # convert the Start Time column to datetime df["Start Time"] = pd.to_datetime(df["Start Time"]) # extract month, day of ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(city, month, day):\n df = pd.read_csv(CITY_DATA [city])\n \n # convert the Start Time column to datetime\n df['Start Time'] = pd.to_datetime(df['Start Time'])\n \n # extract month and day of week from Start Time to create new columns\n df['month'] = df['Start Time'].dt.month\n ...
[ "0.8131557", "0.8108646", "0.80456805", "0.8041907", "0.8008996", "0.80066293", "0.799892", "0.79980177", "0.79883647", "0.79786384", "0.7973428", "0.79604656", "0.7955707", "0.7946914", "0.79457873", "0.7907952", "0.79078037", "0.79041624", "0.7900135", "0.7892769", "0.78888...
0.78501487
26
Displays statistics on the most frequent times of travel.
def time_stats(df): print("\nDisplaying the most frequent times of travel...\n") start_time = time.time() # Ignoring getting the most popular month when the data is already filtered by month if len(df["month"].unique()) > 1: most_popular_month, month_count = get_most_popular(df["month"]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_stats(df):\n\n print('\\nDisplaying the statistics on the most frequent times of '\n 'travel...\\n')\n start_time = time.time()\n\n # display the most common month\n most_common_month = df['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' +\...
[ "0.80229414", "0.8021659", "0.78253615", "0.7820659", "0.7812822", "0.77646637", "0.77399075", "0.7735228", "0.7733135", "0.76855505", "0.7668204", "0.76504695", "0.7643491", "0.7638798", "0.7635826", "0.7624526", "0.76222384", "0.76126415", "0.7598943", "0.75825596", "0.7579...
0.79154044
2
Displays statistics on the most popular stations and trip.
def station_stats(df): print("\nDisplaying the most Popular stations\n") start_time = time.time() most_popular_start_station, start_station_count = get_most_popular( df["Start Station"] ) print(f"Most commonly used start station: {most_popular_start_station}") print(f"It has been used ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m...
[ "0.7816157", "0.7662524", "0.7554042", "0.7492024", "0.7475423", "0.74471235", "0.7430301", "0.74246186", "0.741813", "0.7400704", "0.7387859", "0.73857087", "0.7365416", "0.73599696", "0.73571277", "0.73555714", "0.73525584", "0.7351796", "0.735084", "0.7342505", "0.734093",...
0.72010726
44
Displays statistics on the total and average trip duration.
def trip_duration_stats(df): print("\nCalculating trip duration...\n") start_time = time.time() print("Total trip duration: {} seconds".format(df["Trip Duration"].sum())) print("Average trip duration: {} seconds".format(df["Trip Duration"].mean())) print("\nThis took %s seconds." % (time.time() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri...
[ "0.814274", "0.8025143", "0.80041367", "0.79496753", "0.7937415", "0.79312176", "0.7926815", "0.7915187", "0.79142886", "0.7908032", "0.79055744", "0.7900715", "0.7891682", "0.78894734", "0.7886722", "0.78851086", "0.7884266", "0.7882474", "0.78738385", "0.78686154", "0.78664...
0.7808228
42
Returns ops that convert raw image data to a 4D tensor representing a single image.
def inference_input(): # Decode image into float range [0,1] jpegs = tf.placeholder(tf.string, shape=(1), name='input') image_buffer = tf.squeeze(jpegs, [0]) image = tf.image.decode_jpeg(image_buffer, channels=3) image = tf.image.convert_image_dtype(image, dtype=tf.float32) image = tf.image.cent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def raw_image(self):\n return self.data16.transpose()", "def _4d_tensor(self, name, tensor, **kwargs):\r\n h, w, c, num_tensor = tensor.shape.as_list()\r\n\r\n # Try to visualise convolutional filters or feature maps\r\n # See: https://gist.github.com/kukuruza/03731dc494603ceab0c5\r\n...
[ "0.6287724", "0.6277533", "0.5980816", "0.58461666", "0.58170754", "0.58118534", "0.5632755", "0.55991066", "0.55489457", "0.5533499", "0.5523724", "0.5502007", "0.5489294", "0.5474264", "0.5454788", "0.54456735", "0.5425274", "0.54217064", "0.53819346", "0.53812766", "0.5378...
0.0
-1
Initialize population according to standard normal distribution. Genes are afterwards normalized into a range of [0, 1].
def init_pop(self): genes = np.random.randn( self.population_size * self.individual.gene_count ) self.population = genes.reshape((self.population_size, -1)) #print(self.population)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_population(center: float, std: float, size: int, dimensionality: int):\n return (\n np.full(size * dimensionality, center).reshape(size, dimensionality)\n + stats.uniform.rvs(size=size * dimensionality, scale=std).reshape(size, dimensionality)\n )", "def normal_init(self, shape...
[ "0.69635504", "0.6824528", "0.6780859", "0.6706662", "0.6534833", "0.65287393", "0.64978516", "0.6358401", "0.6330651", "0.6297834", "0.62912965", "0.6286992", "0.6275628", "0.6233919", "0.6232673", "0.62024087", "0.61818534", "0.61402935", "0.6130265", "0.60875225", "0.60835...
0.68062496
2
Returns if the word is in the trie.
def search(self, word): node = self.root for letter in word: if letter not in node.children: return False node = node.children[letter] return node.endOfWord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def in_trie(self, trie, word):\n current_dict = trie\n for letter in word:\n if letter in current_dict:\n current_dict = current_dict[letter]\n else:\n return False\n else:\n if '_end_' in current_dict:\n return curr...
[ "0.83862334", "0.81503016", "0.81233966", "0.78567004", "0.7830559", "0.7793441", "0.7792726", "0.77641875", "0.77533525", "0.77476454", "0.77111906", "0.7681577", "0.7677003", "0.76645255", "0.76505435", "0.7633823", "0.7628248", "0.76113766", "0.75775784", "0.7569505", "0.7...
0.7326519
43
Comparison for priority queue. Nodes with high gain are higher priority than nodes with low gain. heapq.heappush only need the '<' operator. heapq.heappop take the smallest item first (smaller is higher priority).
def __lt__(self, other_node): return self.split_info.gain > other_node.split_info.gain
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def example_eight():\n a = []\n heapq.heappush(a, 5)\n heapq.heappush(a, 3)\n heapq.heappush(a, 7)\n heapq.heappush(a, 4)\n\n assert a[0] == heapq.nsmallest(1, a)[0] == 3\n\n print('Before:', a)\n a.sort()\n print('After: ', a)", "def example_seven():\n a = []\n heapq.heappush(a,...
[ "0.71125597", "0.6775531", "0.67654735", "0.66743594", "0.6671362", "0.66296417", "0.6491548", "0.64718354", "0.6381921", "0.6339276", "0.6339276", "0.6339276", "0.6281989", "0.62751746", "0.62701166", "0.6250026", "0.6245056", "0.6239148", "0.62197804", "0.6204422", "0.61793...
0.0
-1
Converts json file to pyhton dict.
def json_dict(path): json_file=open(path) json_str = json_file.read() json_data = loads(json_str) return json_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dictionary_from_json_file(_json_file):\n with open(_json_file) as _f:\n _dict = json.load(_f)\n return _dict", "def json_dict(path):\n json_file=open(path)\n json_str = json_file.read()\n json_data = json.loads(json_str)\n return json_data", "def import_json(self) -> dict:\n ...
[ "0.79518706", "0.7935619", "0.7873859", "0.7763069", "0.76343083", "0.74755937", "0.7467794", "0.74619174", "0.74280566", "0.73979145", "0.73635864", "0.7332367", "0.73281085", "0.7315344", "0.7243503", "0.72432494", "0.7211057", "0.712724", "0.7117306", "0.7089225", "0.70724...
0.78625274
3
Retrieve list of models.
def test_get_projects(client, session, models, tokens): response = client.get( "/projects", headers={"Authorization": f"Bearer {tokens['read']}"} ) assert response.status_code == 200 assert len(response.json) > 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def models(self):\n \n # Call the Razor RESTful API to get a list of models\n headers = {'content-type': 'application/json'}\n r = requests.get(self.url + '/model', headers=headers)\n\n # Check the status code and return appropriately\n if r.status_code == 200:\n ...
[ "0.79564357", "0.78684103", "0.76637125", "0.7625739", "0.7502172", "0.74889535", "0.748503", "0.7469776", "0.7309744", "0.73042786", "0.7303418", "0.7300365", "0.7212576", "0.7129475", "0.7080237", "0.707214", "0.701792", "0.69958144", "0.69958144", "0.6993567", "0.69930416"...
0.0
-1
Fail to create a new consent with incorrect cookie category.
def test_create_consent_fail_on_incorrect_cookie_category( client, session, tokens ): data = { "type": "cookie", "category": "fumctiomal", "status": "accepted", } response = client.post( "/consent", json=data, headers={"Authorization": f"Bearer {tokens['wr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_consent_fail_on_incorrect_status(client, session, tokens):\n data = {\n \"type\": \"cookie\",\n \"category\": \"strictly_necessary\",\n \"status\": \"akcepted\",\n }\n response = client.post(\n \"/consent\",\n json=data,\n headers={\"Authorization\...
[ "0.7565548", "0.71675676", "0.6532205", "0.64574116", "0.6149942", "0.6112343", "0.6008984", "0.58349764", "0.5786128", "0.5767709", "0.5746452", "0.57353634", "0.5663686", "0.5649856", "0.56147707", "0.5598796", "0.5592675", "0.55702597", "0.55371433", "0.5532723", "0.550344...
0.80258673
0
Fail to create a new consent with incorrect type.
def test_create_consent_fail_on_incorrect_type(client, session, tokens): data = { "type": "gp_dr", "category": "newsletter", "status": "accepted", } response = client.post( "/consent", json=data, headers={"Authorization": f"Bearer {tokens['write']}"}, ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_consent_fail_on_incorrect_status(client, session, tokens):\n data = {\n \"type\": \"cookie\",\n \"category\": \"strictly_necessary\",\n \"status\": \"akcepted\",\n }\n response = client.post(\n \"/consent\",\n json=data,\n headers={\"Authorization\...
[ "0.69000447", "0.6711621", "0.6257545", "0.62423414", "0.62182415", "0.6151755", "0.60879636", "0.60000277", "0.5982683", "0.5968285", "0.5966338", "0.59452856", "0.58737445", "0.5826023", "0.5802573", "0.5788192", "0.57585275", "0.572014", "0.5718044", "0.5673791", "0.563848...
0.7735014
0
Creates a map that determines the color to be used for a given commit count according
def _create_colormap(self): max_count = max(self.data['rects'], key=lambda r: r['count'])['count'] ranges_list = [ [ int(max_count/x[0])+1, int(max_count/x[1])+1 ] for x in [[6, 3], [3, 2], [2, 1]] ] ranges_list = [[0, 1]] + [[1, r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_color_map(self):\n unique_labels = np.unique(self.out_labels)\n color_map = {}\n for unique_label in unique_labels:\n color_map[unique_label] = self._random_color()\n\n return color_map", "def get_colour_map(self):\n try:\n return {'C# minor' : 'Grey', '...
[ "0.6248183", "0.6201036", "0.61696845", "0.6005802", "0.59580755", "0.5953442", "0.59269136", "0.5924795", "0.5911739", "0.5822487", "0.5814768", "0.57730556", "0.57598615", "0.57511395", "0.57488376", "0.57488376", "0.57488376", "0.57488376", "0.5729514", "0.5696647", "0.569...
0.6082977
3
Sets the author_id of this Parameter.
def author_id(self, author_id): self._author_id = author_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_author (self, author):\n self.author = author", "def author(self, author):\n self._author = author", "def author(self, author):\n\n self._author = author", "def author(self, author):\n\n self._author = author", "def set_author(self, author):\n self.author = author...
[ "0.801865", "0.77621114", "0.77213794", "0.77213794", "0.76656055", "0.7561005", "0.72836834", "0.7257622", "0.72294974", "0.7057709", "0.6868871", "0.6588482", "0.65283275", "0.63596296", "0.6183622", "0.6158826", "0.5873591", "0.5774807", "0.5774807", "0.5774807", "0.572064...
0.87024164
0
Sets the author_name of this Parameter.
def author_name(self, author_name): self._author_name = author_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_author (self, author):\n self.author = author", "def author(self, author: str):\n\n self._author = author", "def set_author(self, author):\n self.author = author\n self.opf.author = author", "def author(self, author):\n self._author = author", "def author(self, au...
[ "0.8330092", "0.817556", "0.8169424", "0.8127852", "0.79826015", "0.79826015", "0.7906788", "0.7711573", "0.7484719", "0.73372895", "0.7315544", "0.7298097", "0.68750614", "0.66198224", "0.65351856", "0.652596", "0.6523104", "0.6511832", "0.63876736", "0.638686", "0.63130605"...
0.90225506
0
Sets the categories_confident of this Parameter.
def categories_confident(self, categories_confident): self._categories_confident = categories_confident
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def categories(self, categories):\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.6796055", "0.66367024", "0.66367024", "0.66367024", "0.66367024", "0.6632054", "0.6448301", "0.6176466", "0.59850425", "0.5828633", "0.5811343", "0.57582384", "0.561271", "0.55929047", "0.5546619", "0.5531585", "0.55225956", "0.552042", "0.54645246", "0.5445985", "0.540215...
0.8252789
0
Sets the categories_id of this Parameter.
def categories_id(self, categories_id): self._categories_id = categories_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def category_id(self, category_id):\n\n self._category_id = category_id", "def id_categoria_svs(self, id_categoria_svs):\n\n self._id_categoria_svs = id_categoria_svs", "def set_categories(self, categories: NounCategories):\n \n self._categories = categories", "def categories(self, cate...
[ "0.715087", "0.65484345", "0.6517229", "0.64334035", "0.6428943", "0.6428943", "0.6428943", "0.6428943", "0.62213176", "0.6183079", "0.5953203", "0.5820431", "0.58022684", "0.5761423", "0.5557671", "0.54380316", "0.5409486", "0.5338515", "0.5293484", "0.5290555", "0.52884847"...
0.8282188
0
Sets the categories_taxonomy of this Parameter.
def categories_taxonomy(self, categories_taxonomy): self._categories_taxonomy = categories_taxonomy
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_categories(self, categories: NounCategories):\n \n self._categories = categories", "def categories(self, categories):\n self._categories = categories", "def categories(self, categories):\n\n self._categories = categories", "def categories(self, categories):\n\n self._cate...
[ "0.6930664", "0.65319335", "0.64961845", "0.64961845", "0.64961845", "0.64961845", "0.62688094", "0.58605844", "0.5808688", "0.5714048", "0.5714048", "0.5714048", "0.5714048", "0.5714048", "0.5693786", "0.56571144", "0.5624468", "0.5623147", "0.5597417", "0.5510271", "0.53914...
0.8295745
0
Sets the links_permalink of this Parameter.
def links_permalink(self, links_permalink): self._links_permalink = links_permalink
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def links(self, links):\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, links):\n\n self._links = links", "def links(self, l...
[ "0.6577716", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.65282965", "0.64561534", "0.6393842", "0.6349609", "0.62115604", "0.6204337", "0.6070034", "0.5967366", "0.58748055", "0...
0.8481177
0
Sets the entities_id of this Parameter.
def entities_id(self, entities_id): self._entities_id = entities_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entity_id(self, entity_id: str):\n\n self._entity_id = entity_id", "def entity_id(self, entity_id):\n\n self._entity_id = entity_id", "def entity_id(self, entity_id):\n if entity_id is None:\n raise ValueError(\"Invalid value for `entity_id`, must not be `None`\")\n\n ...
[ "0.7309914", "0.7237491", "0.7041572", "0.6714152", "0.5959408", "0.5829989", "0.5492501", "0.545256", "0.5371388", "0.53711885", "0.5344453", "0.5344018", "0.53304315", "0.53113353", "0.53013575", "0.530032", "0.52936965", "0.52178556", "0.52053505", "0.52014166", "0.519368"...
0.84059846
0
Sets the entities_body_surface_forms_text of this Parameter.
def entities_body_surface_forms_text(self, entities_body_surface_forms_text): self._entities_body_surface_forms_text = entities_body_surface_forms_text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def entities_surface_forms_text(self, entities_surface_forms_text):\n\n self._entities_surface_forms_text = entities_surface_forms_text", "def entities_title_surface_forms_text(self, entities_title_surface_forms_text):\n\n self._entities_title_surface_forms_text = entities_title_surface_forms_text"...
[ "0.8788412", "0.81554866", "0.60551906", "0.59090596", "0.5651331", "0.5605365", "0.5605365", "0.5490179", "0.5485855", "0.5467588", "0.5431849", "0.54301167", "0.54222566", "0.5421595", "0.540833", "0.5361315", "0.52563417", "0.5246446", "0.52454835", "0.5194176", "0.5138384...
0.917845
0
Sets the id of this Parameter.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_id(self, id_):\n\n self.id_ = id_", "def set_id(self, id):\n self.__id = id", "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id_=None):\n if id_ is None:\n self.id = id(self)\n else:\...
[ "0.8099416", "0.8012991", "0.7994616", "0.79599935", "0.77755386", "0.774731", "0.7626408", "0.7626408", "0.7626408", "0.7626408", "0.7626408", "0.7623006", "0.7614359", "0.7614359", "0.7614359", "0.7614359", "0.7614359", "0.7614359", "0.7614359", "0.7614359", "0.7614359", ...
0.7517025
80
Sets the media_images_content_length_max of this Parameter.
def media_images_content_length_max(self, media_images_content_length_max): self._media_images_content_length_max = media_images_content_length_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_images_width_max(self, media_images_width_max):\n\n self._media_images_width_max = media_images_width_max", "def media_images_height_max(self, media_images_height_max):\n\n self._media_images_height_max = media_images_height_max", "def media_images_content_length_min(self, media_images_...
[ "0.78004223", "0.7703322", "0.7334132", "0.7333218", "0.63175637", "0.59295654", "0.59058666", "0.5880364", "0.5746263", "0.56509864", "0.5609921", "0.5567951", "0.5402568", "0.53858835", "0.536522", "0.5358765", "0.5349182", "0.5342847", "0.5319508", "0.5319508", "0.5319508"...
0.9235028
0
Sets the media_images_count_max of this Parameter.
def media_images_count_max(self, media_images_count_max): self._media_images_count_max = media_images_count_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_videos_count_max(self, media_videos_count_max):\n\n self._media_videos_count_max = media_videos_count_max", "def media_images_height_max(self, media_images_height_max):\n\n self._media_images_height_max = media_images_height_max", "def media_images_width_max(self, media_images_width_max...
[ "0.79877424", "0.7977736", "0.7949037", "0.7623654", "0.7226271", "0.65879214", "0.6517324", "0.6293909", "0.6282856", "0.6257218", "0.614367", "0.6106881", "0.6089099", "0.60616976", "0.6031999", "0.6009607", "0.6001907", "0.6001811", "0.6001811", "0.5986418", "0.59797126", ...
0.9361143
0
Sets the media_images_count_min of this Parameter.
def media_images_count_min(self, media_images_count_min): self._media_images_count_min = media_images_count_min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_images_width_min(self, media_images_width_min):\n\n self._media_images_width_min = media_images_width_min", "def media_videos_count_min(self, media_videos_count_min):\n\n self._media_videos_count_min = media_videos_count_min", "def media_images_content_length_min(self, media_images_cont...
[ "0.78533727", "0.76607335", "0.72036487", "0.6808008", "0.6750402", "0.6443636", "0.6291638", "0.6291638", "0.6290848", "0.628238", "0.615475", "0.60983115", "0.60253733", "0.57032466", "0.55734134", "0.5405101", "0.5329593", "0.52481586", "0.5192479", "0.5184681", "0.5181925...
0.9190107
0
Sets the media_images_height_max of this Parameter.
def media_images_height_max(self, media_images_height_max): self._media_images_height_max = media_images_height_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_images_count_max(self, media_images_count_max):\n\n self._media_images_count_max = media_images_count_max", "def media_images_content_length_max(self, media_images_content_length_max):\n\n self._media_images_content_length_max = media_images_content_length_max", "def media_images_width_...
[ "0.76480645", "0.7641852", "0.7544283", "0.69639474", "0.66740257", "0.6309867", "0.6213972", "0.6041174", "0.6032891", "0.5961879", "0.5864273", "0.575035", "0.57035416", "0.57035416", "0.56746405", "0.5627239", "0.5589201", "0.5589201", "0.5589201", "0.55862963", "0.5579683...
0.92622286
0
Sets the media_videos_count_max of this Parameter.
def media_videos_count_max(self, media_videos_count_max): self._media_videos_count_max = media_videos_count_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_images_count_max(self, media_images_count_max):\n\n self._media_images_count_max = media_images_count_max", "def media_images_height_max(self, media_images_height_max):\n\n self._media_images_height_max = media_images_height_max", "def media_videos_count_min(self, media_videos_count_min...
[ "0.79270595", "0.6831972", "0.6715225", "0.65119654", "0.6450602", "0.642921", "0.6347446", "0.6329678", "0.6329678", "0.63210887", "0.6215987", "0.6184951", "0.61740845", "0.61736405", "0.61736405", "0.61736405", "0.6151782", "0.6105179", "0.607939", "0.6029058", "0.602088",...
0.93758124
0
Sets the media_videos_count_min of this Parameter.
def media_videos_count_min(self, media_videos_count_min): self._media_videos_count_min = media_videos_count_min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def media_images_count_min(self, media_images_count_min):\n\n self._media_images_count_min = media_images_count_min", "def media_videos_count_max(self, media_videos_count_max):\n\n self._media_videos_count_max = media_videos_count_max", "def minimum_item_count(self, minimum_item_count):\n\n ...
[ "0.7633554", "0.66386384", "0.61459523", "0.60697615", "0.60449266", "0.60449266", "0.60069424", "0.5965879", "0.5950357", "0.5884354", "0.573982", "0.5625002", "0.55692375", "0.55573773", "0.5521497", "0.5492323", "0.54040074", "0.5396356", "0.5396356", "0.5396356", "0.53868...
0.9183308
0
Sets the social_shares_count_facebook_max of this Parameter.
def social_shares_count_facebook_max(self, social_shares_count_facebook_max): self._social_shares_count_facebook_max = social_shares_count_facebook_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def social_shares_count_reddit_max(self, social_shares_count_reddit_max):\n\n self._social_shares_count_reddit_max = social_shares_count_reddit_max", "def max_share_count(self) -> str:\n return pulumi.get(self, \"max_share_count\")", "def max_shares(self) -> Optional[int]:\n return pulumi....
[ "0.89428663", "0.7230517", "0.71195954", "0.6801646", "0.65105355", "0.6296985", "0.6280962", "0.62756145", "0.623016", "0.6218274", "0.6135324", "0.6135324", "0.6102457", "0.60530496", "0.60530496", "0.60530496", "0.604173", "0.60398924", "0.59226084", "0.58774245", "0.58774...
0.94976705
0
Sets the social_shares_count_facebook_min of this Parameter.
def social_shares_count_facebook_min(self, social_shares_count_facebook_min): self._social_shares_count_facebook_min = social_shares_count_facebook_min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def social_shares_count_reddit_min(self, social_shares_count_reddit_min):\n\n self._social_shares_count_reddit_min = social_shares_count_reddit_min", "def social_shares_count_facebook_max(self, social_shares_count_facebook_max):\n\n self._social_shares_count_facebook_max = social_shares_count_faceb...
[ "0.87802625", "0.70964676", "0.66256213", "0.65581733", "0.65581733", "0.6507649", "0.646165", "0.6210634", "0.59655064", "0.57458097", "0.55942965", "0.55942965", "0.5569525", "0.556812", "0.556812", "0.556812", "0.556812", "0.5559917", "0.5559768", "0.5559768", "0.5559768",...
0.9412935
0
Sets the social_shares_count_reddit_max of this Parameter.
def social_shares_count_reddit_max(self, social_shares_count_reddit_max): self._social_shares_count_reddit_max = social_shares_count_reddit_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def social_shares_count_facebook_max(self, social_shares_count_facebook_max):\n\n self._social_shares_count_facebook_max = social_shares_count_facebook_max", "def max_shares(self) -> Optional[int]:\n return pulumi.get(self, \"max_shares\")", "def max_share_count(self) -> str:\n return pulu...
[ "0.86095035", "0.72503793", "0.7230954", "0.65522", "0.6516283", "0.63784623", "0.63536066", "0.63426685", "0.6247451", "0.6015738", "0.5936416", "0.59335643", "0.5807849", "0.5803212", "0.5803212", "0.5803212", "0.57968384", "0.5763372", "0.5763372", "0.575564", "0.575564", ...
0.94438463
0
Sets the social_shares_count_reddit_min of this Parameter.
def social_shares_count_reddit_min(self, social_shares_count_reddit_min): self._social_shares_count_reddit_min = social_shares_count_reddit_min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def social_shares_count_facebook_min(self, social_shares_count_facebook_min):\n\n self._social_shares_count_facebook_min = social_shares_count_facebook_min", "def social_shares_count_reddit_max(self, social_shares_count_reddit_max):\n\n self._social_shares_count_reddit_max = social_shares_count_red...
[ "0.8669093", "0.68970317", "0.6608447", "0.66039366", "0.66039366", "0.6493984", "0.6333547", "0.6224925", "0.61329883", "0.5847118", "0.5709603", "0.5709603", "0.5709603", "0.5709603", "0.56751883", "0.5601272", "0.5601272", "0.5582316", "0.5580226", "0.5539661", "0.54798037...
0.9362809
0
Sets the source_id of this Parameter.
def source_id(self, source_id): self._source_id = source_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_id(self, source_id: str):\n\n self._source_id = source_id", "def source_id(self, source_id):\n if source_id is None:\n raise ValueError(\"Invalid value for `source_id`, must not be `None`\") # noqa: E501\n\n self._source_id = source_id", "def source_id(self, source_i...
[ "0.86929464", "0.7788019", "0.7728925", "0.7559643", "0.7291889", "0.723777", "0.72346324", "0.70368224", "0.68668735", "0.68595207", "0.6845025", "0.6845025", "0.6845025", "0.6845025", "0.6845025", "0.6845025", "0.6845025", "0.68259364", "0.6794867", "0.67463386", "0.6688296...
0.8696375
0
Sets the source_links_in_count_max of this Parameter.
def source_links_in_count_max(self, source_links_in_count_max): self._source_links_in_count_max = source_links_in_count_max
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_num_links(self, max_num_links):\n self._max_num_links = max_num_links", "def max_num_links(self):\n return self._max_num_links", "def source_links_in_count_min(self, source_links_in_count_min):\n\n self._source_links_in_count_min = source_links_in_count_min", "def social_shares_c...
[ "0.77945554", "0.6832541", "0.667769", "0.6640958", "0.6523431", "0.6380538", "0.63426626", "0.62177324", "0.6215764", "0.6095739", "0.6095739", "0.6044949", "0.6041219", "0.6037974", "0.6006172", "0.59610945", "0.59560496", "0.590152", "0.5827864", "0.57823986", "0.5762436",...
0.93133765
0
Sets the source_rankings_alexa_country of this Parameter.
def source_rankings_alexa_country(self, source_rankings_alexa_country): self._source_rankings_alexa_country = source_rankings_alexa_country
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_rankings_alexa_rank_min(self, source_rankings_alexa_rank_min):\n\n self._source_rankings_alexa_rank_min = source_rankings_alexa_rank_min", "def source_scopes_country(self, source_scopes_country):\n\n self._source_scopes_country = source_scopes_country", "def source_rankings_alexa_rank_...
[ "0.6834204", "0.66374755", "0.63716215", "0.6357764", "0.5484131", "0.54675657", "0.5455867", "0.5455867", "0.5455867", "0.5455867", "0.5455867", "0.5333648", "0.52152616", "0.51609457", "0.51292855", "0.51124716", "0.5061476", "0.50140995", "0.49942628", "0.49601778", "0.486...
0.9050015
0
Sets the source_scopes_city of this Parameter.
def source_scopes_city(self, source_scopes_city): self._source_scopes_city = source_scopes_city
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_scopes_country(self, source_scopes_country):\n\n self._source_scopes_country = source_scopes_country", "def source_locations_city(self, source_locations_city):\n\n self._source_locations_city = source_locations_city", "def source_scopes_state(self, source_scopes_state):\n\n self...
[ "0.6946144", "0.69037724", "0.68757427", "0.636265", "0.59124094", "0.5821519", "0.55687284", "0.51832473", "0.5041125", "0.49821377", "0.49258372", "0.4919826", "0.49175057", "0.48992965", "0.48865753", "0.4862357", "0.48348707", "0.4823243", "0.47474805", "0.47474805", "0.4...
0.8760529
0
Sets the source_scopes_level of this Parameter.
def source_scopes_level(self, source_scopes_level): self._source_scopes_level = source_scopes_level
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_scopes_state(self, source_scopes_state):\n\n self._source_scopes_state = source_scopes_state", "def source_scopes_country(self, source_scopes_country):\n\n self._source_scopes_country = source_scopes_country", "def source_scopes_city(self, source_scopes_city):\n\n self._source_s...
[ "0.68518925", "0.61388534", "0.595551", "0.5769333", "0.5417755", "0.5214265", "0.5169423", "0.50727516", "0.5035571", "0.49949628", "0.49324572", "0.48974445", "0.48950046", "0.48671967", "0.48534754", "0.48531497", "0.48345026", "0.48261473", "0.48226562", "0.47904736", "0....
0.88524926
0
Sets the story_url of this Parameter.
def story_url(self, story_url): self._story_url = story_url
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_url(self, url):\n if url is not None:\n self.url = url", "def set_url(self, url):\n self.url = url", "def set_url(self, url):\n self.data['url'] = url", "def set_url(self, url):\n self.url = url", "def url(self, url: str):\n self._url = url", "def url(sel...
[ "0.7156072", "0.70660514", "0.6916835", "0.686752", "0.66337943", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.65836114", "0.6529579", "0.6529579", "0.6529579", "0.6410275", "0.63127226", "0.63018066", "0.62240386", "0.6162266", "0.61...
0.86321926
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, Parameter): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, Parameter): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Return the position of the value in the sequence, or 1 if not in sequence. Assumes the seq is already in order.
def binary_search(value, seq): tree = BinaryTree(seq) try: return tree.find(value) except BinaryTreeValueError: return -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findindex(iteratee, seq):\n iteratee = fnc.iteratee(iteratee)\n return next((i for i, value in enumerate(seq) if iteratee(value)), -1)", "def offset(self, needle):\n if isinstance(needle, int):\n if needle.bit_length() <= 32:\n needle = p32(needle)\n else:\n ...
[ "0.6862196", "0.66595435", "0.65804845", "0.65487987", "0.6506135", "0.637029", "0.6321085", "0.63184875", "0.6259942", "0.6174264", "0.6139083", "0.6063905", "0.6056227", "0.60475504", "0.59896797", "0.598918", "0.5980273", "0.597956", "0.5972314", "0.5950174", "0.59446335",...
0.64178765
5
Find index of value in list of all values in order
def find(self, value): if self.value is None: raise BinaryTreeValueError("Value {} not in tree") if self.value == value: return self.left_length elif value < self.value: # Value is in left side of tree return self.left.find(value) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def my_index(list_, element):\n pos = []\n for i in range(len(list_)):\n if list_[i] == element:\n pos.append(i)\n return pos", "def closest_value_index(val, lst):\n index = 0\n for item in lst:\n if item > val:\n return index\n index += 1\n return ind...
[ "0.7532725", "0.7484546", "0.74589026", "0.74504524", "0.7419067", "0.73378074", "0.7203705", "0.7197957", "0.7191334", "0.7110775", "0.7092161", "0.70612705", "0.70422155", "0.70068043", "0.69598395", "0.6955974", "0.6950577", "0.6940253", "0.6940253", "0.6920599", "0.691786...
0.0
-1
Generates an OAuth signature base string.
def _GenerateSignatureBaseString(self, method, request_url_base, params): return self._EscapeAndJoin([method, request_url_base, self._FormatUrlParams(params)])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_signature_base_string(request):\n host = request.headers.get('Host', None)\n return construct_base_string(\n request.method, request.uri, request.params, host)", "def gen_sig():\n return hashlib.md5(\n (\n app.config[\"ROVI_API_KEY\"]\n + app.config[\"ROV...
[ "0.736893", "0.7208373", "0.7064697", "0.68775475", "0.6859103", "0.6852042", "0.68355495", "0.6764253", "0.67425436", "0.6705795", "0.6700978", "0.6636258", "0.6623831", "0.6546438", "0.64699537", "0.64031535", "0.6395618", "0.6308579", "0.6290144", "0.6283487", "0.62827814"...
0.7624434
0
Updates [last_updated] utc time
def refresh_last_updated(self, utc_now=None): self.last_updated = self.__class__.get_site_last_updated(utc_now)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_last_updated(location: tracker.Location):\n last_update = location.last_updated[:10]\n GLOBAL.update({\"last_update\": last_update})", "def last_updated(self, last_updated):\n\n self._last_updated = last_updated", "def last_updated(self, last_updated):\n\n self._last_updated = la...
[ "0.757778", "0.7530135", "0.7530135", "0.7530135", "0.7530135", "0.74789643", "0.7456579", "0.7339966", "0.7339966", "0.7197497", "0.7042222", "0.6987744", "0.69785434", "0.6956932", "0.6942583", "0.6938877", "0.6918768", "0.6911001", "0.6906029", "0.6877801", "0.6877801", ...
0.73739606
7
get the activation function accroding to the activation name
def get_activation(activation_string): act = activation_string.lower() if act == 'tanh': return torch.tanh elif act == 'relu': return torch.relu elif act == 'selu': return torch.relu elif act == 'sigmoid': return torch.sigmoid elif act == 'gelu': retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_activation(name):\n if name not in _ACTIVATIONS.keys():\n raise ValueError(f\"{name} is not a valid activation function.\")\n return _ACTIVATIONS[name]", "def _get_activation_fn(activation):\n if activation == \"relu\":\n return ReLU()\n if activation == \"gelu\":\n retur...
[ "0.8317842", "0.82893294", "0.8258561", "0.82412004", "0.8234802", "0.8095733", "0.79914206", "0.7961299", "0.7955533", "0.7923966", "0.7903511", "0.7724673", "0.7720649", "0.7715285", "0.76338696", "0.7624434", "0.7583851", "0.74913543", "0.7371628", "0.7345955", "0.7234232"...
0.78102434
11
Convert a datetime to an ISOformat string. >>> datetime_to_str(datetime(2007, 2, 25, 23, 6, 20))
def datetime_to_str(obj): return obj.strftime("%Y-%m-%d %H:%M:%S")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dt_to_str(dt):\n return dt.isoformat()", "def datetime_to_str(dt):\n return dt.replace(microsecond=0).isoformat()", "def datetime_to_str(dt: Union[str, datetime]) -> str:\n if isinstance(dt, datetime):\n dt = dt.replace(tzinfo=timezone.utc).isoformat(\" \").replace(\"+00:00\", \"Z\")\n r...
[ "0.78676593", "0.7664634", "0.7639929", "0.75843674", "0.74946666", "0.7417039", "0.73847365", "0.7345194", "0.7315764", "0.7304638", "0.72038716", "0.7203288", "0.7203288", "0.708725", "0.6952455", "0.69373834", "0.69222623", "0.68893313", "0.6825355", "0.6815628", "0.680294...
0.7317027
8
Format a DateTime object as an ISO timestamp.
def datetime_to_sql(connection, obj): return connection.string_literal(datetime_to_str(obj))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_datetime(self, datetime):\n return datetime.isoformat()", "def format_iso8601(obj):\n return obj.strftime('%Y-%m-%dT%H:%M:%SZ')", "def dateformat(timestamp):\n date = datetime.datetime.fromtimestamp(int(timestamp))\n return date.isoformat()", "def format_datetime(timestamp):\n r...
[ "0.79028666", "0.7480532", "0.7215368", "0.721381", "0.71884257", "0.7100945", "0.69545853", "0.68932396", "0.6891271", "0.6891271", "0.6891271", "0.68668425", "0.68529373", "0.67872906", "0.67713124", "0.6748121", "0.6719149", "0.6713262", "0.66709864", "0.66685486", "0.6641...
0.0
-1
Format a timedelta as an SQL literal.
def timedelta_to_sql(connection, obj): return connection.string_literal(timedelta_to_str(obj))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_interval_sql(self, timedelta):\n sec = timedelta.seconds + timedelta.days * 86400\n sql = 'TIMESTAMPADD(\\'s\\', %d%%s, %%s)' % sec\n if timedelta.microseconds:\n sql = 'TIMESTAMPADD(\\'f\\', %d%%s, %s)' % (timedelta.microseconds, sql)\n return sql", "def timedelta...
[ "0.7229481", "0.62992066", "0.62939465", "0.6281791", "0.61210996", "0.59613335", "0.5893386", "0.58474344", "0.58160055", "0.581568", "0.57942206", "0.5776712", "0.5772801", "0.5737873", "0.572866", "0.57227194", "0.57119244", "0.5687333", "0.56861955", "0.56806666", "0.5676...
0.7176775
1
Convert a MySQL TIMESTAMP to a Timestamp object.
def mysql_timestamp_converter(timestamp): if timestamp[4] == '-': return datetime_or_None(timestamp) timestamp += "0"*(14-len(timestamp)) # padding year, month, day, hour, minute, second = \ int(timestamp[:4]), int(timestamp[4:6]), int(timestamp[6:8]), \ int(timestamp[8:10]), int(tim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_db(timestamp):\n if isinstance(timestamp, str):\n timestamp = int(timestamp)\n return datetime.utcfromtimestamp(timestamp).replace(tzinfo=timezone)", "def parse_timestamp(ts):\n return DateTimeField()._to_python(ts)", "def datetime_to_timestamp(obj: \"datetime\") -> \"Timestamp\":\n ...
[ "0.66366196", "0.66220766", "0.6245863", "0.6244576", "0.622798", "0.61787564", "0.6140325", "0.61329424", "0.60821825", "0.60371965", "0.6001011", "0.5989731", "0.596713", "0.596713", "0.5959264", "0.59541994", "0.5943081", "0.59394383", "0.58756524", "0.58474004", "0.584230...
0.7331435
0
Predicate that checks if the given value is a negative integer.
def negint_p(value): # check if the value has the expected type if type(value) is not int: raise Invalid("invalid value type {value}".format(value=value)) if value >= 0: raise Invalid("invalid value {value}, negative integer expected".format(value=value))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_non_negative_int(item):\n if not isinstance(item, int):\n return False\n return item >= 0", "def negint_zero_p(value):\n # check if the value has the expected type\n if type(value) is not int:\n raise Invalid(\"invalid value type {value}\".format(value=value))\n if value > 0:...
[ "0.76449543", "0.7468947", "0.7379193", "0.73452204", "0.73017144", "0.7136625", "0.694813", "0.6858575", "0.6835551", "0.68287253", "0.6752126", "0.6738628", "0.6719284", "0.6668993", "0.6571704", "0.65154886", "0.64808494", "0.64742666", "0.64656025", "0.64187825", "0.64086...
0.7773273
0
Predicate that checks if the given value is positive integer or zero.
def posint_zero_p(value): # check if the value has the expected type if type(value) is not int: raise Invalid("invalid value type {value}".format(value=value)) if value < 0: raise Invalid("invalid value {value}, positive value or zero expected".format(value=value))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def negint_zero_p(value):\n # check if the value has the expected type\n if type(value) is not int:\n raise Invalid(\"invalid value type {value}\".format(value=value))\n if value > 0:\n raise Invalid(\"invalid value {value}, negative value or zero expected\".format(value=value))", "def _is...
[ "0.75186765", "0.7503303", "0.7448956", "0.7255982", "0.7155963", "0.7077019", "0.69996965", "0.6890939", "0.68873394", "0.6819296", "0.6814821", "0.68025464", "0.67848456", "0.677748", "0.67392915", "0.6667022", "0.6631298", "0.6628077", "0.66226554", "0.66204244", "0.661488...
0.71631724
4
Predicate that checks if the given value is negative integer or zero.
def negint_zero_p(value): # check if the value has the expected type if type(value) is not int: raise Invalid("invalid value type {value}".format(value=value)) if value > 0: raise Invalid("invalid value {value}, negative value or zero expected".format(value=value))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isnegative(x):\n if x < 0 :\n return True\n return False", "def negint_p(value):\n # check if the value has the expected type\n if type(value) is not int:\n raise Invalid(\"invalid value type {value}\".format(value=value))\n if value >= 0:\n raise Invalid(\"invalid value {...
[ "0.7576501", "0.7474212", "0.73746485", "0.72496367", "0.7220457", "0.7207773", "0.7094535", "0.6907548", "0.69054323", "0.68839335", "0.68379635", "0.6837789", "0.67835075", "0.67640376", "0.6756352", "0.6694036", "0.6685191", "0.66507864", "0.6638962", "0.66224456", "0.6611...
0.7866117
0
Gets the specified local variable from this context, translating it with foreign_get if need be before returning it.
def __getitem__(self, item): return foreign_get(self.vars, item)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_value(self, value, context):\n try:\n var_value = template.Variable(value).resolve(context)\n except template.VariableDoesNotExist:\n try:\n var_value = self.var_value.var\n except AttributeError:\n var_value = self.var_value\n ...
[ "0.6281856", "0.62073773", "0.59864604", "0.59196836", "0.586826", "0.5861596", "0.58443457", "0.58443457", "0.58098936", "0.5775154", "0.57407874", "0.561636", "0.56161934", "0.5594224", "0.55908054", "0.55298406", "0.5474362", "0.54705954", "0.54582846", "0.5449075", "0.543...
0.58188236
8
Translates a foreign Python object into a Factcompatible object. If the argument is None, Null is returned. If the argument is an instance of int, long, or float, Decimal(object) is returned. Otherwise, the object is returned asis.
def foreign_translate(object): if object == None: return Null if isinstance(object, (int, long, float)): return Decimal(object) return object
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tryConvertToFloat(obj: Any) -> float:\n\n try:\n return float(obj)\n except:\n return None", "def decimal_default(obj):\n if isinstance(obj, Decimal):\n return float(obj)\n raise TypeError", "def object_hook(self, obj: Any) -> Any:\n if '__type__' in obj:\n if o...
[ "0.6008324", "0.58701", "0.57191294", "0.5691085", "0.5646888", "0.5567495", "0.5533999", "0.54340535", "0.54147744", "0.5354443", "0.5351552", "0.5282516", "0.52809113", "0.5268117", "0.5263787", "0.52551466", "0.52525455", "0.52377254", "0.52247816", "0.52238506", "0.521626...
0.8148448
0
Initializes the spell checker class by saving the userprovided lexicon.
def __init__(self, lexicon): self._lexicon = set(lexicon)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, c: Cmdr) -> None:\n # pylint: disable=super-init-not-called\n self.c = c\n if not g.app.spellDict:\n g.app.spellDict = DefaultDict()\n self.d = g.app.spellDict\n self.user_fn = self.find_user_dict()\n if not g.os_path_exists(self.user_fn):\n ...
[ "0.654293", "0.64678425", "0.5689127", "0.5678541", "0.55306923", "0.55176795", "0.5489383", "0.54770434", "0.54635715", "0.5368643", "0.5346819", "0.5344363", "0.5338366", "0.5321182", "0.5318055", "0.52989304", "0.5276699", "0.52601403", "0.52443755", "0.5219797", "0.520643...
0.66787386
0
Change infix to postfix notation of expression. Implementation of ShuntingYard algorithm.
def _get_postfix_notation(self): postfix, operators_stack = list(), list() # initialize postfix list and auxiliary stack for element in self.expression.split(): if element in self.OPERATORS: if operators_stack: # while stack isn't empty and "stack top" i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def infix_to_postfix(input_str): # postfix requires that all operators proceed after the two operands that they work on\n\n \"\"\"Input argument: a string containing an infix expression where tokens are \n space separated. Tokens are either operators + - * / ** << >> or numbers (integers or floats)\n Re...
[ "0.7760477", "0.7745189", "0.7718626", "0.7652244", "0.7607811", "0.7523188", "0.7508402", "0.7486393", "0.7402038", "0.7392017", "0.73868144", "0.7370718", "0.73401034", "0.72938496", "0.7280501", "0.727821", "0.71873486", "0.71553475", "0.7065257", "0.7033691", "0.68291956"...
0.67330694
22
Insert creates a Node with the value that was passed and adds it to the head of the linked list shifting all other values down
def insert(self, value): # create new node # self.head =new_node current = self.head if current == None: self.head = Node(value, self.head) return while current.next != None: current=current.next new_node=Node(value) current.next=new_node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, value):\n self.head = Node(value, self.head)", "def __insert(self, node, value):\n #if DEBUG: print('\\t__insert({})'.format(value))\n\n new = Node(value, node.next)\n node.next = new\n return new", "def insert(self, value):\n node = Node(value)\n\n ...
[ "0.8457192", "0.8395585", "0.8340579", "0.8301057", "0.8301057", "0.81973827", "0.81965053", "0.8109922", "0.8077667", "0.8004825", "0.7970426", "0.7875683", "0.78648967", "0.78642124", "0.78512996", "0.7771193", "0.7739888", "0.7712463", "0.7712463", "0.7706978", "0.756674",...
0.8472679
0
Return s if nonempty, raising an error otherwise.
def get_stripped_string(s, name='String', max_len=None, check_nonempty=False): s = s.strip() if check_nonempty and not len(s): raise ValueError('{} must be non-empty'.format(name)) if max_len and len(s) > max_len: raise ValueError("{} can't exceed {} characters".format(name, max_len)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def s2s(s):\n if (s is None): return \"\"\n else: return s", "def IsEmptyString (s) :\n if s is None : return True\n elif isinstance (s, str) :\n return len (s) == 0 \n else :\n raise PQHException (\"the type is unexpected %s\" % str (type (s)))", "def get_nonempty_str(arg: Any) ->...
[ "0.66419125", "0.6200185", "0.6025664", "0.600971", "0.59224993", "0.59059083", "0.5808339", "0.57989556", "0.57927364", "0.5704162", "0.5541168", "0.550369", "0.54565024", "0.54348814", "0.54127765", "0.5394421", "0.53688776", "0.5364834", "0.5360567", "0.53527504", "0.53477...
0.490422
60
Returns the repl of the object
def __repr__(self): return f"{self.__class__.__name__}('{self.color}')"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repl(self):\n raise NotImplementedError", "def __repr__(self):\n\n rep = \"\"\n rep += str(self.literal)+\"\\n\"\n rep += str(self.bindings)+\"\\n\"\n rep += str(self.facts)+\"\\n\"\n return (rep)", "def repr_(object_):\n return repr(object_)", "def __repr__(s...
[ "0.7053237", "0.6670055", "0.63939816", "0.62073827", "0.61711717", "0.608401", "0.6063401", "0.5965866", "0.5965866", "0.5965866", "0.59549594", "0.5933642", "0.5890286", "0.587594", "0.587594", "0.587594", "0.587594", "0.587594", "0.587594", "0.587594", "0.587594", "0.587...
0.0
-1
String representation of Model Instance
def __str__(self): return self.name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return super().__str__() + self.model.__str__()", "def __repr__(self):\n\n mod = f\"{self.__class__.__name__} Model\"\n try:\n mod += f': {self.filename}'\n except AttributeError:\n pass\n s = [mod]\n for name, v in self.metadat...
[ "0.8065356", "0.77953434", "0.77671736", "0.7763703", "0.7763703", "0.77576363", "0.7719007", "0.7718892", "0.761666", "0.761666", "0.761666", "0.761666", "0.761666", "0.75863343", "0.75582963", "0.75468737", "0.7536233", "0.75200176", "0.75200176", "0.75188524", "0.7487686",...
0.0
-1
Initialize this binary tree node with the given data.
def __init__(self, data): self.data = data self.height = 0 self.left_child = None self.right_child = None self.parent = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, data):\n self.data = data\n self.left = None\n self.right = None", "def __init__(self, data: typing.Any = None, left: 'TreeNode' = None, right: 'TreeNode' = None) -> None:\n self.data = data\n self.left = left\n self.right = right", "def __init__(sel...
[ "0.7925892", "0.77987707", "0.7695938", "0.7685663", "0.76624715", "0.76528627", "0.7622138", "0.7591916", "0.7449524", "0.7411261", "0.73640245", "0.733675", "0.7261586", "0.72121537", "0.7205279", "0.7188753", "0.71264344", "0.69629276", "0.6957409", "0.69100016", "0.689796...
0.714572
16
Return a string representation of this binary tree node.
def __repr__(self): return 'AVLNode({!r})'.format(self.data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_string(self):\n tree_structure_str = self.node_to_string(self.root, 0, is_add_children=True).rstrip()\n return tree_structure_str", "def __str__(self):\n return self._tree.toString()", "def __repr__(self: 'BinaryTree') -> str:\n return 'BinaryTree({}, {}, {})'.format(repr(sel...
[ "0.84978807", "0.8147784", "0.8078909", "0.80536044", "0.8035283", "0.7851122", "0.7815888", "0.7795857", "0.77659476", "0.77610415", "0.77605", "0.7733769", "0.7731285", "0.77247316", "0.7717144", "0.76829624", "0.76829624", "0.7682672", "0.7614114", "0.76087064", "0.7608706...
0.0
-1
Determine the (near) target.
def determine_target(metric, measurement: Dict, metric_type, scale: Scale, target: TargetType): metric_scale = metric.get("scale", "count") # The current scale chosen by the user target_value = metric.get(target, metric_type.get(target)) if scale == metric_scale else \ measurement.get(scale, {}).get(ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_appropriate_target(self):\n pass", "def calculate_appropriate_target(self):\n pass", "def getNearestTarget(self):\n if self.myShipHull.abr in globals.targetPreference.keys():\n closestShip = self.getNearestPreference(self.myShipHull.abr)\n if closestShip...
[ "0.7543588", "0.7543588", "0.71332306", "0.69679135", "0.69679135", "0.68098086", "0.67835677", "0.66843957", "0.6616916", "0.6611016", "0.6606815", "0.6521117", "0.6517617", "0.6500022", "0.6493816", "0.64901495", "0.6458899", "0.64528847", "0.6442262", "0.64408493", "0.6413...
0.0
-1
Test hgate circuits compiling to backend default basis_gates.
def test_h_gate_deterministic_default_basis_gates(self): shots = 100 circuits = ref_1q_clifford.h_gate_circuits_deterministic(final_measure=True) targets = ref_1q_clifford.h_gate_counts_deterministic(shots) job = execute(circuits, QasmSimulator(), shots=shots) result = job.result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_h_gate_nondeterministic_default_basis_gates(self):\n shots = 2000\n circuits = ref_1q_clifford.h_gate_circuits_nondeterministic(final_measure=True)\n targets = ref_1q_clifford.h_gate_counts_nondeterministic(shots)\n job = execute(circuits, QasmSimulator(), shots=shots)\n ...
[ "0.7311219", "0.70985526", "0.70709527", "0.70320475", "0.7025713", "0.70192087", "0.70135796", "0.7009941", "0.70019996", "0.6986258", "0.6979626", "0.69720346", "0.69576406", "0.69402295", "0.6919484", "0.6905945", "0.68735766", "0.6868921", "0.6837906", "0.6829673", "0.682...
0.7199496
1
Test hgate circuits compiling to backend default basis_gates.
def test_h_gate_nondeterministic_default_basis_gates(self): shots = 2000 circuits = ref_1q_clifford.h_gate_circuits_nondeterministic(final_measure=True) targets = ref_1q_clifford.h_gate_counts_nondeterministic(shots) job = execute(circuits, QasmSimulator(), shots=shots) result = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_h_gate_deterministic_default_basis_gates(self):\n shots = 100\n circuits = ref_1q_clifford.h_gate_circuits_deterministic(final_measure=True)\n targets = ref_1q_clifford.h_gate_counts_deterministic(shots)\n job = execute(circuits, QasmSimulator(), shots=shots)\n result = ...
[ "0.7201437", "0.71012986", "0.7074931", "0.7032599", "0.7026177", "0.70196384", "0.70142055", "0.70105356", "0.7004605", "0.6986856", "0.6980142", "0.6972634", "0.69616556", "0.6940778", "0.69202393", "0.690664", "0.6874642", "0.6869879", "0.683847", "0.68302", "0.6827987", ...
0.73133844
0