query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
075a35f2320504820c45ef19fc858b29
List the projects owned by the user.
[ { "docid": "3b810c68cb5045c116a0e9381e9d7819", "score": "0.6284729", "text": "def list():\n gitlab = get_gitlab()\n for p in gitlab.get_projects():\n print ': '.join([p.name, p.ssh_url_to_repo])", "title": "" } ]
[ { "docid": "24b1e582667a627343187825412f0ba0", "score": "0.7759531", "text": "def get_queryset(self):\n current_user = self.request.user\n return Project.objects.filter(owner__username=current_user)", "title": "" }, { "docid": "68ee9ba0ccb4ef62b16e3b4334167bc6", "score": "0...
03c198cd855a63cc12034c00a3c839f5
Function to obtain angle of orientation for contour line segments Found the following orientations to work best for aligning contours by trialanderror
[ { "docid": "079fac25c70ef97b8dff5c7801a69bf0", "score": "0.6582767", "text": "def getContourOrientation(shearAngle):\n if shearAngle>0:\n ori = (shearAngle*15.9)\n else:\n ori=-np.abs(shearAngle)*45.9\n return ori", "title": "" } ]
[ { "docid": "692dc4f2cdf33cfc12615a4ffd05f68c", "score": "0.67531836", "text": "def line_orientation(line):\n dx = line[END][0] - line[BGN][0]\n dy = line[END][1] - line[BGN][1]\n \n orientation = atan2(dy, dx)\n while (orientation < 0.0):\n orientation += pi\n \n return degre...
b1526616bf685606824ede0c16309166
create authentitaciton object from a JSON string
[ { "docid": "989d48cc2a2181c1b544f59a25706ce4", "score": "0.6706865", "text": "def create_authentication_from_json(values):\n key_id = values.get('publicKey')\n authentication_type = values.get('type')\n if not key_id:\n raise ValueError('Invalid authentication definition,...
[ { "docid": "985b400e20d778d78c323bc9f56bbed9", "score": "0.7011966", "text": "def create_authentication_from_json(values):\n key_id = values.get('publicKey')\n authentication_type = values.get('type')\n if not key_id:\n raise ValueError(\n f'Invalid authent...
8977f1dbe444e2edda9cf2214c9a9080
Returns a set of models ids for the specific query by the user.
[ { "docid": "ca5ed7fbf2f0a98fb45262a4739351d0", "score": "0.57983947", "text": "def model_ids(self, protocol=None, groups=None, subworld=None, gender=None):\n\n return [client.id for client in self.clients(protocol, groups, subworld, gender)]", "title": "" } ]
[ { "docid": "f419055486ed09701d58f214611c9a45", "score": "0.61304605", "text": "def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"user_ids\")", "title": "" }, { "docid": "f419055486ed09701d58f214611c9a45", "score": "0.61304605", ...
f0a2a8b4472b452da6fd438bae9b38c3
Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier.
[ { "docid": "4273b053fedf425194c5a7947e32fdcc", "score": "0.70739555", "text": "def getSearchResults(\n self, searchId: str, fromIndex: int, toIndex: int\n ) -> Awaitable[Dict]:\n return self.client.send(\n \"DOM.getSearchResults\",\n {\"searchId\": searchId, \"from...
[ { "docid": "782b6f5ad52583406788d850941f453b", "score": "0.5331863", "text": "def searchIndicators(fromDate='', query='', size=100, page=0, toDate='', value='', searchAfter=None,\n populateFields=None):\n return {}", "title": "" }, { "docid": "ea0c90fbb8a93f13649c867cc...
a21a8165654d11123527e42bafdb6b58
Measures how well the availability of a mentor's and team's availabilities overlap Assumes the mentor uses input transit type, which is an integer in range(numTransitTypes) Finds the total amount of overlap (minus travel time for the mentor), but an overlap must be for at least minMeetingTime to count Value is then tot...
[ { "docid": "80ae39227eb6d8d35c0d8e09f4fc774a", "score": "0.7607376", "text": "def getSingleOverlapValue(mentor, team, transitType):\n\ttotalOverlap = 0\n\tfor day in range(7):\n\t\t# at the beginning of a day, reset all counters for contiguous blocks\n\t\tmentorAvailabilityBeforeOverlap = 0 # mentor may...
[ { "docid": "acf0891f9117c591656f8e0a35002cf9", "score": "0.6468681", "text": "def getPairOverlapValue(mentor1, mentor2, team):\n\ttotalOverlap = 0\n\tfor day in range(7):\n\t\tfor slotNum in range(slotsPerDay[day]):\n\t\t\tif mentor1.availability[day][slotNum] and mentor2.availability[day][slotNum] and ...
b998911a668d0cd73cf46f4ea01aa101
Returns true if both objects are equal
[ { "docid": "2d64952e8551313e4d8ed48cc5c2cf36", "score": "0.0", "text": "def __eq__(self, other):\n if not isinstance(other, PutStockMovementsStockMovement):\n return False\n\n return self.to_dict() == other.to_dict()", "title": "" } ]
[ { "docid": "854419fa0140bfcc5ad035f5827bde30", "score": "0.85366243", "text": "def is_two_object_has_same_value(a, b) -> bool:\n return a==b", "title": "" }, { "docid": "11e011dc5ef6138ce990f879c93f1324", "score": "0.85108745", "text": "def is_two_objects_is_the_same_objects(a, b)...
28195f6b56ae38fee88892537b956af4
self & other. Causes pypeline to be run in parallel.
[ { "docid": "07d966b63166bc63e1baed802e70d2d8", "score": "0.54058367", "text": "def __and__(self, other):\n if self.parallel is not None:\n raise Exception('Trying to set parallel twice for {}'.format(self))\n return self | other", "title": "" } ]
[ { "docid": "97946f6de4a25643755186b8ccbe4d6c", "score": "0.55980474", "text": "def parar(self):\n pass", "title": "" }, { "docid": "db762242ace18fe0a80bf3aa8a16ef08", "score": "0.5586443", "text": "def compose(self, other):\n raise NotImplementedError", "title": "" ...
d8af9f2d44794fc9a341f30e63a3d0bb
Validates the inputs for the scattergather node.
[ { "docid": "6a7aebcfaec59eb545a5b47c654216a6", "score": "0.5940705", "text": "def validate_inputs(\n cls,\n *,\n silo_configs: List[FederatedLearningSilo],\n silo_component: Component,\n aggregation_component: Component,\n shared_silo_kwargs: Dict,\n aggr...
[ { "docid": "3c11efe19061bbe805d87331cdc3299a", "score": "0.676984", "text": "def validate_input(self):\n pass", "title": "" }, { "docid": "eda9bae52e295a987ac58bfd01bc5fcf", "score": "0.6701751", "text": "def check_input_param(self):\n for check_shape in (self.dgate_sha...
e632f9b2c5871ec2883f82cb7e06d9a2
preprocesses the data model
[ { "docid": "7d677ad89f9814c088230be46a4aa880", "score": "0.0", "text": "def preprocess_data(X, Y):\n #x_train_p, y_train_oh = preprocess_data(x_train, y_train)\n #x_valid_p, y_valid_oh = preprocess_data(x_valid, y_valid)\n\n X = K.applications.xception.preprocess_input(X)\n Y = K.utils.to_ca...
[ { "docid": "90c992a34a910951d198cf6e24ea01f3", "score": "0.79803115", "text": "def preprocess_data(self):\r\n pass", "title": "" }, { "docid": "e70db494b3aedbf6d196b4c709726984", "score": "0.78846335", "text": "def preprocess_data(self):\n\tpass", "title": "" }, { ...
591091bbd347cc062850b5dfa7c7b59a
Send mail to raj454raj.com about all the users who register
[ { "docid": "37f00a3611f74cc92d46b8956b5cae99", "score": "0.67834276", "text": "def register_callback(form):\n\n # Send mail to raj454raj@gmail.com\n to = \"raj454raj@gmail.com\"\n subject = \"New user registered\"\n message = \"\"\"\nName: %s %s\nEmail: %s\nInstitute: %s\nStopStalk handle: %...
[ { "docid": "eda30d744987685e968c7f06465b4901", "score": "0.70978504", "text": "def send_registration_email(self):\n\n self.send_email(\"registration\", {})", "title": "" }, { "docid": "6a9e924ca5d72ade217330eeb11feb74", "score": "0.70088774", "text": "def save(self):\n ...
511322456b28daf09f904f5bd6d6dc7d
Retorna una lista de peliculas con mas de n generos
[ { "docid": "9196b144bec963995e4c3ba1724fecdc", "score": "0.0", "text": "def with_genres(movies, n):\n return filter(lambda x: len(x.genres) >= n, movies)", "title": "" } ]
[ { "docid": "270cdd27b34b548d04fd984351274702", "score": "0.6722946", "text": "def _gen_n_puzzles(num_puzzles, m, final_state):\n puzzle_list = []\n for i in range(num_puzzles):\n puzzle = gen_puzzle_n(m)\n while not is_solvable(puzzle, final_state, m):\n puzzle = gen_puzzl...
8bae83e48dc4b2ada3d16560033b9e1a
Resize eye image and normalize intensities.
[ { "docid": "975e1a3e5d2ba66de424788c79a31faa", "score": "0.5238271", "text": "def preprocess_entry(self, entry):\n oh, ow = self._eye_image_shape\n left_eye = entry['leftEyeData']\n right_eye = entry['rightEyeData']\n gaze_point = entry['gazeData']\n\n\n #left_eye = cv...
[ { "docid": "911c4113158b15bd6ec13eda97f5c0cd", "score": "0.60649246", "text": "def _preprocess(self):\n # resize input image to same shape as hog window\n self.img = cv2.resize(self.img, self._winSize)", "title": "" }, { "docid": "bc3aeb10d7ca424f0d2c2e558faad672", "score":...
eda6c9acb9a56e2f04b22d62b266a830
Save image to txt files. Input img image, 3 x h x w txtPaths txt path, 3 x fmt format
[ { "docid": "bfa53aa23451a1162af9752abb24a108", "score": "0.8077553", "text": "def imgSvTxt(img, txtPaths, fmt='%.2f'):\n # dimension\n d = len(txtPaths)\n\n # load matrix\n for i in range(d):\n np.savetxt(txtPaths[i], img[i], fmt)", "title": "" } ]
[ { "docid": "07441f888606f5a6e753569c12e03132", "score": "0.63446015", "text": "def saveImageAndHog(self, mag, hog, lbp, path):\n pathSplit = path.split('/')\n currImage = pathSplit[-1]\n imageName, imageExt = currImage.split('.')\n updatedImage = '.'.join([imageName+'_mag',im...
59491e40c58c01c427603b59cd8e8130
Constructs a R2Plus1D50 model.
[ { "docid": "b13b892aaf831a3e6f726139e70d0611", "score": "0.74719286", "text": "def r2plus1d50(**kwargs):\n model = R2Plus1D(Bottleneck, [3, 4, 6, 3], **kwargs)\n return model", "title": "" } ]
[ { "docid": "5ca825d253d46b723d0e20f89cb10738", "score": "0.676142", "text": "def r2plus1d10(**kwargs):\n model = R2Plus1D(BasicBlock, [1, 1, 1, 1], **kwargs)\n return model", "title": "" }, { "docid": "fb930da44e2f08a76d43c1e3a9523626", "score": "0.6616595", "text": "def r2plus...
94188f27c625d12f0c691c2c23b66238
Calculate the [X/H] value for this collection of stars. This is calculated in the following way.
[ { "docid": "5167f9c772f084634b075caf43b00be6", "score": "0.64352614", "text": "def x_on_h_total(self, element):\n # get the metal mass fractions\n f_Ia = self.yields_Ia.mass_fraction(element, self.Z_Ia)\n f_II = self.yields_II.mass_fraction(element, self.Z_II)\n star_num = np...
[ { "docid": "8252ecf68ddf9d0e45c63b8160ca555c", "score": "0.6941615", "text": "def _h(self, x):\n num = (x - self.d)**2 * (x + self.d)**2\n den = (self.d**4 / self.H) + x**2\n return num / den", "title": "" }, { "docid": "cf3dc263acf45e853b62f41315eb974a", "score": "0...
bf2190db35a2d620b620938d60bda927
Format message to be used when file a new file is generated.
[ { "docid": "344b2c2872c245d3eb555585268358f9", "score": "0.6486107", "text": "def build_file_generation_message(env, filename):\n return (\n c(PAINT_PURPLE, '---------------------------') +\n LINE_BREAK +\n c(PAINT_CYAN, 'Environment: {} '.format(env)) +\n LINE_BREAK +\n ...
[ { "docid": "a9dfd7f1e12a8c7dea824234b4b44fca", "score": "0.6390881", "text": "def _create_log(self) -> str:\n logger_msg = \"Creating file {}\".format(\n self.data['filename']\n )\n return logger_msg", "title": "" }, { "docid": "65acbf96b2162529218989b5da8601f...
a22370a5f56f41c01cb5640145e8c984
Symbolically render rays starting with raster_space according to geometry e defined by
[ { "docid": "6f2396489687753e62c370020ecac963", "score": "0.5525302", "text": "def make_ro(r, raster_space, width, height):\n nmatrices = r.shape[0]\n resolution = np.array([width, height], dtype=floatX)\n # Normalise it to be bound between 0 1\n norm_raster_space = raster_space / resolution\...
[ { "docid": "e655306b5cf230461104c6c0e721790f", "score": "0.6136116", "text": "def find_intersection_rays(self, rays):\n x = rays[:, 0, :]\n xp = rays[:, 1, :]\n data = rays[:, 2, :]\n n0 = rays[0, 2, 1] # Assume all rays have the same refractive index\n l = rays[0...
55fab12e6ce4d71eac3a4486ba4cb6b6
Tests that the code runs and that the resulting matrix is symmetric
[ { "docid": "4322188f4cbe411df771bb0a6ebfd8d4", "score": "0.0", "text": "def test_coherence_mlab(): \n\n t = np.linspace(0,16*np.pi,1024)\n x = np.sin(t) + np.sin(2*t) + np.sin(3*t) + np.random.rand(t.shape[-1])\n y = x + np.random.rand(t.shape[-1])\n\n method = {\"this_method\":'mlab',\n ...
[ { "docid": "410f2d6aa853cfb6c68773315cb8ba83", "score": "0.7260345", "text": "def test_symmetric_samples(self):\n np.random.seed(42)\n n = 3\n A = np.random.uniform(size=(n, n))\n A = 0.5 * (A + A.T) + n * np.eye(n)\n dist = prob.Normal(\n mean=np.eye(A.shap...
829d8e3ea172d0f845a7d5701e35f994
Get the base name of a variable, without the time index. Given a variable "FooBar_10", the last component is the time index (if present), so we want to strip the "_10". This does no error checking. You should not be passing in a variable whose name starts with "Seq_"; this is for usergenerated names, not the internal n...
[ { "docid": "44eb9ae47664072c30750831e60ff797", "score": "0.788898", "text": "def _basename_of_variable(varname):\n \n comps = varname.split(\"_\")\n\n # handle variables that aren't time-varying\n if len(comps) == 1:\n return varname\n \n # this is kind of a heuristic; assume an...
[ { "docid": "3727ce35b289c0fa37ee658cc8e5c040", "score": "0.67316073", "text": "def _get_name(self, var_id):\n return var_id[0] + '_' + str(var_id[1])", "title": "" }, { "docid": "7808bb9d3f93a629c8b9eb45b2bcaa86", "score": "0.6664792", "text": "def getMangledName(self):\r\n ...
e429f504150027a970a8981961829726
Evaluate data against the model created with given number of features.
[ { "docid": "aefc172c8380c8262596349849a53a18", "score": "0.0", "text": "def evaluate_all_players(self, feature_qty=47, model='LR'):\n data = self.pca[feature_qty]\n x_test = (skpre.StandardScaler()\n .fit_transform(data.subset.drop('response', axis=1)))\n y_test = d...
[ { "docid": "e0510b66ecf5fe71dbd3fdad303674f0", "score": "0.6462505", "text": "def evaluate_models(self, evaluations=10):\n self.seed = None\n optimal_features = []\n for n in range(int(evaluations)):\n self.get_feature_subsets()\n logger.info(f'Evaluation:\\t{n...
17fd39280cbd14235c14808097b0e83c
Handle response data of type JSON
[ { "docid": "b66f0440d32140ad8b1ce08c2a2afa40", "score": "0.0", "text": "def _request_process_json(self, response):\n data = []\n try:\n if self._api_branch == 'bulk':\n response_data = self._request_bulk(response)\n else:\n response_data ...
[ { "docid": "4d78f8661e854683b2b972b735895d20", "score": "0.7780941", "text": "def process_response(response):\r\n return response.json()", "title": "" }, { "docid": "b50cecc059978420c2281c56129d6f41", "score": "0.7539139", "text": "def normal_json_response(data, *args, **kwargs):\...
87d394aab08c4337d28ff1e90764e159
setup database in PostgreSQL
[ { "docid": "07927ad478d6d7a977c8fcdff563df03", "score": "0.81652486", "text": "def _setup_db(self):\n conn = psycopg2.connect(f\"host={DBHOST} user={DBUSER} password={DBPASSWORD}\")\n conn.set_session(autocommit=True)\n cur = conn.cursor()\n cur.execute(f\"DROP DATABASE IF EX...
[ { "docid": "66575ae369e538a87935f26a2c7e64b4", "score": "0.8368186", "text": "def db_setup():\n # Symlink our own config file and restart PostgreSQL\n with cd(\"/etc/postgresql/8.4/main/\"):\n # remove the existing config file\n if exists(\"pg_hba.conf\"): \n run(\"rm pg_h...
1d523ef15fd8cc0237678f5ab2b67155
Test the right directional links between heads
[ { "docid": "cb943cec3364795a541eb60576574447", "score": "0.61844957", "text": "def test_matrix_head_links_right(self):\n\t\ttest_matrix = Matrix([ [1, 0, 1, 1], [0, 0, 1, 1], [1, 0, 0, 0], [1, 0, 0, 0] ])\n\t\tcol = test_matrix.columns\n\t\ttest_head = col[0][0].left\n\t\tnext_head = test_head.right\n\t...
[ { "docid": "a2b43f42cdaee4692fca5b53f4fb5fba", "score": "0.61282086", "text": "def test_reversed_direction(self):\n # Create a harmonic oscillator system to test.\n compound_state, sampler_state = self.get_harmonic_oscillator()\n mcmc_move = self.get_langevin_dynamics_move()\n\n ...
51e958855f0dca8db98c1de9be4bb748
verifica que el formulario solo con el dato 'Ciudad' no es valido
[ { "docid": "6c20da4db0026cf549f37d6940d4e762", "score": "0.0", "text": "def test_FotoForm_onlyoneitem(self):\n response = self.client.post(\n '/', {'username': 'pepe', 'password': '123456'})\n self.assertEqual(response.status_code, 302)\n data = {'Ciudad': \"cordoba\"}\n ...
[ { "docid": "5299859ea146747269c9691566036e19", "score": "0.6833197", "text": "def test_simple_invalid_form(self):\n invalid_data = dict(self._data, codigo_de_area='a11')\n f = DatosDeEnvioForm(invalid_data)\n self.assert_(not f.is_valid())\n self.assert_(f.errors)", "titl...
a8dc8bc8bbf9a2d52bce166494c532b5
private function, tries to find a file ``version.txt`` which should contains the version number (if svn is not present) path folder to look, it will look to the the path of this file, some parents directories and finally this path the version number If ``version.txt`` was not found, it throws an exception.
[ { "docid": "734c207ad010d6a79b3fdf61a0620b95", "score": "0.7988161", "text": "def __get_version_from_version_txt(path) :\n file = os.path.split(__file__)[0]\n paths = [ file,\n os.path.join(file, \"..\"),\n os.path.join(file, \"..\", \"..\"),\n os.path.joi...
[ { "docid": "68a313325d3a6311c212c2b85fc3ef07", "score": "0.6514272", "text": "def test_get_version_searching_for_version_file(mock_open_fix,\n mock_is_dir_true,\n mock_is_file_false,\n ...
3795a77c3a6a97511d9e337e76e4c557
Start timestamp of the query range.
[ { "docid": "431c9641bb2acecb93e4624fd0dcf638", "score": "0.649369", "text": "def start_timestamp(self) -> str:\n return pulumi.get(self, \"start_timestamp\")", "title": "" } ]
[ { "docid": "0ed6fc12aa8903e09ac03e37826a6d71", "score": "0.70146394", "text": "def start_time(self):\n return self._current_edit_range[0]", "title": "" }, { "docid": "5c19bb6a8cb906189a9b0bd31ae8693c", "score": "0.68969023", "text": "def start_timestamp(self) -> datetime:\n ...
b77313869068b1bf5e6a7fbfb2830ef4
Initialize CronTabber with current user's crontab.
[ { "docid": "6360535a11c311dbc9280cea8e053ee1", "score": "0.85432917", "text": "def __init__(self):\n self.crontab = CronTab(user=True)", "title": "" } ]
[ { "docid": "4603756c86af606dca587e990dc8079c", "score": "0.67277706", "text": "def crontab():\n if env.host != 'local':\n output = \"/tmp/crontab\"\n local_crontab_file = render_to_file(\"crontab\", output)\n\n put(local_crontab_file, '/tmp/crontab')\n run('crontab /tmp/cr...
6a23c8331c89e102131c676da1b71a82
Checks to make sure a BAM file has an index, if the index does not exist it is created Usage undefined if file does not exist (check is made earlier in program) bamfile a path to a bam file Returns 1
[ { "docid": "ccd54fb2110fde7106e81a21dbcbe5e8", "score": "0.85391355", "text": "def check_for_index(bamfile):\n\n if not os.path.exists(bamfile):\n raise NameError(\"file %s does not exist\" % (bamfile))\n \n if os.path.exists(bamfile + \".bai\"):\n return 1\n else:\n ver...
[ { "docid": "e94e4c7568a006bd03256cbbd6675f5d", "score": "0.79619974", "text": "def bam_index(path, bam_file):\n\t\n\tcmd3 = 'samtools index %s'%(path+bam_file)\n\tprint cmd3\n\tprint os.getcwd()\n\tif os.path.exists(path+bam_file) and os.path.exists('%s.bai'% (path+bam_file[:-4])) == False:\n\t\t\tres3 ...
436179f3ed80932612fd4765048ab885
Perform the functions in a satisfactory order.
[ { "docid": "2d5d300624d0141dfcf0b5256889e871", "score": "0.0", "text": "def main():\n my_cipher = Cipher()\n print(my_cipher.encrypt())", "title": "" } ]
[ { "docid": "30d79b1ff7399778240afe1f93913455", "score": "0.6933145", "text": "def all(self,*args):\n for f in self.anyorder:\n t1 = time.time()\n res = f(*args)\n t2 = time.time()\n self.update_stats(f,t2-t1,res)\n if not res:\n ...
5efd19762b31660385ccad243d1bcdd8
Setup initialize the runtime setup, which may require for the `gef` to be not None.
[ { "docid": "0f3abe335a3caf0ffac2eed3d7dc1f84", "score": "0.6264551", "text": "def setup(self) -> None:\n self.reinitialize_managers()\n self.gdb = GefCommand()\n self.gdb.setup()\n tempdir = self.config[\"gef.tempdir\"]\n gef_makedirs(tempdir)\n gdb.execute(f\"s...
[ { "docid": "76fbc9bd6e190f18c3b9ef1cf27d2a74", "score": "0.6606635", "text": "def _setup(self) -> None:", "title": "" }, { "docid": "22e71f90696515479fa10af0304fd3b8", "score": "0.6592227", "text": "def setup(self) -> None:\n pass", "title": "" }, { "docid": "22e71...
8dac01e27ce535e660ebe70b2057cca8
function get_user_email is an helper function to retrieve the email associated with the user
[ { "docid": "7c09e3b8fa3fa96a9c15770ba9917374", "score": "0.8517654", "text": "def get_user_email(self):\n return self.user.email", "title": "" } ]
[ { "docid": "ab547faa913138ec02b4ed088c1d569b", "score": "0.78623545", "text": "def get_emailuser(self, email):\n return ccnet_threaded_rpc.get_emailuser(email)", "title": "" }, { "docid": "04b5507431338094d8baa567a4611598", "score": "0.7805862", "text": "def user_email(self) -...
914bc926f0a367e9a585944129d16abf
invoke contract controller to react to failures
[ { "docid": "207fe5b73b8f41ae6c958a0344e16c30", "score": "0.0", "text": "def react_to(failures, controller = 'greedy'):\n nonlocal current_state_id\n global strategy_dict\n #init_state, guart = options['init_contract']\n init_state = strategy_dict[current_state_id]\n as...
[ { "docid": "ba1c78f6af1c27e09f89164b41e851e5", "score": "0.6214747", "text": "def __failed__(self, lifecycle, result):", "title": "" }, { "docid": "c865a8e0d996d1b6d662b2cfcdff99ce", "score": "0.5804121", "text": "def _ebRequestFailed(self, reason):\n log.err(Exception('Fa...
035bde00b0ca8428ebaf37bbe68bfda6
Return the position of atom d with cd length r, bcd angle theta, and abcd dihedral phi, all in radians.
[ { "docid": "dd2b059a6a8dbc01bb0300da5ebdb2f7", "score": "0.53789735", "text": "def ApplyDihedralGeometry(a, b, c, r, theta, phi):\n if not isinstance(a, numpy.ndarray):\n a = a.pos\n if not isinstance(b, numpy.ndarray):\n b = b.pos\n if not isinstance(c, numpy.ndarray):\n c...
[ { "docid": "aca83763c75cf49a35332fb844c19e36", "score": "0.5987134", "text": "def CalcDihedral(a, b, c, d):\n if not isinstance(a, numpy.ndarray):\n a = a.pos\n if not isinstance(b, numpy.ndarray):\n b = b.pos\n if not isinstance(c, numpy.ndarray):\n c = c.pos\n if not i...
754cbfec894ae5c0aa682bac3a7d2dd2
Reset a key override. Any overrides applied to the specified key will be removed, allowing the value in the parent to be seen again.
[ { "docid": "f41dae190abb6204987b37634b086063", "score": "0.65187776", "text": "def reset(self, key=_unpassed):\n\n if key is _unpassed:\n # OK, clear everything\n self._deleted = set()\n self._values = {}\n else:\n # Clear just the one key\n ...
[ { "docid": "000d1e2400590ef0cab64e5b91afa7ff", "score": "0.70527697", "text": "def reset(self, key):\n\t\tsuper().__setitem__(key, self._metadata[key].default)", "title": "" }, { "docid": "55fb9dde8823953ab5c2efa428d7ba34", "score": "0.69658613", "text": "def reset(self, key):\n ...
87f8d7c1ae54134b2bbef3b161c7e971
Simple utility function to look up pixelscale from apername
[ { "docid": "98ba67c052d85002aa186988874a25f0", "score": "0.80523163", "text": "def _get_pixelscale_from_apername(self, apername):\n ap = self.siaf[apername]\n # Here we make the simplifying assumption of **square** pixels, which is true within 0.5%.\n # The slight departures from th...
[ { "docid": "9357ce8b2f57c7121652c3bdffda79a8", "score": "0.6847892", "text": "def get_scale_factor(data_dir):\n reg_match = re.search(\"sf[0-9]+\", data_dir).group(0)\n return int(reg_match[2:])", "title": "" }, { "docid": "17ecfd771ea5ba9c9f574d934a712861", "score": "0.65308654", ...
28be2400800ce2ba8cec46a109f27143
Request the result for some text on DBPediaSpotlight.
[ { "docid": "e9a76dfdddc8cc843a1d78359f838b24", "score": "0.55680686", "text": "def req(self, text, delay=0.5):\n self.post_data['text'] = filter_emoji(text)\n r = req_using_pool(self.pool, self.page, self.post_data)\n\n try:\n return json.loads(r.data.decode('utf8'))\n ...
[ { "docid": "c6fe392535aacb3d10b4c68acd56990d", "score": "0.6499329", "text": "def get_result():\n r = request.args.get('text')\n texthtml = internet_sock.internet_get(r)\n return texthtml", "title": "" }, { "docid": "399a772a789fb2581e6816bb2b16eb42", "score": "0.6037484", "...
d6e5264081c833836abf3869d042c92f
Multiply numbers with uncertainties.
[ { "docid": "6af62adac81de4b15a92b4bf8d717efc", "score": "0.0", "text": "def mul(x_sigma,y_sigma):\n\n x, dx = x_sigma\n y, dy = y_sigma\n\n z = x*y\n\n dz = z* np.sqrt((dx/x)**2+(dy/y)**2)\n\n return (z,dz)", "title": "" } ]
[ { "docid": "8a456cd91fd61058e4174ab38f25bcaf", "score": "0.7515985", "text": "def multiply(self, n):\n\t\tpass", "title": "" }, { "docid": "bb3d6cc4269c3bae4604f1aad9e34ff2", "score": "0.706079", "text": "def product(numbers):\n return reduce(mul, numbers, 1)", "title": "" }...
00b4a1d13a8195d7b2260e3558faa6a2
The network configuration for customer VPC connectivity.
[ { "docid": "64bdf2b7efa844f4cd4b8ae714660da5", "score": "0.72619134", "text": "def network_configuration(self) -> pulumi.Output[Optional['outputs.ApplicationNetworkConfiguration']]:\n return pulumi.get(self, \"network_configuration\")", "title": "" } ]
[ { "docid": "ad1e2b9fba1bd8e594ca5dc31ab570ea", "score": "0.74247205", "text": "def network_config(self) -> 'outputs.NetworkConfigResponse':\n return pulumi.get(self, \"network_config\")", "title": "" }, { "docid": "f43649116f006ce921d40e40b5fa4dc3", "score": "0.71666706", "tex...
a709a5737a6fd7504500981de36ec180
Returns when the server is ready.
[ { "docid": "3f1ce331c4c086998b209f1ddcc470f0", "score": "0.0", "text": "def ping():\n return ''", "title": "" } ]
[ { "docid": "02aebb7dadf0c3c96bf82e8e5c3ec298", "score": "0.78574795", "text": "def is_ready(self):\n return True", "title": "" }, { "docid": "613f497ac14caa0f96b71b382aaf4e4f", "score": "0.7741623", "text": "def is_ready(self) -> bool:\n pass", "title": "" }, { ...
5bc5adcae699b537310df6aa90bf7cfc
Adds a transformer while taking care of the input type.
[ { "docid": "f19412c69e1e533cb0769e028f40ed7a", "score": "0.7337975", "text": "def _add_step(self, transformer):\n\n name = None\n if isinstance(transformer, tuple):\n name, transformer = transformer\n\n # If the step is a function then wrap it in a FuncTransformer\n ...
[ { "docid": "8f793780ba6e60795d160bf8e4fe527a", "score": "0.7657541", "text": "def register_transformer(cls, t):\n cls.subtransformers.append(t)\n return t", "title": "" }, { "docid": "125899613a5f526ab07c399827738074", "score": "0.6968655", "text": "def transformer(self...
77fd442f746fdcf07467b7de6a04bf10
Detect objects and extract feature of objects for the given data
[ { "docid": "c4ebb71575ebcb6b4a458e8ccfb9ee7b", "score": "0.587448", "text": "def extract_features(self, data,\n class_score_threshold=0.5,\n nms_threshold=0.3,\n layer=\"roi_pool5\"):\n\n if not self._executor_with_feature:\n ...
[ { "docid": "8d00c68a120eada03135b0af77f65937", "score": "0.65555567", "text": "def detect_objects(interpreter, image, threshold):\n labels = load_labels()\n set_input_tensor(interpreter, image)\n interpreter.invoke()\n # Get all output details\n boxes = get_output_tensor(interpreter, 0)\n classes ...
e31d1ba68aac9221b4a220599f630da9
Creates a new occurrence counter with the given initial_value
[ { "docid": "e3aad9b94abe74734550295156bf9d3f", "score": "0.8686415", "text": "def _create_occurrence_counter(self, initial_value=1):\n self._occurrences.append(initial_value)", "title": "" } ]
[ { "docid": "cb31c80e9e0c8ea37c2a746140ffe318", "score": "0.6011263", "text": "def update_counter(galini, name, amount, initial_value=0.0):\n telemetry = galini.telemetry\n counter = telemetry.get_counter(name)\n if counter is None:\n counter = telemetry.create_counter(name, initial_value...
8a02f31d65fa554429f78bc0ad1a4ea0
Show the app's homepage
[ { "docid": "a270a8112af1a21e18685e7e40fad310", "score": "0.79977566", "text": "def show_homepage():\n return render_template('homepage.html')", "title": "" } ]
[ { "docid": "8de335c3b36ea442f058b097175f8a14", "score": "0.8029172", "text": "def homepage():\n\n\t\treturn render_template(\"homepage.html\")", "title": "" }, { "docid": "533f390e18b8659416c5d69da75caaa2", "score": "0.7907027", "text": "def homepage():\r\n\r\n return render_templ...
56e07490a9cad56c291b18f52911b22c
Analyze method separates channels into subbands using MST This method has been provided.
[ { "docid": "6b300dd3cef8e5ed2e17af5a71f4a85f", "score": "0.0", "text": "def analyze(self, x):\n w = np.empty_like(x, dtype=np.int32)\n w[:, 0] = x[:, 0].astype(np.int32) + x[:, 1]\n w[:, 1] = x[:, 0].astype(np.int32) - x[:, 1]\n return w", "title": "" } ]
[ { "docid": "3e052f69502990dbb46ce5e645990d6a", "score": "0.59247506", "text": "def construct_subbands(self):\n logger.info(\"Grouping individual channels into consecutive subbands (if possible)\")\n\n # check if the 128,129 channel pair exists and note to user that the subband will be divi...
8eea9ec82e5d7ba7d39014e3ca250694
Deserialize datetime object into string form for JSON processing.
[ { "docid": "f5dd25b6ff54428d7f7d2b56e1c23735", "score": "0.5695315", "text": "def dump_datetime(value):\n if value is None:\n return None\n return [value.strftime(\"%Y-%m-%d\"), value.strftime(\"%H:%M:%S\")]", "title": "" } ]
[ { "docid": "48bc111e66ce1322720b65617c8c65eb", "score": "0.7181511", "text": "def _jsonify(o):\n if isinstance(o, datetime.datetime):\n return o.__str__()", "title": "" }, { "docid": "aae7583788ec0c63b995f058043130d5", "score": "0.70708674", "text": "def convert_for...
2a2039d67a02f77ba1a50da8311f93c5
Check if an instance of SQL Server is running
[ { "docid": "1ce17a3bed7df40df040cdf062d2cf7f", "score": "0.80247015", "text": "def checkRunningInstance():\n\n ret = runScript(checkRunningInstanceScript)\n\n if (ret == 0):\n print (_(\"An instance of SQL Server is running. Please stop the SQL Server service\"))\n print (_(\"using t...
[ { "docid": "5bbde1c586f394e8f31f9fe15892b959", "score": "0.6767707", "text": "def is_server_running(self):\n try:\n return self.call([\"BackgroundScheduler\", \"state\"]) == 1\n except ConnectionRefusedError:\n return False", "title": "" }, { "docid": "5bb...
b299f3551c1bdeebecdd99f771313935
Add new Elo rating for two charts
[ { "docid": "0a55ea45e50d0925243aae78f06f5b52", "score": "0.6828308", "text": "def elo_rate_charts(chart1_id, chart2_id, user, draw=False, rate_type=0):\n rate_type_display = 'elo_rating_hc' if rate_type else 'elo_rating'\n with transaction.atomic():\n win_chart = Chart.objects.get(pk=chart1...
[ { "docid": "c6e9c53253159ad07ae97821f12e0352", "score": "0.5908906", "text": "def co_rating():", "title": "" }, { "docid": "808ee4b759d70cc7cd42947850ee29dc", "score": "0.55668575", "text": "def test_add_rating(self):\n\n self.client.login(username=\"test_user\", password=\"se...
1ccdd9914d21f3a0dfba57e04eef4320
Test decorator syntax and runtime errors.
[ { "docid": "b3bead0185132cb747f6fc2a1f67d2e0", "score": "0.0", "text": "async def test_decorator_errors(hass, caplog):\n notify_q = asyncio.Queue(0)\n await setup_script(\n hass,\n notify_q,\n [dt(2020, 7, 1, 11, 59, 59, 999999)],\n \"\"\"\nseq_num = 0\n\ndef add_startu...
[ { "docid": "57bc1f9e7e71137303dd94c17747c463", "score": "0.6926897", "text": "def test_runner_syntax_error():\n source = utils.codeblock(\n r'''\n def demo_parsetime_syntax_error1():\n \"\"\"\n Example:\n >>> from __future__ import print_func...
6e2e0af482a440b25957ed5a8bae28ae
Internal fuction for euler_pole_calc
[ { "docid": "7e489797bc19b610cd6677934ca80f58", "score": "0.0", "text": "def topo2dm(coords):\n n = len(coords);\n dm = np.zeros([2 * n,3]) \n for index in range (0,2*n-1,2): \n dm[index,0] = np.sin(coords[int((index+1)/2)][1]);\n dm[index,1] = -np.cos(coords[int((inde...
[ { "docid": "86e30aaea8125cdd2499d560eb590dfa", "score": "0.6845522", "text": "def euler_totient_function(q, p):\n return (p - 1) * (q - 1)", "title": "" }, { "docid": "0d1d7b3009d3188c2c7233c7ad4ef410", "score": "0.63748366", "text": "def euler_step(u, f, dt):\n \n return u ...
7e78f227c5197e91a14e5a4bcff0b34d
Only works for catmaid1 server
[ { "docid": "da06323c18f45583e3ab9d8f4096a901", "score": "0.0", "text": "def user_stats(self, project=None):\n pid = self.find_pid(project)\n return self.fetchJSON('/{}/stats-user-history'.format(pid))", "title": "" } ]
[ { "docid": "b3be7b907a62d7b576d1b1be427a2787", "score": "0.6278678", "text": "def server(self) -> str:", "title": "" }, { "docid": "60e6e10c636d07e9a88f29835cd8e5a6", "score": "0.62576324", "text": "def client():", "title": "" }, { "docid": "9e96ac74a686435c643ae2138d0d62...
d0e38cbd29e337d66dd596b20da802a4
get popular image from dbase
[ { "docid": "ce3e49e4f324c8308a4485dcca636ee1", "score": "0.53152233", "text": "def tophits():\n data = [i for i in db.image.find().sort(\"hits\", -1).limit(24)]\n return render_template(\"top.html\", data=data)", "title": "" } ]
[ { "docid": "5363c0ac1800c09cef388513e2c21ad9", "score": "0.6300238", "text": "def most_similar_image():\n index = 61\n return index", "title": "" }, { "docid": "e4dc38acaca09a5f811d78565bfe2ba1", "score": "0.6279305", "text": "def getimgtags():\n\n # rows = db(db.tagref.ta...
5a5b819850d44a495d33ccfcf33de05d
Plots the learning curves
[ { "docid": "d2a7481ddc4e390f360be1d5d9329b40", "score": "0.70601207", "text": "def plot_learning_curves(P, A, dataset='adult'):\r\n if dataset == 'crime':\r\n metric = 'MSE'\r\n else:\r\n metric = 'accuracy'\r\n\r\n fig, axs = plt.subplots(4, 1)\r\n axs[0].plot(np.arange(1, len...
[ { "docid": "b6947415b67c04e531ee5b4c39f5317e", "score": "0.8397364", "text": "def plot_learning_curve(training_losses): \n plt.ylabel('Loss')\n plt.xlabel('Training Steps')\n plt.plot(training_losses)", "title": "" }, { "docid": "b6947415b67c04e531ee5b4c39f5317e", "score": "0.8...
c0bf431b5bb65dce6e8ec4464b854b29
New() > itkScalarImageKmeansImageFilterIUC2IUC2 Create a new object of the class itkScalarImageKmeansImageFilterIUC2IUC2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non na...
[ { "docid": "8b814376fb0646d52782c57e642d3d6e", "score": "0.8396783", "text": "def New(*args, **kargs):\n obj = itkScalarImageKmeansImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "title": "" } ]
[ { "docid": "ad809e014d8beb68f1fe6746da40e2b6", "score": "0.823897", "text": "def New(*args, **kargs):\n obj = itkScalarImageKmeansImageFilterIF2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "title": "" }, { "docid":...
c7b23e125f1f62bca2ea5c3a31158832
Mark the feed as unread
[ { "docid": "12f42e18e196ebc716deb7230414b4ca", "score": "0.72663385", "text": "def do_action(self):\n self.params['object'].dist_mark_as_unread()", "title": "" } ]
[ { "docid": "eabef77bc25456bcaa79fe62863d497f", "score": "0.71112126", "text": "def unread(self, data):\n self._unread.append(data)", "title": "" }, { "docid": "655f29a9f0d07f3a536fee64f03e76a5", "score": "0.69926304", "text": "def mark_all_notifications_as_read(self):\n for...
f7cd3021d1999fa76ccf5c86cf1717ac
Sets the api_volume of this AccountLimits.
[ { "docid": "2c99e473038f12f9d60462698fab6989", "score": "0.7204298", "text": "def api_volume(self, api_volume):\n if self.local_vars_configuration.client_side_validation and api_volume is None: # noqa: E501\n raise ValueError(\"Invalid value for `api_volume`, must not be `None`\") # ...
[ { "docid": "eed3926e5bd301eeeec00de8ac8790b4", "score": "0.6478817", "text": "def api_level(self, api_level):\n\n self._api_level = api_level", "title": "" }, { "docid": "bc941602964cbf205dd4978b8f99af04", "score": "0.6474038", "text": "def set_volume(self, zone: int, volume: ...
23c6163a29c59109a813f9b12ef4e807
Generate OAuth request to authorize token.
[ { "docid": "25400348fd1c456d45605c164cd54361", "score": "0.7670326", "text": "def oauth_authorization_request(self, token):\n params = self.auth_extra_arguments() or {}\n params['api_key'] = BODYMEDIA_CONSUMER_KEY\n params.update(self.get_scope_argument())\n return OAuthReque...
[ { "docid": "e42d4e79f6b42e1fedfe35a79128ae27", "score": "0.7870929", "text": "def oauth_authorization_request_(self, token):\n \n request = OAuthRequest.from_token_and_callback(\n token=token,\n http_url=self.AUTHORIZATION_URL,\n )\n request.is_form_enc...
7880705b73e3a8660667158a6cbff765
Getter method for host_interface_block, mapped from YANG variable /components/component/integrated_circuit/pipeline_counters/errors/host_interface_block (container)
[ { "docid": "6fe199218d3b2417cb24f68b8603a1d1", "score": "0.63888496", "text": "def _get_host_interface_block(self):\n return self.__host_interface_block", "title": "" } ]
[ { "docid": "531d4d11351c733b4946010bc3d08cae", "score": "0.8094548", "text": "def _set_host_interface_block(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_host_interface_block_openconfig_platform__components_component_integrated_c...
9cad2ae063d763b88d9bc4a37d4cb9ed
The API key for accessing the Azure ML model endpoint.
[ { "docid": "9e3e7e716c563cd19c3e51686203dfb4", "score": "0.66521347", "text": "def api_key(self) -> Any:\n return pulumi.get(self, \"api_key\")", "title": "" } ]
[ { "docid": "fc85cd047dcb67f1dc883f75f78624ab", "score": "0.67123985", "text": "def api_key(self) -> str:\n return self._api_key", "title": "" }, { "docid": "c39011b0d3b7489ab87b877729408b7b", "score": "0.66387504", "text": "def api_key(self):\n return self.__api_key", ...
8179533704ade3fe1adb506fcef3d4f8
Getter method for start_value, mapped from YANG variable /nsd_catalog/nsd/parameter_pool/range/start_value (uint32)
[ { "docid": "9a214c747ecaf1da1c2869665c91cf0c", "score": "0.64253175", "text": "def _get_start_value(self):\n return self.__start_value", "title": "" } ]
[ { "docid": "38b6d1df5d5d2e8ea7fe23c699921fad", "score": "0.7645604", "text": "def _set_start_value(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=long, restriction_dict={'range': ['0..4294967295']}, int_...
94d3221a8e2c7d0f96a7a5fecda208d9
Load saved user data into Privacy Badger after a restart
[ { "docid": "58b68adf2ad67bba16f62448c58de135", "score": "0.63841015", "text": "def load_user_data(self, data):\n self.load_extension_page()\n\n self.driver.execute_async_script((\n \"let done = arguments[arguments.length - 1];\"\n \"chrome.runtime.sendMessage({\"\n ...
[ { "docid": "cdc6627c211ed872c955b517d2315718", "score": "0.6293094", "text": "def load_preferences():\n Preferences.load_settings()\n current_app.logger.info('Successfully loaded user preferences')", "title": "" }, { "docid": "44c4e663882c612c13d872bb9b8c0a7e", "score": "0.61983794...
eba952d294cab4cbe3a8d5753a2b9925
Parse command line arguments.
[ { "docid": "93651595aa9142eaafcc7ae2c39e755e", "score": "0.69388056", "text": "def parse_args():\n parser = argparse.ArgumentParser(description=\"Performs class mapping inference.\")\n parser.add_argument(\n \"--organs_dir_path\",\n type=str,\n default=\"data/data_organs\",\n ...
[ { "docid": "32c340fd2874fc6e01daf9f4e48bbb98", "score": "0.7483945", "text": "def _parse_args():\n _log('Parsing script arguments')\n args = copy.copy(sys.argv)\n args.pop(0) # Remove Python file path arg\n\n for arg in args:\n if arg[:7] == '--tags=':\n tags.append(arg)\n...
4908cd16f708abcd37d08f81ea1bba19
Request contains values that can be converted to the expected types.
[ { "docid": "b0054c6bc11700f69139c60b1907caec", "score": "0.0", "text": "def test_pass_compatible_types(self):\n txn =\\\n ProposedTransaction(\n address = Address(self.trytes_3),\n value = 42,\n )\n\n filter_ =\\\n self._filter({\n # ``changeAddress`` can be a...
[ { "docid": "091fd7d94953fa72a9cca4483b2f8870", "score": "0.6157311", "text": "def _convert_param_type(self):\n\n def convert_type(input_dict):\n for k, v in input_dict.items():\n if k == \"TvgRangeCorrection\":\n if v not in self.TvgRangeCorrection_all...
9bbc9a3819836ec84bb24d39c964bfd1
if you are calculating ir spectra, you have to have the dipole information for the molecule available in the simulated trajectory. that is realized by FORCE_EVAL%DFT%LOCALIZE
[ { "docid": "c790371a37939879a1eb1935fdd9d667", "score": "0.53871095", "text": "def ir_spectra(self):\n self.set_section_status({\n \"force_eval-dft-localize\": True,\n })", "title": "" } ]
[ { "docid": "8f1dac93b623de3c8c0179766b20c5c6", "score": "0.57128525", "text": "def ofdm_modulate(sys_parameters, waveform_info, grid):\n # Get dimensionality information derived from the system parameters\n waveform_info.set_info(sys_parameters)\n # Cache the main dims\n nsc = waveform_info....
2eb26ab344ab264b2d77ff0ba5f10ec4
Given a 4 letter code, use SUBDIV_CODE_MAP, and COUNTY_CODE_MAP to produce subdivision and county fields
[ { "docid": "e76b01c1e8df8b8637878da01cb73389", "score": "0.7424413", "text": "def parse_county_subdiv_code(code):\n county_code = code[:2].lower()\n subdiv_code = code[2:].lower().split('/')[0]\n county = COUNTY_CODE_MAP[county_code]\n subdiv = SUBDIV_CODE_MAP[subdiv_code]\n return county...
[ { "docid": "c5742bd9491761cb50a2e4f87937a78b", "score": "0.6208167", "text": "def CountyCode():\n TableView(DOTRoads+\"\\NG911_County\", \"NG911_County\")\n JoinTbl(lyr,\"COUNTY_L\",\"NG911_County\", \"CountyName\", \"KEEP_COMMON\")\n CalcField(lyr,\"KDOT_COUNTY_L\",\"!NG911_County.CountyNumber...
f74b0919a21ecee83c477aaf34df065a
get optimal control input for the next timestep. xFull Fullorder state measurement. xRedFlag True if the state is already reduced.
[ { "docid": "992ea67314a4974baabd6e198bb8df44", "score": "0.5942547", "text": "def getUopt(self,xFull,xRedFlag = False):\n if xRedFlag == False:\n xRed = np.dot(self.T,xFull) # Get reduced state.\n else:\n xRed = np.zeros((xFull.shape[0] + self.nAux))\n xRed...
[ { "docid": "2f6046ec082165f9eba24f95045fb8fd", "score": "0.5990941", "text": "def get_optimal_action(self, state):\n # TODO : Implement solving linear system, replace tmp with correct control\n control = matrix_opt.fit_control(self.target_point, state, self.A, self.B)\n if self.limi...
650a9e122d71ed83cde50c8118e77292
Update a Solr entry identified by its id using (key,value) pairs.
[ { "docid": "79dbce15d2f0f767c50ccaf3520a41da", "score": "0.63010025", "text": "def pavicsupdate(solr_server, update_dict):\n\n # Get all the information of the current Solr document\n if 'id' in update_dict:\n my_search = \"q=id:{0}&wt=json\".format(update_dict['id'])\n elif 'dataset_id'...
[ { "docid": "ec7dfe4631b7ba0e1372afcb6d34cb53", "score": "0.6533157", "text": "def update(self, record_id, **kwargs):\n arg_list = []\n value_list = []\n for key, value in kwargs.items():\n arg_list.append('{} = %s'.format(key))\n value_list.append(value)\n ...
c1349abebbe8c83dc65e044b45deb10b
Add new keyword argument `hello` >>> PetriNet('N').hello() Hello from N >>> PetriNet('N', hello='Hi! This is %s...').hello() Hi! This is N...
[ { "docid": "1e1c7dd30de7f3faf27d2bb7cde0875d", "score": "0.47194985", "text": "def __init__ (self, name, **args) :\n print(type(self))\n self._hello = args.pop(\"hello\", \"Hello from %s\")\n module.PetriNet.__init__(self, name, **args)\n print(self, type(self...
[ { "docid": "6ff834fb381665f7b6a5cb2205bd8640", "score": "0.61344844", "text": "def get_hello(self, arg):\n return 'Hello %s' % arg", "title": "" }, { "docid": "e231c1786b45af6be78007a724a57d10", "score": "0.59566647", "text": "def hello(name = 'keisatou'):\n print(\"hello, ...
e07f1b50b16d81105dea0c8e95ed9246
If user's input is a greeting, return a greeting response
[ { "docid": "d479f4fb6f9e8e7ffc7c8074f358e593", "score": "0.6962479", "text": "def greeting(sentence):\n for word in sentence.split():\n if word.lower() in GREETING_INPUTS:\n return random.choice(GREETING_RESPONSES)", "title": "" } ]
[ { "docid": "1f8d9f9a7b9a1fa754ea526a9517246a", "score": "0.6959173", "text": "def greeting(sentence):\n global GREETING_INPUTS\n global GREETING_RESPONSES\n for word in sentence.split():\n if word.lower() in GREETING_INPUTS:\n return random.choice(GREETING_RESPONSES)", "ti...
8f65bc1c0c4a28abfb913472ef62654d
Print the training configuration.
[ { "docid": "ff532fbd9c7161a7913c7ce953996510", "score": "0.73269385", "text": "def print_configuration(flags, aher_params, data_sources, save_dir=None):\n def print_config(stream=None):\n print('\\n# =========================================================================== #', file=stream)\n...
[ { "docid": "daa844beed1e2c214318b2a0ddc675ab", "score": "0.732663", "text": "def print_training_setting(self, settings):\n\n self.logger.info('\\nTraining details:')\n for k in settings[self.session_id]:\n if isinstance(settings[self.session_id][k], dict):\n self....
552f104a5e73fdfe68b949f38e7d083b
Displays a table of the habit(s) with the longest streak.
[ { "docid": "043cd964882e5334c8094fca0e88f3ff", "score": "0.7788809", "text": "def habit_longest_streak(self):\n # Clean up the console\n self.clear_console()\n # Prints the name of the application and instructions to the main menu\n self.back_to_menu_info()\n print(\"\...
[ { "docid": "f369f93a8f922afc1d7a798692823975", "score": "0.70373034", "text": "def test_longest_streak_all_habits():\n habits_trackings_table = analytics.habits_trackings_table()\n habit_info_longest_streak = analytics.habit_info_longest_streak(habits_trackings_table)\n assert analytics.name_ha...
cbaae9bee5fa3c1d29a0637244ecdee2
Converts to dictionary compatible with MATLAB
[ { "docid": "2babb405052d42dc481d52f8200f977e", "score": "0.0", "text": "def to_mdict(self, name):\n mdict = {'poses': self._poses,\n 'frame_ids': self._frame_ids.items(),\n 'descriptors': None,\n 'name': [name],\n 'forward': [],\n ...
[ { "docid": "cd24214198d90e08997c285f8bc68664", "score": "0.6664811", "text": "def get_dict():", "title": "" }, { "docid": "7550910142e0a82f7792a2ddcef64df3", "score": "0.6607125", "text": "def recarray2dict(ra):\n d = { key:val for key, val in zip(ra.dtype.names, ra.tolist()) }\n ...
6266c973d06d9a3db2f5dafb0c142c72
Downloads documentation associated with IRS SOI Historical Table 2
[ { "docid": "190874280eeb34d573fc7d73a5b564a5", "score": "0.62471473", "text": "def get_docs(self):\n \n if self.year < self.mincompleteyr:\n raise ValueError(\"Documentation only available 2012 and onwards.\")\n\n filename = '{}incmdocguide'.format(self.yy)\n urlst...
[ { "docid": "cdd5c1affe96db172149ff6160bcf39d", "score": "0.61644614", "text": "def get_doc(logya_inst, url):\n\n return logya_inst.docs.get(url)", "title": "" }, { "docid": "4c0cbf68e7aca92819f0785808bf4984", "score": "0.5851935", "text": "def get_documentation(self):\n # c...
783f32bd4d6c58ca4ec0767ead5e1768
A previously established connection was found. This will be the default connection to start.
[ { "docid": "b8e6b341e69a7e5fbd22ce439bef94c5", "score": "0.5911767", "text": "def found_previous_connection(self,\n app: Application,\n server: Server,\n ) -> NetworkState:\n app.interface_transitio...
[ { "docid": "fd56e177497fcb7c271f65d8369b0672", "score": "0.6363437", "text": "def _reconnect(self):\n if self._connection.closed > 0:\n self._connection = self._connect()", "title": "" }, { "docid": "acf5400480e3255106f644dd5c197160", "score": "0.6337093", "text": "...
f460811000e7ba45eb2e7399a0b30c77
Build context for view.
[ { "docid": "e23049e8eb5b78724a9d00684fc7c34e", "score": "0.0", "text": "def get_context_data(self, **kwargs):\n context = super(PublicProfileView, self).get_context_data(**kwargs)\n request_user = User.objects.filter(username=self.kwargs['request_username'])\n imager_profile = Image...
[ { "docid": "f5cfbe026e23b36604f93ffcd667d129", "score": "0.6692236", "text": "def generate_context(self):\n raise NotImplementedError", "title": "" }, { "docid": "2c20dcefe742d6f2b76e08f388cf1e1a", "score": "0.6588604", "text": "def get_context(self, request, context, **kwargs...
a301f3f1e7d6be942b7976f14714974d
Update the scraper config and name by sending PUT request.
[ { "docid": "52b21767f5464fe5c27ed2ef92b4fc98", "score": "0.74320465", "text": "def update(self, id_or_name, name, config):\n data = {'name': name, 'config': config}\n return self.client.put('/scrapers/{}'.format(id_or_name), data)", "title": "" } ]
[ { "docid": "e8c57175ec238a519b8d1a42dd3983f9", "score": "0.6280583", "text": "def put(self, name):\n data = rest_utils.get_json_and_verify_params({\n 'value': {},\n 'force': {'type': bool, 'optional': True}\n })\n value = data['value']\n force = data.get...
6a10b8f3ca995c7dceea823c5601d9aa
Used inside transformed functions, recognized by , and the k is automatically supplied. Cannot be called in return position. Use thusly
[ { "docid": "64df00d179c567bff1d455e16d845c99", "score": "0.0", "text": "def raise_Ef(x, k):\n x._k = k\n return x", "title": "" } ]
[ { "docid": "2fd55c928bad1935d7a01e1647003a6d", "score": "0.70614517", "text": "def S(self, k):\n # TODO: 1 lines missing.\n raise NotImplementedError(\"Implement function body\")", "title": "" }, { "docid": "7ab7375f0830bbb72d7dd22ad27d5089", "score": "0.6948748", "text...
f588c36eb70338466bac35b9f64a9027
Sets the value at a given indentation level.
[ { "docid": "95ad4bcc077bf144a6dc4e3781251024", "score": "0.0", "text": "def __setitem__(self, index, value):\n if index < 0:\n raise ValueError\n while len(self.all) <= index:\n self.all.append(None)\n self.all[index+1:] = [value]", "title": "" } ]
[ { "docid": "ad542c91c2251023fd1a5f6148c37cc5", "score": "0.6587817", "text": "def indent(self, value):\n self._indent += value", "title": "" }, { "docid": "8c3976f43ef81edb18565c4fc254a835", "score": "0.6459699", "text": "def level(self, value):\n self._level = value", ...
e7452dc48b784be27fd3650a5f4fb04f
Creates the Data Frame objects and returns back in array
[ { "docid": "c68653d6a73539c71116e0adefe4a58b", "score": "0.0", "text": "def __initiate_vars(self,file_path, delimiter):\n df_pandas = pd.read_csv(file_path,delimiter=delimiter)\n rzt_data = RZTData(cntx.experiment)\n df_rzt = rzt_data.read({\n 'path':file_path,\n ...
[ { "docid": "f3cac4bb3a80488c58c07f43841fc51f", "score": "0.7516557", "text": "def create_dataframe(self):\n raise NotImplementedError", "title": "" }, { "docid": "f3c404fb5f07c549abab0f693980de90", "score": "0.71988475", "text": "def _get_data(self):\n # TODO implement ...
a3a1c554473d8173e7ec8040362da842
Gets details about a specific instance
[ { "docid": "da8eb30b9db6664135e2b15ec7c0e2e5", "score": "0.6746519", "text": "def get_instance(self, instance_name):\n try:\n return self.driver.vms.get(name=instance_name)\n except Exception as e:\n return None", "title": "" } ]
[ { "docid": "69447ec0eda44af05f3fe5ebfa6b9d16", "score": "0.776595", "text": "def show(self, instance):\n \n return self._list(\"/mgmt/instances/%s\" % base.getid(instance),\n 'instance')", "title": "" }, { "docid": "f4d8eef76f2bdfe57093deb69f579519", "score": "0....
7070bd69164b7992eb7f720077323f67
Defines the hessian matrix for the cost function
[ { "docid": "b536ae7f28eb22e92c4e3d9a75c5bf3c", "score": "0.58042645", "text": "def f_hess(x, *args):\n D, N, m_deg, nk = args[0], args[1], args[2], args[3]\n hess = [[0 for i in range(N)] for j in range(N)]\n n = sum(nk)\n for i in range(N):\n for j in range(N):\n hij_1 = 0...
[ { "docid": "70b133178455eb1f704a65c04f1163e3", "score": "0.7606198", "text": "def hessian(self, x):\r\n return numpy.array([[10, 8], [8, 10]], dtype = numpy.float)", "title": "" }, { "docid": "45c382621e4d63d7ac2a62c425605811", "score": "0.74376804", "text": "def hessian(X,Etha):\...
200254087000ab1eccf0b7aeca357dcc
Generate network layers based on configs
[ { "docid": "6c90944aa679d129f8a5e0ecfcb59f05", "score": "0.0", "text": "def _make_layer(self, in_channels, out_channels, num_blocks, stride=1):\n downsample = None\n expanded_in_channels = in_channels * self.block.expansion\n expanded_out_channels = out_channels * self.block.expansi...
[ { "docid": "c03843b0a4bb02acb8811d8b04215eaa", "score": "0.738548", "text": "def _make_layers(self, configs: list):\r\n layers = []\r\n for config in configs:\r\n layer = self._make_layer(config['class'], config['args'])\r\n layers.append(layer)\r\n\r\n self.ne...
c9a569b56de5dbd8f8539da9ecd33b6d
Save data in dic to a hd5 file.
[ { "docid": "bff8019ca851b8d1a94fed35da0c33ba", "score": "0.75301886", "text": "def _save_h5(fp, dic):\n import warnings\n warnings.filterwarnings('ignore', category=pd.io.pytables.PerformanceWarning)\n\n jutil.create_dir(fp)\n h5 = pd.HDFStore(fp, complevel=9, complib='blosc'...
[ { "docid": "e613c24abca0917289bc6962b1238918", "score": "0.71980035", "text": "def save_hdf5(file_path, dictionary, compression=False):\n f = h5py.File(file_path, 'a')\n for key in dictionary:\n if key in f:\n del f[key]\n if compression:\n f.create_dataset(key,...
0bc4addec4b5366a097d76a134a5529d
Insert a row with values into table 'tname'. When the row exists it will be replaced with the new values. vallist must be in the same sequence as the table cols
[ { "docid": "6aa4a825926fef1adda63853720b384d", "score": "0.76797056", "text": "def insert_or_replace(self, tname, vallist):\n s = u'REPLACE INTO {0:s} values'.format(tname)\n qs = ['?'] * len(vallist)\n qs = \",\".join(qs)\n self.c.execute('''%s (%s)''' % (s, qs), vallist)\n ...
[ { "docid": "bdcc00bfd47dbcffa0f28bd39ea7408b", "score": "0.7562238", "text": "def add_row(self, tname, vallist, commit=True):\n s = u'INSERT INTO {0:s} values'.format(tname)\n qs = ['?'] * len(vallist)\n qs = \",\".join(qs)\n\n try:\n self.c.execute('''%s (%s)''' %...
594bfddb6d92d27142ddf9e2757fb099
Hyperbolic Tangent Nonlinear Activation Function
[ { "docid": "8a8d72a1dcac6398226531aa510de7b4", "score": "0.709707", "text": "def tangent_hyperbolic(z):\n return np.tanh(z)", "title": "" } ]
[ { "docid": "0768039b3e11f67b65f2e77de62fb04c", "score": "0.8281349", "text": "def HiperbolicTangensActivationFunction( x ):\n return tanh( x )", "title": "" }, { "docid": "3f12af731c1234fe21563b14525f2d64", "score": "0.8131882", "text": "def HiperbolicTangensDerivActivationFunctio...
677e5819b96ac20217667fc0c75fed70
Print a menu recursively. Raises HandinError if a menu type is unhandled. Raises KeyError if a necessary menu value did not exist. This includes 'type' for all menus, 'choices' for type=menu, and 'id' for type=selection.
[ { "docid": "08922252a5f03f19c356b91b826bce7e", "score": "0.766687", "text": "def _print_menu_choices(menu, key, choices, level=0):\n indent = \" \" * level\n if menu['type'] == 'selection':\n print \"%s [%s] %s\" % (\n indent,\n choices[menu['id']],\n menu.get('display_name', key)...
[ { "docid": "f529799e4495690bc0e73382ebad7e33", "score": "0.6648107", "text": "def print_menu():\n # your code goes here!\n print(\"Our menu:\")\n print(\"*******************\")\n for k, v in menu.items():\n print(k, \": \", v)\n print(\"*******************\\n\")", "title": "" ...
66d4561fba67f4ed4ecf2a6249b8e5e1
Initializes an ITS Spot module
[ { "docid": "b1bae47fe8f1a01d318d74babf874e1f", "score": "0.0", "text": "def __init__(self, RandomGen_seed, CF, SPOT_tree, msg_limit = 800000):\n self.random_generator = Random_generator(RandomGen_seed)\n self.CF = CF\n\n self.Travelmsgs = []\n self.BehaviorMsgs = []\n ...
[ { "docid": "8cb44e717080eb9ee738ac54804b6f6a", "score": "0.608191", "text": "def __init__(self):\n _libBornAgainCore.SimulationFactory_swiginit(self, _libBornAgainCore.new_SimulationFactory())", "title": "" }, { "docid": "248cebe817b7b1ed68dac8656112abaa", "score": "0.6079417", ...
9bb5cf61509db898f75f7d1b7d42d038
Retrieves the body of the email from S3. This requires that you set up a previous action in your SES rules to store the message in S3.
[ { "docid": "a06ad3cd3402b630d16da19a4fc388f9", "score": "0.81179136", "text": "def body(self):\n\n if self._body is None:\n log.debug(\"Downloading message body from s3://{}/{}\".format(\n self.s3_bucket, self.message_id))\n s3 = boto3.client('s3')\n ...
[ { "docid": "a7e98b7bf32ee40c89ed274de3a937a9", "score": "0.6889813", "text": "def read(self):\n return self._s3_key.get_contents_as_string()", "title": "" }, { "docid": "dfccaf4e4df65eefb2badef46de88a72", "score": "0.6478215", "text": "def file_contents(bucket, key):\n s3 =...
8953dd3455a97a0169841fcd630a9cb3
Getter for the job id.
[ { "docid": "f8ffee80f80151da03d30823017e8ff6", "score": "0.8907434", "text": "def get_id(self) -> str:\n return self._job.reference.job_id", "title": "" } ]
[ { "docid": "7e139d093137b627e99f2305b14524a3", "score": "0.90870863", "text": "def get_id( self ):\n return self.job_id", "title": "" }, { "docid": "76f0ccaa1b770534f3f4898c3fc7ab37", "score": "0.90781033", "text": "def job_id(self) -> str:\n return pulumi.get(self, \"j...
168c50cc3ee7c2f854f947842ef62d03
Transcribes the data received via bluetooth to numpy arrays.
[ { "docid": "a6df46c8d9d50b9ee7a572a18f274bbd", "score": "0.55152607", "text": "def bluetoothDataToNPArrays(dataFromBT, numDataPoints, numFeatures):\n\n designMatrix = np.zeros((numDataPoints * 2, numFeatures))\n targetMatrix = np.zeros((numDataPoints * 2, 1))\n\n for i in range(numDataPoints):\...
[ { "docid": "5e8c673c8e23761577125b46a7aa4813", "score": "0.5778601", "text": "def __raw_data_to_array(sequence, sampling_rate):\n return sequence['wave']", "title": "" }, { "docid": "6cdd4c901322160893c3d8e9de33a45d", "score": "0.576799", "text": "def to_array(self):", "ti...
fb22f1b9401be2b7df1b042d77eca87f
Handles receiving a line
[ { "docid": "368c708b261ca98ca1f3b807dfd56602", "score": "0.5919577", "text": "def recv_line(data):\n global board_elements\n global canvas\n if len(data) == 4:\n top_left = (int(data[1].split(\" \")[0]), int(data[1].split(\" \")[1]))\n bottom_right = (int(data[2].split(\" \")[0]),...
[ { "docid": "86af36f9f2c5f587adb43d6c498dd5a3", "score": "0.84185743", "text": "def line_received(self, line):\n return", "title": "" }, { "docid": "438969ca43b81399f41b78da3ee8d66f", "score": "0.82127386", "text": "def lineReceived(self, line):\n\n self.on_line(line)", ...
147bd0f59ffe20aebac804e6ad054b7d
Get for all complete groups an array of shrinkages
[ { "docid": "2375913ef054d497d82a1003805966db", "score": "0.5447506", "text": "def __get_shrinkage_factor(self, X_group):\n group_colnames = X_group.columns.to_list()\n counts = X_group.groupby(group_colnames).size()\n\n # Groups that are split on all\n most_granular_groups = ...
[ { "docid": "71185b4db892fbe483f9ea0dd369d699", "score": "0.6408654", "text": "def optimal_solution(self, groupSizes: List[int]) -> List[List[int]]:\n buckets = defaultdict(list)\n for i, size in enumerate(groupSizes):\n buckets[size].append(i)\n result = []\n for size, bucket in buckets...
c223d889be4179ae4643b672a0439505
Return a DataFrame with the new engineered features.
[ { "docid": "dfa0852d1e350742153d1b8458dc02d6", "score": "0.0", "text": "def extract_features(df, mode, update_map):\n # Day is a circular variable, hence we represent it using 2 new features :\n new_df = df.copy()\n new_df['x_day'] = df['day'].apply(lambda x: math.cos(2*math.pi*x/30))\n new_...
[ { "docid": "fe2b04d95a0dda89cf405385e4663a4d", "score": "0.7165676", "text": "def feature_engineering(train_df, test_df):\n \n #Not used as is part of the data transformation function\n\n return train_df.copy(), test_df.copy()", "title": "" }, { "docid": "c25f7058fbe27ea494d58cbe678...
2f4f315d0039d47a4074d3dc266cb091
Create the extension point.
[ { "docid": "f82827c97b51b736dbfc3b699976159b", "score": "0.0", "text": "def __init__(self, interface):\n property.__init__(self, self.extensions)\n self.interface = interface\n self.__doc__ = 'List of components that implement `%s`' % \\\n self.interface.__name...
[ { "docid": "c9bf0407a546c47d63f27fc8ba660f5b", "score": "0.65477675", "text": "def __init__(self, **config):\n\t\t\n\t\tsuper(Extension, self).__init__()", "title": "" }, { "docid": "96fb74a85a7c9e79d2047613ec8afa98", "score": "0.65290415", "text": "def test_make_extension(self):\n ...
cba97e2777e69a0e8feafccd1b304c2b
This method exports conf files to other members.
[ { "docid": "ca49f261cf2744bbfc49d6263aa2dec2", "score": "0.7163174", "text": "def _export_conf_to_members(self, members):\n try:\n for member in members:\n COPY_CMD = (system.SEND_CONF_TO_SERVER % (system.VERTICA_CONF,\n ...
[ { "docid": "53e11f1817e4cc0e5a994a7e9f2d97f4", "score": "0.64293945", "text": "def export_config(self, f_name=None):\n self.update_history()\n if f_name is not None:\n self.config.config_export(f_name)\n else:\n self.config.config_export(self.config.confname)",...
ee1cf8ae640d9d6335f1a2b91185bac0
calculate min error for all learners
[ { "docid": "47cfa6338e4dcfde0b322f4f814868f3", "score": "0.7466648", "text": "def getMinError(self):\n return np.array([learner.getMinError()()\n for learner in self._learners])", "title": "" } ]
[ { "docid": "317a5e9d0284abde4cc9dd6f16d84f2a", "score": "0.64385617", "text": "def batch_training(self, num_minibatches):\n\n epoch_tr_err = 0 # initialize the training error for each epoch to zero\n\n if self.with_metrics:\n\n for l in range(num_minibatches): # minibatch loop...
b12f72f1722d41320902c9e5d681fc56
performs costeffectiveness and costbenefit analyses
[ { "docid": "7289a2b99a2ee2c83553060f08c9e11c", "score": "0.0", "text": "def report_CEA_CBA(multi_cohort_outcomes_SOC, multi_cohort_outcomes_NSB):\n\n # define two strategies\n SOC_diagnostic_strategy = Econ.Strategy(\n name='SOC Diagnostic',\n cost_obs=multi_cohort_outcomes_SOC.meanC...
[ { "docid": "15992c3ac7d433e6ebac76decbf55a3c", "score": "0.7366483", "text": "def compute_costs_benefits(self):\n\n # unit costs\n if self.verbose:\n print(\"Preparing unit values...\")\n self._create_unit_cost_matrix()\n\n # costs\n if self.verbose:\n ...
462594201d5d2bf56be495970fb8cac8
This just calls drop_series on the characters specified.
[ { "docid": "b8ba7aeb9c2e2bbbeefc466fdee26036", "score": "0.7531891", "text": "def drop_series_list(item: pd.Series, chars_to_drop=None) -> pd.Series:\n if chars_to_drop is None:\n chars_to_drop = [\"-\", None, \"/\", \"\"]\n for char_to_drop in chars_to_drop:\n item = drop_series(ite...
[ { "docid": "f83bca0f7ea21874cf2e6713ce456691", "score": "0.7848441", "text": "def drop_series(item: pd.Series, char_to_drop) -> pd.Series:\n return item[item != char_to_drop]", "title": "" }, { "docid": "2d396762a72c513b02da28942e414a14", "score": "0.6176747", "text": "def remove_...
1a9b779989c37015734fc8703de0b700
Return to the user their total earnings so far.
[ { "docid": "6b4c43b9b62b044df327c9b90569703c", "score": "0.7550638", "text": "def calculate_total_earnings():\n all_earnings = worksheet_update.col_values(7)\n del all_earnings[0]\n # Used method 3 to turn a list of strings into a list of integers\n # https://www.geeksforgeeks.org/python-con...
[ { "docid": "c65615b462a8b663f0d3f469f92bd2ec", "score": "0.78068686", "text": "def total_earnings(self):\n return self.total_balance - self.net_invested", "title": "" }, { "docid": "a7832efbb787ce74a2c76cc6a4c42a3e", "score": "0.66952634", "text": "def update_total(self):\n\n ...
1e8ad7e43807b35e02ff996c8e179da4
get user object from json
[ { "docid": "8860bb34b741f37fe997ccdaf086faa1", "score": "0.0", "text": "def from_json(cls, json_data):\r\n user = User(json_data['username'])\r\n tasks = []\r\n\r\n for task_data in json_data['tasks']:\r\n tasks.append(Task.from_json(task_data))\r\n user.tasks = ta...
[ { "docid": "f302e7e62f562844057606b1fa43a3bf", "score": "0.7866385", "text": "def get_tweet_user(json):\n return get_user(json)", "title": "" }, { "docid": "5c448dd5475ebe6a26e1a8f723653225", "score": "0.7602358", "text": "def getuser(id):\n user = singleuser(id)\n user_json...