query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Resets the state of the neural network, along with any other variables needed in order to do a fresh run again.
def reset(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_nn(self): # Clear current network\n self.weights = np.zeros((p.num_rovers, self.n_weights))\n self.in_layer = np.zeros((p.num_rovers, self.n_inputs))\n self.hid_layer = np.zeros((p.num_rovers, self.n_nodes))\n self.out_layer = np.zeros((p.num_rovers, self.n_outputs))", "def...
[ "0.7880321", "0.78002226", "0.7531527", "0.75092876", "0.75068665", "0.7474181", "0.7357109", "0.7344425", "0.7333064", "0.7318081", "0.73131037", "0.72209865", "0.7214696", "0.7187278", "0.7153335", "0.715315", "0.71528673", "0.71425", "0.71425", "0.71425", "0.71425", "0.7...
0.0
-1
A method to run the neural network either from initial conditions or given some timeseries.
def run(self, input_time_series=None, num_iter=None, record=False, output=False): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run(self):\n\n # initializing random network activity\n s_rand_T = np.zeros((self.T, self.N_rand))\n p_rand_T = np.zeros((self.T, self.N_rand))\n r_rand_T = np.zeros((self.T, self.N_rand))\n\n s_rand_T[0, :] = np.random.uniform(low=0, high=0.01, size=(self.N_rand))\n\n ...
[ "0.6435009", "0.6408294", "0.62199914", "0.6063569", "0.5999021", "0.59974307", "0.5964406", "0.5948159", "0.59159386", "0.58712006", "0.5849134", "0.58344066", "0.5831203", "0.58048594", "0.5763043", "0.57229227", "0.5711433", "0.56882596", "0.5686381", "0.56621706", "0.5658...
0.6077671
3
Takes the weights determined by the regression and assigned them to the ESNs output layer.
def set_output_weights(self, weight_matrix): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def temp_ann(S_SHSTA_0, S_SHSTA_1, S_SHSTA_2, S_SHSTA_3, I_SHSTA_0, I_SHSTA_1,\n I_SHSTA_2, I_SHSTA_3, C_KSWCK_0, C_KSWCK_1, C_KSWCK_2, C_KSWCK_3):\n # Construct input array.\n x = np.array([S_SHSTA_0, S_SHSTA_1, S_SHSTA_2, S_SHSTA_3,\n I_SHSTA_0, I_SHSTA_1, I_SHSTA_2, I_SHSTA_3,...
[ "0.5999145", "0.58579427", "0.5812409", "0.57954836", "0.5726281", "0.57114553", "0.57017416", "0.568301", "0.5676735", "0.5666106", "0.5652474", "0.560797", "0.560608", "0.55899954", "0.55861115", "0.55798537", "0.5576543", "0.55662894", "0.5556189", "0.5511135", "0.5473635"...
0.55792314
16
Sets all initial states self.initial_state should be either None, or a Distribution or other callable object that can be given a size argument
def generate_initial_state(self, x): if self.initial_state is None: x[:] = 0 return x else: x[:] = self.initial_state(size=(self._num_neurons, 1)) return x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_state(self) -> None:\n self.state = np.zeros(self.shape, dtype=int)", "def __init__(self, state_size, action_size):\n self.state_size = state_size\n self.action_size = action_size\n \n # Initialize any other variables here\n \n self.build_model()", "def...
[ "0.7149638", "0.6990824", "0.6903738", "0.689733", "0.6874618", "0.6871166", "0.6713461", "0.6708635", "0.6682572", "0.665747", "0.66421795", "0.66378814", "0.660282", "0.66008973", "0.6594308", "0.65621763", "0.6547327", "0.6492674", "0.6467792", "0.64563745", "0.64276105", ...
0.0
-1
Ideally the view should be over the major axis, which for numpy is rows.
def step(self, input_array, record=False): np.dot(self.input_weights, input_array, out=self.input_state) np.dot(self.reservoir, self.state, out=self.state) np.add(self.input_state, self.state, out=self.state) self.activation_function(self.state) if record: # Assigns values fro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_layout(self):\n self.layout[:, :, :] = 1\n return self.layout", "def view_yx(self, negative=False, render=True):\n self.view_vector(*view_vectors('yx', negative=negative), render=render)", "def change_orientation(self):\n self.shape = self.shape.T", "def paint_mini_axes(s...
[ "0.6066664", "0.5500399", "0.5495004", "0.5458999", "0.5458999", "0.54447615", "0.5354394", "0.5324086", "0.5269793", "0.5254811", "0.5234368", "0.5183957", "0.5134905", "0.51280797", "0.51090676", "0.5098807", "0.5083782", "0.50653577", "0.50173724", "0.5001926", "0.49983054...
0.0
-1
A stepping function that doesn't require input. Just calls the reservoir on itself.
def no_input_step(self, record=False): np.dot(self.reservoir, self.state, out=self.state) self.activation_function(self.state) if record: # Assigns values from current state to history self._history[self.iteration][:] = self.state[:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def step(self, *args, **kwargs) -> None:\n self.accumulate_step += 1\n if self.accumulate_step < self.accumulate_size:\n pass\n else:\n self.accumulate_step = 0\n self.lr_scheduler.step(*args, **kwargs)", "def _step(self) -> None:", "def _step(self):\n ...
[ "0.65268475", "0.64351755", "0.6148825", "0.6110678", "0.6091338", "0.60654366", "0.60472417", "0.60318816", "0.59945935", "0.59942573", "0.5965384", "0.59546286", "0.5938722", "0.5938722", "0.5938722", "0.5937739", "0.5929299", "0.59285", "0.5909397", "0.59074146", "0.589835...
0.0
-1
Calculate the networks response given an input_array view Writes inplace onto the output_buffer, which should be the output attribute.
def response(self, input_array, output_buffer): self.full_state[:self._num_neurons] = self.state self.full_state[self._num_neurons:] = input_array # Ox(N+K) * (N+k)x1 = Ox1 np.dot(self.output_weight_matrix_t, self.full_state, out=output_buffer) self.output_function(output_buffer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output(self):\n # print \"Neuron output\"\n\n if self.output_cache is not None:\n # print self, \"returning from cache\"\n return self.output_cache\n\n self.inputs_cache = []\n\n sum = 0\n for input_edge in self.inputs:\n input = input_edge.fr...
[ "0.55928963", "0.5376753", "0.53665227", "0.5296144", "0.527639", "0.5235963", "0.52188903", "0.5217325", "0.5138259", "0.51363903", "0.51081425", "0.50779176", "0.5035379", "0.50321174", "0.50214463", "0.5021284", "0.50130475", "0.5010053", "0.4997446", "0.4995831", "0.49893...
0.760667
0
Reinitializes the history Reinitializes the output
def run(self, input_time_series=None, num_iter=None, record=False, output=False): if num_iter is None: num_iter = len(input_time_series) # Initialize the history for this run if record: self._history = np.zeros((num_iter, self._num_neurons, 1), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset(self):\n self.history = ['<s>'] if self.history_len > 0 else []", "def reset(self):\n # This also resets the history.\n self.__init__(**self.init_kwargs)", "def __init__(self, history=None):\n\n self.__history = history if history else []", "def FreshStart(self):\n ...
[ "0.7359974", "0.72409767", "0.71320385", "0.7050454", "0.697873", "0.69392467", "0.6877665", "0.68024343", "0.67511576", "0.67399", "0.6653405", "0.663495", "0.66119045", "0.6499459", "0.6358003", "0.63518155", "0.63470787", "0.6343152", "0.6338418", "0.63175476", "0.63175476...
0.0
-1
Only allocates memory if current array doesn't exist or isn't the right shape.
def _initialize_output(self, num_iter): if not (self.output_weight_matrix_t is None) and not (self.output is None): if self.output.shape[0] == num_iter: return self.output else: # Has shape TxO return np.zeros((num_iter, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_arrays(current_arrays, fields, sizes, factor, required):\n\n # Nothing supplied so we build it out\n if current_arrays is None:\n current_arrays = {}\n\n for label in fields:\n if required:\n size = sizes[label]\n current_arrays[label] = np.zeros((factor, siz...
[ "0.6361339", "0.6295165", "0.6275384", "0.6200136", "0.61317766", "0.61177295", "0.6059253", "0.60101765", "0.60041034", "0.5937751", "0.5891779", "0.58859175", "0.58191615", "0.5767797", "0.56831354", "0.56753623", "0.56236684", "0.56001306", "0.55885", "0.55293155", "0.5519...
0.0
-1
Takes the weights determined by the regression and assigned them to the output weight matrix. It also stores the transpose for evaluating the network response.
def set_output_weights(self, weight_matrix): self.output_weight_matrix = weight_matrix # NOTE: transpose returns a view, which is undesirable since it # doesn't change underlying memory position of elements, harming # performance. Using copy() defaults the resulting array to C-order ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_output_weights(self, weight_matrix):\n pass", "def get_output(weight, data, regression= \"logistic\"):\n dot_product = np.matmul(data,weight)\n if regression == \"logistic\":\n output = get_sigmoid(dot_product)\n elif regression == \"probit\":\n output = norm.cdf(dot_product...
[ "0.62622184", "0.6099907", "0.59809464", "0.59226084", "0.588757", "0.58769035", "0.5807121", "0.5786652", "0.56827784", "0.5597509", "0.55609065", "0.5537566", "0.5535183", "0.5484286", "0.54790425", "0.5468608", "0.54455024", "0.5440672", "0.5432752", "0.54239595", "0.54108...
0.6113737
1
Get the base directory for the HOOMD source include path.
def _get_hoomd_include_path(): current_module_path = pathlib.Path(hoomd.__file__).parent.resolve() build_module_path = (pathlib.Path(hoomd.version.build_dir) / 'hoomd').resolve() # use the source directory if this module is in the build directory if current_module_path == build...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_base_dir(self):\n dir_of_this_file = os.path.dirname(os.path.abspath(__file__))\n return os.path.dirname(dir_of_this_file)", "def base_path(self):\n return self.setup.base_path", "def get_basedir():\n pydir = os.path.dirname(os.path.realpath(__file__))\n return os.path.abspat...
[ "0.7442867", "0.7395388", "0.7299446", "0.72828186", "0.7278307", "0.72629154", "0.72075653", "0.7153355", "0.7074621", "0.7011946", "0.6945648", "0.68774784", "0.68459976", "0.6814923", "0.67840946", "0.67808783", "0.67687577", "0.67571956", "0.673957", "0.6711352", "0.67090...
0.75955003
0
Get the arguments to pass to the compiler. These arguments must include the include patch for HOOMD's include files.
def get_cpu_compiler_arguments(): return ['-I', str(_get_hoomd_include_path()), '-O3']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cmd_args():\n\n\n\t#Creates the Argument Parser\n\tparser = ArgumentParser(description = \"ID Lab qPCR Analysis v\" + VERSION + \" \" + QUALITY)\n\n\t#Adds the input file argument\n\tparser.add_argument('-f', '--file',\n\t\t\t\tnargs = '+',\n\t\t\t\ttype = FileType('r'),\n\t\t\t\trequired = True)\n\n\t#Add...
[ "0.62126195", "0.6209011", "0.6146279", "0.60574615", "0.6017521", "0.6017049", "0.5986454", "0.5982572", "0.59781384", "0.59694815", "0.59504384", "0.5947426", "0.5947385", "0.5942806", "0.5933377", "0.5913432", "0.5913432", "0.5913432", "0.5911532", "0.5909301", "0.59056324...
0.7048054
0
Helper function to set CUDA libraries for GPU execution.
def get_gpu_compilation_settings(gpu): hoomd_include_path = _get_hoomd_include_path() includes = [ "-I" + str(hoomd_include_path), "-I" + str(hoomd_include_path / 'hoomd' / 'extern' / 'HIP' / 'include'), "-I" + str(hoomd.version.cuda_include_path), ] # compile JIT code for the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cuda(self):\n for i in self.modules:\n if torch.cuda.is_available():\n self.modules[i] = self.modules[i].cuda()", "def set_devices(args):\n global devices\n if args is not None:\n devices = [torch.device(i) for i in ast.literal_eval('[' + args + ']')]\n torch.cuda.set_devic...
[ "0.7284061", "0.66941637", "0.6596057", "0.65938175", "0.6509792", "0.64021266", "0.6358296", "0.63580513", "0.6253501", "0.612845", "0.6072815", "0.60680354", "0.60328954", "0.60218555", "0.5996114", "0.59494394", "0.5926374", "0.59189767", "0.59081894", "0.5884362", "0.5864...
0.0
-1
Returns node as a string, optionally with parentheses around it if needed to enforce precendence rules.
def _requires_parentheses(self, parent, node): if isinstance(node, (UnaryOp, BinaryOp, TernaryOp)) and\ isinstance(parent, (UnaryOp, BinaryOp, TernaryOp, Cast)): prec = get_precedence(node) parent_prec = get_precedence(parent) is_not_last_child = isinstance(pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wrap(node: AbstractNode) -> str:\n if isinstance(node, InfixNode):\n return \"(\" + str(node) + \")\"\n else:\n return str(node)", "def as_str(node):\n node_string = ' '.join(k for k, _ in node.leaves())\n return u' '.join(node_string.split())", "def get_node_tree_print_st...
[ "0.7320124", "0.7242382", "0.72074324", "0.69518703", "0.6833619", "0.6551378", "0.65474993", "0.65347934", "0.6503393", "0.6494106", "0.6480634", "0.64466184", "0.63955325", "0.6380736", "0.6361004", "0.62897784", "0.6279723", "0.6273931", "0.626453", "0.621889", "0.62174445...
0.0
-1
Compute the combination coefficients alpha_i in Anderson acceleration, i.e., solve argmin sum_{i=0}^m alpha_i r_{ki}, s.t. sum_{i=0}^{m} alpha_i = 1 Solve using the equivalent least square problem by eliminating the constraint
def AA(R_history): nc = R_history.shape[1]; # Construct least square matrix if (nc == 1): c = np.ones(1) else: Y = R_history[:,1:] - R_history[:,0:-1] b = R_history[:,-1] q, r = np.linalg.qr(Y) z = np.linalg.solve(r, q.T @ b) c = np.r_[z[0], z[1:] - z[0:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def search_alpha_min(self):\n alpha_min = 0\n\n for alpha in range(0, 180, 4):\n r = self.solver(alpha)[0]\n if r[-1] > 1.1*self.Rs:\n break\n\n if (alpha-4) > 0:\n alpha_min = alpha - 4\n # print(\"alpha_min :\",alpha_min,\"(-4)\")\n ...
[ "0.5838576", "0.5823878", "0.5788735", "0.57841367", "0.5727005", "0.5723913", "0.56826437", "0.5649208", "0.56158096", "0.5600584", "0.5594708", "0.5553895", "0.55450785", "0.5530196", "0.5498106", "0.5483736", "0.5388873", "0.536654", "0.5359216", "0.53507817", "0.53429836"...
0.0
-1
Function for saving data to a pickle file.
def save_data(data: Any, file_name: str) -> None: with open(file_name, "wb") as output: pickle.dump(data, output)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(data, filename):\r\n with open(filename, 'wb') as fp:\r\n pickle.dump(data, fp)", "def pickle(self,data,filename):\n pickle.dump(data, open(filename, 'wb'))", "def save(fname, data):\r\n with open(fname, 'wb') as f:\r\n pickle.dump(data, f)", "def save_pickle_file(file, da...
[ "0.8371418", "0.83406436", "0.82590467", "0.8124453", "0.8049911", "0.8027126", "0.8024715", "0.78496397", "0.7845194", "0.78366786", "0.76677006", "0.76463234", "0.7645486", "0.762831", "0.7625999", "0.762573", "0.760232", "0.7587863", "0.75776774", "0.7574935", "0.75628287"...
0.8204657
3
Function for reading data from a pickle file.
def load_data(file_name: str) -> Optional[Any]: with open(file_name, "rb") as input_data: data = pickle.load(input_data) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_pickle(path):\n with open(path, \"rb\") as f:\n data = pickle.load(f)\n\n return data", "def pickle_read(file_path):\n\n with open(file_path, 'rb') as file:\n return pickle.load(file)", "def read_pickle(file_path):\n with open(file_path, 'rb') as file:\n return pickle....
[ "0.80139023", "0.7804303", "0.77949333", "0.77497596", "0.7746418", "0.7737669", "0.76539344", "0.7618108", "0.7610424", "0.7610424", "0.76042247", "0.75794494", "0.75561696", "0.75393826", "0.75285417", "0.74873435", "0.73690647", "0.7359515", "0.7288819", "0.72271925", "0.7...
0.7349007
18
Obtaining a Pauli error rate from an empirical decay curve.
def pauli_error_fit( num_cycle_range: np.ndarray, data: np.ndarray, *, num_qubits: int = 2, add_offset: bool = False ) -> Tuple[float, np.ndarray, np.ndarray]: f_s = 1.0e2 def _exp_decay_with_offset( length: np.ndarray, err: float, a_coeff: float, b_coeff: float ) -> np.ndarray: p = 1.0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pauli_error_to_decay_constant(self, pauli_error: float, num_qubits: int = 1):\n N = 2 ** num_qubits\n return 1 - (pauli_error / (1 - 1 / N / N))", "def calc_error_amp(amp_pred, pdur, model):\n theta_pred = list(forward_pass(model, pdur, amp_pred))[0]\n return np.log(np.maximum(1e-...
[ "0.6633635", "0.5984317", "0.59809506", "0.5942395", "0.5937436", "0.5909725", "0.5794775", "0.57891876", "0.5784051", "0.5758449", "0.5750015", "0.5750015", "0.5688634", "0.5685889", "0.5682493", "0.5680682", "0.5667898", "0.5656839", "0.5617177", "0.56053925", "0.55998826",...
0.54116875
36
Converts a collection of bitstrings into a probability distribution.
def bits_to_probabilities( all_qubits: Sequence[Tuple[int, int]], subsys_qubits: Sequence[Tuple[int, int]], bits: np.ndarray, ) -> np.ndarray: num_qubits = len(subsys_qubits) indices = [all_qubits.index(q) for q in subsys_qubits] bits_red = np.asarray(bits[:, indices], dtype=int) for i in ra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _subset_probability(self, strings, distribution):\n return sum([distribution.get(value, 0) for value in strings])", "def get_probability(some_dict, some_string):\n lowercase_review = some_string.lower()\n split_review = lowercase_review.split()\n product = 1 \n for word in split_review:\n ...
[ "0.6407181", "0.60309595", "0.60273093", "0.5953324", "0.59460145", "0.59174967", "0.58379996", "0.57809484", "0.5766862", "0.574746", "0.56745225", "0.56645024", "0.56295586", "0.56137174", "0.5611615", "0.56004035", "0.55773675", "0.5561261", "0.54970413", "0.5494817", "0.5...
0.62023234
1
Converts five phases to a 2x2 FSIM unitary.
def angles_to_fsim( theta: float, phi: float, delta_plus: float, delta_minus_diag: float, delta_minus_off_diag: float, ) -> np.ndarray: c, s = np.cos(theta), np.sin(theta) u11 = c * np.exp(1j * (delta_plus + delta_minus_diag) / 2.0) u12 = -1j * s * np.exp(1j * (delta_plus - delta_minus_o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_s2n(self, ffile, hdul):\n bname = os.path.basename(ffile)\n phu = hdul[0].copy()\n phu.data = None\n if 'S/N' in hdul:\n hdu = hdul['S/N']\n else:\n if 'FLUX' in hdul and 'ERROR' in hdul:\n log.debug(f'Making S/N image from FLUX and ...
[ "0.533654", "0.5217769", "0.5197233", "0.51098377", "0.5069837", "0.5061421", "0.5015226", "0.500667", "0.49952194", "0.4973655", "0.49375522", "0.49367362", "0.49252054", "0.49191168", "0.49078643", "0.49048072", "0.48991647", "0.48989207", "0.48896462", "0.4885469", "0.4885...
0.0
-1
Converts a 2x2 FSIM unitary to five phases.
def fsim_to_angles(u_fsim: np.ndarray) -> Dict[str, float]: u_fsim = u_fsim * np.exp(-1j * np.angle(u_fsim[0, 0])) theta = np.arctan(np.abs(u_fsim[1, 2] / u_fsim[1, 1])) delta_plus = np.angle(-u_fsim[1, 2] * u_fsim[2, 1]) phi = -np.angle(u_fsim[3, 3]) + delta_plus delta_minus_off_diag = np.angle(u_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def phases_from_superoperator(U):\n if U.type=='oper':\n phi_00 = np.rad2deg(np.angle(U[0, 0])) # expected to equal 0 because of our\n # choice for the energy, not because of rotating frame. But not guaranteed including the coupling\n phi_01 = np.rad2deg(np.angle(U[1, 1]))\n phi_10 ...
[ "0.5192779", "0.5127877", "0.49415794", "0.49354568", "0.49021092", "0.49012935", "0.4891518", "0.48774505", "0.48685786", "0.48479944", "0.47998342", "0.47963896", "0.47882462", "0.47694787", "0.47688574", "0.47614515", "0.47468448", "0.47390956", "0.47380537", "0.4727242", ...
0.0
-1
Converts five FSIM phases to a list of Cirq ops.
def generic_fsim_gate( fsim_angles: Dict[str, float], qubits: Tuple[cirq.GridQubit, cirq.GridQubit] ) -> List[cirq.OP_TREE]: q_0, q_1 = qubits g_f = [ cirq.Z(q_0) ** ( -( fsim_angles["delta_minus_off_diag"] + fsim_angles["delta_minus_diag"] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timirq_cbfs(tasks):\n try:\n # Execute CBF from cached config\n for cmd in (cmd.strip().split(' ') for cmd in tasks.split(';')):\n if not execute_LM_function_Core(cmd):\n console_write(\"[IRQ] TIMIRQ execute_LM_function_Core error: {}\".format(tasks))\n except Exce...
[ "0.53477407", "0.53030384", "0.5255608", "0.5189386", "0.51183873", "0.51038086", "0.5081808", "0.50801235", "0.5075793", "0.5074403", "0.5062713", "0.5009885", "0.49617997", "0.4950637", "0.4933063", "0.49054557", "0.48731184", "0.48517457", "0.48057553", "0.4788648", "0.477...
0.0
-1
Generates a composite CZ gate with sqrtiSWAP and singlequbit gates.
def cz_to_sqrt_iswap( qubit_0: cirq.GridQubit, qubit_1: cirq.GridQubit, ) -> cirq.Circuit: op_list = [ cirq.Z(qubit_0) ** 0.5, cirq.Z(qubit_1) ** 0.5, cirq.X(qubit_0) ** 0.5, cirq.X(qubit_1) ** -0.5, cirq.ISWAP(qubit_0, qubit_1) ** -0.5, cirq.X(qubit_0) ** -1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gate2zx(box):\n if isinstance(box, (Bra, Ket)):\n dom, cod = (1, 0) if isinstance(box, Bra) else (0, 1)\n return Id(0).tensor(*[\n X(dom, cod, phase=.5 * bit) for bit in box.bitstring])\n if isinstance(box, (Rz, Rx)):\n return (Z if isinstance(box, Rz) else X)(1, 1, box.ph...
[ "0.6479775", "0.606908", "0.6067696", "0.600097", "0.6000181", "0.59230465", "0.58839595", "0.58092767", "0.5749159", "0.5699589", "0.56759256", "0.5625869", "0.56059206", "0.5575785", "0.55034477", "0.5484602", "0.54683816", "0.54502505", "0.54478735", "0.5435558", "0.542716...
0.60810953
1
Splits data into train/val/test subsets
def split(self, train_fraction=0.8, val_fraction=0.2, test_fraction=0, seed=1): if self.is_initialized(): return self.ensure_fraction_sum(train_fraction, val_fraction, test_fraction) np.random.seed(seed) self.samples = sorted(self.samples) np.random.shuffle(self.sampl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train_val_test_split(data):\n raise NotImplementedError", "def __split_dataset(self):\n self.train, self.valid, _, _ = train_test_split(self.data, self.data, test_size=0.2)\n self.valid, self.test, _, _ = train_test_split(self.valid, self.valid, test_size=0.5)", "def split_data_into_train_...
[ "0.8326181", "0.82755184", "0.8240179", "0.7841811", "0.78244966", "0.7819313", "0.77936596", "0.77811414", "0.7773943", "0.7643291", "0.7630211", "0.7630134", "0.7604545", "0.7580003", "0.75724965", "0.7525816", "0.7521702", "0.7519651", "0.75031596", "0.7492511", "0.7489865...
0.705187
73
Constructor for the SubjectAttribute class. This initializes the fields specific to the class, and inherits from the Base class.
def __init__(self, *args, **kwargs): self.logger = logging.getLogger(self.__module__ + '.' + self.__class__.__name__) self.logger.addHandler(logging.NullHandler()) # These are common to all objects self._id = None self._version = None self._links = {} self._tags...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, subject: any) -> None:\n self.subject = subject", "def __init__(self, subject, subject_public_key):\n\n self.subject = subject\n self.subject_public_key = subject_public_key\n self.ca = False\n\n self._hash_algo = 'sha256'\n self._other_extensions = {}...
[ "0.68805003", "0.6658577", "0.6645255", "0.6537347", "0.6537347", "0.62047374", "0.6186341", "0.60285175", "0.6025166", "0.59983367", "0.5989758", "0.59819853", "0.5921729", "0.5894229", "0.58762026", "0.5858054", "0.58576274", "0.58576274", "0.5812425", "0.5812425", "0.58124...
0.7949523
0
The setter for the subject attribute's baseline aerobics exercise level.
def aerobics(self, aerobics): self.logger.debug("In 'aerobics' setter.") self._aerobics = aerobics
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setBaseline(self, baseline):\n self.baseline = AmpObject(baseline, 'limb')", "def baseline(self):\n return self.data[self.data['treatment'] == 'Baseline']", "def baseline_TVOC(self) -> int:\n return self.get_iaq_baseline()[1]", "def base_contribute_score():\n return 1", "def set...
[ "0.6502966", "0.59057164", "0.56737876", "0.55183005", "0.5471039", "0.54096735", "0.52612364", "0.523174", "0.52172095", "0.5176055", "0.5126001", "0.5073766", "0.5030226", "0.49915475", "0.49842808", "0.49601704", "0.49172467", "0.48605382", "0.48490554", "0.48455688", "0.4...
0.0
-1
The setter for the subject attribute's alcohol consumption data.
def alcohol(self, alcohol): self.logger.debug("In 'alcohol' setter.") self._alcohol = alcohol
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def setamplitude(self, value):\n self.instrument.write('AMPL {0}'.format(value))", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def subject_a(self, subject_a):\n\n self...
[ "0.53642905", "0.52938616", "0.5175113", "0.5063071", "0.50269246", "0.50269246", "0.50269246", "0.5021125", "0.4956185", "0.49286798", "0.49017158", "0.4900791", "0.48965985", "0.48779207", "0.4875368", "0.4875368", "0.48706746", "0.48359177", "0.4833197", "0.48326105", "0.4...
0.67048883
0
The setter for the subject attribute's allergy data.
def allergies(self, allergies): self.logger.debug("In 'allergies' setter.") self._allergies = allergies
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject(self, subject):\n\n self._subject = subject", ...
[ "0.70773715", "0.6669434", "0.6669434", "0.66284776", "0.66284776", "0.66284776", "0.6540486", "0.65092987", "0.6489509", "0.6489045", "0.633978", "0.62199193", "0.6204346", "0.6025348", "0.6019166", "0.58925205", "0.588495", "0.58668506", "0.5857473", "0.5768693", "0.5736193...
0.5387654
40
The setter for the subject attribute's asthma data.
def asthma(self, asthma): self.logger.debug("In 'asthma' setter.") self._asthma = asthma
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject_a(self, subject_a):\n\n self._subject_a = subj...
[ "0.71026975", "0.67300826", "0.67300826", "0.66692674", "0.665644", "0.65258163", "0.65258163", "0.65258163", "0.6494668", "0.6454789", "0.6194297", "0.6142468", "0.60333633", "0.6033024", "0.5958287", "0.59167427", "0.5829135", "0.5790848", "0.5789008", "0.57820845", "0.5754...
0.67180276
3
The setter for the coronary artery disease data.
def cad(self, cad): self.logger.debug("In 'cad' setter.") self._cad = cad
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cidade(self, cidade):\n self._cidade = cidade", "def ecology_of_disease(self, ecology_of_disease):\n\n self._ecology_of_disease = ecology_of_disease", "def AddCorrelation(self, ds):\n self.IsCorrelation = True\n self.Correlation = ds", "def treatDisease(self, disease = None):\...
[ "0.54452705", "0.53908396", "0.5332612", "0.52496827", "0.52358633", "0.51721865", "0.51308006", "0.50270617", "0.5023041", "0.5005956", "0.49866706", "0.49836308", "0.49604467", "0.49583635", "0.49549976", "0.4948579", "0.49432927", "0.49384874", "0.49271527", "0.49110594", ...
0.55410296
0
The setter for the chronic heart failure data.
def chf(self, chf): self.logger.debug("In 'chf' setter.") self._chf = chf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_humidity(self, humidity):\n self.humidity = humidity", "def set_humidity(self, humidity):\n raise NotImplementedError()", "def set_mist(self, humidity):\n if humidity > 100:\n humidity = 100\n elif humidity < 0:\n humidity = 0\n # could set ackno...
[ "0.55630296", "0.5530889", "0.5436679", "0.5390286", "0.53516525", "0.5348091", "0.52693766", "0.5253097", "0.5250883", "0.5244358", "0.52181125", "0.52175575", "0.51592106", "0.51592106", "0.51527995", "0.5146734", "0.51065785", "0.50715435", "0.50392747", "0.50392747", "0.5...
0.0
-1
The setter for the comment field. The comment must be a string.
def comment(self, comment): self.logger.debug("In 'comment' setter.") self._comment = comment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_comment(self, comment):\n self.comment_text = str(comment)", "def set_comment(self, comment):\n\t\tself.comment_ = comment", "def comment(self, comment):\n self.logger.debug(\"In 'comment' setter.\")\n\n if len(comment) > 512:\n raise Exception(\"Comment is too long, mus...
[ "0.86464536", "0.858516", "0.84981894", "0.8361004", "0.8356122", "0.8356122", "0.8137892", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.81237066", "0.80302024", "0.7223892", "0.70307696", "0....
0.8592925
1
The setter for the contact field indicating whether the subject wishes to be contacted in the future or not.
def contact(self, contact): self.logger.debug("In 'contact' setter.") self._contact = contact
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact(self, contact):\n\n self._contact = contact", "def contact(self, contact):\n\n self._contact = contact", "def set_raw_contact(self, value: Atoms):\n self._raw_contact = value", "def sequencing_contact(self, sequencing_contact):\n self.logger.debug(\"In 'sequencing_cont...
[ "0.6295653", "0.6295653", "0.60215765", "0.6010511", "0.57705194", "0.5734996", "0.56862885", "0.5654685", "0.55741537", "0.55741537", "0.5554601", "0.5554601", "0.5468744", "0.5468744", "0.5419921", "0.5416634", "0.5405509", "0.53448963", "0.53448963", "0.53360754", "0.53111...
0.68161464
0
The setter for the subject attributes's data for whether the subject has diabetes (including gestational), and if yes, for how long.
def diabetes(self, diabetes): self.logger.debug("In 'diabetes' setter.") self._diabetes = diabetes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isSetLengthUnits(self):\n return _libsbml.Model_isSetLengthUnits(self)", "def __call__(self, dataset: pydicom.dataset.Dataset, data_element: pydicom.DataElement) -> bool:\r\n if data_element.VR not in (\"DA\", \"DT\"):\r\n return False\r\n if not data_element.value:\r\n ...
[ "0.501771", "0.49646726", "0.49345154", "0.49187487", "0.49159834", "0.4910062", "0.48767325", "0.4828682", "0.47632048", "0.4717531", "0.4712025", "0.46947494", "0.46916303", "0.46675122", "0.46645874", "0.46516165", "0.46420413", "0.46161583", "0.46158925", "0.46096882", "0...
0.0
-1
The setter for the subject's education.
def education(self, education): self.logger.debug("In 'education' setter.") self._education = education
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def study(self, study):\n self.logger.debug(\"In 'study' setter.\")\n\n self._study = study", "def set_subject(self, subject):\n self._subject = subject", "def change_subject(self, new_subject):\n raise No...
[ "0.5795873", "0.55750304", "0.5570268", "0.5530429", "0.5493474", "0.5493474", "0.5493474", "0.54005027", "0.5381545", "0.5318309", "0.5318309", "0.5307106", "0.52891785", "0.5287006", "0.52413213", "0.523876", "0.52178764", "0.51306283", "0.51233983", "0.5068059", "0.5049448...
0.84062594
0
The setter for the subject attribute's family history.
def family_history(self, family_history): self.logger.debug("In 'family_history' setter.") self._family_history = family_history
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def history(self, history):\n self._history = history", "def history(self, history):\n\n self._history = history", "def family(self):", "def father(self, father):\n\n self.logger.debug(\"In 'father' setter.\")\n\n self._father = father", "def setModelHistory(self, *args):\n ...
[ "0.59344965", "0.5847449", "0.55912066", "0.5489957", "0.5443313", "0.5224106", "0.5147542", "0.5112606", "0.50875604", "0.5077268", "0.50474036", "0.5041362", "0.5035428", "0.50337815", "0.50030565", "0.49780738", "0.49273506", "0.4916864", "0.48970786", "0.4852568", "0.4844...
0.7772218
0
The setter for the subject's father.
def father(self, father): self.logger.debug("In 'father' setter.") self._father = father
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setParent(self, father):\n\n # This should be ideally called only once\n # by the father when creating the child :-)\n # though it is possible to change parenthood\n # when a new child is adopted in the place\n # of an existing one - in that case the existing\n # child...
[ "0.7558183", "0.6385268", "0.63541925", "0.62541175", "0.5972186", "0.5898839", "0.57044", "0.56877744", "0.5662545", "0.56145734", "0.56136143", "0.55698144", "0.55341566", "0.55177635", "0.5500039", "0.5491826", "0.5457412", "0.54562056", "0.5422276", "0.5422276", "0.53844"...
0.83543134
0
The setter for the gestational age at delivery.
def ga_at_delivery(self, ga_at_delivery): self.logger.debug("In 'ga_at_delivery' setter.") self._ga_at_delivery = ga_at_delivery
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_age(self, age):\n self.__age = age", "def age(self, age):\n\n self._age = age", "def age(self, age):\n\n self._age = age", "def set_age(self, age):\n self.age = float(age)", "def set_age(self, newage):\n self.age = newage", "def age(self):\n return self._...
[ "0.7584002", "0.75798273", "0.75798273", "0.752224", "0.7486885", "0.74444014", "0.7389936", "0.7326969", "0.72830474", "0.72830474", "0.72830474", "0.7277231", "0.7266985", "0.72298354", "0.7226066", "0.718807", "0.7165034", "0.707837", "0.70711815", "0.7048963", "0.70006585...
0.0
-1
The setter for the gallbladder disease data.
def gallbladder(self, gallbladder): self.logger.debug("In 'gallbladder' setter.") self._gallbladder = gallbladder
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_data(self, d):\n self._data = d\n self.is_data_set = True", "def setData(self,newData):\r\n pass", "def dnb(self, dnb):\n\n self._dnb = dnb", "def set_dcmgnd(self, gnd):\n self.dcmgnd = gnd", "def set_ddg_flag(self, is_new_hunk):\n Gumtree.gumtree.setDDGFla...
[ "0.5783567", "0.57404447", "0.56364006", "0.5479423", "0.5477732", "0.5465287", "0.5447467", "0.5447467", "0.54369414", "0.53982717", "0.53661007", "0.53497696", "0.5344861", "0.53273064", "0.53273064", "0.5312296", "0.53118473", "0.52982324", "0.5294734", "0.5291972", "0.528...
0.6785721
0
The setter for the subject attribute's hyperlipidemia data.
def hyperlipidemia(self, hyperlipidemia): self.logger.debug("In 'hyperlipidemia' setter.") self._hyperlipidemia = hyperlipidemia
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject(self, subject: \"str\"):\n self._at...
[ "0.73105586", "0.70233274", "0.6843806", "0.6843806", "0.6711405", "0.6705078", "0.6666487", "0.6626263", "0.6626263", "0.6626263", "0.65448445", "0.6411143", "0.64042753", "0.63526696", "0.6260682", "0.6037846", "0.5933867", "0.5927003", "0.59110266", "0.59060305", "0.590603...
0.6005541
16
The setter for the subject attribute's hypertension data.
def hypertension(self, hypertension): self.logger.debug("In 'hypertension' setter.") self._hypertension = hypertension
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def subject(self, subject: \"str\"):\n self._attrs[\"subject\"] = subject", "def subject(self, subject: \"str\"):\n self._at...
[ "0.5970333", "0.5816906", "0.56116444", "0.56116444", "0.54425675", "0.5421129", "0.5368664", "0.53539914", "0.5346087", "0.53391975", "0.53391975", "0.53391975", "0.52859944", "0.5181244", "0.5181244", "0.5181244", "0.5181244", "0.5181244", "0.5162451", "0.5105633", "0.50443...
0.6880703
0
The setter for the subject attribute's illicit drug history data.
def illicit_drug(self, illicit_drug): self.logger.debug("In 'illicit_drug' setter.") self._illicit_drug = illicit_drug
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __setitem__(self):\n raise ValueError(\"Dataset objects are immutable\")", "def set_field( self, data ):\n super( UnsteadyField1D, self ).set_field( data )\n self.history[:] = self.val[:]\n return", "def subject_uuid(self, subject_uuid):\r\n\r\n self._subject_uuid = subje...
[ "0.53864956", "0.53475034", "0.52075934", "0.5040177", "0.502803", "0.5027246", "0.50090796", "0.50090796", "0.50090796", "0.4977144", "0.49580055", "0.48284277", "0.48150432", "0.48130378", "0.48080885", "0.47837257", "0.4740099", "0.4740099", "0.47126606", "0.47096834", "0....
0.6039002
0
The setter for the subject attribute's kidney disease data.
def kidney(self, kidney): self.logger.debug("In 'kidney' setter.") self._kidney = kidney
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject_id(self, subject_id):\n\n self._subject_id = subject_id", "def deidentify(self, subject_id=None):\n # Changing subject id\n if subject_id:\n self.subject = subject_id\n else:\n self.subject = ''\n\n self.metadata = {\n 'PATIENTINFO' ...
[ "0.6164212", "0.6071912", "0.6058911", "0.5866199", "0.58180076", "0.560134", "0.558731", "0.55842304", "0.55842304", "0.55529183", "0.55529183", "0.55529183", "0.5542547", "0.5474031", "0.54299515", "0.53850234", "0.53850234", "0.53827834", "0.527691", "0.51949143", "0.51505...
0.7384534
0
The setter for the subject attribute's liver disease data.
def liver(self, liver): self.logger.debug("In 'liver' setter.") self._liver = liver
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject_id(self, subject_id):\n\n self._subject_id = subject_id", "def change_subject(self, new_subject):\n raise NotImplementedError", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subje...
[ "0.62026495", "0.6012513", "0.6002764", "0.5974004", "0.5928169", "0.5899705", "0.5814802", "0.5814802", "0.5814802", "0.5806712", "0.5718085", "0.5713002", "0.57098424", "0.5680315", "0.5680315", "0.5636409", "0.5484431", "0.5466905", "0.54600936", "0.5431111", "0.54251724",...
0.0
-1
The setter for the subject's last menstrual period, if applicable.
def lmp(self, lmp): self.logger.debug("In 'lmp' setter.") self._lmp = lmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expected_last_period_end(self):\n return self._expected_last_period_end", "def expected_last_period_end(self, expected_last_period_end):\n\n self._expected_last_period_end = expected_last_period_end", "def _set_lastmod(self, args):\n if 'lastmod' in args:\n try:\n ...
[ "0.6134763", "0.6053057", "0.59319454", "0.58692473", "0.58602643", "0.5778862", "0.5778862", "0.5737292", "0.5640425", "0.5592628", "0.5537813", "0.5505946", "0.5490663", "0.54357624", "0.5421674", "0.5417002", "0.5409505", "0.53639525", "0.5345902", "0.53156734", "0.5280826...
0.0
-1
The setter for the subject's mother.
def mother(self, mother): self.logger.debug("In 'mother' setter.") self._mother = mother
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def mother_id(self):\n return self._mother", "def possessed_by(self, other):\r\n self.owner = other", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._sub...
[ "0.6592376", "0.6417233", "0.62410694", "0.6048784", "0.6048784", "0.6048784", "0.5874268", "0.5828045", "0.5784376", "0.5755819", "0.56805325", "0.56648695", "0.5597864", "0.5590452", "0.55859816", "0.54407835", "0.5409681", "0.54057693", "0.529991", "0.52964944", "0.5279828...
0.83289975
0
The setter for the subject attribute's occupation.
def occupation(self, occupation): self.logger.debug("In 'occupation' setter.") self._occupation = occupation
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def occupation(self, occupation):\n\n self._occupation = occupation", "def set_occupant(self):\n\t\tself.occupant = 1", "def occupancy(self, occupancy):\n\n self._occupancy = occupancy", "def set_occupant(self, obj):\n\t\tpass", "def subject(self, value):\n self.set_property(\"subject\...
[ "0.7053533", "0.68027806", "0.66343707", "0.64560807", "0.5774", "0.56687814", "0.5632423", "0.5632423", "0.53159213", "0.53159213", "0.52375567", "0.52261674", "0.52215457", "0.51968753", "0.5182352", "0.513832", "0.5123571", "0.5122215", "0.5119199", "0.5117822", "0.5110349...
0.75977945
0
The setter for the subject attribute's obstructive sleep apnea data.
def osa(self, osa): self.logger.debug("In 'osa' setter.") self._osa = osa
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def set_subject(self, subject):\n...
[ "0.6766255", "0.64660233", "0.64660233", "0.64660233", "0.64602846", "0.64027417", "0.64027417", "0.633251", "0.6241398", "0.6165287", "0.61133033", "0.6075275", "0.6032864", "0.5999285", "0.5956315", "0.594615", "0.5833024", "0.5833024", "0.569653", "0.5590056", "0.5590056",...
0.0
-1
The setter for the subject attribute's pancreatitis data.
def pancreatitis(self, pancreatitis): self.logger.debug("In 'pancreatitis' setter.") self._pancreatitis = pancreatitis
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def set_subject(self, subject):\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "de...
[ "0.72784644", "0.7218745", "0.6797273", "0.6796437", "0.6796437", "0.6796437", "0.6712536", "0.6712536", "0.6604038", "0.644872", "0.6359027", "0.63552326", "0.6336504", "0.6306201", "0.6269523", "0.6249478", "0.6080222", "0.602597", "0.597581", "0.59570247", "0.59570247", ...
0.5067668
64
The setter for the subject attribute's postmenopausal data.
def postmenopausal(self, postmenopausal): self.logger.debug("In 'postmenopausal' setter.") self._postmenopausal = postmenopausal
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def setSubject(self,value): \n ...
[ "0.74234045", "0.6916979", "0.6916979", "0.6916979", "0.69007593", "0.6870511", "0.6870511", "0.68082374", "0.6730078", "0.6398343", "0.6391232", "0.63462293", "0.6287448", "0.62373126", "0.61891073", "0.6131714", "0.60329497", "0.5960199", "0.5937873", "0.59249026", "0.59249...
0.55340517
38
The setter for the status of pregnancy.
def preg_term(self, preg_term): self.logger.debug("In 'preg_term' setter.") self._preg_term = preg_term
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetStatus(self, status):\r\n self.status = status", "def status(self, status):\n self._set_property_(self.STATUS, str(status))", "def status(self, status):\n self._status = status", "def status(self, status):\n self._status = status", "def status(self, status):\n self._st...
[ "0.6677289", "0.6612515", "0.6594237", "0.6594237", "0.6594237", "0.6594237", "0.6594237", "0.6594237", "0.6594237", "0.65683895", "0.65683895", "0.65683895", "0.6484702", "0.644488", "0.644488", "0.644488", "0.644488", "0.644488", "0.644488", "0.644488", "0.644488", "0.644...
0.0
-1
The setter for the subject attribute's pvd (peripheral vascular disease) data.
def pvd(self, pvd): self.logger.debug("In 'pvd' setter.") self._pvd = pvd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpd_id(self, vpd_id):\n\n self._vpd_id = vpd_id", "def set_voltage(self, v, ch): \n self.write(\"VSET\" + str(ch) + \":\" + str(v) + \"\\n\")", "def v(self, v):\n self._v = v", "def v(self, v):\n\n self._v = v", "def v(self, v):\n\n self._v = v", "def set_vol...
[ "0.5837103", "0.5526243", "0.54655874", "0.53762007", "0.53762007", "0.5366413", "0.53607076", "0.5357537", "0.52633405", "0.5219998", "0.5216777", "0.5204844", "0.51895255", "0.51381326", "0.508224", "0.5081992", "0.50561976", "0.50049466", "0.49902153", "0.4962001", "0.4941...
0.78896886
0
The setter for the subject attribute's prescriptions and overthecounter medications..
def rx(self, rx): self.logger.debug("In 'rx' setter.") self._rx = rx
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def subject(self, value):\n self.set_property(\"subject\", value)", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def ...
[ "0.67660755", "0.6701876", "0.63423634", "0.63423634", "0.63423634", "0.6176249", "0.6020426", "0.5991099", "0.5991099", "0.5917536", "0.5892759", "0.5841159", "0.58270234", "0.5783175", "0.5690962", "0.5550716", "0.5517415", "0.5517415", "0.5507313", "0.5495511", "0.5489839"...
0.0
-1
The setter for the subject attribute's siblings.
def siblings(self, siblings): self.logger.debug("In 'siblings' setter.") self._siblings = siblings
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def change_subject(self, new_subject):\n raise NotImplementedError", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subject):\n\n self._subject = subject", "def subject(self, subj...
[ "0.6429605", "0.57400227", "0.5691364", "0.5691364", "0.5691364", "0.56346184", "0.5630802", "0.55770516", "0.5508243", "0.5407607", "0.53761977", "0.53761977", "0.5310728", "0.5300314", "0.52240336", "0.52158016", "0.519634", "0.5072914", "0.5072221", "0.5058918", "0.5052136...
0.69191176
0
One of the 3 studies that are part of the iHMP.
def study(self, study): self.logger.debug("In 'study' setter.") self._study = study
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_type_of_studies(self) -> str:\n semestr = {\n 1: 'pierwszy',\n 2: 'drugi',\n 3: 'trzeci',\n 4: 'czwarty',\n 5: 'piąty',\n 6: 'szósty',\n 7: 'siódmy',\n 8: 'ósmy',\n 9: 'dziewiąty',\n 10: 'dz...
[ "0.58859897", "0.5839951", "0.5827774", "0.5739656", "0.5542647", "0.54314303", "0.539944", "0.53554195", "0.5341293", "0.5338266", "0.5295073", "0.5289918", "0.5276426", "0.525988", "0.52230114", "0.5198348", "0.51550865", "0.51401454", "0.5129376", "0.5107128", "0.5087313",...
0.0
-1
The setter for the optional subproject the subject belongs to, currently limited to VCU but controlled vocabulary could be expanded to incude more projects.
def subproject(self, subproject): self.logger.debug("In 'subproject' setter.") self._subproject = subproject
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testSubproject(self):\n attr = self.session.create_visit_attr()\n\n self.util.stringTypeTest(self, attr, \"subproject\")\n\n self.util.stringPropertyTest(self, attr, \"subproject\")", "def SetSubSpaceProjector(self, proj):\n return _hypre.HypreLOBPCG_SetSubSpaceProjector(self, pro...
[ "0.6812608", "0.6662138", "0.58673406", "0.57978135", "0.5670406", "0.55939984", "0.54418045", "0.53359234", "0.52879244", "0.5231679", "0.5231679", "0.51887167", "0.51805437", "0.51462317", "0.5124727", "0.5056825", "0.5053475", "0.50437045", "0.5041038", "0.5012335", "0.498...
0.78754413
0
The setter for center specific survey identifier.
def survey_id(self, survey_id): self.logger.debug("In 'survey_id' setter.") self._survey_id = survey_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def survey_id(self, survey_id):\n\n self._survey_id = survey_id", "def set_ident(self, new_ident: int):\n if not isinstance(new_ident, int):\n raise TypeError(\"Spectrum set identifiers may ONLY be positive integers\")\n self._set_ident = new_ident", "def survey_response_id(self...
[ "0.68363386", "0.6073385", "0.6002878", "0.57867825", "0.57867825", "0.57867825", "0.5744583", "0.57225215", "0.56880254", "0.5651209", "0.55950034", "0.55378723", "0.55103487", "0.55103487", "0.5474164", "0.54545075", "0.540694", "0.540694", "0.5403246", "0.5392221", "0.5390...
0.7165307
0
The setter for the subject attribute's tobacco. Usage is measured as number of packs per day multiplied by years smoked.
def tobacco(self, tobacco): self.logger.debug("In 'tobacco' setter.") self._tobacco = tobacco
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subject(self, value):\n self.set_property(\"subject\", value)", "def setSubject(self,value): \n self.PDFreactorConfiguration.in1[\"subject\"] = value", "def subject(self, val: str):\n self._subject = val", "def set_subject(self, subject):\n self._subject = subject", "def sub...
[ "0.6937956", "0.64491016", "0.6284517", "0.61092716", "0.6090351", "0.6090351", "0.6090351", "0.58907455", "0.5828524", "0.58132553", "0.57813025", "0.57735157", "0.57735157", "0.564683", "0.5622837", "0.5605778", "0.5543971", "0.5543971", "0.5537998", "0.55262315", "0.550351...
0.61049867
4
Validates the current object's data/JSON against the current schema in the OSDF instance for that specific object. All required fields for that specific object must be present.
def validate(self): self.logger.debug("In validate.") document = self._get_raw_doc() session = iHMPSession.get_session() self.logger.info("Got iHMP session.") (valid, error_message) = session.get_osdf().validate_node(document) problems = [] if not valid: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _validate(self):\n schema_version = util.schemas[self.schema_name]\n stored_schemas = util.stored_schemas\n\n try:\n schema_obj = stored_schemas[\n \"http://redfish.dmtf.org/schemas/v1/\" + schema_version]\n except KeyError:\n raise OneViewRedfis...
[ "0.7437561", "0.71074986", "0.6983861", "0.69257504", "0.68514585", "0.6851149", "0.68496317", "0.6800328", "0.6753897", "0.6567313", "0.65663385", "0.6550571", "0.65430176", "0.65266216", "0.6518624", "0.6518086", "0.6502087", "0.65009654", "0.6488511", "0.6473275", "0.64557...
0.0
-1
Validates the current object's data/JSON against the current schema in the OSDF instance for the specific object. However, unlike validates(), this method does not provide exact error messages, it states if the validation was successful or not.
def is_valid(self): self.logger.debug("In is_valid.") document = self._get_raw_doc() session = iHMPSession.get_session() self.logger.info("Got iHMP session.") (valid, _error_message) = session.get_osdf().validate_node(document) if 'associated_with' not in self._links....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _validate(self):\n schema_version = util.schemas[self.schema_name]\n stored_schemas = util.stored_schemas\n\n try:\n schema_obj = stored_schemas[\n \"http://redfish.dmtf.org/schemas/v1/\" + schema_version]\n except KeyError:\n raise OneViewRedfis...
[ "0.7595237", "0.7561742", "0.73021847", "0.7231355", "0.7210493", "0.6893083", "0.68430924", "0.68336606", "0.6790006", "0.67716223", "0.6596142", "0.6590718", "0.65673727", "0.6541034", "0.65323275", "0.65321267", "0.6530764", "0.65238196", "0.6522726", "0.65174466", "0.6513...
0.0
-1
Generates the raw JSON document for the current object. All required fields are filled into the JSON document, regardless they are set or not. Any remaining fields are included only if they are set. This allows the user to visualize the JSON to ensure fields are set appropriately before saving into the database.
def _get_raw_doc(self): self.logger.debug("In _get_raw_doc.") doc = { 'acl': { 'read': ['all'], 'write': [SubjectAttribute.namespace] }, 'linkage': self._links, 'ns': SubjectAttribute.namespace, 'node_type': 'su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def json(self):\n # Response legacy data: allow for any column to be null.\n document = {\n 'mhrNumber': self.mhr_number,\n 'documentType': self.document_type,\n 'documentRegistrationNumber': self.document_reg_id,\n 'interimed': self.interimed,\n ...
[ "0.6250537", "0.62244767", "0.6189625", "0.610806", "0.60944843", "0.6035631", "0.60198593", "0.5971836", "0.59666234", "0.59575015", "0.5937198", "0.5910545", "0.58867145", "0.58770275", "0.5826074", "0.58145094", "0.58037215", "0.57907146", "0.57857496", "0.5759525", "0.574...
0.0
-1
A static method. The required fields for the class.
def required_fields(): module_logger.debug("In required_fields.") # A tuple of one must have a comma after the single value... return ("tags",)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(__self__):\n pass", "def __init__(_...
[ "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6393323", "0.6282771", "0.6282771", "0.6282771", "0.6282771", "0.6259761", "0.6250313", "0.6229985", "0.6214421", "0.61576813", "0.61576813", "0.61576813", ...
0.0
-1
Deletes the current object (self) from OSDF. If the object has not been previously saved (node ID is not set), then an error message will be logged stating the object was not deleted. If the ID is set, and exists in the OSDF instance, then the object will be deleted from the OSDF instance, and this object must be resav...
def delete(self): self.logger.debug("In delete.") if self._id is None: self.logger.warn("Attempt to delete a %s with no ID.", __name__) raise Exception("{} does not have an ID.".format(__name__)) id = self._id session = iHMPSession.get_session() self.lo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self, obj=None):\n if not obj:\n return\n key = \"{}.{}\".format(type(obj).__name__, obj.id)\n if key in self.__objects:\n del self.__objects[key]\n self.save()", "def delete(self):\n self.id = uuid4()\n DataStore.remove_instance(self...
[ "0.6932225", "0.6836191", "0.6761663", "0.6756009", "0.67374784", "0.67361516", "0.67361516", "0.67361516", "0.67361516", "0.6723348", "0.6723348", "0.6723348", "0.67100346", "0.6577172", "0.6520184", "0.6508795", "0.64875054", "0.641628", "0.64133525", "0.63939804", "0.63892...
0.73344004
0
Searches OSDF for SubjectAttribute nodes. Any criteria the user wishes to add is provided by the user in the query language specifications provided in the OSDF documentation. A general format is
def search(query="\"subject_attr\"[node_type]"): module_logger.debug("In search.") session = iHMPSession.get_session() module_logger.info("Got iHMP session.") if query != '"subject_attr"[node_type]': query = '({}) && "subject_attr"[node_type]'.format(query) module_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def filter_subjects(self):\n return self.filter_nodes('//Subjects/Subject')", "def subject_list():\n items = []\n\n soup = abcradionational.get_soup(URL + \"/podcasts/subjects\")\n \n subject_heading = abcradionational.get_podcast_heading(soup)\n \n for subject in subject_heading:\n ...
[ "0.6321968", "0.5868989", "0.5797068", "0.5797068", "0.5792069", "0.57776743", "0.5761896", "0.57172513", "0.5666394", "0.53860444", "0.53860444", "0.53587943", "0.53587943", "0.53587943", "0.53587943", "0.53587943", "0.53022003", "0.524047", "0.5169435", "0.5145889", "0.5113...
0.73507226
0
Takes the provided JSON string and converts it to an object.
def load_subject_attr(attrib_data): module_logger.info("Creating a template %s.", __name__) attrib = SubjectAttribute() module_logger.debug("Filling in %s details.", __name__) attrib._set_id(attrib_data['id']) attrib.links = attrib_data['linkage'] attrib.version = attrib...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_json_str(cls, json_str):\n return cls.from_json(simplejson.loads(json_str))", "def parse_json_string(json_string):\n json_object = None\n\n if not isinstance(json_string, str):\n return json_string\n\n try:\n json_object = json.loads(json_string)\n except (ValueError, TypeEr...
[ "0.8098258", "0.8025996", "0.793664", "0.792554", "0.78408206", "0.77856493", "0.77650034", "0.76984143", "0.76802796", "0.7644349", "0.76395273", "0.76395273", "0.7558202", "0.7558202", "0.7558202", "0.75328434", "0.75328434", "0.7528536", "0.75215566", "0.7520078", "0.74655...
0.0
-1
Loads the data for the specified input ID from the OSDF instance to this object. If the provided ID does not exist, then an error message is provided stating the project does not exist.
def load(node_id): module_logger.debug("In load. Specified ID: %s", node_id) session = iHMPSession.get_session() module_logger.info("Got iHMP session.") node_data = session.get_osdf().get_node(node_id) node = SubjectAttribute.load_subject_attr(node_data) module_logger...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load(self, file_id):\n pass", "def load(cls, id):\n key = cls.get_key_prefix()+\"#\"+str(id)\n src = dal_get(key)\n logger.debug( \"LOAD %s %s %s\", str(key), str(id), str(src))\n if src == None:\n raise cls.NotExist(\"No instance could be found with ID: \"+str(i...
[ "0.6326961", "0.58415407", "0.5691003", "0.5627652", "0.54598415", "0.54068065", "0.540429", "0.523803", "0.523803", "0.523803", "0.523803", "0.523803", "0.523803", "0.523803", "0.51925033", "0.51678973", "0.5161171", "0.5156127", "0.5085922", "0.50757086", "0.5075134", "0....
0.0
-1
Saves the data in OSDF. The JSON form of the current data for the instance is validated in the save function. If the data is not valid, then the data will not be saved. If the instance was saved previously, then the node ID is assigned the alpha numeric found in the OSDF instance. If not saved previously, then the node...
def save(self): self.logger.debug("In save.") # If node previously saved, use edit_node instead since ID # is given (an update in a way) # can also use get_node to check if the node already exists if not self.is_valid(): self.logger.error("Cannot save, data is invali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self):\n self.logger.debug(\"In save.\")\n\n if not self.is_valid():\n self.logger.error(\"Cannot save, data is invalid\")\n return False\n\n session = iHMPSession.get_session()\n self.logger.info(\"Got iHMP session.\")\n\n success = False\n\n ...
[ "0.7139773", "0.6385708", "0.6246444", "0.5928301", "0.58878785", "0.5868495", "0.58186436", "0.5813409", "0.57692957", "0.57653695", "0.57553834", "0.5749684", "0.57480514", "0.5716162", "0.5714232", "0.5713952", "0.56692517", "0.5650842", "0.5636613", "0.56266105", "0.55924...
0.8063669
0
Metodo que regresa el objeto Widget del Controlador
def getWidgetClass(self): return AbstraccionWindowWidget
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getWidget(self):", "def init_widget(self):", "def create_widgets(self):", "def create_widget(self):\n pass", "def get_widget(self):\n\t\treturn None", "def get_widget(self):\r\n return None", "def create_widgets( self ):", "def fromControls(self,widget):", "def __init__(self):\n ...
[ "0.80344284", "0.76654726", "0.759475", "0.7575348", "0.7566434", "0.74141365", "0.7406144", "0.70952046", "0.6927816", "0.69042796", "0.6781027", "0.6762784", "0.67397565", "0.66950035", "0.66950035", "0.66821414", "0.66772324", "0.66338634", "0.6593305", "0.65857464", "0.65...
0.6433477
31
Metodo que regresa el objeto Prueba del Controlador
def getTestClass(self): return AbstraccionPrueba
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pruebas(self):\n self.gestor_pca.pruebas()\n return None", "def __init__():\n self.placa = placa", "def __init__(self):\n\n # Diccionario que contendra todas las fuentes para ir llamandolas una por una en ejecucion\n # o poder seleccionar cual lanzar usando el patron fact...
[ "0.6173866", "0.5633138", "0.5549601", "0.54982764", "0.533566", "0.53312564", "0.53103065", "0.5276248", "0.5261504", "0.5251928", "0.5251928", "0.52235776", "0.51345646", "0.51326615", "0.51326615", "0.5127862", "0.5104655", "0.50966316", "0.50867444", "0.50790566", "0.5073...
0.0
-1
Metodo que que setea los valores en el Controlador
def setField(self, data): view = self.view view.sbAbstraccion.setValue(data['sbAbstraccion'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValues(self):\n pass", "def setValues(self):\n pass", "def setValues(self):\n pass", "def setValues(self):\n pass", "def setValues(self):\n pass", "def setValues(self):\n pass", "def _setVals(self, *args, **kwargs):\n pass", "def set_params(self...
[ "0.7398384", "0.7398384", "0.7398384", "0.7398384", "0.7398384", "0.7398384", "0.72440004", "0.6750744", "0.6518919", "0.6503426", "0.6496978", "0.6472113", "0.64483327", "0.64292836", "0.6384755", "0.63579535", "0.6311014", "0.626072", "0.61874115", "0.6180329", "0.6159124",...
0.0
-1
Removes like from post
def unlike(self, request, pk=None): obj = self.get_object() like_func.remove_like(obj, request.user) return Response(status=status.HTTP_202_ACCEPTED)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unlike(self, request, pk=None):\n\n user_wall_post = self.get_object()\n user_wall_post.likes.remove(self.request.user)\n return Response(status=201)", "def remove_like(request):\n if request.method == \"POST\":\n if \"token\" in request.data and request.data[\"token\"] != \"\"...
[ "0.7409922", "0.73243237", "0.7286601", "0.7187625", "0.7141933", "0.6949327", "0.66473013", "0.6603108", "0.64856666", "0.6446369", "0.642885", "0.64074314", "0.6231791", "0.62296855", "0.6192632", "0.6148374", "0.60050476", "0.5969009", "0.5906335", "0.5854783", "0.5843061"...
0.71798944
4
Gets users liked post
def fans(self, request, pk=None): obj = self.get_object() users_list = like_func.get_liked_users(obj) serializer = UserSerializer(users_list, context={'request': request}, many=True) return Response(serializer.data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_likes(self, data_base):\n cursor = data_base.cursor(dictionary=True)\n cursor.execute(f\"SELECT user_id FROM user_like WHERE post_id = {self.id}\")\n user_likes = tuple(map(lambda x: str(x['user_id']), cursor.fetchall()))\n if not user_likes:\n return []\n ...
[ "0.73537564", "0.7322851", "0.7304667", "0.7011639", "0.70079815", "0.6960532", "0.69015926", "0.6864578", "0.6701976", "0.66880715", "0.66679", "0.6653324", "0.66509455", "0.6597712", "0.65906936", "0.65906936", "0.65856034", "0.65282214", "0.64812213", "0.64748794", "0.6361...
0.62059766
30
Returns the games that the current user has moderator access
def get_current_user_games_moderating(): return Game.get_user_games_moderating(users.GetCurrentUser())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_games_moderating(user):\n if not user: return []\n moderating = db.Query(GameModerator).filter('user =', user)\n return [m.game for m in moderating]", "def user_moderating(self, user):\n if not user: return False\n query = db.Query(GameModerator)\n query.filter('game ='...
[ "0.812755", "0.7338971", "0.7006234", "0.68757516", "0.6267719", "0.6133413", "0.6118051", "0.60893816", "0.6021789", "0.6008156", "0.59875387", "0.59740645", "0.59282196", "0.59213614", "0.5802367", "0.577083", "0.57459813", "0.574014", "0.5720754", "0.56914926", "0.5688182"...
0.799862
1
Returns the games that the given user has moderator access
def get_user_games_moderating(user): if not user: return [] moderating = db.Query(GameModerator).filter('user =', user) return [m.game for m in moderating]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_moderating(self, user):\n if not user: return False\n query = db.Query(GameModerator)\n query.filter('game =', self)\n query.filter('user =', user)\n return query.get()", "def get_current_user_games_moderating():\n return Game.get_user_games_moderating(users.GetCurrentUser(...
[ "0.77718145", "0.7593678", "0.693608", "0.66256106", "0.6421562", "0.6419097", "0.63924074", "0.63783497", "0.6341371", "0.63391614", "0.6326846", "0.62342393", "0.6186595", "0.6106071", "0.6048413", "0.5946077", "0.5878598", "0.5866314", "0.5842646", "0.58251846", "0.5795843...
0.854335
0
Returns the games that the current user has joined
def get_current_user_games_playing(): return Game.get_user_games_playing(users.GetCurrentUser())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_games(self, request):\n return games_ctrl.get_user_games(request.user_name)", "def get_user_games(self, request):\n user = User.query(User.name == request.user_name).get()\n if not user:\n raise endpoints.NotFoundException(\n 'A User with that name does...
[ "0.7639829", "0.75720876", "0.7374496", "0.7329762", "0.7040549", "0.7009744", "0.66481626", "0.66303766", "0.6606775", "0.65997714", "0.6579257", "0.6566002", "0.65326476", "0.6479949", "0.64578635", "0.6448635", "0.64425564", "0.6434259", "0.639462", "0.6343504", "0.6340359...
0.66597944
6
Returns the games that the given user has joined
def get_user_games_playing(user): if not user: return [] playing = db.Query(GamePlayer).filter('user =', user) return [p.game for p in playing]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_user_games(self, request):\n user = User.query(User.name == request.user_name).get()\n if not user:\n raise endpoints.NotFoundException(\n 'A User with that name does not exist!')\n games = Game.query(Game.user == user.key)\n games = games.filter(Game.g...
[ "0.7725769", "0.76969695", "0.76001185", "0.74019265", "0.7306138", "0.72942144", "0.718925", "0.7169846", "0.70803535", "0.68845767", "0.6769615", "0.6688964", "0.66347665", "0.6447739", "0.6422692", "0.6323892", "0.6049841", "0.60275817", "0.60255635", "0.60194", "0.6010309...
0.7570678
3
Returns true if the current user has moderator access to this game.
def current_user_moderating(self): return self.user_moderating(users.GetCurrentUser())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_moderator(self):\n return self.user_type == 'M'", "def is_mod():\n\n async def predicate(ctx: commands.context):\n if any(role.name in MODERATOR_ROLES for role in ctx.message.author.roles):\n return True\n else:\n await ctx.send(\n f\"Sorry {ctx...
[ "0.8183338", "0.75612557", "0.7522311", "0.74560916", "0.74560916", "0.74443835", "0.73708737", "0.7347426", "0.7195451", "0.71045125", "0.70880973", "0.70880973", "0.7063466", "0.704253", "0.70394504", "0.6947849", "0.69445515", "0.69445515", "0.6938868", "0.6932087", "0.690...
0.7404325
6
Returns true if the given user has moderator acces to this game.
def user_moderating(self, user): if not user: return False query = db.Query(GameModerator) query.filter('game =', self) query.filter('user =', user) return query.get()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkIfAllowed(self, user):\n\n # Default case if mod access is not needed everyone has access\n if not self.modOnlyAccess:\n return True\n\n # Otherwise check the user's access level\n if user.modAccess == self.modOnlyAccess:\n return True\n else:\n ...
[ "0.7828556", "0.77501905", "0.7736339", "0.7736339", "0.76756227", "0.75299066", "0.73816484", "0.73230696", "0.73103917", "0.729185", "0.72802365", "0.72083044", "0.71758336", "0.7058588", "0.7058509", "0.7045077", "0.70308125", "0.70189774", "0.70164526", "0.70089716", "0.7...
0.786476
0
Returns true if the current user has joined this game
def current_user_playing(self): return self.user_playing(users.GetCurrentUser())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_game_won(self):\n return True", "def check_can_join(self, user):\n if not user.is_active or user.is_anonymous():\n return False\n\n membership = self.check_membership(user)\n\n if membership is not None and not membership.is_left():\n return False # Alrea...
[ "0.6898084", "0.67516303", "0.6697443", "0.66336924", "0.65268517", "0.6460632", "0.639607", "0.63784134", "0.6316696", "0.6291917", "0.6267222", "0.6262924", "0.62327456", "0.6190071", "0.61742663", "0.6144369", "0.6141264", "0.61318046", "0.61202514", "0.6115361", "0.611482...
0.0
-1
Returns true if the given user has joined this game
def user_playing(self, user): if not user: return False query = db.Query(GamePlayer) query.filter('game =', self) query.filter('user =', user) return query.get()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_user_playing(self, user):\n return user in self.active_games", "def check_can_join(self, user):\n if not user.is_active or user.is_anonymous():\n return False\n\n membership = self.check_membership(user)\n\n if membership is not None and not membership.is_left():\n ...
[ "0.694125", "0.68150896", "0.6733105", "0.661199", "0.6496842", "0.647401", "0.64259493", "0.6377296", "0.63557965", "0.63079137", "0.6303843", "0.62989473", "0.628617", "0.6251457", "0.61018765", "0.6084627", "0.6059711", "0.60561335", "0.60542375", "0.6046776", "0.6038921",...
0.6174163
14
Iterate over documents in a collection
def iterate_over_all_documents_in_collection(session, collection: str, document_ids=None, consider_tag=False, consider_sections=False, consider_classification=False): if not collection: raise ValueError("Document collection must be specified and cannot be None") ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iter_documents(self):\n raise NotImplementedError", "def __iter__(self):\n for document in self.query:\n yield self._to_document(document)", "def __iter__(self):\n for this_document in self.documents:\n yield this_document", "def __iter__(self):\n return self.iter_...
[ "0.7614738", "0.7333641", "0.6944138", "0.69070643", "0.6755577", "0.6735047", "0.6689978", "0.6617786", "0.6607844", "0.65618265", "0.65329003", "0.6482267", "0.6448121", "0.64366", "0.642389", "0.64015967", "0.63306814", "0.6270626", "0.6255094", "0.6158743", "0.6106939", ...
0.6890403
4
Retrieves a set of TaggedDocuments from the database
def retrieve_tagged_documents_from_database(session, document_ids: Set[int], document_collection: str) \ -> List[TaggedDocument]: doc_results = {} document_ids = sorted(list(document_ids)) # first query document titles and abstract doc_query = session.query(Document).filter(and_(Document.id.in_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_documents(self) -> Iterable[dict]:\n\n return self._db[\"documents\"]", "def get_documents(self):\n documents = self.tree.execute(\"$.documents\")\n for doc in documents:\n sentences = {s['@id']: s['text'] for s in doc.get('sentences', [])}\n self.document_dict...
[ "0.73104936", "0.655779", "0.6516003", "0.6449883", "0.6446499", "0.6396306", "0.6396306", "0.6355805", "0.6333367", "0.6319859", "0.62557304", "0.623653", "0.6147569", "0.61305124", "0.61125934", "0.6096729", "0.6084542", "0.5975077", "0.5961116", "0.5907853", "0.59019995", ...
0.7045775
1
SmartContractsExternalEvent a model defined in Swagger
def __init__(self, timestamp=None, update_param=None, posting_instruction_batch=None, set_flag=None, get_derived_parameters=None): # noqa: E501 # noqa: E501 self._timestamp = None self._update_param = None self._posting_instruction_batch = None self._set_flag = None self._get_d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_api_event(self):\n pass", "def adc_api_workflow_event(workflow_id):\n return jsonify(adc.workflow_event_show(workflow_id))", "def create_event():\n json_data = request.get_json()\n data, error = EventSchema().load(json_data)\n if error:\n return make_response(jsonify({\"error\...
[ "0.6182629", "0.5567598", "0.5385605", "0.5356521", "0.5327945", "0.5294917", "0.52766114", "0.51620597", "0.51493007", "0.514346", "0.51389945", "0.5110989", "0.51076186", "0.51023656", "0.51006824", "0.5065806", "0.5058977", "0.5054797", "0.5044152", "0.5036638", "0.5019645...
0.0
-1
Sets the timestamp of this SmartContractsExternalEvent.
def timestamp(self, timestamp): self._timestamp = timestamp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_timestamp(self, timestamp):\n self._set_sub_text('timestamp', text=str(xep_0082.datetime(timestamp)))\n return self", "def timestamp(self, timestamp: datetime):\r\n self._timestamp = timestamp", "def timestamp(self, timestamp):\n \n self._timestamp = timestamp", "de...
[ "0.7291634", "0.7254586", "0.72281563", "0.71608627", "0.6971518", "0.6674399", "0.6647642", "0.66342163", "0.66205585", "0.65634197", "0.64537007", "0.64314467", "0.628735", "0.6265952", "0.6199311", "0.619431", "0.6089964", "0.60747397", "0.6059599", "0.60054606", "0.597409...
0.7199456
9
Sets the update_param of this SmartContractsExternalEvent.
def update_param(self, update_param): self._update_param = update_param
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_on_update(cls, on_update_callback):\n cls._on_update = on_update_callback", "def update_date(self, update_date):\n\n self._update_date = update_date", "def update_date(self, update_date):\n\n self._update_date = update_date", "def set_update_received_callback(self, callback):...
[ "0.59627855", "0.5543473", "0.5543473", "0.5518267", "0.55124503", "0.5423533", "0.54043597", "0.53955996", "0.5364033", "0.53036", "0.5252726", "0.52114725", "0.52114725", "0.52114725", "0.52114725", "0.520907", "0.5166328", "0.5160308", "0.51379406", "0.5137891", "0.5092448...
0.7297
0
Sets the posting_instruction_batch of this SmartContractsExternalEvent.
def posting_instruction_batch(self, posting_instruction_batch): self._posting_instruction_batch = posting_instruction_batch
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch(self, batch):\n\n self._batch = batch", "def postings(self, postings):\n if postings:\n self._postings = postings", "def handle_batch(self, batch: Mapping[str, Any]) -> None:\n self.batch = {**batch, **self.forward(batch)}", "def batch_id(self, batch_id):\n\n ...
[ "0.53729135", "0.4839542", "0.4687863", "0.46870282", "0.46480635", "0.45746222", "0.4540861", "0.4540861", "0.4462273", "0.4403963", "0.44033626", "0.43905142", "0.43627852", "0.43363622", "0.43031356", "0.42991257", "0.4292917", "0.4282893", "0.42753202", "0.42618978", "0.4...
0.8160995
0
Sets the set_flag of this SmartContractsExternalEvent.
def set_flag(self, set_flag): self._set_flag = set_flag
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_flag(self, new):\n self.flag = new", "def set_mark(self, perception: Perception) -> None:\n if self.mark.set_mark_using_condition(self.condition, perception):\n self.ee = False", "def setFlag(self, flag, value) -> None:\n ...", "def eflags_set(self, bit: int, value: bo...
[ "0.5919165", "0.58560085", "0.5854866", "0.58365464", "0.57126683", "0.5702005", "0.5682941", "0.5682941", "0.55357", "0.54927593", "0.5410388", "0.5371538", "0.5341425", "0.5327782", "0.53235805", "0.53189474", "0.5291089", "0.5272593", "0.5252654", "0.5218112", "0.52065414"...
0.73909456
0
Sets the get_derived_parameters of this SmartContractsExternalEvent.
def get_derived_parameters(self, get_derived_parameters): self._get_derived_parameters = get_derived_parameters
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_derived_parameters(self) -> DerivedParameterCollection:\n return DerivedParameterCollection([])", "def _get_derived_parameters(self) -> DerivedParameterCollection:\n return DerivedParameterCollection([])", "def set_ext_params(self, ext_params):\n num_param = core.xc_func_info_get_...
[ "0.567191", "0.567191", "0.5428137", "0.53064084", "0.52684146", "0.5215091", "0.5188942", "0.5188912", "0.51474154", "0.5135808", "0.5132381", "0.5115146", "0.49988118", "0.4979826", "0.49458262", "0.4884202", "0.4871893", "0.48503995", "0.48305923", "0.48068097", "0.4793973...
0.7784515
0
Returns the model properties as a dict
def to_dict(self): result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_dict(self):\n return self.properties", "def to_dict(self):\n return self.properties", "def get_properties(self):\n return self.properties", "def asdict(self):\n return self._prop_dict", "def json(self):\n rv = {\n prop: getattr(self, prop)\n f...
[ "0.7751993", "0.7751993", "0.73391134", "0.7334895", "0.7297356", "0.727818", "0.7159078", "0.71578115", "0.71494967", "0.71494967", "0.71283495", "0.71275014", "0.7122587", "0.71079814", "0.7060394", "0.7043251", "0.7034103", "0.70233124", "0.69635814", "0.69586295", "0.6900...
0.0
-1
Returns the string representation of the model
def to_str(self): return pprint.pformat(self.to_dict())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n return super().__str__() + self.model.__str__()", "def __str__(self) -> str:\n # noinspection PyUnresolvedReferences\n opts = self._meta\n if self.name_field:\n result = str(opts.get_field(self.name_field).value_from_object(self))\n else:\n ...
[ "0.85856134", "0.7814518", "0.77898884", "0.7751367", "0.7751367", "0.7712228", "0.76981676", "0.76700574", "0.7651133", "0.7597206", "0.75800353", "0.7568254", "0.7538184", "0.75228703", "0.7515832", "0.7498764", "0.74850684", "0.74850684", "0.7467648", "0.74488163", "0.7442...
0.0
-1
For `print` and `pprint`
def __repr__(self): return self.to_str()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pprint(*args, **kwargs):\n if PRINTING:\n print(*args, **kwargs)", "def print_out():\n pass", "def custom_print(*objects):\n print(*objects, sep=OFS, end=ORS)", "def _print(self, *args):\n return _ida_hexrays.vd_printer_t__print(self, *args)", "def _printable(self):\n ...
[ "0.75577617", "0.73375154", "0.6986672", "0.698475", "0.6944995", "0.692333", "0.6899106", "0.6898902", "0.68146646", "0.6806209", "0.6753795", "0.67497987", "0.6744008", "0.6700308", "0.6691256", "0.6674591", "0.6658083", "0.66091245", "0.6606931", "0.6601862", "0.6563738", ...
0.0
-1
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SmartContractsExternalEvent): return False return self.__dict__ == other.__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.8089204", "0.8089204", "0.8055265", "0.7983358", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "0.7967577", "...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "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.0
-1
Learn bundles and calculate bundle activities.
def featurize(self, new_inputs): # Start by normalizing all the inputs. self.input_activities = self.update_inputs(new_inputs) # Run the inputs through the ziptie to find bundle activities # and to learn how to bundle them. bundle_activities = self.ziptie.featurize(self.input_ac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learn(self):\n for a in self.agents:\n a.learn()", "def _accept_bundle(self, bundle):\n duration = bundle.duration\n supply_cost = 0\n # 1. Build a mapping from resource-specific info to resource record\n res_to_record_mapping = self._res_man.get_res_to_record_ma...
[ "0.57789516", "0.5738171", "0.55854744", "0.5424365", "0.5418732", "0.5418732", "0.53303593", "0.5327261", "0.5321097", "0.53001565", "0.5284033", "0.52628666", "0.52568775", "0.52519256", "0.5243374", "0.52234536", "0.5219585", "0.521755", "0.5209715", "0.52043164", "0.51983...
0.457917
100
Take a set of feature activities and represent them in inputs.
def defeaturize(self, feature_activities): input_activities = feature_activities[:self.max_num_inputs] # Project each ziptie down to inputs. bundle_activities = feature_activities[self.max_num_inputs:] # TODO: iterate over multiple zipties ziptie_input_activities = self.ziptie.pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def featurize(self, new_inputs):\n # Start by normalizing all the inputs.\n self.input_activities = self.update_inputs(new_inputs)\n\n # Run the inputs through the ziptie to find bundle activities\n # and to learn how to bundle them.\n bundle_activities = self.ziptie.featurize(se...
[ "0.6215956", "0.61140203", "0.58670443", "0.5805919", "0.56044936", "0.55787945", "0.55729645", "0.55585843", "0.55393785", "0.5494204", "0.54847795", "0.54795194", "0.5450705", "0.54096943", "0.53977007", "0.5394272", "0.53692985", "0.53616226", "0.5357934", "0.5325238", "0....
0.73373103
0
Normalize and update inputs. Normalize activities so that they are predictably distrbuted. Use a running estimate of the maximum of each cable activity. Scale it so that the max would fall at 1. Normalization has several benefits. 1. It makes for fewer constraints on worlds and sensors. It allows any sensor can return ...
def update_inputs(self, inputs): # TODO: numpy-ify this if inputs.size > self.max_num_inputs: print("Featurizer.update_inputs:") print(" Attempting to update out of range input activities.") # This is written to be easily compilable by numba, however, # it ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def featurize(self, new_inputs):\n # Start by normalizing all the inputs.\n self.input_activities = self.update_inputs(new_inputs)\n\n # Run the inputs through the ziptie to find bundle activities\n # and to learn how to bundle them.\n bundle_activities = self.ziptie.featurize(se...
[ "0.5670106", "0.56258184", "0.55450493", "0.54929584", "0.5432683", "0.5393879", "0.53888273", "0.5325755", "0.5312501", "0.52890813", "0.5263034", "0.5148294", "0.5144454", "0.5135208", "0.5122069", "0.51190495", "0.5117909", "0.5102565", "0.50878215", "0.5065914", "0.505135...
0.67921335
0
Show the current state of the featurizer.
def visualize(self): # activity_threshold the level at which we can ignore # an element's activity in order to simplify display. activity_threshold = .01 print(self.name) print("Input activities") for i_input, activity in enumerate(self.input_activities): if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_state(self):\n print(\"I don't know how to show_state.\")", "def show_state(self):\n print \"I don't know how to show_state.\"", "def display_state(self):\n # self.__display(self.state)\n self.__draw(self.state)", "def display_state_cmd(self):\n self.__display(self...
[ "0.701072", "0.70048445", "0.6858103", "0.67453593", "0.66023004", "0.6554342", "0.64824", "0.6418477", "0.638005", "0.6337042", "0.6333947", "0.6323259", "0.6285162", "0.6285162", "0.6251181", "0.6240559", "0.6189838", "0.61882097", "0.6181312", "0.61219907", "0.6075456", ...
0.56420463
45
Test if processing can load InaSAFE.
def test_provider(self): msg = 'Wrong number of processing algorithm loaded.' self.assertEqual(len(self.provider.alglist), 6, msg) msg = 'InaSAFE should be activated by default in Processing.' self.assertEqual(self.provider.activate, True, msg) msg = 'Wrong processing provide.'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def can_load():\r\n # delegate to generic descriptor check to check start dates\r\n return _has_access_descriptor(user, 'load', course, course.id)", "def data_loaded_check(self):\n return True", "def can_load(self):\n\n try:\n return self._get_nearest_entry_with_artifact(...
[ "0.65205187", "0.65129894", "0.6507829", "0.64654297", "0.6423323", "0.61589426", "0.6014894", "0.59632105", "0.5930655", "0.57539934", "0.57462376", "0.5729667", "0.57247555", "0.56800383", "0.5674173", "0.5664247", "0.56490326", "0.56439775", "0.5578917", "0.5525432", "0.55...
0.0
-1
!Returns the name of a vector map not in the current mapset. Mapname is of the form temp_xxxxxx where xxxxxx is a random number.
def tempmap(): rand_number = [random.randint(0, 9) for i in range(6)] rand_number_str = ''.join(map(str, rand_number)) mapname = 'temp_' + rand_number_str maplist = grass.read_command('g.list', type='vector', mapset='.').split() while mapname in maplist: rand_number = [random.randint(0, 9) f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mapping_name(self) -> Optional[str]:\n return self.get(\"/TM\")", "def i_get_specified_map_name(cls, field, value, name):\n ret_val, name.value = gxapi_cy.WrapEMAPTEMPLATE._i_get_specified_map_name(GXContext._get_tls_geo(), field.encode(), value.encode(), name.value.encode())\n return re...
[ "0.5682107", "0.564879", "0.5627548", "0.5520334", "0.5474383", "0.5460252", "0.5433927", "0.53500676", "0.5322008", "0.528899", "0.5254873", "0.5241105", "0.5222035", "0.52160156", "0.51757026", "0.51566136", "0.5155313", "0.51499426", "0.51480395", "0.51412773", "0.51398396...
0.7676091
0
!Load vector lines into python list.
def loadVector(vector): expVecCmmd = 'v.out.ascii format=standard input=' + vector # JL p = Popen(expVecCmmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) p = Popen(expVecCmmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=False) vectorAscii = p.stdout...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def readVector(text):\n items = text.split()\n if int(items[0])+1 != len(items):\n raise ValueError(\"Invalid number of items\")\n return [float(v) for v in items[1:]]", "def fread_vector(stream):\n\n return (numpy.array(\n [float(d) for d in re.split(r\"\\s+\", stream.readline()) if len(d)...
[ "0.6735636", "0.66572475", "0.65267396", "0.64631766", "0.62894356", "0.6212257", "0.60744894", "0.6050167", "0.5971917", "0.5936406", "0.5927659", "0.59243774", "0.5906393", "0.5888187", "0.5879284", "0.5851395", "0.580826", "0.58042836", "0.57976484", "0.5788558", "0.57716"...
0.72660893
0