diff --git "a/pypi-bugs.jsonl" "b/pypi-bugs.jsonl" deleted file mode 100644--- "a/pypi-bugs.jsonl" +++ /dev/null @@ -1,2436 +0,0 @@ -{"repo": "https://:@github.com/emedvedev/attention-ocr.git", "hash": "291042e7cb623c8a908e9badd132c1fa2360288c", "diff": "@@ -465,7 +465,7 @@ class Model(object):\n mh = 32\n mw = math.floor(1. * w / h * mh)\n img = img.resize(\n- (mw, h),\n+ (mw, mh),\n Image.ANTIALIAS)\n img_data = np.asarray(img, dtype=np.uint8)\n for idx in xrange(len(output)):\n", "old_path": "aocr/model/model.py", "rewrite": "ReplaceText(target='mh' @(468,25)->(468,26))"} -{"repo": "https://:@github.com/emedvedev/attention-ocr.git", "hash": "6e6593c27fe0e63118adadf11562b1c4699b14e3", "diff": "@@ -477,7 +477,7 @@ class Model(object):\n attention_orig[i] = attention[int(i/4)-1]\n attention_orig = np.convolve(attention_orig, [0.199547, 0.200226, 0.200454, 0.200226, 0.199547], mode='same')\n attention_orig = np.maximum(attention_orig, 0.3)\n- attention_out = np.zeros((h, mw))\n+ attention_out = np.zeros((mh, mw))\n for i in xrange(mw):\n attention_out[:, i] = attention_orig[i]\n if len(img_data.shape) == 3:\n", "old_path": "aocr/model/model.py", "rewrite": "ReplaceText(target='mh' @(480,42)->(480,43))"} -{"repo": "https://:@github.com/emedvedev/attention-ocr.git", "hash": "e741baf7170e72a974754908d323cacc0bd55247", "diff": "@@ -133,7 +133,7 @@ class Model(object):\n self.target_weights = []\n for i in xrange(self.decoder_size + 1):\n self.decoder_inputs.append(\n- tf.tile([0], [num_images])\n+ tf.tile([1], [num_images])\n )\n if i < self.decoder_size:\n self.target_weights.append(tf.tile([1.], [num_images]))\n", "old_path": "aocr/model/model.py", "rewrite": "ReplaceText(target='1' @(136,29)->(136,30))"} -{"repo": "https://:@github.com/matthewdowney/TogglPy.git", "hash": "d5b630aec58d29b85ccffa527d24766eef6f61f9", "diff": "@@ -197,7 +197,7 @@ class Toggl():\n day = datetime.now().day if not day else day\n hour = datetime.now().hour if not hour else hour\n \n- timestruct = datetime(year, month, day, hour - hourdiff).isoformat() + '.000Z'\n+ timestruct = datetime(year, month, day, hour + hourdiff).isoformat() + '.000Z'\n data['time_entry']['start'] = timestruct\n data['time_entry']['duration'] = hourduration * 3600\n data['time_entry']['pid'] = projectid\n", "old_path": "toggl/TogglPy.py", "rewrite": "ReplaceText(target='+' @(200,53)->(200,54))"} -{"repo": "https://:@github.com/eEcoLiDAR/eEcoLiDAR.git", "hash": "f0b2a0b7a5fdd41887ba40b7687c8161c0faba1e", "diff": "@@ -28,6 +28,6 @@ class Test3FeatureExtractor(AbstractFeatureExtractor):\n return ['test3_a']\n \n def extract(self, sourcepc, neighborhood, targetpc, targetindex, volume):\n- t2a, t2c = utils.get_features(targetpc, targetindex, self.requires())\n+ t2a, t2c = utils.get_features(targetpc, self.requires(), targetindex)\n x, y, z = utils.get_point(targetpc, targetindex)\n return t2c - t2a - z # z\n", "old_path": "laserchicken/test_feature_extractor/feature_test23.py", "rewrite": "ArgSwap(idxs=1<->2 @(31,19)->(31,37))"} -{"repo": "https://:@github.com/eEcoLiDAR/eEcoLiDAR.git", "hash": "f0b2a0b7a5fdd41887ba40b7687c8161c0faba1e", "diff": "@@ -31,7 +31,7 @@ class TestUtils(unittest.TestCase):\n pc[keys.point][\"color\"] = {\"type\": \"double\", \"data\": cols}\n pc[keys.point][\"flavor\"] = {\"type\": \"double\", \"data\": flavs}\n x, y, z = utils.get_point(pc, 2)\n- c, f = utils.get_features(pc, 2, (\"color\", \"flavor\"))\n+ c, f = utils.get_features(pc, (\"color\", \"flavor\"), 2)\n self.assertEqual(c, 0.5 * (x + y))\n self.assertEqual(f, 0.5 * (x - y))\n \n", "old_path": "laserchicken/test_utils.py", "rewrite": "ArgSwap(idxs=1<->2 @(34,15)->(34,33))"} -{"repo": "https://:@github.com/eEcoLiDAR/eEcoLiDAR.git", "hash": "502a365efda1393b130281803702d01f7e2d1dcd", "diff": "@@ -29,7 +29,7 @@ class TestExtractEigenValues(unittest.TestCase):\n [\"eigenv_1\", \"eigenv_2\", \"eigenv_3\"], InfiniteCylinder(5))\n \n self.assertEqual(\"laserchicken.feature_extractor.eigenvals_feature_extractor\",\n- target_point_cloud[keys.provenance][0][\"module\"])\n+ target_point_cloud[keys.provenance][1][\"module\"])\n \n @staticmethod\n def test_eigenvalues_of_too_few_points_results_in_0():\n", "old_path": "laserchicken/feature_extractor/test_eigenvals_feature_extractor.py", "rewrite": "ReplaceText(target='1' @(32,61)->(32,62))"} -{"repo": "https://:@github.com/eEcoLiDAR/eEcoLiDAR.git", "hash": "eb7b021147a60b57e5dec536bd6f118c213f0952", "diff": "@@ -29,7 +29,7 @@ class TestExtractEigenValues(unittest.TestCase):\n [\"eigenv_1\", \"eigenv_2\", \"eigenv_3\"], InfiniteCylinder(5))\n \n self.assertEqual(\"laserchicken.feature_extractor.eigenvals_feature_extractor\",\n- target_point_cloud[keys.provenance][1][\"module\"])\n+ target_point_cloud[keys.provenance][-1][\"module\"])\n \n @staticmethod\n def test_eigenvalues_of_too_few_points_results_in_0():\n", "old_path": "laserchicken/feature_extractor/test_eigenvals_feature_extractor.py", "rewrite": "ReplaceText(target='-1' @(32,61)->(32,62))"} -{"repo": "https://:@github.com/VinF/deer.git", "hash": "66ea41db02c3361f18874dea7fd97720b1b06590", "diff": "@@ -441,7 +441,7 @@ class CircularBuffer(object):\n \r\n if end == sys.maxsize:\r\n return self._data[self._lb+start:self._ub]\r\n- elif self._lb + end >= self._ub:\r\n+ elif self._lb + end > self._ub:\r\n raise IndexError()\r\n else:\r\n return self._data[self._lb+start:self._lb+end]\r\n", "old_path": "General_Deep_Q_RL/agent.py", "rewrite": "ReplaceText(target='>' @(444,28)->(444,30))"} -{"repo": "https://:@github.com/VinF/deer.git", "hash": "fd939e272d5441d48fd7d30bf24312c0f6bc8aaa", "diff": "@@ -176,7 +176,7 @@ class MyEnv(Environment):\n # Lack of energy\n if (self._lastPonctualObservation[0]*self.battery_size>Energy_needed_from_battery):\n # If enough energy in the battery, use it\n- self._lastPonctualObservation[0]=self._lastPonctualObservation[0]-Energy_needed_from_battery/self.battery_size*self.battery_eta\n+ self._lastPonctualObservation[0]=self._lastPonctualObservation[0]-Energy_needed_from_battery/self.battery_size/self.battery_eta\n else:\n # Otherwise: use what is left and then penalty \n reward-=(Energy_needed_from_battery-self._lastPonctualObservation[0]*self.battery_size)*2 #2euro/kWh\n", "old_path": "General_Deep_Q_RL/environments/MG_two_storages_env.py", "rewrite": "ReplaceText(target='/' @(179,126)->(179,127))"} -{"repo": "https://:@github.com/piccolbo/altair_recipes.git", "hash": "4992dd864a317eaad641d0408f003c429ed24af6", "diff": "@@ -6,7 +6,7 @@ from vega_datasets import data\n \n @viz_reg_test\n def test_boxplot_melted():\n- return ar.boxplot(data.iris(), \"species\", \"petalLength\")\n+ return ar.boxplot(data.iris(), \"petalLength\", \"species\")\n \n \n @viz_reg_test\n", "old_path": "tests/test_boxplot.py", "rewrite": "ArgSwap(idxs=1<->2 @(9,11)->(9,21))"} -{"repo": "https://:@github.com/tailhook/zorro.git", "hash": "dcbc37d47fe2a8de029f5a2f3ae13adf52e7aace", "diff": "@@ -121,7 +121,7 @@ class RequestChannel(channel.PipelinedReqChannel):\n clen = int(headers.get('Content-Length', '0'))\n if clen < 0:\n raise EOFError(\"Wrong content length\")\n- while pos[0] + clen < len(buf):\n+ while pos[0] + clen > len(buf):\n readmore()\n return status, headers, buf[pos[0]:pos[0]+clen]\n \n", "old_path": "zorro/http.py", "rewrite": "ReplaceText(target='>' @(124,32)->(124,33))"} -{"repo": "https://:@gitlab.com/eavise/brambox.git", "hash": "f1faeed0b52d6f1c9c9ba6da818c1656f841622c", "diff": "@@ -73,7 +73,7 @@ def test_multiclass(parser, df_anno_simple):\n parser = parser()\n \n with pytest.raises(ValueError) as errinfo:\n- bb.io.save(parser, df_anno_simple, 'path.txt')\n+ bb.io.save(df_anno_simple, parser, 'path.txt')\n assert 'single-class problems' in str(errinfo.value)\n \n \n", "old_path": "test/io/parser/test_anno_cvc.py", "rewrite": "ArgSwap(idxs=0<->1 @(76,8)->(76,18))"} -{"repo": "https://:@github.com/uber/h3-py.git", "hash": "359924df907144c85ec323ae2804e2c0d173dfc5", "diff": "@@ -631,7 +631,7 @@ def hex_ranges(h3_address_list, ring_size):\n (1 + math.sqrt(1 + 8 * math.ceil(j / 6.0))) / 2)) - 1\n # hexRanges doesn't return distance array\n hex_range_list[ring_index].add(\n- h3_to_string(krings[i * num_hexagons + j]))\n+ h3_to_string(krings[i * array_len + j]))\n return out\n \n \n", "old_path": "h3/h3.py", "rewrite": "ReplaceText(target='array_len' @(634,40)->(634,52))"} -{"repo": "https://:@github.com/polysquare/polysquare-generic-file-linter.git", "hash": "e9dbb28ea30955ab59d1339c04f0710b24ba53aa", "diff": "@@ -388,7 +388,7 @@ def _maybe_log_technical_terms(global_options, tool_options):\n terms = set(terms_file.read().splitlines()) # suppress(PYC70)\n terms_file.seek(0) # suppress(PYC70)\n terms_file.truncate(0) # suppress(PYC70)\n- tech_terms = freduce(lambda x, y: x + y,\n+ tech_terms = freduce(lambda x, y: x | y,\n _drain(log_technical_terms_to_queue))\n terms_file.write(\"\\n\".join(list(terms | # suppress(PYC70)\n set(tech_terms))))\n", "old_path": "polysquarelinter/linter.py", "rewrite": "ReplaceText(target='|' @(391,48)->(391,49))"} -{"repo": "https://:@github.com/johntruckenbrodt/spatialist.git", "hash": "c9d552e64cd47b30156b288e035d17debea48b45", "diff": "@@ -300,7 +300,7 @@ def centerdist(obj1, obj2):\n \n \n def intersect(obj1, obj2):\n- if not (isinstance(obj1, Vector) or isinstance(obj2, Vector)):\n+ if not (isinstance(obj1, Vector) and isinstance(obj2, Vector)):\n raise IOError('object must be of type Vector')\n obj1.reproject(obj2.srs)\n \n", "old_path": "pyroSAR/spatial/vector.py", "rewrite": "ReplaceText(target='and' @(303,37)->(303,39))"} -{"repo": "https://:@github.com/Toblerity/Shapely.git", "hash": "9f1b78e6fd5f4286f210b54827bdd26661f0ee7a", "diff": "@@ -40,7 +40,7 @@ if __name__ == '__main__':\n ]\n \n if pattern:\n- tests = [f for f in docfiles if f.find(pattern) >= 0]\n+ tests = [f for f in docfiles if f.find(pattern) == 0]\n else:\n tests = docfiles\n \n", "old_path": "tests/runalldoctests.py", "rewrite": "ReplaceText(target='==' @(43,56)->(43,58))"} -{"repo": "https://:@github.com/Toblerity/Shapely.git", "hash": "d6fc8cc0e0d50b23ba0d7ca6195bc530b2f8d1b9", "diff": "@@ -11,7 +11,7 @@ def halton(base):\n i = index\n while i > 0:\n result += f * (i % base)\n- i = i/base\n+ i = i//base\n f = f/base\n return result\n i = 1\n", "old_path": "shapely/tests/test_unary_union.py", "rewrite": "ReplaceText(target='//' @(14,17)->(14,18))"} -{"repo": "https://:@github.com/Toblerity/Shapely.git", "hash": "5f0db7fdc052beeeef36aa1251f19175d0abeedb", "diff": "@@ -36,7 +36,7 @@ if version is None:\n \n # Handle UTF-8 encoding of certain text files.\n open_kwds = {}\n-if sys.version_info > (3,):\n+if sys.version_info >= (3,):\n open_kwds['encoding'] = 'utf-8'\n \n with open('VERSION.txt', 'w', **open_kwds) as fp:\n", "old_path": "setup.py", "rewrite": "ReplaceText(target='>=' @(39,20)->(39,21))"} -{"repo": "https://:@github.com/svetlyak40wt/django-tagging-ng.git", "hash": "0293b78ee0274d123eb70c1f8c5c01a5b36e2b40", "diff": "@@ -163,7 +163,7 @@ class TaggedItemManager(models.Manager):\n associated with a given Tag or list of Tags.\r\n \"\"\"\r\n tags = get_tag_list(tags)\r\n- if len(tags) == 0:\r\n+ if len(tags) == 1:\r\n tag = tags[0] # Optimisation for single tag\r\n else:\r\n return self.get_intersection_by_model(Model, tags)\r\n", "old_path": "models.py", "rewrite": "ReplaceText(target='1' @(166,24)->(166,25))"} -{"repo": "https://:@github.com/svetlyak40wt/django-tagging-ng.git", "hash": "3285d40e4c1de628886a7fa45a6d4cf6ed4cd7e7", "diff": "@@ -163,7 +163,7 @@ class TaggedItemManager(models.Manager):\n associated with a given Tag or list of Tags.\r\n \"\"\"\r\n tags = get_tag_list(tags)\r\n- if len(tags) == 0:\r\n+ if len(tags) == 1:\r\n tag = tags[0] # Optimisation for single tag\r\n else:\r\n return self.get_intersection_by_model(Model, tags)\r\n", "old_path": "models.py", "rewrite": "ReplaceText(target='1' @(166,24)->(166,25))"} -{"repo": "https://:@github.com/zzzsochi/yadm.git", "hash": "03efd06fe95c7d84264455c4fac5c8cbb17eb4dd", "diff": "@@ -316,7 +316,7 @@ class QuerySet(BaseQuerySet):\n \n if data is None:\n if exc is not None:\n- raise exc(criteria)\n+ raise exc(qs)\n else:\n return None\n \n", "old_path": "yadm/queryset.py", "rewrite": "ReplaceText(target='qs' @(319,26)->(319,34))"} -{"repo": "https://:@github.com/instacart/lore.git", "hash": "1c1e0efdac6b27dc111eaa93bb99317c59aaffaf", "diff": "@@ -196,7 +196,7 @@ class Base(object):\n def upload(self):\n self.fitting = 0\n self.save()\n- lore.io.upload(self.remote_model_path(), self.model_path())\n+ lore.io.upload(self.model_path(), self.remote_model_path())\n \n @classmethod\n def download(cls, fitting=0):\n", "old_path": "lore/models/base.py", "rewrite": "ArgSwap(idxs=0<->1 @(199,8)->(199,22))"} -{"repo": "https://:@github.com/instacart/lore.git", "hash": "1c1e0efdac6b27dc111eaa93bb99317c59aaffaf", "diff": "@@ -78,7 +78,7 @@ class Base(lore.models.base.Base):\n \n def upload(self):\n super(Base, self).upload()\n- lore.io.upload(self.remote_weights_path(), self.weights_path())\n+ lore.io.upload(self.weights_path(), self.remote_weights_path())\n \n @classmethod\n def download(cls, fitting=0):\n", "old_path": "lore/models/keras.py", "rewrite": "ArgSwap(idxs=0<->1 @(81,8)->(81,22))"} -{"repo": "https://:@github.com/instacart/lore.git", "hash": "f4ded2b3199d1c33ba6c9c79cd66b25d43c83c81", "diff": "@@ -464,7 +464,7 @@ class Base(BaseEstimator):\n result = self.keras.predict(dataframe, batch_size=self.batch_size)\n \n if self.towers > 1:\n- result = numpy.mean(result, axis=0).squeeze(axis=0)\n+ result = numpy.mean(result, axis=0).squeeze(axis=1)\n \n return result\n \n", "old_path": "lore/estimators/keras.py", "rewrite": "ReplaceText(target='1' @(467,61)->(467,62))"} -{"repo": "https://:@github.com/baliga-lab/cmonkey2.git", "hash": "3201a0e97688724450196da8fef96d283c855b3f", "diff": "@@ -273,7 +273,7 @@ class ClusterMembership:\n #logging.warn(\"cluster %s already associated with %s\",\n # str(cluster), str(column))\n pass\n- if columns not in columns:\n+ if column not in columns:\n columns.append(column)\n \n def remove_cluster_from_column(self, column, cluster):\n", "old_path": "cmonkey/membership.py", "rewrite": "ReplaceText(target='column' @(276,11)->(276,18))"} -{"repo": "https://:@github.com/baliga-lab/cmonkey2.git", "hash": "48d14ac785b1013354a55a37239c66433fbf19eb", "diff": "@@ -460,7 +460,7 @@ class ClusterMembership:\n max_score = sys.float_info.min\n for row in range(sm.num_rows()):\n if sm_values[row][0] > max_score:\n- max_score = sm[row][0]\n+ max_score = sm_values[row][0]\n max_row = row\n return sm.row_names[max_row]\n \n", "old_path": "cmonkey/membership.py", "rewrite": "ReplaceText(target='sm_values' @(463,32)->(463,34))"} -{"repo": "https://:@github.com/baliga-lab/cmonkey2.git", "hash": "311548905a9def1cbdf63d2e0fd8a17346564742", "diff": "@@ -17,7 +17,7 @@ class MicrobesOnlineTest(unittest.TestCase): # pylint: disable-msg=R0904\n \"\"\"test fixture\"\"\"\n if not os.path.exists('testcache'):\n os.mkdir('testcache')\n- self.service = mo.MicrobesOnline(mo.MICROBES_ONLINE_BASE_URL, 'testcache')\n+ self.service = mo.MicrobesOnline('testcache', mo.MICROBES_ONLINE_BASE_URL)\n \n def tearDown(self): # pylint: disable-msg=C0103\n \"\"\"test cleanup\"\"\"\n", "old_path": "test/microbes_online_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(20,23)->(20,40))"} -{"repo": "https://:@github.com/muammar/ml4chem.git", "hash": "dbb7de0379cb8881538d211899e4bec8794f16e3", "diff": "@@ -344,7 +344,7 @@ def train(inputs, targets, model=None, data=None, optimizer=None, lr=None,\n logger.info('Training finished in {} hours {} minutes {:.2f} seconds.'\n .format(h, m, s))\n logger.info('outputs')\n- logger.info(outputs)\n+ logger.info(outputs_)\n logger.info('targets')\n logger.info(targets)\n \n", "old_path": "mlchem/models/neuralnetwork.py", "rewrite": "ReplaceText(target='outputs_' @(347,16)->(347,23))"} -{"repo": "https://:@github.com/chris7/pyquant.git", "hash": "3730fbdb9789a59a65d38f5a2ae21c645086096f", "diff": "@@ -624,7 +624,7 @@ def findAllPeaks(xdata, ydata_original, min_dist=0, method=None, local_filter_si\n best_fit = np.array(best_fit)\n peak_func = bigauss_ndim if bigauss_fit else gauss_ndim\n # Get rid of peaks with low r^2\n- if micro and r2_cutoff is not None:\n+ if not micro and r2_cutoff is not None:\n final_fit = np.array([])\n for peak_index in xrange(0, len(best_fit), step_size):\n \n", "old_path": "pyquant/peaks.py", "rewrite": "ReplaceText(target='not ' @(627,7)->(627,7))"} -{"repo": "https://:@github.com/chris7/pyquant.git", "hash": "4a0755563e0a36fecf1f4393554cfaf4c1615c2c", "diff": "@@ -615,7 +615,7 @@ def find_peaks_derivative(xdata, ydata, ydata_peaks=None, min_slope=None, rel_pe\n # By default, cross points returns the left side\n for i in xrange(len(cross_points)):\n index = cross_points[i]\n- if index < len(cross_points):\n+ if index < len(ydata):\n if ydata[index] < ydata[index+1]:\n cross_points[i] = index+1\n \n", "old_path": "pyquant/utils.py", "rewrite": "ReplaceText(target='ydata' @(618,23)->(618,35))"} -{"repo": "https://:@github.com/chris7/pyquant.git", "hash": "cd61286935d8ca64eb539851e39a98a0655ff400", "diff": "@@ -611,7 +611,7 @@ def find_peaks_derivative(xdata, ydata, ydata_peaks=None, min_slope=None, rel_pe\n ydata = np.abs(ydata_peaks)\n \n if min_peak_width is None:\n- max_peak_width = int(len(ydata) / 2)\n+ min_peak_width = int(len(ydata) / 2)\n if min_peak_width > 5:\n min_peak_width = 5\n \n", "old_path": "pyquant/utils.py", "rewrite": "ReplaceText(target='min_peak_width' @(614,8)->(614,22))"} -{"repo": "https://:@github.com/ssec/sift.git", "hash": "24ce052cd497c42c917de06f0c89a7c5be13ab50", "diff": "@@ -599,7 +599,7 @@ class ProbeGraphDisplay (object) :\n x_point = self.workspace.get_content_point(x_uuid, point_xy)\n format_str, unit_str, x_point = self.document.convert_units(x_uuid, x_point)\n y_point = self.workspace.get_content_point(y_uuid, point_xy)\n- format_str, unit_str, y_point = self.document.convert_units(x_uuid, y_point)\n+ format_str, unit_str, y_point = self.document.convert_units(y_uuid, y_point)\n else:\n x_point = None\n y_point = None\n", "old_path": "py/cspov/view/ProbeGraphs.py", "rewrite": "ReplaceText(target='y_uuid' @(602,76)->(602,82))"} -{"repo": "https://:@github.com/threatwatch/twigs.git", "hash": "7ee5d95178a459a8c2e8ff7855e3156e620c395c", "diff": "@@ -85,7 +85,7 @@ def parse_inventory(email,data,params):\n asset_map = {}\n asset_map['owner'] = email\n asset_map['host'] = host\n- asset_map['id'] = host\n+ asset_map['id'] = vmuuid\n asset_map['name'] = host\n asset_map['tags'] = [ ]\n asset_map['patch_tracker'] = { } # To help remove duplicate patches\n", "old_path": "twigs/azure.py", "rewrite": "ReplaceText(target='vmuuid' @(88,30)->(88,34))"} -{"repo": "https://:@github.com/Keeper-Security/Commander.git", "hash": "9bd55c8dd48ab62759bbbb8dfcd38ab364cec2dc", "diff": "@@ -1550,7 +1550,7 @@ def prepare_record(params, record):\n else:\n if params.debug: print('Generated record key')\n unencrypted_key = os.urandom(32)\n- record_object['record_key'] = encrypt_aes(params.data_key, unencrypted_key)\n+ record_object['record_key'] = encrypt_aes(unencrypted_key, params.data_key)\n record_object['revision'] = 0\n \n data['title'] = record.title\n", "old_path": "keepercommander/api.py", "rewrite": "ArgSwap(idxs=0<->1 @(1553,38)->(1553,49))"} -{"repo": "https://:@github.com/hpapaxen/rope.git", "hash": "27d5085b30e89095e88339c96d9940e338482106", "diff": "@@ -69,7 +69,7 @@ class JobSet(object):\n \n def get_percent_done(self):\n if self.count is not None and self.count > 0:\n- percent = self.done * 100 / self.count\n+ percent = self.done * 100 // self.count\n return min(percent, 100)\n \n def get_name(self):\n", "old_path": "rope/base/taskhandle.py", "rewrite": "ReplaceText(target='//' @(72,38)->(72,39))"} -{"repo": "https://:@github.com/hpapaxen/rope.git", "hash": "27d5085b30e89095e88339c96d9940e338482106", "diff": "@@ -524,7 +524,7 @@ class ProgressBar(object):\n self.text['text'] = text\n \n def _draw_shape(self):\n- width = int(self.canvas['width']) * self.percent / 100\n+ width = int(self.canvas['width']) * self.percent // 100\n self.canvas.create_rectangle(0, 0, width, self.canvas['height'],\n fill=self.color)\n total_width = self.canvas['width']\n", "old_path": "rope/ui/uihelpers.py", "rewrite": "ReplaceText(target='//' @(527,57)->(527,58))"} -{"repo": "https://:@github.com/hpapaxen/rope.git", "hash": "2720419618aceab7fba51aaa4d66f7eae005b22d", "diff": "@@ -129,7 +129,7 @@ class SimilarFinderTest(unittest.TestCase):\n source = 'x.a = 1\\n'\n finder = similarfinder.SimilarFinder(source)\n result = list(finder.get_matches('${a} = 1'))\n- self.assertEquals(1, len(result))\n+ self.assertEquals(0, len(result))\n \n def test_functions_not_matching_when_only_first_parameters(self):\n source = 'f(1, 2)\\n'\n", "old_path": "ropetest/refactor/similarfindertest.py", "rewrite": "ReplaceText(target='0' @(132,26)->(132,27))"} -{"repo": "https://:@github.com/hpapaxen/rope.git", "hash": "0eb3cb58493cdaea83a4e24d47b5bd4dbd19f963", "diff": "@@ -32,7 +32,7 @@ class BuiltinModule(pyobjects.AbstractModule):\n result.update(self.initial)\n for modname in self.submodules:\n name = modname.split('.')[-1]\n- result[name] = BuiltinModule(name, self.submodules)\n+ result[name] = BuiltinModule(modname, self.submodules)\n return result\n \n @property\n", "old_path": "rope/base/builtins.py", "rewrite": "ReplaceText(target='modname' @(35,41)->(35,45))"} -{"repo": "https://:@github.com/hpapaxen/rope.git", "hash": "528744bb4bc1b8076680f7c2c1bfac508ddca4f9", "diff": "@@ -37,7 +37,7 @@ def relative(root, path):\n if os.path.samefile(root, path):\n return '/'.join(reversed(rel))\n parent = os.path.dirname(path)\n- if not path or parent == path:\n+ if not parent or parent == path:\n break\n rel.append(os.path.basename(path))\n path = parent\n", "old_path": "rope/base/libutils.py", "rewrite": "ReplaceText(target='parent' @(40,15)->(40,19))"} -{"repo": "https://:@github.com/benjamincrom/baseball.git", "hash": "6ef29729ad07458aebe709b4e42f56ecd3761ec4", "diff": "@@ -111,7 +111,7 @@ def write_game_svg_and_html(game_id, game, output_path):\n html_filename = game_id + '.html'\n \n svg_text = game.get_svg_str()\n- html_text = HTML_WRAPPER.format(title=game_id, filename=html_filename)\n+ html_text = HTML_WRAPPER.format(title=game_id, filename=svg_filename)\n \n output_svg_path = join(output_path, svg_filename)\n output_html_path = join(output_path, html_filename)\n", "old_path": "fetch_game.py", "rewrite": "ReplaceText(target='svg_filename' @(114,60)->(114,73))"} -{"repo": "https://:@github.com/sporestack/bitcash.git", "hash": "dbc65e1b47426e0e4d286db5b27216ec36cb32cf", "diff": "@@ -16,7 +16,7 @@ def test_set_fee_cache_time():\n \n \n def test_get_fee():\n- assert get_fee(fast=True) != get_fee(fast=False)\n+ assert get_fee(fast=True) >= get_fee(fast=False)\n \n \n class TestFeeCache:\n", "old_path": "tests/network/test_fees.py", "rewrite": "ReplaceText(target='>=' @(19,30)->(19,32))"} -{"repo": "https://:@github.com/galaxy-genome-annotation/python-apollo.git", "hash": "53e514b619844fa1f87179d738b9d29830027300", "diff": "@@ -29,7 +29,7 @@ class ApolloTestCase(unittest.TestCase):\n \"\"\"\n \n org_info = wa.organisms.show_organism(org_id)\n- if 'directory' in org_info:\n+ if 'directory' not in org_info:\n time.sleep(1)\n org_info = wa.organisms.show_organism(org_id)\n \n", "old_path": "test/__init__.py", "rewrite": "ReplaceText(target=' not in ' @(32,22)->(32,26))"} -{"repo": "https://:@github.com/jakubplichta/grafana-dashboard-builder.git", "hash": "3228e6950d65b9bd347cacb56a9e85ec410b14ce", "diff": "@@ -35,7 +35,7 @@ class Context(object):\n formatter = string.Formatter()\n (result, to_expand) = (formatter.vformat(to_expand, (), self._context), to_expand)\n while result != to_expand:\n- (result, to_expand) = (formatter.vformat(to_expand, (), self._context), result)\n+ (result, to_expand) = (formatter.vformat(result, (), self._context), result)\n return result\n elif isinstance(to_expand, list):\n return [self.expand_placeholders(value) for value in to_expand]\n", "old_path": "grafana_dashboards/context.py", "rewrite": "ReplaceText(target='result' @(38,57)->(38,66))"} -{"repo": "https://:@github.com/Phylliade/ikpy.git", "hash": "815dbff3a521532a7b792c309902ffea82abac85", "diff": "@@ -13,7 +13,7 @@ class TestFK(unittest.TestCase):\n one_move[5] = np.pi / 4\n one_move[6] = -np.pi / 2\n one_move[4] = -np.pi / 2\n- self.test_pos = one_move\n+ self.test_pos = all_zeros\n \n def test_fk_creature(self):\n \n", "old_path": "tests/test_fk.py", "rewrite": "ReplaceText(target='all_zeros' @(16,24)->(16,32))"} -{"repo": "https://:@github.com/tingbot/tingbot-python.git", "hash": "5374186675f6809faf9ce953fc35c81217348753", "diff": "@@ -72,7 +72,7 @@ class RunLoop(object):\n while self.running:\n if len(self.timers) > 0:\n try:\n- self._wait(self.timers[0].next_fire_time)\n+ self._wait(self.timers[-1].next_fire_time)\n except Exception as e:\n self._error(e)\n continue\n", "old_path": "tingbot/run_loop.py", "rewrite": "ReplaceText(target='-1' @(75,43)->(75,44))"} -{"repo": "https://:@github.com/nyoka-pmml/nyoka.git", "hash": "8d5c0d31d0bf1e251abe686f06b614a16e5ffcfb", "diff": "@@ -74,7 +74,7 @@ class TestMethods(unittest.TestCase):\n self.assertEqual(pmml_obj.NearestNeighborModel[0].ComparisonMeasure.kind, \"distance\")\n \n ##3\n- self.assertEqual(pmml_obj.steps[-1][-1].n_neighbors, pmml_obj.NearestNeighborModel[0].numberOfNeighbors)\n+ self.assertEqual(pipeline_obj.steps[-1][-1].n_neighbors, pmml_obj.NearestNeighborModel[0].numberOfNeighbors)\n \n \n def test_sklearn_03(self):\n", "old_path": "nyoka/tests/skl_to_pmml_UnitTest.py", "rewrite": "ReplaceText(target='pipeline_obj' @(77,25)->(77,33))"} -{"repo": "https://:@github.com/iris-edu/pyweed.git", "hash": "77d919acd8d54d4879d1a34598e9e04f16fdf708", "diff": "@@ -97,7 +97,7 @@ class WaveformEntry(AttribDict):\n \n self.error = None\n \n- self.start_time = self.distances.arrival + self.config.offsets[0]\n+ self.start_time = self.distances.arrival - self.config.offsets[0]\n self.end_time = self.distances.arrival + self.config.offsets[1]\n \n self.start_string = UTCDateTime(self.start_time).format_iris_web_service().replace(':', '_')\n", "old_path": "pyweed/waveforms_handler.py", "rewrite": "ReplaceText(target='-' @(100,49)->(100,50))"} -{"repo": "https://:@github.com/anaxilaus/coindata.git", "hash": "2e5067311c4eed50eed41c45f43ad63e8973e579", "diff": "@@ -52,6 +52,6 @@ def dump_json(data, filepath):\n \n try:\n with open(filepath, 'w') as file:\n- json.dump(data, filepath)\n+ json.dump(data, file)\n except TypeError as e:\n print(\"Data isn't JSON compatible.\\n\", e)\n", "old_path": "coindata/utils.py", "rewrite": "ReplaceText(target='file' @(55,28)->(55,36))"} -{"repo": "https://:@github.com/Pixelapse/pyglass.git", "hash": "a31e95cbc259ce61f5851d6f0d769792aaa182fe", "diff": "@@ -20,7 +20,7 @@ def preview(src_path):\n preview_path = thumbnail_preview(src_path)\n \n if preview_path:\n- mimetype = magic.from_file(src_path, mime=True).lower()\n+ mimetype = magic.from_file(preview_path, mime=True).lower()\n if mimetype in [ExportMimeType.PNG, ExportMimeType.PDF]:\n return preview_path\n \n", "old_path": "pyglass/quicklook/api.py", "rewrite": "ReplaceText(target='preview_path' @(23,31)->(23,39))"} -{"repo": "https://:@github.com/erezsh/plyplus.git", "hash": "8cc69bebfcb2cb0480ac66d07fe1f4b8637bba11", "diff": "@@ -784,7 +784,7 @@ class _Grammar(object):\n subtree.extend(child.tail)\n else:\n subtree.append(child)\n- p[0] = self.tree_class(rule_name, subtree, skip_adjustments=True) if len(subtree) > 1 else subtree[0]\n+ p[0] = self.tree_class(rule_name, subtree, skip_adjustments=True) if len(subtree) != 1 else subtree[0]\n else:\n def p_rule(self, p):\n p[0] = self.tree_class(rule_name, p[1:], skip_adjustments=True)\n", "old_path": "plyplus/plyplus.py", "rewrite": "ReplaceText(target='!=' @(787,98)->(787,99))"} -{"repo": "https://:@github.com/olls/graphics.git", "hash": "877ef2670d4ad34c4fcf951dab0922419f081531", "diff": "@@ -22,7 +22,7 @@ def colorStr(text, color=WHITE):\n \t\treturn seq\n \t\tsys.stdout.write(seq + '\\n')\n \telse:\n-\t\treturn seq\n+\t\treturn text\n \t\tsys.stdout.write(text + '\\n')\n \n if __name__ == '__main__':\n", "old_path": "colors.py", "rewrite": "ReplaceText(target='text' @(25,9)->(25,12))"} -{"repo": "https://:@github.com/hkwi/twink.git", "hash": "5ef359deb609fc55659596a8cb327abb9c7e4653", "diff": "@@ -319,7 +319,7 @@ def ofp_action_set_field(message, offset):\n \tcursor = _cursor(offset)\r\n \toffset = cursor.offset\r\n \t\r\n-\t(type,len) = ofp_action_header(message, offset)\r\n+\t(type,len) = ofp_action_header(message, cursor)\r\n \tfield = message[cursor.offset:offset+len]\r\n \tcursor.offset = offset+len\r\n \treturn namedtuple(\"ofp_action_set_field\",\r\n", "old_path": "twink/ofp4/parse.py", "rewrite": "ReplaceText(target='cursor' @(322,41)->(322,47))"} -{"repo": "https://:@github.com/hkwi/twink.git", "hash": "fc6f5ad63cb12f9caf5455e3179ecfd9cd9de060", "diff": "@@ -27,7 +27,7 @@ def _unpack(fmt, message, offset):\n \treturn struct.unpack_from(fmt, message, offset)\r\n \r\n def _align(length):\r\n-\treturn (length+7)/8*8\r\n+\treturn (length+7)//8*8\r\n \r\n # 7.1\r\n def ofp_header(version, type, length, xid):\r\n", "old_path": "twink/ofp4/build.py", "rewrite": "ReplaceText(target='//' @(30,18)->(30,19))"} -{"repo": "https://:@github.com/biolab/orange3-datafusion.git", "hash": "54f941a66a9b369a73190dfe2007e5b6dae1803a", "diff": "@@ -33,7 +33,7 @@ def _find_completion(fuser, relation):\n for fuser_relation in fuser.fusion_graph.get_relations(relation.row_type,\n relation.col_type):\n if fuser_relation._id == relation._id:\n- return fuser.complete(fuser_relation)\n+ return fuser.complete(relation)\n return None\n \n \n", "old_path": "orangecontrib/datafusion/widgets/owcompletionscoring.py", "rewrite": "ReplaceText(target='relation' @(36,34)->(36,48))"} -{"repo": "https://:@github.com/aiqm/torchani.git", "hash": "5bb6691515e5e56fbe4994b140dd40b73043a33f", "diff": "@@ -151,7 +151,7 @@ class PrepareInput(torch.nn.Module):\n new_tensors = []\n for t in tensors:\n new_tensors.append(t.index_select(1, reverse))\n- return (species, *tensors)\n+ return (species, *new_tensors)\n \n def forward(self, species_coordinates):\n species, coordinates = species_coordinates\n", "old_path": "torchani/aev.py", "rewrite": "ReplaceText(target='new_tensors' @(154,26)->(154,33))"} -{"repo": "https://:@github.com/aiqm/torchani.git", "hash": "abc8f7f842ae4b273c6e867b392413dcadd9c921", "diff": "@@ -593,7 +593,7 @@ def collate_fn(data, chunk_threshold, properties_info):\n if properties_info['padding_values'][i] is None:\n prop = torch.stack(prop)\n else:\n- prop = torch.nn.utils.rnn.pad_sequence(batch_species,\n+ prop = torch.nn.utils.rnn.pad_sequence(prop,\n batch_first=True,\n padding_value=properties_info['padding_values'][i])\n # sort with number of atoms\n", "old_path": "torchani/data/new.py", "rewrite": "ReplaceText(target='prop' @(596,51)->(596,64))"} -{"repo": "https://:@github.com/aiqm/torchani.git", "hash": "c18f4a5ea1f9732cc07c8816caa401981e43dc48", "diff": "@@ -274,7 +274,7 @@ def compute_aev(species: Tensor, coordinates: Tensor, cell: Tensor,\n num_atoms = species.shape[1]\n num_species_pairs = angular_length // angular_sublength\n # PBC calculation is bypassed if there are no shifts\n- if shifts.numel() == 1:\n+ if shifts.numel() == 0:\n atom_index1, atom_index2, shifts = neighbor_pairs_nopbc(species == -1, coordinates, cell, shifts, Rcr)\n else:\n atom_index1, atom_index2, shifts = neighbor_pairs(species == -1, coordinates, cell, shifts, Rcr)\n", "old_path": "torchani/aev.py", "rewrite": "ReplaceText(target='0' @(277,25)->(277,26))"} -{"repo": "https://:@github.com/cs207group4/cs207-FinalProject.git", "hash": "e7f1cc613ace275a8d259de7455ee39ca063e029", "diff": "@@ -120,7 +120,7 @@ class ChemSolver:\n r.set_initial_value(y0, 0)\n self._t = [0]\n self._y = [y0]\n- while r.successful() and r.t <= t1:\n+ while r.successful() and r.t < t1:\n self._t.append(r.t + dt)\n self._y.append(r.integrate(r.t + dt))\n self._t = np.array(self._t)\n", "old_path": "pychemkin/ChemSolver.py", "rewrite": "ReplaceText(target='<' @(123,37)->(123,39))"} -{"repo": "https://:@github.com/MrLeeh/pyads.git", "hash": "d14fd2a7bb2d4b784a4f6a47b6981ba2a86b699c", "diff": "@@ -97,7 +97,7 @@ def set_local_address(ams_netid):\n else:\r\n ams_netid_st = ams_netid\r\n \r\n- assert isinstance(ams_netid, SAmsNetId)\r\n+ assert isinstance(ams_netid_st, SAmsNetId)\r\n \r\n if linux:\r\n return adsSetLocalAddress(ams_netid_st)\r\n", "old_path": "pyads/ads.py", "rewrite": "ReplaceText(target='ams_netid_st' @(100,22)->(100,31))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "0a836276129ef71fa6c44975dd02ab70bccc496d", "diff": "@@ -58,7 +58,7 @@ class FConvEncoder(FairseqEncoder):\n self.projections = nn.ModuleList()\n self.convolutions = nn.ModuleList()\n for (out_channels, kernel_size) in convolutions:\n- pad = (kernel_size - 1) // 2\n+ pad = (kernel_size - 1) / 2\n self.projections.append(Linear(in_channels, out_channels)\n if in_channels != out_channels else None)\n self.convolutions.append(\n", "old_path": "fairseq/models/fconv.py", "rewrite": "ReplaceText(target='/' @(61,36)->(61,38))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "f68a44359b6596997b931d2e662a899ffba9d407", "diff": "@@ -62,7 +62,7 @@ class SinusoidalPositionalEmbedding(nn.Module):\n # recompute/expand embeddings if needed\n bsz, seq_len = input.size()\n max_pos = self.padding_idx + 1 + seq_len\n- if seq_len > self.weights.size(0):\n+ if max_pos > self.weights.size(0):\n self.weights = SinusoidalPositionalEmbedding.get_embedding(\n max_pos,\n self.embedding_dim,\n", "old_path": "fairseq/modules/sinusoidal_positional_embedding.py", "rewrite": "ReplaceText(target='max_pos' @(65,11)->(65,18))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "762956a559e65e1e48df8f8b4df515d23b66fddb", "diff": "@@ -82,7 +82,7 @@ def main(args):\n train_meter.start()\n valid_losses = [None]\n valid_subsets = args.valid_subset.split(',')\n- while lr > args.min_lr and epoch_itr.epoch <= max_epoch and trainer.get_num_updates() < max_update:\n+ while lr > args.min_lr and epoch_itr.epoch < max_epoch and trainer.get_num_updates() < max_update:\n # train for one epoch\n train(args, trainer, task, epoch_itr)\n \n", "old_path": "train.py", "rewrite": "ReplaceText(target='<' @(85,47)->(85,49))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "e9967cd334783f5da50deadc17cf8a4fc3380171", "diff": "@@ -82,7 +82,7 @@ def main(args):\n train_meter.start()\n valid_losses = [None]\n valid_subsets = args.valid_subset.split(',')\n- while lr > args.min_lr and epoch_itr.epoch <= max_epoch and trainer.get_num_updates() < max_update:\n+ while lr > args.min_lr and epoch_itr.epoch < max_epoch and trainer.get_num_updates() < max_update:\n # train for one epoch\n train(args, trainer, task, epoch_itr)\n \n", "old_path": "train.py", "rewrite": "ReplaceText(target='<' @(85,47)->(85,49))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "7bcb487aad8504043d13c9b869d555aa565a46c7", "diff": "@@ -49,7 +49,7 @@ class LabelSmoothedCrossEntropyCriterion(FairseqCriterion):\n sample_size = sample['target'].size(0) if self.args.sentence_avg else sample['ntokens']\n logging_output = {\n 'loss': utils.item(loss.data) if reduce else loss.data,\n- 'nll_loss': utils.item(nll_loss.data) if reduce else loss.data,\n+ 'nll_loss': utils.item(nll_loss.data) if reduce else nll_loss.data,\n 'ntokens': sample['ntokens'],\n 'sample_size': sample_size,\n }\n", "old_path": "fairseq/criterions/label_smoothed_cross_entropy.py", "rewrite": "ReplaceText(target='nll_loss' @(52,65)->(52,69))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "74efc21403477d103bd426ae64c37b7a30d8f4bf", "diff": "@@ -154,7 +154,7 @@ class TestIncrementalDecoder(FairseqIncrementalDecoder):\n probs[:, i, self.dictionary.eos()] = 1.0\n \n # random attention\n- attn = torch.rand(bbsz, src_len, tgt_len)\n+ attn = torch.rand(bbsz, tgt_len, src_len)\n \n return Variable(probs), Variable(attn)\n \n", "old_path": "tests/utils.py", "rewrite": "ArgSwap(idxs=1<->2 @(157,15)->(157,25))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "dfd77717b91a6e233829735795ab49d6fd85c0b3", "diff": "@@ -93,7 +93,7 @@ class CosineSchedule(FairseqLRScheduler):\n else:\n i = math.floor(curr_updates / self.period)\n t_i = self.period\n- t_curr = num_updates - (self.period * i)\n+ t_curr = curr_updates - (self.period * i)\n \n lr_shrink = self.lr_shrink ** i\n min_lr = self.min_lr * lr_shrink\n", "old_path": "fairseq/optim/lr_scheduler/cosine_lr_scheduler.py", "rewrite": "ReplaceText(target='curr_updates' @(96,25)->(96,36))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "0eea6923b9d7f408e667714709b070171ac7fe05", "diff": "@@ -312,7 +312,7 @@ def make_positions(tensor, padding_idx, left_pad, onnx_trace=False):\n positions = range_buf.expand_as(tensor)\n if left_pad:\n positions = positions - mask.size(1) + mask.long().sum(dim=1).unsqueeze(1)\n- return positions * mask.long() + positions * (1 - mask.long())\n+ return positions * mask.long() + padding_idx * (1 - mask.long())\n \n max_pos = padding_idx + 1 + tensor.size(1)\n if not hasattr(make_positions, 'range_buf'):\n", "old_path": "fairseq/utils.py", "rewrite": "ReplaceText(target='padding_idx' @(315,41)->(315,50))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "4d3401b09f155995cd81fd394dfa50bf65ee8e5f", "diff": "@@ -183,7 +183,7 @@ class Sampling(Search):\n lprobs = lprobs[:, ::beam_size, :].contiguous()\n \n # we exclude the first two vocab items, one of which is pad\n- assert self.pad == 1, 'sampling assumes the first two symbols can be ignored'\n+ assert self.pad <= 1, 'sampling assumes the first two symbols can be ignored'\n lprobs_nopad = lprobs[:, :, 2:]\n \n # only sample from top-k candidates\n", "old_path": "fairseq/search.py", "rewrite": "ReplaceText(target='<=' @(186,24)->(186,26))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "2340832fdd7acaaaf07626daa6a0cef6fda06cd1", "diff": "@@ -160,7 +160,7 @@ def main(args):\n ))\n \n # update running id counter\n- start_id += len(results)\n+ start_id += len(inputs)\n \n \n def cli_main():\n", "old_path": "interactive.py", "rewrite": "ReplaceText(target='inputs' @(163,24)->(163,31))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "39a60b844aad67aa59267d873edeb4948f6f0af9", "diff": "@@ -351,7 +351,7 @@ class LSTMDecoder(FairseqIncrementalDecoder):\n self.additional_fc = Linear(hidden_size, out_embed_dim)\n if adaptive_softmax_cutoff is not None:\n # setting adaptive_softmax dropout to dropout_out for now but can be redefined\n- self.adaptive_softmax = AdaptiveSoftmax(num_embeddings, embed_dim, adaptive_softmax_cutoff,\n+ self.adaptive_softmax = AdaptiveSoftmax(num_embeddings, hidden_size, adaptive_softmax_cutoff,\n dropout=dropout_out)\n elif not self.share_input_output_embed:\n self.fc_out = Linear(out_embed_dim, num_embeddings, dropout=dropout_out)\n", "old_path": "fairseq/models/lstm.py", "rewrite": "ReplaceText(target='hidden_size' @(354,68)->(354,77))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "49177c99c45f7d6e99a8f1500d16396e2d7b4519", "diff": "@@ -498,7 +498,7 @@ class TransformerDecoder(FairseqIncrementalDecoder):\n del state_dict[k]\n \n version_key = '{}.version'.format(name)\n- if utils.item(state_dict.get(version_key, torch.Tensor([1]))[0]) < 2:\n+ if utils.item(state_dict.get(version_key, torch.Tensor([1]))[0]) <= 2:\n # earlier checkpoints did not normalize after the stack of layers\n self.layer_norm = None\n self.normalize = False\n", "old_path": "fairseq/models/transformer.py", "rewrite": "ReplaceText(target='<=' @(501,73)->(501,74))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "5d7a81099462e9f19715ce5fa37c03816a750e12", "diff": "@@ -412,7 +412,7 @@ class LevenshteinTransformerModel(FairseqNATModel):\n max_lens = torch.zeros_like(output_tokens).fill_(255)\n else:\n if encoder_out.encoder_padding_mask is None:\n- max_src_len = encoder_out.encoder_out.size(1)\n+ max_src_len = encoder_out.encoder_out.size(0)\n src_lens = encoder_out.encoder_out.new(bsz).fill_(max_src_len)\n else:\n src_lens = (~encoder_out.encoder_padding_mask).sum(1)\n", "old_path": "fairseq/models/nat/levenshtein_transformer.py", "rewrite": "ReplaceText(target='0' @(415,59)->(415,60))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "431d604f696a15c06fceab56b4ace271bb85e74b", "diff": "@@ -331,7 +331,7 @@ class SequenceGenerator(object):\n avg_attn_scores = avg_attn_scores[0]\n if avg_attn_scores is not None:\n if attn is None:\n- attn = scores.new(bsz * beam_size, src_tokens.size(1), max_len + 2)\n+ attn = scores.new(bsz * beam_size, avg_attn_scores.size(1), max_len + 2)\n attn_buf = attn.clone()\n attn[:, :, step + 1].copy_(avg_attn_scores)\n \n", "old_path": "fairseq/sequence_generator.py", "rewrite": "ReplaceText(target='avg_attn_scores' @(334,55)->(334,65))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "4f8b0643c80d6a41039ae29e94fca6b44de8791a", "diff": "@@ -138,7 +138,7 @@ def should_stop_early(args, valid_loss):\n return False\n else:\n should_stop_early.num_runs += 1\n- return should_stop_early.num_runs > args.patience\n+ return should_stop_early.num_runs >= args.patience\n \n \n @metrics.aggregate('train')\n", "old_path": "fairseq_cli/train.py", "rewrite": "ReplaceText(target='>=' @(141,42)->(141,43))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "9a718e29855713a51877237b2dcc25e39c234c82", "diff": "@@ -110,5 +110,5 @@ class TranslationFromPretrainedBARTTask(TranslationTask):\n for s_t in src_tokens:\n s_t = torch.cat([s_t, s_t.new(1).fill_(src_lang_id)])\n source_tokens.append(s_t)\n- dataset = LanguagePairDataset(src_tokens, src_lengths, self.source_dictionary)\n+ dataset = LanguagePairDataset(source_tokens, src_lengths, self.source_dictionary)\n return dataset\n", "old_path": "fairseq/tasks/translation_from_pretrained_bart.py", "rewrite": "ReplaceText(target='source_tokens' @(113,38)->(113,48))"} -{"repo": "https://:@github.com/pytorch/fairseq.git", "hash": "b689b6ff3ab7b806217b8aa41821bb8fc85f7cd8", "diff": "@@ -264,7 +264,7 @@ class LanguagePairDataset(FairseqDataset):\n tgt_item = torch.cat([torch.LongTensor([bos]), self.tgt[index]])\n \n bos = self.src_dict.bos()\n- if self.src[index][-1] != bos:\n+ if self.src[index][0] != bos:\n src_item = torch.cat([torch.LongTensor([bos]), self.src[index]])\n \n if self.remove_eos_from_source:\n", "old_path": "fairseq/data/language_pair_dataset.py", "rewrite": "ReplaceText(target='0' @(267,31)->(267,33))"} -{"repo": "https://:@github.com/prprprus/PyMySQLPool.git", "hash": "66b07cdf844554245cf209a72de89bd17133269c", "diff": "@@ -169,7 +169,7 @@ class Pool(object):\n if self.ping_check:\n now = int(time())\n timeout = now\n- if isinstance(int, self.ping_check):\n+ if isinstance(self.ping_check, int):\n timeout = timeout - self.ping_check\n if not hasattr(c, '__ping_check_timestamp'):\n c.__ping_check_timestamp = now\n", "old_path": "pymysqlpool/pool.py", "rewrite": "ArgSwap(idxs=0<->1 @(172,15)->(172,25))"} -{"repo": "https://:@github.com/dailymuse/oz.git", "hash": "a15adf73c721d07b9dac886fcc27145e2449563c", "diff": "@@ -173,7 +173,7 @@ class S3File(CDNFile):\n \n def copy(self, new_path, replace=False):\n \"\"\"Uses boto to copy the file to the new path instead of uploading another file to the new key\"\"\"\n- if replace or get_file(new_path).exists():\n+ if replace or not get_file(new_path).exists():\n self.key.copy(self.key.bucket, new_path)\n return True\n return False\n", "old_path": "oz/aws_cdn/__init__.py", "rewrite": "ReplaceText(target='not ' @(176,22)->(176,22))"} -{"repo": "https://:@github.com/juju/amulet.git", "hash": "016bfab60aca89cbcb58e80f4103e371a77b06ba", "diff": "@@ -77,7 +77,7 @@ class Deployment(object):\n pass # Copy the current parent directory to temp and deploy that\n elif self.charm_name:\n if charm_name == self.charm_name:\n- charm = os.getcwd()\n+ charm_branch = os.getcwd()\n \n self.services[service] = {'branch': charm_branch}\n if units > 1:\n", "old_path": "amulet/deployer.py", "rewrite": "ReplaceText(target='charm_branch' @(80,16)->(80,21))"} -{"repo": "https://:@github.com/gitpython-developers/gitdb.git", "hash": "ca829e0b341dd5c3ae1408b24702f2c75db6ec73", "diff": "@@ -445,7 +445,7 @@ class DeltaApplyReader(LazyMixin):\n \t\t\n \t\n \t#{ Configuration\n-\tif not has_perf_mod:\n+\tif has_perf_mod:\n \t\t_set_cache_ = _set_cache_brute_\n \telse:\n \t\t_set_cache_ = _set_cache_too_slow_without_c\n", "old_path": "stream.py", "rewrite": "ReplaceText(target='' @(448,4)->(448,8))"} -{"repo": "https://:@github.com/longld/peda.git", "hash": "82fcb5a12c92c27fc5722772a84df47b996d3d03", "diff": "@@ -4746,7 +4746,7 @@ class PEDACmd(object):\n \n step = peda.intsize()\n if not peda.is_address(address): # cannot determine address\n- msg(\"Invalid $SP address: 0x%x\" % sp, \"red\")\n+ msg(\"Invalid $SP address: 0x%x\" % address, \"red\")\n return\n for i in range(count):\n if not peda.execute(\"x/%sx 0x%x\" % (\"g\" if step == 8 else \"w\", address + i*step)):\n", "old_path": "peda.py", "rewrite": "ReplaceText(target='address' @(4749,46)->(4749,48))"} -{"repo": "https://:@github.com/TheGhouls/oct.git", "hash": "1f9ea29181962353fe0ea275cb4ba4ec9ae93142", "diff": "@@ -18,7 +18,7 @@ class Report(object):\n self.set_statics()\n \n def set_statics(self):\n- if os.path.exists(self.results_dir):\n+ if not os.path.exists(self.results_dir):\n return\n try:\n shutil.copytree(os.path.join(self.templates_dir, 'css'), os.path.join(self.results_dir, 'css'))\n", "old_path": "oct/results/reportwriter.py", "rewrite": "ReplaceText(target='not ' @(21,11)->(21,11))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "bee6872dbd95a1e526305ef39f42ac537fd2f708", "diff": "@@ -105,7 +105,7 @@ def create_maze(layout_mesh):\n Mesh of lists of MazeComponents\n \n \"\"\"\n- maze_mesh = Mesh(layout_mesh.height, layout_mesh.width,\n+ maze_mesh = Mesh(layout_mesh.width, layout_mesh.height,\n data=[[] for i in range(len(layout_mesh))])\n for index in maze_mesh.iterkeys():\n if layout_mesh[index] == CTFUniverse.wall:\n", "old_path": "pelita/universe.py", "rewrite": "ArgSwap(idxs=0<->1 @(108,16)->(108,20))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "508cd180dce7b72ab248211c977c8525a9c023de", "diff": "@@ -31,7 +31,7 @@ def __init__(self, index, initial_pos, team, homezone,\n \n @property\n def in_own_zone(self):\n- return self.homezone[0] <= self.current_pos[1] <= self.homezone[1]\n+ return self.homezone[0] <= self.current_pos[0] <= self.homezone[1]\n \n def move(self, new_pos):\n self.current_pos = new_pos\n", "old_path": "pelita/universe.py", "rewrite": "ReplaceText(target='0' @(34,52)->(34,53))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "6b76e416da2dc0d18224e47d7b176dad967e15b2", "diff": "@@ -182,7 +182,7 @@ def a_star(self, initial, target):\n else:\n seen.append(current)\n for pos in self.adjacency[current]:\n- heapq.heappush(to_visit, (datamodel.manhattan_dist(current, pos), (pos)))\n+ heapq.heappush(to_visit, (datamodel.manhattan_dist(target, pos), (pos)))\n \n # Now back-track using seen to determine how we got here.\n # Initialise the path with current node, i.e. position of food.\n", "old_path": "pelita/game_master.py", "rewrite": "ReplaceText(target='target' @(185,71)->(185,78))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "fa2505d44ae3d3724f7fa979c0167f03bf7424f7", "diff": "@@ -136,7 +136,7 @@ def play(self):\n if self.universe.teams[0].score < self.universe.teams[1].score:\n events.append(datamodel.TeamWins(1))\n elif self.universe.teams[0].score > self.universe.teams[1].score:\n- events.append(datamodel.TeamWins(1))\n+ events.append(datamodel.TeamWins(0))\n else:\n events.append(datamodel.GameDraw())\n self.send_to_viewers(round_index, None, events)\n", "old_path": "pelita/game_master.py", "rewrite": "ReplaceText(target='0' @(139,45)->(139,46))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "4044f845e54c2077d6896010c25fcc123fc10203", "diff": "@@ -78,7 +78,7 @@ def test_equal_positions(self):\n layout = create_layout(layout_str)\n assert layout.bots == [(1, 1), (1, 1)]\n assert layout.enemy == [(1, 1), (1, 1)]\n- setup_test_game(layout=layout)\n+ setup_test_game(layout=layout_str)\n \n def test_define_after(self):\n layout = create_layout(self.layout, food=[(1, 1)], bots=[None, None], enemy=None)\n", "old_path": "test/test_team.py", "rewrite": "ReplaceText(target='layout_str' @(81,31)->(81,37))"} -{"repo": "https://:@github.com/ASPP/pelita.git", "hash": "6fd0a9d2af44c491c1cc6774c3a169e97e2040be", "diff": "@@ -398,7 +398,7 @@ def _team(self):\n @property\n def turn(self):\n \"\"\" The turn of our bot. \"\"\"\n- return self.bot_index // 2\n+ return self.bot_index % 2\n \n @property\n def other(self):\n", "old_path": "pelita/player/team.py", "rewrite": "ReplaceText(target='%' @(401,30)->(401,32))"} -{"repo": "https://:@github.com/iotaledger/ccurl.interface.py.git", "hash": "eb7f9190d24995d3f8d03a8350382ab6045a6e67", "diff": "@@ -44,7 +44,7 @@ gta = api.get_transactions_to_approve(depth=3) # get tips to be approved by your\n \n mwm = 14 # target is mainnet\n \n-bundle = entangled_interface.local_attach_to_tangle(pb, gta['trunkTransaction'], gta['branchTransaction'], mwm)\n+bundle = entangled_interface.local_attach_to_tangle(pb, gta['branchTransaction'],gta['trunkTransaction'], mwm)\n \n bundle_trytes = [ x.as_tryte_string() for x in pb._transactions ]\n \n", "old_path": "examples/with_entangled.py", "rewrite": "ArgSwap(idxs=1<->2 @(47,9)->(47,51))"} -{"repo": "https://:@github.com/softlayer/softlayer-python.git", "hash": "53731de7e51d31475cc224aceb0f3ff7217cdafd", "diff": "@@ -153,7 +153,7 @@ class NetworkManager(object):\n ('privateResidenceFlag', private_residence),\n ('state', state),\n ('postalCode', postal_code)]:\n- if key is not None:\n+ if value is not None:\n update[key] = value\n \n # If there's anything to update, update it\n", "old_path": "SoftLayer/managers/network.py", "rewrite": "ReplaceText(target='value' @(156,15)->(156,18))"} -{"repo": "https://:@github.com/softlayer/softlayer-python.git", "hash": "dcf66e15711e47c594f20ffac7605bfc6d1a8746", "diff": "@@ -15,7 +15,7 @@ import click\n type=click.Choice(['vs', 'vlan', 'server']),\n help='Firewall type',\n required=True)\n-@click.option('--high-availability', '--ha',\n+@click.option('--ha', '--high-availability',\n is_flag=True,\n help='High available firewall option')\n @environment.pass_env\n", "old_path": "SoftLayer/CLI/firewall/add.py", "rewrite": "ArgSwap(idxs=0<->1 @(18,1)->(18,13))"} -{"repo": "https://:@github.com/softlayer/softlayer-python.git", "hash": "f0840e302d486d6002a14419bbde85c1deedaf6a", "diff": "@@ -271,7 +271,7 @@ class BlockStorageManager(utils.IdentifierMixin, object):\n package,\n 'performance_storage_iscsi'\n ),\n- storage_utils.find_performance_space_price(package, iops),\n+ storage_utils.find_performance_space_price(package, size),\n storage_utils.find_performance_iops_price(package, size, iops),\n ]\n elif storage_type == 'storage_service_enterprise':\n", "old_path": "SoftLayer/managers/block.py", "rewrite": "ReplaceText(target='size' @(274,68)->(274,72))"} -{"repo": "https://:@github.com/softlayer/softlayer-python.git", "hash": "4418057fc0e3632aba2d89b6e42494c79cadd16a", "diff": "@@ -367,7 +367,7 @@ class VSManager(utils.IdentifierMixin, object):\n if datacenter:\n data[\"datacenter\"] = {\"name\": datacenter}\n \n- if private_vlan and public_vlan:\n+ if private_vlan or public_vlan:\n network_components = self._create_network_components(public_vlan, private_vlan,\n private_subnet, public_subnet)\n data.update(network_components)\n", "old_path": "SoftLayer/managers/vs.py", "rewrite": "ReplaceText(target='or' @(370,24)->(370,27))"} -{"repo": "https://:@github.com/softlayer/softlayer-python.git", "hash": "58b27c6bf5400a717acd00b7866964ef11f36e59", "diff": "@@ -87,6 +87,6 @@ def cli(env, identifier):\n for guest in guests:\n real_guest = guest.get('virtualGuest')\n member_table.add_row([\n- guest.get('id'), real_guest.get('hostname'), utils.clean_time(real_guest.get('provisionDate'))\n+ real_guest.get('id'), real_guest.get('hostname'), utils.clean_time(real_guest.get('provisionDate'))\n ])\n env.fout(member_table)\n", "old_path": "SoftLayer/CLI/autoscale/detail.py", "rewrite": "ReplaceText(target='real_guest' @(90,12)->(90,17))"} -{"repo": "https://:@github.com/data-8/datascience.git", "hash": "fd9aceb598290fb89a0f3131c3fb39dde18ef543", "diff": "@@ -446,7 +446,7 @@ class Table(collections.abc.Mapping):\n count | points\n 9 | 10\n \"\"\"\n- percentiles = [percentile(self[column_name], p) for column_name in self]\n+ percentiles = [percentile(p, self[column_name]) for column_name in self]\n return Table(percentiles, self.column_labels)\n ##################\n # Export/Display #\n", "old_path": "datascience/tables.py", "rewrite": "ArgSwap(idxs=0<->1 @(449,23)->(449,33))"} -{"repo": "https://:@github.com/data-8/datascience.git", "hash": "084450f127ecc490b887cad82fa43cda5f9b32fe", "diff": "@@ -2255,7 +2255,7 @@ class Table(collections.abc.MutableMapping):\n space_count[labels[i]] += 1\n return updated_labels\n return labels\n- yticks = make_unique_labels(labels)\n+ yticks = make_unique_labels(yticks)\n \n print(\"yticks: \" + str(yticks))\n print(\"ylabel: \" + str(ylabel))\n", "old_path": "datascience/tables.py", "rewrite": "ReplaceText(target='yticks' @(2258,36)->(2258,42))"} -{"repo": "https://:@github.com/dnaeon/py-vpoller.git", "hash": "81769f6f8d9cb0dfc8cbc39a44027afa7d459636", "diff": "@@ -51,6 +51,6 @@ def task(name, required=None):\n result = {'success': 1, 'msg': e.message}\n finally:\n return result\n- registry.register(name=name, fn=fn, required=required)\n+ registry.register(name=name, fn=wrapper, required=required)\n return wrapper\n return decorator\n", "old_path": "src/vpoller/decorators.py", "rewrite": "ReplaceText(target='wrapper' @(54,40)->(54,42))"} -{"repo": "https://:@github.com/enthought/qt_binder.git", "hash": "68381b406035f2ce9666cb8ef1ab2e8e57cf8bf8", "diff": "@@ -58,4 +58,4 @@ else:\n loader = RecordingUiLoader()\n ui = loader.load(path)\n \n- return ui, ui.to_be_bound()\n+ return ui, loader.to_be_bound()\n", "old_path": "qt_binder/qt/ui_loader.py", "rewrite": "ReplaceText(target='loader' @(61,19)->(61,21))"} -{"repo": "https://:@github.com/ggozad/behaving.git", "hash": "1bc546aa03f9d42ff78a0a79e0894e488edc9add", "diff": "@@ -40,7 +40,7 @@ def should_receive_email(context, address):\n def click_link_in_email(context, address):\n mails = context.mail.user_messages(address)\n assert mails, u'message not found'\n- mail = email.message_from_string(mails[-1])\n+ mail = email.message_from_string(mails[0])\n links = URL_RE.findall(str(mail).replace('=\\n', ''))\n assert links, u'link not found'\n url = links[0]\n", "old_path": "src/behaving/mail/steps.py", "rewrite": "ReplaceText(target='0' @(43,43)->(43,45))"} -{"repo": "https://:@github.com/allenai/SciSpaCy.git", "hash": "d0d1d525943e051762ea5482ba82c9a4718285c0", "diff": "@@ -58,7 +58,7 @@ def train_parser_and_tagger(train_json_path: str,\n parser = nlp.get_pipe('parser')\n \n train_corpus = GoldCorpus(train_json_path, dev_json_path)\n- test_corpus = GoldCorpus(train_json_path, dev_json_path)\n+ test_corpus = GoldCorpus(train_json_path, test_json_path)\n \n if ontonotes_path:\n onto_train_path = os.path.join(ontonotes_path, \"train\")\n", "old_path": "scripts/train_parser_and_tagger.py", "rewrite": "ReplaceText(target='test_json_path' @(61,46)->(61,59))"} -{"repo": "https://:@github.com/allenai/SciSpaCy.git", "hash": "e15e9b7913459b6139d4f30030a502f30479cfd5", "diff": "@@ -190,7 +190,7 @@ def train_parser_and_tagger(train_json_path: str,\n print(\"Token acc:\", scorer_onto_retrained.token_acc)\n \n with open(os.path.join(model_output_dir, \"ontonotes_test.json\")) as metric_file:\n- json.dump(scorer.scores, metric_file)\n+ json.dump(scorer_onto_retrained.scores, metric_file)\n if __name__ == \"__main__\":\n parser = argparse.ArgumentParser()\n \n", "old_path": "scripts/train_parser_and_tagger.py", "rewrite": "ReplaceText(target='scorer_onto_retrained' @(193,22)->(193,28))"} -{"repo": "https://:@github.com/allenai/SciSpaCy.git", "hash": "47400cbed4d4943f6bba7ed013bf80110f738f2e", "diff": "@@ -679,7 +679,7 @@ def eval_candidate_generation_and_linking(examples: List[data_util.MedMentionExa\n if generate_linking_classifier_training_data:\n for candidates, mention_types_for_mention in zip(candidates_by_mention, mention_types_by_mention):\n for candidate_id, candidate in candidates.items():\n- classifier_example = linker.classifier_example(candidate_id, candidate, mention_text, mention_types)\n+ classifier_example = linker.classifier_example(candidate_id, candidate, mention_text, mention_types_for_mention)\n classifier_example['label'] = int(gold_entity.umls_id == candidate_id)\n linking_classifier_training_data.append(classifier_example)\n \n", "old_path": "scripts/linking.py", "rewrite": "ReplaceText(target='mention_types_for_mention' @(682,118)->(682,131))"} -{"repo": "https://:@github.com/Burnysc2/python-sc2.git", "hash": "c3f5b0de304727914a2a59d5cfde6dda04071686", "diff": "@@ -381,7 +381,7 @@ class BotAI(object):\n return ActionResult.CantFindPlacementLocation\n \n unit = unit or self.select_build_worker(p)\n- if unit is None or self.can_afford(building):\n+ if unit is None or not self.can_afford(building):\n return ActionResult.Error\n return await self.do(unit.build(building, p))\n \n", "old_path": "sc2/bot_ai.py", "rewrite": "ReplaceText(target='not ' @(384,27)->(384,27))"} -{"repo": "https://:@github.com/Burnysc2/python-sc2.git", "hash": "20468d57d6fd5cc80c9e7757d75e987bd81e632a", "diff": "@@ -185,7 +185,7 @@ class Point2(Pointlike):\n Used in ramp finding \"\"\"\n assert self != p\n distanceBetweenPoints = self.distance_to(p)\n- assert r > distanceBetweenPoints / 2\n+ assert r >= distanceBetweenPoints / 2\n # remaining distance from center towards the intersection, using pythagoras\n remainingDistanceFromCenter = (r ** 2 - (distanceBetweenPoints / 2) ** 2) ** 0.5\n # center of both points\n", "old_path": "sc2/position.py", "rewrite": "ReplaceText(target='>=' @(188,17)->(188,18))"} -{"repo": "https://:@github.com/Burnysc2/python-sc2.git", "hash": "9470180d3caaa18098ebffea220719ad6083afbe", "diff": "@@ -185,7 +185,7 @@ class Point2(Pointlike):\n Used in ramp finding \"\"\"\n assert self != p\n distanceBetweenPoints = self.distance_to(p)\n- assert r > distanceBetweenPoints / 2\n+ assert r >= distanceBetweenPoints / 2\n # remaining distance from center towards the intersection, using pythagoras\n remainingDistanceFromCenter = (r ** 2 - (distanceBetweenPoints / 2) ** 2) ** 0.5\n # center of both points\n", "old_path": "sc2/position.py", "rewrite": "ReplaceText(target='>=' @(188,17)->(188,18))"} -{"repo": "https://:@github.com/Burnysc2/python-sc2.git", "hash": "9c59f42e1722e1141a51300d472b0385d64f1640", "diff": "@@ -86,7 +86,7 @@ class Units(list):\n return self[0]\n \n def take(self, n: int) -> \"Units\":\n- if self.amount >= n:\n+ if self.amount <= n:\n return self\n else:\n return self.subgroup(self[:n])\n", "old_path": "sc2/units.py", "rewrite": "ReplaceText(target='<=' @(89,23)->(89,25))"} -{"repo": "https://:@github.com/kenjyco/beu.git", "hash": "4aea6146fc5f01df3e344b9fadddf28b795dac89", "diff": "@@ -36,7 +36,7 @@ def _get_settings_file():\n if not os.path.exists(home_config_dir):\n os.makedirs(home_config_dir)\n copyfile(sample_file, settings_file)\n- print('\\nCopied settings to {}'.format(repr(home_config_dir)))\n+ print('\\nCopied settings to {}'.format(repr(settings_file)))\n return settings_file\n \n \n", "old_path": "beu/__init__.py", "rewrite": "ReplaceText(target='settings_file' @(39,48)->(39,63))"} -{"repo": "https://:@github.com/WattTime/pyiso.git", "hash": "009316799f872c90f50b73e41f3a6f9021f8b2cc", "diff": "@@ -111,7 +111,7 @@ class BaseClient(object):\n self.options.update(kwargs)\n \n # check start_at and end_at args\n- if self.options.get('start_at', None) and self.options.get('end_at', None):\n+ if self.options.get('start_at', None) or self.options.get('end_at', None):\n assert self.options['start_at'] < self.options['end_at']\n self.options['start_at'] = self.utcify(self.options['start_at'])\n self.options['end_at'] = self.utcify(self.options['end_at'])\n", "old_path": "pyiso/base.py", "rewrite": "ReplaceText(target='or' @(114,46)->(114,49))"} -{"repo": "https://:@github.com/WattTime/pyiso.git", "hash": "31c2680f1e96d6affbbef6dc75b9ab3724a7d8b9", "diff": "@@ -117,7 +117,7 @@ class BaseClient(object):\n self.options.update(kwargs)\n \n # check start_at and end_at args\n- if self.options.get('start_at', None) or self.options.get('end_at', None):\n+ if self.options.get('start_at', None) and self.options.get('end_at', None):\n assert self.options['start_at'] < self.options['end_at']\n self.options['start_at'] = self.utcify(self.options['start_at'])\n self.options['end_at'] = self.utcify(self.options['end_at'])\n", "old_path": "pyiso/base.py", "rewrite": "ReplaceText(target='and' @(120,46)->(120,48))"} -{"repo": "https://:@github.com/WattTime/pyiso.git", "hash": "14fd34daa69230352ecb651ee8f30a4566ab6c59", "diff": "@@ -18,7 +18,7 @@ class TestGenerationTask(TestCase):\n expected = client_factory(ba).get_generation(**kwargs)\n received = tasks.get_generation(ba, **kwargs)\n \n- for i in range(len(expected)):\n+ for i in range(len(received)):\n if expected[i]['timestamp'] == received[i]['timestamp']:\n self.assertEqual(expected[i]['gen_MW'], received[i]['gen_MW'])\n self.assertEqual(expected[i]['fuel_name'], received[i]['fuel_name'])\n", "old_path": "tests/test_tasks.py", "rewrite": "ReplaceText(target='received' @(21,27)->(21,35))"} -{"repo": "https://:@github.com/TTWShell/hobbit-core.git", "hash": "b51217f7fc8cb238c1dc09e8932178cda40cf2b4", "diff": "@@ -133,4 +133,4 @@ class TestTransaction(BaseTest):\n \n with pytest.raises(Exception):\n view_func2()\n- assert len(User.query.all()) == 1\n+ assert len(User.query.all()) == 0\n", "old_path": "tests/test_db.py", "rewrite": "ReplaceText(target='0' @(136,40)->(136,41))"} -{"repo": "https://:@github.com/ktdreyer/jenkins-job-wrecker.git", "hash": "3be4ea2d49a46cec8223361142305107b88ca889", "diff": "@@ -162,7 +162,7 @@ def prebuildcleanup(top, parent):\n pass\n else:\n raise NotImplementedError(\"cannot handle \"\n- \"XML %s\" % subelement.tag)\n+ \"XML %s\" % element.tag)\n \n for rule in preclean_patterns:\n if preclean_patterns[rule] is not None and len(preclean_patterns[rule]) > 0:\n", "old_path": "jenkins_job_wrecker/modules/buildwrappers.py", "rewrite": "ReplaceText(target='element' @(165,49)->(165,59))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "7a6ff590425d32fd596687bd0d35bc98680fc5b8", "diff": "@@ -379,7 +379,7 @@ class clinical(example_filetype_format.FileTypeFormat):\n \t\t\tpatient_patients = clinicalDF[patientId][clinicalDF[patientId] != \"\"]\n \t\t\t# #CHECK: All samples must have associated patient data (GENIE requires patient data)\n \t\t\tif not all(sample_patients.isin(patient_patients)):\n-\t\t\t\ttotal_error += \"Sample: All samples must have associated patient information. These samples are missing patient data: %s\\n\" % \", \".join(clinicalSampleDF[patientId][~clinicalSampleDF[patientId].isin(clinicalDF[patientId])])\n+\t\t\t\ttotal_error += \"Sample: All samples must have associated patient information. These samples are missing patient data: %s\\n\" % \", \".join(clinicalSampleDF[sampleId][~clinicalSampleDF[patientId].isin(clinicalDF[patientId])])\n \t\t\t#CHECK: All patients must have associated sample data \n \t\t\tif not all(patient_patients.isin(sample_patients)):\n \t\t\t\t### MAKE WARNING FOR NOW###\n", "old_path": "processing/clinical.py", "rewrite": "ReplaceText(target='sampleId' @(382,157)->(382,166))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "b5b670e4a5797ba2a66caa517bbe2160fec645f7", "diff": "@@ -209,7 +209,7 @@ def createMafDatabase(syn, databaseToSynIdMappingDf,testing=False,staging=False)\n \t\t#Make sure to store the newly created maf db synid into the staging synapse mapping\n \t\tdatabaseToSynIdMapping = syn.tableQuery(\"SELECT * FROM syn12094210 where Database = 'vcf2maf'\")\n \t\tdatabaseToSynIdMappingDf = databaseToSynIdMapping.asDataFrame()\n-\t\tdatabaseToSynIdMapping['Id'][0] = newMafDb.id\n+\t\tdatabaseToSynIdMappingDf['Id'][0] = newMafDb.id\n \t\tsyn.store(synapseclient.Table(\"syn12094210\",databaseToSynIdMappingDf))\n \t#Move and archive old mafdatabase\n \tmafDatabaseEnt.parentId = \"syn7208886\"\n", "old_path": "processing/input_to_database.py", "rewrite": "ReplaceText(target='databaseToSynIdMappingDf' @(212,2)->(212,24))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "78fcacd10d4c44c90f41893a161de24ff13ea774", "diff": "@@ -311,7 +311,7 @@ class clinical(FileTypeFormat):\n \t\thaveColumn = process_functions.checkColExist(clinicalDF, \"SEQ_ASSAY_ID\")\n \t\tif haveColumn:\n \t\t\tif not all([i != \"\" for i in clinicalDF['SEQ_ASSAY_ID']]):\n-\t\t\t\ttotal_error += \"Sample: Please double check your SEQ_ASSAY_ID columns, there are empty rows.\\n\"\n+\t\t\t\twarning += \"Sample: Please double check your SEQ_ASSAY_ID columns, there are empty rows.\\n\"\n \t\t\t#must remove empty seq assay ids first\n \t\t\t#Checking if seq assay ids start with the center name\n \t\t\tseqAssayIds = clinicalDF.SEQ_ASSAY_ID[clinicalDF.SEQ_ASSAY_ID != \"\"]\n", "old_path": "genie/clinical.py", "rewrite": "ReplaceText(target='warning' @(314,4)->(314,15))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "e115f3884db224a231c87b346f04d6edbf66d6bb", "diff": "@@ -87,7 +87,7 @@ class vcf(maf.maf):\n \t\t\t\ttumor = \"TUMOR\"\n \t\t\t\tnormal = \"NORMAL\"\n \t\t\t# ### If the tumor name isn't TUMOR, set the sample id to be the tumor name\n-\t\t\tif tumor != \"TUMOR\":\n+\t\t\tif tumor == \"TUMOR\":\n \t\t\t\ttumorName = vcfName.replace(\".vcf\",\"\")\n \t\t\telse:\n \t\t\t\ttumorName = tumor\n", "old_path": "genie/vcf.py", "rewrite": "ReplaceText(target='==' @(90,12)->(90,14))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "4c861c5eccebb0d0a402d85b658924df1e6a8819", "diff": "@@ -247,7 +247,7 @@ def validation(syn, center, process, center_mapping_df, databaseToSynIdMappingDf\n duplicatedFiles = duplicatedFiles.append(cbsSegFiles)\n clinical_bool = [\"clinical\" in i for i in inputValidStatus['name']]\n clinical_files = inputValidStatus[clinical_bool]\n- if len(clinical_bool) > 2:\n+ if len(clinical_files) > 2:\n duplicatedFiles = duplicatedFiles.append(clinical_files)\n \n # nodups = [\"data_mutations_extended\"]\n", "old_path": "genie/input_to_database.py", "rewrite": "ReplaceText(target='clinical_files' @(250,15)->(250,28))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "39f33cd754223ee515b8d790c0cd96b32f36b88e", "diff": "@@ -270,7 +270,7 @@ def validatefile(syn, entities, validation_status_table, error_tracker_table,\n input_status_list, invalid_errors_list = _get_status_and_error_list(\n valid, message, entities)\n # Send email the first time the file is invalid\n- if invalid_errors_list:\n+ if not invalid_errors_list:\n _send_validation_error_email(syn, filenames, message, file_users)\n else:\n input_status_list = [\n", "old_path": "genie/input_to_database.py", "rewrite": "ReplaceText(target='not ' @(273,11)->(273,11))"} -{"repo": "https://:@github.com/Sage-Bionetworks/Genie.git", "hash": "e140dee708542afa35c5d1e30671d8083fcbcd29", "diff": "@@ -512,7 +512,7 @@ class bed(FileTypeFormat):\n string: Path to new bed file\n \"\"\"\n final_beddf = self._process(beddf, seq_assay_id, newPath, parentId)\n- process_functions.updateData(self.syn, databaseSynId, beddf,\n+ process_functions.updateData(self.syn, databaseSynId, final_beddf,\n seq_assay_id,\n filterByColumn=\"SEQ_ASSAY_ID\",\n toDelete=True)\n", "old_path": "genie/bed.py", "rewrite": "ReplaceText(target='final_beddf' @(515,62)->(515,67))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "a7175c6bf59803deb4a52aaf8c0185b93874ff21", "diff": "@@ -96,7 +96,7 @@ def decide_work_and_resources(active_w, idle_w, H, H_ind, sim_specs, gen_specs):\n 'form_subcomm': [], \n 'calc_in': H[sim_specs['in']][inds_to_send],\n 'calc_out': sim_specs['out'],\n- 'calc_info': {'type':'sim', 'pt_ids': q_inds},\n+ 'calc_info': {'type':'sim', 'pt_ids': inds_to_send},\n }\n \n update_history_x_out(H, q_inds, Work[i]['calc_in'], i, sim_specs['params'])\n", "old_path": "code/src/libE_manager.py", "rewrite": "ReplaceText(target='inds_to_send' @(99,61)->(99,67))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "ad5e021d040efd28a61d6afa2be908e25f363bd4", "diff": "@@ -52,7 +52,7 @@ def worker_main(c, sim_specs, gen_specs):\n \n if tag_out == STOP_TAG: break\n \n- comm.send(obj=data_out, dest=0, tag=calc_tag) \n+ comm.send(obj=data_out, dest=0, tag=tag_out) \n \n # Clean up\n for loc in locations.values():\n", "old_path": "code/src/libE_worker.py", "rewrite": "ReplaceText(target='tag_out' @(55,44)->(55,52))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "2b33970bdac3034cc7799c2849eae09f9c22fcf6", "diff": "@@ -40,7 +40,7 @@ class MPIComm(Comm):\n def kill_pending(self):\n \"Make sure pending requests are cancelled if the comm is killed.\"\n for req in self._outbox:\n- if req.Test():\n+ if not req.Test():\n req.Cancel()\n self._outbox = []\n \n", "old_path": "libensemble/mpi_comms.py", "rewrite": "ReplaceText(target='not ' @(43,15)->(43,15))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "155ba0c0517046e8ec305e76862bc6f0a44fafc7", "diff": "@@ -136,7 +136,7 @@ class EnvResources:\n nidstr = splitstr[1].strip(\"]\")\n nidlst = EnvResources._noderange_append(prefix, nidstr)\n else: # Multiple Partitions\n- splitgroups = [str.split('[', 1) for str in splitstr]\n+ splitgroups = [str.split('[', 1) for str in part_splitstr]\n prefixgroups = [group[0] for group in splitgroups]\n nodegroups = [group[1].strip(']') for group in splitgroups]\n nidlst = []\n", "old_path": "libensemble/env_resources.py", "rewrite": "ReplaceText(target='part_splitstr' @(139,56)->(139,64))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "c89e4f0b72361ba84884a3c691d73d8f62b98014", "diff": "@@ -108,7 +108,7 @@ def give_sim_work_first(W, H, sim_specs, gen_specs, alloc_specs, persis_info):\n last_size = persis_info.get('last_size')\n if len(H):\n # Don't give gen instances in batch mode if points are unfinished\n- if (gen_specs['user'].get('batch_mode')\n+ if (alloc_specs['user'].get('batch_mode')\n and not all(np.logical_or(H['returned'][last_size:],\n H['paused'][last_size:]))):\n break\n", "old_path": "libensemble/alloc_funcs/fast_alloc_and_pausing.py", "rewrite": "ReplaceText(target='alloc_specs' @(111,20)->(111,29))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "c89e4f0b72361ba84884a3c691d73d8f62b98014", "diff": "@@ -33,7 +33,7 @@ def give_sim_work_first(W, H, sim_specs, gen_specs, alloc_specs, persis_info):\n last_size = persis_info.get('last_size')\n if len(H):\n # Don't give gen instances in batch mode if points are unfinished\n- if (gen_specs['user'].get('batch_mode')\n+ if (alloc_specs['user'].get('batch_mode')\n and not all(np.logical_or(H['returned'][last_size:],\n H['paused'][last_size:]))):\n break\n", "old_path": "libensemble/alloc_funcs/fast_alloc_to_aposmm.py", "rewrite": "ReplaceText(target='alloc_specs' @(36,20)->(36,29))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "c89e4f0b72361ba84884a3c691d73d8f62b98014", "diff": "@@ -73,7 +73,7 @@ def give_sim_work_first(W, H, sim_specs, gen_specs, alloc_specs, persis_info):\n \n # No gen instances in batch mode if workers still working\n still_working = ~H['returned']\n- if gen_specs['user'].get('batch_mode') and np.any(still_working):\n+ if alloc_specs['user'].get('batch_mode') and np.any(still_working):\n break\n \n # Give gen work\n", "old_path": "libensemble/alloc_funcs/give_sim_work_first.py", "rewrite": "ReplaceText(target='alloc_specs' @(76,15)->(76,24))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "55f4a8f05ade4709b53cbe9ef92fe00a0e2e9a79", "diff": "@@ -59,7 +59,7 @@ def try_and_run_nlopt(H, gen_specs, libE_info):\n gen_specs['user']['ub'], gen_specs['user']['lb'], local=True, active=True)\n tag, Work, calc_in = sendrecv_mgr_worker_msg(comm, H_o)\n if tag in [STOP_TAG, PERSIS_STOP]:\n- nlopt.forced_stop.message = 'tag=' + str(tag)\n+ nlopt.forced_stop.message = 'tag=' + str(Work)\n raise nlopt.forced_stop\n \n # Return function value (and maybe gradient)\n", "old_path": "libensemble/gen_funcs/uniform_or_localopt.py", "rewrite": "ReplaceText(target='Work' @(62,53)->(62,56))"} -{"repo": "https://:@github.com/Libensemble/libensemble.git", "hash": "c090514bb370c6960db4c8be2ae643534def8d2b", "diff": "@@ -24,4 +24,4 @@ def persistent_uniform(H, persis_info, gen_specs, libE_info):\n H_o['x'] = persis_info['rand_stream'].uniform(lb, ub, (b, n))\n tag, Work, calc_in = sendrecv_mgr_worker_msg(libE_info['comm'], H_o)\n \n- return H_o, persis_info, tag\n+ return H_o, persis_info, Work\n", "old_path": "libensemble/gen_funcs/persistent_uniform_sampling.py", "rewrite": "ReplaceText(target='Work' @(27,29)->(27,32))"} -{"repo": "https://:@github.com/davedittrich/python_secrets.git", "hash": "3a477f63bb9d0417e63254ba993025a8666c3e1d", "diff": "@@ -181,7 +181,7 @@ class PythonSecretsApp(App):\n self.environment = self.options.environment\n self.secrets_basedir = self.options.secrets_basedir\n # Don't output error messages when \"complete\" command used\n- if cmd.cmd_name == 'complete':\n+ if cmd.cmd_name != 'complete':\n SecretsEnvironment.permissions_check(\n self.secrets_basedir,\n verbose_level=self.options.verbose_level,\n", "old_path": "psec/main.py", "rewrite": "ReplaceText(target='!=' @(184,24)->(184,26))"} -{"repo": "https://:@github.com/junzis/pyModeS.git", "hash": "b2940af6efe4cb6d99bca8a1f1f214292acf3e6a", "diff": "@@ -79,7 +79,7 @@ def cpr2position(cprlat0, cprlat1, cprlon0, cprlon1, t0, t1):\n cprlat_even = cprlat0 / 131072.0\n cprlat_odd = cprlat1 / 131072.0\n cprlon_even = cprlon0 / 131072.0\n- cprlon_odd = cprlon0 / 131072.0\n+ cprlon_odd = cprlon1 / 131072.0\n \n air_d_lat_even = 360.0 / 60 \n air_d_lat_odd = 360.0 / 59 \n", "old_path": "decoder.py", "rewrite": "ReplaceText(target='cprlon1' @(82,18)->(82,25))"} -{"repo": "https://:@github.com/icb-dcm/pyabc.git", "hash": "2df9fbbc034ecad45cde0e14d0205fc70ae9b90b", "diff": "@@ -456,5 +456,5 @@ class ABCSMC:\n return\n \n for m in self.history.alive_models(t - 1):\n- particles, w = self.history.get_distribution(t - 1, m)\n+ particles, w = self.history.get_distribution(m, t - 1)\n self.transitions[m].fit(particles, w)\n", "old_path": "pyabc/smc.py", "rewrite": "ArgSwap(idxs=0<->1 @(459,27)->(459,56))"} -{"repo": "https://:@github.com/icb-dcm/pyabc.git", "hash": "2df9fbbc034ecad45cde0e14d0205fc70ae9b90b", "diff": "@@ -108,7 +108,7 @@ def abc_model(abc_id, model_id, t):\n t = history.max_t\n else:\n t = int(t)\n- df, w = history.get_distribution(t, model_id)\n+ df, w = history.get_distribution(model_id, t)\n df[\"CDF\"] = w\n tabs = []\n \n", "old_path": "pyabc/visserver/server.py", "rewrite": "ArgSwap(idxs=0<->1 @(111,12)->(111,36))"} -{"repo": "https://:@github.com/icb-dcm/pyabc.git", "hash": "2df9fbbc034ecad45cde0e14d0205fc70ae9b90b", "diff": "@@ -122,7 +122,7 @@ def test_dataframe_storage_readout():\n for m in range(5):\n pop = pops[(h, m, t)]\n expected_particles_list = [p.parameter for p in pop]\n- pars_df, w = h.get_distribution(t, m)\n+ pars_df, w = h.get_distribution(m, t)\n # use range(len and not zip on dataframe to not stop early\n # in case of population not completely stored\n assert np.isclose(w.sum(), 1)\n", "old_path": "test/test_storage.py", "rewrite": "ArgSwap(idxs=0<->1 @(125,29)->(125,47))"} -{"repo": "https://:@github.com/llllllllll/codetransformer.git", "hash": "7c327683df810265d01a995d2704c9f8218b0ef7", "diff": "@@ -141,7 +141,7 @@ class Instruction(InstructionMeta._marker, metaclass=InstructionMeta):\n 'little',\n )\n \n- yield cls(arg)\n+ yield instr(arg)\n \n @classmethod\n def from_opcode(cls, opcode):\n", "old_path": "codetransformer/instructions.py", "rewrite": "ReplaceText(target='instr' @(144,18)->(144,21))"} -{"repo": "https://:@github.com/richardkiss/pycoin.git", "hash": "c6b3b2e0d7167d4566dc1d90258d6b98dba8bb65", "diff": "@@ -197,7 +197,7 @@ def eval_script(script, signature_for_hash_type_f, lock_time, expected_hash_type\n # Subset of script starting at the most recent codeseparator\n op_checksig(stack, signature_for_hash_type_f, expected_hash_type, script[begin_code_hash:], flags)\n if opcode == opcodes.OP_CHECKSIGVERIFY:\n- if bool_from_script_bytes(stack.pop()):\n+ if not bool_from_script_bytes(stack.pop()):\n raise ScriptError(\"VERIFY failed at %d\" % (pc-1))\n continue\n \n", "old_path": "pycoin/tx/script/vm.py", "rewrite": "ReplaceText(target='not ' @(200,23)->(200,23))"} -{"repo": "https://:@github.com/richardkiss/pycoin.git", "hash": "6d1df60ddb054d1510f38231a529ccf35a73525a", "diff": "@@ -302,7 +302,7 @@ def generate_output(args, output_dict, output_order):\n \n if len(output_order) == 0:\n print(\"no output: use -j option to see keys\")\n- elif len(output_order) == 1:\n+ elif len(output_dict) == 1:\n print(output_dict[output_order[0][0]])\n else:\n dump_output(output_dict, output_order)\n", "old_path": "pycoin/cmds/ku.py", "rewrite": "ReplaceText(target='output_dict' @(305,13)->(305,25))"} -{"repo": "https://:@github.com/richardkiss/pycoin.git", "hash": "02a225ef6056cc5a7fa19a731e14fbda94522c55", "diff": "@@ -37,7 +37,7 @@ def deterministic_generate_k(generator_order, secret_exponent, val, hash_f=hashl\n shift = 8 * hash_size - bln\n if shift > 0:\n val >>= shift\n- if val > n:\n+ if val >= n:\n val -= n\n h1 = intstream.to_bytes(val, length=order_size)\n k = hmac.new(k, v + b'\\x00' + priv + h1, hash_f).digest()\n", "old_path": "pycoin/ecdsa/rfc6979.py", "rewrite": "ReplaceText(target='>=' @(40,11)->(40,12))"} -{"repo": "https://:@github.com/er1iang/hfut-stu-lib.git", "hash": "6bdc0e5591564da7b5fe2acd60bde0cb8b2b46f6", "diff": "@@ -60,7 +60,7 @@ class TestUtil(TestBase):\n '172.18.6.98',\n '172.18.6.99'\n ])\n- assert len(r) == 1\n+ assert len(r) <= 1\n with pytest.raises(ValueError):\n util.get_host_speed_rank(['qq.com'])\n assert util.get_host_speed_rank(timeout=0) == []\n", "old_path": "tests/test_util.py", "rewrite": "ReplaceText(target='<=' @(63,22)->(63,24))"} -{"repo": "https://:@github.com/acorg/dark-matter.git", "hash": "7837baf17ff17925b5a56178358b3ec478635c9b", "diff": "@@ -109,7 +109,7 @@ def main():\n consensus.id = args.id\n elif args.idLambda is not None:\n idLambda = eval(args.idLambda)\n- consensus.id = idLambda(args.id)\n+ consensus.id = idLambda(consensus.id)\n \n print(consensus.toString('fasta'), end='')\n \n", "old_path": "bin/make-consensus.py", "rewrite": "ReplaceText(target='consensus' @(112,32)->(112,36))"} -{"repo": "https://:@github.com/Netflix/security_monkey.git", "hash": "b6356189f8c9e407e4c017bbbf31d8f32aa004a9", "diff": "@@ -122,7 +122,7 @@ class SNSAuditor(Auditor):\n else:\n arn = ARN(princ_aws)\n if arn.error:\n- self.add_issue(3, 'Auditor could not parse ARN', snsitem, notes=entry)\n+ self.add_issue(3, 'Auditor could not parse ARN', snsitem, notes=princ_aws)\n else:\n account_numbers.append(arn.account_number)\n \n", "old_path": "security_monkey/auditors/sns.py", "rewrite": "ReplaceText(target='princ_aws' @(125,88)->(125,93))"} -{"repo": "https://:@github.com/SetBased/py-stratum.git", "hash": "0a4f1f580810e466e6384395832353a77b8e909f", "diff": "@@ -26,7 +26,7 @@ class Connection:\n else:\r\n return_value = config.get(section, option, fallback=fallback)\r\n \r\n- if fallback is not None and return_value is None:\r\n+ if fallback is None and return_value is None:\r\n raise KeyError(\"Option '%s' is not found in section '%s'.\" % (option, section))\r\n \r\n return return_value\r\n", "old_path": "pystratum/Connection.py", "rewrite": "ReplaceText(target=' is ' @(29,19)->(29,27))"} -{"repo": "https://:@github.com/awslabs/aws-service-catalog-puppet-framework.git", "hash": "8ec184735fbc4d8f72484d5baa0e357bbdbeb9d8", "diff": "@@ -85,7 +85,7 @@ def test_deploy_launches_task_builder_for_account_launch_region(sut, mocker, sha\n assert len(actual_all_tasks.keys()) == 1\n assert actual_all_tasks == expected_all_tasks\n mocked_get_required_params.assert_called_once_with(\n- region_name, launch_details.get('portfolio'), launch_details.get('product'), launch_details.get('version'), puppet_account_id\n+ region_name, launch_details.get('portfolio'), launch_details.get('product'), launch_details.get('version'), account_id\n )\n mocked_get_parameters_for_launch.assert_called_once_with(\n required_parameters,\n", "old_path": "servicecatalog_puppet/cli_command_helpers_unit_test.py", "rewrite": "ReplaceText(target='account_id' @(88,116)->(88,133))"} -{"repo": "https://:@github.com/kivy-garden/graph.git", "hash": "b6ec8765b231bfbc1cf0c585243eb43379bb8946", "diff": "@@ -448,7 +448,7 @@ class Graph(Widget):\n ymin = self.ymin\n ymax = self.ymax\n if ylog:\n- xmin = log10(ymin)\n+ ymin = log10(ymin)\n ymax = log10(ymax)\n if len(xpoints):\n top = size[3] if self.x_grid else metrics.dp(12) + size[1]\n", "old_path": "__init__.py", "rewrite": "ReplaceText(target='ymin' @(451,12)->(451,16))"} -{"repo": "https://:@github.com/irmen/synthesizer.git", "hash": "e1da70408c0fce248edc4542e2f94e8ea6ea72b9", "diff": "@@ -31,7 +31,7 @@ class DecodedSoundFile:\n self.sample_format = sample_format # one of the ma_format_ values\n self.sample_format_name = ffi.string(lib.ma_get_format_name(sample_format)).decode()\n self.samples = samples\n- self.num_frames = len(samples) / self.nchannels\n+ self.num_frames = len(samples) // self.nchannels\n self.duration = self.num_frames / self.sample_rate\n \n \n", "old_path": "pyminiaudio/miniaudio.py", "rewrite": "ReplaceText(target='//' @(34,39)->(34,40))"} -{"repo": "https://:@github.com/pydata/numexpr.git", "hash": "d11ef8a9dec059b679e773ad8fa54dd4f462d2e8", "diff": "@@ -304,7 +304,7 @@ class test_numexpr(TestCase):\n assert_equal(res, b)\n a = False\n res = evaluate('where(a, b, c)')\n- assert_equal(res, b)\n+ assert_equal(res, c)\n \n \n \n", "old_path": "numexpr/tests/test_numexpr.py", "rewrite": "ReplaceText(target='c' @(307,26)->(307,27))"} -{"repo": "https://:@github.com/aio-libs/aiozipkin.git", "hash": "73a9594e475a65d11f32ae1ec48d3a324d2cb2b2", "diff": "@@ -23,7 +23,7 @@ class Transport:\n self._queue.append(data)\n \n async def _sender_loop(self):\n- while self._ender.done():\n+ while not self._ender.done():\n if len(self._queue) != 0:\n await self._send()\n \n", "old_path": "aiozipkin/transport.py", "rewrite": "ReplaceText(target='not ' @(26,14)->(26,14))"} -{"repo": "https://:@gitlab.com/deliberist/xdgenvpy.git", "hash": "cce7b99c90cd770aee31195f98e23169405d31c2", "diff": "@@ -96,7 +96,7 @@ def print_vars(xdg, variables):\n :param list variables: A sequence of XDG variables to print.\n \"\"\"\n for var in variables:\n- if not (str(var).startswith('XDG_') or hasattr(xdg, var)):\n+ if not (str(var).startswith('XDG_') and hasattr(xdg, var)):\n LOG.error('Invalid XDG variable: %s', var)\n else:\n value = getattr(xdg, var)\n", "old_path": "xdgenvpy/__main__.py", "rewrite": "ReplaceText(target='and' @(99,44)->(99,46))"} -{"repo": "https://:@github.com/theislab/anndata.git", "hash": "908bbbd7c0ad3e61e7db0441fbe9ec93091a0dd5", "diff": "@@ -850,7 +850,7 @@ class AnnData(IndexMixin):\n categories=ddata[k])\n if k_stripped in var:\n var[k_stripped] = pd.Categorical.from_codes(\n- codes=smp[k_stripped].values,\n+ codes=var[k_stripped].values,\n categories=ddata[k])\n k_to_delete.append(k)\n \n", "old_path": "anndata/anndata.py", "rewrite": "ReplaceText(target='var' @(853,34)->(853,37))"} -{"repo": "https://:@github.com/theislab/anndata.git", "hash": "0c6ad8700a028675f25e6a769aaf39db3f2b8893", "diff": "@@ -104,7 +104,7 @@ def write_loom(\n elif len(adata.obsm.keys()) > 0 or len(adata.varm.keys()) > 0:\n logger.warning(\n f'The loom file will lack these fields:\\n'\n- f'{adata.obsm.keys() + adata.varm.keys()}\\n'\n+ f'{adata.obsm.keys() | adata.varm.keys()}\\n'\n f'Use write_obsm_varm=True to export multi-dimensional annotations'\n )\n \n", "old_path": "anndata/readwrite/write.py", "rewrite": "ReplaceText(target='|' @(107,33)->(107,34))"} -{"repo": "https://:@github.com/atarashansky/self-assembling-manifold.git", "hash": "a8a2172a308d8fb99fc3981e64c1cc358d4d3355", "diff": "@@ -965,7 +965,7 @@ class SAMGUI(object):\n else:\n return; #quit\n \n- markers = ut.find_corr_genes(s,txt).flatten()\n+ markers = ut.find_corr_genes(gene,txt).flatten()\n _,i = np.unique(markers,return_index=True)\n markers=markers[np.sort(i)]\n self.marker_genes[self.stab.selected_index] = markers\n", "old_path": "SAMGUI.py", "rewrite": "ReplaceText(target='gene' @(968,37)->(968,38))"} -{"repo": "https://:@github.com/atarashansky/self-assembling-manifold.git", "hash": "6539b0d87edc6dd18bd1bd3709fc41ad2c51b3f3", "diff": "@@ -248,7 +248,7 @@ def search_string(vec, s, case_sensitive=False, invert=False):\n i = len(V)\n V = np.concatenate(V); M = np.concatenate(M);\n if i > 1:\n- ix = np.sort(np.unique(V,return_index=True)[1])\n+ ix = np.sort(np.unique(M,return_index=True)[1])\n V=V[ix]; M=M[ix];\n return V,M\n else:\n", "old_path": "samalg/utilities.py", "rewrite": "ReplaceText(target='M' @(251,35)->(251,36))"} -{"repo": "https://:@github.com/den4uk/andriller.git", "hash": "a5af3433a9caa6f05d8d43aef5abc8f405349f67", "diff": "@@ -379,7 +379,7 @@ class MainWindow(BaseWindow):\n self.menubar.add_cascade(menu=menu_help, label='Help', underline=0)\n menu_help.add_command(label='Visit website')\n menu_help.add_separator()\n- if getattr(sys, 'frozen', False):\n+ if not getattr(sys, 'frozen', False):\n menu_help.add_command(label='Run Update', command=lambda: self.conf.upgrade_package(logger=self.logger))\n menu_help.add_separator()\n menu_help.add_command(label='About', command=self.about_msg)\n", "old_path": "andriller/windows.py", "rewrite": "ReplaceText(target='not ' @(382,11)->(382,11))"} -{"repo": "https://:@github.com/fabiencro/knmt.git", "hash": "26b7b1ed8dfbc0e82804e86c149926fc96cd8d84", "diff": "@@ -699,7 +699,7 @@ def do_eval(config_eval):\n assert len(encdec_list) == 1\n scorer = encdec_list[0].nbest_scorer(src_batch, src_mask)\n \n- nb_batches = (len(tgt_list) + mb_size - 1) / mb_size\n+ nb_batches = (len(tgt_list) + mb_size - 1) // mb_size\n for num_batch in six.moves.range(nb_batches):\n tgt_batch, arg_sort = utils.make_batch_tgt(tgt_list[num_batch * nb_batches: (num_batch + 1) * nb_batches],\n eos_idx=eos_idx, gpu=gpu, volatile=\"on\", need_arg_sort=True)\n", "old_path": "nmt_chainer/translation/eval.py", "rewrite": "ReplaceText(target='//' @(702,55)->(702,56))"} -{"repo": "https://:@github.com/fabiencro/knmt.git", "hash": "8ca17b7d3b52100a3c36ae7a380efbf0ce42107d", "diff": "@@ -699,7 +699,7 @@ def do_eval(config_eval):\n assert len(encdec_list) == 1\n scorer = encdec_list[0].nbest_scorer(src_batch, src_mask)\n \n- nb_batches = (len(tgt_list) + mb_size - 1) / mb_size\n+ nb_batches = (len(tgt_list) + mb_size - 1) // mb_size\n for num_batch in six.moves.range(nb_batches):\n tgt_batch, arg_sort = utils.make_batch_tgt(tgt_list[num_batch * nb_batches: (num_batch + 1) * nb_batches],\n eos_idx=eos_idx, gpu=gpu, volatile=\"on\", need_arg_sort=True)\n", "old_path": "nmt_chainer/translation/eval.py", "rewrite": "ReplaceText(target='//' @(702,55)->(702,56))"} -{"repo": "https://:@github.com/fabiencro/knmt.git", "hash": "b091633d528161ceba3b63c501774627a2c927aa", "diff": "@@ -1127,7 +1127,7 @@ def build_dataset_one_side_pp(src_fn, src_pp, max_nb_ex=None, make_constraints=N\n # print(len(sentence_tgt), len(sentence_src))\n seq_src = src_pp.convert(sentence_src, stats=stats_src)\n if make_constraints is not None:\n- constraints_fn = make_constraints(src, seq_src)\n+ constraints_fn = make_constraints(sentence_src, seq_src)\n constraints_list.append(constraints_fn)\n res.append(seq_src)\n if make_constraints is not None:\n", "old_path": "nmt_chainer/dataprocessing/processors.py", "rewrite": "ReplaceText(target='sentence_src' @(1130,46)->(1130,49))"} -{"repo": "https://:@github.com/biocore/emperor.git", "hash": "dedef9ab8d8578dd9d8d002dfa2dde254f27b133", "diff": "@@ -100,7 +100,7 @@ def main():\n sids_intersection = len(set(zip(*mapping_data)[0]) & set(parsed_coords[0]))\n \n # sample ids must be shared between files\n- if sids_intersection > 0:\n+ if sids_intersection <= 0:\n option_parser.error('The sample identifiers in the coordinates file '\n 'must have at least one match with the data contained in mapping '\n 'file. Verify you are using a coordinates file and a mapping file '\n", "old_path": "scripts/make_emperor.py", "rewrite": "ReplaceText(target='<=' @(103,25)->(103,26))"} -{"repo": "https://:@github.com/juanpex/django-model-report.git", "hash": "0aa6d98497f25d178fe48ed9185b77e8d62e722b", "diff": "@@ -58,7 +58,7 @@ class ExcelExporter(Exporter):\n \n for g, rows in report_rows:\n if g:\n- sheet1.write(row_index, 0, u'%s' % x, stylebold)\n+ sheet1.write(row_index, 0, u'%s' % g, stylebold)\n row_index += 1\n for row in list(rows):\n if row.is_value():\n", "old_path": "model_report/exporters/excel.py", "rewrite": "ReplaceText(target='g' @(61,51)->(61,52))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "a969c471f3d255e9cd139c100ac942c441c51aa0", "diff": "@@ -120,7 +120,7 @@ def difficulty(c):\n \n time_now = time.time()\n if time_now > timestamp_last + 300: #if 5 minutes have passed\n- difficulty2 = percentage(97,diff_block_previous)\n+ difficulty2 = percentage(97,difficulty)\n else:\n difficulty2 = difficulty\n \n", "old_path": "gui.py", "rewrite": "ReplaceText(target='difficulty' @(123,36)->(123,55))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "75e47ec06ac2c83df3fbe413086393d265f27f1c", "diff": "@@ -1097,7 +1097,7 @@ def manager(c, conn):\n app_log.warning(\"Only {} connections active, resetting the connection history\".format(len(connection_pool)))\r\n del tried[:]\r\n \r\n- if nodes_ban_reset and len(connection_pool) < len(banlist) and int(time.time() - reset_time) > 60*10: #do not reset too often. 10 minutes here\r\n+ if nodes_ban_reset and len(connection_pool) <= len(banlist) and int(time.time() - reset_time) > 60*10: #do not reset too often. 10 minutes here\r\n app_log.warning(\"Less active connections ({}) than banlist ({}), resetting banlist and tried\" .format(len(connection_pool), len(banlist)))\r\n del banlist[:]\r\n banlist.extend(config.banlist) # reset to config version\r\n", "old_path": "node.py", "rewrite": "ReplaceText(target='<=' @(1100,52)->(1100,53))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "34d72e31b605ce74fc26bd9dac9cedd0c659d5b0", "diff": "@@ -204,7 +204,7 @@ class MainHandler(tornado.web.RequestHandler):\n html.append(\"\")\n \n html.append(\"\")\n- html.append(\"\".format(transferred_total))\n+ html.append(\"\".format(data_total))\n html.append(\"\".format(tx_count))\n html.append(\"\".format(tx_count/500))\n html.append(\"\".format(transferred_total))\n", "old_path": "ledger_explorer.py", "rewrite": "ReplaceText(target='data_total' @(207,77)->(207,94))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "e6dd78e38707d04ea401ef86960e9deb08ea59b7", "diff": "@@ -520,7 +520,7 @@ def difficulty(c, mode):\n block_height = int(result[0])\r\n timestamp_before_last = Decimal(c.fetchone()[1])\r\n \r\n- if block_height > 427000: #remove code ABOVE after hf\r\n+ if block_height >= 427000: #remove code ABOVE after hf\r\n execute(c, \"SELECT * FROM transactions WHERE reward != 0 ORDER BY block_height DESC LIMIT 2\")\r\n result = c.fetchone()\r\n timestamp_last = Decimal(result[1])\r\n", "old_path": "node.py", "rewrite": "ReplaceText(target='>=' @(523,20)->(523,21))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "01139c3f9457e2c4dbe7e143c47aa8475f7433cc", "diff": "@@ -9,7 +9,7 @@ def keys_load(privkey_file, pubkey_file):\n pubkey_loaded = open(pubkey_file, 'rb').read()\n pubkey = VerifyingKey.from_string(pubkey_loaded, curve=SECP256k1)\n \n- address = blake2b(privkey.to_string(), digest_size=20).hexdigest()\n+ address = blake2b(pubkey.to_string(), digest_size=20).hexdigest()\n \n return privkey, pubkey, address\n \n", "old_path": "bisecdsa.py", "rewrite": "ReplaceText(target='pubkey' @(12,22)->(12,29))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "b4f1e59d63db962b8f674dc2f4e6e0df34e8404d", "diff": "@@ -9,7 +9,7 @@ def keys_load(privkey_file, pubkey_file):\n pubkey_loaded = open(pubkey_file, 'rb').read()\n pubkey = VerifyingKey.from_string(pubkey_loaded, curve=SECP256k1)\n \n- address = blake2b(pubkey.to_string(), digest_size=20).hexdigest()\n+ address = blake2b(privkey.to_string(), digest_size=20).hexdigest()\n \n return privkey, pubkey, address\n \n", "old_path": "bisecdsa.py", "rewrite": "ReplaceText(target='privkey' @(12,22)->(12,28))"} -{"repo": "https://:@github.com/hclivess/Bismuth.git", "hash": "081200edc97ae9d5e35156d634037844835c7205", "diff": "@@ -1192,7 +1192,7 @@ def digest_block(data, sdef, peer_ip, conn, c, hdd, h, hdd2, h2, h3, index, inde\n \r\n # if (q_time_now < q_received_timestamp + 432000) and not quicksync:\r\n # balance_pre = quantize_eight(credit_ledger - debit_ledger - fees + rewards) # without projection\r\n- balance_pre = ledger_balance3(db_address, h2, balances)\r\n+ balance_pre = ledger_balance3(db_address, c, balances)\r\n # balance = quantize_eight(credit - debit - fees + rewards)\r\n balance = quantize_eight(balance_pre - block_debit_address)\r\n # app_log.info(\"Digest: Projected transaction address balance: \" + str(balance))\r\n", "old_path": "node.py", "rewrite": "ReplaceText(target='c' @(1195,62)->(1195,64))"} -{"repo": "https://:@github.com/RDCH106/parallel_foreach_submodule.git", "hash": "714ddc620894fbc6fefac093fe9323a9429f85a8", "diff": "@@ -23,7 +23,7 @@ class PFSProcess(object):\n if self.__output_filter == \"\":\n self.__output += self.__p.communicate()[0].decode('utf-8') # stdoutdata\n else:\n- if str(self.__p.communicate()[0].decode('utf-8')).find(self.__output_filter) != -1:\n+ if str(self.__p.communicate()[0].decode('utf-8')).find(self.__output_filter) == -1:\n self.__output += self.__p.communicate()[0].decode('utf-8')\n \n if self.__p.communicate()[1]: # stderrdata\n", "old_path": "parallelforeachsubmodule/process.py", "rewrite": "ReplaceText(target='==' @(26,89)->(26,91))"} -{"repo": "https://:@github.com/rsokl/noggin.git", "hash": "2f9ec33b6807cf8ff00169a284a2e1c3a77db137", "diff": "@@ -71,7 +71,7 @@ class LivePlot(LiveLogger):\n if (\n not isinstance(size, Sequence)\n or len(size) != 2\n- or not all(isinstance(x, Real) and x >= 0 for x in size)\n+ or not all(isinstance(x, Real) and x > 0 for x in size)\n ):\n raise ValueError(\n f\"`size` must be a length-2 sequence of \"\n", "old_path": "src/liveplot/plotter.py", "rewrite": "ReplaceText(target='>' @(74,49)->(74,51))"} -{"repo": "https://:@github.com/ome/ome-model.git", "hash": "99bf44c7c5f8661d4c073b98dcafa980abd44920", "diff": "@@ -366,5 +366,5 @@ class OMEModel(object):\n substitutionGroupName = self.opts.lang.substitutionGroup(element.getName())\n self.substitutionElement_map[substitutionGroupName] = element\n continue\n- if len(self.opts.lang.getSubstitutionTypes()) >= 0:\n+ if len(self.opts.lang.getSubstitutionTypes()) > 0:\n config.METADATA_OBJECT_IGNORE.remove('BinData')\n", "old_path": "components/xsd-fu/python/ome/modeltools/model.py", "rewrite": "ReplaceText(target='>' @(369,54)->(369,56))"} -{"repo": "https://:@github.com/ome/ome-model.git", "hash": "49d212302bd30541e55ef64409b14377b069cd3a", "diff": "@@ -135,7 +135,7 @@ class Image(object):\n assert (len(self.data[\"Channels\"]) <= sizeC), str(self.data)\n channel_samples = sum([int(x.data['SamplesPerPixel'])\n for x in self.data[\"Channels\"]])\n- assert channel_samples < sizeC, str(self.data)\n+ assert channel_samples <= sizeC, str(self.data)\n return self.data\n \n \n", "old_path": "ome_model/experimental.py", "rewrite": "ReplaceText(target='<=' @(138,31)->(138,32))"} -{"repo": "https://:@github.com/uber/causalml.git", "hash": "3c085167f8fbf6a07ef53ad84f36682e015ff320", "diff": "@@ -966,7 +966,7 @@ class UpliftTreeClassifier:\n rightNodeSummary = self.tree_node_summary(w_r, y_r,\n min_samples_treatment=min_samples_treatment,\n n_reg=n_reg,\n- parentNodeSummary=parentNodeSummary)\n+ parentNodeSummary=currentNodeSummary)\n \n # check the split validity on min_samples_treatment\n if set(leftNodeSummary.keys()) != set(rightNodeSummary.keys()):\n", "old_path": "causalml/inference/tree/models.py", "rewrite": "ReplaceText(target='currentNodeSummary' @(969,76)->(969,93))"} -{"repo": "https://:@github.com/pypa/setuptools_scm.git", "hash": "3e2ee4c2c77900f2d20241f489a670f7cb512e98", "diff": "@@ -77,7 +77,7 @@ def test_version_from_hg_id(tmpdir, get_log_version):\n hg('add test.txt', cwd)\n hg('commit -m commit -u test -d \"0 0\"', cwd)\n \n- after_first_commit = get_log_version(tmpdir)\n+ after_first_commit = get_log_version(cwd)\n \n assert after_first_commit.startswith('0.0.post1-')\n \n", "old_path": "test_hgdistver.py", "rewrite": "ReplaceText(target='cwd' @(80,41)->(80,47))"} -{"repo": "https://:@github.com/pypa/setuptools_scm.git", "hash": "340b2356e8ab2e6525ef1a07d17155db2788ed50", "diff": "@@ -50,6 +50,6 @@ def scm_find_files(path, scm_files, scm_dirs):\n # dirpath + filename with symlinks preserved\n fullfilename = os.path.join(dirpath, filename)\n if os.path.normcase(os.path.realpath(fullfilename)) in scm_files:\n- res.append(os.path.join(path, os.path.relpath(fullfilename, path)))\n+ res.append(os.path.join(path, os.path.relpath(fullfilename, realpath)))\n seen.add(realdirpath)\n return res\n", "old_path": "src/setuptools_scm/file_finder.py", "rewrite": "ReplaceText(target='realpath' @(53,76)->(53,80))"} -{"repo": "https://:@github.com/alphaomega-technology/Equation.git", "hash": "66e92f5b6ab584b7e7ac3bb7c328ff4ea410f88e", "diff": "@@ -600,7 +600,7 @@ class Expression( object ):\n continue\n fs = self.__getfunction(op)\n while True:\n- if (fn['prec'] <= fs['prec']):\n+ if (fn['prec'] >= fs['prec']):\n self.__expr.append(ExpressionFunction(fs['func'],fs['args'],fs['str'],fs['latex'],op[0],False))\n if len(stack) == 0:\n stack.append(v)\n", "old_path": "Equation/core.py", "rewrite": "ReplaceText(target='>=' @(603,35)->(603,37))"} -{"repo": "https://:@github.com/Azure/azure-uamqp-python.git", "hash": "29706fc2599f09f186f85fd15bf243b5ed60477f", "diff": "@@ -499,7 +499,7 @@ class SendClient(AMQPClient):\n message.state = constants.MessageState.SendComplete\n message._response = errors.MessageAlreadySettled() # pylint: disable=protected-access\n if message.on_send_complete:\n- message.on_send_complete(result, delivery_state)\n+ message.on_send_complete(result, exception)\n \n def _filter_pending(self, message):\n if message.state in constants.DONE_STATES:\n", "old_path": "uamqp/client.py", "rewrite": "ReplaceText(target='exception' @(502,45)->(502,59))"} -{"repo": "https://:@github.com/MITHaystack/digital_rf.git", "hash": "fe9ab29c4bc9584474f264516130c1c92b43e0d3", "diff": "@@ -418,7 +418,7 @@ class Thor(object):\n # set master clock rate\n clock_rate = op.clock_rates[mb_num]\n if clock_rate is not None:\n- op.set_clock_rate(clock_rate, mb_num)\n+ u.set_clock_rate(clock_rate, mb_num)\n op.clock_rates[mb_num] = u.get_clock_rate(mb_num)\n \n # set clock source\n", "old_path": "python/tools/thor.py", "rewrite": "ReplaceText(target='u' @(421,16)->(421,18))"} -{"repo": "https://:@github.com/rm-hull/luma.core.git", "hash": "dca2765dc5f02941a5f5668ed65f60650a95d929", "diff": "@@ -40,7 +40,7 @@ def show_message(device, msg, y_offset=0, fill=None, font=None, scroll_delay=0.0\n text(draw, (x, y_offset), msg, font=font, fill=fill)\n \n i = 0\n- while i < w + x:\n+ while i <= w + x:\n virtual.set_position((i, 0))\n regulator.sleep()\n i += 1\n", "old_path": "luma/core/legacy/__init__.py", "rewrite": "ReplaceText(target='<=' @(43,12)->(43,13))"} -{"repo": "https://:@github.com/gforcada/flake8-builtins.git", "hash": "da932110850fae82bdc56cb2e5b5fed2ff228e3c", "diff": "@@ -211,7 +211,7 @@ class BuiltinsChecker(object):\n if not message:\n message = self.assign_msg\n if not variable:\n- column = statement.id\n+ variable = statement.id\n if not line:\n line = statement.lineno\n if not column:\n", "old_path": "flake8_builtins.py", "rewrite": "ReplaceText(target='variable' @(214,12)->(214,18))"} -{"repo": "https://:@github.com/European-XFEL/h5glance.git", "hash": "23bcd02f8a36c9fd1f623e6627a7d6960669e06c", "diff": "@@ -157,7 +157,7 @@ class TreeViewBuilder:\n if obj.id.get_create_plist().get_layout() == h5py.h5d.VIRTUAL:\n detail += ' virtual'\n elif isinstance(obj, h5py.Group):\n- if max_depth > 1:\n+ if max_depth >= 1:\n children += [self.group_item_node(obj, key, max_depth - 1)\n for key in obj]\n else:\n", "old_path": "h5glance/terminal.py", "rewrite": "ReplaceText(target='>=' @(160,25)->(160,26))"} -{"repo": "https://:@github.com/camptocamp/c2cgeoform.git", "hash": "98126ec7859b1bc5b1b2b720fea1c5d5ca9bbbef", "diff": "@@ -224,7 +224,7 @@ class AbstractViews():\n if field.id() == sort:\n criterion = field.sort_column()\n if order == 'desc':\n- criterion = desc(sort)\n+ criterion = desc(criterion)\n criteria.append(criterion)\n \n # Sort on primary key as subqueryload with limit need deterministic order\n", "old_path": "c2cgeoform/views/abstract_views.py", "rewrite": "ReplaceText(target='criterion' @(227,37)->(227,41))"} -{"repo": "https://:@github.com/HumanCellAtlas/data-store.git", "hash": "a28a6a38433fa3ead01ba5bd7e9289caf9c905b0", "diff": "@@ -114,7 +114,7 @@ def _verify_checkout(\n ) -> typing.Tuple[str, bool]:\n decoded_token: dict\n if token is None:\n- execution_id = start_file_checkout(blob_path, replica)\n+ execution_id = start_file_checkout(replica, blob_path)\n start_time = time.time()\n attempts = 0\n \n", "old_path": "dss/api/files.py", "rewrite": "ArgSwap(idxs=0<->1 @(117,23)->(117,42))"} -{"repo": "https://:@github.com/HumanCellAtlas/data-store.git", "hash": "6ab718c4aef36abe12b10556e27d5943176f7314", "diff": "@@ -53,7 +53,7 @@ class ElasticsearchIndexBackend(IndexBackend):\n tombstone_doc = BundleTombstoneDocument.from_tombstone(tombstone)\n modified, index_name = doc.entomb(tombstone_doc, dryrun=self.dryrun)\n if self.notify or modified and self.notify is None:\n- self._notify(doc, index_name)\n+ self._notify(tombstone_doc, index_name)\n \n def _notify(self, bundle, index_name):\n subscription_ids = self._find_matching_subscriptions(bundle, index_name)\n", "old_path": "dss/index/es/backend.py", "rewrite": "ReplaceText(target='tombstone_doc' @(56,25)->(56,28))"} -{"repo": "https://:@github.com/oemof/tespy.git", "hash": "b6c36317886f435ae4dda9a8459788fabbfe85a8", "diff": "@@ -330,7 +330,7 @@ class bus:\n 'This bus accepts components of type ' +\n str(type(c).__bases__[0]) + '.')\n raise TypeError(msg)\n- return False\n+ return True\n return True\n \n \n", "old_path": "tespy/connections.py", "rewrite": "ReplaceText(target='True' @(333,23)->(333,28))"} -{"repo": "https://:@github.com/oemof/tespy.git", "hash": "d69bd568bde4209be5aff37328ca422171ce3467", "diff": "@@ -1318,7 +1318,7 @@ class separator(node):\n res = x * self.inl[0].m.val_SI\n for o in self.outl:\n res -= o.fluid.val[fluid] * o.m.val_SI\n- self.vec_res[k] += res\n+ self.vec_res[k] = res\n k += 1\n \n ######################################################################\n", "old_path": "tespy/components/nodes.py", "rewrite": "ReplaceText(target='=' @(1321,28)->(1321,30))"} -{"repo": "https://:@github.com/uber/tchannel-python.git", "hash": "867364eea67d8da34f5f84a2d9fa02203f02aa95", "diff": "@@ -222,7 +222,7 @@ class TChannelClientOperation(object):\n \n message = CallRequestMessage(\n service=self.service,\n- args=[safebytes(arg_1), arg_3, arg_3],\n+ args=[safebytes(arg_1), arg_2, arg_3],\n )\n \n response_future = peer_connection.send(message, message_id)\n", "old_path": "tchannel/tornado/tchannel.py", "rewrite": "ReplaceText(target='arg_2' @(225,36)->(225,41))"} -{"repo": "https://:@github.com/arrrlo/Google-Images-Search.git", "hash": "26df6441928bc8d69224fe7bf5fc52741a3404a7", "diff": "@@ -109,7 +109,7 @@ class FetchResizeSave(object):\n for i, page in enumerate(range(start, end, IMAGES_NUM_LIMIT)):\n start = page+1\n \n- if self._number_of_images > IMAGES_NUM_LIMIT*(i+1):\n+ if self._number_of_images >= IMAGES_NUM_LIMIT*(i+1):\n num = IMAGES_NUM_LIMIT\n else:\n num = (self._number_of_images % IMAGES_NUM_LIMIT) or \\\n", "old_path": "google_images_search/fetch_resize_save.py", "rewrite": "ReplaceText(target='>=' @(112,38)->(112,39))"} -{"repo": "https://:@github.com/Parsl/parsl.git", "hash": "794ea182f61a9626a84aa58be11952c8bb148ccd", "diff": "@@ -278,7 +278,7 @@ class EC2Provider(ExecutionProvider):\n \n try:\n with open(credfile, 'r') as f:\n- creds = json.load(credfile)\n+ creds = json.load(f)\n except json.JSONDecodeError as e:\n logger.error(\n \"Site[{0}]: Json decode error in credential file {1}\".format(self, credfile)\n", "old_path": "libsubmit/providers/aws/aws.py", "rewrite": "ReplaceText(target='f' @(281,38)->(281,46))"} -{"repo": "https://:@github.com/Parsl/parsl.git", "hash": "547ef33559003eddb8206bb01d9bbc22bc07aba7", "diff": "@@ -83,7 +83,7 @@ def update_config(config, rundir):\n \"maxThreads\": 8\n }\n }\n- config[\"sites\"].append(data_manager_site)\n+ config_base[\"sites\"].append(data_manager_site)\n \n # Update the config datastructure\n _config = copy.deepcopy(config)\n", "old_path": "parsl/dataflow/config_defaults.py", "rewrite": "ReplaceText(target='config_base' @(86,4)->(86,10))"} -{"repo": "https://:@github.com/Parsl/parsl.git", "hash": "be25fe238b3269947cd6c882dfba88a147304937", "diff": "@@ -76,6 +76,6 @@ class PythonApp(AppBase):\n fn_hash=self.func_hash,\n cache=self.cache,\n ignore_for_cache=self.ignore_for_cache,\n- app_kwargs=kwargs)\n+ app_kwargs=invocation_kwargs)\n \n return app_fut\n", "old_path": "parsl/app/python.py", "rewrite": "ReplaceText(target='invocation_kwargs' @(79,40)->(79,46))"} -{"repo": "https://:@github.com/qutang/padar.git", "hash": "afb839dec2306e76355a03bc5b5602838e1a9201", "diff": "@@ -63,7 +63,7 @@ class OrientationFeatureComputer(SensorProcessor):\n ]\n \n windows = mw.get_sliding_window_boundaries(start_time=st, stop_time=et, window_duration=ws, step_size=ss)\n- chunk_windows_mask = (windows[:,0] >= data_start_indicator) & (windows[:,0] <= data_stop_indicator)\n+ chunk_windows_mask = (windows[:,0] >= data_start_indicator) & (windows[:,0] < data_stop_indicator)\n chunk_windows = windows[chunk_windows_mask,:]\n if len(chunk_windows) == 0:\n return pd.DataFrame()\n", "old_path": "mhealth/scripts/OrientationFeatureComputer.py", "rewrite": "ReplaceText(target='<' @(66,84)->(66,86))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "a4c290a333b51772ecb0b9184506596d49183690", "diff": "@@ -22,7 +22,7 @@ class Drawing:\n self.encoding = 'cp1252' # read/write\r\n self.filename = None # read/write\r\n self.entitydb = EntityDB()\r\n- self.sections = Sections(self, tagreader)\r\n+ self.sections = Sections(tagreader, self)\r\n self._dxfversion = self.header['$ACADVER']\r\n self.encoding = self._get_encoding()\r\n nexthandle = int(self.header.get('$HANDSEED', '500'), 16)\r\n", "old_path": "ezdxf/drawing.py", "rewrite": "ArgSwap(idxs=0<->1 @(25,24)->(25,32))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "d2bcbe493b5300e97913a1a13772a19547436239", "diff": "@@ -212,7 +212,7 @@ class GroupCollection(ObjectCollection):\n raise DXFTypeError(group.dxftype())\n \n if name in self:\n- super().delete(group)\n+ super().delete(name)\n else:\n raise DXFValueError(\"GROUP not in group table registered.\")\n \n", "old_path": "ezdxf/entities/dxfgroups.py", "rewrite": "ReplaceText(target='name' @(215,27)->(215,32))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "f6517755bbaeb24096de1f6fb8294b36c21cb769", "diff": "@@ -116,7 +116,7 @@ class Face3d(_Base):\n \n def set_edge_visibilty(self, num, status=False):\n \"\"\" Set visibility of edge `num`, status `True` for visible, status `False` for invisible. \"\"\"\n- if status:\n+ if not status:\n self.dxf.invisible = self.dxf.invisible | (1 << num)\n else:\n self.dxf.invisible = self.dxf.invisible & ~(1 << num)\n", "old_path": "src/ezdxf/entities/solid.py", "rewrite": "ReplaceText(target='not ' @(119,11)->(119,11))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "516fbb01d55b9dc86b20b3d2263496560ad74415", "diff": "@@ -195,7 +195,7 @@ def virtual_block_reference_entities(block_ref: 'Insert',\n \n if block_ref.has_uniform_scaling and xscale < 0:\n # handle reflection about all three axis -x, -y, -z explicit as non uniform scaling\n- has_non_uniform_scaling = True\n+ has_non_uniform_scaling = False\n \n if uniform_scaling_factor is not None:\n uniform_scaling_factor = float(uniform_scaling_factor)\n", "old_path": "src/ezdxf/explode.py", "rewrite": "ReplaceText(target='False' @(198,38)->(198,42))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "ba0c909bdfc0c64d4909b15c9e12a54b9a36d7a4", "diff": "@@ -264,7 +264,7 @@ class Frontend:\n last_vertex = end\n \n if vertices:\n- if last_vertex.isclose(vertices[0]):\n+ if not last_vertex.isclose(vertices[0]):\n vertices.append(last_vertex)\n self.out.draw_filled_polygon(vertices, properties)\n \n", "old_path": "src/ezdxf/addons/drawing/frontend.py", "rewrite": "ReplaceText(target='not ' @(267,19)->(267,19))"} -{"repo": "https://:@github.com/mozman/ezdxf.git", "hash": "637cf54b973fb9bda6e4b0612b439ee69f04cf15", "diff": "@@ -184,7 +184,7 @@ def has_clockwise_orientation(vertices: Iterable['Vertex']) -> bool:\n return sum(\n (p2.x - p1.x) * (p2.y + p1.y)\n for p1, p2 in zip(vertices, vertices[1:])\n- ) < 0\n+ ) > 0\n \n \n def enclosing_angles(angle, start_angle, end_angle, ccw=True,\n", "old_path": "src/ezdxf/math/construct2d.py", "rewrite": "ReplaceText(target='>' @(187,6)->(187,7))"} -{"repo": "https://:@github.com/Parsely/pykafka.git", "hash": "676b3119ff9f4cd2a5bebf1ee0e3e52071cd65af", "diff": "@@ -198,7 +198,7 @@ class Producer():\n else:\n key, value = message\n value = str(value)\n- yield (key, value), self._partitioner(partitions, message).id\n+ yield (key, value), self._partitioner(partitions, key).id\n \n def _produce(self, message_partition_tups, attempt):\n \"\"\"Publish a set of messages to relevant brokers.\n", "old_path": "pykafka/producer.py", "rewrite": "ReplaceText(target='key' @(201,62)->(201,69))"} -{"repo": "https://:@github.com/Parsely/pykafka.git", "hash": "559679443462fa62b4378453c5dfff14df85654f", "diff": "@@ -816,7 +816,7 @@ class OwnedPartition(object):\n :type messages: Iterable of :class:`pykafka.common.Message`\n \"\"\"\n for message in messages:\n- if message.offset < self.last_offset_consumed:\n+ if message.offset <= self.last_offset_consumed:\n log.debug(\"Skipping enqueue for offset (%s) \"\n \"less than last_offset_consumed (%s)\",\n message.offset, self.last_offset_consumed)\n", "old_path": "pykafka/simpleconsumer.py", "rewrite": "ReplaceText(target='<=' @(819,30)->(819,31))"} -{"repo": "https://:@github.com/Parsely/pykafka.git", "hash": "e515296f6b130acb930ddc9f97e84a7997aedb2f", "diff": "@@ -137,7 +137,7 @@ class ProducerIntegrationTests(unittest2.TestCase):\n start = time.time()\n producer.produce(uuid4().bytes)\n producer.produce(uuid4().bytes)\n- self.assertTrue(int(time.time() - start) > int(linger))\n+ self.assertTrue(int(time.time() - start) >= int(linger))\n self.consumer.consume()\n self.consumer.consume()\n \n", "old_path": "tests/pykafka/test_producer.py", "rewrite": "ReplaceText(target='>=' @(140,49)->(140,50))"} -{"repo": "https://:@github.com/Parsely/pykafka.git", "hash": "ad8f2d457b8ca3b7dc7a75360f00becd7f0484a4", "diff": "@@ -595,7 +595,7 @@ class OwnedBroker(object):\n # bind the MessageSizeTooLarge error the delivery\n # report and remove it from the producer queue\n message = self.queue.pop()\n- self._delivery_reports.put(peeked_message, exc=exc)\n+ self._delivery_reports.put(message, exc=exc)\n # remove from pending message count\n self.increment_messages_pending(-1)\n continue\n", "old_path": "pykafka/producer.py", "rewrite": "ReplaceText(target='message' @(598,51)->(598,65))"} -{"repo": "https://:@github.com/Parsely/pykafka.git", "hash": "217865b12c58addc95c419f159b477bc5636c6a9", "diff": "@@ -594,7 +594,7 @@ class SimpleConsumer(object):\n to_retry = [pair for err in itervalues(parts_by_error) for pair in err]\n reqs = [p.build_offset_fetch_request() for p, _ in to_retry]\n \n- if len(parts_by_error) > 1:\n+ if len(parts_by_error) > 0:\n raise KafkaException(parts_by_error)\n \n def reset_offsets(self, partition_offsets=None):\n", "old_path": "pykafka/simpleconsumer.py", "rewrite": "ReplaceText(target='0' @(597,33)->(597,34))"} -{"repo": "https://:@github.com/Timidger/Wikia.git", "hash": "ff74a5711925274af13738f4b588a46356a1fa98", "diff": "@@ -395,7 +395,7 @@ class WikiaPage(object):\n # Remove the /revision/ fluff after the image url\n image = image.partition(\"/revision/\")[0]\n image_type = mimetypes.guess_type(image)[0]\n- if image_type is None:\n+ if image_type is not None:\n image_type = \".\" + image_type.split(\"/\")[-1]\n else:\n image_type = \".png\" # in case mimetypes.guess cant find it it will return None\n", "old_path": "wikia/wikia.py", "rewrite": "ReplaceText(target=' is not ' @(398,23)->(398,27))"} -{"repo": "https://:@github.com/meetshah1995/pytorch-semseg.git", "hash": "81997cd5af36759773a67b11cf148d3876b13a69", "diff": "@@ -156,7 +156,7 @@ def train(cfg, writer, logger):\n labels_val = labels_val.to(device)\n \n outputs = model(images_val)\n- val_loss = loss_fn(input=outputs, target=labels)\n+ val_loss = loss_fn(input=outputs, target=labels_val)\n \n pred = outputs.data.max(1)[1].cpu().numpy()\n gt = labels_val.data.cpu().numpy()\n", "old_path": "train.py", "rewrite": "ReplaceText(target='labels_val' @(159,65)->(159,71))"} -{"repo": "https://:@github.com/meetshah1995/pytorch-semseg.git", "hash": "801fb200547caa5b0d91b8dde56b837da029f746", "diff": "@@ -27,7 +27,7 @@ def multi_scale_cross_entropy2d(input, target, weight=None, size_average=True, s\n n_inp = len(input)\n scale = 0.4\n scale_weight = torch.pow(scale * torch.ones(n_inp), torch.arange(n_inp).float()).to(\n- input.device\n+ target.device\n )\n \n loss = 0.0\n", "old_path": "ptsemseg/loss/loss.py", "rewrite": "ReplaceText(target='target' @(30,12)->(30,17))"} -{"repo": "https://:@github.com/bhmm/bhmm.git", "hash": "34f1e00dc49a99094b5c492381d9f711e96fc4d9", "diff": "@@ -192,7 +192,7 @@ def estimate_initial_hmm(observations, nstates, reversible=True, eps_A=None, eps\n # does the count matrix too few closed sets to give nstates metastable states? Then we need a prior\n if len(_tmatrix_disconnected.closed_sets(C)) < nstates:\n msm_prior = 0.001\n- B = msm_prior * np.eye(C_full.shape[0]) # diagonal prior\n+ B = msm_prior * np.eye(C.shape[0]) # diagonal prior\n B += msmtools.estimation.prior_neighbor(C, alpha=msm_prior) # neighbor prior\n C_post = C + B # posterior\n P_for_pcca = _tmatrix_disconnected.estimate_P(C_post, reversible=True)\n", "old_path": "bhmm/init/discrete.py", "rewrite": "ReplaceText(target='C' @(195,31)->(195,37))"} -{"repo": "https://:@github.com/rackspace/pyrax.git", "hash": "71a7f1924e2c53a4caac54e2b8eb985c207869c7", "diff": "@@ -220,7 +220,7 @@ class ManagerTest(unittest.TestCase):\n ret = mgr.findall(some_att=\"ok\")\n self.assertTrue(o1 in ret)\n self.assertFalse(o2 in ret)\n- self.assertTrue(o1 in ret)\n+ self.assertTrue(o3 in ret)\n mgr.list = sav\n \n def test_findall_bad_att(self):\n", "old_path": "tests/unit/test_manager.py", "rewrite": "ReplaceText(target='o3' @(223,24)->(223,26))"} -{"repo": "https://:@github.com/deckbsd/glouton-satnogs-data-downloader.git", "hash": "7b3982a3ac4c7ecb086cf6ce504aa766a54f1211", "diff": "@@ -25,7 +25,7 @@ class ObservationRepo:\n \n self.__read_page(r.json(), self.__cmd.start_date, self.__cmd.end_date)\n page += 1\n- params['page'] += str(page)\n+ params['page'] = str(page)\n \n print('\\ndownloading started (Ctrl + F5 to stop)...\\t~( ^o^)~')\n self.__create_workers_and_wait()\n", "old_path": "repositories/observation/observationsRepo.py", "rewrite": "ReplaceText(target='=' @(28,27)->(28,29))"} -{"repo": "https://:@github.com/vmware/pyvcloud.git", "hash": "e250911c7ba7666c42c2fa197f32744424d647ff", "diff": "@@ -121,7 +121,7 @@ class VCA(object):\n #todo: check if vcloud session can be cached as well...\n vCloudSession = self.create_vCloudSession(vdcReference[1])\n if vCloudSession:\n- vcd = VCD(vCloudSession, serviceId, serviceId)\n+ vcd = VCD(vCloudSession, serviceId, vdcId)\n return vcd\n return None\n \n", "old_path": "pyvcloud/vcloudair.py", "rewrite": "ReplaceText(target='vdcId' @(124,52)->(124,61))"} -{"repo": "https://:@github.com/vmware/pyvcloud.git", "hash": "0b7926b141b58afbf94168ac95f1ab3f00f14e71", "diff": "@@ -2129,7 +2129,7 @@ class VDC(object):\n policy_list = []\n for policy_reference in policy_references.VdcComputePolicyReference:\n policy_list.append(policy_reference)\n- return policy_reference\n+ return policy_list\n \n def add_compute_policy(self, href):\n \"\"\"Add a VdcComputePolicy.\n", "old_path": "pyvcloud/vcd/vdc.py", "rewrite": "ReplaceText(target='policy_list' @(2132,15)->(2132,31))"} -{"repo": "https://:@github.com/springer-math/Mathematics-of-Epidemics-on-Networks.git", "hash": "1f069443a464955c87cfa926c0ad8c8ce66bc424", "diff": "@@ -851,7 +851,7 @@ def get_infected_nodes(G, tau, gamma, initial_infecteds=None):\n elif G.has_node(initial_infecteds):\n initial_infecteds=[initial_infecteds]\n H = directed_percolate_network(G, tau, gamma)\n- infected_nodes = _out_component_(G, initial_infecteds)\n+ infected_nodes = _out_component_(H, initial_infecteds)\n return infected_nodes\n \n \n", "old_path": "EoN/simulation.py", "rewrite": "ReplaceText(target='H' @(854,37)->(854,38))"} -{"repo": "https://:@github.com/waipbmtd/python-client.git", "hash": "3d95fa3fb3d85c14d1b92da348b4f2f0b007424b", "diff": "@@ -135,7 +135,7 @@ def show(path):\n def validate_params(ctx, param, value):\n if any(['=' not in item for item in value]):\n raise click.BadParameter('Parameters need to be in format =')\n- return dict([tuple(item.split('=', 1)) for item in param])\n+ return dict([tuple(item.split('=', 1)) for item in value])\n \n \n def validate_inplace(ctx, param, value):\n", "old_path": "coreapi/commandline.py", "rewrite": "ReplaceText(target='value' @(138,55)->(138,60))"} -{"repo": "https://:@github.com/waipbmtd/python-client.git", "hash": "e630971368e28989484272ca7774af385ce3ddd6", "diff": "@@ -436,7 +436,7 @@ def credentials_show():\n @click.option('--auth', metavar=\"AUTH_SCHEME\", help='Auth scheme to apply to the credentials string. Options: \"none\", \"basic\". Default is \"none\".', default='none', type=click.Choice(['none', 'basic']))\n def credentials_add(domain, credentials_string, auth):\n if auth == 'none':\n- header = auth\n+ header = credentials_string\n elif auth == 'basic':\n header = 'Basic ' + b64encode(credentials_string)\n credentials = get_credentials()\n", "old_path": "coreapi/commandline.py", "rewrite": "ReplaceText(target='credentials_string' @(439,17)->(439,21))"} -{"repo": "https://:@github.com/openfisca/openfisca-survey-manager.git", "hash": "b1c6e08ca7ddd546171b5623ce0ae04ed9f597fd", "diff": "@@ -24,7 +24,7 @@ def temporary_store_decorator(config_files_directory = default_config_files_dire\n 'tmp_directory is not set: {!r} in {}'.format(tmp_directory, read_config_file_name)\n assert os.path.isabs(tmp_directory), \\\n 'tmp_directory should be an absolut path: {!r} in {}'.format(tmp_directory, read_config_file_name)\n- if os.path.isdir(tmp_directory):\n+ if not os.path.isdir(tmp_directory):\n 'tmp_directory does not exist: {!r} in {}. Creating it.'.format(tmp_directory, read_config_file_name)\n os.makedirs(tmp_directory)\n \n", "old_path": "openfisca_survey_manager/temporary.py", "rewrite": "ReplaceText(target='not ' @(27,7)->(27,7))"} -{"repo": "https://:@github.com/ARMmbed/yotta.git", "hash": "e948620774774810165b28968ce0324b1f5bb953", "diff": "@@ -329,7 +329,7 @@ def satisfyTarget(name, version_required, working_directory, update_installed=No\n # must rm the old target before continuing\n fsutils.rmRf(target_path)\n \n- if not v and update_installed is None:\n+ if not v and update_installed is not None:\n v = latestSuitableVersion(name, version_required, registry='target')\n \n if not v:\n", "old_path": "yotta/lib/access.py", "rewrite": "ReplaceText(target=' is not ' @(332,33)->(332,37))"} -{"repo": "https://:@github.com/ARMmbed/yotta.git", "hash": "06a9d7e69861044818b5a5de490336f6be65d6f1", "diff": "@@ -371,7 +371,7 @@ def generateTest(**kwargs):\n test_method.__name__ = test_name\n setattr(TestCLITestGenerated, test_name, test_method)\n \n-if not util.canBuildNatively():\n+if util.canBuildNatively():\n forAllReporterTests(generateTest)\n else:\n print('WARNING: skipping test reporter tests (cannot build natively on this platform)')\n", "old_path": "yotta/test/cli/test_test.py", "rewrite": "ReplaceText(target='' @(374,3)->(374,7))"} -{"repo": "https://:@github.com/b1naryth1ef/disco.git", "hash": "bd75deb29adcc42f8de451d51e7dbc02eb360b1e", "diff": "@@ -112,7 +112,7 @@ class Plugin(LoggingClass, PluginDeco):\n \n def register_command(self, func, *args, **kwargs):\n wrapped = functools.partial(self._dispatch, 'command', func)\n- self.commands[func.__name__] = Command(self, func, *args, **kwargs)\n+ self.commands[func.__name__] = Command(self, wrapped, *args, **kwargs)\n \n def destroy(self):\n map(lambda k: k.remove(), self._events)\n", "old_path": "disco/bot/plugin.py", "rewrite": "ReplaceText(target='wrapped' @(115,53)->(115,57))"} -{"repo": "https://:@github.com/b1naryth1ef/disco.git", "hash": "c5848dbe8b66295598b4e6cad1c5ec8f5cc3a5fb", "diff": "@@ -305,7 +305,7 @@ class Channel(SlottedModel, Permissible):\n return\n \n if self.can(self.client.state.me, Permissions.MANAGE_MESSAGES) and len(messages) > 2:\n- for chunk in chunks(messages, 100):\n+ for chunk in chunks(message_ids, 100):\n self.client.api.channels_messages_delete_bulk(self.id, chunk)\n else:\n for msg in messages:\n", "old_path": "disco/types/channel.py", "rewrite": "ReplaceText(target='message_ids' @(308,32)->(308,40))"} -{"repo": "https://:@github.com/yuru-yuri/manga-dl.git", "hash": "5cbcbd37c4f904720d08074241a890851b94a7dd", "diff": "@@ -26,7 +26,7 @@ if __name__ == '__main__':\n if parse_args.cli:\n cli = Cli(args)\n # cli\n- exit(0 if cli.status else 0)\n+ exit(0 if cli.status else 1)\n \n # else run GUI\n app = QApplication(argv)\n", "old_path": "manga.py", "rewrite": "ReplaceText(target='1' @(29,34)->(29,35))"} -{"repo": "https://:@github.com/yuru-yuri/manga-dl.git", "hash": "f10777831c4c128a6f6a9bb1d9903889a43ad1df", "diff": "@@ -44,7 +44,7 @@ class WebDriver:\n driver_path = self._driver_path()\n if not is_file(driver_path):\n self.download_drivder()\n- self.is_win() and chmod(driver_path, 0o755)\n+ self.is_win() or chmod(driver_path, 0o755)\n driver = webdriver.Chrome(executable_path=driver_path)\n driver.set_window_size(500, 600)\n return driver\n", "old_path": "src/base_classes/web_driver.py", "rewrite": "ReplaceText(target='or' @(47,22)->(47,25))"} -{"repo": "https://:@github.com/veg/bioext.git", "hash": "5fbb2b3fb52d1e59b787713f9d9521124cb2f24b", "diff": "@@ -217,7 +217,7 @@ def _translate_gapped(seq, *args, **kwds):\n elif gaps:\n protein += '-' * gaps\n gaps = 0\n- lwr = j\n+ lwr = i\n if gaps:\n protein += '-' * gaps\n else:\n", "old_path": "lib/BioExt/_util.py", "rewrite": "ReplaceText(target='i' @(220,18)->(220,19))"} -{"repo": "https://:@github.com/python-trio/trio.git", "hash": "82253caa8bd59b5b3bbb0ba61d196289c967f838", "diff": "@@ -371,7 +371,7 @@ def test_waitid_eintr():\n sync_wait_reapable(sleeper.pid)\n assert sleeper.wait(timeout=1) == -9\n finally:\n- if sleeper.returncode is not None:\n+ if sleeper.returncode is None:\n sleeper.kill()\n sleeper.wait()\n signal.signal(signal.SIGALRM, old_sigalrm)\n", "old_path": "trio/tests/test_subprocess.py", "rewrite": "ReplaceText(target=' is ' @(374,29)->(374,37))"} -{"repo": "https://:@github.com/python-trio/trio.git", "hash": "94a587f758f0597cd790505ca7bfbec17a247fb1", "diff": "@@ -37,7 +37,7 @@ def test_warn_deprecated(recwarn_always):\n assert \"water instead\" in got.message.args[0]\n assert \"/issues/1\" in got.message.args[0]\n assert got.filename == filename\n- assert got.lineno == lineno + 1\n+ assert got.lineno == lineno - 1\n \n \n def test_warn_deprecated_no_instead_or_issue(recwarn_always):\n", "old_path": "trio/tests/test_deprecate.py", "rewrite": "ReplaceText(target='-' @(40,32)->(40,33))"} -{"repo": "https://:@github.com/python-trio/trio.git", "hash": "8d9effc1d32b8ef2f7a7a02c1b02a4de3f5f8e3d", "diff": "@@ -90,7 +90,7 @@ def ki_protection_enabled(frame):\n if frame.f_code.co_name == \"__del__\":\n return True\n frame = frame.f_back\n- return False\n+ return True\n \n \n def currently_ki_protected():\n", "old_path": "trio/_core/_ki.py", "rewrite": "ReplaceText(target='True' @(93,11)->(93,16))"} -{"repo": "https://:@github.com/tkrajina/srtm.py.git", "hash": "b1e1c673b613780c6a7151ab3db53461e2b668c7", "diff": "@@ -187,7 +187,7 @@ class GeoElevationData:\n for row in range(height):\n for column in range(width):\n latitude = latitude_from + float(row) / height * (latitude_to - latitude_from)\n- longitude = longitude_from + float(column) / height * (longitude_to - longitude_from)\n+ longitude = longitude_from + float(column) / width * (longitude_to - longitude_from)\n elevation = self.get_elevation(latitude, longitude)\n array[row,column] = elevation\n \n", "old_path": "srtm/data.py", "rewrite": "ReplaceText(target='width' @(190,65)->(190,71))"} -{"repo": "https://:@github.com/tkrajina/srtm.py.git", "hash": "771bb0e73e7b478603f73644a8c8f441b0e02e9f", "diff": "@@ -208,7 +208,7 @@ class GeoElevationData:\n for row in range(height):\n for column in range(width):\n latitude = latitude_from + float(row) / height * (latitude_to - latitude_from)\n- longitude = longitude_from + float(column) / height * (longitude_to - longitude_from)\n+ longitude = longitude_from + float(column) / width * (longitude_to - longitude_from)\n elevation = self.get_elevation(latitude, longitude)\n if elevation == None:\n color = unknown_color\n", "old_path": "srtm/data.py", "rewrite": "ReplaceText(target='width' @(211,65)->(211,71))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "628e3f952bb786220efc1e14b976809bf8ea96be", "diff": "@@ -218,7 +218,7 @@ def readf(nb_file):\n 'Expected extensions are {}'.format(nb_file,\n notebook_extensions))\n with io.open(nb_file, encoding='utf-8') as fp:\n- return read(nb_file, as_version=4, ext=ext)\n+ return read(fp, as_version=4, ext=ext)\n \n \n def writef(nb, nb_file):\n", "old_path": "nbrmd/nbrmd.py", "rewrite": "ReplaceText(target='fp' @(221,20)->(221,27))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "366614bce3dc65c6e88bcf37c4e2cd31ea36de92", "diff": "@@ -63,7 +63,7 @@ def test_load_save_rename_nbpy(nb_file, tmpdir):\n cm.save(model=dict(type='notebook', content=nb), path=tmp_ipynb)\n \n # rename nbpy\n- cm.rename(tmp_ipynb, 'new.nb.py')\n+ cm.rename(tmp_nbpy, 'new.nb.py')\n assert not os.path.isfile(str(tmpdir.join(tmp_ipynb)))\n assert not os.path.isfile(str(tmpdir.join(tmp_nbpy)))\n \n", "old_path": "tests/test_contentsmanager.py", "rewrite": "ReplaceText(target='tmp_nbpy' @(66,14)->(66,23))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "171256b67818ab86f43e35065fc828234e9abf98", "diff": "@@ -163,7 +163,7 @@ class CellExporter():\n return True\n if all([line.startswith('#') for line in self.source]):\n return True\n- if CellReader(self.ext).read(source)[1] != len(source):\n+ if CellReader(self.ext).read(source)[1] < len(source):\n return True\n \n return False\n", "old_path": "jupytext/cell_to_text.py", "rewrite": "ReplaceText(target='<' @(166,48)->(166,50))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "8048c8d0a09eab875376c7a4d1efb3cd886b8d3c", "diff": "@@ -122,7 +122,7 @@ def metadata_and_cell_to_header(notebook, text_format, ext):\n if lines_to_next_cell is None and notebook.cells:\n lines_to_next_cell = pep8_lines_between_cells(header, notebook.cells[0], ext)\n else:\n- lines_to_next_cell = 0\n+ lines_to_next_cell = 1\n \n header.extend([''] * lines_to_next_cell)\n \n", "old_path": "jupytext/header.py", "rewrite": "ReplaceText(target='1' @(125,29)->(125,30))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "120bebc0d37792cfa1418476d5f26809b996dca8", "diff": "@@ -615,7 +615,7 @@ def test_sync(nb_file, tmpdir):\n compare_notebooks(nb, nb2)\n \n # ipynb must be older than py file, otherwise our Contents Manager will complain\n- assert os.path.getmtime(tmp_ipynb) < os.path.getmtime(tmp_py)\n+ assert os.path.getmtime(tmp_ipynb) <= os.path.getmtime(tmp_py)\n \n \n @pytest.mark.parametrize('nb_file,ext',\n", "old_path": "tests/test_cli.py", "rewrite": "ReplaceText(target='<=' @(618,39)->(618,40))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "dfa96996445cbc7514b93337dbf94d592ba06bad", "diff": "@@ -19,4 +19,4 @@ def test_identity_source_write_read(nb_file, ext):\n R = jupytext.writes(nb1, ext)\n nb2 = jupytext.reads(R, ext)\n \n- compare_notebooks(nb1, nb2)\n+ compare_notebooks(nb2, nb1)\n", "old_path": "tests/test_ipynb_to_R.py", "rewrite": "ArgSwap(idxs=0<->1 @(22,4)->(22,21))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "dfa96996445cbc7514b93337dbf94d592ba06bad", "diff": "@@ -16,4 +16,4 @@ def test_identity_source_write_read(nb_file):\n py = jupytext.writes(nb1, 'py')\n nb2 = jupytext.reads(py, 'py')\n \n- compare_notebooks(nb1, nb2)\n+ compare_notebooks(nb2, nb1)\n", "old_path": "tests/test_ipynb_to_py.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,4)->(19,21))"} -{"repo": "https://:@github.com/mwouts/nbrmd.git", "hash": "dfa96996445cbc7514b93337dbf94d592ba06bad", "diff": "@@ -16,4 +16,4 @@ def test_identity_source_write_read(nb_file):\n rmd = jupytext.writes(nb1, 'Rmd')\n nb2 = jupytext.reads(rmd, 'Rmd')\n \n- compare_notebooks(nb1, nb2, 'Rmd')\n+ compare_notebooks(nb2, nb1, 'Rmd')\n", "old_path": "tests/test_ipynb_to_rmd.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,4)->(19,21))"} -{"repo": "https://:@github.com/splunk/splunk-sdk-python.git", "hash": "68f87378d5bac7efc97cf118f6754b5a6de73fa3", "diff": "@@ -48,7 +48,7 @@ class EventWriter(object):\n else:\n self._out = TextIOWrapper(output)\n \n- if isinstance(output, TextIOBase):\n+ if isinstance(error, TextIOBase):\n self._err = error\n else:\n self._err = TextIOWrapper(error)\n", "old_path": "splunklib/modularinput/event_writer.py", "rewrite": "ReplaceText(target='error' @(51,22)->(51,28))"} -{"repo": "https://:@github.com/tgbugs/pyontutils.git", "hash": "78db71bb8b163794ef9bafb5a0ee50453d29971a", "diff": "@@ -56,7 +56,7 @@ def sysidpath(ignore_options=False):\n )\n for option in options:\n if (option.exists() and\n- os.access(options, os.R_OK) and\n+ os.access(option, os.R_OK) and\n option.stat().st_size > 0):\n return option\n \n", "old_path": "pyontutils/utils.py", "rewrite": "ReplaceText(target='option' @(59,26)->(59,33))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "45ae6dc0380434d3544f5588fa24b379f5a62541", "diff": "@@ -224,7 +224,7 @@ class Blockchain(object):\n else:\n self.steem.rpc.get_block(blocknum, add_to_queue=True)\n latest_block = blocknum\n- if batches > 1:\n+ if batches >= 1:\n latest_block += 1\n if latest_block <= head_block:\n if self.steem.rpc.get_use_appbase():\n", "old_path": "beem/blockchain.py", "rewrite": "ReplaceText(target='>=' @(227,31)->(227,32))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "9eb381d23d582979934e0d3256447aef7d67de55", "diff": "@@ -509,7 +509,7 @@ class Testcases(unittest.TestCase):\n op_num = account.estimate_virtual_op_num(block_num, stop_diff=0.1, max_count=100)\n if op_num > 0:\n op_num -= 1\n- self.assertTrue(op_num < i)\n+ self.assertTrue(op_num <= i)\n i += 1\n last_block = new_block\n \n", "old_path": "tests/beem/test_account.py", "rewrite": "ReplaceText(target='<=' @(512,35)->(512,36))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "5f156fdf5a75367c32d85efb02e456abfa2719f6", "diff": "@@ -714,6 +714,6 @@ class RecentByPath(list):\n comments = []\n for reply in replies:\n post = state[\"content\"][reply]\n- if category is None or (category is not None and post[\"category\"] != category):\n+ if category is None or (category is not None and post[\"category\"] == category):\n comments.append(Comment(post, lazy=True, steem_instance=self.steem))\n super(RecentByPath, self).__init__(comments)\n", "old_path": "beem/comment.py", "rewrite": "ReplaceText(target='==' @(717,78)->(717,80))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "7b9ee9c75cbf285d18c1b4913cffe3798444ac30", "diff": "@@ -50,7 +50,7 @@ class RC(object):\n resource_count[\"resource_state_bytes\"] += state_bytes_count\n resource_count[\"resource_new_accounts\"] = new_account_op_count\n if market_op_count > 0:\n- resource_count[\"resource_market_bytes\"] = market_op_count\n+ resource_count[\"resource_market_bytes\"] = tx_size\n return resource_count\n \n def comment_dict(self, comment_dict):\n", "old_path": "beem/rc.py", "rewrite": "ReplaceText(target='tx_size' @(53,54)->(53,69))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "9e96dc84f9965b25b6b2a56a1bca7b7652b93be8", "diff": "@@ -1456,7 +1456,7 @@ class Steem(object):\n 'key_auths': active_key_authority,\n \"address_auths\": [],\n 'weight_threshold': 1},\n- 'posting': {'account_auths': active_accounts_authority,\n+ 'posting': {'account_auths': posting_accounts_authority,\n 'key_auths': posting_key_authority,\n \"address_auths\": [],\n 'weight_threshold': 1},\n", "old_path": "beem/steem.py", "rewrite": "ReplaceText(target='posting_accounts_authority' @(1459,41)->(1459,66))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "8e4214f27e746be7ed01c5d644911c830bfe988a", "diff": "@@ -135,7 +135,7 @@ class Block(BlockchainObject):\n if ops_ops is None:\n ops = None\n else:\n- ops = ops[\"ops\"]\n+ ops = ops_ops[\"ops\"]\n except ApiNotSupported:\n ops = self.steem.rpc.get_ops_in_block(self.identifier, self.only_virtual_ops, api=\"condenser\")\n else:\n", "old_path": "beem/block.py", "rewrite": "ReplaceText(target='ops_ops' @(138,30)->(138,33))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "d19894c85464f2bc5221e15f858326c4e8efdaf3", "diff": "@@ -367,7 +367,7 @@ class ActiveVotes(VotesObject):\n elif isinstance(authorperm, string_types):\n [author, permlink] = resolve_authorperm(authorperm)\n if self.steem.rpc.get_use_appbase():\n- self.steem.rpc.set_next_node_on_empty_reply(True)\n+ self.steem.rpc.set_next_node_on_empty_reply(False)\n try:\n votes = self.steem.rpc.get_active_votes(author, permlink, api=\"condenser\")\n except:\n", "old_path": "beem/vote.py", "rewrite": "ReplaceText(target='False' @(370,60)->(370,64))"} -{"repo": "https://:@github.com/holgern/beem.git", "hash": "8f173f0ab272a57a5c036589dcc19b8543026b3e", "diff": "@@ -780,7 +780,7 @@ def keygen(import_word_list, strength, passphrase, path, network, role, account_\n t.add_row([\"Key role\", role])\n t.add_row([\"path\", path])\n pubkey = ledgertx.ledgertx.get_pubkey(path, request_screen_approval=False)\n- aprove_key = PrettyTable([\"Approve %s Key\" % r])\n+ aprove_key = PrettyTable([\"Approve %s Key\" % role])\n aprove_key.align = \"l\"\n aprove_key.add_row([format(pubkey, \"STM\")])\n print(aprove_key)\n", "old_path": "beem/cli.py", "rewrite": "ReplaceText(target='role' @(783,57)->(783,58))"} -{"repo": "https://:@github.com/BlackLight/platypush.git", "hash": "56b87f343693e89131b3b30930acfeeaec4915fe", "diff": "@@ -101,7 +101,7 @@ class MqttBackend(Backend):\n format(response_topic, response))\n \n client = get_plugin('mqtt')\n- client.send_message(topic=self.topic, msg=msg, host=self.host,\n+ client.send_message(topic=self.topic, msg=response, host=self.host,\n port=self.port, username=self.username,\n password=self.password, tls_cafile=self.tls_cafile,\n tls_certfile=self.tls_certfile,\n", "old_path": "platypush/backend/mqtt.py", "rewrite": "ReplaceText(target='response' @(104,58)->(104,61))"} -{"repo": "https://:@github.com/BlackLight/platypush.git", "hash": "c9dc1aac44ec4df76071092f4a17601d97955a38", "diff": "@@ -47,7 +47,7 @@ class SensorEnvirophatBackend(SensorBackend):\n if enabled and sensor in sensors and sensors[sensor] != self._last_read.get(sensor)\n }\n \n- self._last_read = ret\n+ self._last_read = sensors\n return ret\n \n \n", "old_path": "platypush/backend/sensor/envirophat.py", "rewrite": "ReplaceText(target='sensors' @(50,26)->(50,29))"} -{"repo": "https://:@github.com/BlackLight/platypush.git", "hash": "7f440a9160619c699f7e8e58b3c0fad3c80ceaf3", "diff": "@@ -46,7 +46,7 @@ class GpioPlugin(Plugin):\n import RPi.GPIO as GPIO\n \n with self._init_lock:\n- if self._initialized or GPIO.getmode():\n+ if self._initialized and GPIO.getmode():\n return\n \n GPIO.setmode(self.mode)\n", "old_path": "platypush/plugins/gpio/__init__.py", "rewrite": "ReplaceText(target='and' @(49,33)->(49,35))"} -{"repo": "https://:@github.com/BlackLight/platypush.git", "hash": "c26d456109fea166f8fb5da25aed1d4fb7fc94ab", "diff": "@@ -175,7 +175,7 @@ class SensorBackend(Backend):\n \n def process_data(self, data, new_data):\n if new_data:\n- self.bus.post(SensorDataChangeEvent(data=data, source=self.plugin or self.__class__.__name__))\n+ self.bus.post(SensorDataChangeEvent(data=new_data, source=self.plugin or self.__class__.__name__))\n \n def run(self):\n super().run()\n", "old_path": "platypush/backend/sensor/__init__.py", "rewrite": "ReplaceText(target='new_data' @(178,53)->(178,57))"} -{"repo": "https://:@github.com/chrisjsewell/ipypublish.git", "hash": "cfb66fb74d48cbcc99c695b64fe6336213877e04", "diff": "@@ -52,7 +52,7 @@ class LatexDocLinks(Preprocessor):\n ': {}'.format(bib))\n else:\n external_files.append(bib)\n- resources['bibliopath'] = external_files\n+ resources['bibliopath'] = bib\n \n nb.metadata.latex_doc.bibliography = os.path.join(self.filesfolder,\n os.path.basename(bib))\n", "old_path": "ipypublish/preprocessors/latex_doc.py", "rewrite": "ReplaceText(target='bib' @(55,46)->(55,60))"} -{"repo": "https://:@github.com/pazz/alot.git", "hash": "dd7b2a15495ce5fddcac0d34c14e5ef9f1032482", "diff": "@@ -64,7 +64,7 @@ class ThreadlineWidget(urwid.AttrMap):\n mailcountstring = \"(%d)\" % self.thread.get_total_messages()\n else:\n mailcountstring = \"(?)\"\n- datestring = pad(mailcountstring)\n+ mailcountstring = pad(mailcountstring)\n width = len(mailcountstring)\n mailcount_w = AttrFlipWidget(urwid.Text(mailcountstring),\n struct['mailcount'])\n", "old_path": "alot/widgets/search.py", "rewrite": "ReplaceText(target='mailcountstring' @(67,12)->(67,22))"} -{"repo": "https://:@github.com/luozhouyang/python-string-similarity.git", "hash": "5f6717fe6d7cae48a664eaa76a47e3388ffd0cf2", "diff": "@@ -33,7 +33,7 @@ class Levenshtein(MetricStringDistance):\n if len(s0) == 0:\n return len(s1)\n if len(s1) == 0:\n- return len(s1)\n+ return len(s0)\n \n v0 = [0] * (len(s1) + 1)\n v1 = [0] * (len(s1) + 1)\n", "old_path": "strsimpy/levenshtein.py", "rewrite": "ReplaceText(target='s0' @(36,23)->(36,25))"} -{"repo": "https://:@github.com/ElementsProject/lightning.git", "hash": "84b9e3e72b2bf8590603072d709a3ea294dd5483", "diff": "@@ -943,7 +943,7 @@ def test_logging(node_factory):\n \n def check_new_log():\n log2 = open(logpath).readlines()\n- return len(log2) > 1 and log2[0].endswith(\"Started log due to SIGHUP\\n\")\n+ return len(log2) > 0 and log2[0].endswith(\"Started log due to SIGHUP\\n\")\n wait_for(check_new_log)\n \n \n", "old_path": "tests/test_misc.py", "rewrite": "ReplaceText(target='0' @(946,27)->(946,28))"} -{"repo": "https://:@github.com/ElementsProject/lightning.git", "hash": "c8579b99d01d8b738feadd2d9f541daba5230a63", "diff": "@@ -305,7 +305,7 @@ other types. Since 'msgtype' is almost identical, it inherits from this too.\n def read(self, io_in: BufferedIOBase, otherfields: Dict[str, Any]) -> Optional[Dict[str, Any]]:\n vals = {}\n for field in self.fields:\n- val = field.fieldtype.read(io_in, otherfields)\n+ val = field.fieldtype.read(io_in, vals)\n if val is None:\n # If first field fails to read, we return None.\n if field == self.fields[0]:\n", "old_path": "contrib/pyln-proto/pyln/proto/message/message.py", "rewrite": "ReplaceText(target='vals' @(308,46)->(308,57))"} -{"repo": "https://:@github.com/funilrys/PyFunceble.git", "hash": "c766732abdf31c0c1ce283ee9aa2ec32f0ac7829", "diff": "@@ -301,7 +301,7 @@ class Generate(object): # pragma: no cover\n regex_blogger = [\"create-blog.g?\", \"87065\", \"doesn’t exist\"]\n \n if self.tested == PyFunceble.CONFIGURATION[\"domain\"]:\n- url_to_get = \"http://%s\" & self.tested\n+ url_to_get = \"http://%s\" % self.tested\n else:\n url_to_get = self.tested\n \n", "old_path": "PyFunceble/generate.py", "rewrite": "ReplaceText(target='%' @(304,37)->(304,38))"} -{"repo": "https://:@github.com/funilrys/PyFunceble.git", "hash": "08400b05f5f3e20c24c9222a9cb9216d1a76aea5", "diff": "@@ -80,7 +80,7 @@ class Load(object): # pylint: disable=too-few-public-methods\n def __init__(self, path_to_config):\n self.path_to_config = path_to_config\n \n- if path_to_config.endswith(directory_separator):\n+ if not path_to_config.endswith(directory_separator):\n self.path_to_config += directory_separator\n \n self.path_to_config += PyFunceble.CONFIGURATION_FILENAME\n", "old_path": "PyFunceble/config.py", "rewrite": "ReplaceText(target='not ' @(83,11)->(83,11))"} -{"repo": "https://:@github.com/funilrys/PyFunceble.git", "hash": "fb9465acb6a7124aa84b8c419c9709243e001f94", "diff": "@@ -96,7 +96,7 @@ class Clean:\n if (\n number_of_tested == 0\n or list_to_test[number_of_tested - 1] == list_to_test[-1]\n- or number_of_tested == len(list_to_test)\n+ or number_of_tested >= len(list_to_test)\n ):\n # * If the number of tested is null,\n # or\n", "old_path": "PyFunceble/clean.py", "rewrite": "ReplaceText(target='>=' @(99,40)->(99,42))"} -{"repo": "https://:@github.com/funilrys/PyFunceble.git", "hash": "a9e45c83e13eca92389d0be56634cc45ef601bc1", "diff": "@@ -92,7 +92,7 @@ class DBTypeDownloader(DownloaderBase):\n f\"{PyFunceble.OUTPUTS.db_type.files[PyFunceble.CONFIGURATION.db_type]}\"\n )\n \n- if is_cloned_version and (\n+ if not is_cloned_version and (\n PyFunceble.CONFIGURATION.db_type not in not_supported_db_types\n ):\n destination_dir_instance.delete()\n", "old_path": "PyFunceble/downloader/db_type.py", "rewrite": "ReplaceText(target='not ' @(95,11)->(95,11))"} -{"repo": "https://:@github.com/funilrys/PyFunceble.git", "hash": "76bc73c57f4ac2865fc89d70ad330be2aa501c08", "diff": "@@ -154,7 +154,7 @@ class Credential:\n regex = f\"{name}=.*\"\n \n if not content:\n- content += f\"{to_write}\\n\"\n+ content = f\"{to_write}\\n\"\n continue\n \n if PyFunceble.helpers.Regex(f\"^{regex}\").get_matching_list(\n", "old_path": "PyFunceble/engine/database/loader/credential.py", "rewrite": "ReplaceText(target='=' @(157,28)->(157,30))"} -{"repo": "https://:@github.com/valassis-digital-media/conda-mirror.git", "hash": "e0b34555d779f9b440512f850da39aa5a0e29ece", "diff": "@@ -85,5 +85,5 @@ def test_handling_bad_package(tmpdir, repodata):\n with bz2.BZ2File(bad_pkg_path, 'wb') as f:\n f.write(\"This is a fake package\".encode())\n assert bad_pkg_name in os.listdir(bad_pkg_root)\n- conda_mirror._validate_packages(repodata, local_repo_root)\n+ conda_mirror._validate_packages(repodata, bad_pkg_root)\n assert bad_pkg_name not in os.listdir(bad_pkg_root)\n\\ No newline at end of file\n", "old_path": "test/test_conda_mirror.py", "rewrite": "ReplaceText(target='bad_pkg_root' @(88,46)->(88,61))"} -{"repo": "https://:@github.com/fact-project/pycustos.git", "hash": "e2432cee5bba6dc97b30d0b640c0c92f3bdd6961", "diff": "@@ -8,7 +8,7 @@ class Notifier(metaclass=ABCMeta):\n self.categories = set(categories)\n \n def handle_message(self, msg):\n- if self.categories.intersection(msg.categories) and msg.level > self.level:\n+ if self.categories.intersection(msg.categories) and msg.level >= self.level:\n self.notify(msg)\n \n @abstractmethod\n", "old_path": "custos/notify/base.py", "rewrite": "ReplaceText(target='>=' @(11,70)->(11,71))"} -{"repo": "https://:@github.com/danilobellini/audiolazy.git", "hash": "3119b12f8f0b175b3f55aecf3053ed6a0d1a477a", "diff": "@@ -249,4 +249,4 @@ def gammatone(freq, bandwidth):\n freqs = tee(freq, 4)\n resons = [resonator.z_exp, resonator.poles_exp] * 2\n return CascadeFilter(reson(f, bw)\n- for reson, f, bw in zip(bws, freqs, resons))\n+ for reson, f, bw in zip(resons, freqs, bws))\n", "old_path": "audiolazy/lazy_auditory.py", "rewrite": "ArgSwap(idxs=0<->2 @(252,43)->(252,46))"} -{"repo": "https://:@github.com/ojii/django-sekizai.git", "hash": "b0b50e0713a90e84acabe1ab39e951421fd4aa7a", "diff": "@@ -91,6 +91,6 @@ class CSSSingleFileFilter(BaseMinifierFilter):\n mtime = os.path.getmtime(master)\n for f in files:\n fpath = media_url_to_filepath(f)\n- if os.path.getmtime(fpath) > mtime:\n+ if os.path.getmtime(fpath) >= mtime:\n return True\n return False\n\\ No newline at end of file\n", "old_path": "sekizai/filters/css.py", "rewrite": "ReplaceText(target='>=' @(94,39)->(94,40))"} -{"repo": "https://:@github.com/websocket-client/websocket-client.git", "hash": "6410340fca47f258d50a34646138ba03b2b2783b", "diff": "@@ -183,7 +183,7 @@ def _tunnel(sock, host, port, auth):\n \n if status != 200:\n raise WebSocketProxyException(\n- \"failed CONNECT via proxy status: %r\" + status)\n+ \"failed CONNECT via proxy status: %r\" % status)\n \n return sock\n \n", "old_path": "websocket/_http.py", "rewrite": "ReplaceText(target='%' @(186,50)->(186,51))"} -{"repo": "https://:@github.com/getsentry/raven-python.git", "hash": "dedca8e5c98124f6a43a18986e142e8cb7ecc3cf", "diff": "@@ -59,7 +59,7 @@ def setup_logging(handler, exclude=['raven', 'sentry.errors']):\n Returns a boolean based on if logging was configured or not.\n \"\"\"\n logger = logging.getLogger()\n- if handler.__class__ not in map(type, logger.handlers):\n+ if handler.__class__ in map(type, logger.handlers):\n return False\n \n logger.addHandler(handler)\n", "old_path": "raven/conf/__init__.py", "rewrite": "ReplaceText(target=' in ' @(62,24)->(62,32))"} -{"repo": "https://:@github.com/getsentry/raven-python.git", "hash": "f0ad0ca6a9de44128982de50c30157b779b69d71", "diff": "@@ -16,7 +16,7 @@ class TransportRegistry(object):\n self.register_transport(transport)\n \n def register_transport(self, transport):\n- if not hasattr(transport, 'scheme') and not hasattr(transport.scheme, '__iter__'):\n+ if not hasattr(transport, 'scheme') or not hasattr(transport.scheme, '__iter__'):\n raise AttributeError('Transport %s must have a scheme list', transport.__class__.__name__)\n \n for scheme in transport.scheme:\n", "old_path": "raven/transport/registry.py", "rewrite": "ReplaceText(target='or' @(19,44)->(19,47))"} -{"repo": "https://:@github.com/ilius/pyglossary.git", "hash": "8ad925bbb4ce19207322471c4c758d1a66f0db9d", "diff": "@@ -186,7 +186,7 @@ def write(\n \twith open(filePathBase + \".xml\", \"w\", encoding=\"utf8\") as toFile:\n \t\twrite_header(glos, toFile, frontBackMatter)\n \t\tfor entryI, entry in enumerate(glos):\n-\t\t\tif glos.isData():\n+\t\t\tif entry.isData():\n \t\t\t\tentry.save(myResDir)\n \t\t\t\tcontinue\n \n", "old_path": "pyglossary/plugins/appledict/__init__.py", "rewrite": "ReplaceText(target='entry' @(189,6)->(189,10))"} -{"repo": "https://:@github.com/ilius/pyglossary.git", "hash": "194fea3e176f5c9caf090a58bee3c5b04fd483ef", "diff": "@@ -450,7 +450,7 @@ class Glossary(GlossaryType):\n \t\t\t\t\twordCount = len(reader)\n \t\t\t\texcept Exception:\n \t\t\t\t\tlog.exception(\"\")\n-\t\t\t\tif wordCount > 0:\n+\t\t\t\tif wordCount >= 0:\n \t\t\t\t\tprogressbar = True\n \t\t\tif progressbar:\n \t\t\t\tself.progressInit(\"Converting\")\n", "old_path": "pyglossary/glossary.py", "rewrite": "ReplaceText(target='>=' @(453,17)->(453,18))"} -{"repo": "https://:@github.com/ilius/pyglossary.git", "hash": "a7237c6749dcd2f2cf34b5f8ec385b6ba0b5565a", "diff": "@@ -99,7 +99,7 @@ class TextGlossaryReader(object):\n \t\ttry:\n \t\t\twordDefi = self.nextPair()\n \t\texcept StopIteration as e:\n-\t\t\tif self._fileIndex < self._fileCount + 1:\n+\t\t\tif self._fileIndex < self._fileCount - 1:\n \t\t\t\tif self.openNextFile():\n \t\t\t\t\treturn self.__next__()\n \t\t\tself._wordCount = self._pos\n", "old_path": "pyglossary/text_reader.py", "rewrite": "ReplaceText(target='-' @(102,40)->(102,41))"} -{"repo": "https://:@github.com/GOVCERT-LU/eml_parser.git", "hash": "5a129fd37081de0c3483a317e4eefced52fed44d", "diff": "@@ -636,7 +636,7 @@ def parse_email(msg, include_raw_body=False, include_attachment_data=False):\n if list_observed_dom:\n bodie['domain'] = list(set(list_observed_dom))\n \n- if list_observed_dom:\n+ if list_observed_ip:\n bodie['ip'] = list(set(list_observed_ip))\n \n else:\n", "old_path": "eml_parser/eml_parser.py", "rewrite": "ReplaceText(target='list_observed_ip' @(639,15)->(639,32))"} -{"repo": "https://:@github.com/noripyt/wagtail-react-streamfield.git", "hash": "fcd366318ffd0f20f93efcc58e00658f1334899c", "diff": "@@ -75,4 +75,4 @@ class NewListBlock(ListBlock):\n _('The maximum number of items is %d') % self.meta.max_num\n )\n \n- return value\n+ return result\n", "old_path": "wagtail_react_streamfield/blocks/list_block.py", "rewrite": "ReplaceText(target='result' @(78,15)->(78,20))"} -{"repo": "https://:@github.com/noripyt/wagtail-react-streamfield.git", "hash": "4a33dab16bc9665349e6aaa011df3a47eea25277", "diff": "@@ -43,7 +43,7 @@ class NewBlock(Block):\n else errors.as_data()[0].params.get(NON_FIELD_ERRORS, ()))\n else:\n non_block_errors = errors\n- if help_text and non_block_errors:\n+ if help_text or non_block_errors:\n return render_to_string(\n 'wagtailadmin/block_forms/blocks_container.html',\n {\n", "old_path": "wagtail_react_streamfield/blocks/block.py", "rewrite": "ReplaceText(target='or' @(46,21)->(46,24))"} -{"repo": "https://:@github.com/PMBio/MOFA.git", "hash": "f7cd442f209ce679001b67e2ed439016bdef6991", "diff": "@@ -82,7 +82,7 @@ class initModel(object):\n \n elif qmean == \"pca\": # Latent variables are initialised from PCA in the concatenated matrix\n pca = sklearn.decomposition.PCA(n_components=self.K, copy=True, whiten=True)\n- pca.fit(s.concatenate(self.data,axis=0).T)\n+ pca.fit(s.concatenate(self.data,axis=1).T)\n qmean = pca.components_.T\n \n elif isinstance(qmean,s.ndarray):\n", "old_path": "mofa/core/init_nodes.py", "rewrite": "ReplaceText(target='1' @(85,57)->(85,58))"} -{"repo": "https://:@github.com/twisted/tubes.git", "hash": "836d6021f14ad923bb595dffb0a6ca39f0b884b5", "diff": "@@ -168,7 +168,7 @@ class _SiphonFount(_SiphonPiece):\n def _actuallyPause():\n fount = self._siphon._tdrain.fount\n self._siphon._pending.suspend()\n- if fount is None:\n+ if fount is not None:\n pbpc = fount.pauseFlow()\n else:\n pbpc = NoPause()\n", "old_path": "tubes/_siphon.py", "rewrite": "ReplaceText(target=' is not ' @(171,20)->(171,24))"} -{"repo": "https://:@github.com/deschler/django-modeltranslation.git", "hash": "656dca3e4031d8f030a0aae833fc43c0c09cb51c", "diff": "@@ -57,7 +57,7 @@ class TranslationBaseModelAdmin(BaseModelAdmin):\n else:\n orig_formfield = self.formfield_for_dbfield(orig_field, **kwargs)\n field.widget = deepcopy(orig_formfield.widget)\n- if orig_field.null and isinstance(field.widget, (forms.TextInput, forms.Textarea)):\n+ if db_field.null and isinstance(field.widget, (forms.TextInput, forms.Textarea)):\n field.widget = ClearableWidgetWrapper(field.widget)\n css_classes = field.widget.attrs.get('class', '').split(' ')\n css_classes.append('mt')\n", "old_path": "modeltranslation/admin.py", "rewrite": "ReplaceText(target='db_field' @(60,15)->(60,25))"} -{"repo": "https://:@github.com/xcgspring/AXUI.git", "hash": "82f7d6f7f2565d28553fda3c12bb1a2aafb5bab9", "diff": "@@ -123,7 +123,7 @@ class AppMap(object):\n UI_element_group.stop_func = self.get_func_by_name(xml_element.attrib[\"stop_func\"])\n if xml_element.attrib.has_key(\"identifier\"):\n UI_element_group.identifier_string = xml_element.attrib[\"identifier\"]\n- UI_element_group.identifier = identifier_parser.parse(UI_element.identifier_string, lexer=identifier_lexer)\n+ UI_element_group.identifier = identifier_parser.parse(UI_element_group.identifier_string, lexer=identifier_lexer)\n \n return UI_element_group\n \n", "old_path": "AXUI/XML/app_map.py", "rewrite": "ReplaceText(target='UI_element_group' @(126,70)->(126,80))"} -{"repo": "https://:@github.com/docker/compose.git", "hash": "0e19c92e82c75f821c231367b5cda88eefdf1427", "diff": "@@ -577,7 +577,7 @@ class VolumeConfigTest(unittest.TestCase):\n \n def test_volume_path_with_non_ascii_directory(self):\n volume = u'/F\u00fc\u00fc/data:/data'\n- container_path = config.resolve_volume_path(volume, \".\", \"test\")\n+ container_path = config.resolve_volume_path(\".\", volume, \"test\")\n self.assertEqual(container_path, volume)\n \n \n", "old_path": "tests/unit/config/config_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(580,25)->(580,51))"} -{"repo": "https://:@github.com/docker/compose.git", "hash": "c4f59e731d540780a767d105bcb8d7d164ba4cd5", "diff": "@@ -577,7 +577,7 @@ class VolumeConfigTest(unittest.TestCase):\n \n def test_volume_path_with_non_ascii_directory(self):\n volume = u'/F\u00fc\u00fc/data:/data'\n- container_path = config.resolve_volume_path(volume, \".\", \"test\")\n+ container_path = config.resolve_volume_path(\".\", volume, \"test\")\n self.assertEqual(container_path, volume)\n \n \n", "old_path": "tests/unit/config/config_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(580,25)->(580,51))"} -{"repo": "https://:@github.com/ranaroussi/qtpylib.git", "hash": "e5eac01b67e908823c80b1bdeac57dcb68dbb164", "diff": "@@ -65,7 +65,7 @@ def _gen_symbol_group(sym):\n \n def _gen_asset_class(sym):\n sym_class = str(sym).split(\"_\")\n- if len(sym_class) > 0:\n+ if len(sym_class) > 1:\n return sym_class[1]\n return \"STK\"\n \n", "old_path": "qtpylib/blotter.py", "rewrite": "ReplaceText(target='1' @(68,24)->(68,25))"} -{"repo": "https://:@github.com/lmjohns3/theanets.git", "hash": "507eac0d7fe007cdc93d89ca6cb0db9521908eac", "diff": "@@ -253,7 +253,7 @@ class Network(object):\n h = self.hiddens[-1]\n a, b = self.weights[i].get_value(borrow=True).shape\n logging.info('tied weights from layer %d: %s x %s', i, b, a)\n- o = theano.shared(np.zeros((b, ), FLOAT), name='b_out{}'.format(i))\n+ o = theano.shared(np.zeros((a, ), FLOAT), name='b_out{}'.format(i))\n self.preacts.append(TT.dot(h, self.weights[i].T) + o)\n func = self._output_func if i == 0 else self._hidden_func\n self.hiddens.append(func(self.preacts[-1]))\n", "old_path": "theanets/feedforward.py", "rewrite": "ReplaceText(target='a' @(256,44)->(256,45))"} -{"repo": "https://:@github.com/lmjohns3/theanets.git", "hash": "62f7125e1b179df846fdcd5d213c8bca18595648", "diff": "@@ -83,7 +83,7 @@ class SequenceDataset:\n slices = [slice(None), slice(None)]\n self.batches = []\n i = 0\n- while i + size < shape[axis]:\n+ while i + size <= shape[axis]:\n slices[axis] = slice(i, i + size)\n self.batches.append([d[tuple(slices)] for d in data])\n i += size\n", "old_path": "theanets/dataset.py", "rewrite": "ReplaceText(target='<=' @(86,27)->(86,28))"} -{"repo": "https://:@github.com/lmjohns3/theanets.git", "hash": "8fa4792eaae89e4da7d041178fdcb341f5313914", "diff": "@@ -834,4 +834,4 @@ class Classifier(Network):\n k : ndarray (num-examples, )\n A vector of class index values, one per row of input data.\n '''\n- return self.predict(x).argmax(axis=1)\n+ return self.predict(x).argmax(axis=-1)\n", "old_path": "theanets/feedforward.py", "rewrite": "ReplaceText(target='-1' @(837,43)->(837,44))"} -{"repo": "https://:@github.com/lmjohns3/theanets.git", "hash": "114f37976b5c00330da9c5fed75ecf7b727eff58", "diff": "@@ -338,7 +338,7 @@ class Network(object):\n if i == 0:\n noise = kwargs.get('input_noise', 0)\n dropout = kwargs.get('input_dropouts', 0)\n- elif i == len(self.layers) - 1:\n+ elif i != len(self.layers) - 1:\n noise = kwargs.get('hidden_noise', 0)\n dropout = kwargs.get('hidden_dropouts', 0)\n out, mon, upd = layer.connect(inputs, noise=noise, dropout=dropout)\n", "old_path": "theanets/graph.py", "rewrite": "ReplaceText(target='!=' @(341,23)->(341,25))"} -{"repo": "https://:@github.com/pyiron/pyiron_base.git", "hash": "f9ea8a31ec8fe36704c4c8f73e127ee3e077ca3a", "diff": "@@ -98,7 +98,7 @@ class Vasprun(object):\n d[\"cells\"] = np.array(d[\"cells\"])\n d[\"positions\"] = np.array(d[\"positions\"])\n # Check if the parsed coordinates are in absolute/relative coordinates. If absolute, convert to relative\n- if len(np.argwhere(d[\"positions\"].flatten() > 1).flatten()) / len(d[\"positions\"].flatten()) < 0.01:\n+ if len(np.argwhere(d[\"positions\"].flatten() > 1).flatten()) / len(d[\"positions\"].flatten()) > 0.01:\n pos_new = d[\"positions\"].copy()\n for i, pos in enumerate(pos_new):\n d[\"positions\"][i] = np.dot(pos, np.linalg.inv(d[\"cells\"][i]))\n", "old_path": "pyiron_vasp/vasprun.py", "rewrite": "ReplaceText(target='>' @(101,100)->(101,101))"} -{"repo": "https://:@github.com/pyiron/pyiron_base.git", "hash": "5d9677db9fcbca5fce348a7208830467381cd643", "diff": "@@ -487,7 +487,7 @@ class ParallelMaster(GenericMaster):\n job_lst.append(ham._process)\n ham = next(self._job_generator, None)\n if ham is None and self.server.run_mode.modal:\n- while ham is not None:\n+ while ham is None:\n time.sleep(10)\n ham = next(self._job_generator, None)\n else:\n", "old_path": "pyiron_base/objects/job/parallel.py", "rewrite": "ReplaceText(target=' is ' @(490,29)->(490,37))"} -{"repo": "https://:@github.com/pyiron/pyiron_base.git", "hash": "a4ed8375fa375ff740a8334f7ce5eb5bf9d7d4a2", "diff": "@@ -477,7 +477,7 @@ class Settings(with_metaclass(Singleton)):\n else:\n # SQLite is raising ugly error messages when the database directory does not exist.\n if config[\"sql_file\"] is None:\n- if len(config[\"resource_paths\"]) > 1:\n+ if len(config[\"resource_paths\"]) >= 1:\n config[\"sql_file\"] = \"/\".join(\n [config[\"resource_paths\"][0], \"pyiron.db\"]\n )\n", "old_path": "pyiron_base/settings/generic.py", "rewrite": "ReplaceText(target='>=' @(480,49)->(480,50))"} -{"repo": "https://:@github.com/ESSolutions/django-mssql-backend.git", "hash": "06578347a5e775088cfe3a2c2e9c528c5ffb7de0", "diff": "@@ -201,7 +201,7 @@ class DatabaseWrapper(BaseDatabaseWrapper):\n # Only append DRIVER if DATABASE_ODBC_DSN hasn't been set\n cstr_parts.append('DRIVER={%s}' % driver)\n if ms_drivers.match(driver) or driver == 'FreeTDS' and \\\n- conn_params.get('host_is_server', False):\n+ options.get('host_is_server', False):\n if port:\n host += ';PORT=%s' % port\n cstr_parts.append('SERVER=%s' % host)\n", "old_path": "sql_server/pyodbc/base.py", "rewrite": "ReplaceText(target='options' @(204,16)->(204,27))"} -{"repo": "https://:@github.com/bykof/billomapy.git", "hash": "29dc1fcd8f491c158a713b07680ea1305748c959", "diff": "@@ -112,7 +112,7 @@ todo_include_todos = False\n # a list of builtin themes.\n on_rtd = os.environ.get('READTHEDOCS', None) == 'True'\n \n-if not on_rtd: # only import and set the theme if we're building docs locally\n+if on_rtd: # only import and set the theme if we're building docs locally\n import sphinx_rtd_theme\n html_theme = 'sphinx_rtd_theme'\n html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]\n", "old_path": "docs/source/conf.py", "rewrite": "ReplaceText(target='' @(115,3)->(115,7))"} -{"repo": "https://:@github.com/quva-lab/artemis.git", "hash": "26ae4a7049b0f6ac2aef7daf4c2a5184748be516", "diff": "@@ -76,7 +76,7 @@ def get_new_positions(fixed_positions, layout, n_plots):\n positions.append(fixed_positions[i])\n else:\n while True:\n- row, col = ix/n_cols, ix%n_cols\n+ row, col = ix//n_cols, ix%n_cols\n if (row, col) not in taken_positions:\n positions.append((row, col))\n taken_positions.add((row, col))\n", "old_path": "artemis/plotting/expanding_subplots.py", "rewrite": "ReplaceText(target='//' @(79,29)->(79,30))"} -{"repo": "https://:@github.com/OCR-D/core.git", "hash": "e82299a48e4cf4677535819f81bb944ad4f64f8a", "diff": "@@ -312,7 +312,7 @@ def validate_consistency(node, page_textequiv_consistency, page_textequiv_strate\n pass # already reported in recursive call above\n elif not child_poly.within(node_poly.buffer(PARENT_SLACK)):\n # TODO: automatic repair?\n- report.add_error(CoordinateConsistencyError(tag, child.id, file_id,\n+ report.add_error(CoordinateConsistencyError(child_tag, child.id, file_id,\n parent_points, child_points))\n log.debug(\"Inconsistent coords of %s %s\", child_tag, child.id)\n consistent = False\n", "old_path": "ocrd_validators/ocrd_validators/page_validator.py", "rewrite": "ReplaceText(target='child_tag' @(315,64)->(315,67))"} -{"repo": "https://:@github.com/jhuapl-boss/heaviside.git", "hash": "3adb4902a04dc3e1d9a325ab1752c4b2d856b677", "diff": "@@ -69,7 +69,7 @@ class ASTCompAndOr(ASTNode):\n super(ASTCompAndOr, self).__init__(comp.token)\n self.comps = [comp]\n for c in comps:\n- self.comps.append(comp)\n+ self.comps.append(c)\n \n class ASTCompAnd(ASTCompAndOr):\n op = 'And'\n", "old_path": "heaviside/ast.py", "rewrite": "ReplaceText(target='c' @(72,30)->(72,34))"} -{"repo": "https://:@github.com/google-research/text-to-text-transfer-transformer.git", "hash": "d2c010b48b702f22fb665d2e5723c7baaf4f6a1c", "diff": "@@ -98,7 +98,7 @@ def main(_):\n \" \".join(str(i) for i in v) if FLAGS.tokenize\n else v.decode(\"utf-8\"))\n else:\n- v[k] = \"\"\n+ key_to_string[k] = \"\"\n return FLAGS.format_string.format(**key_to_string)\n \n for shard_path in files:\n", "old_path": "t5/scripts/dump_task.py", "rewrite": "ReplaceText(target='key_to_string' @(101,8)->(101,9))"} -{"repo": "https://:@github.com/lvieirajr/mongorest.git", "hash": "470f17173b63b14ab60bbc99db7ca3b3f93afdac", "diff": "@@ -401,4 +401,4 @@ class CoercionError(SchemaValidationError):\n \n self['collection'] = collection\n self['field'] = field\n- self['coercion_type'] = coercion_type\n+ self['coercion_type'] = coercion_type_repr\n", "old_path": "mongorest/errors.py", "rewrite": "ReplaceText(target='coercion_type_repr' @(404,32)->(404,45))"} -{"repo": "https://:@github.com/internetarchive/fatcat.git", "hash": "89b729feac30a272b557542c5c4149d3611f869a", "diff": "@@ -295,7 +295,7 @@ def container_to_elasticsearch(entity):\n t['in_sherpa_romeo'] = in_sherpa_romeo\n t['is_oa'] = in_doaj or in_road or is_longtail_oa or is_oa\n t['is_longtail_oa'] = is_longtail_oa\n- t['any_kbart'] = any_ia_sim\n+ t['any_kbart'] = any_kbart\n t['any_jstor'] = any_jstor\n t['any_ia_sim'] = bool(any_ia_sim)\n return t\n", "old_path": "python/fatcat_tools/transforms.py", "rewrite": "ReplaceText(target='any_kbart' @(298,21)->(298,31))"} -{"repo": "https://:@github.com/internetarchive/fatcat.git", "hash": "11dfac5f8f9ced9b56cf277d0e3adeccc572b251", "diff": "@@ -57,7 +57,7 @@ class ArabesqueMatchImporter(EntityImporter):\n eg_extra = kwargs.get('editgroup_extra', dict())\n eg_extra['agent'] = eg_extra.get('agent', 'fatcat_tools.ArabesqueMatchImporter')\n if kwargs.get('crawl_id'):\n- eg_extra['crawl_id'] = eg_extra.get('crawl_id')\n+ eg_extra['crawl_id'] = kwargs.get('crawl_id')\n super().__init__(api,\n editgroup_description=eg_desc,\n editgroup_extra=eg_extra,\n", "old_path": "python/fatcat_tools/importers/arabesque.py", "rewrite": "ReplaceText(target='kwargs' @(60,35)->(60,43))"} -{"repo": "https://:@github.com/internetarchive/fatcat.git", "hash": "7104e6dfb99717353e3819853ae61ac6387a02a1", "diff": "@@ -128,7 +128,7 @@ class EntityUpdatesWorker(FatcatWorker):\n # update release when a file changes\n # TODO: fetch old revision as well, and only update\n # releases for which list changed\n- release_ids.extend(e['release_ids'])\n+ release_ids.extend(file_entity['release_ids'])\n file_dict = self.api.api_client.sanitize_for_serialization(file_entity)\n file_producer.produce(\n message=json.dumps(file_dict).encode('utf-8'),\n", "old_path": "python/fatcat_tools/workers/changelog.py", "rewrite": "ReplaceText(target='file_entity' @(131,35)->(131,36))"} -{"repo": "https://:@github.com/internetarchive/fatcat.git", "hash": "80b756d6feec3f66225287b9ca73c8b02d012027", "diff": "@@ -167,7 +167,7 @@ class IngestFileResultImporter(EntityImporter):\n urls=urls,\n )\n if request.get('edit_extra'):\n- fe.edit_extra = fatcat['edit_extra']\n+ fe.edit_extra = request['edit_extra']\n else:\n fe.edit_extra = dict()\n if request.get('ingest_request_source'):\n", "old_path": "python/fatcat_tools/importers/ingest.py", "rewrite": "ReplaceText(target='request' @(170,28)->(170,34))"} -{"repo": "https://:@github.com/pallets/flask-ext-migrate.git", "hash": "ea6a0666e08ce176031456dced635ca3c92c1386", "diff": "@@ -43,7 +43,7 @@ def fix_from_imports(red):\n modules = node.value\n \n if (len(modules) < 2 or\n- modules[0].value != 'flask' and modules[1].value != 'ext'):\n+ modules[0].value != 'flask' or modules[1].value != 'ext'):\n continue\n \n if len(modules) >= 3:\n", "old_path": "flask_ext_migrate/__init__.py", "rewrite": "ReplaceText(target='or' @(46,44)->(46,47))"} -{"repo": "https://:@github.com/SpockBotMC/SpockBot.git", "hash": "6c8e63b97e3d9617ce0ca9bea9a677902b5ef2fb", "diff": "@@ -42,7 +42,7 @@ class SelectSocket:\n \t\telse:\n \t\t\tslist = [(self.sock,), (), (self.sock,)]\n \t\ttimeout = self.timer.get_timeout()\n-\t\tif timeout>0:\n+\t\tif timeout>=0:\n \t\t\tslist.append(timeout)\n \t\ttry:\n \t\t\trlist, wlist, xlist = select.select(*slist)\n", "old_path": "spock/plugins/core/net.py", "rewrite": "ReplaceText(target='>=' @(45,12)->(45,13))"} -{"repo": "https://:@github.com/SpockBotMC/SpockBot.git", "hash": "bebe1187dd6432ec3b4b6dddb8246baef83c2203", "diff": "@@ -15,7 +15,7 @@ class PloaderFetch:\n @pl_announce('PloaderFetch')\n class SettingsPlugin:\n \tdef __init__(self, ploader, kwargs):\n-\t\tsettings = get_settings(kwargs, kwargs.get('settings', {}))\n+\t\tsettings = get_settings(kwargs.get('settings', {}), kwargs)\n \t\tplugin_list = settings.get('plugins', DefaultPlugins)\n \t\tplugins = []\n \t\tplugin_settings = {}\n", "old_path": "spock/plugins/core/settings.py", "rewrite": "ArgSwap(idxs=0<->1 @(18,13)->(18,25))"} -{"repo": "https://:@github.com/SpockBotMC/SpockBot.git", "hash": "bebe1187dd6432ec3b4b6dddb8246baef83c2203", "diff": "@@ -19,7 +19,7 @@ default_settings = {\n \n class StartPlugin:\n \tdef __init__(self, ploader, settings):\n-\t\tself.settings = utils.get_settings(settings, default_settings)\n+\t\tself.settings = utils.get_settings(default_settings, settings)\n \t\tself.event = ploader.requires('Event')\n \t\tself.net = ploader.requires('Net')\n \t\tself.auth = ploader.requires('Auth')\n", "old_path": "spock/plugins/helpers/start.py", "rewrite": "ArgSwap(idxs=0<->1 @(22,18)->(22,36))"} -{"repo": "https://:@github.com/hungpham2511/toppra.git", "hash": "fefd8430ad55fb09414a1d4c6d8be41e81977842", "diff": "@@ -19,7 +19,7 @@ def _find_left_index(ss_waypoints, s):\n for i in range(1, len(ss_waypoints)):\n if ss_waypoints[i - 1] <= s and s < ss_waypoints[i]:\n return i - 1\n- return len(ss_waypoints) - 1\n+ return len(ss_waypoints) - 2\n \n \n class Interpolator(object):\n", "old_path": "toppra/interpolator.py", "rewrite": "ReplaceText(target='2' @(22,31)->(22,32))"} -{"repo": "https://:@github.com/cmrivers/epipy.git", "hash": "c541e6f7f559c92279623aa3c2cb7f644247280e", "diff": "@@ -34,7 +34,7 @@ def generate_example_data(cluster_size, outbreak_len, clusters, gen_time, attrib\n for i in range(clusters):\n cluster_letter = np.random.choice([i for i in string.ascii_uppercase if i not in used])[0]\n cluster_name = 'Cluster' + cluster_letter\n- used.append(cluster_name)\n+ used.append(cluster_letter)\n \n ix_rng = pd.date_range('1/1/2014', periods=outbreak_len, freq='D')\n ix_date = np.random.choice(ix_rng, size=1)\n", "old_path": "epipy/data_generator.py", "rewrite": "ReplaceText(target='cluster_letter' @(37,20)->(37,32))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "9eda010f0342ace7a3ccc6452a8c8014c73bd130", "diff": "@@ -282,7 +282,7 @@ class AmberFormat(object):\n rawdata = self.parm_data[flag]\n self.parm_data[flag] = []\n for line in rawdata:\n- self.parm_data[flag].extend(self.formats[key].read(line))\n+ self.parm_data[flag].extend(self.formats[flag].read(line))\n \n try:\n for i, chg in enumerate(self.parm_data[self.charge_flag]):\n", "old_path": "chemistry/amber/amberformat.py", "rewrite": "ReplaceText(target='flag' @(285,61)->(285,64))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "9167bf221e4fe5d71ccaa6bf310fce60f09dc873", "diff": "@@ -192,7 +192,7 @@ def diff_files(file1, file2, ignore_whitespace=True,\n i = 1\n same = True\n if ignore_whitespace:\n- while l1 and l2:\n+ while l1 or l2:\n if l1.strip() != l2.strip():\n if l1.startswith('%VERSION') and l2.startswith('%VERSION'):\n l1 = f1.readline()\n", "old_path": "test/utils.py", "rewrite": "ReplaceText(target='or' @(195,21)->(195,24))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "b5fdf3d9b7095b96bcb8ac0bdbdfb3694d1d5220", "diff": "@@ -334,7 +334,7 @@ class ChamberParm(AmberParm):\n for i, j, k, l, m, n in zip(it, it, it, it, it, it):\n self.cmaps.append(\n Cmap(self.atoms[i-1], self.atoms[j-1], self.atoms[k-1],\n- self.atoms[k-1], self.atoms[m-1], self.cmap_types[n-1])\n+ self.atoms[l-1], self.atoms[m-1], self.cmap_types[n-1])\n )\n \n #===================================================\n", "old_path": "chemistry/amber/_chamberparm.py", "rewrite": "ReplaceText(target='l' @(337,36)->(337,37))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "820a80ccad22ee881042f03b83a0f07b5f1b537d", "diff": "@@ -1272,7 +1272,7 @@ class Structure(object):\n break\n elif a2.residue is None:\n break\n- elif a1.residue.name != a1.residue.name:\n+ elif a1.residue.name != a2.residue.name:\n break\n if not a1.type and not a2.type:\n if a1.name != a2.name: break\n", "old_path": "chemistry/structure.py", "rewrite": "ReplaceText(target='a2' @(1275,48)->(1275,50))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "4cba8197ae90a1af4abe0dee3f19e1c8c61c959f", "diff": "@@ -313,7 +313,7 @@ class Mol2File(object):\n if a == '0': continue\n for atom in res:\n if atom.name == a:\n- atom.connections.append(atom)\n+ res.connections.append(atom)\n break\n else:\n raise Mol2Error('Residue connection atom %s not '\n", "old_path": "parmed/formats/mol2.py", "rewrite": "ReplaceText(target='res' @(316,32)->(316,36))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "9be43ac3521aca71f84de9b2b11740b00dfdb1b6", "diff": "@@ -696,6 +696,6 @@ def _set_owner(atoms, owner_array, atm, mol_id):\n if not partner.marked:\n owner_array.append(partner.idx)\n _set_owner(atoms, owner_array, partner.idx, mol_id)\n- assert partner.marked != mol_id, 'Atom in multiple molecules!'\n+ assert partner.marked == mol_id, 'Atom in multiple molecules!'\n \n # ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n", "old_path": "parmed/charmm/psf.py", "rewrite": "ReplaceText(target='==' @(699,30)->(699,32))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "8f1dc98d485ea57e4046494ad1e6f84cfbd17f4f", "diff": "@@ -449,7 +449,7 @@ class ParameterSet(object):\n for name, residue in iteritems(self.residues):\n if isinstance(residue, ResidueTemplateContainer):\n for res in residue:\n- for atom in residue:\n+ for atom in res:\n atom.atom_type = self.atom_types[atom.type]\n else:\n assert isinstance(residue, ResidueTemplate), 'Wrong type!'\n", "old_path": "parmed/parameters.py", "rewrite": "ReplaceText(target='res' @(452,32)->(452,39))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "403c2874c1826cbe182386959a23118b33d1e27c", "diff": "@@ -219,7 +219,7 @@ class OpenMMParameterSet(ParameterSet):\n if tag not in sub_content:\n raise KeyError('Content of an attribute-containing element '\n 'specified incorrectly.')\n- attributes = [key for key in content if key != tag]\n+ attributes = [key for key in sub_content if key != tag]\n element_content = sub_content[tag]\n dest.write(' <%s' % tag)\n for attribute in attributes:\n", "old_path": "parmed/openmm/parameters.py", "rewrite": "ReplaceText(target='sub_content' @(222,49)->(222,56))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "657ba99e2338df75ef118155d95d144c7b33ab32", "diff": "@@ -281,7 +281,7 @@ T = RNAResidue('Thymine', 'T', ['THY', 'T3', 'T5', 'TN',\n \n WATER_NAMES = set(['WAT', 'HOH', 'TIP3', 'TIP4',\n 'TIP5', 'SPCE', 'SPC'])\n-SOLVENT_NAMES = WATER_NAMES ^ set({'SOL'})\n+SOLVENT_NAMES = WATER_NAMES | set({'SOL'})\n EXTRA_POINT_NAMES = set(['EP', 'LP'])\n CATION_NAMES = set(['Na+', 'Li+', 'Mg+', 'Rb+', 'MG', 'Cs+', 'POT', 'SOD',\n 'MG2', 'CAL', 'RUB', 'LIT', 'ZN2', 'CD2', 'NA', 'K+', 'K',\n", "old_path": "parmed/residue.py", "rewrite": "ReplaceText(target='|' @(284,28)->(284,29))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "bd2a1120adf53ab364dda802a272c19c7d335fdd", "diff": "@@ -374,7 +374,7 @@ class OpenMMParameterSet(ParameterSet):\n for attribute in attributes:\n dest.write(' %s=\"%s\"' % (attribute, sub_content[attribute]))\n escaped_element_content = escape(element_content, XML_ESCAPES)\n- dest.write('>%s\\n' % (element_content, tag))\n+ dest.write('>%s\\n' % (escaped_element_content, tag))\n else:\n raise TypeError('Incorrect type of the %s element content' % tag)\n dest.write(' \\n')\n", "old_path": "parmed/openmm/parameters.py", "rewrite": "ReplaceText(target='escaped_element_content' @(377,47)->(377,62))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "62e0c8aa4561628d005e84bbe97b1ef37f32dee5", "diff": "@@ -502,7 +502,7 @@ class OpenMMParameterSet(ParameterSet):\n patched_residue = residue.apply_patch(patch)\n \n for atom in patch.atoms:\n- if atom.name not in patched_residue:\n+ if atom.name not in residue:\n dest.write(' \\n' %\n (atom.name, atom.type, atom.charge))\n else:\n", "old_path": "parmed/openmm/parameters.py", "rewrite": "ReplaceText(target='residue' @(505,36)->(505,51))"} -{"repo": "https://:@github.com/parmed/ParmEd.git", "hash": "90fa4626c3db158047991044f4dd4619a7cc2599", "diff": "@@ -502,7 +502,7 @@ class AmberFormat(object):\n own_handle = True\n elif hasattr(fname, 'read'):\n prm = fname\n- own_handle = True\n+ own_handle = False\n else:\n raise TypeError('%s must be a file name or file-like object' % fname)\n \n", "old_path": "parmed/amber/amberformat.py", "rewrite": "ReplaceText(target='False' @(505,25)->(505,29))"} -{"repo": "https://:@github.com/xmunoz/sodapy.git", "hash": "76bdcfd9670e94c833b66b8894ea4153c27004ee", "diff": "@@ -71,7 +71,7 @@ class Socrata(object):\n else:\n self.uri_prefix = \"https://\"\n \n- if isinstance(timeout, (int, long, float)):\n+ if not isinstance(timeout, (int, long, float)):\n raise TypeError(\"Timeout must be numeric.\")\n self.timeout = timeout\n \n", "old_path": "sodapy/__init__.py", "rewrite": "ReplaceText(target='not ' @(74,11)->(74,11))"} -{"repo": "https://:@github.com/xmunoz/sodapy.git", "hash": "be6804a7f566eda08af7bb5d67f9c75512581189", "diff": "@@ -129,7 +129,7 @@ class Socrata(object):\n next(iter(kwargs)))\n \n if order:\n- kwargs.append(('order', order))\n+ params.append(('order', order))\n \n results = self._perform_request(\"get\", DATASETS_PATH,\n params=params + [('offset', offset)])\n", "old_path": "sodapy/__init__.py", "rewrite": "ReplaceText(target='params' @(132,12)->(132,18))"} -{"repo": "https://:@github.com/visgence/teleceptor.git", "hash": "4a8db10b79207b4bf8b48bbcaafdd03cc1166a2f", "diff": "@@ -397,7 +397,7 @@ def _updateCalibration(sensor, coefficients, timestamp, session):\n logging.debug(\"Comparing coefficients.\")\n \n # check if coefficients are different\n- if \"{}\".format(Cal.coefficients) == \"{}\".format(coefficients):\n+ if \"{}\".format(Cal.coefficients) != \"{}\".format(coefficients):\n logging.debug(\"Coefficients are different, updating...\")\n \n assert isinstance(coefficients, list)\n", "old_path": "teleceptor/api/sensors.py", "rewrite": "ReplaceText(target='!=' @(400,49)->(400,51))"} -{"repo": "https://:@github.com/projectmesa/mesa.git", "hash": "0893a8f03d7f22f1b064e66c97da3dddd987b7ea", "diff": "@@ -50,7 +50,7 @@ class Schelling(Model):\n self.homophily = homophily\n \n self.schedule = RandomActivation(self)\n- self.grid = SingleGrid(height, width, torus=True)\n+ self.grid = SingleGrid(width, height, torus=True)\n \n self.happy = 0\n self.datacollector = DataCollector(\n", "old_path": "examples/schelling/model.py", "rewrite": "ArgSwap(idxs=0<->1 @(53,20)->(53,30))"} -{"repo": "https://:@github.com/projectmesa/mesa.git", "hash": "9277b0f55ed63d3b8a32c7f3e52e3df1e7de6579", "diff": "@@ -31,7 +31,7 @@ class PdGrid(Model):\n Determines the agent activation regime.\n payoffs: (optional) Dictionary of (move, neighbor_move) payoffs.\n '''\n- self.grid = SingleGrid(height, width, torus=True)\n+ self.grid = SingleGrid(width, height, torus=True)\n self.schedule_type = schedule_type\n self.schedule = self.schedule_types[self.schedule_type](self)\n \n", "old_path": "examples/pd_grid/pd_grid/model.py", "rewrite": "ArgSwap(idxs=0<->1 @(34,20)->(34,30))"} -{"repo": "https://:@github.com/iCHEF/queryfilter.git", "hash": "96c25a4e5e750ae3415712d6812eee04d2187e64", "diff": "@@ -70,7 +70,7 @@ class DictFilterMixin(object):\n if not dictobj:\n # Point to which level doesn't exist exactly\n return handle_missing_field(\n- \"__\".join(level_field_names[:index+1])\n+ \"__\".join(parent_field_names[:index+1])\n )\n if final_field_name not in dictobj:\n return handle_missing_field(field_name)\n", "old_path": "queryfilter/base.py", "rewrite": "ReplaceText(target='parent_field_names' @(73,30)->(73,47))"} -{"repo": "https://:@github.com/slaclab/paws.git", "hash": "953037e723903e2213495189c9a99eb5445ecc9a", "diff": "@@ -293,7 +293,7 @@ class XRSDFitGUI(Operation):\n ubnd = xrsdkit.param_bound_defaults[param_nm][1] \n if xrsdkit.contains_param(self.inputs['param_bounds'],pop_nm,param_nm):\n lbnd = self.inputs['param_bounds'][pop_nm]['parameters'][param_nm][0]\n- lbnd = self.inputs['param_bounds'][pop_nm]['parameters'][param_nm][1]\n+ ubnd = self.inputs['param_bounds'][pop_nm]['parameters'][param_nm][1]\n # TODO: the bounds entries need to be connected to DoubleVars.\n pbnde1.insert(0,str(lbnd)) \n pbnde2.insert(0,str(ubnd))\n", "old_path": "paws/core/operations/PROCESSING/FITTING/XRSDFitGUI.py", "rewrite": "ReplaceText(target='ubnd' @(296,16)->(296,20))"} -{"repo": "https://:@github.com/PyFilesystem/pyfilesystem2.git", "hash": "cd1a973dd80e4083502db51844981f3457d13760", "diff": "@@ -258,7 +258,7 @@ class OSFS(FS):\n with convert_os_errors(\"getinfo\", path):\n _stat = os.stat(fsencode(sys_path))\n if \"lstat\" in namespaces:\n- _stat = os.lstat(fsencode(sys_path))\n+ _lstat = os.lstat(fsencode(sys_path))\n \n info = {\n \"basic\": {\"name\": basename(_path), \"is_dir\": stat.S_ISDIR(_stat.st_mode)}\n", "old_path": "fs/osfs.py", "rewrite": "ReplaceText(target='_lstat' @(261,16)->(261,21))"} -{"repo": "https://:@github.com/kevinzg/facebook-scraper.git", "hash": "c11dffbc1beef25271fb5bc6d2aa3aeb5b2079aa", "diff": "@@ -83,7 +83,7 @@ def _get_posts(path, pages=10, timeout=5, sleep=0, credentials=None, extra_info=\n yield post\n \n pages -= 1\n- if pages == 0:\n+ if pages <= 0:\n return\n \n cursor = _find_cursor(cursor_blob)\n", "old_path": "facebook_scraper.py", "rewrite": "ReplaceText(target='<=' @(86,17)->(86,19))"} -{"repo": "https://:@github.com/linkedin/naarad.git", "hash": "897858ba0d80fb74bbad40bfc8f96b0f59b0900e", "diff": "@@ -75,10 +75,10 @@ class Report(object):\n for metric in self.metric_list:\n metric_stats = []\n metric_stats_file, summary_stats, metric_plots, correlated_plots = self.discover_metric_data(self.output_directory, metric)\n- if metric_stats_file != '' and len(metric_plots) > 0:\n+ if metric_stats_file != '' or len(metric_plots) > 0:\n metric_stats = self.get_summary_table(metric_stats_file)\n metric_html = template_environment.get_template(self.report_templates['header']).render(custom_javascript_includes=[\"http://www.kryogenix.org/code/browser/sorttable/sorttable.js\"])\n metric_html += template_environment.get_template(self.report_templates['metric']).render(metric_stats=metric_stats, metric_plots=metric_plots, correlated_plots=correlated_plots, metric=metric)\n metric_html += template_environment.get_template(self.report_templates['footer']).render()\n- with open(os.path.join(self.output_directory, metric + '_report.html'),'w') as metric_report:\n+ with open(os.path.join(self.output_directory, metric + '_report.html'), 'w') as metric_report:\n metric_report.write(metric_html)\n", "old_path": "src/naarad/reporting/report.py", "rewrite": "ReplaceText(target='or' @(78,33)->(78,36))"} -{"repo": "https://:@github.com/linkedin/naarad.git", "hash": "74c5928b9c26fb7bd708fb9480dd2014b4305b89", "diff": "@@ -67,7 +67,7 @@ def graph_data(list_of_plots, output_directory, output_filename):\n plot_count = len(plots)\n \n if plot_count == 0:\n- return True, None\n+ return False, None\n \n graph_height, graph_width, graph_title = get_graph_metadata(list_of_plots)\n \n", "old_path": "src/naarad/graphing/matplotlib_naarad.py", "rewrite": "ReplaceText(target='False' @(70,11)->(70,15))"} -{"repo": "https://:@github.com/linkedin/naarad.git", "hash": "fa8753e74e301602fd50281ef36bc13cde421ac2", "diff": "@@ -204,7 +204,7 @@ class Metric(object):\n if i+1 in groupby_idxes:\n continue\n else:\n- out_csv = self.get_csv(groupby_names, self.columns[i])\n+ out_csv = self.get_csv(self.columns[i], groupby_names)\n if out_csv in data:\n data[out_csv].append(ts + ',' + words[i+1])\n else:\n", "old_path": "src/naarad/metrics/metric.py", "rewrite": "ArgSwap(idxs=0<->1 @(207,26)->(207,38))"} -{"repo": "https://:@gitlab.com/mailman/postorius.git", "hash": "308434aa505637da8275150484943b2442bc4b3c", "diff": "@@ -232,6 +232,6 @@ class ListMembersTest(ViewTestCase):\n {'q': 'not_a_member'})\n self.assertEqual(response.status_code, 200)\n self.assertEqual(len(response.context['members']), 0)\n- self.assertNotContains(response, member_2.email)\n+ self.assertNotContains(response, member_1.email)\n self.assertNotContains(response, member_2.email)\n \n", "old_path": "src/postorius/tests/mailman_api_tests/test_list_members.py", "rewrite": "ReplaceText(target='member_1' @(235,41)->(235,49))"} -{"repo": "https://:@github.com/crsmithdev/arrow.git", "hash": "fa5bce04765198071c17fa2ee889c16b5dbe6377", "diff": "@@ -94,7 +94,7 @@ class DateTimeFormatter(object):\n tz = dateutil_tz.tzutc() if dt.tzinfo is None else dt.tzinfo\n total_minutes = int(util.total_seconds(tz.utcoffset(dt)) / 60)\n \n- sign = '+' if total_minutes > 0 else '-'\n+ sign = '+' if total_minutes >= 0 else '-'\n total_minutes = abs(total_minutes)\n hour, minute = divmod(total_minutes, 60)\n \n", "old_path": "arrow/formatter.py", "rewrite": "ReplaceText(target='>=' @(97,40)->(97,41))"} -{"repo": "https://:@github.com/AICoE/log-anomaly-detector.git", "hash": "cd462c169c77152ae10cf3b0b99adfa51d53c043", "diff": "@@ -37,4 +37,4 @@ class SOMPYModel(BaseModel):\n dist = np.linalg.norm(self.model[x][y] - log)\n if dist < dist_smallest:\n dist_smallest = dist\n- return dist\n+ return dist_smallest\n", "old_path": "anomaly_detector/model/sompy_model.py", "rewrite": "ReplaceText(target='dist_smallest' @(40,15)->(40,19))"} -{"repo": "https://:@github.com/ksmet1977/luxpy.git", "hash": "6b6e6f7dd1dd257c8394dcd439f2bbb39be46fef", "diff": "@@ -896,7 +896,7 @@ def plot_spectrum_colors(spd = None, spdmax = None,\\\n cmfs = _CMF[cieobs]['bar']\n else:\n cmfs = cieobs\n- cmfs = cmfs[:,cmfs[1:].sum(axis=1)>0] # avoid div by zero in xyz-to-Yxy conversion\n+ cmfs = cmfs[:,cmfs[1:].sum(axis=0)>0] # avoid div by zero in xyz-to-Yxy conversion\n \n wavs = cmfs[0:1].T\n SL = cmfs[1:4].T \n", "old_path": "luxpy/color/utils/plotters.py", "rewrite": "ReplaceText(target='0' @(899,36)->(899,37))"} -{"repo": "https://:@github.com/melexis/sphinx-traceability-extension.git", "hash": "64a00adbbbec4088a6e0bb88b1ed43e26c2776bd", "diff": "@@ -760,7 +760,7 @@ def process_item_nodes(app, doctree, fromdocname):\n for source in node['sources']:\n for target in node['targets']:\n try:\n- env.traceability_collection.add_relation(target, node['type'], source)\n+ env.traceability_collection.add_relation(source, node['type'], target)\n except TraceabilityException as err:\n report_warning(env, err, env.docname, self.lineno)\n # The ItemLink node has no final representation, so is removed from the tree\n", "old_path": "mlx/traceability.py", "rewrite": "ArgSwap(idxs=0<->2 @(763,20)->(763,60))"} -{"repo": "https://:@github.com/rocky/python3-trepan.git", "hash": "2ff3e8439122926251ef9e7e4b7b89018feb9892", "diff": "@@ -47,7 +47,7 @@ and recolor all source code output.\"\"\"\n pass\n \n def run(self, args):\n- if len(args) >= 1 and 'reset' == args[0]:\n+ if len(args) > 1 and 'reset' == args[0]:\n highlight_type = self.get_highlight_type(args[1])\n if not highlight_type: return\n clear_file_format_cache()\n", "old_path": "trepan/processor/command/set_subcmd/highlight.py", "rewrite": "ReplaceText(target='>' @(50,21)->(50,23))"} -{"repo": "https://:@github.com/rocky/python3-trepan.git", "hash": "7fe5f2be86cf60c41b67ea4a6d24990b06dd536a", "diff": "@@ -4,7 +4,7 @@ from fn_helper import strarray_setup, compare_output\n \n \n class TestSkip(unittest.TestCase):\n- @unittest.skipIf('TRAVIS' not in os.environ,\n+ @unittest.skipIf('TRAVIS' in os.environ,\n \"FIXME: figure out why this doesn't work in travis\")\n def test_skip(self):\n \n", "old_path": "test/functional/test-skip.py", "rewrite": "ReplaceText(target=' in ' @(7,29)->(7,37))"} -{"repo": "https://:@github.com/rocky/python3-trepan.git", "hash": "ce7705f666154604fb580ca56cd22ec7cc6eae69", "diff": "@@ -183,7 +183,7 @@ dictionary that gets fed to trepan.Debugger.core.start().\n Parameter \"step_ignore\" specifies how many line events to ignore after the\n debug() call. 0 means don't even wait for the debug() call to finish.\n \"\"\"\n- if isinstance(Mdebugger.debugger_obj, Mdebugger.Trepan):\n+ if not isinstance(Mdebugger.debugger_obj, Mdebugger.Trepan):\n Mdebugger.debugger_obj = Mdebugger.Trepan(dbg_opts)\n Mdebugger.debugger_obj.core.add_ignore(debug, stop)\n pass\n", "old_path": "trepan/api.py", "rewrite": "ReplaceText(target='not ' @(186,7)->(186,7))"} -{"repo": "https://:@github.com/rocky/python3-trepan.git", "hash": "342c05260ac86fcc4e6d711a3f579c71d1d53d64", "diff": "@@ -116,7 +116,7 @@ See also:\n pass\n \n sys_version = version_info.major + (version_info.minor / 10.0)\n- if len(args) >= 1 and args[1] == '.':\n+ if len(args) >= 1 and args[0] == '.':\n try:\n if pretty:\n deparsed = deparse_code(sys_version, co)\n", "old_path": "trepan/processor/command/deparse.py", "rewrite": "ReplaceText(target='0' @(119,35)->(119,36))"} -{"repo": "https://:@github.com/kanaka/websockify.git", "hash": "0da91c7fdb3a49873121594e1820eef7ac078595", "diff": "@@ -225,7 +225,7 @@ Sec-WebSocket-Accept: %s\\r\n payload_len = len(buf)\n if payload_len <= 125:\n header = struct.pack('>BB', b1, payload_len)\n- elif payload_len > 125 and payload_len <= 65536:\n+ elif payload_len > 125 and payload_len < 65536:\n header = struct.pack('>BBH', b1, 126, payload_len)\n elif payload_len >= 65536:\n header = struct.pack('>BBQ', b1, 127, payload_len)\n", "old_path": "websocket.py", "rewrite": "ReplaceText(target='<' @(228,47)->(228,49))"} -{"repo": "https://:@github.com/annoviko/pyclustering.git", "hash": "70597e34bed02d7c3cb4a3d2e2ed6b30cd6cb3df", "diff": "@@ -320,7 +320,7 @@ class hysteresis_network(network):\n \r\n if (collect_dynamic is False):\r\n dyn_state.append(self._states);\r\n- dyn_time.append(t);\r\n+ dyn_time.append(time);\r\n \r\n return hysteresis_dynamic(dyn_state, dyn_time);\r\n \r\n", "old_path": "pyclustering/nnet/hysteresis.py", "rewrite": "ReplaceText(target='time' @(323,28)->(323,29))"} -{"repo": "https://:@github.com/annoviko/pyclustering.git", "hash": "7e1bf5ed9cc2817c00c7e5e216adb4cc9fa8fc49", "diff": "@@ -123,7 +123,7 @@ class ttsas(bsas):\n \r\n index_cluster, distance = self._find_nearest_cluster(point);\r\n \r\n- if distance < self._threshold:\r\n+ if distance <= self._threshold:\r\n self.__append_to_cluster(index_cluster, index_point, point);\r\n elif distance > self._threshold2:\r\n self.__allocate_cluster(index_point, point);\r\n", "old_path": "pyclustering/cluster/ttsas.py", "rewrite": "ReplaceText(target='<=' @(126,20)->(126,21))"} -{"repo": "https://:@github.com/annoviko/pyclustering.git", "hash": "cdb0ca92c076282084f54816d681f7d0a1588066", "diff": "@@ -64,7 +64,7 @@ class XmeansTestTemplates:\n assertion.eq(expected_wce, wce)\r\n \r\n if expected_cluster_length is not None:\r\n- assertion.eq(len(centers), len(expected_cluster_length))\r\n+ assertion.eq(len(expected_cluster_length), len(centers))\r\n \r\n obtained_cluster_sizes.sort()\r\n expected_cluster_length.sort()\r\n", "old_path": "pyclustering/cluster/tests/xmeans_templates.py", "rewrite": "ArgSwap(idxs=0<->1 @(67,12)->(67,24))"} -{"repo": "https://:@github.com/evolbioinfo/pastml.git", "hash": "06384fd264d834bff88efdc6bf70a098b06f307d", "diff": "@@ -232,7 +232,7 @@ def parsimonious_acr(tree, feature, prediction_method, states, num_nodes, num_ti\n .format(feature, num_steps))\n num_scenarios, unresolved_nodes = choose_parsimonious_states(tree, feature)\n logger.debug('{} node{} unresolved ({:.2f}%) for {}, leading to {:g} ancestral scenario{}.'\n- .format(unresolved_nodes, 's are' if unresolved_nodes > 1 else ' is',\n+ .format(unresolved_nodes, 's are' if unresolved_nodes != 1 else ' is',\n unresolved_nodes * 100 / num_nodes, feature,\n num_scenarios, 's' if num_scenarios > 1 else ''))\n \n", "old_path": "pastml/parsimony.py", "rewrite": "ReplaceText(target='!=' @(235,71)->(235,72))"} -{"repo": "https://:@github.com/jirifilip/pyARC.git", "hash": "e18a6c280f30bc753192bfa83f311ce36915aca4", "diff": "@@ -42,7 +42,7 @@ class TestClassAssociationRule(unittest.TestCase):\n sorted_cars = sorted([car1, car2, car3, car4], reverse=True)\n \n assert car1 < car2\n- assert car2 < car3\n+ assert car2 > car3\n assert car3 < car2\n assert car4 > car3\n assert car1.antecedent <= transaction1\n", "old_path": "cba/test/test_class_association_rule.py", "rewrite": "ReplaceText(target='>' @(45,20)->(45,21))"} -{"repo": "https://:@github.com/oblalex/verboselib.git", "hash": "5ec91a09ae9f0674513f4953111009b93eaad74a", "diff": "@@ -123,4 +123,4 @@ class VerboselibTranslationTestCase(unittest.TestCase):\n \n t1.merge(t2)\n self.assertEqual(t1.ugettext(\"Hello\"), \"\u0412\u0456\u0442\u0430\u044e\")\n- self.assertEqual(t2.ugettext(\"Good bye\"), \"\u0414\u043e \u0437\u0443\u0441\u0442\u0440\u0456\u0447\u0456\")\n+ self.assertEqual(t1.ugettext(\"Good bye\"), \"\u0414\u043e \u0437\u0443\u0441\u0442\u0440\u0456\u0447\u0456\")\n", "old_path": "tests/test_package.py", "rewrite": "ReplaceText(target='t1' @(126,25)->(126,27))"} -{"repo": "https://:@github.com/lexndru/hap.git", "hash": "5ef18f88572400983578d8723663562329066779", "diff": "@@ -87,7 +87,7 @@ class Cache(object):\n tuple: Boolean for success read and string for size or error.\n \"\"\"\n \n- if len(cache) == 0:\n+ if len(cache_path) == 0:\n return False, \"missing cache path\"\n if len(cache) == 0:\n return False, \"missing cache data\"\n", "old_path": "hap/cache.py", "rewrite": "ReplaceText(target='cache_path' @(90,15)->(90,20))"} -{"repo": "https://:@github.com/littlezz/island-backup.git", "hash": "fed75aebccfa31e418e351492618a2d50c15b9cb", "diff": "@@ -103,7 +103,7 @@ class ImageManager:\n print('this is {} in busying'.format(len(self.busying)))\n urls = []\n for i, url in enumerate(self.busying):\n- if i > 3:\n+ if i >= 3:\n break\n urls.append(url)\n \n", "old_path": "main.py", "rewrite": "ReplaceText(target='>=' @(106,17)->(106,18))"} -{"repo": "https://:@github.com/parrt/dtreeviz.git", "hash": "aa5b4811af5c5a5c9620705fc44ffd9e48377664", "diff": "@@ -1121,7 +1121,7 @@ def draw_legend(shadow_tree, target_name, filename, colors=None):\n boxes = []\n for i, c in enumerate(class_values):\n box = patches.Rectangle((0, 0), 20, 10, linewidth=.4, edgecolor=colors['rect_edge'],\n- facecolor=color_map[c], label=class_names[c])\n+ facecolor=color_map[c], label=class_names[i])\n boxes.append(box)\n \n fig, ax = plt.subplots(1, 1, figsize=(1,1))\n", "old_path": "dtreeviz/trees.py", "rewrite": "ReplaceText(target='i' @(1124,74)->(1124,75))"} -{"repo": "https://:@github.com/parrt/dtreeviz.git", "hash": "01cc13f495decbd6f8f716d7be586e02864f3434", "diff": "@@ -809,7 +809,7 @@ def dtreeviz(tree_model: (tree.DecisionTreeRegressor, tree.DecisionTreeClassifie\n lcolor = colors['highlight']\n lpw = \"1.2\"\n if node.right.id in highlight_path:\n- lcolor = colors['highlight']\n+ rcolor = colors['highlight']\n rpw = \"1.2\"\n edges.append( f'{nname} -> {left_node_name} [penwidth={lpw} color=\"{lcolor}\" label=<{llabel}>]' )\n edges.append( f'{nname} -> {right_node_name} [penwidth={rpw} color=\"{rcolor}\" label=<{rlabel}>]' )\n", "old_path": "dtreeviz/trees.py", "rewrite": "ReplaceText(target='rcolor' @(812,12)->(812,18))"} -{"repo": "https://:@github.com/4teamwork/ftw.workspace.git", "hash": "b12970101f5ca213e4604c2c3cf2f767f911b71e", "diff": "@@ -75,7 +75,7 @@ class AssignableUsersVocabulary(object):\n if user not in groups:\n groups.add(user)\n \n- if getattr(aq_base(workspace), '__ac_local_roles_block__', None):\n+ if getattr(aq_base(context), '__ac_local_roles_block__', None):\n cont = False\n else:\n context = aq_parent(context)\n", "old_path": "ftw/workspace/vocabularies.py", "rewrite": "ReplaceText(target='context' @(78,31)->(78,40))"} -{"repo": "https://:@github.com/regulusweb/wagtail-extensions.git", "hash": "ea388649a0c6dc6fbc1ce018d767c8b583486523", "diff": "@@ -74,7 +74,7 @@ class ContactDetailsSetting(BaseSetting):\n today = date.today()\n cache_key = self.get_opening_today_cache_key(today)\n times = cache.get(cache_key)\n- if times is not None:\n+ if times is None:\n opening_times = self.primary_opening_times\n if opening_times:\n specific_times = utils.first_true(opening_times, lambda x: x.get('date') == today)\n", "old_path": "wagtail_extensions/models.py", "rewrite": "ReplaceText(target=' is ' @(77,16)->(77,24))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "eaa1165f7ceb19b8e98828fea2894d275ffe5743", "diff": "@@ -394,7 +394,7 @@ class MyHandler():\n elif cmd[0] == \"get\":\n if cmd[1] == \"disabled\" and cmd[2] == \"modules\":\n send(str(self.disabled_mods))\n- if cmd[2] == \"enabled\" and cmd[2] == \"modules\":\n+ if cmd[1] == \"enabled\" and cmd[2] == \"modules\":\n send(str([i for i in self.modules if i not in self.disabled_mods]))\n \n def handle_msg(self, msgtype, c, e):\n", "old_path": "handler.py", "rewrite": "ReplaceText(target='1' @(397,19)->(397,20))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "6c801ad70e0a9d1a963b9b560f9c654616e64a3b", "diff": "@@ -260,7 +260,7 @@ class BotHandler():\n if self.log_to_ctrlchan:\n # somewhat hacky fix\n if target != CTRLCHAN:\n- self.connection.send_raw((\"PRIVMSG %s :(%s) <%s> %s\" % (CTRLCHAN, target, nick, log))\\\n+ self.connection.send_raw((\"PRIVMSG %s :(%s) <%s> %s\" % (CTRLCHAN, target, nick, msg))\\\n .replace(\"\\n\", \"\").replace(\"\\r\", \"\"))\n self.logs[target].append([day, log])\n self.logfiles[target].write(log)\n", "old_path": "handler.py", "rewrite": "ReplaceText(target='msg' @(263,96)->(263,99))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "b5c181736ff1adc6b665d2d4a80bd6141aaa549e", "diff": "@@ -331,7 +331,7 @@ class BotHandler():\n return\n if cmdargs[0] != '#':\n cmdargs = '#' + cmdargs\n- if cmdargs in self.channels and len(cmd) > 0 and cmd[1] != \"force\":\n+ if cmdargs in self.channels or len(cmd) > 0 and cmd[1] != \"force\":\n send(\"%s is already a member of %s\" % (NICK, cmdargs))\n return\n c.join(cmd[0])\n", "old_path": "handler.py", "rewrite": "ReplaceText(target='or' @(334,36)->(334,39))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "20dab902837bb40599cb34afe152dfc780f2854e", "diff": "@@ -315,7 +315,7 @@ class BotHandler():\n # -pub\n # -private\n #log to sqlite logger\n- self.logger.log(target, nick, isop, msg, msgtype)\n+ self.logger.log(nick, target, isop, msg, msgtype)\n \n if self.log_to_ctrlchan:\n ctrlchan = self.config['core']['ctrlchan']\n", "old_path": "handler.py", "rewrite": "ArgSwap(idxs=0<->1 @(318,8)->(318,23))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "7b544654a37dd0ca467157c76aaa51bb6e9a73e8", "diff": "@@ -442,7 +442,7 @@ class BotHandler():\n if cmd_obj.is_limited() and self.abusecheck(send, nick, cmd_obj.limit, msgtype, cmd[len(cmdchar):]):\n return\n args = self.do_args(cmd_obj.args, send, nick, target, e.source, c, cmd_name, msgtype)\n- cmd_obj.run(send, cmdargs, args, cmd_name, target, nick, self.db.get())\n+ cmd_obj.run(send, cmdargs, args, cmd_name, nick, target, self.db.get())\n # special commands\n if cmd.startswith(cmdchar):\n if cmd[len(cmdchar):] == 'reload':\n", "old_path": "handler.py", "rewrite": "ArgSwap(idxs=4<->5 @(445,16)->(445,27))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "8d5e5ff45a32d6849e0daf38414e818b4d8e4a96", "diff": "@@ -38,7 +38,7 @@ def cmd(send, msg, args):\n name = 'passthrough'\n else:\n name = name[4:]\n- names.append(i)\n+ names.append(name)\n send(\"Current filter(s): %s\" % \", \".join(names))\n elif msg == 'list':\n send(\"Available filters are %s\" % \", \".join(output_filters.keys()))\n", "old_path": "commands/filter.py", "rewrite": "ReplaceText(target='name' @(41,25)->(41,26))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "0e38c8226ab070d321cbed3ade449c2833d0f36e", "diff": "@@ -154,7 +154,7 @@ def handle_accept(handler, cmd):\n return \"Missing argument.\"\n if not cmd[1].isdigit():\n return \"Not A Valid Positive Integer\"\n- elif not handler.issues or len(handler.issues) < int(cmd[1]):\n+ elif not handler.issues or len(handler.issues) <= int(cmd[1]):\n return \"Not a valid issue\"\n else:\n num = int(cmd[1])\n", "old_path": "helpers/control.py", "rewrite": "ReplaceText(target='<=' @(157,51)->(157,52))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "1694edfac9e6ee93ce648c78be52d19360b7e364", "diff": "@@ -54,7 +54,7 @@ def do_add_quote(cmd, conn, isadmin, send, args):\n cursor = conn.execute('INSERT INTO quotes(quote, nick, submitter) VALUES(?,?,?)', (quote[0], quote[1], args['nick']))\n qid = cursor.lastrowid\n if isadmin:\n- cursor.execute('UPDATE quotes SET approved=1 WHERE id=?', (qid,))\n+ conn.execute('UPDATE quotes SET approved=1 WHERE id=?', (qid,))\n send(\"Added quote %d!\" % qid)\n else:\n send(\"Quote submitted for approval.\", target=args['nick'])\n", "old_path": "commands/quote.py", "rewrite": "ReplaceText(target='conn' @(57,8)->(57,14))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "aa3079c68c6bfed92fe95cf92dbed87d1f3c91d2", "diff": "@@ -33,7 +33,7 @@ def handle_traceback(ex, c, target, config, source=\"the bot\"):\n errtarget = ctrlchan if prettyerrors else target\n if prettyerrors:\n if name == 'CSLException':\n- c.privmsg(target, \"%s -- %s\" % (name, output))\n+ c.privmsg(target, \"%s -- %s\" % (source, output))\n else:\n c.privmsg(target, \"An %s has occured in %s. See the control channel for details.\" % (name, source))\n c.privmsg(errtarget, '%s -- %s in %s on line %s: %s' % (source, name, trace[0], trace[1], output))\n", "old_path": "helpers/traceback.py", "rewrite": "ReplaceText(target='source' @(36,44)->(36,48))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "8bd3d1038ba16c4c097b51c1bdce1a54a5fb43af", "diff": "@@ -38,7 +38,7 @@ def get_definition(msg):\n elif not index.isdigit() or int(index) >= len(data) or int(index) == 0:\n output = \"Invalid Index\"\n else:\n- output = data[int(index)+1]['definition']\n+ output = data[int(index)-1]['definition']\n output = output.splitlines()\n return ' '.join(output)\n \n", "old_path": "commands/urban.py", "rewrite": "ReplaceText(target='-' @(41,32)->(41,33))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "a72f1944cc07392f2f1c023448bfc0eceb6cd8cd", "diff": "@@ -40,7 +40,7 @@ def get_definition(msg):\n output = \"UrbanDictionary doesn't have an answer for you.\"\n elif index is None:\n output = data[0]['definition']\n- elif not index.isdigit() or int(index) >= len(data) or int(index) == 0:\n+ elif not index.isdigit() or int(index) > len(data) or int(index) == 0:\n output = \"Invalid Index\"\n else:\n output = data[int(index)-1]['definition']\n", "old_path": "commands/urban.py", "rewrite": "ReplaceText(target='>' @(43,43)->(43,45))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "ffc2cedcd394bf7076f4e8882d7f8773fc2a529b", "diff": "@@ -24,7 +24,7 @@ from helpers.command import Command\n def cmd(send, msg, args):\n \"\"\"Finds a random quote from tjbash.org given search criteria\n \"\"\"\n- if len(msg) < 0:\n+ if len(msg) == 0:\n url = 'http://tjbash.org/random1'\n else:\n url = 'http://tjbash.org/search?query='\n", "old_path": "commands/tjbash.py", "rewrite": "ReplaceText(target='==' @(27,16)->(27,17))"} -{"repo": "https://:@github.com/tjcsl/cslbot.git", "hash": "0a9fcb6ce10d7d7dca87496e3abb02faa1c35794", "diff": "@@ -87,7 +87,7 @@ def build_markov(cursor, speaker, cmdchar, ctrlchan):\n def get_markov(cursor, speaker, handler, cmdchar, ctrlchan):\n markov = cursor.query(Babble).filter(Babble.nick == speaker).first()\n if not markov:\n- update_markov(cursor, speaker, cmdchar, ctrlchan)\n+ update_markov(handler, speaker, cmdchar, ctrlchan)\n markov = cursor.query(Babble).filter(Babble.nick == speaker).first()\n elif time.time() - markov.time > CACHE_LIFE:\n handler.workers.defer(0, False, update_markov, handler, speaker, cmdchar, ctrlchan)\n", "old_path": "commands/babble.py", "rewrite": "ReplaceText(target='handler' @(90,22)->(90,28))"} -{"repo": "https://:@github.com/ThibHlln/smartpy.git", "hash": "6e02ac69689bff3802de8dcc5b15237996379aae", "diff": "@@ -26,7 +26,7 @@ def nash_sutcliffe(evaluation, simulation):\n \n \n def groundwater_constraint(evaluation, simulation):\n- if (evaluation[0] - 0.1 <= simulation[0]) or (simulation[0] <= evaluation[0] + 0.1):\n+ if (evaluation[0] - 0.1 <= simulation[0]) and (simulation[0] <= evaluation[0] + 0.1):\n return 1.0\n else:\n return 0.0\n", "old_path": "SMARTobjective.py", "rewrite": "ReplaceText(target='and' @(29,46)->(29,48))"} -{"repo": "https://:@github.com/satellogic/orbit-predictor.git", "hash": "672c75a9b64b6735c08bd5270855588e3d514065", "diff": "@@ -30,7 +30,7 @@ from orbit_predictor.predictors.base import CartesianPredictor, logger\n class TLEPredictor(CartesianPredictor):\n \n def __init__(self, sate_id, source):\n- super(TLEPredictor, self).__init__(source, sate_id)\n+ super(TLEPredictor, self).__init__(sate_id, source)\n self._iterations = 0\n \n def _propagate_eci(self, when_utc=None):\n", "old_path": "orbit_predictor/predictors/tle.py", "rewrite": "ArgSwap(idxs=0<->1 @(33,8)->(33,42))"} -{"repo": "https://:@github.com/dipu-bd/lightnovel-crawler.git", "hash": "773695654f273c9f7191817c4dd64e8322325809", "diff": "@@ -39,7 +39,7 @@ class LightNovelOnline(Crawler):\n logger.debug('Visiting %s', self.novel_url)\n soup = self.get_soup(self.novel_url)\n \n- self.novel_id = urlparse(self.novel_url).path.split('/')[1]\n+ self.novel_id = urlparse(self.novel_url).path.split('/')[-1]\n logger.info(\"Novel Id: %s\", self.novel_id)\n \n self.novel_title = soup.select_one(\n", "old_path": "lncrawl/sources/lightnovelonline.py", "rewrite": "ReplaceText(target='-1' @(42,65)->(42,66))"} -{"repo": "https://:@github.com/raphaelm/python-sepaxml.git", "hash": "024a11dd1e26d08bbeb028a2a13dabcb509011ec", "diff": "@@ -54,7 +54,7 @@ def make_id(name):\n 12 char rand hex string.\n \"\"\"\n r = get_rand_string(12)\n- if len(name) <= 22:\n+ if len(name) > 22:\n name = name[:22]\n return name + \"-\" + r\n \n", "old_path": "sepadd/utils.py", "rewrite": "ReplaceText(target='>' @(57,17)->(57,19))"} -{"repo": "https://:@github.com/raphaelm/python-sepaxml.git", "hash": "98934ba5c863ffbc2bc770a34dd9ddea8edf2577", "diff": "@@ -70,7 +70,7 @@ def int_to_decimal_str(integer):\n @return string The amount in currency with full stop decimal separator\n \"\"\"\n int_string = str(integer)\n- if len(int_string) < 2:\n+ if len(int_string) <= 2:\n return \"0.\" + int_string.zfill(2)\n else:\n return int_string[:-2] + \".\" + int_string[-2:]\n", "old_path": "sepaxml/utils.py", "rewrite": "ReplaceText(target='<=' @(73,23)->(73,24))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "2585a323ac57004179b0ba643f953162650f39ee", "diff": "@@ -51,7 +51,7 @@ def peak_local_max(image, min_distance=10, threshold='deprecated',\n threshold_rel = threshold\n # find top corner candidates above a threshold\n corner_threshold = max(np.max(image.ravel()) * threshold_rel, threshold_abs)\n- image_t = (image >= corner_threshold) * 1\n+ image_t = (image > corner_threshold) * 1\n \n # get coordinates of peaks\n coordinates = np.transpose(image_t.nonzero())\n", "old_path": "skimage/feature/peak.py", "rewrite": "ReplaceText(target='>' @(54,21)->(54,23))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "8084faf1f69c2c4ba79b6e85c7a2a06e1e7c77b8", "diff": "@@ -133,7 +133,7 @@ def reconstruction(seed, mask, method='dilation', selem=None, offset=None):\n if offset == None:\n if not all([d % 2 == 1 for d in selem.shape]):\n ValueError(\"Footprint dimensions must all be odd\")\n- offset = np.array([d / 2 for d in selem.shape])\n+ offset = np.array([d // 2 for d in selem.shape])\n # Cross out the center of the selem\n selem[[slice(d, d + 1) for d in offset]] = False\n \n", "old_path": "skimage/morphology/greyreconstruct.py", "rewrite": "ReplaceText(target='//' @(136,29)->(136,30))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "d1629aec0f1a861106d54cb015b238e7fe542936", "diff": "@@ -28,7 +28,7 @@ def approximate_polygon(coords, tolerance):\n ----------\n .. [1] http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm\n \"\"\"\n- if tolerance == 0:\n+ if tolerance <= 0:\n return coords\n \n chain = np.zeros(coords.shape[0], 'bool')\n", "old_path": "skimage/measure/_polygon.py", "rewrite": "ReplaceText(target='<=' @(31,17)->(31,19))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "22f94d8707d3d9d2a36493403cbaeb61213dd68b", "diff": "@@ -163,7 +163,7 @@ def rotate(image, angle, resize=False, order=1, mode='constant', cval=0.):\n tform = tform1 + tform2 + tform3\n \n output_shape = None\n- if not resize:\n+ if resize:\n # determine shape of output image\n corners = np.array([[1, 1], [1, rows], [cols, rows], [cols, 1]])\n corners = tform(corners - 1)\n", "old_path": "skimage/transform/_warps.py", "rewrite": "ReplaceText(target='' @(166,7)->(166,11))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "794a4d7daebfdcb217fbf0a73b9d42e256ce45cd", "diff": "@@ -1085,7 +1085,7 @@ def _validate_lengths(narray, number_elements):\n normshp = _normalize_shape(narray, number_elements)\n for i in normshp:\n chk = [1 if x is None else x for x in i]\n- chk = [1 if x > 0 else -1 for x in chk]\n+ chk = [1 if x >= 0 else -1 for x in chk]\n if (chk[0] < 0) or (chk[1] < 0):\n fmt = \"%s cannot contain negative values.\"\n raise ValueError(fmt % (number_elements,))\n", "old_path": "skimage/util/arraypad.py", "rewrite": "ReplaceText(target='>=' @(1088,22)->(1088,23))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "5f46fd01be76ac8c7252ab35ba58609e81ad0ca0", "diff": "@@ -124,7 +124,7 @@ def _star_filter_kernel(m, n):\n def _suppress_lines(feature_mask, image, sigma, line_threshold):\n Axx, Axy, Ayy = _compute_auto_correlation(image, sigma)\n feature_mask[(Axx + Ayy) * (Axx + Ayy)\n- < line_threshold * (Axx * Ayy - Axy * Axy)] = 0\n+ > line_threshold * (Axx * Ayy - Axy * Axy)] = 0\n return feature_mask\n \n \n", "old_path": "skimage/feature/censure.py", "rewrite": "ReplaceText(target='>' @(127,17)->(127,18))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "05aeb7c7fe89a70fa18294d69c9e12dd58fa5c08", "diff": "@@ -159,7 +159,7 @@ def reconstruction(seed, mask, method='dilation', selem=None, offset=None):\n # Create a list of strides across the array to get the neighbors within\n # a flattened array\n value_stride = np.array(images.strides[1:]) / images.dtype.itemsize\n- image_stride = images.strides[0] / images.dtype.itemsize\n+ image_stride = images.strides[0] // images.dtype.itemsize\n selem_mgrid = np.mgrid[[slice(-o, d - o)\n for d, o in zip(selem.shape, offset)]]\n selem_offsets = selem_mgrid[:, selem].transpose()\n", "old_path": "skimage/morphology/greyreconstruct.py", "rewrite": "ReplaceText(target='//' @(162,37)->(162,38))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "05fbc3fbfcc00157841c18b15b171d6477bfb5da", "diff": "@@ -119,7 +119,7 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=None,\n spacing = np.array(spacing, np.double)\n if not isinstance(sigma, coll.Iterable):\n sigma = np.array([sigma, sigma, sigma], np.double)\n- elif isinstance(spacing, (list, tuple)):\n+ elif isinstance(sigma, (list, tuple)):\n sigma = np.array(sigma, np.double)\n if (sigma > 0).any():\n sigma /= spacing.astype(np.double)\n", "old_path": "skimage/segmentation/slic_superpixels.py", "rewrite": "ReplaceText(target='sigma' @(122,20)->(122,27))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "1ca0eef825188ac5e9fc84b232b4783c166933ac", "diff": "@@ -94,7 +94,7 @@ def view_as_blocks(arr_in, block_shape):\n \n arr_in = np.ascontiguousarray(arr_in)\n \n- new_shape = tuple(arr_shape / block_shape) + tuple(block_shape)\n+ new_shape = tuple(arr_shape // block_shape) + tuple(block_shape)\n new_strides = tuple(arr_in.strides * block_shape) + arr_in.strides\n \n arr_out = as_strided(arr_in, shape=new_shape, strides=new_strides)\n", "old_path": "skimage/util/shape.py", "rewrite": "ReplaceText(target='//' @(97,32)->(97,33))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "a38b1c12579214cf77785e9c85f30202b2048c4f", "diff": "@@ -136,7 +136,7 @@ def _clahe(image, ntiles_x, ntiles_y, clip_limit, nbins=128):\n image = pad(image, ((0, h_pad), (0, w_pad)), mode='reflect')\n h_inner, w_inner = image.shape\n \n- bin_size = 1 + NR_OF_GREY / nbins\n+ bin_size = 1 + NR_OF_GREY // nbins\n lut = np.arange(NR_OF_GREY)\n lut //= bin_size\n img_blocks = view_as_blocks(image, (height, width))\n", "old_path": "skimage/exposure/_adapthist.py", "rewrite": "ReplaceText(target='//' @(139,30)->(139,31))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "9a192bf1cb899632253619385ad9814dbd61f63a", "diff": "@@ -16,7 +16,7 @@ from skimage import graph, data, io, segmentation, color\n img = data.coffee()\n labels = segmentation.slic(img, compactness=30, n_segments=400)\n g = graph.rag_mean_color(img, labels)\n-labels2 = graph.merge_hierarchical(g, labels, 40)\n+labels2 = graph.merge_hierarchical(labels, g, 40)\n g2 = graph.rag_mean_color(img, labels2)\n \n out = color.label2rgb(labels2, img, kind='avg')\n", "old_path": "doc/examples/plot_rag_merge.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,10)->(19,34))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "4bdde3d2aef2dd184e0b907983a15167326aec55", "diff": "@@ -254,7 +254,7 @@ class ImageCollection(object):\n if ((self.conserve_memory and n != self._cached) or\n (self.data[idx] is None)):\n if self._frame_index:\n- fname, img_num = self._frame_index[idx]\n+ fname, img_num = self._frame_index[n]\n self.data[idx] = self.load_func(fname, img_num=img_num,\n **self.load_func_kwargs)\n else:\n", "old_path": "skimage/io/collection.py", "rewrite": "ReplaceText(target='n' @(257,55)->(257,58))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "84bcb583d76c1ec507b3d5794b6705d06383ced8", "diff": "@@ -288,7 +288,7 @@ def hessian_matrix_eigvals(Hxx, Hxy, Hyy):\n \n \"\"\"\n \n- return _image_orthogonal_matrix22_eigvals(Hyy, Hxy, Hyy)\n+ return _image_orthogonal_matrix22_eigvals(Hxx, Hxy, Hyy)\n \n \n def corner_kitchen_rosenfeld(image, mode='constant', cval=0):\n", "old_path": "skimage/feature/corner.py", "rewrite": "ReplaceText(target='Hxx' @(291,46)->(291,49))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "33e36542d5f457a50c5fa00371fb9fe18a620f15", "diff": "@@ -84,7 +84,7 @@ def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,\n -min_angle:min_angle + 1]\n \n for dist_idx, angle_idx in coords:\n- accum = hspace[dist_idx, angle_idx]\n+ accum = hspace_max[dist_idx, angle_idx]\n if accum > threshold:\n # absolute coordinate grid for local neighbourhood suppression\n dist_nh = dist_idx + dist_ext\n", "old_path": "skimage/transform/hough_transform.py", "rewrite": "ReplaceText(target='hspace_max' @(87,16)->(87,22))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "bc52e4a411ab6d4aa10d38281e979158e6f21f19", "diff": "@@ -105,7 +105,7 @@ def hough_line_peaks(hspace, angles, dists, min_distance=9, min_angle=10,\n angle_nh[angle_high] -= cols\n \n # suppress neighbourhood\n- hspace[dist_nh, angle_nh] = 0\n+ hspace_max[dist_nh, angle_nh] = 0\n \n # add current line to peaks\n hspace_peaks.append(accum)\n", "old_path": "skimage/transform/hough_transform.py", "rewrite": "ReplaceText(target='hspace_max' @(108,12)->(108,18))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "2fb59b92435b9f67c091871cba701323b784ade7", "diff": "@@ -48,7 +48,7 @@ def imread(fname, dtype=None, img_num=None, **kwargs):\n im = Image.open(f)\n return pil_to_ndarray(im, dtype=dtype, img_num=img_num)\n else:\n- im = Image.open(f)\n+ im = Image.open(fname)\n return pil_to_ndarray(im, dtype=dtype, img_num=img_num)\n \n \n", "old_path": "skimage/io/_plugins/pil_plugin.py", "rewrite": "ReplaceText(target='fname' @(51,24)->(51,25))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "4ee3b2c5ac89f946a9b4bbf26665411bb7241ff4", "diff": "@@ -20,7 +20,7 @@ image = data.astronaut()\n rows, cols, dim = image.shape\n pyramid = tuple(pyramid_gaussian(image, downscale=2))\n \n-composite_image = np.zeros((rows, cols + cols / 2, 3), dtype=np.double)\n+composite_image = np.zeros((rows, cols + cols // 2, 3), dtype=np.double)\n \n composite_image[:rows, :cols, :] = pyramid[0]\n \n", "old_path": "doc/examples/transform/plot_pyramid.py", "rewrite": "ReplaceText(target='//' @(23,46)->(23,47))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "472a420d86ff363cbb11df4e4b76ec090e0d015c", "diff": "@@ -634,7 +634,7 @@ def skeletonize_3d(image, *, img=None):\n raise ValueError(\"skeletonize_3d can only handle 2D or 3D images; \"\n \"got image.ndim = %s instead.\" % image.ndim)\n image = np.ascontiguousarray(image)\n- image = img_as_ubyte(img, force_copy=False)\n+ image = img_as_ubyte(image, force_copy=False)\n \n # make an in image 3D and pad it w/ zeros to simplify dealing w/ boundaries\n # NB: careful here to not clobber the original *and* minimize copying\n", "old_path": "skimage/morphology/_skeletonize.py", "rewrite": "ReplaceText(target='image' @(637,25)->(637,28))"} -{"repo": "https://:@github.com/scikit-image/scikit-image.git", "hash": "1539f238e52610f5e7607d5b447b5c491e3455eb", "diff": "@@ -242,7 +242,7 @@ def test_arraymap_update():\n in_values = np.unique(np.random.randint(0, 200, size=5))\n out_values = np.random.random(len(in_values))\n m = ArrayMap(in_values, out_values)\n- image = np.random.randint(1, len(in_values), size=(512, 512))\n+ image = np.random.randint(1, len(m), size=(512, 512))\n assert np.all(m[image] < 1) # missing values map to 0.\n m[1:] += 1\n assert np.all(m[image] >= 1)\n", "old_path": "skimage/segmentation/tests/test_join.py", "rewrite": "ReplaceText(target='m' @(245,37)->(245,46))"} -{"repo": "https://:@github.com/globusonline/agamemnon.git", "hash": "6460e336b2a3fd359364f85e39d6e3222077621e", "diff": "@@ -233,7 +233,7 @@ class DataStore(object):\n source_node_key = value\n elif column.startswith('source__'):\n source_attributes[column[8:]] = value\n- source = prim.Node(self, source_node_type, source_node_key, values)\n+ source = prim.Node(self, source_node_type, source_node_key, source_attributes)\n rel_key = RELATIONSHIP_KEY_PATTERN % (rel_type, rel_key)\n return self.get_outgoing_relationship(rel_type, source, (rel_key, values))\n \n", "old_path": "agamemnon/factory.py", "rewrite": "ReplaceText(target='source_attributes' @(236,68)->(236,74))"} -{"repo": "https://:@github.com/chiptopher/guet.git", "hash": "f95c54917b51e65f47789534ab88ecbede1838eb", "diff": "@@ -11,6 +11,6 @@ def _recursive_directory_find(path: Path, directory_name: str) -> str:\n raise FileNotFoundError()\n joined_with_driectory = path.joinpath(directory_name)\n if joined_with_driectory.is_dir():\n- return str(joined_with_driectory)\n+ return str(path)\n else:\n return _recursive_directory_find(path.parent, directory_name)\n", "old_path": "guet/util/_recursive_directory_find.py", "rewrite": "ReplaceText(target='path' @(14,19)->(14,40))"} -{"repo": "https://:@github.com/justinsalamon/scaper.git", "hash": "520ae608ebcbcc5e5438ca5c7967dc2479454038", "diff": "@@ -193,7 +193,7 @@ def generate_from_jams(jams_infile, audio_outfile, fg_path=None, bg_path=None,\n tfm.trim(sliceop['slice_start'], sliceop['slice_end'])\n tfm.build(audio_file, tmpfiles[-1].name)\n # Copy result back to original file\n- shutil.copyfile(tmpfiles[-1].name, audio_outfile)\n+ shutil.copyfile(tmpfiles[-1].name, audio_file)\n \n # Optionally save new jams file\n if jams_outfile is not None:\n", "old_path": "scaper/core.py", "rewrite": "ReplaceText(target='audio_file' @(196,55)->(196,68))"} -{"repo": "https://:@github.com/markokr/rarfile.git", "hash": "7fd6b2ca3efb81f7c4dffa6b6cef347b7d6ba043", "diff": "@@ -833,7 +833,7 @@ class RarFile:\n if dirs:\n dirs.sort(reverse=True)\n for dst, inf in dirs:\n- self._set_attrs(dst, inf)\n+ self._set_attrs(inf, dst)\n \n def testrar(self, pwd=None):\n \"\"\"Read all files and test CRC.\n", "old_path": "rarfile.py", "rewrite": "ArgSwap(idxs=0<->1 @(836,16)->(836,31))"} -{"repo": "https://:@github.com/rougier/freetype-py.git", "hash": "b21f15fb02eb44a656c250357665d1d7dc50bef6", "diff": "@@ -44,7 +44,7 @@ if __name__ == '__main__':\n y = height-baseline-top\n kerning = face.get_kerning(previous, c)\n x += (kerning.x >> 6)\n- Z[y:y+h,x:x+w] |= numpy.array(bitmap.buffer).reshape(h,w)\n+ Z[y:y+h,x:x+w] += numpy.array(bitmap.buffer).reshape(h,w)\n x += (slot.advance.x >> 6) \n previous = c\n \n", "old_path": "examples/hello-world.py", "rewrite": "ReplaceText(target='+=' @(47,23)->(47,25))"} -{"repo": "https://:@github.com/piotrmaslanka/satella.git", "hash": "24018c366401278a79da72097f1c594c188f5220", "diff": "@@ -15,7 +15,7 @@ def _merge(v1, v2):\n \n if isinstance(v1, list) and isinstance(v2, list):\n v1.extend(v2)\n- return v2\n+ return v1\n \n raise TypeError\n \n", "old_path": "satella/coding/algos.py", "rewrite": "ReplaceText(target='v1' @(18,15)->(18,17))"} -{"repo": "https://:@github.com/piotrmaslanka/satella.git", "hash": "4828537442e39bd6592413a5b4a2421a079edc91", "diff": "@@ -194,7 +194,7 @@ class Heap(object):\n :return: Iterator\n \"\"\"\n while self:\n- if self.heap[0] >= less:\n+ if self.heap[0] < less:\n return\n yield self.pop()\n \n", "old_path": "satella/coding/structures.py", "rewrite": "ReplaceText(target='<' @(197,28)->(197,30))"} -{"repo": "https://:@github.com/piotrmaslanka/satella.git", "hash": "fab19fa60841455e2ec0ec4493c618b7f5225f7d", "diff": "@@ -35,7 +35,7 @@ class MeasurableMixin:\n elapsed = value_getter() - future.old_value\n self.handle(logging_level, elapsed, **labels)\n \n- future.add_done_callback(future)\n+ future.add_done_callback(on_future_done)\n \n def measure(self, include_exceptions: bool = True,\n logging_level: MetricLevel = MetricLevel.RUNTIME,\n", "old_path": "satella/instrumentation/metrics/metric_types/measurable_mixin.py", "rewrite": "ReplaceText(target='on_future_done' @(38,33)->(38,39))"} -{"repo": "https://:@github.com/piotrmaslanka/satella.git", "hash": "a9b866bd76586a440918130d52ca933529ac521a", "diff": "@@ -117,7 +117,7 @@ class Proxy(tp.Generic[T]):\n return self.__obj or other\n \n def __and__(self, other):\n- return self.__obj or other\n+ return self.__obj and other\n \n def __le__(self, other):\n return self.__obj <= other\n", "old_path": "satella/coding/structures/proxy.py", "rewrite": "ReplaceText(target='and' @(120,26)->(120,28))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "2662d81a9c925501831f0acb805c9e8adcde0a32", "diff": "@@ -160,7 +160,7 @@ class Adam(Optimizer):\n m_b_t = m_t / (1 - beta_1_t)\n v_b_t = v_t / (1 - beta_2_t)\n \n- p_t = p - self.lr * m_b_t / (T.sqrt(v_t) + self.epsilon)\n+ p_t = p - self.lr * m_b_t / (T.sqrt(v_b_t) + self.epsilon)\n \n updates.append((m, m_t))\n updates.append((v, v_t))\n", "old_path": "keras/optimizers.py", "rewrite": "ReplaceText(target='v_b_t' @(163,48)->(163,51))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "cc10c4d907d959eb9009ad502c727542a5259613", "diff": "@@ -69,7 +69,7 @@ def skipgrams(sequence, vocabulary_size,\n if not wi:\n continue\n if sampling_table is not None:\n- if sampling_table[i] < random.random():\n+ if sampling_table[wi] < random.random():\n continue\n \n window_start = max(0, i-window_size)\n", "old_path": "keras/preprocessing/sequence.py", "rewrite": "ReplaceText(target='wi' @(72,30)->(72,31))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "e3695591704a21c6d0d6236c11c1bad7de4e314c", "diff": "@@ -58,7 +58,7 @@ class SimpleRNN(Layer):\n mask = T.addbroadcast(mask[:, :, np.newaxis], 2)\n \n mask_tm1 = alloc_zeros_matrix(*mask.shape)\n- mask_tm1 = T.addbroadcast(T.set_subtensor(mask[1:, :, :], mask[:-1, :, :]), 2)\n+ mask_tm1 = T.addbroadcast(T.set_subtensor(mask_tm1[1:, :, :], mask[:-1, :, :]), 2)\n \n # scan = theano symbolic loop.\n # See: http://deeplearning.net/software/theano/library/scan.html\n", "old_path": "keras/layers/recurrent.py", "rewrite": "ReplaceText(target='mask_tm1' @(61,50)->(61,54))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "c315b0d7a95b6677452300bdefd526b444951819", "diff": "@@ -218,7 +218,7 @@ class GaussianNoise(MaskedLayer):\n \n def get_output(self, train=False):\n X = self.get_input(train)\n- if train or self.sigma == 0:\n+ if not train or self.sigma == 0:\n return X\n else:\n return X + srng.normal(size=X.shape, avg=0.0, std=self.sigma,\n", "old_path": "keras/layers/core.py", "rewrite": "ReplaceText(target='not ' @(221,11)->(221,11))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "46a2fb6fd8e52b02df78f1416cc9fbd4b3156604", "diff": "@@ -42,7 +42,7 @@ class Optimizer(object):\n grads = [clip_norm(g, self.clipnorm, norm) for g in grads]\n \n if hasattr(self, 'clipvalue') and self.clipvalue > 0:\n- grads = [T.clip(g, self.clipvalue, -self.clipvalue) for g in grads]\n+ grads = [T.clip(g, -self.clipvalue, self.clipvalue) for g in grads]\n \n return grads\n \n", "old_path": "keras/optimizers.py", "rewrite": "ArgSwap(idxs=1<->2 @(45,21)->(45,27))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "c2534964b76015eb3d76261b025c7556b354764c", "diff": "@@ -158,7 +158,7 @@ class SimpleRNN(Recurrent):\n assert len(states) == 1\n prev_output = states[0]\n h = K.dot(x, self.W) + self.b\n- output = self.activation(h * K.dot(prev_output, self.U))\n+ output = self.activation(h + K.dot(prev_output, self.U))\n return output, [output]\n \n def get_config(self):\n", "old_path": "keras/layers/recurrent.py", "rewrite": "ReplaceText(target='+' @(161,35)->(161,36))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "3d51a26749937cb1a1aec40c20bc505e82809dce", "diff": "@@ -449,7 +449,7 @@ class Graph(Layer):\n self.namespace.add(sh_name)\n self.nodes[sh_name] = sh\n self.node_config.append({'name': sh_name,\n- 'inputs': [s],\n+ 'inputs': [name],\n 'create_output': create_output})\n if create_output:\n self.add_output(sh_name, input=sh_name)\n", "old_path": "keras/layers/containers.py", "rewrite": "ReplaceText(target='name' @(452,52)->(452,53))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "42b3d37a54545882699283b5764cf3c997f8d9cd", "diff": "@@ -43,7 +43,7 @@ def test_skipgrams():\n couples, labels = skipgrams(np.arange(5), vocabulary_size=5, window_size=1,\n categorical=True)\n for couple in couples:\n- assert couple[0] - couple[1] < 3\n+ assert couple[0] - couple[1] <= 3\n for l in labels:\n assert len(l) == 2\n \n", "old_path": "tests/keras/preprocessing/test_sequence.py", "rewrite": "ReplaceText(target='<=' @(46,37)->(46,38))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "e2e281e14f619d9ade61c46567e2c599db070f16", "diff": "@@ -23,7 +23,7 @@ def test_unitnorm_constraint():\n lookup.compile(loss='binary_crossentropy', optimizer='sgd',\n class_mode='binary')\n lookup.train_on_batch(X1, np.array([[1], [0]], dtype='int32'))\n- norm = np.linalg.norm(K.get_value(lookup.params[0]), axis=1)\n+ norm = np.linalg.norm(K.get_value(lookup.params[0]), axis=0)\n assert_allclose(norm, np.ones_like(norm).astype('float32'), rtol=1e-05)\n \n \n", "old_path": "tests/keras/layers/test_embeddings.py", "rewrite": "ReplaceText(target='0' @(26,62)->(26,63))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "e2e281e14f619d9ade61c46567e2c599db070f16", "diff": "@@ -54,7 +54,7 @@ def test_identity_oddballs():\n def test_unitnorm():\n unitnorm_instance = constraints.unitnorm()\n normalized = unitnorm_instance(K.variable(example_array))\n- norm_of_normalized = np.sqrt(np.sum(K.eval(normalized)**2, axis=1))\n+ norm_of_normalized = np.sqrt(np.sum(K.eval(normalized)**2, axis=0))\n # in the unit norm constraint, it should be equal to 1.\n difference = norm_of_normalized - 1.\n largest_difference = np.max(np.abs(difference))\n", "old_path": "tests/keras/test_constraints.py", "rewrite": "ReplaceText(target='0' @(57,68)->(57,69))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "f4af11c7300816ca28b6b707fdf7d64b00430074", "diff": "@@ -52,7 +52,7 @@ def pad_sequences(sequences, maxlen=None, dtype='int32', padding='pre', truncati\n elif truncating == 'post':\n trunc = s[:maxlen]\n else:\n- raise ValueError(\"Truncating type '%s' not understood\" % padding)\n+ raise ValueError(\"Truncating type '%s' not understood\" % truncating)\n \n # check `trunc` has expected shape\n trunc = np.asarray(trunc, dtype=dtype)\n", "old_path": "keras/preprocessing/sequence.py", "rewrite": "ReplaceText(target='truncating' @(55,69)->(55,76))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "b61235b77f87288d62ddd8ce4aae88b76babf887", "diff": "@@ -153,7 +153,7 @@ def check_array_lengths(X, Y, W):\n raise Exception('All input arrays (x) should have '\n 'the same number of samples.')\n set_y = set(y_lengths)\n- if len(set_x) != 1:\n+ if len(set_y) != 1:\n raise Exception('All target arrays (y) should have '\n 'the same number of samples.')\n set_w = set(w_lengths)\n", "old_path": "keras/engine/training.py", "rewrite": "ReplaceText(target='set_y' @(156,11)->(156,16))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "98974efa5f51d6f55afbf2bc125d6fd090bcf782", "diff": "@@ -510,7 +510,7 @@ class Model(Container):\n 'it should have one entry per model outputs. '\n 'The model has ' + str(len(self.outputs)) +\n ' outputs, but you passed loss_weights=' +\n- str(loss))\n+ str(loss_weights))\n loss_weights_list = loss_weights\n else:\n raise Exception('Could not interpret loss_weights argument: ' +\n", "old_path": "keras/engine/training.py", "rewrite": "ReplaceText(target='loss_weights' @(513,36)->(513,40))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "48ae7217e482a1a3624d6e5380c972a653cacfaf", "diff": "@@ -1136,7 +1136,7 @@ def rnn(step_function, inputs, initial_states,\n \n if mask is not None:\n if go_backwards:\n- mask = tf.reverse(mask, [True] + [False] * (ndim - 1))\n+ mask = tf.reverse(mask, [True] + [False] * (ndim - 2))\n \n # Transpose not supported by bool tensor types, hence round-trip to uint8.\n mask = tf.cast(mask, tf.uint8)\n", "old_path": "keras/backend/tensorflow_backend.py", "rewrite": "ReplaceText(target='2' @(1139,67)->(1139,68))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "41741c38e5f29ebf69fe9bd82a604eba3c0b97e5", "diff": "@@ -1261,7 +1261,7 @@ def rnn(step_function, inputs, initial_states,\n new_state = new_states[0]\n else:\n # return dummy state, otherwise _dynamic_rnn_loop breaks\n- new_state = output\n+ new_state = state\n return output, new_state\n \n _step.state_size = state_size * nb_states\n", "old_path": "keras/backend/tensorflow_backend.py", "rewrite": "ReplaceText(target='state' @(1264,32)->(1264,38))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "80fbbc3a6a2a30f391bad2aa85e7558c50ca0709", "diff": "@@ -411,7 +411,7 @@ class ImageDataGenerator(object):\n \n if self.zca_whitening:\n flatX = np.reshape(X, (X.shape[0], X.shape[1] * X.shape[2] * X.shape[3]))\n- sigma = np.dot(flatX.T, flatX) / flatX.shape[1]\n+ sigma = np.dot(flatX.T, flatX) / flatX.shape[0]\n U, S, V = linalg.svd(sigma)\n self.principal_components = np.dot(np.dot(U, np.diag(1. / np.sqrt(S + 10e-7))), U.T)\n \n", "old_path": "keras/preprocessing/image.py", "rewrite": "ReplaceText(target='0' @(414,57)->(414,58))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "7bd5c862a271f125a76fa1ada7f0d9ae27159549", "diff": "@@ -209,7 +209,7 @@ def check_loss_and_target_compatibility(targets, losses, output_shapes):\n 'which does expect integer targets.')\n if loss.__name__ in key_losses:\n for target_dim, out_dim in zip(y.shape[1:], shape[1:]):\n- if target_dim is not None and target_dim != out_dim:\n+ if out_dim is not None and target_dim != out_dim:\n raise Exception('A target array with shape ' + str(y.shape) +\n ' was passed for an output of shape ' + str(shape) +\n ' while using as loss `' + loss.__name__ + '`. '\n", "old_path": "keras/engine/training.py", "rewrite": "ReplaceText(target='out_dim' @(212,19)->(212,29))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "cb4f93913eb871a5e234db0c31f885daff87ecdf", "diff": "@@ -67,7 +67,7 @@ def _obtain_input_shape(input_shape, default_size, min_size, dim_ordering, inclu\n if input_shape is not None:\n if len(input_shape) != 3:\n raise ValueError('`input_shape` must be a tuple of three integers.')\n- if input_shape[1] != 3:\n+ if input_shape[0] != 3:\n raise ValueError('The input must have 3 channels; got '\n '`input_shape=' + str(input_shape) + '`')\n if ((input_shape[1] is not None and input_shape[1] < min_size) or\n", "old_path": "keras/applications/imagenet_utils.py", "rewrite": "ReplaceText(target='0' @(70,31)->(70,32))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "82ca6d418588ccd61d663ec8029937290b62d583", "diff": "@@ -120,7 +120,7 @@ X = X[indices]\n y = y[indices]\n \n # Explicitly set apart 10% for validation data that we never train over\n-split_at = len(X) - len(X) / 10\n+split_at = len(X) - len(X) // 10\n (X_train, X_val) = (slice_X(X, 0, split_at), slice_X(X, split_at))\n (y_train, y_val) = (y[:split_at], y[split_at:])\n \n", "old_path": "examples/addition_rnn.py", "rewrite": "ReplaceText(target='//' @(123,27)->(123,28))"} -{"repo": "https://:@github.com/dmlc/keras.git", "hash": "7c34add25d0f6a773f1c74d1d8bb50f4482afc76", "diff": "@@ -1875,7 +1875,7 @@ def set_value(x, value):\n \"\"\"Sets the value of a variable,\n from a Numpy array. It returns `None`.\n \"\"\"\n- if isinstance(x, Number):\n+ if isinstance(value, Number):\n value = [value]\n x.bind(mx.nd.array(value))\n \n", "old_path": "keras/backend/mxnet_backend.py", "rewrite": "ReplaceText(target='value' @(1878,18)->(1878,19))"} -{"repo": "https://:@github.com/incountry/sdk-python.git", "hash": "e98e4243dae300a5ae9cab87347fa61bb87b51a9", "diff": "@@ -28,6 +28,6 @@ storage = Storage(\n \n while not migration_complete:\n migration_res = storage.migrate(country=COUNTRY, limit=50)\n- if migration_res[\"total_left\"] <= 0:\n+ if migration_res[\"total_left\"] == 0:\n migration_complete = True\n time.sleep(1)\n", "old_path": "examples/full_migration.py", "rewrite": "ReplaceText(target='==' @(31,35)->(31,37))"} -{"repo": "https://:@github.com/knockrentals/scrapy-elasticsearch.git", "hash": "1c5c20459e68544eeb8a0490b9f7b14895861b24", "diff": "@@ -96,7 +96,7 @@ class ElasticSearchPipeline(object):\n \n self.items_buffer.append(index_action)\n \n- if len(self.items_buffer) == self.settings.get('ELASTICSEARCH_BUFFER_LENGTH', 500):\n+ if len(self.items_buffer) >= self.settings.get('ELASTICSEARCH_BUFFER_LENGTH', 500):\n self.send_items()\n self.items_buffer = []\n \n", "old_path": "scrapyelasticsearch/scrapyelasticsearch.py", "rewrite": "ReplaceText(target='>=' @(99,34)->(99,36))"} -{"repo": "https://:@github.com/smithlabcode/ribotricer.git", "hash": "805255ef81f4c94dcaf9f0c63ba39f0de7f14eea", "diff": "@@ -149,7 +149,7 @@ def detect_orfs_cmd(bam, ribocop_index, prefix, stranded, read_lengths,\n sys.exit('Error: cannot convert psite_offsets into integers')\n if len(read_lengths) != len(psite_offsets):\n sys.exit('Error: psite_offsets must match read_lengths')\n- if not all(x > 0 for x in psite_offsets):\n+ if not all(x >= 0 for x in psite_offsets):\n sys.exit('Error: P-site offset must be >= 0')\n if not all(x > y for (x, y) in zip(read_lengths, psite_offsets)):\n sys.exit('Error: P-site offset must be smaller than read length')\n", "old_path": "RiboCop/cli.py", "rewrite": "ReplaceText(target='>=' @(152,21)->(152,22))"} -{"repo": "https://:@github.com/smithlabcode/ribotricer.git", "hash": "9e9c9497eb5c2669bd272729e19f47e2cbf2b3db", "diff": "@@ -321,7 +321,7 @@ def prepare_orfs(gtf, fasta, prefix, min_orf_length, start_codons,\n for orf in tqdm(candidate_orfs):\n coordinate = ','.join(\n ['{}-{}'.format(iv.start, iv.end) for iv in orf.intervals])\n- to_write = formatter.format(orf.oid, orf.category, orf.tid, orf.ttype,\n+ to_write += formatter.format(orf.oid, orf.category, orf.tid, orf.ttype,\n orf.gid, orf.gname, orf.gtype, orf.chrom,\n orf.strand, coordinate)\n \n", "old_path": "RiboCop/prepare_orfs.py", "rewrite": "ReplaceText(target='+=' @(324,17)->(324,18))"} -{"repo": "https://:@github.com/pughlab/ConsensusCruncher.git", "hash": "3622410b893b07afb4e423a4537eab33da26a55d", "diff": "@@ -147,7 +147,7 @@ def main():\n sscs_bam = pysam.AlignmentFile(args.infile, \"rb\")\n dcs_bam = pysam.AlignmentFile(args.outfile, \"wb\", template=sscs_bam)\n \n- if re.search('dcs.sc', args.outfile) is None:\n+ if re.search('dcs.sc', args.outfile) is not None:\n sscs_singleton_bam = pysam.AlignmentFile('{}.sscs.sc.singleton.bam'.format(args.outfile.split('.dcs.sc')[0]),\n \"wb\", template=sscs_bam)\n dcs_header = \"DCS - Singleton Correction\"\n", "old_path": "ConsensusCruncher/DCS_maker.py", "rewrite": "ReplaceText(target=' is not ' @(150,40)->(150,44))"} -{"repo": "https://:@github.com/django-guardian/django-guardian.git", "hash": "f60306eb93fd276879806d6e78557bdb5d1ce34f", "diff": "@@ -172,7 +172,7 @@ def get_obj_perms_model(obj, base_cls, generic_cls):\n for attr in fields:\n model = getattr(attr, 'related_model', None)\n if (model and issubclass(model, base_cls) and\n- model is not generic_cls and getattr(attr, 'enabled', True)):\n+ model is not generic_cls and getattr(model, 'enabled', True)):\n # if model is generic one it would be returned anyway\n if not model.objects.is_generic():\n # make sure that content_object's content_type is same as\n", "old_path": "guardian/utils.py", "rewrite": "ReplaceText(target='model' @(175,53)->(175,57))"} -{"repo": "https://:@github.com/podhmo/magicalimport.git", "hash": "293f619fee3f401ebe0daf55f001354ecf2a2124", "diff": "@@ -69,7 +69,7 @@ def import_symbol(sym, here=None, sep=\":\", ns=None):\n sym = \"{}:{}\".format(ns, sym)\n module_path, fn_name = sym.rsplit(sep, 2)\n try:\n- module = import_module(sym, here=here, sep=sep)\n+ module = import_module(module_path, here=here, sep=sep)\n return getattr(module, fn_name)\n except (ImportError, AttributeError) as e:\n sys.stderr.write(\"could not import {!r}\\n{}\\n\".format(sym, e))\n", "old_path": "magicalimport/__init__.py", "rewrite": "ReplaceText(target='module_path' @(72,31)->(72,34))"} -{"repo": "https://:@github.com/sigmavirus24/betamax.git", "hash": "9d84fcffbdf41133dbdd686490c993d63e0243fc", "diff": "@@ -112,7 +112,7 @@ def deserialize_response(serialized):\n for header_name, header_list in serialized['headers'].items():\n if isinstance(header_list, list):\n for header_value in header_list:\n- header_dict.add(header_name, header_list)\n+ header_dict.add(header_name, header_value)\n else:\n header_dict.add(header_name, header_list)\n r.headers = CaseInsensitiveDict(header_dict)\n", "old_path": "betamax/cassette/util.py", "rewrite": "ReplaceText(target='header_value' @(115,45)->(115,56))"} -{"repo": "https://:@github.com/CodyKochmann/generators.git", "hash": "0c99248a9a96a675d6995855c4a9ae0efebef329", "diff": "@@ -17,7 +17,7 @@ def itemgetter(iterable, indexes):\n for i,x in enumerate(iterable):\n if i in positive_indexes:\n out[i]=x\n- negative_index_buffer.append(i)\n+ negative_index_buffer.append(x)\n out.update({ni:negative_index_buffer[ni] for ni in negative_indexes})\n else:\n # if just positive results\n", "old_path": "generators/itemgetter.py", "rewrite": "ReplaceText(target='x' @(20,41)->(20,42))"} -{"repo": "https://:@github.com/reiinakano/xcessiv.git", "hash": "b197e370a6f8a46f6ba3e9b77fb76f150f28edd5", "diff": "@@ -146,7 +146,7 @@ def evaluate_stacked_ensemble(path, ensemble_id):\n )\n preds = []\n trues_list = []\n- for train_index, test_index in cv.split(X, y):\n+ for train_index, test_index in cv.split(secondary_features, y):\n X_train, X_test = secondary_features[train_index], secondary_features[test_index]\n y_train, y_test = y[train_index], y[test_index]\n est = est.fit(X_train, y_train)\n", "old_path": "xcessiv/rqtasks.py", "rewrite": "ReplaceText(target='secondary_features' @(149,52)->(149,53))"} -{"repo": "https://:@github.com/MosesofEgypt/mozzarilla.git", "hash": "5c0f1e29111be71edbb67ef13094a0cdc83d760c", "diff": "@@ -684,7 +684,7 @@ def _compile_model_animations(self):\n print(error)\n \n self.update()\n- if messagebox.askyesno(\n+ if not messagebox.askyesno(\n \"Model_animations compilation failed\",\n \"Errors occurred while compiling animations(check console). \"\n \"Do you want to save the model_animations tag anyway?\",\n", "old_path": "mozzarilla/tools/animations_compiler_window.py", "rewrite": "ReplaceText(target='not ' @(687,15)->(687,15))"} -{"repo": "https://:@github.com/HeeroYui/lutin.git", "hash": "9fc593fb59a192ddf5f50a96e2a6cba76dab73b6", "diff": "@@ -23,7 +23,7 @@ class System(system.System):\n \t\t# no check needed ==> just add this:\n \t\tself.add_module_depend(['c'])\n \t\tself.add_export_flag('link-lib', 'X11')\n-\t\tif env.get_isolate_system() == False:\n+\t\tif env.get_isolate_system() == True:\n \t\t\tself.add_header_file([\n \t\t\t \"/usr/include/X11/*\"\n \t\t\t ],\n", "old_path": "lutin/z_system/lutinSystem_Linux_X11.py", "rewrite": "ReplaceText(target='True' @(26,33)->(26,38))"} -{"repo": "https://:@github.com/sanger-pathogens/ariba.git", "hash": "8625628cf307e533bb6e778d9b8e936e48cef727", "diff": "@@ -294,7 +294,7 @@ class ReferenceData:\n def sanity_check(self, outprefix):\n variants_only_removed = self._remove_bad_genes(self.seq_dicts['variants_only'], outprefix + '.00.check_fasta_variants_only.log')\n presence_absence_removed = self._remove_bad_genes(self.seq_dicts['presence_absence'], outprefix + '.00.check_fasta_presence_absence.log')\n- self._filter_bad_variant_data(outprefix + '.01.check_variants', variants_only_removed, presence_absence_removed)\n+ self._filter_bad_variant_data(outprefix + '.01.check_variants', presence_absence_removed, variants_only_removed)\n \n \n @classmethod\n", "old_path": "ariba/reference_data.py", "rewrite": "ArgSwap(idxs=1<->2 @(297,8)->(297,37))"} -{"repo": "https://:@github.com/sanger-pathogens/ariba.git", "hash": "c70bc90299a1c5a85f20127ac8c750925219316b", "diff": "@@ -192,7 +192,7 @@ class Summary:\n if self.show_known_het and (cluster, variant) in all_het_snps:\n rows[filename][cluster][key + '.%'] = 'NA'\n \n- if self.show_known_het and (ref_name, variant) in all_het_snps and key + '.%' not in rows[filename][cluster]:\n+ if self.show_known_het and (cluster, variant) in all_het_snps and key + '.%' not in rows[filename][cluster]:\n rows[filename][cluster][key + '.%'] = 'NA'\n \n for key, wanted in self.cluster_columns.items():\n", "old_path": "ariba/summary.py", "rewrite": "ReplaceText(target='cluster' @(195,52)->(195,60))"} -{"repo": "https://:@github.com/sanger-pathogens/ariba.git", "hash": "1fd2c639e7b24a69252390744ae4e1a9e49db5dd", "diff": "@@ -47,7 +47,7 @@ class MlstReporter:\n depths = [int(x) for x in d['smtls_nts_depth'].split(',')]\n depths.sort()\n het_pc = round(100.0 * depths[-1] / sum(depths), 2)\n- if results['hetmin'] == '.' or results['hetmin'] < het_pc:\n+ if results['hetmin'] == '.' or results['hetmin'] > het_pc:\n results['hetmin'] = het_pc\n if len(het_data):\n results['hets'] = '.'.join(het_data)\n", "old_path": "ariba/mlst_reporter.py", "rewrite": "ReplaceText(target='>' @(50,69)->(50,70))"} -{"repo": "https://:@github.com/urschrei/pyzotero.git", "hash": "cdfd191116363c947fc0a0d0b4f37849d709f9f2", "diff": "@@ -40,7 +40,7 @@ def check():\n return library_version == git_version\n \n if __name__ == '__main__':\n- if check():\n+ if not check():\n sys.exit(1)\n else:\n sys.exit(0)\n", "old_path": "pre-deploy.py", "rewrite": "ReplaceText(target='not ' @(43,7)->(43,7))"} -{"repo": "https://:@github.com/lyft/confidant.git", "hash": "5de06bb144ad392dba5ef9c75603eb9587dfcfe3", "diff": "@@ -410,7 +410,7 @@ def update_credential(id):\n include_credential_pairs=True,\n )\n credential_response.permissions = permissions\n- return credential_response_schema.dumps(permissions)\n+ return credential_response_schema.dumps(credential_response)\n \n \n @blueprint.route('/v1/credentials//', methods=['PUT'])\n", "old_path": "confidant/routes/credentials.py", "rewrite": "ReplaceText(target='credential_response' @(413,44)->(413,55))"} -{"repo": "https://:@github.com/cloudenvy/cloudenvy.git", "hash": "a19f6f84832b1dfddbf5ad7b1e84790842b22712", "diff": "@@ -35,7 +35,7 @@ class Files(cloudenvy.envy.Command):\n logging.info(\"Copying file from '%s' to '%s'\",\n local_path, remote_path)\n \n- if os.path.exists(local_path):\n+ if not os.path.exists(local_path):\n logging.error(\"Local file '%s' not found.\", local_path)\n \n dest_dir = _parse_directory(remote_path)\n", "old_path": "cloudenvy/commands/files.py", "rewrite": "ReplaceText(target='not ' @(38,23)->(38,23))"} -{"repo": "https://:@github.com/WeiXuanChan/autoD.git", "hash": "e163474f70ed6a02f39cd6edaa298271e5f23327", "diff": "@@ -520,7 +520,7 @@ class Imaginary(AD):\n class Absolute(AD):\n def __init__(self,func):\n self.func=func\n- self.abs=(Real(func)**2.-Imaginary(func)**2.)**0.5\n+ self.abs=(Real(func)**2.+Imaginary(func)**2.)**0.5\n try:\n self.dependent=func.dependent[:]\n except AttributeError:\n", "old_path": "autoD.py", "rewrite": "ReplaceText(target='+' @(523,32)->(523,33))"} -{"repo": "https://:@github.com/dwavesystems/dimod.git", "hash": "79979454139757bd49c1e31c67d890c1d5efeee2", "diff": "@@ -279,7 +279,7 @@ class PolyScaleComposite(ComposedPolySampler):\n # we need to know how much we scaled by, which we can do by looking\n # at the biases\n try:\n- v = next((v for v, bias in poly.items() if bias))\n+ v = next((v for v, bias in original.items() if bias))\n except StopIteration:\n # nothing to scale\n scalar = 1\n", "old_path": "dimod/reference/composites/higherordercomposites.py", "rewrite": "ReplaceText(target='original' @(282,43)->(282,47))"} -{"repo": "https://:@github.com/dwavesystems/dimod.git", "hash": "c21ee99ab65a519b822689361fcfcc66ffb890f2", "diff": "@@ -2146,7 +2146,7 @@ class TestSerialization(unittest.TestCase):\n new = dimod.BinaryQuadraticModel.from_serializable(bqm.to_serializable(use_bytes=True))\n \n self.assertEqual(bqm, new)\n- self.assertEqual(bqm.info, {\"tag\": 5})\n+ self.assertEqual(new.info, {\"tag\": 5})\n \n \n class TestZeroField(unittest.TestCase):\n", "old_path": "tests/test_binary_quadratic_model.py", "rewrite": "ReplaceText(target='new' @(2149,25)->(2149,28))"} -{"repo": "https://:@github.com/dwavesystems/dimod.git", "hash": "ceee47e049c2c3305d459c6ae865a430dbd113e9", "diff": "@@ -197,7 +197,7 @@ def ran_r(r, graph, cls=BinaryQuadraticModel, seed=None):\n rvals = np.empty(2*r)\n rvals[0:r] = range(-r, 0)\n rvals[r:] = range(1, r+1)\n- qdata = rnd.choice(rvals, size=len(variables))\n+ qdata = rnd.choice(rvals, size=len(irow))\n \n offset = 0\n \n", "old_path": "dimod/generators/random.py", "rewrite": "ReplaceText(target='irow' @(200,39)->(200,48))"} -{"repo": "https://:@github.com/dvdotsenko/jsonrpc.py.git", "hash": "92ad90db194c878cb2023e97758671d72c976797", "diff": "@@ -75,7 +75,7 @@ class JSONPRCWSGIApplicationTestSuite(TestCase):\n \n response_json = responses_data[0]\n assert 'error' not in response_json\n- assert response_json['id'] == request2['id']\n+ assert response_json['id'] == request1['id']\n assert response_json['result'] == 5\n \n response_json = responses_data[1]\n", "old_path": "tests/test_wsgi_application.py", "rewrite": "ReplaceText(target='request1' @(78,38)->(78,46))"} -{"repo": "https://:@github.com/MarSoft/ses-mailer-2.git", "hash": "8c1b6aafc09412a6b6b2b1a69337ccbd99fc43f2", "diff": "@@ -264,7 +264,7 @@ class Mail(object):\n for ob in optional_blocks:\n if ob in blocks:\n if ob == \"format\" and \\\n- mail_params[ob].lower() not in [\"html\", \"text\"]:\n+ blocks[ob].lower() not in [\"html\", \"text\"]:\n continue\n mail_params[ob] = blocks[ob]\n return mail_params\n", "old_path": "ses_mailer.py", "rewrite": "ReplaceText(target='blocks' @(267,24)->(267,35))"} -{"repo": "https://:@github.com/interpretml/interpret.git", "hash": "dfae1d47394d50472e25717c53c245cbe9f8a5ad", "diff": "@@ -1067,7 +1067,7 @@ class BaseEBM(BaseEstimator):\n \"scores_range\": bounds,\n }\n feature_list.append(feature_dict)\n- density_dict.append({})\n+ density_list.append({})\n \n data_dict = {\n \"type\": \"pairwise\",\n", "old_path": "python/interpret/glassbox/ebm/ebm.py", "rewrite": "ReplaceText(target='density_list' @(1070,16)->(1070,28))"} -{"repo": "https://:@gitlab.com/serial-lab/random-flavorpack.git", "hash": "e69ba47e04a84e1746363a93d33bfe2ca9581cd5", "diff": "@@ -76,7 +76,7 @@ class RandomGenerator(Generator):\n if maximum <= minimum:\n raise ValueError(\n _(\"The maximum can not be less than the minimum.\"))\n- if start < minimum or start >= maximum:\n+ if start < minimum or start > maximum:\n raise ValueError(\n _(\"The start must be between the minimum and maximum!\"))\n rnrange = maximum - minimum\n", "old_path": "random_flavorpack/generators/random.py", "rewrite": "ReplaceText(target='>' @(79,36)->(79,38))"} -{"repo": "https://:@github.com/Ezibenroc/PyRoaringBitMap.git", "hash": "7081ceba18ccaf2ee80d3c142e6e612cf77d17d2", "diff": "@@ -779,7 +779,7 @@ class OptimizationTest(unittest.TestCase):\n self.assertGreater(bm2.shrink_to_fit(), 0)\n self.assertEqual(bm2.shrink_to_fit(), 0)\n bm3 = cls(bm1, optimize=True)\n- self.assertEqual(bm2.shrink_to_fit(), 0)\n+ self.assertEqual(bm3.shrink_to_fit(), 0)\n \n \n class VersionTest(unittest.TestCase):\n", "old_path": "test.py", "rewrite": "ReplaceText(target='bm3' @(782,25)->(782,28))"} -{"repo": "https://:@github.com/Cavenfish/autogamess.git", "hash": "09def521ebf6c9686479439d71aee114d554a5de", "diff": "@@ -136,8 +136,8 @@ def new_project(maindir, csvfile, ebasis_dir, initial_coords_dict=None,\n \n #Run Input Builder function\n save_dir = maindir + 'inputs/'\n- input_builder(csvfile, initial_coords_dict, ebasis_dir,\n- save_dir, title.replace('/', '\\n'))\n+ input_builder(csvfile, save_dir, ebasis_dir,\n+ initial_coords_dict, title.replace('/', '\\n'))\n \n \n return\n", "old_path": "autogamess/new_project.py", "rewrite": "ArgSwap(idxs=1<->3 @(139,4)->(139,17))"} -{"repo": "https://:@github.com/Cavenfish/autogamess.git", "hash": "4dcbf5d1a0f9059f8bdbc1a346c8f9cced70f62d", "diff": "@@ -136,7 +136,7 @@ def new_project(maindir, csvfile, ebasis_dir, initial_coords_dict=None,\n \n #Run Input Builder function\n save_dir = maindir + 'inputs/'\n- input_builder(csvfile, save_dir, ebasis_dir,\n+ input_builder(csvfile, ebasis_dir, save_dir,\n initial_coords_dict, title.replace('/', '\\n'))\n \n \n", "old_path": "autogamess/new_project.py", "rewrite": "ArgSwap(idxs=1<->2 @(139,4)->(139,17))"} -{"repo": "https://:@github.com/Cavenfish/autogamess.git", "hash": "3890ccfd3dc7e723a37b8b5308d59a8de0b6f807", "diff": "@@ -306,6 +306,6 @@ def fill_spreadsheets(projdir=False, sorteddir=False, sheetsdir=False):\n if vsc in df:\n df[vsc].to_excel(writer, sheet_name=vsc, startrow=6)\n if cmp in df:\n- df[cmp].to_excel(writer, sheet_name=vsc, startrow=6)\n+ df[cmp].to_excel(writer, sheet_name=cmp, startrow=6)\n \n return\n", "old_path": "autogamess/fill_spreadsheets.py", "rewrite": "ReplaceText(target='cmp' @(309,52)->(309,55))"} -{"repo": "https://:@github.com/EntilZha/ScalaFunctional.git", "hash": "8426ff978b84cb4125052ad842ae5db64eaf42f3", "diff": "@@ -185,6 +185,6 @@ class TestStreams(unittest.TestCase):\n \n # test insert into a connection\n with sqlite3.connect(tmp_path) as conn:\n- seq(elements).to_sqlite3(tmp_path, insert_sql)\n+ seq(elements).to_sqlite3(conn, insert_sql)\n result = seq.sqlite3(conn, \"SELECT id, name FROM user;\").to_list()\n self.assertListEqual(elements, result)\n", "old_path": "functional/test/test_streams.py", "rewrite": "ReplaceText(target='conn' @(188,37)->(188,45))"} -{"repo": "https://:@github.com/wesselb/stheno.git", "hash": "32d55bf855f88067e689684eaa5d6f9e8c7604d6", "diff": "@@ -80,7 +80,7 @@ class Kernel(Referentiable):\n def feat_map(x):\n scale = 2 * B.pi / B.cast(period, x.dtype)\n return B.concatenate((B.sin(x * scale),\n- B.cos(x * scale)), axis=0)\n+ B.cos(x * scale)), axis=1)\n \n return Kernel(lambda x, y: self.f(feat_map(x), feat_map(y)))\n \n", "old_path": "stheno/kernel.py", "rewrite": "ReplaceText(target='1' @(83,59)->(83,60))"} -{"repo": "https://:@github.com/djgagne/hagelslag.git", "hash": "7ef4f68645a7b7146f21813f2b39a0a7208b0fdb", "diff": "@@ -19,7 +19,7 @@ class Watershed(object):\n self.max_intensity = max_intensity\n \n def label(self, data):\n- core_labels, n_labels = label(data <= self.max_intensity)\n+ core_labels, n_labels = label(data >= self.max_intensity)\n ws_labels = watershed(data.max() - data, markers=core_labels, mask=data >= self.min_intensity)\n return ws_labels\n \n", "old_path": "hagelslag/processing/Watershed.py", "rewrite": "ReplaceText(target='>=' @(22,43)->(22,45))"} -{"repo": "https://:@github.com/djgagne/hagelslag.git", "hash": "28dbda86b4244802a1651a808dfcfe0dbdeb62e3", "diff": "@@ -19,7 +19,7 @@ class Watershed(object):\n self.max_intensity = max_intensity\n \n def label(self, data):\n- core_labels, n_labels = label(data >= self.max_intensity)\n+ core_labels, n_labels = label(data <= self.max_intensity)\n ws_labels = watershed(data.max() - data, markers=core_labels, mask=data >= self.min_intensity)\n return ws_labels\n \n", "old_path": "hagelslag/processing/Watershed.py", "rewrite": "ReplaceText(target='<=' @(22,43)->(22,45))"} -{"repo": "https://:@github.com/djgagne/hagelslag.git", "hash": "be189c11c1135f782bb30529f58dff78e99f4c8e", "diff": "@@ -19,7 +19,7 @@ class Watershed(object):\n self.max_intensity = max_intensity\n \n def label(self, data):\n- core_labels, n_labels = label(data <= self.max_intensity)\n+ core_labels, n_labels = label(data >= self.max_intensity)\n ws_labels = watershed(data.max() - data, markers=core_labels, mask=data >= self.min_intensity)\n return ws_labels\n \n", "old_path": "hagelslag/processing/Watershed.py", "rewrite": "ReplaceText(target='>=' @(22,43)->(22,45))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "72b08c308f61bc4e9006976fc9e63f3638fad9e8", "diff": "@@ -604,7 +604,7 @@ def chiles_pg():\n total_bandwidth = 480\n num_obs = 8 # the same as num of data island\n subband_width = 60 # MHz\n- num_subb = total_bandwidth / subband_width\n+ num_subb = total_bandwidth // subband_width\n subband_dict = collections.defaultdict(list) # for corner turning\n img_list = []\n start_freq = 940\n", "old_path": "test/graphsRepository.py", "rewrite": "ReplaceText(target='//' @(607,31)->(607,32))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "00eb7a92f6679df09650e2e8054e9163f0089785", "diff": "@@ -115,7 +115,7 @@ class TestDM(unittest.TestCase):\n a.setCompleted()\n \n for dm, drop in (dm1,a), (dm2,b), (dm2,c):\n- self.assertEqual(DROPStates.COMPLETED, dm.get_drop_property(sessionId, 'status', drop.uid))\n+ self.assertEqual(DROPStates.COMPLETED, dm.get_drop_property(sessionId, drop.uid, 'status'))\n self.assertEqual(a.checksum, int(droputils.allDropContents(c)))\n \n for dropProxy in a,b,c:\n", "old_path": "test/manager/test_dm.py", "rewrite": "ArgSwap(idxs=1<->2 @(118,51)->(118,71))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "a45bf6f0b7e2fa2627b7e4faa18324aa1087d8f5", "diff": "@@ -167,7 +167,7 @@ class DockerTests(unittest.TestCase):\n c = FileDROP('c', 'c')\n b.addInput(a)\n b.addOutput(c)\n- with DROPWaiterCtx(self, b, 100):\n+ with DROPWaiterCtx(self, c, 100):\n a.setCompleted()\n self.assertEqual(six.b(a.dataURL), droputils.allDropContents(c))\n \n", "old_path": "test/apps/test_docker.py", "rewrite": "ReplaceText(target='c' @(170,33)->(170,34))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "882b2feb9672662c5347bf0b11ce06b0e7529be8", "diff": "@@ -512,7 +512,7 @@ class LogParser(object):\n for dim_log_f in possible_logs:\n if (os.path.exists(dim_log_f)):\n self._dim_log_f = [dim_log_f]\n- if (dim_log_f == possible_logs[1]):\n+ if (dim_log_f == possible_logs[0]):\n cluster_log = os.path.join(log_dir, '0', 'start_dlg_cluster.log')\n if (os.path.exists(cluster_log)):\n self._dim_log_f.append(cluster_log)\n", "old_path": "dlg/deploy/pawsey/scale_test.py", "rewrite": "ReplaceText(target='0' @(515,47)->(515,48))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "f1204971537d6fa5e972cd96c963f907166dd291", "diff": "@@ -952,7 +952,7 @@ class KFamilyPartition(Partition):\n kwargs['weight'] = self_global_dag.node[u].get('weight', 5)\n self._dag.add_node(u, **kwargs)\n for k in self._w_attr:\n- self._tmp_max_dop[_w_attr] = get_max_weighted_antichain(self._dag, w_attr=k)[0]\n+ self._tmp_max_dop[k] = get_max_weighted_antichain(self._dag, w_attr=k)[0]\n self._max_dop = self._tmp_max_dop \n \n def can_merge(self, that, u, v):\n", "old_path": "dlg/dropmake/scheduler.py", "rewrite": "ReplaceText(target='k' @(955,30)->(955,37))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "6a91d4338a9a90bc2413e4e78c9ed8ca02264ae4", "diff": "@@ -2225,7 +2225,7 @@ def partition(pgt, algo, num_partitions=1, num_islands=1,\n \n elif algo == ALGO_MIN_NUM_PARTS:\n time_greedy = 1 - time_greedy / 100.0 # assuming between 1 to 100\n- pgt = MinNumPartsPGTP(pgt, deadline, num_partitions, partition_label, max_dop, merge_parts=could_merge, optimistic_factor=time_greedy)\n+ pgt = MinNumPartsPGTP(pgt, deadline, num_partitions, partition_label, max_cpu, merge_parts=could_merge, optimistic_factor=time_greedy)\n \n elif algo == ALGO_PSO:\n pgt = PSOPGTP(pgt, partition_label, max_dop, deadline=deadline, topk=topk, swarm_size=swarm_size, merge_parts=could_merge)\n", "old_path": "dlg/dropmake/pg_generator.py", "rewrite": "ReplaceText(target='max_cpu' @(2228,79)->(2228,86))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "885ea31e59129d694329161da7acf7e8f2654348", "diff": "@@ -96,7 +96,7 @@ def check_hosts(ips, port, timeout=None, check_with_session=False, retry=1):\n logger.info(\"Host %s:%d is running\", ip, port)\n return ip\n logger.warning(\"Failed to contact host %s:%d\", ip, port)\n- ntries -= 0\n+ ntries -= 1\n return None\n \n # Don't return None values\n", "old_path": "dlg/deploy/pawsey/start_dfms_cluster.py", "rewrite": "ReplaceText(target='1' @(99,22)->(99,23))"} -{"repo": "https://:@github.com/ICRAR/daliuge.git", "hash": "ca615527deef8c147aaad3c64755b5f3d89b65b8", "diff": "@@ -56,7 +56,7 @@ def timed_import(module_name):\n \"\"\"Imports `module_name` and log how long it took to import it\"\"\"\n start = time.time()\n module = importlib.import_module(module_name)\n- logger.info('Imported %s in %.3f seconds', module, time.time() - start)\n+ logger.info('Imported %s in %.3f seconds', module_name, time.time() - start)\n return module\n \n \n", "old_path": "dlg/utils.py", "rewrite": "ReplaceText(target='module_name' @(59,47)->(59,53))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "8e8557c3590acc6942bcabc7167de3767681e48b", "diff": "@@ -419,7 +419,7 @@ def define_alternator_status_model(\n if soc < dn_soc or (prev_status == 1 and soc < up_soc):\n status = 1\n \n- elif has_energy_recuperation and gear_box_power_in >= 0:\n+ elif has_energy_recuperation and gear_box_power_in < 0:\n status = 2\n \n return status\n", "old_path": "co2mpas/functions/physical/electrics/__init__.py", "rewrite": "ReplaceText(target='<' @(422,63)->(422,65))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "b155780da4cd2489da6c06da12e0c4df41534ab5", "diff": "@@ -2766,8 +2766,8 @@ class Dispatcher(object):\n \n elif node_id in dists: # The node w already estimated.\n if dist < dists[node_id]: # Error for negative paths.\n- raise DispatcherError('Contradictory paths found: '\n- 'negative weights?', self)\n+ raise DispatcherError(self, 'Contradictory paths found: '\n+ 'negative weights?')\n elif node_id not in seen or dist < seen[node_id]: # Check min dist.\n seen[node_id] = dist # Update dist.\n \n", "old_path": "co2mpas/dispatcher/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(2769,22)->(2769,37))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "46830a3edd1490d499b8f0e788ce87efe873d264", "diff": "@@ -225,7 +225,7 @@ def _predict_electrics(\n alternator_current = calculate_alternator_current(\n alternator_status, on_engine, gear_box_power_in,\n alternator_current_model, engine_start_current,\n- prev_battery_current, acceleration)\n+ battery_state_of_charge, acceleration)\n \n battery_current = calculate_battery_current(\n electric_load, alternator_current, alternator_nominal_voltage,\n", "old_path": "co2mpas/functions/co2mpas_model/physical/electrics/electrics_prediction.py", "rewrite": "ReplaceText(target='battery_state_of_charge' @(228,8)->(228,28))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "45e4f0782888c84b9c99842db88457353b45efb3", "diff": "@@ -240,7 +240,7 @@ def define_data_schema(read=True):\n 'f0_uncorrected': positive,\n 'f2': positive,\n 'f0': positive,\n- 'correct_f0': positive,\n+ 'correct_f0': _bool,\n \n 'co2_emission_low': positive,\n 'co2_emission_medium': positive,\n", "old_path": "co2mpas/functions/io/schema.py", "rewrite": "ReplaceText(target='_bool' @(243,22)->(243,30))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "3fcd6ce4395980ea879bde8f1270e390e750a8ee", "diff": "@@ -3020,7 +3020,7 @@ class Dispatcher(object):\n self._meet[dsp_id] = initial_dist # Set view distance.\n \n # Check if inputs are satisfied.\n- if self.check_wait_in(node['wait_inputs'], node_id):\n+ if self.check_wait_in(node['wait_inputs'], dsp_id):\n return False # Pass the node\n \n if dsp_id not in distances:\n", "old_path": "co2mpas/dispatcher/__init__.py", "rewrite": "ReplaceText(target='dsp_id' @(3023,51)->(3023,58))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "e3346285e51b0bba0d909746146e0be70c3090eb", "diff": "@@ -87,7 +87,7 @@ def calculate_full_load(full_load_speeds, full_load_powers, idle_engine_speed):\n \"\"\"\n \n pn = np.array((full_load_speeds, full_load_powers))\n- max_speed_at_max_power, max_power = pn[:, np.argmax(pn[0])]\n+ max_speed_at_max_power, max_power = pn[:, np.argmax(pn[1])]\n pn[1] /= max_power\n idle = idle_engine_speed[0]\n pn[0] = (pn[0] - idle) / (max_speed_at_max_power - idle)\n", "old_path": "co2mpas/model/physical/engine/__init__.py", "rewrite": "ReplaceText(target='1' @(90,59)->(90,60))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "4154efcd8980a1790f2675afa14803991b4da76e", "diff": "@@ -1223,7 +1223,7 @@ def calibrate_co2_params(\n \n p = restrict_bounds(p)\n \n- p, s = calibrate_model_params(co2_error_function_on_phases, p)\n+ p, s = calibrate_model_params(co2_error_function_on_emissions, p)\n success.append((s, copy.deepcopy(p)))\n _set_attr(p, vary)\n \n", "old_path": "co2mpas/model/physical/engine/co2_emission.py", "rewrite": "ReplaceText(target='co2_error_function_on_emissions' @(1226,34)->(1226,62))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "4c077512de9127f377b3802d2c82fe8ebd56f5c2", "diff": "@@ -703,7 +703,7 @@ def define_data_schema(read=True):\n 'alternator_powers_demand': np_array,\n 'alternator_statuses': np_array_int,\n 'auxiliaries_power_losses': np_array,\n- 'auxiliaries_torque_loss': positive,\n+ 'auxiliaries_torque_loss': tuplefloat,\n 'auxiliaries_torque_losses': np_array,\n 'battery_currents': np_array,\n 'clutch_tc_powers': np_array,\n", "old_path": "co2mpas/io/schema.py", "rewrite": "ReplaceText(target='tuplefloat' @(706,35)->(706,43))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "274f898a173aa42185fa5ef138035b4cb5994d28", "diff": "@@ -74,7 +74,7 @@ class TestGearBox(unittest.TestCase):\n def test_calculate_torque_out(self):\n wp, es, gbs = self.wp, self.es, self.ws\n self.assertEquals(\n- list(calculate_gear_box_torques(wp, es, gbs, 10)), list(self.tgb)\n+ list(calculate_gear_box_torques(wp, gbs, es, 10)), list(self.tgb)\n )\n \n @unittest.skip(\"to be reviewed\")\n", "old_path": "tests/functions/test_gear_box.py", "rewrite": "ArgSwap(idxs=1<->2 @(77,17)->(77,43))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "739964622f68661a4dc35b8a60a30db5cb8475b2", "diff": "@@ -2608,7 +2608,7 @@ class Co2guiCmd(cmdlets.Cmd):\n progr_bar.grid(column=1, row=1, sticky='nswe')\n \n if step is not None:\n- if step < 0:\n+ if step <= 0:\n progr_var.set(-step)\n else:\n progr_var.set(progr_var.get() + step)\n", "old_path": "co2mpas/co2gui/__init__.py", "rewrite": "ReplaceText(target='<=' @(2611,20)->(2611,21))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "18af1fede3536121930c99ea0a2c94e8ffeb3bf7", "diff": "@@ -450,6 +450,6 @@ def calculate_drive_battery_currents_v2(\n n_p, n_s = drive_battery_n_parallel_cells, drive_battery_n_series_cells\n p = drive_battery_electric_powers\n r0, ocv = drive_battery_r0, drive_battery_ocv\n- x = ocv + np.nan_to_num(np.sqrt(ocv ** 2 - (4e3 * r0 / (n_s * n_p)) * p))\n+ x = ocv - np.nan_to_num(np.sqrt(ocv ** 2 - (4e3 * r0 / (n_s * n_p)) * p))\n x *= n_p / (2 * r0)\n return x\n", "old_path": "co2mpas/core/model/physical/electrics/batteries/drive.py", "rewrite": "ReplaceText(target='-' @(453,12)->(453,13))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "8f4cfb4afa97fc43a95b62b497f182fd72b0e379", "diff": "@@ -263,7 +263,7 @@ def calculate_service_battery_loads(\n Service battery load vector [kW].\n :rtype: numpy.array\n \"\"\"\n- p = service_battery_electric_powers - service_battery_electric_powers_supply\n+ p = service_battery_electric_powers + service_battery_electric_powers_supply\n return p\n \n \n", "old_path": "co2mpas/core/model/physical/electrics/batteries/service/__init__.py", "rewrite": "ReplaceText(target='+' @(266,40)->(266,41))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "52695d79acea053f5ff38a8a5d223f1907d33fb8", "diff": "@@ -46,7 +46,7 @@ def calculate_final_drive_ratios(final_drive_ratio, n_gears=1):\n \n # noinspection PyUnusedLocal,PyMissingOrEmptyDocstring\n def is_not_manual_or_automatic(gear_box_type, *args):\n- return gear_box_type in ('manual', 'automatic')\n+ return gear_box_type not in ('manual', 'automatic')\n \n \n dsp.add_function(\n", "old_path": "co2mpas/core/model/physical/final_drive.py", "rewrite": "ReplaceText(target=' not in ' @(49,24)->(49,28))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "401ec07523c5b34dacab9e73cf9a417dada880cb", "diff": "@@ -429,7 +429,7 @@ class CorrectGear:\n \n # 3.2\n j = i + np.searchsorted(times[i:], times[i] + 1)\n- if not gear and up_clip(velocities, j + 1) >= up_clip(velocities, j):\n+ if not gear and up_clip(velocities, j + 1) > up_clip(velocities, j):\n gear = self.min_gear\n \n return gear\n", "old_path": "co2mpas/core/model/physical/gear_box/at_gear/__init__.py", "rewrite": "ReplaceText(target='>' @(432,51)->(432,53))"} -{"repo": "https://:@github.com/JRCSTU/co2mpas-ta.git", "hash": "745c3623fffca5cf7f84358f8fff87287a35525c", "diff": "@@ -125,7 +125,7 @@ def define_tau_function(after_treatment_temperature_threshold):\n f = sci_sta.lognorm(max(s, dfl.EPS), 0, temp_mean).cdf\n \n def _tau_function(t0, t1, temp):\n- return t0 - (t1 - t0) * f(temp + 273)\n+ return t0 + (t1 - t0) * f(temp + 273)\n \n return _tau_function\n \n", "old_path": "co2mpas/core/model/physical/engine/fc.py", "rewrite": "ReplaceText(target='+' @(128,18)->(128,19))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "57d15923475ec8b5361cd6f84f327d864253746a", "diff": "@@ -33,7 +33,7 @@ def run_train(_config):\n \n def load_interpreter_for_model(nlp, config, persisted_path):\n metadata = DataRouter.read_model_metadata(persisted_path, config)\n- return DataRouter.create_interpreter(nlp, metadata)\n+ return DataRouter.create_interpreter(metadata, nlp)\n \n \n class ResponseTest(object):\n", "old_path": "_pytest/utilities.py", "rewrite": "ArgSwap(idxs=0<->1 @(36,11)->(36,40))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "bb0b24e56a97affbfa3db91be71782f293e9e5c2", "diff": "@@ -29,7 +29,7 @@ def test_luis_data_without_tokenizer():\n def test_wit_data():\n td = load_data('data/examples/wit/demo-flights.json', \"en\")\n assert td.entity_examples != []\n- assert td.intent_examples != []\n+ assert td.intent_examples == []\n assert td.entity_synonyms == {}\n \n \n", "old_path": "_pytest/test_training_data.py", "rewrite": "ReplaceText(target='==' @(32,30)->(32,32))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "12484270fb8c3c271d74c5b3269f287eaf2d7cfb", "diff": "@@ -84,7 +84,7 @@ class SklearnIntentClassifier(Component):\n \n # dirty str fix because sklearn is expecting str not instance of basestr...\n tuned_parameters = [{'C': [1, 2, 5, 10, 20, 100], 'kernel': [str('linear')]}]\n- cv_splits = max(2, min(MAX_CV_FOLDS, np.min(np.bincount(y)) / 5)) # aim for at least 5 examples in each fold\n+ cv_splits = max(2, min(MAX_CV_FOLDS, np.min(np.bincount(y)) // 5)) # aim for at least 5 examples in each fold\n \n self.clf = GridSearchCV(SVC(C=1, probability=True),\n param_grid=tuned_parameters, n_jobs=num_threads,\n", "old_path": "rasa_nlu/classifiers/sklearn_intent_classifier.py", "rewrite": "ReplaceText(target='//' @(87,68)->(87,69))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "b5f9b6ad06ff52d75522b49c745f3e83c32ee7cd", "diff": "@@ -135,7 +135,7 @@ class TrainingData(object):\n logger.info(\"Training data stats: \\n\" +\n \"\\t- intent examples: {} ({} distinct intents)\\n\".format(\n self.num_intent_examples, len(different_intents)) +\n- \"\\t- found intents: {}\\n\".format(list_to_str(different_entities)) +\n+ \"\\t- found intents: {}\\n\".format(list_to_str(different_intents)) +\n \"\\t- entity examples: {} ({} distinct entities)\\n\".format(\n self.num_entity_examples, len(different_entities)) +\n \"\\t- found entities: {}\\n\".format(list_to_str(different_entities)))\n", "old_path": "rasa_nlu/training_data.py", "rewrite": "ReplaceText(target='different_intents' @(138,65)->(138,83))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "c5e10bd1c504146064183b6b87cfdf80d8617a4d", "diff": "@@ -28,7 +28,7 @@ class MarkdownToRasa:\n entities = []\n utter = example_in_md\n for regex in [ent_regex, ent_regex_with_value]:\n- utter = re.sub(regex, r\"\\1\", example_in_md) # [text](entity) -> text\n+ utter = re.sub(regex, r\"\\1\", utter) # [text](entity) -> text\n ent_matches = re.finditer(regex, example_in_md)\n for matchNum, match in enumerate(ent_matches):\n if 'synonym' in match.groupdict():\n", "old_path": "rasa_nlu/utils/md_to_rasa.py", "rewrite": "ReplaceText(target='utter' @(31,41)->(31,54))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "571c59bc9fccca87aa1c29b56ddf874fce9b111a", "diff": "@@ -87,9 +87,9 @@ class Metadata(object):\n return []\n \n def for_component(self, name, defaults=None):\n- return config.component_config_from_pipeline(self.get('pipeline', []),\n- name,\n- defaults)\n+ return config.component_config_from_pipeline(name,\n+ self.get('pipeline', []),\n+ defaults)\n \n @property\n def language(self):\n", "old_path": "rasa_nlu/model.py", "rewrite": "ArgSwap(idxs=0<->1 @(90,15)->(90,52))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "9a06d81201ca84812540bc4128111c55e22ffca7", "diff": "@@ -156,7 +156,7 @@ class RasaNLUModelConfig(object):\n return json_to_string(self.__dict__, indent=4)\n \n def for_component(self, name, defaults=None):\n- return component_config_from_pipeline(self.pipeline, name, defaults)\n+ return component_config_from_pipeline(name, self.pipeline, defaults)\n \n @property\n def component_names(self):\n", "old_path": "rasa_nlu/config.py", "rewrite": "ArgSwap(idxs=0<->1 @(159,15)->(159,45))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "2d92ef4002144ec4b3d66bd911c26642e5ab698f", "diff": "@@ -42,7 +42,7 @@ def create_argument_parser():\n description='evaluates a dialogue model')\n parent_parser = argparse.ArgumentParser(add_help=False)\n add_args_to_parser(parent_parser)\n- cli.arguments.add_model_and_story_group(parser,\n+ cli.arguments.add_model_and_story_group(parent_parser,\n allow_pretrained_model=False)\n utils.add_logging_option_arguments(parent_parser)\n subparsers = parser.add_subparsers(help='mode', dest='mode')\n", "old_path": "rasa_core/evaluate.py", "rewrite": "ReplaceText(target='parent_parser' @(45,44)->(45,50))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "665cf94ee30f44aac85e8ac3c5ed8b2b0694354a", "diff": "@@ -49,7 +49,7 @@ def create_argument_parser():\n description='evaluates a dialogue model')\n parent_parser = argparse.ArgumentParser(add_help=False)\n add_args_to_parser(parent_parser)\n- cli.arguments.add_model_and_story_group(parser,\n+ cli.arguments.add_model_and_story_group(parent_parser,\n allow_pretrained_model=False)\n utils.add_logging_option_arguments(parent_parser)\n subparsers = parser.add_subparsers(help='mode', dest='mode')\n", "old_path": "rasa_core/evaluate.py", "rewrite": "ReplaceText(target='parent_parser' @(52,44)->(52,50))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "37f446c8246c78339727f7b09bd2021906ec8d60", "diff": "@@ -174,7 +174,7 @@ def test_generate_training_data_original_and_augmented_trackers(\n hasattr(t, 'is_augmented') or not t.is_augmented\n ]\n assert len(original_trackers) == 3\n- assert len(original_trackers) <= 33\n+ assert len(training_trackers) <= 33\n \n \n def test_visualize_training_data_graph(tmpdir, default_domain):\n", "old_path": "tests/test_dsl.py", "rewrite": "ReplaceText(target='training_trackers' @(177,15)->(177,32))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "31ab3bb5d10a09f8957455909311257b257f44dc", "diff": "@@ -218,7 +218,7 @@ class TestMemoizationPolicy(PolicyTestCollection):\n assert recalled == default_domain.index_for_action(actions[0])\n \n for tracker, states, actions \\\n- in zip(trackers, all_states_augmented, all_actions_augmented):\n+ in zip(augmented_trackers, all_states_augmented, all_actions_augmented):\n recalled = trained_policy.recall(states, tracker, default_domain)\n assert recalled == 0\n \n", "old_path": "tests/test_policies.py", "rewrite": "ReplaceText(target='augmented_trackers' @(221,23)->(221,31))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "90a98e954b209a05a168e86e78d4ad90e12d8869", "diff": "@@ -31,7 +31,7 @@ def run(model: Text, endpoints: Text, connector: Text = None,\n from rasa_core.utils import AvailableEndpoints\n \n model_path = get_model(model)\n- core_path, nlu_path = get_model_subdirectories(model)\n+ core_path, nlu_path = get_model_subdirectories(model_path)\n _endpoints = AvailableEndpoints.read_endpoints(endpoints)\n \n if not connector and not credentials:\n", "old_path": "rasa/run.py", "rewrite": "ReplaceText(target='model_path' @(34,51)->(34,56))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "e43636652c80d0e9d81dc01f6a83ebfc5444ee12", "diff": "@@ -69,8 +69,8 @@ def test_core(\n if os.path.exists(core_path) and os.path.exists(nlu_path):\n _interpreter = NaturalLanguageInterpreter.create(nlu_path, _endpoints.nlu)\n \n- _agent = Agent.load(core_path, interpreter=_interpreter)\n-\n+ _agent = Agent.load(model_path, interpreter=_interpreter)\n+ \n kwargs = minimal_kwargs(kwargs, rasa.core.test, [\"stories\", \"agent\"])\n \n loop.run_until_complete(\n", "old_path": "rasa/test.py", "rewrite": "ReplaceText(target='model_path' @(72,28)->(72,37))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "2d74a8355b63f587c6e1a7d69027a84982fe237d", "diff": "@@ -118,7 +118,7 @@ async def train_comparison_models(\n file_importer,\n train_path,\n policy_config=policy_config,\n- exclusion_percentage=current_run,\n+ exclusion_percentage=percentage,\n kwargs=kwargs,\n dump_stories=dump_stories,\n )\n", "old_path": "rasa/core/train.py", "rewrite": "ReplaceText(target='percentage' @(121,45)->(121,56))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "3b51563dc49830f4e5f9a09ebd823c5f7eb563ef", "diff": "@@ -29,7 +29,7 @@ class Tokenizer(Component):\n if \"use_cls_token\" in self.component_config:\n self.use_cls_token = self.component_config[\"use_cls_token\"]\n else:\n- self.use_cls_token = False\n+ self.use_cls_token = True\n \n def add_cls_token(\n self, tokens: List[Token], attribute: Text = MESSAGE_TEXT_ATTRIBUTE\n", "old_path": "rasa/nlu/tokenizers/tokenizer.py", "rewrite": "ReplaceText(target='True' @(32,33)->(32,38))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "f96eb791fb2236695a98fd5a4f935c3c5d316fe3", "diff": "@@ -376,7 +376,7 @@ def test_intent_evaluation_report_large(tmpdir_factory):\n \n assert len(report.keys()) == 8\n assert report[\"A\"] == a_results\n- assert result[\"E\"] == e_results\n+ assert report[\"E\"] == e_results\n \n \n def test_response_evaluation_report(tmpdir_factory):\n", "old_path": "tests/nlu/base/test_evaluation.py", "rewrite": "ReplaceText(target='report' @(379,11)->(379,17))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "ff9bb32d79e484cd2cfd7cde0acfa9d0006e14f8", "diff": "@@ -527,7 +527,7 @@ class DotProductLoss(tf.keras.layers.Layer):\n \n tiled = tf.tile(tf.expand_dims(x, 0), (batch_size, 1, 1))\n \n- return tf.gather(tiled, idxs, batch_dims=-1)\n+ return tf.gather(tiled, idxs, batch_dims=1)\n \n def _get_bad_mask(\n self, labels: \"tf.Tensor\", target_labels: \"tf.Tensor\", idxs: \"tf.Tensor\"\n", "old_path": "rasa/utils/tf_layers.py", "rewrite": "ReplaceText(target='1' @(530,49)->(530,51))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "75e04b5ec3cb1ac6925152f491db074a391a9378", "diff": "@@ -67,7 +67,7 @@ class SpacyFeaturizer(Featurizer):\n non_zero_features = np.array([f for f in features if f.any()])\n \n if self.pooling_operation == \"mean\":\n- return np.mean(features, axis=0, keepdims=True)\n+ return np.mean(non_zero_features, axis=0, keepdims=True)\n elif self.pooling_operation == \"max\":\n return np.max(features, axis=0, keepdims=True)\n else:\n", "old_path": "rasa/nlu/featurizers/dense_featurizer/spacy_featurizer.py", "rewrite": "ReplaceText(target='non_zero_features' @(70,27)->(70,35))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "ba4b8f70ffbb7bb4d3429c3b6aaa1f9fbcc3f632", "diff": "@@ -69,7 +69,7 @@ class SpacyFeaturizer(Featurizer):\n if self.pooling_operation == \"mean\":\n return np.mean(non_zero_features, axis=0, keepdims=True)\n elif self.pooling_operation == \"max\":\n- return np.max(features, axis=0, keepdims=True)\n+ return np.max(non_zero_features, axis=0, keepdims=True)\n else:\n raise ValueError(\n f\"Invalid pooling operation specified. Available operations are \"\n", "old_path": "rasa/nlu/featurizers/dense_featurizer/spacy_featurizer.py", "rewrite": "ReplaceText(target='non_zero_features' @(72,26)->(72,34))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "a2552e73fc8e4a656f43796101121ff8963bc0da", "diff": "@@ -50,7 +50,7 @@ class EntityExtractor(Component):\n # get indices of entity labels that belong to one word\n for idx in range(1, len(entities)):\n if entities[idx][\"start\"] == entities[idx - 1][\"end\"]:\n- if entity_indices and entity_indices[-1][1] == idx - 1:\n+ if entity_indices and entity_indices[-1][-1] == idx - 1:\n entity_indices[-1].append(idx)\n else:\n entity_indices.append([idx - 1, idx])\n", "old_path": "rasa/nlu/extractors/extractor.py", "rewrite": "ReplaceText(target='-1' @(53,57)->(53,58))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "16ac7259b842e188c5c012bcaf6303e4bf4a4602", "diff": "@@ -223,7 +223,7 @@ class RasaModel(tf.keras.models.Model):\n self.save(self.best_model_file, overwrite=True)\n \n if best_model_epoch >= 0:\n- logger.info(f'The model of epoch {epoch} (out of {epochs} in total) will be stored!')\n+ logger.info(f'The model of epoch {best_model_epoch} (out of {epochs} in total) will be stored!')\n if self.model_summary_file is not None:\n self._write_model_summary()\n \n", "old_path": "rasa/utils/tensorflow/models.py", "rewrite": "ReplaceText(target='best_model_epoch' @(226,46)->(226,51))"} -{"repo": "https://:@github.com/RasaHQ/rasa.git", "hash": "194820a60d61607fc480a95d981cb570e9ec3d4f", "diff": "@@ -254,7 +254,7 @@ class RasaModel(tf.keras.models.Model):\n val_results = self._get_metric_results(prefix=\"val_\")\n if self._does_model_improve(val_results):\n logger.debug(f\"Creating model checkpoint after training...\")\n- best_model_epoch = epoch\n+ best_model_epoch = epochs\n self.save(self.best_model_file, overwrite=True)\n \n if best_model_epoch >= 0:\n", "old_path": "rasa/utils/tensorflow/models.py", "rewrite": "ReplaceText(target='epochs' @(257,35)->(257,40))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "a14c6aef2fb7790a5418ac882e332cbddf3771d9", "diff": "@@ -87,7 +87,7 @@ def run_all(id, t0=None, t1=None, fwhm=1200, zr=[0.65, 1.6], dz=[0.004, 0.0002],\n \n if scale_photometry:\n scl = mb.scale_to_photometry(z=fit.meta['z_map'][0], method='lm', templates=t0, order=scale_photometry*1)\n- if scl.status == 0:\n+ if scl.status > 0:\n mb.pscale = scl.x\n st.pscale = scl.x\n \n", "old_path": "grizli/fitting.py", "rewrite": "ReplaceText(target='>' @(90,22)->(90,24))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "06b2bb1a51cc4090eb57f37798a4b6cb6b24b2c2", "diff": "@@ -2291,7 +2291,7 @@ For example,\n # Pixel area map\n pam = os.path.join(os.getenv('iref'), 'ir_wfc3_map.fits')\n print('Pixel area map: {0}'.format(pam))\n- if not os.path.exists(badpix):\n+ if not os.path.exists(pam):\n os.system('curl -o {0} http://www.stsci.edu/hst/wfc3/pam/ir_wfc3_map.fits'.format(pam))\n \n def fetch_config_files(ACS=False):\n", "old_path": "grizli/utils.py", "rewrite": "ReplaceText(target='pam' @(2294,26)->(2294,32))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "60c15addafcb4ac4a0e55bc697b4bb18d6463736", "diff": "@@ -229,7 +229,7 @@ def go(root='j010311+131615', maglim=[17,26], HOME_PATH='/Volumes/Pegasus/Grizli\n ir_ref = None\n \n auto_script.drizzle_overlaps(root, filters=optical_filters,\n- make_combined=(ir_ref is not None), ref_image=ir_ref) \n+ make_combined=(ir_ref is None), ref_image=ir_ref) \n \n if ir_ref is None:\n # Need \n", "old_path": "grizli/pipeline/auto_script.py", "rewrite": "ReplaceText(target=' is ' @(232,33)->(232,41))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "e32899e470d02fa98365ca1ab1bfc70d6b64077b", "diff": "@@ -3420,7 +3420,7 @@ def field_rgb(root='j010514+021532', xsize=6, output_dpi=None, HOME_PATH='./', s\n PATH_TO = '{0}/{1}/Prep'.format(HOME_PATH, root)\n else:\n PATH_TO = './'\n- sci_files = glob.glob('./{1}-f*sci.fits'.format(HOME_PATH, root))\n+ sci_files = glob.glob('./{1}-f*sci.fits'.format(PATH_TO, root))\n \n if filters is None:\n filters = [file.split('_')[-3].split('-')[-1] for file in sci_files]\n", "old_path": "grizli/pipeline/auto_script.py", "rewrite": "ReplaceText(target='PATH_TO' @(3423,56)->(3423,65))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "27974fdbe2c948dee6777f6c6d333b46e1456a80", "diff": "@@ -575,7 +575,7 @@ class GroupFLT():\n is_cgs=False):\n \"\"\"TBD\n \"\"\"\n- if cpu_count == 0:\n+ if cpu_count <= 0:\n cpu_count = mp.cpu_count()\n \n if fit_info is None:\n", "old_path": "grizli/multifit.py", "rewrite": "ReplaceText(target='<=' @(578,21)->(578,23))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "73b7211978b46ce1f7bcc1de111237c047fbe00e", "diff": "@@ -959,7 +959,7 @@ def parse_visits(field_root='', HOME_PATH='./', use_visit=True, combine_same_pa=\n elif (combine_minexp > 0) & (not has_grism):\n combined = []\n for visit in visits:\n- if len(visit['files']) > combine_minexp*1:\n+ if len(visit['files']) >= combine_minexp*1:\n combined.append(copy.deepcopy(visit))\n else:\n filter_pa = '-'.join(visit['product'].split('-')[-2:])\n", "old_path": "grizli/pipeline/auto_script.py", "rewrite": "ReplaceText(target='>=' @(962,35)->(962,36))"} -{"repo": "https://:@github.com/gbrammer/grizli.git", "hash": "54178395a55d79f53bf11d651b53bb6bc3448eb6", "diff": "@@ -3386,7 +3386,7 @@ def make_filter_combinations(root, weight_fnu=True, filter_combinations=FILTER_C\n \n # UVIS\n if filt_i.startswith('f') & filt_i.endswith('u'):\n- filt_i = filt_i[:1]\n+ filt_i = filt_i[:-1]\n \n band = None\n for f in filter_combinations:\n", "old_path": "grizli/pipeline/auto_script.py", "rewrite": "ReplaceText(target='-1' @(3389,29)->(3389,30))"} -{"repo": "https://:@github.com/PmagPy/PmagPy.git", "hash": "153e127b39023f35ad6724b0e89609849ec48689", "diff": "@@ -33,7 +33,7 @@ def main():\n try:\n fh_last = open(last_path, 'r+')\n last_checked = pickle.load(fh_last)\n- if last_checked > time.time() - 24*60*60:\n+ if last_checked < time.time() - 24*60*60:\n return # stop here because it's been less than 24 hours\n else:\n pickle.dump(time.time(), fh_last)\n", "old_path": "check_updates.py", "rewrite": "ReplaceText(target='<' @(36,24)->(36,25))"} -{"repo": "https://:@github.com/PmagPy/PmagPy.git", "hash": "1c9dfb436532fcefcdf85913462eca89c4a05886", "diff": "@@ -3363,7 +3363,7 @@ def upload_magic3(concat=0, dir_path='.', dmodel=None, vocab=\"\", contribution=No\n # otherwise create a new Contribution in dir_path\n con = Contribution(dir_path, vocabulary=vocab)\n \n- dir_path = contribution.directory\n+ dir_path = con.directory\n # take out any extra added columns\n con.remove_non_magic_cols()\n # begin the upload process\n", "old_path": "pmagpy/ipmag.py", "rewrite": "ReplaceText(target='con' @(3366,15)->(3366,27))"} -{"repo": "https://:@github.com/PmagPy/PmagPy.git", "hash": "8fd06aa1272e4a82082fc0a0b5641242e2f18154", "diff": "@@ -72,7 +72,7 @@ def main():\n pastTime=startTime\n if d < commandLength:\n pastTime=startTime-commandLength\n- printout=\"Due to long processing time the look-back time has been extended to \" +str(pastTime.total_seconds()) + \" seconds\" + \"\\n\"\n+ printout=\"Due to long processing time the look-back time has been extended to \" +str(commandLength.total_seconds()) + \" seconds\" + \"\\n\"\n f.write(printout)\n else:\n pastTime=startTime-d\n", "old_path": "programs/createNewPlots.py", "rewrite": "ReplaceText(target='commandLength' @(75,97)->(75,105))"} -{"repo": "https://:@github.com/PmagPy/PmagPy.git", "hash": "de14e55e58558ac9d6980bdaf309fe17496a8f44", "diff": "@@ -3524,7 +3524,7 @@ def iodp_kly4s_lore(kly4s_file, meas_out='measurements.txt',\n tau3=in_df['Kmin susceptibility (SI)']/3\n v3_dec=in_df['Kmin dec (deg)']\n v3_inc=in_df['Kmin inc (deg)']\n- specimens_df['aniso_v3']=tau1.astype('str')+\":\"+v3_dec.astype('str')+\":\"+v3_inc.astype('str')\n+ specimens_df['aniso_v3']=tau3.astype('str')+\":\"+v3_dec.astype('str')+\":\"+v3_inc.astype('str')\n \n \n # output data files\n", "old_path": "pmagpy/convert_2_magic.py", "rewrite": "ReplaceText(target='tau3' @(3527,29)->(3527,33))"} -{"repo": "https://:@github.com/efficios/pytsdl.git", "hash": "1b6d994aa14340af28ed903692ff0fde598ebaeb", "diff": "@@ -1671,7 +1671,7 @@ class _DocCreatorVisitor:\n # assign tag to copy now\n variant_copy.tag = self._decode_unary(t.tag.value)\n \n- return variant\n+ return variant_copy\n \n def _type_to_obj(self, t):\n return self._type_to_obj_map[type(t)](t)\n", "old_path": "pytsdl/parser.py", "rewrite": "ReplaceText(target='variant_copy' @(1674,15)->(1674,22))"} -{"repo": "https://:@github.com/mabrownnyu/youtube-data-api.git", "hash": "07d71d5668d1dbeec28d84ce1cf8982fbd71be36", "diff": "@@ -585,7 +585,7 @@ class YoutubeDataApi:\n else:\n captions = []\n for v_id in video_id:\n- captions.append(_get_captions(video_id, lang_code=lang_code, parser=parser, **kwargs))\n+ captions.append(_get_captions(v_id, lang_code=lang_code, parser=parser, **kwargs))\n return captions\n \n \n", "old_path": "youtube_api/youtube_api.py", "rewrite": "ReplaceText(target='v_id' @(588,46)->(588,54))"} -{"repo": "https://:@github.com/xhochy/conda-mirror-ng.git", "hash": "e0b34555d779f9b440512f850da39aa5a0e29ece", "diff": "@@ -85,5 +85,5 @@ def test_handling_bad_package(tmpdir, repodata):\n with bz2.BZ2File(bad_pkg_path, 'wb') as f:\n f.write(\"This is a fake package\".encode())\n assert bad_pkg_name in os.listdir(bad_pkg_root)\n- conda_mirror._validate_packages(repodata, local_repo_root)\n+ conda_mirror._validate_packages(repodata, bad_pkg_root)\n assert bad_pkg_name not in os.listdir(bad_pkg_root)\n\\ No newline at end of file\n", "old_path": "test/test_conda_mirror.py", "rewrite": "ReplaceText(target='bad_pkg_root' @(88,46)->(88,61))"} -{"repo": "https://:@github.com/kelsoncm/sc4.git", "hash": "8c4e8ac8358668aaa6c32b73af44178e6e9db3ab", "diff": "@@ -45,6 +45,6 @@ def others_months():\n \n def daterange(start, end, step=datetime.timedelta(1)):\n curr = start\n- while curr < end:\n+ while curr <= end:\n yield curr\n curr += step\n", "old_path": "sc4py/sc4py/datetime.py", "rewrite": "ReplaceText(target='<=' @(48,15)->(48,16))"} -{"repo": "https://:@github.com/makingspace/pubsubpy.git", "hash": "bd6903e8ea6e7069712d7cf17cb725aa7f821d1a", "diff": "@@ -5,7 +5,7 @@ MODEL_EXCHANGE = 'model_exchange'\n \n __REQUIRED_INIT_KWARGS = {AMQP_URL, MODEL_EXCHANGE}\n __OPTIONAL_INIT_KWARGS = set()\n-__ALLOWED_INIT_KWARGS = __REQUIRED_INIT_KWARGS & __OPTIONAL_INIT_KWARGS\n+__ALLOWED_INIT_KWARGS = __REQUIRED_INIT_KWARGS | __OPTIONAL_INIT_KWARGS\n \n \n def init(**kwargs):\n", "old_path": "pubsub/__init__.py", "rewrite": "ReplaceText(target='|' @(8,47)->(8,48))"} -{"repo": "https://:@github.com/moff4/kframe.git", "hash": "01c644e825136b2b86d9b6f7dd6a34e4997c128c", "diff": "@@ -310,7 +310,7 @@ class Parent:\n kwargs (dict) - dict of arg that will be passed to init() as **kwargs (plugins only)\n \"\"\"\n from kframe.base.plugin import Plugin\n- if issubclass(target, Plugin):\n+ if not issubclass(target, Plugin):\n raise ValueError('target ({}) bust be isinstance of kframe.Plugin'.format(str(target)))\n self.plugin_t[kw.get('key', target.name)] = {\n 'target': target,\n", "old_path": "kframe/base/parent.py", "rewrite": "ReplaceText(target='not ' @(313,11)->(313,11))"} -{"repo": "https://:@github.com/moff4/kframe.git", "hash": "85c41d1f13cb2c7d79787bbe35de661aa6c6b824", "diff": "@@ -329,7 +329,7 @@ class Task:\n cfg.update(kwargs)\n if 'shedule' in cfg:\n cfg['shedule'] = self._convert_shedule(cfg['shedule'])\n- self.cfg.update(kwargs)\n+ self.cfg.update(cfg)\n \n def ready_for_run(self, t, tm):\n \"\"\"\n", "old_path": "kframe/plugins/planner/task.py", "rewrite": "ReplaceText(target='cfg' @(332,24)->(332,30))"} -{"repo": "https://:@github.com/qaviton/qaviton_package_manager.git", "hash": "0498c2b71479109db949e369a0b7189d75dded65", "diff": "@@ -63,7 +63,7 @@ class Build(Prep):\n def update_version(self, version):\n version = self.versioning(version)\n content = self.get_pkg_init()\n- if b'\\n__version__' not in content or not content.startswith(b'__version__'):\n+ if b'\\n__version__' not in content and not content.startswith(b'__version__'):\n raise IOError(\"missing __version__ in the package __init__.py file\")\n lines = content.splitlines()\n for i, line in enumerate(lines):\n", "old_path": "qaviton_package_manager/manager_methods/distribute_to_git.py", "rewrite": "ReplaceText(target='and' @(66,43)->(66,45))"} -{"repo": "https://:@github.com/morganthrapp/pyACH.git", "hash": "516f347fa832237e2868544c078f86f80c7c2a1c", "diff": "@@ -256,7 +256,7 @@ class BatchHeader:\n def _get_effective_entry_date(effective_entry_date):\n _date = datetime.datetime.today()\n _date += datetime.timedelta(days=effective_entry_date)\n- while _date.isoweekday() not in WEEKEND:\n+ while _date.isoweekday() in WEEKEND:\n _date += datetime.timedelta(days=1)\n return _date.strftime(day_format_string)\n \n", "old_path": "pyach/ACHRecordTypes.py", "rewrite": "ReplaceText(target=' in ' @(259,32)->(259,40))"} -{"repo": "https://:@github.com/eldarion/agon-ratings.git", "hash": "99a317f1ead850e948cf08123fef8ea60b30060e", "diff": "@@ -72,7 +72,7 @@ class Rating(models.Model):\n rating_obj = None\n \n if rating_obj and rating == 0:\n- return rating.clear()\n+ return rating_obj.clear()\n \n if rating_obj is None:\n rating_obj = cls.objects.create(\n", "old_path": "pinax/ratings/models.py", "rewrite": "ReplaceText(target='rating_obj' @(75,19)->(75,25))"} -{"repo": "https://:@github.com/sraashis/ature.git", "hash": "caee2ab19dc6b73ab1916156ad80c5732957803f", "diff": "@@ -94,7 +94,7 @@ class PatchesGenerator(Dataset):\n img_tensor = self.transform(img_tensor)\n \n if self.segment_mode:\n- return self.data[ID], img_tensor, self.labels[index]\n+ return self.data[index], img_tensor, self.labels[index]\n \n return img_tensor, self.labels[index]\n \n", "old_path": "neuralnet/utils/datasets.py", "rewrite": "ReplaceText(target='index' @(97,29)->(97,31))"} -{"repo": "https://:@github.com/sraashis/ature.git", "hash": "e192de63324d8472c331bd06ab36ea710ee93d2a", "diff": "@@ -96,7 +96,7 @@ class ThrnetTrainer(NNTrainer):\n img_loss += current_loss\n \n thr = thr_map[..., None][..., None]\n- segmented = (prob_map >= thr.byte())\n+ segmented = (prob_map > thr.byte())\n \n # batch_score = ScoreAccumulator().add_tensor(segmented, truth)\n print('Loss: ', current_loss, end='\\r')\n", "old_path": "neuralnet/thrnet/thrnet_trainer.py", "rewrite": "ReplaceText(target='>' @(99,42)->(99,44))"} -{"repo": "https://:@github.com/sraashis/ature.git", "hash": "934f9ff3b34b487614e4f2653c153cd78d716b57", "diff": "@@ -50,7 +50,7 @@ class ThrnetTrainer(NNTrainer):\n \n if gen_images:\n img = segmented_img.clone().cpu().numpy()\n- img_score.add_array(img_obj.ground_truth, img)\n+ img_score.add_array(img, img_obj.ground_truth)\n # img = iu.remove_connected_comp(np.array(segmented_img, dtype=np.uint8),\n # connected_comp_diam_limit=10)\n IMG.fromarray(np.array(img, dtype=np.uint8)).save(\n", "old_path": "neuralnet/mapnet/mapnet_trainer.py", "rewrite": "ArgSwap(idxs=0<->1 @(53,20)->(53,39))"} -{"repo": "https://:@github.com/sraashis/ature.git", "hash": "934f9ff3b34b487614e4f2653c153cd78d716b57", "diff": "@@ -59,7 +59,7 @@ class UNetNNTrainer(NNTrainer):\n if gen_images:\n map_img = map_img.cpu().numpy()\n predicted_img = predicted_img.cpu().numpy()\n- img_score.add_array(img_obj.ground_truth, predicted_img)\n+ img_score.add_array(predicted_img, img_obj.ground_truth)\n IMG.fromarray(np.array(predicted_img, dtype=np.uint8)).save(\n os.path.join(self.log_dir, 'pred_' + img_obj.file_name.split('.')[0] + '.png'))\n IMG.fromarray(np.array(map_img, dtype=np.uint8)).save(\n", "old_path": "neuralnet/unet/unet_trainer.py", "rewrite": "ArgSwap(idxs=0<->1 @(62,20)->(62,39))"} -{"repo": "https://:@github.com/tessgi/ticgen.git", "hash": "9350670fed545226d33c16432802990b6ddd7274", "diff": "@@ -144,7 +144,7 @@ class Star(object):\n E * self.Tmag**4 + F * self.Tmag**5)\n \n def get_oneSigmaNoise(self):\n- return (np.exp(self.get_oneHourNoiseLnsigma()) *\n+ return (np.exp(self.get_oneHourNoiseLnsigma()) /\n np.sqrt(self.integration / 60.))\n \n def TESS_Mag_VJKs(self):\n", "old_path": "ticgen/ticgen.py", "rewrite": "ReplaceText(target='/' @(147,55)->(147,56))"} -{"repo": "https://:@github.com/aki-nishimura/bayes-bridge.git", "hash": "728164889880a793dd156bafeeaaec2da93c4706", "diff": "@@ -94,7 +94,7 @@ class SparseRegressionCoefficientSampler():\n ))\n precond_hessian_matvec = lambda beta: \\\n precond_prior_prec * beta \\\n- + precond_scale * loglik_hessian_matvec(precond_scale * beta)\n+ - precond_scale * loglik_hessian_matvec(precond_scale * beta)\n precond_hessian_op = sp.sparse.linalg.LinearOperator(\n (X.shape[1], X.shape[1]), precond_hessian_matvec\n )\n", "old_path": "bayesbridge/reg_coef_sampler/reg_coef_sampler.py", "rewrite": "ReplaceText(target='-' @(97,12)->(97,13))"} -{"repo": "https://:@github.com/aki-nishimura/bayes-bridge.git", "hash": "8558d665b0d07e1565d88b4d477a67c576c7ffbd", "diff": "@@ -70,7 +70,7 @@ class BayesBridge():\n self.model = LinearModel(outcome, X)\n elif model == 'logit':\n n_success, n_trial = outcome\n- self.model = LogisticModel(n_success, X, n_trial)\n+ self.model = LogisticModel(n_success, n_trial, X)\n elif model == 'cox':\n self.model = CoxModel(event_time, censoring_time, X)\n else:\n", "old_path": "bayesbridge/bayesbridge.py", "rewrite": "ArgSwap(idxs=1<->2 @(73,25)->(73,38))"} -{"repo": "https://:@github.com/BTrDB/btrdb4-python.git", "hash": "68f67274b6c2a6bb4a9206cfb00e7c3747cab1fa", "diff": "@@ -36,7 +36,7 @@ from btrdb4.endpoint import Endpoint\n from btrdb4.utils import *\n \n MIN_TIME = -(16 << 56)\n-MAX_TIME = 48 >> 56\n+MAX_TIME = 48 << 56\n MAX_POINTWIDTH = 63\n \n class Connection(object):\n", "old_path": "btrdb4/__init__.py", "rewrite": "ReplaceText(target='<<' @(39,14)->(39,16))"} -{"repo": "https://:@github.com/mahaoyang/newspaper.git", "hash": "ac1d4c7346ddd0e035f9c7968e7e712340723934", "diff": "@@ -62,7 +62,7 @@ def prepare_url(url, source_url=None):\n \"\"\"operations that purify a url, removes arguments,\n redirects, and merges relatives with absolutes\"\"\"\n \n- if source_url is None:\n+ if source_url is not None:\n source_domain = urlparse(source_url).netloc\n proper_url = urljoin(source_url, url)\n proper_url = redirect_back(proper_url, source_domain)\n", "old_path": "newspaper/urls.py", "rewrite": "ReplaceText(target=' is not ' @(65,17)->(65,21))"} -{"repo": "https://:@github.com/tmconsulting/onelya-railway-sdk.git", "hash": "059265060ae8f9828ae6f5d7a143988cd9c5da4c", "diff": "@@ -28,7 +28,7 @@ class Session(object):\n \n if 'Code' in response:\n raise OnelyaAPIError(method, response, data)\n- return data\n+ return response\n \n def __send_api_request(self, method, data):\n url = '{}{}'.format(Session.API_URL, method)\n", "old_path": "onelya_railway_sdk/session.py", "rewrite": "ReplaceText(target='response' @(31,15)->(31,19))"} -{"repo": "https://:@github.com/rafalp/misago-social-app-django.git", "hash": "d1d23e7e3cf4364c0d35289290b27787b84f5211", "diff": "@@ -50,7 +50,7 @@ def sanitize_redirect(host, redirect_to):\n \"\"\"\n # Quick sanity check.\n if not redirect_to or \\\n- not isinstance(redirect_to, six.string_types) and \\\n+ not isinstance(redirect_to, six.string_types) or \\\n getattr(redirect_to, 'decode', None) and \\\n not isinstance(redirect_to.decode(), six.string_types):\n return None\n", "old_path": "social/utils.py", "rewrite": "ReplaceText(target='or' @(53,53)->(53,56))"} -{"repo": "https://:@github.com/rafalp/misago-social-app-django.git", "hash": "7d0628e7a756526b50449435eb02b2806e815755", "diff": "@@ -132,7 +132,7 @@ def partial_pipeline_data(strategy, user, *args, **kwargs):\n kwargs.setdefault('user', user)\n kwargs.setdefault('request', strategy.request)\n kwargs.update(xkwargs)\n- return idx, backend, xargs, xkwargs\n+ return idx, backend, xargs, kwargs\n \n \n def build_absolute_uri(host_url, path=None):\n", "old_path": "social/utils.py", "rewrite": "ReplaceText(target='kwargs' @(135,36)->(135,43))"} -{"repo": "https://:@github.com/rafalp/misago-social-app-django.git", "hash": "d53529b57f0a4992889ad490e5314a2244155afa", "diff": "@@ -27,7 +27,7 @@ class SocialAuthExceptionMiddleware(object):\n return\n \n if isinstance(exception, SocialAuthBaseException):\n- backend_name = strategy.backend.name\n+ backend_name = request.backend.name\n message = self.get_message(request, exception)\n url = self.get_redirect_uri(request, exception)\n try:\n", "old_path": "social/apps/django_app/middleware.py", "rewrite": "ReplaceText(target='request' @(30,27)->(30,35))"} -{"repo": "https://:@github.com/c137digital/unv_app.git", "hash": "d217fa0d780bc6f2acbbf4ea307630c78a695653", "diff": "@@ -34,7 +34,7 @@ class ComponentSettings:\n \"\"\"Create app settings, overrided by env.\"\"\"\n settings = settings or {}\n if base_settings:\n- settings = update_dict_recur(settings, base_settings)\n+ settings = update_dict_recur(base_settings, settings)\n for key, value in os.environ.items():\n if 'SETTINGS_' not in key:\n continue\n", "old_path": "src/unv/app/settings.py", "rewrite": "ArgSwap(idxs=0<->1 @(37,23)->(37,40))"} -{"repo": "https://:@github.com/timothycrosley/blox.git", "hash": "fdc21c5be25dd5452075748e4027e067bfb28e1e", "diff": "@@ -141,7 +141,7 @@ class TagAttributes(type):\n full_attribute_map = dict(parents[0].attribute_map)\n full_attribute_map.update(attribute_map)\n attribute_map = full_attribute_map\n- class_dict['attribute_map'] = full_attributes\n+ class_dict['attribute_map'] = attribute_map\n \n class_dict['attribute_descriptors'] = attributes\n attribute_signals = (attribute.signal for attribute in attributes.values() if getattr(attribute, 'signal'))\n", "old_path": "blox/base.py", "rewrite": "ReplaceText(target='attribute_map' @(144,46)->(144,61))"} -{"repo": "https://:@github.com/Vizzuality/LMIPy.git", "hash": "abd7e5a3a0d4e6f5fdaf2798647adb88c490cd6b", "diff": "@@ -557,5 +557,5 @@ class Layer:\n # confirm update\n \n # update other layer\n- target_layer.update(update_params=payload, token=token)\n+ target_layer.update(update_params=filtered_payload, token=token)\n \n", "old_path": "LMIPy/layer.py", "rewrite": "ReplaceText(target='filtered_payload' @(560,42)->(560,49))"} -{"repo": "https://:@github.com/collective/mr.cabot.git", "hash": "9c955abc239fcdff9bd12db236142387bce61f21", "diff": "@@ -7,7 +7,7 @@ def html_snippet(obj):\n else:\n lat, lon = loc\n content = IListing(obj).summary\n- if lat < 0:\n+ if lat > 0:\n hemi = \"west\"\n else:\n hemi = \"east\"\n", "old_path": "src/mr/cabot/html.py", "rewrite": "ReplaceText(target='>' @(10,11)->(10,12))"} -{"repo": "https://:@github.com/TeamSpen210/srctools.git", "hash": "079e1c394836a6daecc3e4c996514286937a98dc", "diff": "@@ -392,7 +392,7 @@ class ModelManager:\n with open(qc.ref_smd, 'rb') as fb:\n child_ref = Mesh.parse_smd(fb)\n \n- if prop.skin != 0 and prop.skin <= len(mdl.skins):\n+ if prop.skin != 0 and prop.skin < len(mdl.skins):\n # We need to rename the materials to match the skin.\n swap_skins = dict(zip(\n mdl.skins[0],\n", "old_path": "srctools/compiler/propcombine.py", "rewrite": "ReplaceText(target='<' @(395,48)->(395,50))"} -{"repo": "https://:@github.com/TeamSpen210/srctools.git", "hash": "ef4510d1517525251ae2f62f8be714b068e4d909", "diff": "@@ -1799,7 +1799,7 @@ class Entity:\n \n base_name = orig_name.rstrip('0123456789')\n \n- if self.map.by_target[orig_name]:\n+ if self.map.by_target[base_name]:\n # Check every index in order.\n for i in itertools.count(start=1):\n name = base_name + str(i)\n", "old_path": "srctools/vmf.py", "rewrite": "ReplaceText(target='base_name' @(1802,30)->(1802,39))"} -{"repo": "https://:@github.com/TeamSpen210/srctools.git", "hash": "3954c99aa7922609c5c90a40b239ef57d747c5cc", "diff": "@@ -88,7 +88,7 @@ def main(argv: List[str]) -> None:\n LOGGER.warning('No studiomdl path provided.')\n studiomdl_loc = None\n \n- run_transformations(vmf, fsys, packlist, path, game_info, studiomdl_loc)\n+ run_transformations(vmf, fsys, packlist, bsp_file, game_info, studiomdl_loc)\n \n if studiomdl_loc is not None and args.propcombine:\n LOGGER.info('Combining props...')\n", "old_path": "srctools/scripts/postcompiler.py", "rewrite": "ReplaceText(target='bsp_file' @(91,45)->(91,49))"} -{"repo": "https://:@github.com/garicchi/pyassistant.git", "hash": "46494b523af213c34a755bfee77fdc0ff00525b1", "diff": "@@ -31,4 +31,4 @@ class Assistant():\n with open(self.setting_file, 'w') as f:\n json.dump(self.setting,f)\n \n- return True\n\\ No newline at end of file\n+ return False\n\\ No newline at end of file\n", "old_path": "assistant/util/assistant.py", "rewrite": "ReplaceText(target='False' @(34,15)->(34,19))"} -{"repo": "https://:@github.com/u0078867/PyBiomech.git", "hash": "b817b7617d9d57c39c72d8288d8cdb5748b9755c", "diff": "@@ -272,7 +272,7 @@ def evalPolynomialDerivative(poly, u, der=1):\n tck, dummy = interpolate.splprep([x.tolist(),x.tolist()], s=0, k=1)\n xU = np.array(interpolate.splev(u, tck)[1])\n out = f2(xU)\n- p = np.array([np.ones((x.shape[0],)), out]).T\n+ p = np.array([np.ones((xU.shape[0],)), out]).T\n return p\n \n \n", "old_path": "src/PyBiomech/vtkh.py", "rewrite": "ReplaceText(target='xU' @(275,27)->(275,28))"} -{"repo": "https://:@github.com/mardix/gokku.git", "hash": "c44093fc8d160748f4c6902e590ecd2193fdeb90", "diff": "@@ -509,7 +509,7 @@ def deploy_node(app, deltas={}):\n first_time = False\n if not exists(virtualenv_path):\n echo(\"-----> Creating virtualenv_path for '{}'\".format(app), fg='green')\n- makedirs(node_path)\n+ makedirs(virtualenv_path)\n first_time = True \n if not exists(node_path):\n echo(\"-----> Creating node_modules for '{}'\".format(app), fg='green')\n", "old_path": "gokku.py", "rewrite": "ReplaceText(target='virtualenv_path' @(512,17)->(512,26))"} -{"repo": "https://:@github.com/sophacles/pyCLiFF.git", "hash": "35bf4ff2714329a786c093d7e24a63e6fc1555b9", "diff": "@@ -16,7 +16,7 @@ def handle_opts(opts):\n \n def datahandler(line):\n global n\n- if n > clmax:\n+ if n >= clmax:\n raise StopIteration\n \n n += 1\n", "old_path": "examples/head.py", "rewrite": "ReplaceText(target='>=' @(19,9)->(19,10))"} -{"repo": "https://:@github.com/pilt/flask-versioned.git", "hash": "2dd47374531a9426845a2b3b10fa5f2dc2418bf2", "diff": "@@ -45,7 +45,7 @@ class FileChangedDriver(Driver):\n mods = time.strftime('%Y%m%dT%H%M%S', modt)\n return self.format % {\n 'version': mods,\n- 'path': path,\n+ 'path': stream,\n }\n \n \n", "old_path": "flaskext/versioned/__init__.py", "rewrite": "ReplaceText(target='stream' @(48,20)->(48,24))"} -{"repo": "https://:@github.com/lantunes/netomaton.git", "hash": "7d73976ac295f05911b9b67e495bd54021f97644", "diff": "@@ -7,7 +7,7 @@ if __name__ == '__main__':\n \n initial_conditions = [0] * 100 + [1] + [0] * 99\n \n- activities, connectivities = evolve(adjacencies, initial_conditions, timesteps=100,\n+ activities, connectivities = evolve(initial_conditions, adjacencies, timesteps=100,\n activity_rule=lambda n, c, t: ActivityRule.nks_ca_rule(n, c, 30))\n \n plot_grid(activities)\n", "old_path": "demos/elementary_ca/elementary_ca_demo.py", "rewrite": "ArgSwap(idxs=0<->1 @(10,33)->(10,39))"} -{"repo": "https://:@github.com/lantunes/netomaton.git", "hash": "7d73976ac295f05911b9b67e495bd54021f97644", "diff": "@@ -61,7 +61,7 @@ if __name__ == '__main__':\n \n initial_conditions = half_two\n \n- activities, connectivities = evolve(hopfield_net.adjacency_matrix, initial_conditions, timesteps=155,\n+ activities, connectivities = evolve(initial_conditions, hopfield_net.adjacency_matrix, timesteps=155,\n activity_rule=hopfield_net.activity_rule)\n \n # view the weights, stored in the adjacency matrix\n", "old_path": "demos/hopfield_net/hopfield_net_demo.py", "rewrite": "ArgSwap(idxs=0<->1 @(64,33)->(64,39))"} -{"repo": "https://:@github.com/orionw/tuningDEAP.git", "hash": "7e7a40a386832fd386dfb8f67ff10e27ade0421e", "diff": "@@ -96,7 +96,7 @@ class TestConfigMapping(unittest.TestCase):\n assert value == bool(new_value) and type(value) == bool, \"did not set the correct value from the map, expected {} but got {} (which is not the original {})\".format(\"bool\", bool(new_value), type(value), value)\n set_by_path(test_config, path, new_value, is_bool=False)\n int_value = get_by_path(test_config, path)\n- assert new_value == int_value and type(int_value) == int, \"did not set the correct value from the map, expected type {} = {} but got type {} = {})\".format(\"int\", int_value, type(int_value), new_value)\n+ assert value == int_value and type(int_value) == int, \"did not set the correct value from the map, expected type {} = {} but got type {} = {})\".format(\"int\", int_value, type(int_value), new_value)\n \n def test_set_from_map_invalid(self):\n test_value = \"three_levels\"\n", "old_path": "test/test_config_mapping.py", "rewrite": "ReplaceText(target='value' @(99,15)->(99,24))"} -{"repo": "https://:@github.com/benjamincrom/scrabble.git", "hash": "59d26971b75475d0a66aeb03902fda6bfa57a048", "diff": "@@ -188,7 +188,7 @@ def move_does_not_stack_tiles(letter_list, location_set):\n # return False\n \n def move_is_rack_size_or_less(location_set):\n- return len(location_set) > config.PLAYER_RACK_SIZE\n+ return len(location_set) <= config.PLAYER_RACK_SIZE\n # print('Move places greater than seven tiles.')\n # return False\n # else:\n", "old_path": "scrabble_game.py", "rewrite": "ReplaceText(target='<=' @(191,29)->(191,30))"} -{"repo": "https://:@bitbucket.org/norok2/pytk.git", "hash": "934113ff8273afe9c2737a1bdee6f5f298217986", "diff": "@@ -179,7 +179,7 @@ def center(target, reference=None):\n geometry = reference.winfo_geometry()\n else:\n geometry = reference\n- if isinstance(reference, str):\n+ if isinstance(geometry, str):\n geometry = Geometry(geometry)\n target_geometry = Geometry(target.winfo_geometry())\n target.geometry(str(target_geometry.set_to_center(geometry)))\n", "old_path": "pytk/util.py", "rewrite": "ReplaceText(target='geometry' @(182,18)->(182,27))"} -{"repo": "https://:@github.com/ds4dm/ecole.git", "hash": "90d17acf7796734b64299619474a60519b19db59", "diff": "@@ -13,7 +13,7 @@ def test_IsDone(state):\n def test_NLPIterations(state):\n reward_func = R.NLPIterations()\n reward_func.reset(state)\n- assert reward_func.get(state) >= 0\n+ assert reward_func.get(state) <= 0\n assert reward_func.get(state, done=True) == 0\n \n \n", "old_path": "python/tests/test_reward.py", "rewrite": "ReplaceText(target='<=' @(16,34)->(16,36))"} -{"repo": "https://:@github.com/ds4dm/ecole.git", "hash": "6bc408253cbea5c8cb6740412601d13eb6772039", "diff": "@@ -101,4 +101,4 @@ def test_LpIterations(model):\n def test_NNodes(model):\n reward_func = R.NNodes()\n reward_func.reset(model)\n- assert reward_func.obtain_reward(model) <= 0\n+ assert reward_func.obtain_reward(model) >= 0\n", "old_path": "python/tests/test_reward.py", "rewrite": "ReplaceText(target='>=' @(104,44)->(104,46))"} -{"repo": "https://:@github.com/nodedge/nodedge.git", "hash": "b610ea8a12132e143aafe2824a83a9c032a973f7", "diff": "@@ -313,7 +313,7 @@ class GraphicsView(QGraphicsView):\n event.localPos(),\n event.screenPos(),\n Qt.LeftButton,\n- event.buttons() & -Qt.LeftButton,\n+ event.buttons() | -Qt.LeftButton,\n event.modifiers(),\n )\n super().mouseReleaseEvent(fake_event)\n", "old_path": "nodedge/graphics_view.py", "rewrite": "ReplaceText(target='|' @(316,28)->(316,29))"} -{"repo": "https://:@github.com/ovnicraft/suds2.git", "hash": "b5d1aa94c6c825f717bf41f687ca687241aeae43", "diff": "@@ -130,7 +130,7 @@ class UMBase:\n return content.data\n lang = attributes.lang()\n if not len(node.children) and content.text is None:\n- if self.nillable(content.data) and content.node.isnil():\n+ if self.nillable(content.data) or content.node.isnil():\n return None\n else:\n return xlstr.string('', lang)\n", "old_path": "suds/bindings/unmarshaller.py", "rewrite": "ReplaceText(target='or' @(133,43)->(133,46))"} -{"repo": "https://:@github.com/ovnicraft/suds2.git", "hash": "e54498f49a9973bc9a385885b5a220026503f22b", "diff": "@@ -113,6 +113,6 @@ class Options(Skin):\n Definition('retxml', bool, False),\n Definition('autoblend', bool, False),\n Definition('cachingpolicy', int, 0),\n- Definition('plugins', [], (list, tuple)),\n+ Definition('plugins', (list, tuple), []),\n ]\n Skin.__init__(self, domain, definitions, kwargs)\n", "old_path": "suds/options.py", "rewrite": "ArgSwap(idxs=1<->2 @(116,12)->(116,22))"} -{"repo": "https://:@github.com/lukegb/ticketml.git", "hash": "99c13a8e34a4397470564a355d639a4fbd5c72c4", "diff": "@@ -122,7 +122,7 @@ class BaseBackend(object):\n self._serial.write(h2b('1d21' + hex))\n \n def get_characters_per_line(self, font_width):\n- return self.BASE_CHARS_PER_LINE / font_width\n+ return self.BASE_CHARS_PER_LINE // font_width\n \n class Ibm4610Backend(BaseBackend):\n BARCODE_MAP = {\n", "old_path": "ticketml/ticketml.py", "rewrite": "ReplaceText(target='//' @(125,40)->(125,41))"} -{"repo": "https://:@github.com/EmanuelGoncalves/crispy.git", "hash": "2a029a350d328a65b32b5434a6b555dcc94a562c", "diff": "@@ -60,7 +60,7 @@ def iterate_correction(crispr_file, crispr_lib_file, cnv_file, output_folder, bs\n assert len(overlap_genes) > 0, 'No genes (rows) overlap between CRISPR and Copy-number matrices'\n \n # run correction for each cell line\n- for sample in overlap_genes:\n+ for sample in overlap_samples:\n if bsub_flag:\n print('[{}] Crispy: bsub {}'.format(dt.now().strftime('%Y-%m-%d %H:%M:%S'), sample))\n \n", "old_path": "scripts/crispy/processing/correct_cnv_bias.py", "rewrite": "ReplaceText(target='overlap_samples' @(63,18)->(63,31))"} -{"repo": "https://:@github.com/ninapavlich/sitecomber-article-tests.git", "hash": "a053bd33aa15bf1c6e4a2dded9e5e1a71511e9bc", "diff": "@@ -159,4 +159,4 @@ def check_spelling(page, settings):\n message = \"No misspellings found\" if not found_misspellings else u'Found %s misspelling(s): \"%s\"' % (len(misspelled), '\", \"'.join(misspelled))\n return found_misspellings, message\n \n- return True, 'No article found'\n+ return False, 'No article found'\n", "old_path": "sitecomber_article_tests/utils.py", "rewrite": "ReplaceText(target='False' @(162,11)->(162,15))"} -{"repo": "https://:@github.com/salpreh/tablat.git", "hash": "fef6e07276bced6e885653ef760884a0ee5e0606", "diff": "@@ -132,7 +132,7 @@ class Table(object):\n end = row_lenght\n filt_data = []\n \n- while end < len(self._table_data):\n+ while end <= len(self._table_data):\n filt_data.extend(self._filter_list(self._table_data[start:end], mask))\n start = end\n end += row_lenght\n", "old_path": "tablat/Table.py", "rewrite": "ReplaceText(target='<=' @(135,18)->(135,19))"} -{"repo": "https://:@github.com/cloudshare/cloudshare-py-sdk.git", "hash": "1363279f77267f5e18ec26f2d1bd345b3adea08e", "diff": "@@ -156,7 +156,7 @@ def request(method, path, queryParams=None, content=None):\n path=path,\r\n queryParams=queryParams,\r\n content=content)\r\n- if res.status / 100 != 2:\r\n+ if res.status // 100 != 2:\r\n raise Exception('{} {}'.format(res.status, res.content['message']))\r\n return res.content\r\n \r\n", "old_path": "example.py", "rewrite": "ReplaceText(target='//' @(159,18)->(159,19))"} -{"repo": "https://:@github.com/Oslandia/deeposlandia.git", "hash": "529dd916303d712ea3c51bb8454349812537e506", "diff": "@@ -111,7 +111,7 @@ if __name__ == '__main__':\n testing_dataset.load(testing_filename, args.nb_testing_image)\n else:\n input_image_dir = os.path.join(input_repo, \"testing\")\n- testing_dataset.populate(input_image_dir, preprocessed_testing_path,\n+ testing_dataset.populate(preprocessed_testing_path, input_image_dir,\n nb_images=args.nb_testing_image, labelling=False)\n testing_dataset.save(testing_filename)\n \n", "old_path": "sources/test.py", "rewrite": "ArgSwap(idxs=0<->1 @(114,8)->(114,32))"} -{"repo": "https://:@github.com/Oslandia/deeposlandia.git", "hash": "2bc626291e2f069c68e4a5a43e6ef5bfc3059d6a", "diff": "@@ -158,7 +158,7 @@ class SemanticSegmentationModel(ConvolutionalNeuralNetwork):\n name=dataset_type+\"_images\")\n label_filepaths = [dataset.image_info[i][\"label_filename\"]\n for i in range(dataset.get_nb_images())]\n- label_tensors = ops.convert_to_tensor(image_filepaths, dtype=tf.string,\n+ label_tensors = ops.convert_to_tensor(label_filepaths, dtype=tf.string,\n name=dataset_type+\"_labels\")\n input_queue = tf.train.slice_input_producer([image_tensors,\n label_tensors],\n", "old_path": "sources/semantic_segmentation.py", "rewrite": "ReplaceText(target='label_filepaths' @(161,50)->(161,65))"} -{"repo": "https://:@github.com/Oslandia/deeposlandia.git", "hash": "09e5206460eae73b533e9007ca5241bd5baee7f6", "diff": "@@ -449,7 +449,7 @@ def main(args):\n \"semseg\",\n \"predicted_geometries\",\n )\n- os.makedirs(predicted_label_folder, exist_ok=True)\n+ os.makedirs(predicted_geom_folder, exist_ok=True)\n predicted_geom_file = os.path.join(\n predicted_geom_folder,\n args.image_basename + \"_\" + str(args.image_size) + \".geojson\",\n", "old_path": "deeposlandia/postprocess.py", "rewrite": "ReplaceText(target='predicted_geom_folder' @(452,16)->(452,38))"} -{"repo": "https://:@github.com/metal3d/keras-video-generators.git", "hash": "7313aa497a80147714dda3581ce34d4821130ae1", "diff": "@@ -72,7 +72,7 @@ class VideoFrameGenerator(Sequence):\n \n # split factor should be a propoer value\n if split is not None:\n- assert 0.0 > split < 1.0\n+ assert 0.0 < split < 1.0\n \n # be sure that classes are well ordered\n classes.sort()\n", "old_path": "src/keras_video/generator.py", "rewrite": "ReplaceText(target='<' @(75,23)->(75,24))"} -{"repo": "https://:@github.com/yongzhuo/Macropodus.git", "hash": "11789503e9122303464bf6f02df1122397c0ca97", "diff": "@@ -142,7 +142,7 @@ class RandomEmbedding(BaseEmbedding):\n else:\n raise RuntimeError(\"your input level_type is wrong, it must be 'word', 'char', 'ngram'\")\n for text_one in text:\n- if term_one not in token2idx:\n+ if text_one not in token2idx:\n token2idx[text_one] = len(token2idx)\n else:\n raise RuntimeError(\"your input corpus_path is wrong, it must be 'dict' or 'corpus'\")\n", "old_path": "macropodus/network/base/embedding.py", "rewrite": "ReplaceText(target='text_one' @(145,27)->(145,35))"} -{"repo": "https://:@github.com/foxkit-us/PyIRC.git", "hash": "c0bcbffa66f6fe1ddb7f3002e85fa38bfaafa103", "diff": "@@ -156,7 +156,7 @@ class IRCString(UserString):\n \n def convert(self, case):\n \"\"\"Convert string into another caseform\"\"\"\n- return IRCString(self, case)\n+ return IRCString(case, self)\n \n def ascii_lower(self):\n \"\"\"Return a copy of the string S converted to lowercase, using ASCII\n", "old_path": "PyIRC/casemapping.py", "rewrite": "ArgSwap(idxs=0<->1 @(159,15)->(159,24))"} -{"repo": "https://:@github.com/foxkit-us/PyIRC.git", "hash": "b262e84b066a39cd911a37c5f3ab517413ed707f", "diff": "@@ -332,7 +332,7 @@ class UserTrack(BaseExtension):\n \n basicrfc = self.get_extension(\"BasicRFC\")\n \n- if self.casecmp(user.nick, basicrfc.nick):\n+ if self.casecmp(target.nick, basicrfc.nick):\n # It's us!\n isupport = self.get_extension(\"ISupport\")\n \n", "old_path": "PyIRC/extensions/usertrack.py", "rewrite": "ReplaceText(target='target' @(335,24)->(335,28))"} -{"repo": "https://:@github.com/foxkit-us/PyIRC.git", "hash": "71fa54a10227f629b88a2345a1da19b7db02b862", "diff": "@@ -48,7 +48,7 @@ class NullSocket(IRCBase):\n \n def inject_line(self, line):\n \"\"\"Inject a Line into the recvq for the client.\"\"\"\n- assert isinstance(Line, line)\n+ assert isinstance(line, Line)\n self.recvq.put(line)\n \n def loop(self):\n", "old_path": "PyIRC/io/null.py", "rewrite": "ArgSwap(idxs=0<->1 @(51,15)->(51,25))"} -{"repo": "https://:@github.com/foxkit-us/PyIRC.git", "hash": "bf102eab33bde57ba3ae1b240a84ee2d161103f0", "diff": "@@ -362,7 +362,7 @@ class XTerm16ColourFormatter(ANSIFormatter):\n \n if self.background is not None:\n bgc = ColoursANSI[self.background.name].value\n- ret.append(str(fgc.background_16))\n+ ret.append(str(bgc.background_16))\n else:\n # Reset background just in case\n ret.append(self.fmt_resetbackground)\n", "old_path": "PyIRC/formatting/formatters.py", "rewrite": "ReplaceText(target='bgc' @(365,31)->(365,34))"} -{"repo": "https://:@bitbucket.org/pixelforest/pixelforest_drf.git", "hash": "71155a01605838be2123eae28b650ceae32d7c2c", "diff": "@@ -14,7 +14,7 @@ from ..permissions import FullDjangoModelPermissions\n \n User = get_user_model()\n \n-if User is PFUser:\n+if User is not PFUser:\n raise ImproperlyConfigured(\"Pf User is not the User model\")\n \n \n", "old_path": "pixelforest_drf/rest/users/api_views.py", "rewrite": "ReplaceText(target=' is not ' @(17,7)->(17,11))"} -{"repo": "https://:@github.com/sphemakh/meerkathi.git", "hash": "b6220f225f989604f184d10863e5012f215ed639", "diff": "@@ -65,7 +65,7 @@ class worker_administrator(object):\n else:\n worker = name + '_worker'\n \n- self.workers.append((name, worker, order))\n+ self.workers.append((name, worker, i))\n \n self.workers = sorted(self.workers, key=lambda a: a[2])\n \n", "old_path": "meerkathi/workers/worker_administrator.py", "rewrite": "ReplaceText(target='i' @(68,47)->(68,52))"} -{"repo": "https://:@github.com/sphemakh/meerkathi.git", "hash": "8bb75b04fe481c06cf0e7987e0072ed58fea1bc3", "diff": "@@ -528,7 +528,7 @@ found in our database or in the CASA NRAO database'.format(field))\n step = 'plot_fluxscale_{0:d}'.format(i)\n table = prefix+\".F0\"\n fieldtoplot = []\n- fieldtoplot.append(utils.get_field_id(msinfo, ref)[0])\n+ fieldtoplot.append(utils.get_field_id(msinfo, trans)[0])\n recipe.add('cab/ragavi', step,\n {\n \"table\" : '{0:s}/{1:s}:{2:s}'.format(get_dir_path(pipeline.caltables, pipeline), table, 'output'),\n", "old_path": "meerkathi/workers/cross_cal_worker.py", "rewrite": "ReplaceText(target='trans' @(531,62)->(531,65))"} -{"repo": "https://:@github.com/sphemakh/meerkathi.git", "hash": "67485769492da55875da1fea491a7a32ce82d16a", "diff": "@@ -176,7 +176,7 @@ def worker(pipeline, recipe, config):\n substep = 'delete_flag_versions_after_{0:s}_ms{1:d}'.format(version, target_iter)\n manflags.delete_cflags(pipeline, recipe,\n available_flagversions[available_flagversions.index(version)+1],\n- msname, cab_name=substep)\n+ fms, cab_name=substep)\n \n flagv = tms+'.flagversions'\n \n", "old_path": "caracal/workers/transform_worker.py", "rewrite": "ReplaceText(target='fms' @(179,24)->(179,30))"} -{"repo": "https://:@gitlab.com/nekokatt/hikari.git", "hash": "0b4d26aa20ddbf580ad84581bc5eeea34c687896", "diff": "@@ -48,4 +48,4 @@ class TestReaction:\n \n assert re.count == 420\n assert re.me is True\n- test_state.parse_emoji.assert_called_with(None, emoji_dict)\n+ test_state.parse_emoji.assert_called_with(emoji_dict, None)\n", "old_path": "tests/hikari/core/model/test_reaction.py", "rewrite": "ArgSwap(idxs=0<->1 @(51,8)->(51,49))"} -{"repo": "https://:@gitlab.com/nekokatt/hikari.git", "hash": "b40bd61096cbd597d0f2863351ebddebf571867d", "diff": "@@ -286,7 +286,7 @@ class DispatchingEventAdapterImpl(dispatching_event_adapter.DispatchingEventAdap\n \n for role_id in role_ids:\n role_obj = self.fabric.state_registry.get_role_by_id(guild_id, role_id)\n- if role_objs is not None:\n+ if role_obj is not None:\n role_objs.append(role_obj)\n else:\n self.logger.warning(\n", "old_path": "hikari/orm/dispatching_event_adapter_impl.py", "rewrite": "ReplaceText(target='role_obj' @(289,19)->(289,28))"} -{"repo": "https://:@gitlab.com/nekokatt/hikari.git", "hash": "89f2070c7a2135162e4852a8b778490b4695bc78", "diff": "@@ -699,7 +699,7 @@ class BotAppImpl(bot.IBotApp):\n if plat == \"win32\":\n supports_color |= os.getenv(\"TERM_PROGRAM\", None) == \"mintty\"\n supports_color |= \"ANSICON\" in os.environ\n- supports_color |= is_a_tty\n+ supports_color &= is_a_tty\n else:\n supports_color = is_a_tty\n \n", "old_path": "hikari/impl/bot.py", "rewrite": "ReplaceText(target='&=' @(702,31)->(702,33))"} -{"repo": "https://:@github.com/matthewhanson/boto3-utils.git", "hash": "23390e1f08fda449451266dc7136a89914e00b4e", "diff": "@@ -33,7 +33,7 @@ class s3(object):\n _url = deepcopy(url)\n if url[0:5] == 'https':\n _url = cls.https_to_s3(url)\n- if url[0:5] != 's3://':\n+ if _url[0:5] != 's3://':\n raise Exception('Invalid S3 url %s' % _url)\n \n url_obj = _url.replace('s3://', '').split('/')\n", "old_path": "boto3utils/s3.py", "rewrite": "ReplaceText(target='_url' @(36,11)->(36,14))"} -{"repo": "https://:@github.com/spex-xray/pyspextools.git", "hash": "c68beb5206e3525010e0265f2c18f8f5fc4bebc3", "diff": "@@ -131,7 +131,7 @@ class OGIPRegion(Region):\n if isinstance(corr, Pha):\n self.corr = corr\n self.input_corr = True\n- elif back is None:\n+ elif corr is None:\n self.input_corr = False\n else:\n self.input_corr = False\n", "old_path": "pyspextools/io/ogip.py", "rewrite": "ReplaceText(target='corr' @(134,13)->(134,17))"} -{"repo": "https://:@github.com/djerbic/xlrd-ignore-writeaccess-corruption.git", "hash": "8ce449208ac3a8a1f4ec9c72954c11afcd40d3a8", "diff": "@@ -1975,7 +1975,7 @@ class Sheet(BaseObject):\n nchars = data2_len - 1\n if nb:\n assert nchars % 2 == 0\n- nchars /= 2\n+ nchars //= 2\n utext, endpos = unpack_unicode_update_pos(data2, 0, known_len=nchars)\n assert endpos == data2_len\n o.text += utext\n", "old_path": "xlrd/sheet.py", "rewrite": "ReplaceText(target='//=' @(1978,23)->(1978,25))"} -{"repo": "https://:@github.com/ijiraq/daomop.git", "hash": "2b9c4af87e1b899b7589cfb04aa272540d2e8a04", "diff": "@@ -61,7 +61,7 @@ class GeneralModelTest(FileReadingTestCase, DirectoryCleaningTestCase):\n # Put a real fits image on the first source, first observation\n apcor_str = \"4 15 0.19 0.01\"\n with open(self.get_abs_path(path), \"rb\") as fh:\n- self.first_image = DownloadedFitsImage(fh.read(), apcor_str, Mock(), in_memory=True)\n+ self.first_image = DownloadedFitsImage(fh.read(), Mock(), apcor_str, in_memory=True)\n first_reading = self.model.get_current_workunit().get_sources()[0].get_readings()[0]\n self.model._on_image_loaded(first_reading, self.first_image)\n \n", "old_path": "src/ossos-pipeline/tests/test_integration/test_models.py", "rewrite": "ArgSwap(idxs=1<->2 @(64,31)->(64,50))"} -{"repo": "https://:@github.com/iamsteadman/bambu-buffer.git", "hash": "5704abdda5297d6cde2ccac7f91ded4108e1f616", "diff": "@@ -12,7 +12,7 @@ def post_save_receiver(sender, instance, **kwargs):\n \n name = m.pop(0)\n app, model = name.lower().split('.')\n- if app != instance._meta.app_label and model != instance._meta.module_name:\n+ if app != instance._meta.app_label or model != instance._meta.module_name:\n continue\n \n if any(m):\n", "old_path": "bambu_buffer/receivers.py", "rewrite": "ReplaceText(target='or' @(15,43)->(15,46))"} -{"repo": "https://:@github.com/khllkcm/templot.git", "hash": "d4b329d16f94e3808e54b05116a8545e987a5e7b", "diff": "@@ -95,7 +95,7 @@ def plot_aggregated_map(\n \n if aggregation_method not in aggregates:\n raise ValueError(\n- f\"{group} is not a valid aggregation method. Possible values are: {', '.join([k for k in aggregates])}\"\n+ f\"{aggregation_method} is not a valid aggregation method. Possible values are: {', '.join([k for k in aggregates])}\"\n )\n \n map_data = aggregates[aggregation_method][variables]\n", "old_path": "templot/plot_aggregated_map.py", "rewrite": "ReplaceText(target='aggregation_method' @(98,15)->(98,20))"} -{"repo": "https://:@github.com/cjneely10/BioMetaDB.git", "hash": "71352d2e75c038af886007c7b82591896aa23e1c", "diff": "@@ -146,4 +146,4 @@ def create_database(db_name, table_name, directory_name, data_file, alias, silen\n if not silent:\r\n _initialization_display_message_epilogue()\r\n if not integrity_cancel:\r\n- integrity_check(directory_name, table_name, \"None\", silent)\r\n+ integrity_check(db_name, table_name, \"None\", silent)\r\n", "old_path": "BioMetaDB/DBOperations/create_database.py", "rewrite": "ReplaceText(target='db_name' @(149,24)->(149,38))"} -{"repo": "https://:@github.com/lsst-sqre/kubespawner.git", "hash": "5f0ca5f9734552b4c40563828899316d2b69156c", "diff": "@@ -361,7 +361,7 @@ class KubeSpawner(Spawner):\n # shut down to complete\n while True:\n data = yield self.get_pod_info(self.pod_name)\n- if data is not None:\n+ if data is None:\n break\n time.sleep(5)\n \n", "old_path": "kubespawner/spawner.py", "rewrite": "ReplaceText(target=' is ' @(364,23)->(364,31))"} -{"repo": "https://:@github.com/lsst-sqre/kubespawner.git", "hash": "df9936a785e34c898ffd065f17697a0035cf310c", "diff": "@@ -404,7 +404,7 @@ class KubeSpawner(Spawner):\n @gen.coroutine\n def start(self):\n pvc_data = get_pvc_info(self.pvc_name)\n- if pvc_data is not None:\n+ if pvc_data is None:\n pvc_manifest = self.get_pvc_manifest()\n yield self.httpclient.fetch(self.request(\n url=k8s_url(self.namespace, 'persistentvolumeclaims'),\n", "old_path": "kubespawner/spawner.py", "rewrite": "ReplaceText(target=' is ' @(407,19)->(407,27))"} -{"repo": "https://:@github.com/d-meiser/cold-atoms.git", "hash": "8235e3bc1d9cc9b1bbfe27948d24adc48db33f06", "diff": "@@ -48,5 +48,5 @@ def bend_kick(dt, Bz, ensemble, forces, reference_impl=False):\n f = np.zeros_like(ensemble.v)\n for force in forces:\n force.force(dt, ensemble, f)\n- ensemble.v *= f / m\n+ ensemble.v += f / m\n updater(0.5 * dt, omegaB, ensemble.x, ensemble.v)\n", "old_path": "src/coldatoms/bend_kick.py", "rewrite": "ReplaceText(target='+=' @(51,19)->(51,21))"} -{"repo": "https://:@github.com/silvacms/silva.pas.base.git", "hash": "d0e1b5196420a6a1359fc5f45d220d172f7a1e01", "diff": "@@ -41,7 +41,7 @@ class SilvaCascadingPASPlugin(SearchPrincipalsPlugin):\n for authenticator_id, auth in authenticators:\n try:\n info = auth.authenticateCredentials(credentials)\n- if info is not None and info[0] is None:\n+ if info is not None and info[0] is not None:\n # Failed login can be None OR (None, None)\n return info\n except _SWALLOWABLE_PLUGIN_EXCEPTIONS:\n", "old_path": "src/silva/pas/base/plugins/cascading.py", "rewrite": "ReplaceText(target=' is not ' @(44,47)->(44,51))"} -{"repo": "https://:@github.com/jgolob/maliampi.git", "hash": "dd0a5bf78106e083005db0e7bd21f1122e63f162", "diff": "@@ -239,7 +239,7 @@ class Workflow_Placement(sl.WorkflowTask):\n lpca = self.new_task(\n 'calculate_lpca',\n Jplace_PCA,\n- containerinfo=long_containerinfo,\n+ containerinfo=highmem_containerinfo,\n path=os.path.join(\n self.destination_dir,\n 'placement',\n", "old_path": "maliampi/subcommands/placement.py", "rewrite": "ReplaceText(target='highmem_containerinfo' @(242,26)->(242,44))"} -{"repo": "https://:@github.com/jgolob/maliampi.git", "hash": "cdea28dbb12093af0165e983149da396b69fe33a", "diff": "@@ -115,7 +115,7 @@ class Workflow_DADA2(sl.WorkflowTask):\n batch_errModels[batch] = self.new_task(\n 'dada2_learn_error_batch_{}'.format(batch),\n DADA2_LearnError,\n- containerinfo=heavy_containerinfo,\n+ containerinfo=midcpu_containerinfo,\n batch=batch,\n tar_reads=False,\n path=os.path.join(\n", "old_path": "maliampi/subcommands/sv_dada2.py", "rewrite": "ReplaceText(target='midcpu_containerinfo' @(118,30)->(118,49))"} -{"repo": "https://:@github.com/jgolob/maliampi.git", "hash": "3cde81cdd2b908b7edd44a000986744301092fae", "diff": "@@ -203,7 +203,7 @@ class Workflow_Classify(sl.WorkflowTask):\n placement_db_classified = self.new_task(\n 'classify_into_placement_db',\n PlacementDB_Classify_SV,\n- containerinfo=heavy_containerinfo,\n+ containerinfo=midcpu_containerinfo,\n )\n placement_db_classified.in_placement_db = placement_db_w_si.out_placement_db\n placement_db_classified.in_refpkg_tgz = refpkg_tgz.out_refpkg_tgz\n", "old_path": "maliampi/subcommands/classify.py", "rewrite": "ReplaceText(target='midcpu_containerinfo' @(206,26)->(206,45))"} -{"repo": "https://:@github.com/jgolob/maliampi.git", "hash": "f50cfcea1e390ae5eb05de0c116c2251a09f4864", "diff": "@@ -203,7 +203,7 @@ class Workflow_Classify(sl.WorkflowTask):\n placement_db_classified = self.new_task(\n 'classify_into_placement_db',\n PlacementDB_Classify_SV,\n- containerinfo=midcpu_containerinfo,\n+ containerinfo=highmem_containerinfo,\n )\n placement_db_classified.in_placement_db = placement_db_w_si.out_placement_db\n placement_db_classified.in_refpkg_tgz = refpkg_tgz.out_refpkg_tgz\n", "old_path": "maliampi/subcommands/classify.py", "rewrite": "ReplaceText(target='highmem_containerinfo' @(206,26)->(206,46))"} -{"repo": "https://:@github.com/d3rp/clima.git", "hash": "92eced31f43fd49f87e6af8582066a25fc0ba726", "diff": "@@ -46,7 +46,7 @@ def SeparateFlagArgs(args: list):\n Returns:\n A tuple with the Fire args (a list), followed by the Flag args (a list).\n \"\"\"\n- if len(args) > 1 and (args[-1] == '-h' or args[-1] == '--help') and '--' not in args:\n+ if len(args) > 0 and (args[-1] == '-h' or args[-1] == '--help') and '--' not in args:\n args.pop()\n args.append('--')\n args.append('-h')\n", "old_path": "clima/fire/parser.py", "rewrite": "ReplaceText(target='0' @(49,17)->(49,18))"} -{"repo": "https://:@github.com/jeffkinnison/pyrameter.git", "hash": "306c95b1e0643fc47e0206281cd12c714849782d", "diff": "@@ -47,7 +47,7 @@ def backend_factory(path, *args, **kwargs):\n if os.path.isfile(path) or os.path.isdir(path):\n from pyrameter.db.local import JsonStorage\n return JsonStorage(path, *args, **kwargs)\n- elif path.find('mongodb://') >= 0:\n+ elif path.find('mongodb://') == 0:\n from pyrameter.db.mongo import MongoStorage\n return MongoStorage(path, *args, **kwargs)\n else:\n", "old_path": "pyrameter/db/backend_factory.py", "rewrite": "ReplaceText(target='==' @(50,33)->(50,35))"} -{"repo": "https://:@github.com/RADAR-base/pyRADAR-processing.git", "hash": "2c6ea694e1d40b9c16d6a10e10c0af9afd5a3d0d", "diff": "@@ -115,7 +115,7 @@ class Project(RadarObject):\n self.ptcs_update_info(info)\n \n labels = kwargs.get('labels', False)\n- if info:\n+ if labels:\n for ptc in labels:\n if ptc not in self.participants:\n self.add_participant(ptc)\n", "old_path": "radar/wrappers.py", "rewrite": "ReplaceText(target='labels' @(118,11)->(118,15))"} -{"repo": "https://:@github.com/marshallward/ropes.git", "hash": "b8fd70b68d2ec157c7f2397aab3931e50c5a16ae", "diff": "@@ -145,7 +145,7 @@ class Rope(object):\n else:\n if start is None:\n offset = index.step + (head.length - 1) % (-index.step)\n- elif start > 0:\n+ elif start >= 0:\n offset = index.step + min(start, head.length - 1) % (-index.step)\n else:\n offset = index.step + (start + head.length) % (-index.step)\n", "old_path": "ropes.py", "rewrite": "ReplaceText(target='>=' @(148,35)->(148,36))"} -{"repo": "https://:@github.com/pkgw/bibtools.git", "hash": "2273ff1a94f4f6952026c5ab1d3ddffa042f2158", "diff": "@@ -204,7 +204,7 @@ class Dump (multitool.Command):\n help_if_no_args = False\n \n def invoke (self, args, app=None, **kwargs):\n- if len (args) != 1:\n+ if len (args) != 0:\n raise multitool.UsageError ('expected no arguments')\n \n app.export_all (sys.stdout, 72)\n", "old_path": "bibtools/cli.py", "rewrite": "ReplaceText(target='0' @(207,25)->(207,26))"} -{"repo": "https://:@github.com/cooper-software/hammock.git", "hash": "ed682f4d33be53d7d2f2b21b384a36a2770c6cf5", "diff": "@@ -20,7 +20,7 @@ class Hammock(object):\n \t\tentities = set()\n \t\tself.collections_by_class_name = {}\n \t\t\n-\t\tfor collection_cls in collections:\n+\t\tfor collection_cls in collection_classes:\n \t\t\tentities.add(collection_cls.entity)\n \t\t\tcollection = collection_cls(storage)\n \t\t\tself.collections_by_class_name[collection_cls.__name__] = collection\n", "old_path": "hammock/__init__.py", "rewrite": "ReplaceText(target='collection_classes' @(23,24)->(23,35))"} -{"repo": "https://:@github.com/bempp/bempp-cl.git", "hash": "7ab5546ce89b626e146cb29433ed1113a3c72c9c", "diff": "@@ -97,7 +97,7 @@ def visualize_with_jupyter_notebook(obj, mode=\"element\", transformation=None):\n for element in grid.entity_iterator(0):\n index = element.index\n local_values = np.real(\n- transformation(obj.evaluate(element, local_coordinates))\n+ transformation(obj.evaluate(index, local_coordinates))\n )\n values[index] = local_values.flatten()\n \n", "old_path": "bempp/api/external/viewers.py", "rewrite": "ReplaceText(target='index' @(100,44)->(100,51))"} -{"repo": "https://:@github.com/bempp/bempp-cl.git", "hash": "094eb06f36e837f3a17d2abe23f4bb78d1a32dc0", "diff": "@@ -91,7 +91,7 @@ def assemble_dense(\n cols = domain.global_dof_count\n \n nshape_test = dual_to_range.number_of_shape_functions\n- nshape_trial = dual_to_range.number_of_shape_functions\n+ nshape_trial = domain.number_of_shape_functions\n \n precision = operator_descriptor.precision\n \n", "old_path": "bempp/core/numba/dense_assembler.py", "rewrite": "ReplaceText(target='domain' @(94,19)->(94,32))"} -{"repo": "https://:@github.com/bempp/bempp-cl.git", "hash": "242da1c08304423e6ef6ead60e691928426dab1b", "diff": "@@ -1035,9 +1035,9 @@ def helmholtz_hypersingular_regular(\n ] * (\n curl_product[test_fun_index, trial_fun_index]\n - wavenumber\n- * wavenumber\n+ * wavenumber \n * local_test_fun_values[\n- 0, test_fun_index, quad_point_index\n+ 0, test_fun_index, test_point_index\n ]\n * local_trial_fun_values[\n 0, trial_fun_index, quad_point_index\n", "old_path": "bempp/core/numba/kernels.py", "rewrite": "ReplaceText(target='test_point_index' @(1040,55)->(1040,71))"} -{"repo": "https://:@github.com/bempp/bempp-cl.git", "hash": "1bb4a1c097e4e3e87ed328f37cde5abd9c0c24b9", "diff": "@@ -33,7 +33,7 @@ class DensePotentialAssembler(object):\n x_transformed = self.space.map_to_full_grid @ (\n self.space.dof_transformation @ x\n )\n- result = implementation(x)\n+ result = implementation(x_transformed)\n return result.reshape([kernel_dimension, -1], order=\"F\")\n \n self._evaluator = potential_evaluator\n", "old_path": "bempp/core/dense_potential_assembler.py", "rewrite": "ReplaceText(target='x_transformed' @(36,36)->(36,37))"} -{"repo": "https://:@bitbucket.org/agaveapi/agaveflask.git", "hash": "17f24e257b275fe1bf64afcf6a5b09d87ab05b79", "diff": "@@ -34,7 +34,7 @@ def read_config(conf_file='service.conf'):\n raise RuntimeError('No config file found.')\n if not parser.parser.read(place):\n raise RuntimeError(\"couldn't read config file from {0}\"\n- .format(', '.join(place)))\n+ .format(', '.join(places)))\n return parser\n \n Config = read_config()\n\\ No newline at end of file\n", "old_path": "agaveflask/config.py", "rewrite": "ReplaceText(target='places' @(37,45)->(37,50))"} -{"repo": "https://:@github.com/llazzaro/jarvispatrick.git", "hash": "05457d04a6982a47c39d5109b6e91efa6441bd93", "diff": "@@ -27,7 +27,7 @@ class JarvisPatrick(object):\n def __call__(self, number_of_neighbors, number_of_common_neighbors):\n \"\"\"\n \"\"\"\n- if number_of_common_neighbors >= number_of_neighbors:\n+ if number_of_common_neighbors > number_of_neighbors:\n raise ValueError('Asked for more common neighbors than number of neighbors')\n neighbors_list = {}\n for element in self.dataset_elements:\n", "old_path": "jarvispatrick/__init__.py", "rewrite": "ReplaceText(target='>' @(30,38)->(30,40))"} -{"repo": "https://:@github.com/kennydo/oauthlib.git", "hash": "1f292e6923aa9419d28e3700e22102dffd447886", "diff": "@@ -112,7 +112,7 @@ def collect_parameters(uri_query='', body='', headers=None,\n if isinstance(k, str):\n k = k.decode('utf-8')\n if isinstance(v, str):\n- if v.startswith('oauth_'):\n+ if k.startswith('oauth_'):\n v = utils.unescape(v)\n else:\n v = v.decode('utf-8')\n", "old_path": "oauthlib/oauth1/rfc5849/signature.py", "rewrite": "ReplaceText(target='k' @(115,15)->(115,16))"} -{"repo": "https://:@github.com/kennydo/oauthlib.git", "hash": "8f57459fbbab1f317d5475f31f90b1a75016a2a8", "diff": "@@ -281,7 +281,7 @@ def add_params_to_uri(uri, params, fragment=False):\n \"\"\"Add a list of two-tuples to the uri query components.\"\"\"\n sch, net, path, par, query, fra = urlparse.urlparse(uri)\n if fragment:\n- fra = add_params_to_qs(query, params)\n+ fra = add_params_to_qs(fra, params)\n else:\n query = add_params_to_qs(query, params)\n return urlparse.urlunparse((sch, net, path, par, query, fra))\n", "old_path": "oauthlib/common.py", "rewrite": "ReplaceText(target='fra' @(284,31)->(284,36))"} -{"repo": "https://:@github.com/jakobrunge/tigramite.git", "hash": "2011867b0f0cc4c3ca6bb3317b2a3a37d828116b", "diff": "@@ -236,7 +236,7 @@ def time_bin_with_mask(data, time_bin_length, sample_selector=None):\n sample_selector.shape = (T, 1)\n \n bindata = numpy.zeros(\n- (T / time_bin_length,) + data.shape[1:], dtype=\"float32\")\n+ (T // time_bin_length,) + data.shape[1:], dtype=\"float32\")\n for index, i in enumerate(range(0, T - time_bin_length + 1,\n time_bin_length)):\n # print weighted_avg_and_std(fulldata[i:i+time_bin_length], axis=0,\n", "old_path": "tigramite/data_processing.py", "rewrite": "ReplaceText(target='//' @(239,11)->(239,12))"} -{"repo": "https://:@github.com/jakobrunge/tigramite.git", "hash": "2011867b0f0cc4c3ca6bb3317b2a3a37d828116b", "diff": "@@ -528,7 +528,7 @@ class LinearMediation(Models):\n \n def tsg_to_net(self, node, max_lag):\n \"\"\"Helper function to translate from time series graph to network.\"\"\"\n- row = node / max_lag\n+ row = node // max_lag\n lag = node % max_lag\n return (row, -lag) \n \n", "old_path": "tigramite/models.py", "rewrite": "ReplaceText(target='//' @(531,19)->(531,20))"} -{"repo": "https://:@github.com/jakobrunge/tigramite.git", "hash": "ebf5ae6ad58a416f2097bc7453df96b6ff584b17", "diff": "@@ -2577,7 +2577,7 @@ class CMIsymb(CondIndTest):\n dim, T = symb_array.shape\n \n # Needed because np.bincount cannot process longs\n- if isinstance(self.n_symbs ** dim, int):\n+ if not isinstance(self.n_symbs ** dim, int):\n raise ValueError(\"Too many n_symbs and/or dimensions, \"\n \"numpy.bincount cannot process longs\")\n if self.n_symbs ** dim * 16. / 8. / 1024. ** 3 > 3.:\n", "old_path": "tigramite/independence_tests.py", "rewrite": "ReplaceText(target='not ' @(2580,11)->(2580,11))"} -{"repo": "https://:@github.com/ontio/neo-boa.git", "hash": "07ac051d44eb38ac612effd14b57af0a5b65c90e", "diff": "@@ -8,7 +8,7 @@ class SCTest(FunctionCode):\n @staticmethod\n def Main(a, b):\n \n- if a > b:\n+ if a == b:\n \n return True\n \n", "old_path": "tests/src/CompareTest2.py", "rewrite": "ReplaceText(target='==' @(11,13)->(11,14))"} -{"repo": "https://:@github.com/ggventurini/python-deltasigma.git", "hash": "3dd6127dc022234c4433d4e4a018942927fa417f", "diff": "@@ -59,7 +59,7 @@ def cancelPZ(arg1, tol=1e-6):\n z = copy.copy(arg1.zeros)\n p = copy.copy(arg1.poles)\n k = arg1.gain\n- for i in range(max(z.shape) - 1, 0, -1):\n+ for i in range(max(z.shape) - 1, -1, -1):\n d = z[i] - p\n cancel = np.nonzero(np.abs(d) < tol)[0]\n if cancel.size:\n", "old_path": "deltasigma/_cancelPZ.py", "rewrite": "ReplaceText(target='-1' @(62,37)->(62,38))"} -{"repo": "https://:@github.com/jordens/rayopt.git", "hash": "3bc56650b966e2c34d25d47af76d3b7f63110c4f", "diff": "@@ -199,7 +199,7 @@ class Analysis(object):\n axp, axm, axsm, axss, axo = axi\n axp.add_patch(mpl.patches.Circle((0, 0), r, edgecolor=\"black\",\n facecolor=\"none\"))\n- axp.text(-.1, .5, \"OY=%s\" % hi, rotation=\"vertical\",\n+ axo.text(-.1, .5, \"OY=%s\" % hi, rotation=\"vertical\",\n transform=axp.transAxes,\n verticalalignment=\"center\")\n for i, (wi, ci) in enumerate(zip(wavelengths, colors)):\n", "old_path": "rayopt/analysis.py", "rewrite": "ReplaceText(target='axo' @(202,12)->(202,15))"} -{"repo": "https://:@github.com/jordens/rayopt.git", "hash": "0d5689d0c36fa3aec836c7869e169f4bc4b1a72f", "diff": "@@ -333,7 +333,7 @@ class System(list):\n c = getattr(el, \"curvature\", 0)\n if pending is not None:\n r = max(el.radius, pending.radius)\n- if c < 0:\n+ if c <= 0:\n el.radius = r\n if c0 > 0:\n pending.radius = r\n", "old_path": "rayopt/system.py", "rewrite": "ReplaceText(target='<=' @(336,21)->(336,22))"} -{"repo": "https://:@github.com/pantherlab/v2d-cli.git", "hash": "fe2f6fe46f14778cfcb74852d817d1876d171352", "diff": "@@ -92,7 +92,7 @@ def main():\n print('Similar domains to {}'.format(dom))\n domains.difference_update(set(dom))\n for d in domains:\n- print_diff(d, args.domain)\n+ print_diff(args.domain, d)\n if write:\n f.write(d + \"\\n\")\n if (args.check):\n", "old_path": "v2d/main.py", "rewrite": "ArgSwap(idxs=0<->1 @(95,16)->(95,26))"} -{"repo": "https://:@github.com/xtimon/inipgdump.git", "hash": "47c9bf35a256ee9c6caa0aeb6913a5e80cc15d23", "diff": "@@ -92,7 +92,7 @@ def main():\n if not os.path.isdir(dump_dir):\n print('Folder \\'%s\\' not found' % dump_dir)\n sys.exit(1)\n- if keep_count <= 0:\n+ if keep_count < 0:\n print('keep_count must be greater than 0')\n sys.exit(1)\n make_dump(conf_file, dump_dir, keep_count)\n", "old_path": "inipgdump/core.py", "rewrite": "ReplaceText(target='<' @(95,18)->(95,20))"} -{"repo": "https://:@github.com/dogebuild/dogebuild.git", "hash": "5fbc92cbf6aceb4a99374e5e19208b3889c36628", "diff": "@@ -14,7 +14,7 @@ class Doge:\n plugin_full_name = self.contrib_name + '-' + plugin_name\n plugin_package = self.contrib_name + '_' + plugin_name\n \n- if not self.check_plugin_installed(plugin_full_name):\n+ if not self.check_plugin_installed(plugin_package):\n self.pip.install(plugin_full_name) # ???\n \n file, path, desc = self.find_dotted_module(plugin_package + '.loader')\n", "old_path": "dogebuild/Doge.py", "rewrite": "ReplaceText(target='plugin_package' @(17,43)->(17,59))"} -{"repo": "https://:@github.com/jiosue/qubovert.git", "hash": "11782cc691038742a250ee53b863c413f28b6455", "diff": "@@ -329,7 +329,7 @@ class DictArithmetic(dict):\n for k, v in other.items():\n self[k] -= v\n else:\n- self[()] -= v\n+ self[()] -= other\n return self\n \n def __mul__(self, other):\n", "old_path": "qubovert/utils/_dict_arithmetic.py", "rewrite": "ReplaceText(target='other' @(332,24)->(332,25))"} -{"repo": "https://:@github.com/jiosue/qubovert.git", "hash": "ad39ad11cea1cd2ca8f82a23b21990cd0e758915", "diff": "@@ -323,7 +323,7 @@ class SpinSimulation:\n # the change in energy from flipping variable i is equal to\n # -2 * (the energy of the subgraph depending on i)\n dE = -2 * puso_value(self._state, self._subgraphs[i])\n- if dE < 0 or (T and random.random() < exp(-dE / T)):\n+ if dE <= 0 or (T and random.random() < exp(-dE / T)):\n self._flip_bit(i)\n \n \n", "old_path": "qubovert/sim/_simulations.py", "rewrite": "ReplaceText(target='<=' @(326,22)->(326,23))"} -{"repo": "https://:@github.com/gjo/colander_jsonschema.git", "hash": "14d7446b85b8faf56705047146a62f10981c0bf7", "diff": "@@ -124,7 +124,7 @@ class ValidatorConversionDispatcher(object):\n if isinstance(validator, colander.All):\n converted = {}\n for v in validator.validators:\n- ret = self(schema_node, validator)\n+ ret = self(schema_node, v)\n converted.update(ret)\n return converted\n \n", "old_path": "colander_jsonschema/__init__.py", "rewrite": "ReplaceText(target='v' @(127,40)->(127,49))"} -{"repo": "https://:@github.com/ucl-exoplanets/TauREx3_public.git", "hash": "fdfa8c4e1d29dc715c7f42d55c21c0d911390a83", "diff": "@@ -127,7 +127,7 @@ def main():\n \n wlgrid = np.log10(10000/bindown_wngrid)\n if args.plot:\n- if get_rank()==0 and nprocs()==1:\n+ if get_rank()==0 and nprocs()<=1:\n import matplotlib.pyplot as plt\n if args.contrib:\n for name,value in contrib:\n", "old_path": "taurex/taurex.py", "rewrite": "ReplaceText(target='<=' @(130,38)->(130,40))"} -{"repo": "https://:@github.com/ucl-exoplanets/TauREx3_public.git", "hash": "b159dcc22b3e753aaea101031b3c8df14e5affdc", "diff": "@@ -135,7 +135,7 @@ def main():\n priors = {}\n priors['Profiles'] = profiles\n priors['Spectra'] = spectrum\n- out.store_dictionary(solution,group_name='Priors')\n+ out.store_dictionary(priors,group_name='Priors')\n else:\n out.store_dictionary(profiles,group_name='Profiles')\n out.store_dictionary(spectrum,group_name='Spectra')\n", "old_path": "taurex/taurex.py", "rewrite": "ReplaceText(target='priors' @(138,37)->(138,45))"} -{"repo": "https://:@github.com/ucl-exoplanets/TauREx3_public.git", "hash": "1aa67f68d7086afcf2390add80728193d7a9024e", "diff": "@@ -13,7 +13,7 @@ def nprocs():\n try:\n from mpi4py import MPI\n except ImportError:\n- return 0 \n+ return 1\n \n comm = MPI.COMM_WORLD\n \n", "old_path": "taurex/mpi.py", "rewrite": "ReplaceText(target='1' @(16,15)->(16,16))"} -{"repo": "https://:@github.com/sjoerdk/yeahyeah.git", "hash": "11a1a12a02c9fea724f0dc4072b5e86e688e33fd", "diff": "@@ -66,7 +66,7 @@ def add(context: ClockifyPluginContext, message, project, time):\n project_obj = None\n \n log_start = time\n- click.echo(f\"Adding {message} at {as_local(log_start)} to project {project}\")\n+ click.echo(f\"Adding {message} at {as_local(log_start)} to project {project_obj}\")\n context.session.add_time_entry(\n start_time=time, description=message, project=project_obj\n )\n", "old_path": "plugins/clockify_plugin/cli.py", "rewrite": "ReplaceText(target='project_obj' @(69,71)->(69,78))"} -{"repo": "https://:@bitbucket.org/synerty/peek-plugin-graphdb.git", "hash": "c47b1c7df8ba01b9a47a9afda0f1c1f829517990", "diff": "@@ -58,7 +58,7 @@ class PackedSegmentTupleProvider(TuplesProviderABC):\n \n # Create the new object\n foundDocuments.append(GraphDbPackedSegmentTuple(\n- key=key,\n+ key=subKey,\n packedJson=segmentsByKey[subKey]\n ))\n \n", "old_path": "peek_plugin_graphdb/_private/client/tuple_providers/PackedSegmentTupleProvider.py", "rewrite": "ReplaceText(target='subKey' @(61,24)->(61,27))"} -{"repo": "https://:@github.com/ihgazni2/ematmap.git", "hash": "d6f160d8c7b85fdca2d552ca6de1c1c3c75b3245", "diff": "@@ -50,7 +50,7 @@ def get_matsize(m):\n size = 0\n depth = len(m)\n for i in range(depth):\n- layer = m[depth]\n+ layer = m[i]\n lngth = len(layer)\n for j in range(lngth):\n size = size + 1\n", "old_path": "ematmap/utils.py", "rewrite": "ReplaceText(target='i' @(53,18)->(53,23))"} -{"repo": "https://:@github.com/ndawe/goodruns.git", "hash": "fa5a7a24b6ebaa80141a0fd5b887e61eeb60d0d0", "diff": "@@ -258,7 +258,7 @@ class GRL(object):\n version = root.find('NamedLumiRange/Version')\n if version is not None:\n self.version = version.text\n- self.metadata = root.findall('NamedLumiRange/Metadata')\n+ self.metadata += root.findall('NamedLumiRange/Metadata')\n lbcols = root.findall(\n 'NamedLumiRange/LumiBlockCollection')\n for lbcol in lbcols:\n", "old_path": "goodruns/grl.py", "rewrite": "ReplaceText(target='+=' @(261,22)->(261,23))"} -{"repo": "https://:@github.com/churchill-lab/scBASE.git", "hash": "456bacc4227fd3ccb5a901a205b0add65f9d8dfc", "diff": "@@ -37,7 +37,7 @@ except NameError:\n \n def select(loomfile, min_read_count, min_cell_count, layer):\n with loompy.connect(loomfile) as ds:\n- gsurv = (ds.sparse(layer=layer) >= min_read_count).sum(axis=1) > min_cell_count\n+ gsurv = (ds.sparse(layer=layer) >= min_read_count).sum(axis=1) >= min_cell_count\n ds.ra.Selected = np.squeeze(np.asarray(gsurv))\n LOG.info('Total %d genes selected' % gsurv.sum())\n # totals = ds.map([np.sum], axis=1)[0] # Select based upon cell size?\n", "old_path": "scbase/scbase.py", "rewrite": "ReplaceText(target='>=' @(40,71)->(40,72))"} -{"repo": "https://:@github.com/glottolog/treedb.git", "hash": "af327b021d5aa5ee8c593903f663f5653181217d", "diff": "@@ -48,7 +48,7 @@ def iterrecords(bind=ENGINE, windowsize=WINDOWSIZE, skip_unknown=True):\n with bind.connect() as conn:\n select_files.bind = conn\n select_values.bind = conn\n- for in_slice in window_slices(File.id, size=windowsize, bind=bind):\n+ for in_slice in window_slices(File.id, size=windowsize, bind=conn):\n if log.level <= logging.DEBUG:\n where = literal_compile(in_slice(File.id))\n log.debug('fetch rows %r', where.string)\n", "old_path": "treedb/raw/records.py", "rewrite": "ReplaceText(target='conn' @(51,69)->(51,73))"} -{"repo": "https://:@github.com/funkybob/django-rated.git", "hash": "4c68393abfdbb42030e0211c8c99ac8f2fa251d0", "diff": "@@ -14,7 +14,7 @@ class RatedMiddleware(object):\n def process_view(self, request, view_func, view_args, view_kwargs):\n # Try to determine the realm for this view\n try:\n- realm = request._rated_realm\n+ realm = view_func._rated_realm\n except AttributeError:\n try:\n realm = settings.REALM_MAP[request.resolver_match.url_name]\n", "old_path": "rated/middleware.py", "rewrite": "ReplaceText(target='view_func' @(17,20)->(17,27))"} -{"repo": "https://:@github.com/StevenGolovkine/FDApy.git", "hash": "f1768ccf93593162be890f8685027b9d9a1d3ad2", "diff": "@@ -25,7 +25,7 @@ def _check_argvals(argvals):\n ------\n argvals : list of numpy.ndarray\n \"\"\"\n- if isinstance(argvals, (np.ndarray, list)):\n+ if not isinstance(argvals, (np.ndarray, list)):\n raise ValueError(\n 'argvals has to be a list of numpy.ndarray or a numpy.ndarray!')\n # TODO: Modify the condition to accept multidimensional irregular\n", "old_path": "FDApy/irregular_functional.py", "rewrite": "ReplaceText(target='not ' @(28,7)->(28,7))"} -{"repo": "https://:@github.com/StevenGolovkine/FDApy.git", "hash": "f1768ccf93593162be890f8685027b9d9a1d3ad2", "diff": "@@ -30,7 +30,7 @@ def _check_argvals(argvals):\n ------\n argvals : list of numpy.ndarray\n \"\"\"\n- if isinstance(argvals, (np.ndarray, list)):\n+ if not isinstance(argvals, (np.ndarray, list)):\n raise ValueError(\n 'argvals has to be a list of numpy.ndarray or a numpy.ndarray!')\n if isinstance(argvals, list) and \\\n", "old_path": "FDApy/univariate_functional.py", "rewrite": "ReplaceText(target='not ' @(33,7)->(33,7))"} -{"repo": "https://:@github.com/StevenGolovkine/FDApy.git", "hash": "4fbe69f439588f469d858b25c3d063e02b45ed97", "diff": "@@ -24,9 +24,9 @@ def _check_data(data):\n ------\n data : list of UnivariateFunctionalData ot IrregularFunctionalData\n \"\"\"\n- if isinstance(data, (list,\n- UnivariateFunctionalData,\n- IrregularFunctionalData)):\n+ if not isinstance(data, (list,\n+ UnivariateFunctionalData,\n+ IrregularFunctionalData)):\n raise ValueError(\n \"\"\"Data has to be a list or elements of UnivariateFunctionalData\n or IrregularFunctionalData!\"\"\")\n", "old_path": "FDApy/multivariate_functional.py", "rewrite": "ReplaceText(target='not ' @(27,7)->(27,7))"} -{"repo": "https://:@github.com/StevenGolovkine/FDApy.git", "hash": "a671e9da96d43a8cd21778b535374dce8942e7da", "diff": "@@ -1075,7 +1075,7 @@ class IrregularFunctionalData(FunctionalData):\n bandwidth=b,\n degree=degree)\n pred = lp.fit_predict(arg, val, points_estim)\n- smooth_argvals[i] = arg\n+ smooth_argvals[i] = points_estim\n smooth_values[i] = pred\n return IrregularFunctionalData({'input_dim_0': smooth_argvals},\n smooth_values)\n", "old_path": "FDApy/representation/functional_data.py", "rewrite": "ReplaceText(target='points_estim' @(1078,32)->(1078,35))"} -{"repo": "https://:@github.com/Flowminder/pytest-airflow.git", "hash": "47c128f0affa875e4baed2f7223fcd0747f3bb55", "diff": "@@ -138,7 +138,7 @@ def _task_gen(item, **kwds):\n provide_context=True,\n dag=dag,\n )\n- dag.set_dependency(task_id, \"__pytest_branch\")\n+ dag.set_dependency(\"__pytest_branch\", task_id)\n return task\n \n \n", "old_path": "pytest_airflow/plugin.py", "rewrite": "ArgSwap(idxs=0<->1 @(141,4)->(141,22))"} -{"repo": "https://:@github.com/datadrivencontrol/pyvrft.git", "hash": "d21df29ac62c08e4de3bfbcc1c01a6943cfe78fe", "diff": "@@ -77,7 +77,7 @@ def design(u,y,y_iv,Td,C,L):\n y_iv=y_iv[0:N,:]\n # virtual error\n ebar=rv-y\n- ebar_iv=rv-y_iv\n+ ebar_iv=rv_iv-y_iv\n # remove the last samples of the input (to match the dimension of the virtual error)\n uf=uf[0:N,:]\n \n", "old_path": "vrft/control.py", "rewrite": "ReplaceText(target='rv_iv' @(80,16)->(80,18))"} -{"repo": "https://:@github.com/onecommons/unfurl.git", "hash": "c7b04c15dc919919696f6d20fef4465c25fda6d3", "diff": "@@ -67,7 +67,7 @@ class Resource(object):\n \n @property\n def root(self):\n- return self.ancestors[0]\n+ return self.ancestors[-1]\n \n def __getitem__(self, name):\n if not name:\n", "old_path": "giterop/resource.py", "rewrite": "ReplaceText(target='-1' @(70,26)->(70,27))"} -{"repo": "https://:@github.com/onecommons/unfurl.git", "hash": "7b9fe40414b2646ba7ee98e1f7ab770feed1c80a", "diff": "@@ -336,7 +336,7 @@ Returns:\n if not configSpec:\n raise UnfurlError(\n 'unable to find an implementation to \"%s\" \"%s\" on \"\"%s\": %s'\n- % (action, resource.template.name, resource.template.name, reason)\n+ % (action, resource.template.name, resource.template.name, notfoundmsg)\n )\n logger.debug(\n \"creating configuration %s with %s to run for %s: %s\",\n", "old_path": "unfurl/plan.py", "rewrite": "ReplaceText(target='notfoundmsg' @(339,75)->(339,81))"} -{"repo": "https://:@github.com/heartexlabs/label-studio-evalme.git", "hash": "9b7f13ab32802d5ef602d1c4f9399e949b9f3df8", "diff": "@@ -35,7 +35,7 @@ class HTMLTagsEvalItem(EvalItem):\n \n \n def _as_html_tags_eval_item(item):\n- if not isinstance(HTMLTagsEvalItem, item):\n+ if not isinstance(item, HTMLTagsEvalItem):\n return HTMLTagsEvalItem(item)\n return item\n \n", "old_path": "evalme/text/text.py", "rewrite": "ArgSwap(idxs=0<->1 @(38,11)->(38,21))"} -{"repo": "https://:@github.com/parlance/ctcdecode.git", "hash": "1a35bb5fc07eee0c9939fdf824fa8158ec52499a", "diff": "@@ -20,7 +20,7 @@ class CTCBeamDecoder(object):\n def decode(self, probs, seq_lens):\n # We expect batch x seq x label_size\n probs = probs.cpu().float()\n- seq_lens = probs.cpu().int()\n+ seq_lens = seq_lens.cpu().int()\n batch_size, max_seq_len = probs.size(0), probs.size(1)\n output = torch.IntTensor(batch_size, self._beam_width, max_seq_len).cpu().int()\n timesteps = torch.IntTensor(batch_size, self._beam_width, max_seq_len).cpu().int()\n", "old_path": "ctcdecode/__init__.py", "rewrite": "ReplaceText(target='seq_lens' @(23,19)->(23,24))"} -{"repo": "https://:@github.com/benmaier/binpacking.git", "hash": "6ada2c62c319d56cd0f5918a2f01ff61d0e45348", "diff": "@@ -107,7 +107,7 @@ def to_constant_bin_number(d,N_bin,weight_pos=None,lower_bound=None,upper_bound=\n while not found_bin:\n \n #if this weight fits in the bin\n- if new_weight_sum < V_bin_max:\n+ if new_weight_sum <= V_bin_max:\n \n #...put it in \n if isdict:\n", "old_path": "binpacking/to_constant_bin_number.py", "rewrite": "ReplaceText(target='<=' @(110,30)->(110,31))"} -{"repo": "https://:@github.com/amatino-code/nozomi.git", "hash": "dc608f09a68fc8972f563e2b9974692581d40efc", "diff": "@@ -257,7 +257,7 @@ integers'.format(\n min_value=min_value\n ))\n \n- return values\n+ return validated\n \n def optionally_parse_bool(\n self,\n", "old_path": "nozomi/http/parseable_data.py", "rewrite": "ReplaceText(target='validated' @(260,15)->(260,21))"} -{"repo": "https://:@github.com/amatino-code/nozomi.git", "hash": "b486a1109ac83dcabb4022d071644cadc4734769", "diff": "@@ -70,7 +70,7 @@ class Resource:\n if not candidate.grants_read_to(unauthorised_agent):\n raise NotAuthorised\n continue\n- return broadcast_candidate\n+ return unauthorised_agent\n \n if not broadcast_candidate.grants_read_to(unauthorised_agent):\n raise NotAuthorised\n", "old_path": "nozomi/resources/resource.py", "rewrite": "ReplaceText(target='unauthorised_agent' @(73,19)->(73,38))"} -{"repo": "https://:@github.com/Puumanamana/CoCoNet.git", "hash": "5e966cbf19199b62e265f1320a5e60a0cdb2e26e", "diff": "@@ -54,7 +54,7 @@ def make_positive_pairs(label, frag_steps, contig_frags, fppc, encoding_len=128)\n if k < fppc:\n # print(\"WARNING: cannot make {} unique pairs with genome of {} fragments\".format(fppc, contig_frags), end='\\r')\n pairs.sp = np.tile(label, [fppc, 2])\n- pairs.start = np.random.choice(frag_steps, [fppc, 2])\n+ pairs.start = np.random.choice(contig_frags, [fppc, 2])\n pairs.end = pairs.start + frag_steps\n \n return pairs\n", "old_path": "coconet/fragmentation.py", "rewrite": "ReplaceText(target='contig_frags' @(57,39)->(57,49))"} -{"repo": "https://:@github.com/struts2spring/sql-editor.git", "hash": "92d594a22fc8cf532f18a445961615037bfa2685", "diff": "@@ -305,7 +305,7 @@ class FileBrowser(FileTree):\n fileName=os.path.split(path)[-1]\n \n \n- stc.SetText(FileOperations().readFile(filePath=fname))\n+ stc.SetText(FileOperations().readFile(filePath=path))\n centerPaneTab.window.addTab(name='openFileLoad'+fileName, worksheetPanel=stc)\n \n # win = wx.GetApp().GetActiveWindow()\n", "old_path": "src/view/views/file/explorer/FileBrowserPanel.py", "rewrite": "ReplaceText(target='path' @(308,67)->(308,72))"} -{"repo": "https://:@github.com/struts2spring/sql-editor.git", "hash": "3b18738cabd125bf7e4faeb0170edcc888f22c0b", "diff": "@@ -2306,7 +2306,7 @@ class ScrolledThumbnail(wx.ScrolledWindow):\n logger.error(e, exc_info=True)\n logger.error('selectedBookIndex: %s, len: %s', selectedBookIndex, len(self._items))\n # logger.debug(.0deleteBooks)\n- if len(deleteBooks) > 0:\n+ if len(deleteBooks) >= 0:\n self.updateStatusBar(text=f'{len(deleteBooks)} books deleted')\n self.GetParent().GetParent().loadingBook()\n self.GetParent().GetParent().updatePangnation()\n", "old_path": "src/view/views/calibre/book/browser/BookThumbCrtl.py", "rewrite": "ReplaceText(target='>=' @(2309,28)->(2309,29))"} -{"repo": "https://:@github.com/khaledghobashy/uraeus.git", "hash": "d0011bf8d00b0212dd67ce4cd64b21719fbed709", "diff": "@@ -186,7 +186,7 @@ class internal_force(generic_force):\n defflection = self.LF - distance\n velocity = unit_vector.T*self.joint.dijd\n \n- self.Fi = unit_vector*(self.Fs(defflection) + self.Fd(velocity))\n+ self.Fi = unit_vector*(self.Fs(defflection) - self.Fd(velocity))\n Ti_e = 2*G(self.Pi).T*(self.Ti + Skew(self.ui).T*self.Fi)\n \n force_vector = sm.BlockMatrix([[self.Fi], [Ti_e]])\n", "old_path": "source/symbolic_classes/forces.py", "rewrite": "ReplaceText(target='-' @(189,52)->(189,53))"} -{"repo": "https://:@github.com/naglis/odd-bunch.git", "hash": "6e9e55c327eaa6bccd5a54a1da850db418fa3a3a", "diff": "@@ -74,7 +74,7 @@ class FieldAttrStringRedundant(Plugin):\n f'for field \"{field.name}\". The same value will be computed '\n f\"by Odoo automatically.\",\n addon,\n- locations=[Location(path, [column_index_1(string_kwarg.start_pos)])],\n+ locations=[Location(path, [column_index_1(field.start_pos)])],\n confidence=Confidence.LOW,\n categories=[\"redundancy\"],\n sources=sources,\n", "old_path": "odd_bunch/plugin/field_attr_string_redundant.py", "rewrite": "ReplaceText(target='field' @(77,58)->(77,70))"} -{"repo": "https://:@github.com/naglis/odd-bunch.git", "hash": "6e9e55c327eaa6bccd5a54a1da850db418fa3a3a", "diff": "@@ -23,7 +23,7 @@ class TrackVisibilityAlways(Plugin):\n \"deprecated since version 12.0\",\n addon,\n locations=[\n- Location(field.model.path, [column_index_1(kwarg.start_pos)])\n+ Location(field.model.path, [column_index_1(field.start_pos)])\n ],\n categories=[\"deprecated\"],\n sources=[\n", "old_path": "odd_bunch/plugin/track_visibility_always.py", "rewrite": "ReplaceText(target='field' @(26,67)->(26,72))"} -{"repo": "https://:@github.com/haipdev/config.git", "hash": "c81fb07972b62e9c51d47b7306ad0cb39b90025d", "diff": "@@ -115,7 +115,7 @@ def get(*paths, **options):\n elif value is not MANDATORY:\n result[key] = value\n else:\n- path = '/'.join(path)\n+ path = '/'.join(paths)\n raise HaipConfigException(f'option \"{key}\" not found in section \"{path}\"')\n return result \n \n", "old_path": "haip/config.py", "rewrite": "ReplaceText(target='paths' @(118,28)->(118,32))"} -{"repo": "https://:@github.com/woblers/rightmove_webscraper.py.git", "hash": "75bc8dc28e5a998582ddf86ae43a3160b5729a90", "diff": "@@ -37,7 +37,7 @@ class rightmove_data(object):\n There are 24 results on each results page, but note that the\n rightmove website limits results pages to a maximum of 42 pages.\"\"\"\n \n- page_count = self.results_count() / 24\n+ page_count = self.results_count() // 24\n if self.results_count() % 24 > 0:\n page_count += 1\n \n", "old_path": "rightmove_webscraper.py", "rewrite": "ReplaceText(target='//' @(40,42)->(40,43))"} -{"repo": "https://:@github.com/DomBennett/MassPhylogenyEstimation.git", "hash": "e72cb1554f059c77b45c8c74af96bd0b2fb140b9", "diff": "@@ -39,7 +39,7 @@ with open(os.path.join(working_dir, \"data\", \"test_alignment.p\"),\n # MOCK\n def dummy_blast(query, subj, minoverlap):\n # should return bools and positions\n- bools = [True for e in subj]\n+ bools = [True for e in query]\n positions = [0 for e in subj]\n max_positions = [len(e) for e in subj]\n positions.extend(max_positions)\n", "old_path": "tests/test_tools_alignment.py", "rewrite": "ReplaceText(target='query' @(42,27)->(42,31))"} -{"repo": "https://:@github.com/DomBennett/MassPhylogenyEstimation.git", "hash": "832e9df9733c4e266c0583d4e1a329b5f72d4f4c", "diff": "@@ -159,7 +159,7 @@ class Stager(object):\n @classmethod\n def run_all(klass, wd, stages):\n for s in stages:\n- if check(stage=s, directory=wd):\n+ if not check(stage=s, directory=wd):\n Stager(wd, s).run()\n \n \n", "old_path": "pglt/tools/system_tools.py", "rewrite": "ReplaceText(target='not ' @(162,15)->(162,15))"} -{"repo": "https://:@bitbucket.org/bowaggonerpublic/bomail.git", "hash": "383fe87f4b5a54ce110d33850ce10f19e088a001", "diff": "@@ -62,7 +62,7 @@ def main():\n exit(0)\n \n if sys.argv[1] == \"help\":\n- if len(sys.argv) < 2:\n+ if len(sys.argv) <= 2:\n print(usage_str)\n elif sys.argv[2] == \"datestr\":\n print(bomail.util.datestr.datestr_str)\n", "old_path": "bomail/bomail.py", "rewrite": "ReplaceText(target='<=' @(65,21)->(65,22))"} -{"repo": "https://:@bitbucket.org/bowaggonerpublic/bomail.git", "hash": "6769b3f3dc022b9674b2f26d2ff842f74703da7e", "diff": "@@ -73,7 +73,7 @@ class TabNoThread:\n new_fileset = set(new_filenames)\n self.remove_files([t[0] for t in self.file_data if t[0] not in new_fileset], old_disp_info)\n # assume, worst-case, that all matching files have changed/added\n- self.update_for_change(new_fileset, old_disp_info)\n+ self.update_for_change(new_filenames, old_disp_info)\n \n \n # lazily load display data and return disp_data, is_unread, is_marked\n", "old_path": "bomail/guistuff/tabnothread.py", "rewrite": "ReplaceText(target='new_filenames' @(76,27)->(76,38))"} -{"repo": "https://:@github.com/GainCompliance/gain-requests-futures.git", "hash": "2779819b9b7554d787280d5889878237ba1937b5", "diff": "@@ -69,7 +69,7 @@ class FuturesSession(Session):\n func = super(FuturesSession, self).send\n if isinstance(self.executor, ProcessPoolExecutor):\n try:\n- dumps(request)\n+ dumps(func)\n except (TypeError, PickleError):\n raise RuntimeError(PICKLE_ERROR)\n return self.executor.submit(func, request, **kwargs)\n", "old_path": "requests_futures/sessions.py", "rewrite": "ReplaceText(target='func' @(72,22)->(72,29))"} -{"repo": "https://:@github.com/praekelt/casepropods.family_connect_subscription.git", "hash": "9f04ceacb29a64763e11de6c8fd3008faf9eddb2", "diff": "@@ -95,7 +95,7 @@ class SubscriptionPod(Pod):\n 'subscription_ids': active_sub_ids\n }\n })\n- if len(active_sub_ids) > 0:\n+ if len(active_sub_ids) > 1:\n actions.append(self.get_cancel_action(active_sub_ids))\n \n content['actions'] = actions\n", "old_path": "casepropods/family_connect_subscription/plugin.py", "rewrite": "ReplaceText(target='1' @(98,33)->(98,34))"} -{"repo": "https://:@github.com/fmilthaler/FinQuant.git", "hash": "075430f74799040aa1d46c722e16a52a82637c63", "diff": "@@ -783,7 +783,7 @@ def _yfinance_request(names, start_date=None, end_date=None):\n try:\n import datetime\n if isinstance(start_date, str):\n- start_date = datetime.datetime.strptime(end_date, \"%Y-%m-%d\")\n+ start_date = datetime.datetime.strptime(start_date, \"%Y-%m-%d\")\n if isinstance(end_date, str):\n end_date = datetime.datetime.strptime(end_date, \"%Y-%m-%d\")\n except ImportError:\n", "old_path": "finquant/portfolio.py", "rewrite": "ReplaceText(target='start_date' @(786,52)->(786,60))"} -{"repo": "https://:@github.com/MrTango/click.git", "hash": "a6af25df9c2e82e94c3aa15d579f9347881e5efb", "diff": "@@ -1173,7 +1173,7 @@ class Argument(Parameter):\n if attrs.get('default') is not None:\n required = False\n else:\n- required = attrs.get('nargs', 0) > 0\n+ required = attrs.get('nargs', 1) > 0\n Parameter.__init__(self, param_decls, required=required, **attrs)\n \n def make_metavar(self):\n", "old_path": "click/core.py", "rewrite": "ReplaceText(target='1' @(1176,46)->(1176,47))"} -{"repo": "https://:@github.com/MrTango/click.git", "hash": "336e5e08acf98a4033e5aa4c6fcef118d4f469ec", "diff": "@@ -224,7 +224,7 @@ def version_option(version=None, *param_decls, **attrs):\n message = attrs.pop('message', '%(prog)s, version %(version)s')\n \n def callback(ctx, param, value):\n- if value or ctx.resilient_parsing:\n+ if not value or ctx.resilient_parsing:\n return\n prog = prog_name\n if prog is None:\n", "old_path": "click/decorators.py", "rewrite": "ReplaceText(target='not ' @(227,15)->(227,15))"} -{"repo": "https://:@github.com/MrTango/click.git", "hash": "598c6d76fbc036fb3219d9f09948a682cda66601", "diff": "@@ -213,7 +213,7 @@ class CliRunner(object):\n old_env = {}\n try:\n for key, value in iteritems(env):\n- old_env[key] = os.environ.get(value)\n+ old_env[key] = os.environ.get(key)\n if value is None:\n try:\n del os.environ[key]\n", "old_path": "click/testing.py", "rewrite": "ReplaceText(target='key' @(216,46)->(216,51))"} -{"repo": "https://:@github.com/epeios-q37/atlas-python.git", "hash": "c310fd7273b7ec139c0eca6be43506cb611d5bfc", "diff": "@@ -69,7 +69,7 @@ class Chatroom:\n \tdef displayMessages(this, dom):\r\n \t\tglobal messages\r\n \t\t\r\n-\t\tif len(messages) >= this.lastMessage:\r\n+\t\tif len(messages) > this.lastMessage:\r\n \t\t\tid = dom.createElement(\"span\")\r\n \t\t\tdom.setLayoutXSL(id, this.buildXML(), \"Messages.xsl\")\r\n \t\t\tdom.insertChild(id, \"Board\")\r\n", "old_path": "Chatroom/main.py", "rewrite": "ReplaceText(target='>' @(72,19)->(72,21))"} -{"repo": "https://:@github.com/herrersystem/apize.git", "hash": "3f4ce76b32fdc1cddc66cde54f0d7552b2ab2101", "diff": "@@ -15,7 +15,7 @@ def send_request(url, method,\n \t\"\"\"\n \t## Parse url args\n \tfor p in args:\n-\t\turl = url.replace(':'+p, str(params[p]))\n+\t\turl = url.replace(':' + p, str(args[p]))\n \n \ttry:\n \t\tif data:\n", "old_path": "apize/decorators.py", "rewrite": "ReplaceText(target='args' @(18,31)->(18,37))"} -{"repo": "https://:@github.com/silvacms/silva.core.services.git", "hash": "a674128c54bb10f2abdda32808285fabc985e363", "diff": "@@ -39,7 +39,7 @@ class SecretService(SilvaService):\n assert len(args) > 1, u'Too few arguments'\n challenge = hmac.new(self.__key, str(args[0]), hashlib.sha1)\n for arg in args[1:]:\n- challenge.update(str(args))\n+ challenge.update(str(arg))\n return challenge.hexdigest()\n \n InitializeClass(SecretService)\n", "old_path": "src/silva/core/services/secret.py", "rewrite": "ReplaceText(target='arg' @(42,33)->(42,37))"} -{"repo": "https://:@github.com/SatelliteApplicationsCatapult/sedas_pyapi.git", "hash": "db1d3308de5180dd9a26e8bc73b82c97d2f07507", "diff": "@@ -225,7 +225,7 @@ class SeDASAPI:\n req = Request(url, headers=self.headers)\n try:\n decoded = json.load(urlopen(req))\n- if len(decoded) > 1 and 'downloadUrl' in decoded[0]:\n+ if len(decoded) >= 1 and 'downloadUrl' in decoded[0]:\n return decoded[0]['downloadUrl']\n return None\n except HTTPError as e:\n", "old_path": "getthestuff/sedas_api.py", "rewrite": "ReplaceText(target='>=' @(228,28)->(228,29))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "9431e28a54c7a64f4fabcd861239a9651a75dde5", "diff": "@@ -91,7 +91,7 @@ class YamlDao(Dao):\n cur_data = self.fetch(_id)\n new_data = DictUtils.merge(cur_data, data)\n Yaml.to_file(file_path=file_path, data=new_data)\n- return data\n+ return new_data\n \n def delete(self, _id) -> None:\n \"\"\"\n", "old_path": "pybiz/dao/yaml_dao.py", "rewrite": "ReplaceText(target='new_data' @(94,15)->(94,19))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "cc4bc8499bdffbf4bef4704afb722fa55c7ccc1d", "diff": "@@ -790,7 +790,7 @@ class BizObject(\n related_bizobj_list.append(obj)\n else:\n related_bizobj_list.append(\n- rel.target(related_data)\n+ rel.target(obj)\n )\n \n self._related_bizobjs[rel.name] = related_bizobj_list\n", "old_path": "pybiz/biz.py", "rewrite": "ReplaceText(target='obj' @(793,39)->(793,51))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "4bfdaf78df6eec9213f65df0656d346cfd4a45f2", "diff": "@@ -79,6 +79,6 @@ class BreadthFirstSaver(Saver):\n v_type = v.__class__\n if v._id is None:\n to_create[v_type].append(v)\n- elif x.dirty:\n+ elif v.dirty:\n to_update[v_type].append(x)\n self._aggregate_related(v, to_create, to_update)\n", "old_path": "pybiz/biz/internal/save.py", "rewrite": "ReplaceText(target='v' @(82,21)->(82,22))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "9ccaa42fdf4677090e93c27b2326c5d935d568f9", "diff": "@@ -80,5 +80,5 @@ class BreadthFirstSaver(Saver):\n if v._id is None:\n to_create[v_type].append(v)\n elif v.dirty:\n- to_update[v_type].append(x)\n+ to_update[v_type].append(v)\n self._aggregate_related(v, to_create, to_update)\n", "old_path": "pybiz/biz/internal/save.py", "rewrite": "ReplaceText(target='v' @(83,45)->(83,46))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "c042a85234732c1ff96c0240b378595d24631fbe", "diff": "@@ -116,7 +116,7 @@ class CompositeGuard(Guard):\n if rhs_exc is not None and lhs_exc is not None:\n return CompositeGuardException(lhs_exc, rhs_exc)\n elif self._op == OP_CODE.NOT:\n- if lhs_exc is not None:\n+ if lhs_exc is None:\n return lhs_exc\n else:\n return ValueError(f'op not recognized, \"{self._op}\"')\n", "old_path": "pybiz/api/middleware/guard_middleware/guard.py", "rewrite": "ReplaceText(target=' is ' @(119,22)->(119,30))"} -{"repo": "https://:@github.com/gigaquads/pybiz.git", "hash": "30e14e8c946edb447a76ea243a271c6a03895def", "diff": "@@ -43,7 +43,7 @@ class ActionDecorator(object):\n else:\n func = obj\n action = self.setup_action(func, False)\n- return action\n+ return func\n \n def setup_action(self, func, overwrite):\n action = self.app.action_type(func, self)\n", "old_path": "ravel/app/base/action_decorator.py", "rewrite": "ReplaceText(target='func' @(46,19)->(46,25))"} -{"repo": "https://:@github.com/a1phat0ny/noteboard.git", "hash": "82eea493ff696d09af702a1cfd0c645f5f61b86e", "diff": "@@ -429,7 +429,7 @@ def display_board(date=False, sort=False, im=False):\n (Fore.LIGHTBLACK_EX + \"(due: {})\".format(color + str(duedate) + Fore.LIGHTBLACK_EX)) if item[\"due\"] else \"\",\n Fore.LIGHTBLACK_EX + str(item[\"date\"]))\n else:\n- p(star, Fore.LIGHTMAGENTA_EX + str(item[\"id\"]).rjust(2), mark, text_color + item[\"text\"], tag_text, due_text, day_text)\n+ p(star, Fore.LIGHTMAGENTA_EX + str(item[\"id\"]).rjust(2), mark, text_color + item[\"text\"], tag_text, day_text, due_text)\n print()\n print_footer()\n print_total()\n", "old_path": "noteboard/cli.py", "rewrite": "ArgSwap(idxs=5<->6 @(432,16)->(432,17))"} -{"repo": "https://:@github.com/tlevine/sheetmusic.git", "hash": "5c919c8d4c6be39cd42847e44942305521c7fa52", "diff": "@@ -54,7 +54,7 @@ def _next_note(first_note, second_note_name):\n If the second note name is less than the first (\"G\" is greater than \"C\"),\n return a note of the second name in the octave above the first.\n '''\n- if second_note_name > first_note.name:\n+ if second_note_name >= first_note.name:\n second_note_octave = first_note.octave\n else:\n second_note_octave = first_note.octave + 1\n", "old_path": "libsheetmusic/music.py", "rewrite": "ReplaceText(target='>=' @(57,24)->(57,25))"} -{"repo": "https://:@github.com/tlevine/sheetmusic.git", "hash": "62a714388992483a00824d0ce16af7a7c8b9ee7e", "diff": "@@ -80,4 +80,4 @@ def util_functions():\n \n def functions():\n callables = reduce(u.merge, [scale_functions(), chord_functions(), progression_functions(), interval_functions(), util_functions()])\n- return {k:u.to_function(v, k) for k,v in callables.items()}\n+ return {k:u.to_function(k, v) for k,v in callables.items()}\n", "old_path": "libsheetmusic/main.py", "rewrite": "ArgSwap(idxs=0<->1 @(83,14)->(83,27))"} -{"repo": "https://:@gitlab.com/ebenhoeh/modelbase.git", "hash": "dcc3cdf01cf74859ff59f4a641a9caf0faa21069", "diff": "@@ -207,7 +207,7 @@ class Model(core.ParameterModel):\n raise TypeError(\"Rate name must be str\")\n if not callable(rate_function):\n raise TypeError(\"Rate function must be a function\")\n- if variables is not None:\n+ if variables is None:\n variables = []\n if not isinstance(variables, list):\n raise TypeError(\"Variables must be a list\")\n", "old_path": "modelbase/ode/model.py", "rewrite": "ReplaceText(target=' is ' @(210,20)->(210,28))"} -{"repo": "https://:@gitlab.com/ebenhoeh/modelbase.git", "hash": "34fc0fc7c745eef34ae0edf0377347d83b733890", "diff": "@@ -281,7 +281,7 @@ class Model(core.ParameterModel):\n def get_rate_indexes(self, rate_name=None):\n v, k = zip(*enumerate(self.get_rate_names()))\n rate_idx = dict(zip(k, v))\n- if rate_name is not None:\n+ if rate_name is None:\n return rate_idx\n return rate_idx[rate_name]\n \n", "old_path": "modelbase/ode/model.py", "rewrite": "ReplaceText(target=' is ' @(284,20)->(284,28))"} -{"repo": "https://:@github.com/kalombos/pynetsnmp.git", "hash": "812b5789589ca0d99f6e6d2339fee7e4254e9c01", "diff": "@@ -637,7 +637,7 @@ class Session(object):\n \n \n MAXFD = 1024\n-fdset = c_int32 * (MAXFD/32)\n+fdset = c_int32 * (MAXFD//32)\n \n class timeval(Structure):\n _fields_ = [\n", "old_path": "pynetsnmp/netsnmp.py", "rewrite": "ReplaceText(target='//' @(640,24)->(640,25))"} -{"repo": "https://:@github.com/kalombos/pynetsnmp.git", "hash": "f2883247d0b1df1804aa12653b06dce1d2137697", "diff": "@@ -312,7 +312,7 @@ def strToOid(oidStr):\n return mkoid(tuple([int(x) for x in oidStr.strip('.').split('.')]))\n \n def decodeOid(pdu):\n- return tuple([pdu.val.objid[i] for i in range(pdu.val_len / sizeof(u_long))])\n+ return tuple([pdu.val.objid[i] for i in range(pdu.val_len // sizeof(u_long))])\n \n def decodeIp(pdu):\n return '.'.join(map(str, pdu.val.bitstring[:4]))\n", "old_path": "pynetsnmp/netsnmp.py", "rewrite": "ReplaceText(target='//' @(315,62)->(315,63))"} -{"repo": "https://:@github.com/Swiftea/Crawler.git", "hash": "fb03cfc257939d5b86fe00037ab6b00fd54c9afa", "diff": "@@ -14,7 +14,7 @@ def stats(dir_stats=DIR_STATS):\n \t\tstat_links = ('Average links in webpage: ' + str(average(content)))\r\n \t\tif len(content) > 10000:\r\n \t\t\tcompress_stats(dir_stats + 'stat_links')\r\n-\tresult += stat_links + '\\n'\r\n+\tresult = stat_links + '\\n'\r\n \ttry:\r\n \t\twith open(dir_stats + 'stat_webpages', 'r') as myfile:\r\n \t\t\tcontent = myfile.read().split()\r\n", "old_path": "crawler/stats.py", "rewrite": "ReplaceText(target='=' @(17,8)->(17,10))"} -{"repo": "https://:@bitbucket.org/mikhail-makovenko/save-to-db.git", "hash": "0b152880bfce8af5f211bfbb3d5677f283823bdc", "diff": "@@ -187,7 +187,7 @@ class AdapterBase(object):\n :returns: Item list and corresponding ORM models as a list of lists\n (in case one item updates multiple models).\n \"\"\"\n- return db_persist(cls, item, adapter_settings)\n+ return db_persist(item, cls, adapter_settings)\n \n \n @classmethod\n", "old_path": "save_to_db/adapters/utils/adapter_base.py", "rewrite": "ArgSwap(idxs=0<->1 @(190,15)->(190,25))"} -{"repo": "https://:@github.com/itu-algorithms/itu.algs4.git", "hash": "8a06e126f13f6d54802e342b1ad7c44ec792ffc3", "diff": "@@ -64,7 +64,7 @@ class Queue:\n if __name__ == '__main__':\n queue = Queue()\n \n- if len(sys.argv) > 0:\n+ if len(sys.argv) > 1:\n sys.stdin = open(sys.argv[1])\n while not stdio.isEmpty():\n input_item = stdio.readString()\n", "old_path": "fundamentals/queue.py", "rewrite": "ReplaceText(target='1' @(67,23)->(67,24))"} -{"repo": "https://:@github.com/itu-algorithms/itu.algs4.git", "hash": "2282d1fa58d8c525d83890def4dc5b4d1902a0dd", "diff": "@@ -9,6 +9,6 @@ class ThreeSumFast:\n count = 0\n for i in range(n):\n for j in range(i+1, n):\n- if binary_search.index_of(a, -a[i]-a[j]) > i: \n+ if binary_search.index_of(a, -a[i]-a[j]) > j: \n count += 1\n return count\n", "old_path": "algs4/fundamentals/three_sum_fast.py", "rewrite": "ReplaceText(target='j' @(12,59)->(12,60))"} -{"repo": "https://:@github.com/itu-algorithms/itu.algs4.git", "hash": "62cc19d6f09e3f24abbe1551d69d67474518a7cb", "diff": "@@ -183,7 +183,7 @@ class BinarySearchST:\n while j < self._n-1:\n self._keys[j] = self._keys[j+1]\n self._vals[j] = self._vals[j+1]\n- j = 1\n+ j += 1\n \n self._n -= 1\n n = self._n\n", "old_path": "itu/algs4/searching/binary_search_st.py", "rewrite": "ReplaceText(target='+=' @(186,14)->(186,15))"} -{"repo": "https://:@github.com/itu-algorithms/itu.algs4.git", "hash": "616a6dd32cf80578bfae1ce36dbede8eb2e241cc", "diff": "@@ -481,7 +481,7 @@ class RedBlackBST(Generic[Key, Val]):\n return\n if lo < x.key:\n self._keys(x.left, queue, lo, hi)\n- if not x.key < lo and x.key < hi:\n+ if not x.key < lo and x.key <= hi:\n queue.enqueue(x.key)\n if hi > x.key:\n self._keys(x.right, queue, lo, hi)\n", "old_path": "itu/algs4/searching/red_black_bst.py", "rewrite": "ReplaceText(target='<=' @(484,37)->(484,38))"} -{"repo": "https://:@github.com/kbytesys/django-recaptcha3.git", "hash": "69219ca34dc834fede05f4e7f107ba17156f8f45", "diff": "@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)\n \n class ReCaptchaField(forms.CharField):\n def __init__(self, attrs=None, *args, **kwargs):\n- if os.environ.get('RECAPTCHA_DISABLE', None) is not None:\n+ if os.environ.get('RECAPTCHA_DISABLE', None) is None:\n self._private_key = kwargs.pop('private_key', settings.RECAPTCHA_PRIVATE_KEY)\n self._score_threshold = kwargs.pop('score_threshold', settings.RECAPTCHA_SCORE_THRESHOLD)\n \n", "old_path": "snowpenguin/django/recaptcha3/fields.py", "rewrite": "ReplaceText(target=' is ' @(18,52)->(18,60))"} -{"repo": "https://:@github.com/MonetDBSolutions/mal_analytics.git", "hash": "0b7cd6d9394adc932e19a29eda69bb11e5a3fb19", "diff": "@@ -375,7 +375,7 @@ class ProfilerObjectParser:\n except json.JSONDecodeError as json_error:\n LOGGER.warning(\"W001: Cannot parse object\")\n LOGGER.warning(json_string)\n- LOGGER.warning(\"Decoder reports %s\", json_string)\n+ LOGGER.warning(\"Decoder reports %s\", json_error)\n return\n \n dispatcher = {\n", "old_path": "mal_profiler/profiler_parser.py", "rewrite": "ReplaceText(target='json_error' @(378,49)->(378,60))"} -{"repo": "https://:@github.com/MonetDBSolutions/mal_analytics.git", "hash": "a4e4a3d115ffc81721248d71176d8205c1866d98", "diff": "@@ -148,7 +148,7 @@ class DatabaseManager(object, metaclass=Singleton):\n stmt = list()\n for ln in sql_in:\n cline = ln.strip()\n- if ln.startswith('--') or len(cline) == 0:\n+ if cline.startswith('--') or len(cline) == 0:\n continue\n \n stmt.append(cline)\n", "old_path": "mal_analytics/db_manager.py", "rewrite": "ReplaceText(target='cline' @(151,15)->(151,17))"} -{"repo": "https://:@github.com/codepost-io/codePost-api-python.git", "hash": "00320258dd53e987c66c9af2d021fb93b38ac20c", "diff": "@@ -812,7 +812,7 @@ def remove_comments(api_key, submission_id=None, file_id=None):\n headers=auth_headers\n )\n \n- if r.status_code != 204:\n+ if r.status_code == 204:\n comments_to_delete += r.json().get(\"comments\", list())\n deleted_comments += 1\n except:\n", "old_path": "codePost_api/helpers.py", "rewrite": "ReplaceText(target='==' @(815,29)->(815,31))"} -{"repo": "https://:@github.com/optimatorlab/veroviz.git", "hash": "0c34d475219e023bbc77e96bbcf8c7bd2ec09fde", "diff": "@@ -527,7 +527,7 @@ def geoAreaOfPolygon(poly):\n \tpolyArea = 0\n \t\n \t# Use polygon triangulation to cut the bounding region into a list of triangles, calculate the area of each triangle\n-\tlstTriangle = tripy.earclip(poly)\n+\tlstTriangle = tripy.earclip(cleanPoly)\n \tlstArea = []\n \tfor i in range(len(lstTriangle)):\n \t\tlstArea.append(geoAreaOfTriangle(lstTriangle[i][0], lstTriangle[i][1], lstTriangle[i][2]))\n", "old_path": "veroviz/_geometry.py", "rewrite": "ReplaceText(target='cleanPoly' @(530,29)->(530,33))"} -{"repo": "https://:@github.com/slipguru/adenine.git", "hash": "0ea659ee40e7d0eff55de0da241e5e2566de4a48", "diff": "@@ -380,7 +380,7 @@ def analysis_worker(elem, root, y, feat_names, class_names, lock):\n model=voronoi_mdl_obj)\n elif hasattr(mdl_obj, 'n_leaves_'):\n plotting.tree(root=rootname, data_in=step_in,\n- labels=step_out, model=mdl_obj)\n+ labels=y, model=mdl_obj)\n plotting.dendrogram(root=rootname, data_in=step_in,\n labels=y, model=mdl_obj)\n \n", "old_path": "adenine/core/analyze_results.py", "rewrite": "ReplaceText(target='y' @(383,37)->(383,45))"} -{"repo": "https://:@github.com/Tenchi2xh/Almonds.git", "hash": "79cd9da8e404df197cbe23586aeacec156080722", "diff": "@@ -135,7 +135,7 @@ class Cursebox(object):\n return EVENT_RIGHT\n elif ch == 3:\n return EVENT_CTRL_C\n- elif 0 >= ch < 256:\n+ elif 0 <= ch < 256:\n return chr(ch)\n else:\n return EVENT_UNHANDLED\n", "old_path": "almonds/cursebox/cursebox.py", "rewrite": "ReplaceText(target='<=' @(138,15)->(138,17))"} -{"repo": "https://:@github.com/abrahamrhoffman/anaxdb.git", "hash": "0ff2588e2af89bb06d04834ad6bef887ed5ebb14", "diff": "@@ -263,7 +263,7 @@ class Database(object):\n try:\n tableFile = (self._path + \"/\" + aTableName + \".pq\")\n tableFileEnc = (self._path + \"/\" + aTableName + \".enc\")\n- self._decrypt(tableFileEnc)\n+ self._decrypt(tableFile)\n dataframe = pq.read_table(tableFile).to_pandas()\n os.remove(tableFile)\n return dataframe\n", "old_path": "anaxdb/anaxdb.py", "rewrite": "ReplaceText(target='tableFile' @(266,30)->(266,42))"} -{"repo": "https://:@github.com/badmetacoder/calculator.git", "hash": "531135ec2a5b354165ad6e6e6b8d2e4d84b8ee38", "diff": "@@ -96,7 +96,7 @@ class SimpleCalculator():\n elif self.op == '+':\n self.r1 = self.r1 + self.r2\n elif self.op == '-':\n- self.r1 = self.r1 + self.r2\n+ self.r1 = self.r1 - self.r2\n elif self.op == '*':\n self.r1 = self.r1 * self.r2\n elif self.op == '/':\n", "old_path": "calculator/simple.py", "rewrite": "ReplaceText(target='-' @(99,34)->(99,35))"} -{"repo": "https://:@github.com/mhantke/h5writer.git", "hash": "b70deaa06e1b8043aa658410e6ffe2310f796c35", "diff": "@@ -150,7 +150,7 @@ class H5WriterMPI(AbstractH5Writer):\n \n def _write_solocache_group_to_file(self, data_dict, group_prefix=\"/\"):\n if self._is_master() and group_prefix != \"/\":\n- if group_prefix in self._f:\n+ if group_prefix not in self._f:\n self._f.create_group(group_prefix)\n keys = data_dict.keys()\n keys.sort()\n", "old_path": "src/h5writer_mpi.py", "rewrite": "ReplaceText(target=' not in ' @(153,27)->(153,31))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "21a7d99f2c2f28a1de150b3464c7b649b096d757", "diff": "@@ -6,7 +6,7 @@ class EpsGreedy(object):\n self._epsilon = epsilon\n \n def __call__(self):\n- if np.random.uniform() > self._epsilon:\n+ if np.random.uniform() < self._epsilon:\n return False\n return True\n \n", "old_path": "PyPi/policy/policy.py", "rewrite": "ReplaceText(target='<' @(9,31)->(9,32))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "86fae8d69f4906e0e395163d1b2fa43371d28deb", "diff": "@@ -103,7 +103,7 @@ class Algorithm(object):\n if render:\n self.mdp._render()\n \n- last = 0 if n_steps < self.mdp.horizon or not absorbing else 1\n+ last = 0 if n_steps < self.mdp.horizon and not absorbing else 1\n sample = self.state.ravel().tolist() + action.ravel().tolist() + \\\n [reward] + next_state.ravel().tolist() + \\\n [absorbing, last]\n", "old_path": "PyPi/algorithms/algorithm.py", "rewrite": "ReplaceText(target='and' @(106,51)->(106,53))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "2f134a73ac9cdab98206afeab6cd39bb02b6a6fc", "diff": "@@ -113,7 +113,7 @@ class Core(object):\n action_idx = self.agent.draw_action(self.state,\n self.agent.approximator)\n action_value = self.mdp.action_space.get_value(action_idx)\n- next_state, reward, absorbing, _ = self.mdp.step(action_idx)\n+ next_state, reward, absorbing, _ = self.mdp.step(action_value)\n J += self.mdp.gamma ** n_steps * reward\n n_steps += 1\n \n", "old_path": "PyPi/core/core.py", "rewrite": "ReplaceText(target='action_value' @(116,61)->(116,71))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "a38031ed8b004f73983b53919acfd4c36e1f2bf1", "diff": "@@ -75,4 +75,4 @@ class Binarizer(Preprocessor):\n The binarized input data array.\n \n \"\"\"\n- return (x > self._threshold).astype(np.float)\n+ return (x >= self._threshold).astype(np.float)\n", "old_path": "mushroom/utils/preprocessor.py", "rewrite": "ReplaceText(target='>=' @(78,18)->(78,19))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "bcf82aaeed185c53d3f512491f80ec793e264bab", "diff": "@@ -237,7 +237,7 @@ class RDQN(DQN):\n state, action, _, _, absorbing, _ =\\\n self._replay_memory.get_idxs(idxs)\n \n- no_abs_idxs = idxs[np.argwhere(absorbing != 0).ravel()]\n+ no_abs_idxs = idxs[np.argwhere(absorbing == 0).ravel()]\n state, action, _, _, absorbing, _ =\\\n self._replay_memory.get_idxs(no_abs_idxs)\n next_state, next_action, next_reward, _, next_absorbing, _ =\\\n", "old_path": "mushroom/algorithms/dqn.py", "rewrite": "ReplaceText(target='==' @(240,53)->(240,55))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "d4ec7569d1f7409b05754abe8a11a69f016efd01", "diff": "@@ -258,7 +258,7 @@ class SARSALambdaDiscrete(TD):\n for s in self.mdp_info.observation_space.values:\n for a in self.mdp_info.action_space.values:\n self.Q[s, a] += self.alpha(s, a) * delta * self.e[s, a]\n- self.e[s, a] = self.mdp_info.gamma * self._lambda\n+ self.e[s, a] *= self.mdp_info.gamma * self._lambda\n \n \n class SARSALambdaContinuous(TD):\n", "old_path": "mushroom/algorithms/value/td.py", "rewrite": "ReplaceText(target='*=' @(261,29)->(261,30))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "809c24e9b50202c6c06fbe6fc7e4b067894230c4", "diff": "@@ -161,7 +161,7 @@ class DoubleFQI(FQI):\n next_state = list()\n absorbing = list()\n \n- half = len(x) / 2\n+ half = len(x) // 2\n for i in range(2):\n s, a, r, ss, ab, _ = parse_dataset(x[i * half:(i + 1) * half])\n state.append(s)\n", "old_path": "mushroom/algorithms/value/batch_td.py", "rewrite": "ReplaceText(target='//' @(164,22)->(164,23))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "809c24e9b50202c6c06fbe6fc7e4b067894230c4", "diff": "@@ -186,7 +186,7 @@ class AveragedDQN(DQN):\n assert isinstance(self.target_approximator.model, Ensemble)\n \n def _update_target(self):\n- idx = self._n_updates / self._target_update_frequency\\\n+ idx = self._n_updates // self._target_update_frequency\\\n % self._n_approximators\n self.target_approximator.model[idx].set_weights(\n self.approximator.model.get_weights())\n", "old_path": "mushroom/algorithms/value/dqn.py", "rewrite": "ReplaceText(target='//' @(189,30)->(189,31))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "809c24e9b50202c6c06fbe6fc7e4b067894230c4", "diff": "@@ -108,7 +108,7 @@ def compute_probabilities(grid_map, cell_list, passenger_list, prob):\n passenger_states = cartesian([[0, 1]] * len(passenger_list))\n \n for i in range(n_states):\n- idx = i / len(cell_list)\n+ idx = i // len(cell_list)\n collected_passengers = np.array(\n passenger_list)[np.argwhere(passenger_states[idx] == 1).ravel()]\n state = c[i % len(cell_list)]\n", "old_path": "mushroom/environments/generators/taxi.py", "rewrite": "ReplaceText(target='//' @(111,16)->(111,17))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "809c24e9b50202c6c06fbe6fc7e4b067894230c4", "diff": "@@ -54,7 +54,7 @@ class AbstractGridWorld(Environment):\n \n @staticmethod\n def convert_to_grid(state, width):\n- return np.array([state[0] / width, state[0] % width])\n+ return np.array([state[0] // width, state[0] % width])\n \n @staticmethod\n def convert_to_int(state, width):\n", "old_path": "mushroom/environments/grid_world.py", "rewrite": "ReplaceText(target='//' @(57,34)->(57,35))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "809c24e9b50202c6c06fbe6fc7e4b067894230c4", "diff": "@@ -90,7 +90,7 @@ def experiment(alg):\n # evaluate initial policy\n pi.set_epsilon(epsilon_test)\n mdp.set_episode_end(ends_at_life=False)\n- for n_epoch in range(1, max_steps / evaluation_frequency + 1):\n+ for n_epoch in range(1, max_steps // evaluation_frequency + 1):\n # learning step\n pi.set_epsilon(epsilon)\n mdp.set_episode_end(ends_at_life=True)\n", "old_path": "tests/atari_dqn/atari_dqn.py", "rewrite": "ReplaceText(target='//' @(93,38)->(93,39))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "a3695d7feb30d5fbb277fb1e8a7e3711d84545a2", "diff": "@@ -294,7 +294,7 @@ def experiment():\n agent.policy.set_q(agent.approximator)\n \n np.save(folder_name + '/scores.npy', scores)\n- for n_epoch in range(1, max_steps / evaluation_frequency + 1):\n+ for n_epoch in range(1, max_steps // evaluation_frequency + 1):\n print_epoch(n_epoch)\n print('- Learning:')\n # learning step\n", "old_path": "examples/atari_dqn/atari_dqn.py", "rewrite": "ReplaceText(target='//' @(297,42)->(297,43))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "238a6a652a8ce6c7fb23eba48dd52a2bce343b92", "diff": "@@ -51,7 +51,7 @@ class DQN(Agent):\n self._batch_size = batch_size\n self._n_approximators = n_approximators\n self._clip_reward = clip_reward\n- self._target_update_frequency = target_update_frequency / train_frequency\n+ self._target_update_frequency = target_update_frequency // train_frequency\n self._max_no_op_actions = max_no_op_actions\n self._no_op_action_value = no_op_action_value\n \n", "old_path": "mushroom/algorithms/value/dqn.py", "rewrite": "ReplaceText(target='//' @(54,64)->(54,65))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "bdd275227ed4e37833414e33176bbe0585f02a8b", "diff": "@@ -180,7 +180,7 @@ class InvertedPendulumDiscrete(Environment):\n u = 0.\n else:\n u = self._max_u\n- action += np.random.uniform(-self._noise_u, self._noise_u)\n+ u += np.random.uniform(-self._noise_u, self._noise_u)\n new_state = odeint(self._dynamics, self._state, [0, self._dt],\n (u,))\n \n", "old_path": "mushroom/environments/inverted_pendulum.py", "rewrite": "ReplaceText(target='u' @(183,8)->(183,14))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "590aabe042c74f6d6be4b1b821ad35d9ae1a47f7", "diff": "@@ -232,7 +232,7 @@ class ReplayMemory(object):\n allows it to be used.\n \n \"\"\"\n- return self.size > self._initial_size\n+ return self.size >= self._initial_size\n \n @property\n def size(self):\n", "old_path": "mushroom/utils/replay_memory.py", "rewrite": "ReplaceText(target='>=' @(235,25)->(235,26))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "00f820f10d492257264eb0587aac92193ba65650", "diff": "@@ -78,7 +78,7 @@ def experiment(n_epochs, n_steps, n_steps_test):\n n_actions=mdp.info.action_space.n)\n \n # Agent\n- agent = DQN(TorchApproximator, pi, mdp.info,\n+ agent = DQN(mdp.info, pi, TorchApproximator,\n approximator_params=approximator_params, batch_size=batch_size,\n n_approximators=1, initial_replay_size=initial_replay_size,\n max_replay_size=max_replay_size,\n", "old_path": "examples/acrobot_dqn.py", "rewrite": "ArgSwap(idxs=0<->2 @(81,12)->(81,15))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "00f820f10d492257264eb0587aac92193ba65650", "diff": "@@ -37,7 +37,7 @@ def experiment():\n \n # Agent\n algorithm_params = dict(n_iterations=20)\n- agent = FQI(approximator, pi, mdp.info,\n+ agent = FQI(mdp.info, pi, approximator,\n approximator_params=approximator_params, **algorithm_params)\n \n # Algorithm\n", "old_path": "examples/car_on_hill_fqi.py", "rewrite": "ArgSwap(idxs=0<->2 @(40,12)->(40,15))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "00f820f10d492257264eb0587aac92193ba65650", "diff": "@@ -33,7 +33,7 @@ def experiment(algorithm_class, exp):\n # Agent\n learning_rate = ExponentialParameter(value=1., exp=exp, size=mdp.info.size)\n algorithm_params = dict(learning_rate=learning_rate)\n- agent = algorithm_class(pi, mdp.info, **algorithm_params)\n+ agent = algorithm_class(mdp.info, pi, **algorithm_params)\n \n # Algorithm\n collect_Q = CollectQ(agent.approximator)\n", "old_path": "examples/double_chain_q_learning/double_chain.py", "rewrite": "ArgSwap(idxs=0<->1 @(36,12)->(36,27))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "00f820f10d492257264eb0587aac92193ba65650", "diff": "@@ -38,7 +38,7 @@ def experiment(algorithm_class, exp):\n # Agent\n learning_rate = ExponentialParameter(value=1, exp=exp, size=mdp.info.size)\n algorithm_params = dict(learning_rate=learning_rate)\n- agent = algorithm_class(pi, mdp.info, **algorithm_params)\n+ agent = algorithm_class(mdp.info, pi, **algorithm_params)\n \n # Algorithm\n start = mdp.convert_to_int(mdp._start, mdp._width)\n", "old_path": "examples/grid_world_td.py", "rewrite": "ArgSwap(idxs=0<->1 @(41,12)->(41,27))"} -{"repo": "https://:@github.com/MushroomRL/mushroom-rl.git", "hash": "3644c74bf5069331dfd80f1b65e281460fefab21", "diff": "@@ -191,7 +191,7 @@ class TRPO(Agent):\n new_loss = self._compute_loss(obs, act, adv, old_log_prob)\n kl = self._compute_kl(obs, old_pol_dist)\n improve = new_loss - prev_loss\n- if kl <= self._max_kl * 1.5 or improve >= 0:\n+ if kl <= self._max_kl * 1.5 and improve >= 0:\n violation = False\n break\n stepsize *= .5\n", "old_path": "mushroom_rl/algorithms/actor_critic/deep_actor_critic/trpo.py", "rewrite": "ReplaceText(target='and' @(194,40)->(194,42))"} -{"repo": "https://:@github.com/ska-sa/katsdpimager.git", "hash": "9606d1eefd02b2fe7039fe09e6bf7647d0b6c30b", "diff": "@@ -20,7 +20,7 @@ def parse_quantity(str_value):\n \"\"\"Parse a string into an astropy Quantity. Rather than trying to guess\n where the split occurs, we try every position from the back until we\n succeed.\"\"\"\n- for i in range(len(str_value), -1, 0):\n+ for i in range(len(str_value), 0, -1):\n try:\n value = float(str_value[:i])\n unit = units.Unit(str_value[i:])\n", "old_path": "scripts/imager.py", "rewrite": "ArgSwap(idxs=1<->2 @(23,13)->(23,18))"} -{"repo": "https://:@github.com/ska-sa/katsdpimager.git", "hash": "87edf0d372e8b40702cc72cc96c07ddb62fe19cc", "diff": "@@ -479,7 +479,7 @@ class Weights(accel.OperationSequence):\n self.ensure_all_bound()\n # If self._fill is set, it is not necessary to clear first because\n # finalize will set all relevant values.\n- if self._fill is not None:\n+ if self._fill is None:\n self.buffer('grid').zero(self.command_queue)\n \n def grid(self, uv, weights):\n", "old_path": "katsdpimager/weight.py", "rewrite": "ReplaceText(target=' is ' @(482,21)->(482,29))"} -{"repo": "https://:@github.com/ska-sa/katsdpimager.git", "hash": "c1790fa1bf597a5fb592ee05ff7205b17fbcc85e", "diff": "@@ -134,7 +134,7 @@ class Image(object):\n # TODO: should use the WCS transformation\n slices[i - 3] = 'IQUV'.find(stokes)\n elif axis_type == 'VOPT':\n- slices[i - 3] = channel\n+ slices[i - 3] = rel_channel\n self._render_thumb(output_dir, filename, slices, mode, stokes, channel)\n self._render_full(output_dir, filename, slices, mode, stokes, channel)\n \n", "old_path": "tests/images_report.py", "rewrite": "ReplaceText(target='rel_channel' @(137,36)->(137,43))"} -{"repo": "https://:@github.com/gdoumenc/coworks.git", "hash": "4a24754388adcf2fb8b878fb6a97cce8bf443e55", "diff": "@@ -53,7 +53,7 @@ def invoke(initial, ctx):\n handler = get_handler(project_dir, module, service)\n cmd = project_config.get_command(handler, module, service, workspace)\n if not cmd:\n- raise CwsClientError(f\"Undefined command {cmd}.\\n\")\n+ raise CwsClientError(f\"Undefined command {cmd_name}.\\n\")\n \n # Defines the proxy command with all user options\n def call_execute(**command_options):\n", "old_path": "coworks/cws/client.py", "rewrite": "ReplaceText(target='cmd_name' @(56,58)->(56,61))"} -{"repo": "https://:@github.com/geokrety/geokrety-api.git", "hash": "402a0659cc311fcb296865db0a8303130cb85f92", "diff": "@@ -9,5 +9,5 @@ def dasherize(text):\n def require_relationship(resource_list, data):\n for resource in resource_list:\n if resource not in data:\n- raise UnprocessableEntity({'pointer': '/data/relationships/{}'.format(resource)},\n- \"A valid relationship with {} resource is required\".format(resource))\n+ raise UnprocessableEntity(\"A valid relationship with {} resource is required\".format(resource),\n+ {'pointer': '/data/relationships/{}'.format(resource)})\n", "old_path": "app/api/helpers/utilities.py", "rewrite": "ArgSwap(idxs=0<->1 @(12,18)->(12,37))"} -{"repo": "https://:@github.com/troylar/mike-brady.git", "hash": "51ac87ab42555fcea332280f21425fd0398ad22a", "diff": "@@ -43,7 +43,7 @@ def render_templates(target_path, replace_values, file_types):\n template = env.get_template(f)\n rendered = template.render(replace_values)\n with open(full_path, \"w\") as fh:\n- print('Writing {}'.format(f))\n+ print('Writing {}'.format(full_path))\n fh.write(rendered)\n \n \n", "old_path": "src/main.py", "rewrite": "ReplaceText(target='full_path' @(46,42)->(46,43))"} -{"repo": "https://:@github.com/timwhite/greg.git", "hash": "0a729af52a7ca3d66cefa89513f97fb5cd932b8e", "diff": "@@ -756,7 +756,7 @@ def sync(args):\n feed.fix_linkdate(entry)\n # Sort entries_to_download, but only if you want to download as\n # many as there are\n- if stop < len(entries_to_download):\n+ if stop >= len(entries_to_download):\n entries_to_download.sort(key=operator.attrgetter(\"linkdate\"),\n reverse=False)\n for entry in entries_to_download:\n", "old_path": "greg/greg.py", "rewrite": "ReplaceText(target='>=' @(759,20)->(759,21))"} -{"repo": "https://:@github.com/yeago/question-stack.git", "hash": "71958e8a2745787aacd5bf8b07867a4710b2bb4b", "diff": "@@ -61,7 +61,7 @@ def accepted_answer(request,slug,comment):\n \tif not instance == comment.content_object:\n \t\traise Http404\n \n-\tif not request.user.has_perm('stack.change_question') or not request.user == instance.comment.user:\n+\tif not request.user.has_perm('stack.change_question') and not request.user == instance.comment.user:\n \t\traise Http404\n \n \tif instance.accepted_answer:\n", "old_path": "views.py", "rewrite": "ReplaceText(target='and' @(64,55)->(64,57))"} -{"repo": "https://:@github.com/jtbish/piecewise.git", "hash": "5f227f50d16d04d756045804b21ca5bd18c83597", "diff": "@@ -14,7 +14,7 @@ class FuzzyXCSFLinearPredictionCreditAssignment:\n ]\n total_matching_degrees = sum(matching_degrees)\n assert total_matching_degrees > 0.0\n- for (classifier, matching_degree) in zip(matching_degrees, action_set):\n+ for (classifier, matching_degree) in zip(action_set, matching_degrees):\n credit_weight = (matching_degree / total_matching_degrees)\n self._update_experience(classifier, credit_weight)\n payoff_diff = payoff - classifier.get_prediction(situation)\n", "old_path": "piecewise/fuzzy/credit_assignment.py", "rewrite": "ArgSwap(idxs=0<->1 @(17,45)->(17,48))"} -{"repo": "https://:@github.com/Clinical-Genomics/cg.git", "hash": "f65fa404f3761f726a5bd32e3794e3c3d6771a26", "diff": "@@ -110,7 +110,7 @@ def update(context, answered_out, case_id):\n if delivery_date is None:\n log.warn(\"sample not delivered: %s\", hk_sample.lims_id)\n context.abort()\n- delivery_dates.append(delivery_dates)\n+ delivery_dates.append(delivery_date)\n latest_date = sorted(delivery_dates)[-1]\n log.debug(\"fillin answered out date in HK\")\n hk_run.answeredout_at = datetime.combine(latest_date, datetime.min.time())\n", "old_path": "cg/commands.py", "rewrite": "ReplaceText(target='delivery_date' @(113,34)->(113,48))"} -{"repo": "https://:@github.com/Clinical-Genomics/cg.git", "hash": "a9c45156e08953c30b15eccd7431e76ce0809ac3", "diff": "@@ -174,7 +174,7 @@ def start(lims_api, customer_id, family_name):\n log.debug(\"%s has status %s\", sample.sample_id, sample_status)\n statuses.add(sample_status)\n \n- if len(is_externals) == 0:\n+ if len(is_externals) == 1:\n data = dict(is_external=is_externals.pop())\n else:\n # mix of internal and external samples\n", "old_path": "cg/apps/lims.py", "rewrite": "ReplaceText(target='1' @(177,28)->(177,29))"} -{"repo": "https://:@github.com/Clinical-Genomics/cg.git", "hash": "ea94c447cec22ba9e9a5febcf78f1816f0b2de5d", "diff": "@@ -90,7 +90,7 @@ def family(context: click.Context, customer: str, name: bool, samples: bool,\n families.append(family_obj)\n \n for family_obj in families:\n- LOG.debug(f\"{family_id.internal_id}: get info about family\")\n+ LOG.debug(f\"{family_obj.internal_id}: get info about family\")\n row = [\n family_obj.internal_id,\n family_obj.name,\n", "old_path": "cg/cli/get.py", "rewrite": "ReplaceText(target='family_obj' @(93,21)->(93,30))"} -{"repo": "https://:@github.com/Clinical-Genomics/cg.git", "hash": "097837f7aeded32f7792fd77ede05c006732e06b", "diff": "@@ -18,7 +18,7 @@ class BackupApi():\n \"\"\"Check if there's too many flowcells already \"ondisk\".\"\"\"\n ondisk_flowcells = self.status.flowcells(status='ondisk').count()\n LOG.debug(f\"ondisk flowcells: {ondisk_flowcells}\")\n- return ondisk_flowcells < max_flowcells\n+ return ondisk_flowcells > max_flowcells\n \n def check_processing(self, max_flowcells: int=3) -> bool:\n \"\"\"Check if the processing queue for flowcells is not full.\"\"\"\n", "old_path": "cg/meta/backup.py", "rewrite": "ReplaceText(target='>' @(21,32)->(21,33))"} -{"repo": "https://:@github.com/codesyntax/Products.Bitakora.git", "hash": "c9af30f2114b45151a57d527b6d87150d17ec226", "diff": "@@ -23,7 +23,7 @@ __version__ = \"$Revision$\"\n def manage_addComment(self, author, body, url='', email='', date=None, bitakora_cpt='', random_cpt='', captcha_zz=0, REQUEST=None):\n \"\"\" Called from HTML form when commenting \"\"\"\n from utils import checkCaptchaValue, isCommentSpam\n- if not captcha_zz:\n+ if captcha_zz:\n if not checkCaptchaValue(random_cpt, bitakora_cpt):\n if REQUEST is not None:\n return REQUEST.RESPONSE.redirect(self.absolute_url()+u'?msg=%s&body=%s&comment_author=%s&comment_email=%s&comment_url=%s#bitakora_cpt_control' % (self.gettext('Are you a bot? Please try again...'), url_quote(body.encode('utf-8')), url_quote(author.encode('utf-8')), url_quote(email.encode('utf-8')), url_quote(url.encode('utf-8'))))\n", "old_path": "Comment.py", "rewrite": "ReplaceText(target='' @(26,7)->(26,11))"} -{"repo": "https://:@gitlab.com/saltspiro/spiro-deploy.git", "hash": "660c01a080bb7c82a593146ca85c3d04f237881a", "diff": "@@ -112,7 +112,7 @@ def main(argv=sys.argv[1:]):\n print(event, pprint.pformat(data), flush=True)\n \n if event == 'highstate-start':\n- minions += set(data['minions'])\n+ minions |= set(data['minions'])\n elif event == 'highstate':\n minions.discard(data['minion'])\n \n", "old_path": "spirodeploy/cli.py", "rewrite": "ReplaceText(target='|=' @(115,20)->(115,22))"} -{"repo": "https://:@github.com/ymoch/preacher.git", "hash": "5b49e834eb2c9ea03ba9619b9fb0cb2120ff68a7", "diff": "@@ -142,7 +142,7 @@ class Case:\n \n response_verification = self._response.verify(\n response,\n- ValueContext(origin_datetime=response.starts),\n+ ValueContext(origin_datetime=execution.starts),\n )\n return CaseResult(\n label=self._label,\n", "old_path": "preacher/core/scenario/case.py", "rewrite": "ReplaceText(target='execution' @(145,41)->(145,49))"} -{"repo": "https://:@gitlab.com/socco/GliderTools.git", "hash": "c0a6ae0924dabda3ddd6c03947a4038554e90eb1", "diff": "@@ -468,7 +468,7 @@ def savitzky_golay(arr, window_size, order, deriv=0, rate=1, interpolate=True):\n \n # allow to interpolate for half the window size\n if interpolate:\n- ser = Series(arr).interpolate(limit=half_window)\n+ ser = Series(arr).interpolate(limit=window_size)\n y = array(ser)\n else:\n y = array(arr)\n", "old_path": "buoyancy_glider_utils/cleaning.py", "rewrite": "ReplaceText(target='window_size' @(471,44)->(471,55))"} -{"repo": "https://:@github.com/hattya/scmver.git", "hash": "9fc6568b7fc7814e4659e4140da9ffcfe69321ca", "diff": "@@ -95,7 +95,7 @@ def _is_wc_root(root, info):\n p = os.path.dirname(root)\n return (p == root\n or not os.path.isdir(os.path.join(p, '.svn'))\n- or _info(p).get('Repository UUID') == info['Repository UUID'])\n+ or _info(p).get('Repository UUID') != info['Repository UUID'])\n return False\n \n \n", "old_path": "scmver/subversion.py", "rewrite": "ReplaceText(target='!=' @(98,51)->(98,53))"} -{"repo": "https://:@github.com/h0m3/python-mprint.git", "hash": "782bec1d992d0ee19c8f0128d83ad4b9069bee3f", "diff": "@@ -82,7 +82,7 @@ def markup(string):\n )\n newString += string.split(\">\", 1)[1]\n string = newString\n- return newString\n+ return string\n \n \n # Print markup characters to screen\n", "old_path": "mprint/mprint.py", "rewrite": "ReplaceText(target='string' @(85,11)->(85,20))"} -{"repo": "https://:@github.com/brettviren/worch.git", "hash": "7941cffa22b2e9933e57139329e3c9d9cf555623", "diff": "@@ -31,7 +31,7 @@ def feature_command(tgen):\n cmd_dir = tgen.make_node(tgen.worch.command_dir)\n cmd_node = cmd_dir.make_node(tgen.worch.command_cmd)\n cmd_target = \\\n- map(cmd_dir.make_node, tgen.to_list(tgen.worch.command_target))\n+ map(tgen.make_node, tgen.to_list(tgen.worch.command_target))\n cmd_rule = '{command_cmd_prefix}{command_cmd} {command_cmd_options} {command_cmd_postfix}'\n tgen.step('command',\n rule = tgen.worch.format(cmd_rule),\n", "old_path": "orch/features/feature_command.py", "rewrite": "ReplaceText(target='tgen' @(34,12)->(34,19))"} -{"repo": "https://:@github.com/slipguru/icing.git", "hash": "a292074640464c3c407850db151595153d28cf0f", "diff": "@@ -109,7 +109,7 @@ def sim_function(ig1, ig2, method='jaccard', model='ham',\n correction = correction_function(max(ig1.mut, ig2.mut))\n # ss = 1 - ((1 - ss) * max(correction, 0))\n # ss = 1 - ((1 - ss) * correction)\n- ss *= correction\n+ ss += correction\n # return min(max(ss, 0), 1)\n return max(ss, 0)\n \n", "old_path": "icing/core/cloning.py", "rewrite": "ReplaceText(target='+=' @(112,11)->(112,13))"} -{"repo": "https://:@github.com/slipguru/icing.git", "hash": "7179403bf32d1f649ef7ea63a060ecd4ffb5a9e6", "diff": "@@ -109,7 +109,7 @@ def sim_function(ig1, ig2, method='jaccard', model='ham',\n correction = correction_function(max(ig1.mut, ig2.mut))\n # ss = 1 - ((1 - ss) * max(correction, 0))\n # ss = 1 - ((1 - ss) * correction)\n- ss += (1. - correction)\n+ ss *= (1. - correction)\n # return min(max(ss, 0), 1)\n return max(ss, 0)\n \n", "old_path": "icing/core/cloning.py", "rewrite": "ReplaceText(target='*=' @(112,11)->(112,13))"} -{"repo": "https://:@github.com/jojoduquartier/dsdbmanager.git", "hash": "d074b1099d1bb9b729760d42e36aaae1944c64c7", "diff": "@@ -246,7 +246,7 @@ class DbMiddleware(object):\n def __init__(self, engine, connect_only, schema):\n self.engine = engine\n \n- if connect_only:\n+ if not connect_only:\n inspection = reflection.Inspector.from_engine(self.engine)\n views = inspection.get_view_names(schema=schema)\n tables = inspection.get_table_names(schema=schema)\n", "old_path": "dsdbmanager/dbobject.py", "rewrite": "ReplaceText(target='not ' @(249,11)->(249,11))"} -{"repo": "https://:@gitlab.com/HartkopfF/Purple.git", "hash": "d8b25ebbe423fb005169913d63410713eb5a49ec", "diff": "@@ -414,7 +414,7 @@ def print_result(peps, print_peps,threshold):\n # prints flagged peptides in console, if print_peps == True\r\n # peptides are flagged, if they are greater than the average of all positive scores\r\n scores = list(peps.values())\r\n- scores_in_tens = [int(round(i, -1)) if i >= threshold else -1 for i in scores] # only round positiv scores\r\n+ scores_in_tens = [int(round(i, -1)) if i <= threshold else -1 for i in scores] # only round positiv scores\r\n freq_scores = {x: scores_in_tens.count(x) for x in scores_in_tens} # Dictionary Comprehension\r\n \r\n if print_peps == 1:\r\n", "old_path": "src/Purple_methods.py", "rewrite": "ReplaceText(target='<=' @(417,45)->(417,47))"} -{"repo": "https://:@github.com/bjoernricks/python-quilt.git", "hash": "2a4e97b554669b95bb1d22f220ac2d7ba6df9012", "diff": "@@ -46,7 +46,7 @@ class Import(Command):\n \"\"\" Import patch into the patch queue\n The patch is inserted after the current top applied patch\n \"\"\"\n- if not new_name:\n+ if new_name:\n dir_name = os.path.dirname(new_name)\n name = os.path.basename(new_name)\n dest_dir = self.quilt_patches + Directory(dir_name)\n", "old_path": "quilt/patchimport.py", "rewrite": "ReplaceText(target='' @(49,11)->(49,15))"} -{"repo": "https://:@github.com/bjoernricks/python-quilt.git", "hash": "1c2a80d50b73cf182574c0e1f0d7aa5b6ab91631", "diff": "@@ -93,7 +93,7 @@ class Push(Command):\n applied = self.db.applied_patches()\n for patch in applied:\n if patch in patches:\n- patches.remove(applied)\n+ patches.remove(patch)\n \n if not patches:\n raise AllPatchesApplied(self.series, self.db.top_patch())\n", "old_path": "quilt/push.py", "rewrite": "ReplaceText(target='patch' @(96,31)->(96,38))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "7d201f06333b185a25a5d77df7a01d08790655cb", "diff": "@@ -69,7 +69,7 @@ def test_a_verifier_saves_any_failing_examples_in_its_database():\n def test_a_verifier_retrieves_previous_failing_examples_from_the_database():\n database = ExampleDatabase()\n verifier = Verifier(settings=hs.Settings(database=database))\n- verifier.falsify(lambda x: x != 11, int)\n+ verifier.falsify(lambda x: x < 11, int)\n called = []\n \n def save_calls(t):\n", "old_path": "tests/test_database.py", "rewrite": "ReplaceText(target='<' @(72,33)->(72,35))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "b5a59b2e474f1f2bcff898aeeba9cc3ca2e5d186", "diff": "@@ -89,7 +89,7 @@ class TestRunner(object):\n raise RunIsComplete()\n self.examples_considered += 1\n if (\n- buffer[:self.last_data.index] ==\n+ buffer[:self.last_data.index] >=\n self.last_data.buffer[:self.last_data.index]\n ):\n return False\n", "old_path": "src/hypothesis/internal/conjecture/engine.py", "rewrite": "ReplaceText(target='>=' @(92,42)->(92,44))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "5f990a2d351ad02ac698375428c54c86b907f505", "diff": "@@ -686,7 +686,7 @@ def characters(whitelist_categories=None, blacklist_categories=None,\n if (\n whitelist_characters is not None and\n blacklist_characters is not None and\n- set(whitelist_characters).intersection(set(whitelist_characters))\n+ set(blacklist_characters).intersection(set(whitelist_characters))\n ):\n raise InvalidArgument(\n 'Cannot have characters in both whitelist_characters=%r, '\n", "old_path": "src/hypothesis/strategies.py", "rewrite": "ReplaceText(target='blacklist_characters' @(689,12)->(689,32))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "5bd4086b1be92933cef2bb61f98770df1114ed7a", "diff": "@@ -691,7 +691,7 @@ def characters(whitelist_categories=None, blacklist_categories=None,\n raise InvalidArgument(\n 'Cannot have characters in both whitelist_characters=%r, '\n 'and blacklist_characters=%r' % (\n- whitelist_characters, blacklist_categories,\n+ whitelist_characters, blacklist_characters,\n )\n )\n \n", "old_path": "src/hypothesis/strategies.py", "rewrite": "ReplaceText(target='blacklist_characters' @(694,38)->(694,58))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "a10d8cf98473dbdaedf1d317c8ad2d51b38699fe", "diff": "@@ -30,7 +30,7 @@ if __name__ == '__main__':\n \n if (\n os.environ['CIRCLE_BRANCH'] != 'master' and \n- os.environ['CI_PULL_REQUEST'] != ''\n+ os.environ['CI_PULL_REQUEST'] == ''\n ):\n print('We only run CI builds on the master branch or in pull requests')\n sys.exit(0)\n", "old_path": "scripts/run_circle.py", "rewrite": "ReplaceText(target='==' @(33,38)->(33,40))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "8f9b8211e5c7b3d6e791bc9203e12b494eba9d64", "diff": "@@ -1119,7 +1119,7 @@ def find(specifier, condition, settings=None, random=None, database_key=None):\n if success:\n successful_examples[0] += 1\n \n- if settings.verbosity == Verbosity.verbose:\n+ if settings.verbosity >= Verbosity.verbose:\n if not successful_examples[0]:\n report(\n u'Tried non-satisfying example %s' % (nicerepr(result),))\n", "old_path": "hypothesis-python/src/hypothesis/core.py", "rewrite": "ReplaceText(target='>=' @(1122,30)->(1122,32))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "8a912d3d94dbd45ada80476bfbf11eea334ec48d", "diff": "@@ -119,7 +119,7 @@ def assert_can_release():\n \n \n def has_travis_secrets():\n- return os.environ.get('TRAVIS_SECURE_ENV_VARS', None) != 'true'\n+ return os.environ.get('TRAVIS_SECURE_ENV_VARS', None) == 'true'\n \n \n def build_jobs():\n", "old_path": "tooling/src/hypothesistooling/__init__.py", "rewrite": "ReplaceText(target='==' @(122,58)->(122,60))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "3dba57307b412696b30f86eb7d0fdb189421b5c7", "diff": "@@ -2209,7 +2209,7 @@ class Shrinker(object):\n u, v = self.blocks[i]\n b = int_from_bytes(self.shrink_target.buffer[u:v])\n lowered = b - offset\n- if lowered <= 0:\n+ if lowered < 0:\n continue\n attempt = bytearray(self.shrink_target.buffer)\n attempt[u:v] = int_to_bytes(lowered, v - u)\n", "old_path": "hypothesis-python/src/hypothesis/internal/conjecture/engine.py", "rewrite": "ReplaceText(target='<' @(2212,27)->(2212,29))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "a55eeda06ec2650b446a3ef0885a4f765d0c5513", "diff": "@@ -317,7 +317,7 @@ class settings(\n bits = []\n for name, setting in all_settings.items():\n value = getattr(self, name)\n- if value != setting.default or not setting.hide_repr:\n+ if value != setting.default and not setting.hide_repr:\n bits.append('%s=%r' % (name, value))\n return 'settings(%s)' % ', '.join(sorted(bits))\n \n", "old_path": "hypothesis-python/src/hypothesis/_settings.py", "rewrite": "ReplaceText(target='and' @(320,40)->(320,42))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "feaa70b9ee7e4659bb31bcbd0bd6077c179516bf", "diff": "@@ -439,7 +439,7 @@ class StepCounter(RuleBasedStateMachine):\n self.step_count += 1\n \n def teardown(self):\n- assert self.step_count == settings_step_count\n+ assert self.step_count <= settings_step_count\n \n \n test_settings_decorator_applies_to_rule_based_state_machine_class = \\\n", "old_path": "hypothesis-python/tests/cover/test_settings.py", "rewrite": "ReplaceText(target='<=' @(442,31)->(442,33))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "012cdca96f6f3887bc5a93f5a1efaf4f58cde27d", "diff": "@@ -656,7 +656,7 @@ def sampled_from(elements):\n return sets(sampled_from(values), min_size=1).map(\n lambda s: reduce(operator.or_, s)\n )\n- return SampledFromStrategy(values)\n+ return SampledFromStrategy(elements)\n \n \n @cacheable\n", "old_path": "hypothesis-python/src/hypothesis/strategies/_internal/core.py", "rewrite": "ReplaceText(target='elements' @(659,31)->(659,37))"} -{"repo": "https://:@github.com/HypothesisWorks/hypothesis-python.git", "hash": "a9c5902f94250156d80baff42da96e9d08778d26", "diff": "@@ -1842,7 +1842,7 @@ def complex_numbers(\n # Order of conditions carefully tuned so that for a given pair of\n # magnitude arguments, we always either draw or do not draw the bool\n # (crucial for good shrinking behaviour) but only invert when needed.\n- if min_magnitude != 0 and draw(booleans()) and math.fabs(zi) <= min_magnitude:\n+ if min_magnitude > 0 and draw(booleans()) and math.fabs(zi) <= min_magnitude:\n zr = -zr\n return complex(zr, zi)\n \n", "old_path": "hypothesis-python/src/hypothesis/strategies/_internal/core.py", "rewrite": "ReplaceText(target='>' @(1845,25)->(1845,27))"} -{"repo": "https://:@github.com/pyfa-org/eos.git", "hash": "4a87a594d189c71e916538d04026dc470cc12313", "diff": "@@ -418,7 +418,7 @@ class InfoBuilder:\n # Negate condition for else clause processing\n # We do not need to recombine it with conditions passed to our method,\n # as condition being reverted is part of combined tree\n- self.__invertCondition(currentConditions)\n+ self.__invertCondition(newConditions)\n self.__generic(elseClause, deepcopy(currentConditions))\n \n def __makeConditionRouter(self, element):\n", "old_path": "data/effect/builder/builder.py", "rewrite": "ReplaceText(target='newConditions' @(421,31)->(421,48))"} -{"repo": "https://:@github.com/pyfa-org/eos.git", "hash": "23c14ff52c9ab1a52ca35887ca043680046dcaf7", "diff": "@@ -38,7 +38,7 @@ class TestSkillUniqueness(RestrictionTestCase):\n restrictionError1 = fit.getRestrictionError(skill1, Restriction.skillUniqueness)\n self.assertIsNotNone(restrictionError1)\n self.assertEqual(restrictionError1.skill, 56)\n- restrictionError2 = fit.getRestrictionError(skill1, Restriction.skillUniqueness)\n+ restrictionError2 = fit.getRestrictionError(skill2, Restriction.skillUniqueness)\n self.assertIsNotNone(restrictionError2)\n self.assertEqual(restrictionError2.skill, 56)\n fit.items.remove(skill1)\n", "old_path": "tests/restrictionTracker/restrictions/testSkillUniqueness.py", "rewrite": "ReplaceText(target='skill2' @(41,52)->(41,58))"} -{"repo": "https://:@github.com/pyfa-org/eos.git", "hash": "ec16898d0f6e700159a14af551196f3d7e31aa43", "diff": "@@ -52,7 +52,7 @@ class SlotIndexRegister(RestrictionRegister):\n def registerHolder(self, holder):\n # Skip items which don't have index specifier\n slotIndex = holder.item.attributes.get(self.__slotIndexAttr)\n- if slotIndex is not None:\n+ if slotIndex is None:\n return\n self.__slottedHolders.addData(slotIndex, holder)\n \n", "old_path": "fit/restrictionTracker/restriction/slotIndex.py", "rewrite": "ReplaceText(target=' is ' @(55,20)->(55,28))"} -{"repo": "https://:@github.com/pyfa-org/eos.git", "hash": "e8ea4b04ff260c186d55ece03df22dbd6aa509e9", "diff": "@@ -61,7 +61,7 @@ class ResourceRegister(RestrictionRegister):\n # Can be None, so fall back to 0 in this case\n output = stats.output or 0\n # If we're not out of resource, do nothing\n- if totalUse > output:\n+ if totalUse <= output:\n return\n taintedHolders = {}\n for holder in self.__resourceUsers:\n", "old_path": "fit/restrictionTracker/restriction/resource.py", "rewrite": "ReplaceText(target='<=' @(64,20)->(64,21))"} -{"repo": "https://:@github.com/pyfa-org/eos.git", "hash": "700a4414cab25efe4e306e64c9cee28250f7363a", "diff": "@@ -151,7 +151,7 @@ class MsgHelper:\n # Unapply effects from targets\n tgt_getter = getattr(item, '_get_effects_tgts', None)\n if tgt_getter:\n- effects_tgts = tgt_getter(start_ids)\n+ effects_tgts = tgt_getter(stop_ids)\n for effect_id, tgt_items in effects_tgts.items():\n msgs.append(EffectUnapplied(item, effect_id, tgt_items))\n # Stop effects\n", "old_path": "eos/pubsub/message/helper.py", "rewrite": "ReplaceText(target='stop_ids' @(154,42)->(154,51))"} -{"repo": "https://:@github.com/Hasenpfote/fpq.git", "hash": "8220505c7830967477a5502c061d9efd91d66ae8", "diff": "@@ -58,7 +58,7 @@ def encode_fp_to_snorm(x, *, dtype=np.uint8, nbits=None):\n if nbits is None:\n nbits = max_nbits\n assert (0 < nbits <= max_nbits), '`nbits` value is out of range.'\n- mask = np.invert(dtype(np.iinfo(nbits).max) << dtype(nbits))\n+ mask = np.invert(dtype(np.iinfo(dtype).max) << dtype(nbits))\n return dtype(np.around(x * x.dtype.type((1 << (nbits-1)) - 1))) & mask\n \n def decode_snorm_to_fp(x, *, dtype=np.float32, nbits=None):\n", "old_path": "fpq/d3d.py", "rewrite": "ReplaceText(target='dtype' @(61,36)->(61,41))"} -{"repo": "https://:@github.com/theodo/flask-restful.git", "hash": "4dfe49f1de3dfd9598b4ae92b9e6b6644fa999f7", "diff": "@@ -338,7 +338,7 @@ class APITestCase(unittest.TestCase):\n def record(sender, exception):\n recorded.append(exception)\n \n- got_request_exception.connect(record, api)\n+ got_request_exception.connect(record, app)\n try:\n with app.test_request_context(\"/foo\"):\n api.handle_error(exception)\n", "old_path": "tests/test_api.py", "rewrite": "ReplaceText(target='app' @(341,46)->(341,49))"} -{"repo": "https://:@github.com/askholme/django_minifiedstorage.git", "hash": "0f7821618021d7fb4497a0ddd4312fbbc4e41262", "diff": "@@ -45,7 +45,7 @@ class MinifiedManifestStaticFilesStorage(ManifestStaticFilesStorage):\n # save gziped file as fell, we overwrite the content_file variable to save a tiny bit memory\n try:\n content = zlib_compress(content)\n- super(MinifiedManifestStaticFilesStorage, self)._save(\"%s.gz\" % hashed_name,ContentFile(content))\n+ super(MinifiedManifestStaticFilesStorage, self)._save(\"%s.gz\" % saved_name,ContentFile(content))\n except Exception as e:\n raise MinifiedStorageException(\"Could not gzip file %s, error: %s\" % (hashed_name,e,))\n return saved_name\n\\ No newline at end of file\n", "old_path": "minifiedstorage/storages.py", "rewrite": "ReplaceText(target='saved_name' @(48,80)->(48,91))"} -{"repo": "https://:@github.com/SiLab-Bonn/pymosa.git", "hash": "07741f8afef86a85bf61c13aa8733f6f211195ae", "diff": "@@ -133,7 +133,7 @@ class TluTuning(m26):\n \r\n # Determine best delay setting (center of working delay settings)\r\n good_indices = np.where(np.logical_and(data_array['error_rate'][:-1] == 0, np.diff(data_array['error_rate']) == 0))[0]\r\n- best_index = good_indices[good_indices.shape[0] / 2]\r\n+ best_index = good_indices[good_indices.shape[0] // 2]\r\n best_delay_setting = data_array['TRIGGER_DATA_DELAY'][best_index]\r\n logging.info('The best delay setting for this setup is %d', best_delay_setting)\r\n \r\n", "old_path": "pymosa/tune_tlu.py", "rewrite": "ReplaceText(target='//' @(136,68)->(136,69))"} -{"repo": "https://:@github.com/dripton/Slugathon.git", "hash": "641fc1e43403827b046dc1fe69cb6da162d9a83c", "diff": "@@ -70,7 +70,7 @@ class Marker(object):\n label = str(self.height)\n text_width, text_height = draw.textsize(label, font=font)\n x = 0.65 * leng - 0.5 * text_width\n- y = 0.55 * leng - 0.5 * text_width\n+ y = 0.55 * leng - 0.5 * text_height\n draw.rectangle(((x + 0.1 * text_width, y + 0.1 * text_height), \n (x + 0.9 * text_width, y + 0.9 * text_height)), fill=white)\n draw.text((x, y), label, fill=black, font=font)\n", "old_path": "slugathon/Marker.py", "rewrite": "ReplaceText(target='text_height' @(73,32)->(73,42))"} -{"repo": "https://:@github.com/dripton/Slugathon.git", "hash": "d6957007cf4968b383c258c9894eb638fedb290a", "diff": "@@ -265,7 +265,7 @@ class Creature(object):\n skill1 -= 1\n elif border == \"Wall\":\n skill1 += 1\n- elif border2 == \"Slope\" and not self.is_native(border):\n+ elif border2 == \"Slope\" and not self.is_native(border2):\n skill1 -= 1\n elif border2 == \"Wall\":\n skill1 -= 1\n", "old_path": "slugathon/Creature.py", "rewrite": "ReplaceText(target='border2' @(268,59)->(268,65))"} -{"repo": "https://:@github.com/dripton/Slugathon.git", "hash": "f2bfd2d2c6429dfaa37c5844a52e13124690df13", "diff": "@@ -238,7 +238,7 @@ class Creature(object):\n elif border == \"Dune\" and self.is_native(border):\n dice += 2\n border2 = hex1.opposite_border(hexside)\n- if border2 == \"Dune\" and not self.is_native(border):\n+ if border2 == \"Dune\" and not self.is_native(border2):\n dice -= 1\n elif target in self.rangestrike_targets:\n dice = int(self.power / 2)\n", "old_path": "slugathon/Creature.py", "rewrite": "ReplaceText(target='border2' @(241,56)->(241,62))"} -{"repo": "https://:@github.com/dripton/Slugathon.git", "hash": "b971ac13adfde83f63ff75be45cc6851d769b86e", "diff": "@@ -267,7 +267,7 @@ class CleverBot(DimBot.DimBot):\n max_mean_hits = max(mean_hits, max_mean_hits)\n \n # Don't encourage titans to charge early.\n- if creature.name != \"Titan\" or game.battle_turn > 4:\n+ if creature.name != \"Titan\" or game.battle_turn >= 4:\n score += HIT_BONUS * max_mean_hits\n score += KILL_BONUS * probable_kill\n score -= DAMAGE_PENALTY * total_mean_damage_taken\n", "old_path": "slugathon/ai/CleverBot.py", "rewrite": "ReplaceText(target='>=' @(270,60)->(270,61))"} -{"repo": "https://:@github.com/dripton/Slugathon.git", "hash": "13e968722e4cf18f662d5405ee3bc895929300ec", "diff": "@@ -173,7 +173,7 @@ class GUIBattleHex(object):\n if not os.path.exists(border_path):\n sliceborder.slice_border_image(image_path, border_path,\n hexsides)\n- input_surface = cairo.ImageSurface.create_from_png(image_path)\n+ input_surface = cairo.ImageSurface.create_from_png(border_path)\n input_width = input_surface.get_width()\n input_height = input_surface.get_height()\n output_width = myboxsize[0]\n", "old_path": "slugathon/gui/GUIBattleHex.py", "rewrite": "ReplaceText(target='border_path' @(176,67)->(176,77))"} -{"repo": "https://:@bitbucket.org/fchampalimaud/pythonvideoannotator-models.git", "hash": "cde08126d01f0e218cf5450cc39caa1bdeb689b6", "diff": "@@ -47,4 +47,4 @@ class Object2dIO(Object2dBase):\n \t\t\t\tfunc = getattr(self, dataset_conf['factory-function'])\n \t\t\t\tdataset = func()\n \t\t\t\tdataset.name = name\n-\t\t\t\tdataset.load(data, dataset_path)\n\\ No newline at end of file\n+\t\t\t\tdataset.load(dataset_conf, dataset_path)\n\\ No newline at end of file\n", "old_path": "pythonvideoannotator_models/models/video/objects/object2d/object2d_io.py", "rewrite": "ReplaceText(target='dataset_conf' @(50,17)->(50,21))"} -{"repo": "https://:@bitbucket.org/fchampalimaud/pythonvideoannotator-models.git", "hash": "b567c052b952ce719e2974564f8b6cefb1a1a753", "diff": "@@ -64,7 +64,7 @@ class PathBase(Dataset):\n \n \tdef interpolate_range(self, begin, end, interpolation_mode=None):\n \t\tpositions = [[i, self.get_position(i)] for i in range(begin, end+1) if self.get_position(i) is not None]\n-\t\tif len(positions)>2:\n+\t\tif len(positions)>=2:\n \t\t\tpositions = interpolate_positions(positions, begin, end, interpolation_mode)\n \t\t\tfor frame, pos in positions: self.set_position(frame, pos[0], pos[1])\n \t\t\tself._tmp_points= []\n", "old_path": "pythonvideoannotator_models/models/video/objects/object2d/datasets/path/path_base.py", "rewrite": "ReplaceText(target='>=' @(67,19)->(67,20))"} -{"repo": "https://:@bitbucket.org/fchampalimaud/pythonvideoannotator-models.git", "hash": "190b462c6df6128fd6ffffb055d84a093a07d381", "diff": "@@ -57,7 +57,7 @@ class VideoIO(VideoBase):\n \t\t\t\tdataset_conf \t= json.load(infile)\n \t\t\t\tfunc \t\t\t= getattr(self, dataset_conf['factory-function'])\n \t\t\t\tdataset \t\t= func()\n-\t\t\t\tdataset.load(data, obj_dir)\n+\t\t\t\tdataset.load(dataset_conf, obj_dir)\n \t\t\t\tdataset.name = name\n \n \t\tsuper(VideoIO, self).load(data, video_path)\n\\ No newline at end of file\n", "old_path": "pythonvideoannotator_models/models/video/video_io.py", "rewrite": "ReplaceText(target='dataset_conf' @(60,17)->(60,21))"} -{"repo": "https://:@github.com/ch3pjw/junction.git", "hash": "97f897e1fe41e165333f7a5248c951f686a13a89", "diff": "@@ -4,7 +4,7 @@ import blessings\n class Terminal(blessings.Terminal):\n def draw_block(self, block, x, y):\n for y, line in enumerate(block, start=y):\n- self.stream.write(self.move(x, y))\n+ self.stream.write(self.move(y, x))\n self.stream.write(line)\n \n _terminal = Terminal()\n", "old_path": "junction/terminal.py", "rewrite": "ArgSwap(idxs=0<->1 @(7,30)->(7,39))"} -{"repo": "https://:@gitlab.com/kamichal/renew.git", "hash": "88823f6ffb58d69e34338f50893049c23739c42c", "diff": "@@ -90,7 +90,7 @@ class ArgsInspect(object):\n msg = \"Variadic arg has to be stored as a tuple, list or OrderedDict, got {}\"\n raise TypeError(msg.format(type(object_instance).__name__))\n \n- if isinstance(object_instance, OrderedDict):\n+ if isinstance(variadic_arg, OrderedDict):\n variadic_arg = variadic_arg.items()\n \n for attribute_object in variadic_arg:\n", "old_path": "renew/_inspection.py", "rewrite": "ReplaceText(target='variadic_arg' @(93,26)->(93,41))"} -{"repo": "https://:@github.com/DataIntegrationAlliance/DIRestInvoker.git", "hash": "968df11afd78a42bb3294d90a0b73a2ae8777ab7", "diff": "@@ -32,7 +32,7 @@ class WindRestInvoker:\n ret_dic = None\n \n if ret_data.status_code != 200:\n- if ret_dic is None and 'error_code' in ret_dic and ret_dic['error_code'] == -4001:\n+ if ret_dic is not None and 'error_code' in ret_dic and ret_dic['error_code'] == -4001:\n logger.error('%s post %s got error\\n%s', self._url(path), req_data, ret_dic)\n return None\n else:\n", "old_path": "direstinvoker/iwind.py", "rewrite": "ReplaceText(target=' is not ' @(35,22)->(35,26))"} -{"repo": "https://:@github.com/tlevine/blargparse.git", "hash": "05ce9594f89b154fee2f25a0ece74867756a51ea", "diff": "@@ -109,7 +109,7 @@ def test_multiple_subparsers():\n \n b = sps.add_parser('b')\n b.add_argument('--bbb', '-b')\n- a.add_aggregate('BBB', lambda args:args.bbb.upper())\n+ b.add_aggregate('BBB', lambda args:args.bbb.upper())\n \n assert bp.parse_args([]) == argparse.Namespace(command = None)\n assert bp.parse_args(['a', '--aaa', 'tom']) == argparse.Namespace(command = None, aaa = 'tom', AAA = 'TOM')\n", "old_path": "test_blargparse.py", "rewrite": "ReplaceText(target='b' @(112,4)->(112,5))"} -{"repo": "https://:@gitlab.com/larsyunker/unithandler.git", "hash": "db31d7adb35e6ff60a6a719dbe9f7966eee8ab07", "diff": "@@ -151,7 +151,7 @@ def interpret_unit_block(unitblock: str) -> dict:\n if char.isdigit(): # if a digit, increase counter\n num += char\n elif char == '-' or char == MINUS: # if a negative sign, change sign\n- sign = -1\n+ sign *= -1\n elif char in [' ', DOT, '*']: # if a separator, ignore\n pass\n else: # otherwise add to unit\n", "old_path": "unithandler/base.py", "rewrite": "ReplaceText(target='*=' @(154,17)->(154,18))"} -{"repo": "https://:@github.com/egtaonline/quiesce.git", "hash": "9cfe8094d875d54dae3bddd8560e5010cd8bf6e8", "diff": "@@ -70,7 +70,7 @@ async def deviation_payoffs(sched, mix, num, *, boots=0, chunk_size=None):\n n = num\n while 0 < n:\n new_profs = sched.random_deviation_profiles(\n- min(num, chunk_size), mix).reshape((-1, mix.size))\n+ min(n, chunk_size), mix).reshape((-1, mix.size))\n n -= chunk_size\n new_futures = [asyncio.ensure_future(sched.sample_payoffs(prof))\n for prof in new_profs]\n", "old_path": "egta/bootstrap.py", "rewrite": "ReplaceText(target='n' @(73,16)->(73,19))"} -{"repo": "https://:@github.com/benlindsay/job_tree.git", "hash": "fd96b394a96e1eb0aac3e2d4df91505e41a4c604", "diff": "@@ -22,7 +22,7 @@ job_file_list = ['params.input', 'sub.sh']\n \n # Generate a flat job tree submit the jobs.\n # Add 'submit = False' to prevent submission.\n-job_tree(tier_list, job_file_list)\n+job_tree(job_file_list, tier_list)\n \n # Running this script should generate a directory tree that looks like this:\n \n", "old_path": "samples/flat_sample/test.py", "rewrite": "ArgSwap(idxs=0<->1 @(25,0)->(25,8))"} -{"repo": "https://:@github.com/lampwins/orangengine.git", "hash": "27a79be91e8fe3dd41b02ca7e943a21e2bd2b12d", "diff": "@@ -189,7 +189,7 @@ class BaseDriver(object):\n \n if len(set_list) == 0 or len(target_element) > 1:\n # no valid matches or more than one target element identified (meaning this will have to be a new policy)\n- return CandidatePolicy(target_dict=target_element)\n+ return CandidatePolicy(target_dict=param_dict)\n else:\n # found valid matches\n # the intersection of all match sets is the set of all policies that the target element can to appended to\n", "old_path": "orangengine/drivers/base.py", "rewrite": "ReplaceText(target='param_dict' @(192,47)->(192,61))"} -{"repo": "https://:@github.com/korijn/git-lfs-azure-transfer.git", "hash": "f3d7d7992adb676929d29d12c213d5169d12ccdc", "diff": "@@ -48,7 +48,7 @@ def report_error(code, message, event=None, oid=None):\n }\n if event:\n payload['event'] = event\n- if event:\n+ if oid:\n payload['oid'] = oid\n write(payload)\n \n", "old_path": "git_lfs_azure_transfer.py", "rewrite": "ReplaceText(target='oid' @(51,7)->(51,12))"} -{"repo": "https://:@github.com/danielfrg/datasciencebox.git", "hash": "74ca80ebb2ecf33b71e1926b4c2c6094179aa893", "diff": "@@ -31,7 +31,7 @@ class Project(object):\n if not os.path.exists(os.path.join(dir_, 'dsbfile')):\n raise DSBException('\"{}\" not found on \"\"{}\" or its parents'.format(settingsfile, path))\n \n- return cls.from_file(filepath=os.path.join(settingsfile, dir_))\n+ return cls.from_file(filepath=os.path.join(dir_, settingsfile))\n \n @classmethod\n def from_file(cls, filepath):\n", "old_path": "datasciencebox/core/project.py", "rewrite": "ArgSwap(idxs=0<->1 @(34,38)->(34,50))"} -{"repo": "https://:@github.com/nick-youngblut/SIPSim.git", "hash": "f11ace61e1ba5fdb7afc8a9ec4409cb37e643558", "diff": "@@ -146,7 +146,7 @@ class SimFrags(object):\n \n # draw from fragment size distribution\n fragSize = int(self.fld(size=1))\n- if fragSize < readTempSize:\n+ if fragSize <= readTempSize:\n tryCnt += 1\n continue\n \n", "old_path": "lib/SimFrags.py", "rewrite": "ReplaceText(target='<=' @(149,24)->(149,25))"} -{"repo": "https://:@github.com/Akuli/pythotk.git", "hash": "c16149611fdeb7017bf65828c54d4c5bdf9edcc4", "diff": "@@ -132,7 +132,7 @@ class Widget:\n \n # use some_widget.to_tcl() to access the _widget_path\n self._widget_path = '%s.%s%d' % (\n- parentpath, safe_class_name, next(counts[widgetname]))\n+ parentpath, safe_class_name, next(counts[safe_class_name]))\n \n # TODO: some config options can only be given when the widget is\n # created, add support for them\n", "old_path": "pythotk/_widgets.py", "rewrite": "ReplaceText(target='safe_class_name' @(135,53)->(135,63))"} -{"repo": "https://:@github.com/claird/PyPDF4.git", "hash": "d5738dccbca3cf4d2eaf7e307a853dc31baf4a53", "diff": "@@ -117,7 +117,7 @@ class FlateDecode(object):\n rowlength = columns + 1\n assert len(data) % rowlength == 0\n prev_rowdata = (0,) * rowlength\n- for row in range(len(data) / rowlength):\n+ for row in range(len(data) // rowlength):\n rowdata = [ord(x) for x in data[(row*rowlength):((row+1)*rowlength)]]\n filterByte = rowdata[0]\n if filterByte == 0:\n", "old_path": "PyPDF2/filters.py", "rewrite": "ReplaceText(target='//' @(120,43)->(120,44))"} -{"repo": "https://:@github.com/HUJI-Deep/FlowKet.git", "hash": "cfb8f9d326ceeeb03c9daa2a4be25e9a1e74064d", "diff": "@@ -42,7 +42,7 @@ class ExactVariational(object):\n if self.num_of_states % batch_size != 0:\n raise Exception('In exact the batch size must divide the total number of states in the system')\n self.batch_size = batch_size\n- self.num_of_batch_until_full_cycle = self.num_of_states / self.batch_size\n+ self.num_of_batch_until_full_cycle = self.num_of_states // self.batch_size\n self.batch_complex_local_energies = np.zeros((self.batch_size, ), dtype=np.complex128)\n self.batch_naive_complex_local_energies = np.zeros((self.batch_size, ), dtype=np.complex128)\n \n", "old_path": "src/pyket/optimization/exact_variational.py", "rewrite": "ReplaceText(target='//' @(45,64)->(45,65))"} -{"repo": "https://:@github.com/eriknyquist/text_game_maker.git", "hash": "a890d63064b801645a425df5d2d69ad4a9056d8f", "diff": "@@ -61,7 +61,7 @@ def craft(name, word, inventory):\n item = None\n \n if name in craftables:\n- items, item = craftables[item]\n+ items, item = craftables[name]\n else:\n for k in craftables:\n if k.startswith(name) or k.endswith(name) or (k in name):\n", "old_path": "text_game_maker/crafting/crafting.py", "rewrite": "ReplaceText(target='name' @(64,33)->(64,37))"} -{"repo": "https://:@github.com/eriknyquist/text_game_maker.git", "hash": "2868976cf5790d39282843924148eae25102c6be", "diff": "@@ -55,7 +55,7 @@ def help_text():\n def _find_item(item, items):\n for i in items:\n if (i.name == item.name) and isinstance(i, item.__class__):\n- return item\n+ return i\n \n return None\n \n", "old_path": "text_game_maker/crafting/crafting.py", "rewrite": "ReplaceText(target='i' @(58,19)->(58,23))"} -{"repo": "https://:@github.com/SkyTruth/gpsd_format.git", "hash": "07dd93add6bd9e448eb4ac87ed6fdc43cc94f5d2", "diff": "@@ -92,6 +92,6 @@ def etl(ctx, infile, outfile, filter_expr, sort_field,\n do=output_driver_opts,\n co=output_compression_opts) as dst:\n \n- iterator = gpsdio.filter(src, filter_expr) if filter_expr else src\n+ iterator = gpsdio.filter(filter_expr, src) if filter_expr else src\n for msg in gpsdio.sort(iterator, sort_field) if sort_field else iterator:\n dst.write(msg)\n", "old_path": "gpsdio/cli/etl.py", "rewrite": "ArgSwap(idxs=0<->1 @(95,23)->(95,36))"} -{"repo": "https://:@github.com/barry-lab/openEPhys_DACQ.git", "hash": "14df7f0f939a8dace7020265f1695e06451d7f87", "diff": "@@ -67,7 +67,7 @@ def print_progress(iteration, total, prefix='', suffix='', decimals=1, bar_lengt\n \n sys.stdout.write('%s |%s| %s%s %s\\r' % (prefix, bar, percents, '%', suffix)),\n \n- if iteration == total:\n+ if iteration >= total:\n sys.stdout.write('\\n')\n sys.stdout.flush()\n # # \n", "old_path": "HelperFunctions.py", "rewrite": "ReplaceText(target='>=' @(70,17)->(70,19))"} -{"repo": "https://:@github.com/fy0/mapi.git", "hash": "3c322eb25527f719a55a7de8eec82bd6620546d2", "diff": "@@ -530,7 +530,7 @@ class AbstractSQLView(BaseView):\n logger.debug('set data: %s' % values)\n code, data = await self._sql.update(info, values)\n if code == RETCODE.SUCCESS:\n- await async_call(self.after_update, data)\n+ await async_call(self.after_update, values)\n self.finish(code, data)\n \n async def new(self):\n", "old_path": "slim/base/view.py", "rewrite": "ReplaceText(target='values' @(533,48)->(533,52))"} -{"repo": "https://:@github.com/fy0/mapi.git", "hash": "d340368fbcf91c1c9377fabcb5722ffdef798501", "diff": "@@ -15,7 +15,7 @@ def require_role(role=None):\n def request_role(role=None):\n def _(func):\n async def __(view: AbstractSQLView, *args, **kwargs):\n- if role == view.current_request_role:\n+ if role != view.current_request_role:\n return view.finish(RETCODE.INVALID_ROLE)\n return await func(view, *args, **kwargs)\n return __\n", "old_path": "slim/ext/decorator.py", "rewrite": "ReplaceText(target='!=' @(18,20)->(18,22))"} -{"repo": "https://:@github.com/Gurbert/micawber_bs4_classes.git", "hash": "7a07d3b013c907c11a54cf2cedc7954c554770de", "diff": "@@ -164,7 +164,7 @@ def _is_standalone(soup_elem):\n def _inside_skip(soup_elem):\n parent = soup_elem.parent\n while parent is not None:\n- if parent.name not in skip_elements:\n+ if parent.name in skip_elements:\n return True\n parent = parent.parent\n return False\n", "old_path": "micawber/parsers.py", "rewrite": "ReplaceText(target=' in ' @(167,22)->(167,30))"} -{"repo": "https://:@github.com/pgeurin/autoregression.git", "hash": "dc4b2c89e719c6a94f3a4e0ab632aec2a5990c35", "diff": "@@ -488,7 +488,7 @@ def compare_predictions(df, y_var_name, percent_data=None,\n timeit(plot_rocs, models, df_X, y)\n plt.show()\n print(f'MAKE SUBSAMPLE TIME: {time() - starttotal}')\n- return names, results, models, pipeline, df_X\n+ return names, results, fit_models, pipeline, df_X\n \n def bootstrap_train_premade(model, X, y, bootstraps=1000, **kwargs):\n \"\"\"Train a (linear) model on multiple bootstrap samples of some data and\n", "old_path": "autoregression/autoregression.py", "rewrite": "ReplaceText(target='fit_models' @(491,27)->(491,33))"} -{"repo": "https://:@github.com/xRodney/suds-sw.git", "hash": "8b72570029cb884a8b5bf46aa00deedadb150c3c", "diff": "@@ -130,7 +130,7 @@ class UMBase:\n return content.data\n lang = attributes.lang()\n if not len(node.children) and content.text is None:\n- if self.nillable(content.data) and content.node.isnil():\n+ if self.nillable(content.data) or content.node.isnil():\n return None\n else:\n return xlstr.string('', lang)\n", "old_path": "suds/bindings/unmarshaller.py", "rewrite": "ReplaceText(target='or' @(133,43)->(133,46))"} -{"repo": "https://:@github.com/xRodney/suds-sw.git", "hash": "c2ef63c56cdb827e47426ce8debd547275122cc6", "diff": "@@ -113,6 +113,6 @@ class Options(Skin):\n Definition('retxml', bool, False),\n Definition('autoblend', bool, False),\n Definition('cachingpolicy', int, 0),\n- Definition('plugins', [], (list, tuple)),\n+ Definition('plugins', (list, tuple), []),\n ]\n Skin.__init__(self, domain, definitions, kwargs)\n", "old_path": "suds/options.py", "rewrite": "ArgSwap(idxs=1<->2 @(116,12)->(116,22))"} -{"repo": "https://:@gitlab.com/frkl/bring.git", "hash": "ccb052917ef3d193526ee99eec8968df96a1c199", "diff": "@@ -306,7 +306,7 @@ class Bring(SimpleTing):\n ctx: BringDynamicContextTing = self._tingistry_obj.create_ting( # type: ignore\n \"bring_dynamic_context_ting\", f\"{BRING_CONTEXT_NAMESPACE}.{context_name}\"\n )\n- indexes = [folder]\n+ indexes = [_path]\n ctx.input.set_values( # type: ignore\n ting_dict={\"indexes\": indexes}\n )\n", "old_path": "src/bring/bring.py", "rewrite": "ReplaceText(target='_path' @(309,19)->(309,25))"} -{"repo": "https://:@gitlab.com/frkl/bring.git", "hash": "8e4f6b2742ec941ab386856234415827f8f77429", "diff": "@@ -10,7 +10,7 @@ app_name = \"bring\"\n _hi = load_modules(BRINGISTRY_PRELOAD_MODULES) # type: ignore\n \n pyinstaller = {\"hiddenimports\": [x.__name__ for x in _hi]}\n-if os.name != \"nt\":\n+if os.name == \"nt\":\n import pkgutil\n import jinxed.terminfo\n \n", "old_path": "src/bring/_meta.py", "rewrite": "ReplaceText(target='==' @(13,11)->(13,13))"} -{"repo": "https://:@gitlab.com/frkl/bring.git", "hash": "d67c17a6b4f41c01764315a5f6205a1264b6d3f0", "diff": "@@ -242,4 +242,4 @@ class BringContextTing(InheriTing, SimpleTing):\n \n _all_values[\"_bring_metadata_timestamp\"] = str(arrow.now())\n \n- return all_values\n+ return _all_values\n", "old_path": "src/bring/context/__init__.py", "rewrite": "ReplaceText(target='_all_values' @(245,15)->(245,25))"} -{"repo": "https://:@gitlab.com/frkl/bring.git", "hash": "112f00eaba6972dab7ead12bea4ca077f4ef5a6c", "diff": "@@ -110,7 +110,7 @@ def create_table_from_pkg_args(\n \n _allowed_strings = []\n for _arg, _aliases in _allowed.items():\n- if not aliases:\n+ if not _aliases:\n a = _arg\n elif len(_aliases) == 1:\n a = f\"{_arg} (alias: {_aliases[0]})\"\n", "old_path": "src/bring/display/args.py", "rewrite": "ReplaceText(target='_aliases' @(113,23)->(113,30))"} -{"repo": "https://:@gitlab.com/frkl/bring.git", "hash": "6ebf8d8d3c86da43d5fe0505544d7329e4c6abf5", "diff": "@@ -135,7 +135,7 @@ class BringInstallGroup(FrklBaseCommand):\n install_args = {}\n if target:\n install_args[\"target\"] = target\n- if install_args:\n+ if target_config:\n install_args[\"target_config\"] = target_config\n \n # install_args[\"merge_strategy\"] = merge_strategy\n", "old_path": "src/bring/interfaces/cli/install.py", "rewrite": "ReplaceText(target='target_config' @(138,11)->(138,23))"} -{"repo": "https://:@github.com/glyph/twitter-text-py.git", "hash": "197cbd58689e6f12f0b2e931c615eb816b6a8051", "diff": "@@ -60,7 +60,7 @@ class HitHighlighter(object):\n if index % 2:\n # we're inside a \n continue\n- chunk_start = len(u''.join(text_chunks[0:index / 2]))\n+ chunk_start = len(u''.join(text_chunks[0:index // 2]))\n chunk_end = chunk_start + len(chunk)\n if hit_start >= chunk_start and hit_start < chunk_end:\n chunk = chunk[:hit_start - chunk_start] + tags[0] + chunk[hit_start - chunk_start:]\n", "old_path": "twitter_text/highlighter.py", "rewrite": "ReplaceText(target='//' @(63,63)->(63,64))"} -{"repo": "https://:@github.com/lbovet/yglu.git", "hash": "73ec7a7721281cf2ab16b00be2a64da5ba43697f", "diff": "@@ -42,7 +42,7 @@ def import_definition(context, root):\n errors = root.doc.errors\n else:\n errors = None\n- result = build(file, filename, errors)\n+ result = build(file, filepath, errors)\n return Holder(result)\n \n context['$import'] = import_function\n", "old_path": "yglu/functions.py", "rewrite": "ReplaceText(target='filepath' @(45,33)->(45,41))"} -{"repo": "https://:@github.com/inforian/django-password-manager.git", "hash": "5e7e6c14fa393d7e814556c9b02869d9f3adcd84", "diff": "@@ -77,7 +77,7 @@ def check_password_expired(user):\n # get latest password info\n latest = user.password_history.latest(\"pk\")\n except PasswordHistory.DoesNotExist:\n- return False\n+ return True\n \n now = datetime.now(tz=pytz.UTC)\n expiration = latest.timestamp + timedelta(days=expiry)\n", "old_path": "pass_manager/utils.py", "rewrite": "ReplaceText(target='True' @(80,15)->(80,20))"} -{"repo": "https://:@github.com/koriavinash1/DeepBrainSeg.git", "hash": "a09812c3f5b8348b1bbfc0e06669490c9a204ec7", "diff": "@@ -109,7 +109,7 @@ def GenerateCSV(model, dataset_path, logs_root, iteration = 0):\n spath['seg'] = os.path.join(subject_path, subject + '_seg.nii.gz')\n spath['t1'] = os.path.join(subject_path, subject + '_t1.nii.gz')\n spath['t2'] = os.path.join(subject_path, subject + '_t2.nii.gz')\n- spath['mask'] = os.path.join(dataset_path, 'mask.nii.gz')\n+ spath['mask'] = os.path.join(subject_path, 'mask.nii.gz')\n \n vol, seg, affine = nii_loader(spath)\n predictions = _GenerateSegmentation_(subject_path, vol, seg, size = 64, nclasses = 5)\n", "old_path": "DeepBrainSeg/tumor/finetune/generateCSV.py", "rewrite": "ReplaceText(target='subject_path' @(112,42)->(112,54))"} -{"repo": "https://:@github.com/codepost-io/codePost-python.git", "hash": "00320258dd53e987c66c9af2d021fb93b38ac20c", "diff": "@@ -812,7 +812,7 @@ def remove_comments(api_key, submission_id=None, file_id=None):\n headers=auth_headers\n )\n \n- if r.status_code != 204:\n+ if r.status_code == 204:\n comments_to_delete += r.json().get(\"comments\", list())\n deleted_comments += 1\n except:\n", "old_path": "codePost_api/helpers.py", "rewrite": "ReplaceText(target='==' @(815,29)->(815,31))"} -{"repo": "https://:@github.com/yuvipanda/python-mwapi.git", "hash": "908d0cbc6945c46acc6f9536d95ad78dc3e157e9", "diff": "@@ -16,7 +16,7 @@\n import sys\n import os\n \n-sys.path.insert(\"..\", 0)\n+sys.path.insert(0, \"..\")\n \n import mwapi\n \n", "old_path": "doc/conf.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,0)->(19,15))"} -{"repo": "https://:@github.com/jplusplus/thenmap-python.git", "hash": "70432b792f441d2bac26c2da2744fa5d67f47af3", "diff": "@@ -26,7 +26,7 @@ def point_from_coordinates(input_):\n for sep in [\",\", \";\", \"|\"]:\n if len(input_.split(sep)) in range(2, 3):\n t = input_.split(sep)\n- if isinstance(input_, string_types):\n+ if isinstance(t, string_types):\n raise Exception(\"Invalid coordinates: %s\" % input_)\n \n elif isinstance(input_, Iterable):\n", "old_path": "thenmap/thenmap.py", "rewrite": "ReplaceText(target='t' @(29,22)->(29,28))"} -{"repo": "https://:@github.com/cardsurf/xcrawler.git", "hash": "79aaaca3e4cbf7f79efa5f3a9168fb9089b73d40", "diff": "@@ -13,4 +13,4 @@ class UrlInfo:\n \n def is_relative(self, url):\n domain = self.url_splitter.get_domain(url)\n- return len(domain) > 0\n+ return len(domain) == 0\n", "old_path": "xcrawler/http/urls/url_info.py", "rewrite": "ReplaceText(target='==' @(16,27)->(16,28))"} -{"repo": "https://:@github.com/asafpr/pro_clash.git", "hash": "f487619296c37a989d4dc647d1c204c1acc15e44", "diff": "@@ -898,7 +898,7 @@ def get_names(gname, uid_names, annotations):\n p1_desc = '-'\n p0_desc += ' : %s'%p1_desc\n \n- elif len(gname)>2:\n+ elif len(gname)>=2:\n p0_name += '_%s'%gname[1]\n \n return p0_name, p0_desc\n", "old_path": "pro_clash/__init__.py", "rewrite": "ReplaceText(target='>=' @(901,19)->(901,20))"} -{"repo": "https://:@github.com/asafpr/pro_clash.git", "hash": "fcb3edb3acefd3224f0e5473495435d197989c81", "diff": "@@ -525,7 +525,7 @@ def read_bam_file(bamfile, chrnames_bam, max_NM=0):\n for al in alt_list:\n apos = int(al[1][1:])\n # test this alternative only if its NM is as the original one\n- if int(apos[3])>nm_num:\n+ if int(al[3])>nm_num:\n continue\n if apos < min_pos:\n min_pos = apos\n", "old_path": "pro_clash/__init__.py", "rewrite": "ReplaceText(target='al' @(528,23)->(528,27))"} -{"repo": "https://:@github.com/Anastadev/anastasia.git", "hash": "03a356f19a8c995ff2dec074b8b133244fab1c2c", "diff": "@@ -21,7 +21,7 @@ steam_handler.setLevel(logging.DEBUG)\n steam_handler.setFormatter(formatter)\n log.addHandler(steam_handler)\n \n-updater = Updater(token=sys.argv[0])\n+updater = Updater(token=sys.argv[1])\n \n dispatcher = updater.dispatcher\n \n", "old_path": "Main.py", "rewrite": "ReplaceText(target='1' @(24,33)->(24,34))"} -{"repo": "https://:@github.com/ankush13r/BvSalud.git", "hash": "10216a189e9f63ab1a1d8cf7c647a026b7b941bb", "diff": "@@ -195,7 +195,7 @@ def get_mesh_major_list(document_dict,decsCodes_list_dict,with_header): #Method\n else:\n if len(header_before_slash) != 0:\n final_header = str(header_code) +'/'+ str(header_after_slash)\n- elif len(header_after_slash) == 0:\n+ elif len(header_before_slash) == 0:\n final_header = '/' + str(decsCodes_list_dict)\n else:\n print(header,\"--\",header_before_slash,\"--\",header_after_slash)\n", "old_path": "BvSalud/makeSet.py", "rewrite": "ReplaceText(target='header_before_slash' @(198,21)->(198,39))"} -{"repo": "https://:@github.com/Hypers-HFA/paraer.git", "hash": "8a5fd8156012b94e50b1e6a3413244b95f3e323b", "diff": "@@ -112,7 +112,7 @@ def para_ok_or_400(itemset):\n ]\n value = None # \u4e0e '' \u533a\u522b\n para = paramap.get(name)\n- if required and para not in (None, ''): # \u5982\u679c\u662fpost\u65b9\u6cd5\u5e76\u4e14\u4f20\u53c2\u662fjson\u7684\u8bdd\uff0cpara\u53ef\u80fd\u4e3a0\n+ if required and para in (None, ''): # \u5982\u679c\u662fpost\u65b9\u6cd5\u5e76\u4e14\u4f20\u53c2\u662fjson\u7684\u8bdd\uff0cpara\u53ef\u80fd\u4e3a0\n result.error(name, 'required')\n if para is not None:\n if para:\n", "old_path": "paraer/para.py", "rewrite": "ReplaceText(target=' in ' @(115,36)->(115,44))"} -{"repo": "https://:@github.com/davidenunes/tensorx.git", "hash": "34fb24ae4eeca927a7d7b5f376aeeddbb0b7aacd", "diff": "@@ -2604,7 +2604,7 @@ class SaltPepperNoise(Layer):\n else:\n batch_size = noise_shape[0]\n \n- noise = salt_pepper_noise(batch_size, noise_shape[1], density, salt_value, pepper_value, seed)\n+ noise = salt_pepper_noise(noise_shape[1], batch_size, density, salt_value, pepper_value, seed)\n \n if layer.is_sparse():\n tensor = transform.sparse_put(layer.tensor, noise)\n", "old_path": "tensorx/layers.py", "rewrite": "ArgSwap(idxs=0<->1 @(2607,24)->(2607,41))"} -{"repo": "https://:@github.com/sauliusl/dgw.git", "hash": "9120263028d2e64983b9b9babe31c46b8f2caedd", "diff": "@@ -98,7 +98,7 @@ def dtw_std(x, y, metric='sqeuclidean', dist_only=True, constraint=None, k=None,\n path_rev = (_reverse_path(path[0]), path[1])\n \n if scale_first:\n- path_rev = _scaled_path(path, scaling_path, flip_paths)\n+ path_rev = _scaled_path(path_rev, scaling_path, flip_paths)\n \n # TODO: Reverse cost matrix here\n cost = None\n", "old_path": "dgw/dtw/distance.py", "rewrite": "ReplaceText(target='path_rev' @(101,40)->(101,44))"} -{"repo": "https://:@bitbucket.org/slicedice/aboutyou-shop-sdk-python.git", "hash": "c125675219cbb473f47c78c57e9205d1be44d4f2", "diff": "@@ -439,7 +439,7 @@ class Search(object):\n else:\n product = Product(self.easy, p)\n \n- self.easy.product_cach[p.id] = product\n+ self.easy.product_cach[product.id] = product\n self.products.buffer[i+offset] = product\n \n \n", "old_path": "collins/easy.py", "rewrite": "ReplaceText(target='product' @(442,35)->(442,36))"} -{"repo": "https://:@github.com/neizod/extmath.git", "hash": "b66496463e3d724a29d652e97867f41e4e1d2aea", "diff": "@@ -117,7 +117,7 @@ def factorized(n):\n break\n while not n % i:\n factor.append(i)\n- n /= i\n+ n //= i\n if n == 1:\n break\n return factor\n", "old_path": "mathapi/__init__.py", "rewrite": "ReplaceText(target='//=' @(120,14)->(120,16))"} -{"repo": "https://:@github.com/storborg/axibot.git", "hash": "4ffd9fc0f715bbe4ae8c1708fbeae45186d35f6e", "diff": "@@ -64,7 +64,7 @@ async def handle_user_message(app, ws, msg):\n except Exception as e:\n notify_error(app, ws, str(e))\n else:\n- app['document'] = msg.document\n+ app['document'] = job.document\n app['job'] = job\n app['estimated_time'] = job.duration().total_seconds()\n notify_new_document(app, exclude_client=ws)\n", "old_path": "axibot/server/handlers.py", "rewrite": "ReplaceText(target='job' @(67,30)->(67,33))"} -{"repo": "https://:@github.com/storborg/axibot.git", "hash": "4ad752828696a789ef25fa001f1489f87344c3e4", "diff": "@@ -116,7 +116,7 @@ async def client_handler(request):\n elif raw_msg.tp == aiohttp.MsgType.closed:\n break\n elif raw_msg.tp == aiohttp.MsgType.error:\n- log.info(\"User websocket error: %s\", msg)\n+ log.info(\"User websocket error: %s\", raw_msg)\n break\n else:\n log.error(\"Unknown user message type: %s, ignoring.\",\n", "old_path": "axibot/server/handlers.py", "rewrite": "ReplaceText(target='raw_msg' @(119,53)->(119,56))"} -{"repo": "https://:@github.com/tsuyukimakoto/biisan.git", "hash": "4465b109a4e71dcb64499c14b579c762e54b4db4", "diff": "@@ -116,7 +116,7 @@ def process_image(elm, registry, container):\n img.alt = subitem[1]\n elif subitem[0] == 'witdh':\n img.witdh = subitem[1]\n- elif subitem[1] == 'height':\n+ elif subitem[0] == 'height':\n img.height = subitem[1]\n elif subitem[0] == 'uri':\n img.uri = subitem[1]\n", "old_path": "biisan/processors/__init__.py", "rewrite": "ReplaceText(target='0' @(119,21)->(119,22))"} -{"repo": "https://:@github.com/csm10495/csmlog.git", "hash": "010e00e53545842d2dc1342c375c068c90138ca2", "diff": "@@ -262,7 +262,7 @@ def test_gsheets_calculate_periodic_loop_sleep_time(gsheets_handler_no_thread):\n def test_gsheets_add_rows_to_active_sheet_sets_add_rows_time(gsheets_handler_no_thread):\n gsheets_handler_no_thread._add_rows_time = 99\n assert isinstance(gsheets_handler_no_thread._add_rows_to_active_sheet([]), unittest.mock.Mock)\n- assert gsheets_handler_no_thread._add_rows_time < 99 and gsheets_handler_no_thread._add_rows_time > 0\n+ assert gsheets_handler_no_thread._add_rows_time < 99 and gsheets_handler_no_thread._add_rows_time >= 0\n \n def test_gsheets_add_rows_to_active_sheet_set_coerce_to_correct_exceptions(gsheets_handler_no_thread):\n with unittest.mock.patch.object(gsheets_handler_no_thread.sheet, 'append_rows', side_effect=Exception(\"RESOURCE_EXHAUSTED uh-oh\")) as mock:\n", "old_path": "csmlog/tests/test_google_sheets_handler.py", "rewrite": "ReplaceText(target='>=' @(265,102)->(265,103))"} -{"repo": "https://:@github.com/JorrandeWit/django-oscar-fees.git", "hash": "7d18c7bdbeb881f4af5f81c1adf989422e134995", "diff": "@@ -26,7 +26,7 @@ class FeeApplications(object):\n 'fee': fee,\n 'result': result,\n 'name': fee.name,\n- 'description': result.description,\n+ 'description': fee.description,\n 'freq': 0,\n 'amount': D('0.00')}\n self.applications[fee.id]['amount'] += result.fee\n", "old_path": "django_oscar_fees/results.py", "rewrite": "ReplaceText(target='fee' @(29,31)->(29,37))"} -{"repo": "https://:@gitlab.com/yhtang/graphdot.git", "hash": "2ac46e719092b1e78bc2bd860bce1dd23e152638", "diff": "@@ -27,7 +27,7 @@ class OctileGraph(object):\n nnz = len(edges)\n \n ''' add phantom label if none exists to facilitate C++ interop '''\n- assert(len(edges.columns) >= 1)\n+ assert(len(nodes.columns) >= 1)\n if len(nodes.columns) == 1:\n nodes['labeled'] = np.zeros(len(nodes), np.bool_)\n \n", "old_path": "graphdot/kernel/marginalized/_octilegraph.py", "rewrite": "ReplaceText(target='nodes' @(30,19)->(30,24))"} -{"repo": "https://:@gitlab.com/yhtang/graphdot.git", "hash": "c1d46fe384aaac63a6e32b0a30cf6f3aa2b04183", "diff": "@@ -315,7 +315,7 @@ class MarginalizedGraphKernel:\n if traits.eval_gradient is True:\n output_shape = (output_length, 1 + self.n_dims)\n else:\n- output_shape = (output_shape, 1)\n+ output_shape = (output_length, 1)\n output = backend.empty(int(np.prod(output_shape)), np.float32)\n timer.toc('creating output buffer')\n \n", "old_path": "graphdot/kernel/marginalized/_kernel.py", "rewrite": "ReplaceText(target='output_length' @(318,28)->(318,40))"} -{"repo": "https://:@gitlab.com/yhtang/graphdot.git", "hash": "f1499423ac76e790b77f729e92b2cc3223d64f58", "diff": "@@ -117,7 +117,7 @@ class SpectralApprox(FactorApprox):\n def __init__(self, X, rcut=0, acut=0):\n if isinstance(X, np.ndarray):\n U, S, _ = np.linalg.svd(X, full_matrices=False)\n- mask = (S >= S.max() * rcut) | (S >= acut)\n+ mask = (S >= S.max() * rcut) & (S >= acut)\n self.U = U[:, mask]\n self.S = S[mask]\n elif isinstance(X, tuple) and len(X) == 2:\n", "old_path": "graphdot/linalg/low_rank.py", "rewrite": "ReplaceText(target='&' @(120,41)->(120,42))"} -{"repo": "https://:@github.com/straga/micropython.git", "hash": "1679696612007107dac55d936006b1923eda2475", "diff": "@@ -7,7 +7,7 @@ desc = {\n \n data = bytearray(b\"01234567\")\n \n-S = uctypes.struct(desc, uctypes.addressof(data), uctypes.LITTLE_ENDIAN)\n+S = uctypes.struct(uctypes.addressof(data), desc, uctypes.LITTLE_ENDIAN)\n \n # Arrays of UINT8 are accessed as bytearrays\n print(S.arr)\n", "old_path": "tests/extmod/uctypes_bytearray.py", "rewrite": "ArgSwap(idxs=0<->1 @(10,4)->(10,18))"} -{"repo": "https://:@github.com/straga/micropython.git", "hash": "1679696612007107dac55d936006b1923eda2475", "diff": "@@ -22,7 +22,7 @@ desc = {\n \n data = bytearray(b\"01\")\n \n-S = uctypes.struct(desc, uctypes.addressof(data), uctypes.LITTLE_ENDIAN)\n+S = uctypes.struct(uctypes.addressof(data), desc, uctypes.LITTLE_ENDIAN)\n \n #print(S)\n print(hex(S.s0))\n", "old_path": "tests/extmod/uctypes_le.py", "rewrite": "ArgSwap(idxs=0<->1 @(25,4)->(25,18))"} -{"repo": "https://:@github.com/straga/micropython.git", "hash": "1679696612007107dac55d936006b1923eda2475", "diff": "@@ -31,7 +31,7 @@ desc = {\n \n data = bytearray(b\"01\")\n \n-S = uctypes.struct(desc, uctypes.addressof(data), uctypes.NATIVE)\n+S = uctypes.struct(uctypes.addressof(data), desc, uctypes.NATIVE)\n \n #print(S)\n print(hex(S.s0))\n", "old_path": "tests/extmod/uctypes_native_le.py", "rewrite": "ArgSwap(idxs=0<->1 @(34,4)->(34,18))"} -{"repo": "https://:@github.com/straga/micropython.git", "hash": "1679696612007107dac55d936006b1923eda2475", "diff": "@@ -16,7 +16,7 @@ bytes = b\"01\"\n addr = uctypes.addressof(bytes)\n buf = addr.to_bytes(uctypes.sizeof(desc))\n \n-S = uctypes.struct(desc, uctypes.addressof(buf), uctypes.LITTLE_ENDIAN)\n+S = uctypes.struct(uctypes.addressof(buf), desc, uctypes.LITTLE_ENDIAN)\n \n print(S.ptr[0])\n assert S.ptr[0] == ord(\"0\")\n", "old_path": "tests/extmod/uctypes_ptr_le.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,4)->(19,18))"} -{"repo": "https://:@github.com/IL2HorusTeam/il2fb-ds-airbridge.git", "hash": "bc69d1a47a4994071d0b46c7dd29aebf6a7d4169", "diff": "@@ -60,7 +60,7 @@ class TextFileWatchDog:\n \n def stop(self) -> None:\n with self._stop_lock:\n- self._do_stop = False\n+ self._do_stop = True\n \n def run(self) -> None:\n try:\n", "old_path": "il2fb/ds/airbridge/watch_dog.py", "rewrite": "ReplaceText(target='True' @(63,28)->(63,33))"} -{"repo": "https://:@github.com/south-coast-science/scs_dfe_eng.git", "hash": "060bd36c51a20f4586ed199b1e3996c70b0318a7", "diff": "@@ -49,7 +49,7 @@ class AFE(object):\n self.__wrk_adc = ADS1115(ADS1115.ADDR_WRK, AFE.__RATE)\n self.__aux_adc = ADS1115(ADS1115.ADDR_AUX, AFE.__RATE)\n \n- self.__pt1000_adc = pt1000_conf.adc(MCP342X.GAIN_4, MCP342X.RATE_15) if pt1000_conf else None\n+ self.__pt1000_adc = pt1000_conf.adc(MCP342X.GAIN_4, MCP342X.RATE_15) if pt1000 else None\n \n self.__tconv = self.__wrk_adc.tconv\n \n", "old_path": "scs_dfe/gas/afe.py", "rewrite": "ReplaceText(target='pt1000' @(52,80)->(52,91))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "3f065a27c433b1cb9c5266ed4c28b643419d4466", "diff": "@@ -456,7 +456,7 @@ def mainLoop(config, batchSystem):\n reissueOverLongJobs(updatedJobFiles, jobBatcher, config, batchSystem, childJobFileToParentJob, childCounts)\n logger.info(\"Reissued any over long jobs\")\n \n- hasNoMissingJobs = reissueMissingJobs(updatedJobFiles, jobBatcher, batchSystem, childJobFileToParentJob, config, childCounts)\n+ hasNoMissingJobs = reissueMissingJobs(updatedJobFiles, jobBatcher, batchSystem, childJobFileToParentJob, childCounts, config)\n if hasNoMissingJobs:\n timeSinceJobsLastRescued = time.time()\n else:\n", "old_path": "src/master.py", "rewrite": "ArgSwap(idxs=4<->5 @(459,35)->(459,53))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "a0e4eadb87f09791088b6c11dc6aec0bf8002991", "diff": "@@ -99,7 +99,7 @@ please ensure you re-import targets defined in main\" % self.__class__.__name__)\n \"\"\"Takes a file (as a path) and uploads it to to the global file store, returns\n an ID that can be used to retrieve the file. \n \"\"\"\n- return self.jobStore.writeFile(localFileName, self.job.jobStoreID)\n+ return self.jobStore.writeFile(self.job.jobStoreID, localFileName)\n \n def updateGlobalFile(self, fileStoreID, localFileName):\n \"\"\"Replaces the existing version of a file in the global file store, keyed by the fileStoreID. \n", "old_path": "src/target.py", "rewrite": "ArgSwap(idxs=0<->1 @(102,15)->(102,38))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "06718f425d5981afabd30bcfa39d866edb5c09b4", "diff": "@@ -46,7 +46,7 @@ class Job( object ):\n #The IDs of predecessors that have finished. \n #When len(predecessorsFinished) == predecessorNumber then the\n #job can be run.\n- self.predecessorsFinished = predecessorNumber or set()\n+ self.predecessorsFinished = predecessorsFinished or set()\n \n #The list of successor jobs to run. Successor jobs are stored\n #as 4-tuples of the form (jobStoreId, memory, cpu, predecessorNumber).\n", "old_path": "src/jobTree/job.py", "rewrite": "ReplaceText(target='predecessorsFinished' @(49,36)->(49,53))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "47ec5287d747036c524100cc49fa4262a73293cf", "diff": "@@ -107,7 +107,7 @@ class JobWrapper( object ):\n \"\"\"\n if self.logJobStoreFileID is not None:\n self.clearLogFile(jobStore)\n- self.logJobStoreFileID = jobStore.writeFile( self.jobStoreID, logFile )\n+ self.logJobStoreFileID = jobStore.writeFile( logFile, self.jobStoreID )\n assert self.logJobStoreFileID is not None\n \n def getLogFileHandle( self, jobStore ):\n", "old_path": "src/toil/jobWrapper.py", "rewrite": "ArgSwap(idxs=0<->1 @(110,33)->(110,51))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "cad17f6cbe391264e00675c51a8bfe9221ba1091", "diff": "@@ -159,7 +159,7 @@ class AbstractJobStore( object ):\n break\n \n #Reset the retry count of the jobWrapper \n- if jobWrapper.remainingRetryCount < self._defaultTryCount():\n+ if jobWrapper.remainingRetryCount != self._defaultTryCount():\n jobWrapper.remainingRetryCount = self._defaultTryCount()\n changed = True\n \n", "old_path": "src/toil/jobStores/abstractJobStore.py", "rewrite": "ReplaceText(target='!=' @(162,46)->(162,47))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "dcd5e6f86c0f9d376140f4626e97666348683b73", "diff": "@@ -437,7 +437,7 @@ class ModuleDescriptor(namedtuple('ModuleDescriptor', ('dirPath', 'name'))):\n \n :rtype: toil.resource.Resource\n \"\"\"\n- if self._runningOnWorker():\n+ if not self._runningOnWorker():\n log.warn('The localize() method should only be invoked on a worker.')\n resource = Resource.lookup(self._resourcePath)\n if resource is None:\n", "old_path": "src/toil/resource.py", "rewrite": "ReplaceText(target='not ' @(440,11)->(440,11))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "bee00f3fc4f68af0e7c00b884627f728ca20f792", "diff": "@@ -649,7 +649,7 @@ def main(args=None, stdout=sys.stdout):\n if options.logLevel:\n cwllogger.setLevel(options.logLevel)\n \n- useStrict = not args.not_strict\n+ useStrict = not options.not_strict\n try:\n t = cwltool.load_tool.load_tool(options.cwltool, cwltool.workflow.defaultMakeTool,\n resolver=cwltool.resolver.tool_resolver, strict=useStrict)\n", "old_path": "src/toil/cwl/cwltoil.py", "rewrite": "ReplaceText(target='options' @(652,20)->(652,24))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "231b6665bde956aae5b3469a7147e2358097fca4", "diff": "@@ -143,7 +143,7 @@ class SingleMachineBatchSystem(BatchSystemSupport):\n startTime = time.time() # Time job is started\n popen = None\n statusCode = None\n- forkWorker = not (self.debugWorker and \"_toil_worker\" not in jobCommand)\n+ forkWorker = not (self.debugWorker and \"_toil_worker\" in jobCommand)\n if forkWorker:\n with self.popenLock:\n popen = subprocess.Popen(jobCommand,\n", "old_path": "src/toil/batchSystems/singleMachine.py", "rewrite": "ReplaceText(target=' in ' @(146,61)->(146,69))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "f5054aca67788f976c72b1e3f42334afe3a1dfaa", "diff": "@@ -138,7 +138,7 @@ class AbstractProvisioner(with_metaclass(ABCMeta, object)):\n self._spotBidsMap[nodeType] = bid\n else:\n self.nodeTypes.append(nodeTypeStr)\n- self.nodeShapes.append(self.getNodeShape(nodeType, preemptable=False))\n+ self.nodeShapes.append(self.getNodeShape(nodeTypeStr, preemptable=False))\n \n @staticmethod\n def retryPredicate(e):\n", "old_path": "src/toil/provisioners/abstractProvisioner.py", "rewrite": "ReplaceText(target='nodeTypeStr' @(141,57)->(141,65))"} -{"repo": "https://:@github.com/ionox0/toil.git", "hash": "59f716aed0363adba211e7c1f18ebe3802edb636", "diff": "@@ -108,7 +108,7 @@ class GridEngineBatchSystem(AbstractGridEngineBatchSystem):\n if not self.boss.config.manualMemArgs:\n # for UGE instead of SGE; see #2309\n reqline += ['vf=' + memStr, 'h_vmem=' + memStr]\n- elif self.boss.config.manualMemArgs and sgeArgs:\n+ elif self.boss.config.manualMemArgs and not sgeArgs:\n raise ValueError(\"--manualMemArgs set to True, but TOIL_GRIDGENGINE_ARGS is not set.\"\n \"Please set TOIL_GRIDGENGINE_ARGS to specify memory allocation for \"\n \"your system. Default adds the arguments: vf= h_vmem= \"\n", "old_path": "src/toil/batchSystems/gridengine.py", "rewrite": "ReplaceText(target='not ' @(111,56)->(111,56))"} -{"repo": "https://:@github.com/tkf/railgun.git", "hash": "f49414f39ca7c6bbbd5e000d45db46b77a4e514d", "diff": "@@ -64,7 +64,7 @@ DATA_TEST_CDEC_PARSE = [\n (\"int a[i] =2\", dict_cdec_parse('int', 'a', tuple('i'), 1, 2)),\n (\"int a[i][j]=3\", dict_cdec_parse('int', 'a', tuple('ij'), 2, 3)),\n ('num_i = 10', dict_cdec_parse('int', 'num_i', default=10)),\n- (cmem('obj', DmyCDT), dict_cdec_parse(DmyCDT, 'obj', valtype='object')),\n+ (cmem(DmyCDT, 'obj'), dict_cdec_parse(DmyCDT, 'obj', valtype='object')),\n ]\n \n \n", "old_path": "tests/test_cdata.py", "rewrite": "ArgSwap(idxs=0<->1 @(67,5)->(67,9))"} -{"repo": "https://:@github.com/hubzero/hublib.git", "hash": "8921395b8feda7af6d59ed2133dd1a4068ae9803", "diff": "@@ -486,7 +486,7 @@ def copy_files(errnum, etime, toolname, runName):\n else:\n # nonparametric run. Results are in current working directory.\n # Use the timestamp to copy all newer files to the cacheName.\n- if errnum > 0:\n+ if errnum == 0:\n files = os.listdir('.')\n for f in files:\n if os.path.getmtime(f) > self.start_time:\n", "old_path": "hublib/ui/submit.py", "rewrite": "ReplaceText(target='==' @(489,18)->(489,19))"} -{"repo": "https://:@github.com/tjstretchalot/ignite-simple.git", "hash": "944f32fd5421cb01c0c75be5959277e1a1a2c741", "diff": "@@ -240,7 +240,7 @@ class ParamsTaskQueue(disp.TaskQueue, ps.SweepListener):\n # remove from params_to_task\r\n # add to in_progress\r\n # return built disp.Task\r\n- if cores > self.sweep_cores and self.sweeps:\r\n+ if cores >= self.sweep_cores and self.sweeps:\r\n swp: ParamsTask = self.sweeps.pop()\r\n del self.params_to_sweeps_ind[swp.params]\r\n self._len -= 1\r\n", "old_path": "ignite_simple/gen_sweep/sweeper.py", "rewrite": "ReplaceText(target='>=' @(243,17)->(243,18))"} -{"repo": "https://:@github.com/jessemyers/lxmlbind.git", "hash": "35bb1bbc635ea9dca813dffe25165b14576c4a00", "diff": "@@ -75,7 +75,7 @@ class Base(object):\n child = etree.SubElement(parent, head)\n else:\n return None\n- return self.search(child, tail, create) if tail else child\n+ return self.search(tail, child, create) if tail else child\n \n def __str__(self):\n \"\"\"\n", "old_path": "lxmlbind/base.py", "rewrite": "ArgSwap(idxs=0<->1 @(78,15)->(78,26))"} -{"repo": "https://:@github.com/dieterv/etk.docking.git", "hash": "f7e423f2e5d2a68183238c2d1eb39dcb4cf7ec30", "diff": "@@ -521,7 +521,7 @@ class DockPaned(gtk.Container):\n width = max(width, w)\n height += h\n # Store the minimum weight for usage in do_size_allocate\n- item.min_size = w\n+ item.min_size = h\n \n # Add handles\n if self._orientation == gtk.ORIENTATION_HORIZONTAL:\n", "old_path": "lib/etk/docking/dockpaned.py", "rewrite": "ReplaceText(target='h' @(524,32)->(524,33))"} -{"repo": "https://:@github.com/isnok/asciidrumming.git", "hash": "66e35371a4b96774d931516f7131e19ccf6e2c43", "diff": "@@ -42,7 +42,7 @@ def assemble_pieces(phrases, pieces):\n def clean_phrases(phrases):\n for phrase in phrases.values():\n phrase['pattern'] = ''.join(phrase['pattern']).replace(' ', '')\n- phrase['length'] = (len(phrase['pattern']) // phrase['beat']) + bool(len(phrase['pattern']) % phrase['beat'])\n+ phrase['length'] = (len(phrase['pattern']) / phrase['beat']) + bool(len(phrase['pattern']) % phrase['beat'])\n \n \n def assemble_phrases(config):\n", "old_path": "asciidrumming/assemble.py", "rewrite": "ReplaceText(target='/' @(45,51)->(45,53))"} -{"repo": "https://:@github.com/FedericoCinus/WoMG.git", "hash": "75addc91cd520c8e7ebf8975ceaf24b79b2cf49f", "diff": "@@ -390,7 +390,7 @@ class LDA(TLTTopicModel):\n saved_model_fname = str(hash(saved_model))+'.model'\n if os.path.exists(saved_model_fname):\n #lda_model = pickle.load(os.path.abspath(saved_model))\n- lda_model = gensim.models.ldamodel.LdaModel.load(os.path.abspath(saved_model))\n+ lda_model = gensim.models.ldamodel.LdaModel.load(os.path.abspath(saved_model_fname))\n else:\n lda_model = gensim.models.ldamodel.LdaModel(corpus=corpus,\n id2word=self.dictionary,\n", "old_path": "src/test_version/topic/lda.py", "rewrite": "ReplaceText(target='saved_model_fname' @(393,77)->(393,88))"} -{"repo": "https://:@github.com/waikato-datamining/wai-annotations.git", "hash": "1c1e29a44b802c45c83af7278b1637aa98855a68", "diff": "@@ -63,4 +63,4 @@ def get_all_sharded_filenames(filename: str) -> Tuple[str, ...]:\n if shards == 0:\n raise ValueError(f\"{filename} is not a shard filename\")\n \n- return tuple(format_sharded_filename(base_name, shards, i) for i in range(index))\n+ return tuple(format_sharded_filename(base_name, shards, i) for i in range(shards))\n", "old_path": "src/wai/annotations/tf/utils/_sharded_filenames.py", "rewrite": "ReplaceText(target='shards' @(66,78)->(66,83))"} -{"repo": "https://:@github.com/broundal/Pytolemaic.git", "hash": "c407b7b2410fe04641d0261ca209a2e57a728ded", "diff": "@@ -220,7 +220,7 @@ class SensitivityAnalysis():\n vulnerability_report = self._vulnerability_report(\n shuffled_sensitivity=self.shuffled_sensitivity,\n missing_sensitivity=self.missing_sensitivity,\n- shuffled_sensitivity_stats=missing_stats_report)\n+ shuffled_sensitivity_stats=shuffle_stats_report)\n \n return SensitivityFullReport(\n shuffle_report=self.shuffled_sensitivity,\n", "old_path": "pytolemaic/analysis_logic/model_analysis/sensitivity/sensitivity.py", "rewrite": "ReplaceText(target='shuffle_stats_report' @(223,39)->(223,59))"} -{"repo": "https://:@github.com/damoti/shipmaster.git", "hash": "f81614acecb36da1343ec9e114679b06f0d8b0ba", "diff": "@@ -94,7 +94,7 @@ class LayerBase:\n # Only tag image if container was built successfully.\n repository, tag = self.image_name, None\n if ':' in repository:\n- repository, tag = tag.split(':')\n+ repository, tag = repository.split(':')\n conf = client.create_container_config(self.image_name, cmd, working_dir=APP_PATH)\n client.commit(container, repository=repository, tag=tag, conf=conf)\n client.remove_container(container)\n", "old_path": "shipmaster/base/builder.py", "rewrite": "ReplaceText(target='repository' @(97,34)->(97,37))"} -{"repo": "https://:@github.com/ldo/pybidi.git", "hash": "ef93e8fdd0220fb446238060c7b4f30422251943", "diff": "@@ -1352,7 +1352,7 @@ def remove_bidi_marks(string, positions_to_this = None, position_from_this_list\n if position_from_this_list != None :\n c_position_from_this_list = seq_to_ct(position_from_this_list, FRIBIDI.StrIndex)\n else :\n- position_from_this_list = None\n+ c_position_from_this_list = None\n #end if\n if embedding_levels != None :\n c_embedding_levels = seq_to_ct(embedding_levels, FRIBIDI.StrIndex)\n", "old_path": "fribidi.py", "rewrite": "ReplaceText(target='c_position_from_this_list' @(1355,8)->(1355,31))"} -{"repo": "https://:@github.com/wbolster/cardinality.git", "hash": "cfc729bc337f8d796d7bfe11a64ef3a3d516575b", "diff": "@@ -68,7 +68,7 @@ def between(min, max, iterable):\n \"\"\"\n if min < 0:\n raise ValueError(\"'min' must be positive (or zero)\")\n- if min < 0:\n+ if max < 0:\n raise ValueError(\"'max' must be positive (or zero)\")\n if min > max:\n raise ValueError(\"'max' must be greater or equal than 'min'\")\n", "old_path": "cardinality.py", "rewrite": "ReplaceText(target='max' @(71,7)->(71,10))"} -{"repo": "https://:@github.com/zongzhenh/pymysql-pool.git", "hash": "66b07cdf844554245cf209a72de89bd17133269c", "diff": "@@ -169,7 +169,7 @@ class Pool(object):\n if self.ping_check:\n now = int(time())\n timeout = now\n- if isinstance(int, self.ping_check):\n+ if isinstance(self.ping_check, int):\n timeout = timeout - self.ping_check\n if not hasattr(c, '__ping_check_timestamp'):\n c.__ping_check_timestamp = now\n", "old_path": "pymysqlpool/pool.py", "rewrite": "ArgSwap(idxs=0<->1 @(172,15)->(172,25))"} -{"repo": "https://:@github.com/kanzure/python-vba-wrapper.git", "hash": "98edf03512c8f7960f10fa615867269cdf0821d6", "diff": "@@ -315,7 +315,7 @@ class VBA(object):\n # 29 registers\n buf = (ctypes.c_int32 * self.register_count)()\n buf[:] = registers\n- self._vba.set_registers(registers)\n+ self._vba.set_registers(buf)\n \n def _get_max_save_size(self):\n return self._vba.get_max_save_size()\n", "old_path": "vba_wrapper/core.py", "rewrite": "ReplaceText(target='buf' @(318,32)->(318,41))"} -{"repo": "https://:@github.com/severb/flowy.git", "hash": "82cbab85d672880b7c3db69b5e1707e90da7686e", "diff": "@@ -191,7 +191,7 @@ class DecisionPoller(object):\n elif e_type == 'StartChildWorkflowExecutionFailed':\n SCWEFEA = 'startChildWorkflowExecutionFailedEventAttributes'\n id = _subworkflow_id(e[SCWEFEA]['workflowId'])\n- reason = e[SCWEIEA]['cause']\n+ reason = e[SCWEFEA]['cause']\n errors[id] = reason\n elif e_type == 'TimerStarted':\n id = e['timerStartedEventAttributes']['timerId']\n", "old_path": "flowy/swf/poller.py", "rewrite": "ReplaceText(target='SCWEFEA' @(194,27)->(194,34))"} -{"repo": "https://:@github.com/brthor/codetransformer-py2.git", "hash": "7c327683df810265d01a995d2704c9f8218b0ef7", "diff": "@@ -141,7 +141,7 @@ class Instruction(InstructionMeta._marker, metaclass=InstructionMeta):\n 'little',\n )\n \n- yield cls(arg)\n+ yield instr(arg)\n \n @classmethod\n def from_opcode(cls, opcode):\n", "old_path": "codetransformer/instructions.py", "rewrite": "ReplaceText(target='instr' @(144,18)->(144,21))"} -{"repo": "https://:@github.com/bacadra/bacadra.git", "hash": "74346189dfe3cac99821fd0a32ddeb3290886c4d", "diff": "@@ -1256,7 +1256,7 @@ class texme(TeXM, object, metaclass=texmemeta):\n elif type(inherit)==str:\n self.store(inherit, tex)\n elif inherit is False:\n- self.data = [tex + '\\n%']\n+ self.data += [tex + '\\n%']\n if self.echo:\n print('[texme.' + name + ']\\n' + tex)\n \n", "old_path": "bacadra/pinky/texme/texme.py", "rewrite": "ReplaceText(target='+=' @(1259,22)->(1259,23))"} -{"repo": "https://:@github.com/bacadra/bacadra.git", "hash": "3e4cd62c6a0769ea886aaae2104aeb5dff18dbea", "diff": "@@ -1131,7 +1131,7 @@ class texme(metaclass=texmemeta):\n \n return self.add(\n submodule = _name1,\n- code = code,\n+ code = tex,\n inherit = inherit,\n echo = echo,\n )\n", "old_path": "bacadra/pinky/texme/texme.py", "rewrite": "ReplaceText(target='tex' @(1134,24)->(1134,28))"} -{"repo": "https://:@github.com/ulif/diceware-list.git", "hash": "744223382d439315c8195d3ddff170e3542d80f0", "diff": "@@ -92,4 +92,4 @@ def local_android_download(request, monkeypatch, tmpdir):\n monkeypatch.setattr(\n \"diceware_list.libwordlist.AndroidWordList.base_url\",\n fake_base_url)\n- return dictfile\n+ return tmpdir\n", "old_path": "tests/conftest.py", "rewrite": "ReplaceText(target='tmpdir' @(95,11)->(95,19))"} -{"repo": "https://:@github.com/AeGean-Studio/pysolr_aio.git", "hash": "056f4e2d4284fc740bcc7862fabab673ea1a439b", "diff": "@@ -747,7 +747,7 @@ class Solr(object):\n m = force_unicode(m)\n \n end_time = time.time()\n- self.log.debug(\"Built add request of %s docs in %0.2f seconds.\", len(docs), end_time - start_time)\n+ self.log.debug(\"Built add request of %s docs in %0.2f seconds.\", len(message), end_time - start_time)\n return self._update(m, commit=commit, waitFlush=waitFlush, waitSearcher=waitSearcher)\n \n def delete(self, id=None, q=None, commit=True, waitFlush=None, waitSearcher=None):\n", "old_path": "pysolr.py", "rewrite": "ReplaceText(target='message' @(750,77)->(750,81))"} -{"repo": "https://:@bitbucket.org/nidusfr/grapheekdb.git", "hash": "4f9ca53b0ea54eb7b531290818619a0a2082750f", "diff": "@@ -49,7 +49,7 @@ class Optimizer(object):\n def get_kind_ids(self, txn, kind):\n ENTITY_COUNTER = METADATA_VERTEX_COUNTER if kind == KIND_VERTEX else METADATA_EDGE_COUNTER\n METADATA_ID_LIST_PREFIX = METADATA_VERTEX_ID_LIST_PREFIX if kind == KIND_VERTEX else METADATA_EDGE_ID_LIST_PREFIX\n- limit = int(self._graph._get(None, ENTITY_COUNTER)) / CHUNK_SIZE\n+ limit = int(self._graph._get(None, ENTITY_COUNTER)) // CHUNK_SIZE\n keys = [build_key(METADATA_ID_LIST_PREFIX, i) for i in range(0, limit + 1)]\n list_entity_ids = self._graph._bulk_get_lst(txn, keys)\n for entity_ids in list_entity_ids:\n", "old_path": "grapheekdb/backends/data/optimizer.py", "rewrite": "ReplaceText(target='//' @(52,60)->(52,61))"} -{"repo": "https://:@github.com/AnonSolutions/django-indy-community.git", "hash": "274dcaf28dd3b433f5205f8bef13063a09047fa7", "diff": "@@ -559,7 +559,7 @@ def send_claims_for_proof_request(wallet, connection, my_conversation, credentia\n except:\n raise\n \n- return proof_data\n+ return my_conversation\n \n \n ######################################################################\n", "old_path": "indy_community_demo/indy_community/agent_utils.py", "rewrite": "ReplaceText(target='my_conversation' @(562,11)->(562,21))"} -{"repo": "https://:@github.com/AnonSolutions/django-indy-community.git", "hash": "7c1d4634416f608a4886444e51691036e6ba5e70", "diff": "@@ -336,7 +336,7 @@ def check_connection_status(wallet, connection, initialize_vcx=True):\n my_connection.status = return_state\n my_connection.save()\n \n- check_connection_callback(connection, prev_status)\n+ check_connection_callback(my_connection, prev_status)\n except:\n raise\n finally:\n", "old_path": "indy_community_demo/indy_community/agent_utils.py", "rewrite": "ReplaceText(target='my_connection' @(339,34)->(339,44))"} -{"repo": "https://:@github.com/jisson/django-simple-domain.git", "hash": "794a491f075a8d43fbc12f18aa6ace33a590bc86", "diff": "@@ -48,7 +48,7 @@ class DjangoSimpleSiteConfig(AppConfig):\n if SIMPLE_DOMAIN_ENABLED is True\n \"\"\"\n std_logger.info(\"Checking if module should be enabled...\")\n- return simple_site_settings.ENABLED and simple_site_utils.is_item_in_list_a_in_list_b(\n+ return simple_site_settings.ENABLED and not simple_site_utils.is_item_in_list_a_in_list_b(\n simple_site_settings.DEACTIVATING_COMMANDS, sys.argv\n )\n \n", "old_path": "django_simple_domain/app.py", "rewrite": "ReplaceText(target='not ' @(51,48)->(51,48))"} -{"repo": "https://:@github.com/pkumza/libradar.git", "hash": "5c3676fd09674f198c20b17d4462e0b6e528bc30", "diff": "@@ -318,7 +318,7 @@ class Tree(object):\n # JSON support\n utg_lib_obj = dict() # untagged library object\n utg_lib_obj[\"Package\"] = node.pn\n- utg_lib_obj[\"Standard Package\"] = u\n+ utg_lib_obj[\"Standard Package\"] = a\n utg_lib_obj[\"Library\"] = \"Unknown\"\n utg_lib_obj[\"Popularity\"] = int(c)\n utg_lib_obj[\"Weight\"] = node.weight\n", "old_path": "LibRadar/dex_tree.py", "rewrite": "ReplaceText(target='a' @(321,42)->(321,43))"} -{"repo": "https://:@github.com/moremoban/gease.git", "hash": "492b0e368076bf3f48eafce06e4eb960d9188360", "diff": "@@ -83,5 +83,5 @@ def which_org_has(repo):\n org_repo = Repo(org_info['repos_url'])\n for arepo in org_repo.get_all_repos():\n if repo == arepo['name']:\n- return arepo['login']\n+ return org_info['login']\n return None\n", "old_path": "gease/release.py", "rewrite": "ReplaceText(target='org_info' @(86,23)->(86,28))"} -{"repo": "https://:@github.com/eflynch/dspy.git", "hash": "27d706cdf4e25c5750560d957e34319cfd51e145", "diff": "@@ -21,7 +21,7 @@ def rechannel(buf, in_channels, out_channels):\n in_channel = (in_channel + 1) % in_channels\n elif out_channels > in_channels:\n out_channel = 0\n- for in_channel in range(out_channels):\n+ for in_channel in range(in_channels):\n output[out_channel::out_channels] += buf[in_channel::in_channels]\n out_channel = (out_channel + 1) % out_channels\n \n", "old_path": "dspy/lib.py", "rewrite": "ReplaceText(target='in_channels' @(24,32)->(24,44))"} -{"repo": "https://:@gitlab.com/AmosEgel/smuthi.git", "hash": "3de13ee6ce0382c2657d94d62dab15c6bc0dca0f", "diff": "@@ -168,7 +168,7 @@ class PiecewiseFieldExpansion(FieldExpansion):\n else:\n pfe_sum.expansion_list.append(fex)\n if not added:\n- pfe_sum.expansion_list.append(fex)\n+ pfe_sum.expansion_list.append(other)\n \n return pfe_sum\n \n", "old_path": "smuthi/field_expansion.py", "rewrite": "ReplaceText(target='other' @(171,46)->(171,49))"} -{"repo": "https://:@github.com/inkeye/cyscore.git", "hash": "f7b659afcfa4dce73a8915e8fccd916a68248d83", "diff": "@@ -40,4 +40,4 @@ class Score:\n \"--nodisplays\",\n orcname,\n sconame])\n- return fname\n+ return outname\n", "old_path": "cyscore/score.py", "rewrite": "ReplaceText(target='outname' @(43,15)->(43,20))"} -{"repo": "https://:@github.com/DMSC-Instrument-Data/lewis.git", "hash": "b2797261ac0f3ab9f02dc67f28db1620732d3f0b", "diff": "@@ -101,7 +101,7 @@ class TestAdapterCollection(unittest.TestCase):\n collection.device = 'foo'\n \n self.assertEqual(mock_adapter1.device, 'foo')\n- self.assertEqual(mock_adapter1.device, 'foo')\n+ self.assertEqual(mock_adapter2.device, 'foo')\n \n mock_adapter3 = MagicMock()\n mock_adapter3.device = 'other'\n", "old_path": "test/test_core_adapters.py", "rewrite": "ReplaceText(target='mock_adapter2' @(104,25)->(104,38))"} -{"repo": "https://:@github.com/DMSC-Instrument-Data/lewis.git", "hash": "50911fba54fc6f9b4099191c7c81f52f66a6ba47", "diff": "@@ -82,7 +82,7 @@ class ExposedObject(object):\n \n exposed_members = members if members else self._public_members()\n exclude = list(exclude or [])\n- if not exclude_inherited:\n+ if exclude_inherited:\n for base in inspect.getmro(type(obj))[1:]:\n exclude += dir(base)\n \n", "old_path": "lewis/core/control_server.py", "rewrite": "ReplaceText(target='' @(85,11)->(85,15))"} -{"repo": "https://:@github.com/fafhrd91/player.git", "hash": "8bffaa237459e1d9a79c8ba6cd01a482f72ce2f8", "diff": "@@ -41,7 +41,7 @@ def add_layer(cfg, layer, name='', path='', description=''):\n layers.insert(0, intr)\n \n cfg.action(discr, introspectables=(intr,))\n- log.info(\"Add layer: %s path:%s\"%(layer, directory))\n+ log.info(\"Add layer: %s path:%s\"%(layer, path))\n \n \n def add_layers(cfg, name='', path='', description=''):\n", "old_path": "player/layer.py", "rewrite": "ReplaceText(target='path' @(44,45)->(44,54))"} -{"repo": "https://:@github.com/clumsyme/ziroom_watcher.git", "hash": "91498a31498833d88401888b7cfc7c32cffb7464", "diff": "@@ -58,7 +58,7 @@ class Watcher:\n self.info_url, headers=self.headers)\n info = json.loads(response.text)\n status = info['data']['status']\n- if status == 'tzpzz':\n+ if status != 'tzpzz':\n self.sendmail('\u623f\u6e90\u72b6\u6001\u5df2\u66f4\u65b0', '\u72b6\u6001\u66f4\u65b0\u4e86')\n else:\n raise NotDoneError(status)\n", "old_path": "ziroom_watcher.py", "rewrite": "ReplaceText(target='!=' @(61,18)->(61,20))"} -{"repo": "https://:@github.com/kovpas/itc.cli.git", "hash": "ed0f4e9946469673f2d75ca713ade2b69ac19c25", "diff": "@@ -244,7 +244,7 @@ class ITCServerParser(BaseParser):\n \n for ratingTr in appRatingTable:\n inputs = ratingTr.xpath('.//input')\n- if len(inputs) != 2:\n+ if len(inputs) < 2:\n continue\n appRating = {'name': inputs[0].attrib['name'], 'ratings': []}\n for inpt in inputs:\n", "old_path": "itc/parsers/serverparser.py", "rewrite": "ReplaceText(target='<' @(247,27)->(247,29))"} -{"repo": "https://:@github.com/seebye/media-layer.git", "hash": "e906f0a4648683f27aa99a5a549020064052edd5", "diff": "@@ -170,7 +170,7 @@ class ForcedCoverImageScaler(DistortImageScaler, OffsetImageScaler):\n width: int, height: int):\n width, height = self.calculate_resolution(image, width, height)\n image_width, image_height = image.width, image.height\n- if image_width < image_height:\n+ if image_width > image_height:\n image_height = int(image_height * width / image_width)\n image_width = width\n else:\n", "old_path": "ueberzug/scaling.py", "rewrite": "ReplaceText(target='>' @(173,23)->(173,24))"} -{"repo": "https://:@github.com/lvapeab/multimodal_keras_wrapper.git", "hash": "965b970084e59e945036df9cc7cd836d052cb279", "diff": "@@ -1286,7 +1286,7 @@ class Dataset(object):\n elif(type_out == 'binary'):\n y = np.array(y).astype(np.uint8)\n elif(type_out == 'text'):\n- y = self.loadText(y, self.vocabulary[id_out], self.max_text_len[id_out], self.text_offset[id_in])\n+ y = self.loadText(y, self.vocabulary[id_out], self.max_text_len[id_out], self.text_offset[id_out])\n #if max_len == 0:\n y_aux = np.zeros(list(y.shape)+[self.n_classes_text[id_out]]).astype(np.uint8)\n for idx in range(y.shape[0]):\n", "old_path": "keras_wrapper/dataset.py", "rewrite": "ReplaceText(target='id_out' @(1289,110)->(1289,115))"} -{"repo": "https://:@github.com/mic159/komodo.git", "hash": "9b5fcd652ace81e3ee53bedec1eadc1189b08efc", "diff": "@@ -94,7 +94,7 @@ class Server(object):\n scheduler = Scheduler()\n if not self.without_checks:\n for name, server in servers.items():\n- scheduler.register(name, server)\n+ scheduler.register(server, name)\n \n checks_thread = threading.Thread(target=self.start_checks, args=(scheduler, self.thread_stopper, ))\n checks_thread.daemon = True\n", "old_path": "python_dashing/server/server.py", "rewrite": "ArgSwap(idxs=0<->1 @(97,20)->(97,38))"} -{"repo": "https://:@github.com/mic159/komodo.git", "hash": "10d4ba791b59d5873a561d58ee8a096ad104a581", "diff": "@@ -32,7 +32,7 @@ class JsonDataStore(object):\n \n def save(self):\n with open(self.location, 'wb') as fle:\n- return json.dump(fle, self.data)\n+ return json.dump(self.data, fle)\n \n def set(self, prefix, key, value):\n self.data[prefix][key] = value\n", "old_path": "dashmat/datastore.py", "rewrite": "ArgSwap(idxs=0<->1 @(35,19)->(35,28))"} -{"repo": "https://:@github.com/krvss/graph-talk.git", "hash": "f91b24ea9c154f6659faecc806f562ef1ee448e3", "diff": "@@ -103,6 +103,6 @@ def get_callable(c):\n def tuples(*args):\n res = ()\n for arg in args:\n- res += tuple(arg) if is_list(args) else (arg, )\n+ res += tuple(arg) if is_list(arg) else (arg, )\n \n return res\n", "old_path": "utils.py", "rewrite": "ReplaceText(target='arg' @(106,37)->(106,41))"} -{"repo": "https://:@github.com/reichlab/zoltpy.git", "hash": "8653aa031af8e1dfd2a33e63eb25b642ab719acd", "diff": "@@ -70,7 +70,7 @@ def upload_forecast(project_name, model_name, timezero_date, forecast_csv_file):\n print('* working with', model)\n \n # upload a new forecast\n- upload_file_job = model.upload_forecast(timezero_date, forecast_csv_file)\n+ upload_file_job = model.upload_forecast(forecast_csv_file, timezero_date)\n busy_poll_upload_file_job(upload_file_job)\n \n # get the new forecast from the upload_file_job by parsing the generic 'output_json' field\n", "old_path": "zoltpy/functions.py", "rewrite": "ArgSwap(idxs=0<->1 @(73,22)->(73,43))"} -{"repo": "https://:@github.com/awbirdsall/popmodel.git", "hash": "918e2083f541a4c85145fea3f007ed646bc60d19", "diff": "@@ -34,7 +34,7 @@ def k_solved(hpar, par):\n def k_sweep(hpar, par):\n par_sweep = deepcopy(par)\n par_sweep['sweep']['dosweep'] = True\n- k_sweep = pm.KineticsRun(hpar, **par)\n+ k_sweep = pm.KineticsRun(hpar, **par_sweep)\n k_sweep.solveode()\n return k_sweep\n \n", "old_path": "tests/test_main.py", "rewrite": "ReplaceText(target='par_sweep' @(37,37)->(37,40))"} -{"repo": "https://:@github.com/jezeniel/jellyfish-wheel.git", "hash": "22e790ad922b0122ad40293d594d32e2819d6387", "diff": "@@ -422,7 +422,7 @@ def metaphone(s):\n elif next == 'h' and nextnext and nextnext not in 'aeiou':\n i += 1\n elif c == 'h':\n- if i == 0 or next in 'aeiou' or s[i-1] in 'aeiou':\n+ if i == 0 or next in 'aeiou' or s[i-1] not in 'aeiou':\n result.append('h')\n elif c == 'k':\n if i == 0 or s[i-1] != 'c':\n", "old_path": "jellyfish/_jellyfish.py", "rewrite": "ReplaceText(target=' not in ' @(425,50)->(425,54))"} -{"repo": "https://:@github.com/tourbillonpy/tourbillon-log.git", "hash": "cee5b1f59349b7b95b7d9c406b36eab609ef386e", "diff": "@@ -27,7 +27,7 @@ def get_logfile_metrics(agent):\n db_config['duration'],\n db_config['replication'],\n db_config['name'])\n- logger.info('database \"%s\" created successfully', config['name'])\n+ logger.info('database \"%s\" created successfully', db_config['name'])\n except:\n pass\n \n", "old_path": "tourbillon/log/log.py", "rewrite": "ReplaceText(target='db_config' @(30,58)->(30,64))"} -{"repo": "https://:@github.com/OriHoch/ckanext-upload_via_email.git", "hash": "9f12f3b51b7a1ac8db665a673f8cca571a840529", "diff": "@@ -33,7 +33,7 @@ def get_sender_organization_id(from_email, to_email, allowed_senders, config):\n default_sender_organization_id = config.get('default_sender_organization_id')\n if default_sender_to_address and default_sender_organization_id:\n default_sender_to_address = default_sender_to_address.lower().strip()\n- if is_email_match(from_email, default_sender_to_address):\n+ if is_email_match(to_email, default_sender_to_address):\n return default_sender_organization_id\n return None\n \n", "old_path": "ckanext/upload_via_email/pipelines/download_messages.py", "rewrite": "ReplaceText(target='to_email' @(36,30)->(36,40))"} -{"repo": "https://:@github.com/portfors-lab/sparkle.git", "hash": "5be995abef4100cdce6e2feb5cee977476140a84", "diff": "@@ -62,7 +62,7 @@ class ProtocolRunner(ListAcquisitionRunner):\n self.avg_buffer[irep,:] = response\n if irep == self.nreps -1:\n avg_response = self.avg_buffer.mean(axis=0)\n- self.datafile.append(self.current_dataset_name, response)\n+ self.datafile.append(self.current_dataset_name, avg_response)\n self.avg_buffer = np.zeros_like(self.avg_buffer)\n else:\n self.datafile.append(self.current_dataset_name, response)\n", "old_path": "sparkle/run/protocol_runner.py", "rewrite": "ReplaceText(target='avg_response' @(65,68)->(65,76))"} -{"repo": "https://:@github.com/a1ezzz/wasp-general.git", "hash": "5795c4cb45c70e120a94c0dd3598762505131b29", "diff": "@@ -59,7 +59,7 @@ def test_abstract():\n \tpytest.raises(NotImplementedError, WSignalSourceProto.remove_callback, None, 'signal', C())\n \n \tpytest.raises(TypeError, WSignalCallbackProto)\n-\tpytest.raises(NotImplementedError, WSignalCallbackProto.__call__, None, 'signal', S(), 1)\n+\tpytest.raises(NotImplementedError, WSignalCallbackProto.__call__, None, S(), 'signal', 1)\n \n \tpytest.raises(TypeError, WSignalProxyProto.ProxiedMessageProto)\n \tpytest.raises(NotImplementedError, WSignalProxyProto.ProxiedMessageProto.is_weak, None)\n", "old_path": "tests/wasp_general_signals_proto_test.py", "rewrite": "ArgSwap(idxs=3<->4 @(62,1)->(62,14))"} -{"repo": "https://:@github.com/drasmuss/hessianfree.git", "hash": "883099364fb68ec67b538fffa804a3783d23ad02", "diff": "@@ -80,7 +80,7 @@ class CrossEntropy(LossFunction):\n class ClassificationError(LossFunction):\n @output_loss\n def loss(self, output, targets):\n- return (np.argmax(output, axis=-1) ==\n+ return (np.argmax(output, axis=-1) !=\n np.argmax(np.nan_to_num(targets), axis=-1))\n \n # note: not defining d_loss or d2_loss; classification error should only\n", "old_path": "hessianfree/loss_funcs.py", "rewrite": "ReplaceText(target='!=' @(83,43)->(83,45))"} -{"repo": "https://:@github.com/GalakVince/dermoscopic_symmetry.git", "hash": "cbad346417689f3a698035f0393fef710ae6dedd", "diff": "@@ -338,7 +338,7 @@ def classifierTrainer(maxLeafNodes, data=None, data_backup_file='patchesDataSet/\n clf: The fitted classifier.\n acc: The accuracy score of the classifier\n \"\"\"\n- if data is not None:\n+ if data is None:\n data = pd.read_csv(f\"{package_path()}/data/patchesDataSet/{data_backup_file}.csv\", index_col=False)\n features = list(data)\n del features[0]\n", "old_path": "dermoscopic_symmetry/classifier_feeder.py", "rewrite": "ReplaceText(target=' is ' @(341,11)->(341,19))"} -{"repo": "https://:@github.com/interputed/grapi.git", "hash": "8174ec31bc0572ec562f147a2becc65498774d56", "diff": "@@ -47,7 +47,7 @@ class Grapi:\n keys = kwargs.keys()\n endpoints.check(keys, self._endpoint)\n \n- if date_step:\n+ if not date_step:\n return self._methods(method.lower())(**kwargs)\n \n else:\n", "old_path": "grapi/grapi.py", "rewrite": "ReplaceText(target='not ' @(50,11)->(50,11))"} -{"repo": "https://:@github.com/chen0040/pycompressor.git", "hash": "273f7e1592566e82b62afa250d29c08b0bbcacdd", "diff": "@@ -19,7 +19,7 @@ class Node(object):\n \n \n def char_at(text, i):\n- if len(text) - 1 <= i:\n+ if len(text) - 1 < i:\n return -1\n return ord(text[i])\n \n", "old_path": "pycompressor/huffman.py", "rewrite": "ReplaceText(target='<' @(22,21)->(22,23))"} -{"repo": "https://:@github.com/scattering-central/saxskit.git", "hash": "e696feaed288160cf35a34d4f43de44e4af4b90f", "diff": "@@ -114,7 +114,7 @@ def train_classification_models(data,hyper_parameters_search=False):\n print('--> average unweighted f1: {}, accuracy: {}'.format(f1_score,acc))\n else:\n print('--> {} untrainable- default value: {}'.format(model_id,model.default_val))\n- cls_models['main_classifiers'][struct_nm] = model\n+ cls_models['main_classifiers'][model_id] = model\n \n # There are 2**n possible outcomes for n binary classifiers.\n # For the (2**n)-1 non-null outcomes, a second classifier is used,\n", "old_path": "xrsdkit/models/train.py", "rewrite": "ReplaceText(target='model_id' @(117,39)->(117,48))"} -{"repo": "https://:@github.com/scattering-central/saxskit.git", "hash": "4e384359736c5191648f3a5971ccc7d34fb98b27", "diff": "@@ -413,7 +413,7 @@ class XRSDFitGUI(object):\n # TODO: toggles for hyperparam selection? feature selection?\n dataset_dir = self._vars['io_control']['dataset_dir'].get()\n output_dir = self._vars['io_control']['output_dir'].get() \n- model_config_path = os.path.join(dataset_dir,'model_config.yml')\n+ model_config_path = os.path.join(output_dir,'model_config.yml')\n self._print_to_listbox(display,'LOADING DATASET FROM: {}'.format(dataset_dir))\n df, idx_df = read_local_dataset(dataset_dir,downsampling_distance=1.,\n message_callback=partial(self._print_to_listbox,display))\n", "old_path": "xrsdkit/visualization/gui.py", "rewrite": "ReplaceText(target='output_dir' @(416,41)->(416,52))"} -{"repo": "https://:@github.com/rohinkumar/correlcalc.git", "hash": "9a13668ff7ef2396ce22175d3f21599af7279766", "diff": "@@ -18,7 +18,7 @@ def generate_rand_from_pdf(pdf, x_grid, N):\n cdf = cdf / cdf[-1]\n values = np.random.rand(N)\n value_bins = np.searchsorted(cdf, values)\n- random_from_cdf, nz = x_grid[value_bins], cdf[value_bins]\n+ random_from_cdf, nz = x_grid[value_bins], pdf[value_bins]\n return random_from_cdf, nz\n \n \n", "old_path": "correlcalc/genrand.py", "rewrite": "ReplaceText(target='pdf' @(21,46)->(21,49))"} -{"repo": "https://:@github.com/deepfield/builder.git", "hash": "4410007757b043e278d5a9a8deec2ae7cd5da2b6", "diff": "@@ -489,7 +489,7 @@ class Job(object):\n str_targets = collections.defaultdict(list)\n for target_type, targets in targets_dict.iteritems():\n for target in targets:\n- str_dependencies[target_type].append(target.unexpanded_id)\n+ str_targets[target_type].append(target.unexpanded_id)\n \n this_dict = {\"depends\": str_dependencies, \"targets\": str_targets}\n \n", "old_path": "jobs.py", "rewrite": "ReplaceText(target='str_targets' @(492,16)->(492,32))"} -{"repo": "https://:@github.com/allonkleinlab/scrublet.git", "hash": "afe329d90fa0bddadccf9e707112f835fe83e46e", "diff": "@@ -66,7 +66,7 @@ def sparse_zscore(E, gene_mean=None, gene_stdev=None):\n ''' z-score normalize each column of E '''\n \n if gene_mean is None:\n- gene_stdev = E.mean(0)\n+ gene_mean = E.mean(0)\n if gene_stdev is None:\n gene_stdev = np.sqrt(sparse_var(E))\n return sparse_multiply((E - gene_mean).T, 1/gene_stdev).T\n", "old_path": "src/scrublet/helper_functions.py", "rewrite": "ReplaceText(target='gene_mean' @(69,8)->(69,18))"} -{"repo": "https://:@github.com/SheldonYS/Zappa.git", "hash": "513bfe44f24cee37e8dc720f3a55c8f8d0c73163", "diff": "@@ -1053,7 +1053,7 @@ class Zappa(object):\n if count:\n # We can end up in a situation where we have more resources being created\n # than anticipated.\n- if (count - current_resources) >= 0:\n+ if (count - current_resources) > 0:\n progress.update(count - current_resources)\n current_resources = count\n progress.close()\n", "old_path": "zappa/zappa.py", "rewrite": "ReplaceText(target='>' @(1056,51)->(1056,53))"} -{"repo": "https://:@github.com/moser/pylint.git", "hash": "4d29d8e4559938bef1eb52b1613d2596aeba395b", "diff": "@@ -174,7 +174,7 @@ class ClassDiagram(Figure, FilterMixIn):\n value = value._proxied\n try:\n ass_obj = self.object_from_node(value)\n- self.add_relationship(obj, ass_obj, 'association', name)\n+ self.add_relationship(ass_obj, obj, 'association', name)\n except KeyError:\n continue\n \n", "old_path": "pyreverse/diagrams.py", "rewrite": "ArgSwap(idxs=0<->1 @(177,24)->(177,45))"} -{"repo": "https://:@github.com/moser/pylint.git", "hash": "2ac99b2a24d44a3b56c035a889f6bd78f4f41b7f", "diff": "@@ -242,7 +242,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'\n if node.name.startswith('cb_') or \\\n node.name.endswith('_cb'):\n continue\n- self.add_message('W0613', args=name, node=node)\n+ self.add_message('W0613', args=name, node=stmt)\n else:\n self.add_message('W0612', args=name, node=stmt)\n \n", "old_path": "checkers/variables.py", "rewrite": "ReplaceText(target='stmt' @(245,58)->(245,62))"} -{"repo": "https://:@github.com/moser/pylint.git", "hash": "dbb2f3e65b9a452cf981e1bda318ec019b43bd8c", "diff": "@@ -714,7 +714,7 @@ class BasicErrorChecker(_BasicChecker):\n if defined_self is not node and not astroid.are_exclusive(node, defined_self):\n dummy_variables_rgx = lint_utils.get_global_option(\n self, 'dummy-variables-rgx', default=None)\n- if dummy_variables_rgx and dummy_variables_rgx.match(defined_self.name):\n+ if dummy_variables_rgx and dummy_variables_rgx.match(node.name):\n return\n self.add_message('function-redefined', node=node,\n args=(redeftype, defined_self.fromlineno))\n", "old_path": "pylint/checkers/base.py", "rewrite": "ReplaceText(target='node' @(717,65)->(717,77))"} -{"repo": "https://:@github.com/moser/pylint.git", "hash": "02688062140cc7ffa9c4f1a1f04c13d6f198a400", "diff": "@@ -697,7 +697,7 @@ def error_of_type(handler: astroid.ExceptHandler, error_type) -> bool:\n error_type = (error_type,) # type: ignore\n expected_errors = {stringify_error(error) for error in error_type} # type: ignore\n if not handler.type:\n- return True\n+ return False\n return handler.catch(expected_errors)\n \n \n", "old_path": "pylint/checkers/utils.py", "rewrite": "ReplaceText(target='False' @(700,15)->(700,19))"} -{"repo": "https://:@github.com/ogrisel/pygbm.git", "hash": "2e019bfc2b3ea35ec5bd7c3c56301f8fc7a64b60", "diff": "@@ -426,7 +426,7 @@ def _find_best_bin_to_split_helper(context, feature_idx, histogram, n_samples):\n context.sum_gradients, context.sum_hessians,\n context.l2_regularization)\n \n- if gain > best_split.gain and gain >= context.min_gain_to_split:\n+ if gain > best_split.gain and gain > context.min_gain_to_split:\n best_split.gain = gain\n best_split.feature_idx = feature_idx\n best_split.bin_idx = bin_idx\n", "old_path": "pygbm/splitting.py", "rewrite": "ReplaceText(target='>' @(429,43)->(429,45))"} -{"repo": "https://:@github.com/happz/ducky.git", "hash": "e56b0f3d47fb108865973efe411e6767d51d72a1", "diff": "@@ -330,7 +330,7 @@ class MathCoprocessor(ISnapshotable, Coprocessor):\n i = i32(tos.value).value\n j = i32(lr.value).value\n D(' i=%i, j=%i (%s, %s)', i, j, type(i), type(j))\n- i /= j\n+ i //= j\n D(' i=%i (%s)', i, type(i))\n tos.value = i\n \n", "old_path": "ducky/cpu/coprocessor/math_copro.py", "rewrite": "ReplaceText(target='//=' @(333,6)->(333,8))"} -{"repo": "https://:@github.com/happz/ducky.git", "hash": "fb1a93bdb8055874aef7077850e784dc90e8295c", "diff": "@@ -680,7 +680,7 @@ class Machine(ISnapshotable, IMachineWorker):\n \n self.hdt.create()\n \n- pages = self.memory.alloc_pages(segment = 0x00, count = align(PAGE_SIZE, self.hdt.size()) / PAGE_SIZE)\n+ pages = self.memory.alloc_pages(segment = 0x00, count = align(PAGE_SIZE, self.hdt.size()) // PAGE_SIZE)\n self.memory.update_pages_flags(pages[0].index, len(pages), 'read', True)\n self.hdt_address = pages[0].base_address\n \n", "old_path": "ducky/machine.py", "rewrite": "ReplaceText(target='//' @(683,94)->(683,95))"} -{"repo": "https://:@github.com/happz/ducky.git", "hash": "f266fb16a7f0e10e19cba8d17eb15d0d69d3c24a", "diff": "@@ -134,7 +134,7 @@ def show_pages(logger, state):\n \n CPR = 32\n \n- for i in range(0, 256 / CPR):\n+ for i in range(0, 256 // CPR):\n s = []\n t = []\n \n", "old_path": "ducky/tools/coredump.py", "rewrite": "ReplaceText(target='//' @(137,26)->(137,27))"} -{"repo": "https://:@github.com/tpircher/quine-mccluskey.git", "hash": "31df780f3ec5a14d70840e755f23da133a8fc282", "diff": "@@ -372,7 +372,7 @@ class QuineMcCluskey:\n \n # Add the unused terms to the list of marked terms\n for g in list(groups.values()):\n- marked |= group - used\n+ marked |= g - used\n \n if len(used) == 0:\n done = True\n", "old_path": "quine_mccluskey/qm.py", "rewrite": "ReplaceText(target='g' @(375,26)->(375,31))"} -{"repo": "https://:@github.com/SUSE/azurectl.git", "hash": "09c62dc074497f862c0a4fee6798ffee14f7e61c", "diff": "@@ -81,7 +81,7 @@ class Image:\n service_call = service.add_os_image(\n label, media_link, name, 'Linux'\n )\n- add_os_image_result = service_call.get_operation_status(\n+ add_os_image_result = service.get_operation_status(\n service_call.request_id\n )\n status = add_os_image_result.status\n", "old_path": "azurectl/image.py", "rewrite": "ReplaceText(target='service' @(84,34)->(84,46))"} -{"repo": "https://:@github.com/robocomp/learnbot.git", "hash": "e0af147e7b8ab58add721fefe425c6ac28183043", "diff": "@@ -1,6 +1,6 @@\n def obstacle_free(lbot, threshold= 200, verbose=False):\n \tsonarsValue = lbot.getSonars()\n-\tif min(sonarsValue) > threshold:\n+\tif min(sonarsValue) < threshold:\n \t\tif verbose:\n \t\t\tprint('No obstacles around Learnbot')\n \t\treturn True\n", "old_path": "learnbot_dsl/functions/perceptual/obstacle_free.py", "rewrite": "ReplaceText(target='<' @(3,21)->(3,22))"} -{"repo": "https://:@github.com/robocomp/learnbot.git", "hash": "f43f97e705c26d2e6d1a9fded44ee913dbba6e84", "diff": "@@ -9,7 +9,7 @@ from learnbot_dsl.learnbotCode.Language import getLanguage\n import tempfile, uuid, sys\n \n def str2hex(text):\n- if sys.version_info[0]>3:\n+ if sys.version_info[0]>=3:\n return text.encode('utf-8').hex()\n else:\n return str(binascii.hexlify(bytes(text)))\n", "old_path": "learnbot_dsl/learnbotCode/Button.py", "rewrite": "ReplaceText(target='>=' @(12,26)->(12,27))"} -{"repo": "https://:@github.com/robocomp/learnbot.git", "hash": "b5f0d9f8bc119b2c1f05c2b8c0a8e7e8b40ed8e0", "diff": "@@ -1,4 +1,4 @@\n \n \n def look_front(lbot):\n- lbot.setJointAngle(\"CAMERA\",0)\n+ lbot.setJointAngle(0, \"CAMERA\")\n", "old_path": "learnbot_dsl/functions/motor/jointmotor/look_front.py", "rewrite": "ArgSwap(idxs=0<->1 @(4,4)->(4,22))"} -{"repo": "https://:@github.com/robocomp/learnbot.git", "hash": "b5f0d9f8bc119b2c1f05c2b8c0a8e7e8b40ed8e0", "diff": "@@ -1,4 +1,4 @@\n \n \n def setAngleCamera(lbot,angle):\n- lbot.setJointAngle(\"CAMERA\", angle)\n+ lbot.setJointAngle(angle, \"CAMERA\")\n", "old_path": "learnbot_dsl/functions/motor/jointmotor/setAngleCamera.py", "rewrite": "ArgSwap(idxs=0<->1 @(4,4)->(4,22))"} -{"repo": "https://:@github.com/chanedwin/pydistinct.git", "hash": "2920f6fe09daa3362513fbc516c711035bcb8c6a", "diff": "@@ -109,7 +109,7 @@ def _get_confidence_interval(bootstrap_dist, stat_val, alpha, is_pivotal):\n low = _np.percentile(bootstrap_dist, 100 * ((alpha / 2)))\n val = _np.percentile(bootstrap_dist, 50)\n high = _np.percentile(bootstrap_dist, 100 * (1 - (alpha / 2)))\n- return BootstrapResults(low, stat_val, high)\n+ return BootstrapResults(low, val, high)\n \n \n def _needs_sparse_unification(values_lists):\n", "old_path": "pydistinct/bootstrap.py", "rewrite": "ReplaceText(target='val' @(112,33)->(112,41))"} -{"repo": "https://:@github.com/coreofscience/python-wostools.git", "hash": "2163905ba13f68da61ed6b7a4da0c2f524399039", "diff": "@@ -47,7 +47,7 @@ class Article:\n self.year: Optional[int] = year\n self.journal: Optional[str] = journal\n self.volume: Optional[str] = volume\n- self.issue: Optional[str] = volume\n+ self.issue: Optional[str] = issue\n self.page: Optional[str] = page\n self.doi: Optional[str] = doi\n self.references: List[str] = references or []\n", "old_path": "wostools/article.py", "rewrite": "ReplaceText(target='issue' @(50,36)->(50,42))"} -{"repo": "https://:@github.com/snipsco/respeaker_python_library.git", "hash": "0f5991317aa815356f8225f6088f85cd2f3bc27f", "diff": "@@ -66,7 +66,7 @@ class WebRTCVAD:\n break\n elif len(self.history) == self.history.maxlen and sum(self.history) == 0:\n sys.stdout.write('Todo: increase capture volume')\n- for _ in range(self.history.maxlen / 2):\n+ for _ in range(self.history.maxlen // 2):\n self.history.popleft()\n \n else:\n", "old_path": "respeaker/vad.py", "rewrite": "ReplaceText(target='//' @(69,55)->(69,56))"} -{"repo": "https://:@github.com/luphord/longstaff_schwartz.git", "hash": "a70ee9438f4a36cfc25498c1091b5f8fc6879151", "diff": "@@ -91,7 +91,7 @@ def american_put_exercise_barrier(mdl, strike):\n exercises = []\n payoff = put_payoff(strike)\n for cnt, s, ex, opt in mdl.evaluate_american_exercisable_iter(payoff):\n- ex_idx = ex > cnt\n+ ex_idx = ex >= cnt\n ex_spots = s[ex_idx]\n exercises.append(ex_spots.max() if ex_idx.any() else None)\n exercises.reverse()\n", "old_path": "longstaff_schwartz/binomial.py", "rewrite": "ReplaceText(target='>=' @(94,20)->(94,21))"} -{"repo": "https://:@github.com/ietf-tools/RfcEditor.git", "hash": "9e509f9cbc2995ab8ad72636fe3a4739c23515bb", "diff": "@@ -174,7 +174,7 @@ def check(el, depth=0):\n if ns is not None and ns not in wp.xmlns_urls:\n log.error(\"Element '{0}' does not allow attributes with namespace '{1}'\".\n format(element, ns), where=el)\n- attribs_to_remove.append(attr)\n+ attribs_to_remove.append(nsAttrib)\n continue\n \n # look to see if the attribute is either an attribute for a specific\n", "old_path": "svgcheck/svgcheck/checksvg.py", "rewrite": "ReplaceText(target='nsAttrib' @(177,37)->(177,41))"} -{"repo": "https://:@github.com/ietf-tools/RfcEditor.git", "hash": "2086136adaeb71096ae8075d0b540ed0391608ad", "diff": "@@ -242,7 +242,7 @@ def main():\n \n # Validate any embedded ABNF\n if not options.no_abnf:\n- checker = AbnfChecker(options)\n+ checker = AbnfChecker(config)\n \n checker.validate(xmlrfc.tree)\n \n", "old_path": "rfclint/rfclint/run.py", "rewrite": "ReplaceText(target='config' @(245,30)->(245,37))"} -{"repo": "https://:@github.com/openlegis-br/sagl.git", "hash": "9ea9984b17df551e9b7600c3c9ba7eb6a4f914e3", "diff": "@@ -53,7 +53,7 @@ for periodo in context.zsql.periodo_comp_comissao_obter_zsql(data = DateTime(),c\n \n destinatarios=[]\n for composicao_comissao in context.zsql.composicao_comissao_obter_zsql(cod_comissao=comissao.cod_comissao,cod_periodo_comp=periodo.cod_periodo_comp):\n- if composicao_comissao.dat_desligamento == None or composicao_comissao.dat_desligamento <= DateTime():\n+ if composicao_comissao.dat_desligamento == None or composicao_comissao.dat_desligamento >= DateTime():\n for destinatario in context.zsql.autor_obter_zsql(cod_parlamentar=composicao_comissao.cod_parlamentar):\n dic={}\n dic['end_email'] = destinatario.end_email\n", "old_path": "branches/3.1_buildout/il/sapl/skins/pysc/envia_despacho_comissao_pysc.py", "rewrite": "ReplaceText(target='>=' @(56,89)->(56,91))"} -{"repo": "https://:@github.com/Mellcap/MellPlayer.git", "hash": "8f5bcc0ee48e58743f595df9f738a6c1c0c158a6", "diff": "@@ -98,7 +98,7 @@ class Netease(object):\n 'song_name': d['name'],\n 'song_url': d['mp3Url'],\n 'song_artists': ';'.join(map(lambda a: a['name'], d['artists']))\n- } for d in data]\n+ } for d in tracks]\n elif parse_type == 'lyric_detail':\n if 'lrc' in data:\n res = {\n", "old_path": "MellPlayer/api.py", "rewrite": "ReplaceText(target='tracks' @(101,23)->(101,27))"} -{"repo": "https://:@github.com/kobejohn/investigators.git", "hash": "678d9eeee6cb90d3ad60bea640f8170ba9cc0473", "diff": "@@ -64,7 +64,7 @@ class ImageIdentifier(object):\n scale = min(h_scale, w_scale) # min --> most shrinking\n scaled_h = int(round(scale * template_h))\n scaled_w = int(round(scale * template_w))\n- eq_template = cv2.resize(image, (scaled_w, scaled_h),\n+ eq_template = cv2.resize(template, (scaled_w, scaled_h),\n interpolation=cv2.INTER_AREA)\n return eq_template, eq_image\n \n", "old_path": "investigators/visuals.py", "rewrite": "ReplaceText(target='template' @(67,37)->(67,42))"} -{"repo": "https://:@github.com/swfiua/karmapi.git", "hash": "10471bc3be40e81ed93d809a865e27e4fcf95b08", "diff": "@@ -101,7 +101,7 @@ class WeatherHat(pig.Widget):\n self.interval = 1\n \n # build a Grid and add to self\n- monitor = pig.Grid(meta, self)\n+ monitor = pig.Grid(self, meta)\n self.monitor = monitor\n layout.addWidget(monitor)\n \n", "old_path": "karmapi/sense.py", "rewrite": "ArgSwap(idxs=0<->1 @(104,18)->(104,26))"} -{"repo": "https://:@github.com/swfiua/karmapi.git", "hash": "3b50b753a4309fb9eced9736c77b3bf9afea5227", "diff": "@@ -95,7 +95,7 @@ def pick_pixels(image, size=8):\n width, height = len(image), len(image[0])\n \n pwidth = int(width / size)\n- pheight = int(width / size)\n+ pheight = int(height / size)\n \n pickx = random.randint(0, pwidth-1)\n picky = random.randint(0, pheight-1)\n", "old_path": "karmapi/backends/hatpig.py", "rewrite": "ReplaceText(target='height' @(98,18)->(98,23))"} -{"repo": "https://:@github.com/swfiua/karmapi.git", "hash": "b0380f746dc68f7fec78d6ab0e425b6259336ce8", "diff": "@@ -792,7 +792,7 @@ class JeuxSansFrontieres:\n wteam = group.winner()\n setattr(kgame, label, wteam)\n if group.is_finished():\n- wteam.games.append(game)\n+ wteam.games.append(kgame)\n \n kgame, label = self.seconds[key]\n steam = group.second()\n", "old_path": "karmapi/wc.py", "rewrite": "ReplaceText(target='kgame' @(795,35)->(795,39))"} -{"repo": "https://:@github.com/swfiua/karmapi.git", "hash": "e6231e7cbc0d0b521c361bc5ac2fae3be0e8f194", "diff": "@@ -154,7 +154,7 @@ class BeanStalk:\n def draw(self, canvas, width, height, colour):\n \n xx = self.xx * width\n- yy = self.yy * width\n+ yy = self.yy * height\n \n \n canvas.create_text(\n", "old_path": "karmapi/beanstalk.py", "rewrite": "ReplaceText(target='height' @(157,23)->(157,28))"} -{"repo": "https://:@github.com/swfiua/karmapi.git", "hash": "16cae396fa2510bbebd47239d9ffb2eb5f70882d", "diff": "@@ -216,7 +216,7 @@ class Sphere:\n for ix, (r, g, b) in enumerate(value):\n self.red[ix] = r\n self.green[ix] = g\n- self.blue[ix] = r\n+ self.blue[ix] = b\n \n def quantise(self, value):\n \n", "old_path": "karmapi/cpr.py", "rewrite": "ReplaceText(target='b' @(219,28)->(219,29))"} -{"repo": "https://:@github.com/yetone/baidu_tts.git", "hash": "c9fb8ff550735a0dd776324b8cf10da53bf2fa25", "diff": "@@ -32,7 +32,7 @@ class BaiduTTS(object):\n url = 'https://openapi.baidu.com/oauth/2.0/token'\n key = 'access_token'\n res = self.cache.get(key)\n- if res and res['expire_time'] < time.time():\n+ if res and res['expire_time'] > time.time():\n return res['data']\n resp = requests.get(\n url,\n", "old_path": "baidu_tts/__init__.py", "rewrite": "ReplaceText(target='>' @(35,38)->(35,39))"} -{"repo": "https://:@github.com/Btibert3/pypeds.git", "hash": "705d6a5d4636e573c20825eff40da5822c2e0d55", "diff": "@@ -18,7 +18,7 @@ def zip_parser(url=None, survey=None):\n # path = \"/tmp/pypeds/\" + str(int(time.time())) + \"/\" # hacky way to make unique path to extract time\n _today = datetime.datetime.today().strftime('%Y%m%d')\n survey_lower = survey.lower()\n- path = \"/tmp/\" + str(_today) + str(survey) + \"/\" # hacky way to make unique path to extract date and survey\n+ path = \"/tmp/\" + str(_today) + str(survey_lower) + \"/\" # hacky way to make unique path to extract date and survey\n file = survey + \".zip\"\n \n # naive way to do cacheing - if the path for today exists, dont do anything, if it doesnt, get the data\n", "old_path": "pypeds/ipeds.py", "rewrite": "ReplaceText(target='survey_lower' @(21,39)->(21,45))"} -{"repo": "https://:@github.com/FabriceSalvaire/Pyterate.git", "hash": "b23a194f0f7785ef190d0cec7171b65d4313d455", "diff": "@@ -49,7 +49,7 @@ def setup_logging(application_name=APPLICATION_NAME, config_file=None):\n formatter_config = logging_config['formatters']['ansi']['format']\n logging_config['formatters']['ansi']['format'] = formatter_config.replace('', '\\033')\n \n- if ConfigInstall.OS.on_windows and ConfigInstall.OS.on_osx:\n+ if ConfigInstall.OS.on_windows or ConfigInstall.OS.on_osx:\n formatter = 'simple'\n else:\n formatter = 'ansi'\n", "old_path": "Pyterate/Logging/Logging.py", "rewrite": "ReplaceText(target='or' @(52,35)->(52,38))"} -{"repo": "https://:@github.com/andrewsanchez/genbank-qc.git", "hash": "1f822c8490c0187631a666e420704f28c4d653f7", "diff": "@@ -64,7 +64,7 @@ class FilteredSpecies(Species):\n \"\"\"\n self.passed = self.stats[self.stats[\"N_Count\"] <= self.max_n_count]\n self._criteria_dict[\"N_Count\"][\"failed\"] = self.stats.index[\n- self.stats[\"N_Count\"] >= self.max_n_count]\n+ self.stats[\"N_Count\"] > self.max_n_count]\n # self.failed_N_Count = self.stats.index[self.stats[\"N_Count\"] >=\n # self.max_n_count]\n \n", "old_path": "genbankfilter/filter.py", "rewrite": "ReplaceText(target='>' @(67,34)->(67,36))"} -{"repo": "https://:@github.com/andrewsanchez/genbank-qc.git", "hash": "2aa87a49e09fefbbe7fe2cba2e6074bba157322b", "diff": "@@ -38,7 +38,7 @@ def cli(filter_level, max_unknowns, c_deviations, s_deviations, m_deviations,\n print(\"Completed \", s.species)\n print(s)\n except Exception:\n- print('Failed ', species.species)\n+ print('Failed ', s.species)\n traceback.print_exc()\n else:\n from genbankqc import Genbank\n", "old_path": "genbankqc/__main__.py", "rewrite": "ReplaceText(target='s' @(41,29)->(41,36))"} -{"repo": "https://:@github.com/andrewsanchez/genbank-qc.git", "hash": "807883f82e4ab00bb0231c80f221e9777bf7a6e3", "diff": "@@ -22,7 +22,7 @@ def test_download_assembly_summary():\n @pytest.fixture()\n def biosample():\n temp = Path(tempfile.mkdtemp())\n- biosample = metadata.BioSample(\"inbox.asanchez@gmail.com\", temp, sample=100)\n+ biosample = metadata.BioSample(temp, \"inbox.asanchez@gmail.com\", sample=100)\n yield biosample\n shutil.rmtree(temp)\n \n", "old_path": "test/metadata_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(25,16)->(25,34))"} -{"repo": "https://:@github.com/atilaneves/ropemode.git", "hash": "c37cfc181d56d5b8bb67bcb7501b8ac4eac6a747", "diff": "@@ -579,7 +579,7 @@ class _CodeAssist(object):\n for assist in import_assists:\n p = codeassist.CompletionProposal(' : '.join(assist),\n 'autoimport')\n- import_assists.append(p)\n+ proposals.append(p)\n return proposals\n \n def _insert_import(self, name, module):\n", "old_path": "ropemode/interface.py", "rewrite": "ReplaceText(target='proposals' @(582,20)->(582,34))"} -{"repo": "https://:@github.com/pcraster/lue.git", "hash": "7b961a25b3c8a55f443705d700924bef21ac918b", "diff": "@@ -129,7 +129,7 @@ def sort_benchmarks_by_time(\n time_points = [item[0] for item in items]\n idxs = [item[1] for item in items]\n \n- assert all(t1 < t2 for t1, t2 in zip(time_points, time_points[1:])), time_points\n+ assert all(t1 <= t2 for t1, t2 in zip(time_points, time_points[1:])), time_points\n epoch = time_points[0]\n \n return idxs, epoch\n", "old_path": "benchmark/lue/benchmark/util.py", "rewrite": "ReplaceText(target='<=' @(132,18)->(132,19))"} -{"repo": "https://:@github.com/dutradda/falcon-swagger.git", "hash": "1c532bf5a816b895a7964e5725c633a540a50b24", "diff": "@@ -53,7 +53,7 @@ model.__routes__.add(Route('/test/{id}', 'POST', action))\n \n @pytest.fixture\n def app(session):\n- return HttpAPI(session.bind, [model])\n+ return HttpAPI([model], session.bind)\n \n \n class TestUsersModelIntegrationWithAuthorizationHook(object):\n", "old_path": "tests/integration/domain/users/test_users_model_integration.py", "rewrite": "ArgSwap(idxs=0<->1 @(56,11)->(56,18))"} -{"repo": "https://:@github.com/dutradda/falcon-swagger.git", "hash": "4fbd5298af47fb91f80a602671e1920751bb6936", "diff": "@@ -226,7 +226,7 @@ class ModelJobsMetaMixin(type):\n def _set_job(cls, job_hash, status, session):\n key = cls._build_jobs_key()\n session.redis_bind.hset(key, job_hash, json.dumps(status))\n- if session.redis_bind.ttl(key) > 0:\n+ if session.redis_bind.ttl(key) < 0:\n session.redis_bind.expire(key, 7*24*60*60)\n \n def _build_jobs_key(cls):\n", "old_path": "falconswagger/models/orm/http.py", "rewrite": "ReplaceText(target='<' @(229,39)->(229,40))"} -{"repo": "https://:@github.com/peter-schmidbauer/pythovolve.git", "hash": "85961b03f0086d97a01d82bcaa520be1a4fde052", "diff": "@@ -40,7 +40,7 @@ class Individual:\n if not isinstance(other, Individual):\n return NotImplemented\n try:\n- return self.score < other.score\n+ return self.score == other.score\n except ValueError:\n return NotImplemented\n \n", "old_path": "pythovolve/individuals.py", "rewrite": "ReplaceText(target='==' @(43,30)->(43,31))"} -{"repo": "https://:@github.com/Balandat/pyDR.git", "hash": "d9405eb75fa03ad09891816342e0e210b29d8d7f", "diff": "@@ -668,7 +668,7 @@ def get_energy_charges(index, tariff, isRT=False, LMP=None,\n cidx = chronRates.index\n pdpind = ((cidx.hour >= 12) & (cidx.hour < 18) &\n (cidx.normalize().isin(pdp_days)))\n- chronRates.loc[pdpind, 'EnergyCharge'] = pdpchrg\n+ chronRates.loc[pdpind, 'EnergyCharge'] += pdpchrg\n chronRates = chronRates.tz_convert('GMT')\n if isRT:\n chronRates['EnergyCharge'] += LMP.loc[index[0]:index[-1]] / 1000.0\n", "old_path": "pyDR/utils.py", "rewrite": "ReplaceText(target='+=' @(671,47)->(671,48))"} -{"repo": "https://:@github.com/Toranktto/CraftProtocol.git", "hash": "83edf8e43fcac26d0fb517f3bc4890e5350c93de", "diff": "@@ -35,7 +35,7 @@ class WindowItemsPacket(BasePacket):\n \n for slot_data in packet.get_slots():\n StreamIO.write_short(stream, slot_data.get_id())\n- if slot_data.is_empty():\n+ if not slot_data.is_empty():\n StreamIO.write_byte(stream, slot_data.get_count())\n StreamIO.write_short(stream, slot_data.get_damage())\n NBTSerializer.write(stream, slot_data.get_tag())\n", "old_path": "CraftProtocol/Protocol/v1_10/Packet/Play/WindowItemsPacket.py", "rewrite": "ReplaceText(target='not ' @(38,15)->(38,15))"} -{"repo": "https://:@github.com/Christensen-Lab-Dartmouth/PyMethylProcess.git", "hash": "01ff59ea0c1b13bfc3bac07e16851209ac279f21", "diff": "@@ -299,7 +299,7 @@ def combine_methylation_arrays(input_pkls, optional_input_pkl_dir, output_pkl, e\n input_pkls=glob.glob(os.path.join(optional_input_pkl_dir,'*','methyl_array.pkl'))\n if exclude:\n input_pkls=(np.array(input_pkls)[~np.isin(np.vectorize(lambda x: x.split('/')[-2])(input_pkls),np.array(exclude))]).tolist()\n- if len(input_pkls) > 0:\n+ if len(input_pkls) > 1:\n base_methyl_array=MethylationArray(*extract_pheno_beta_df_from_pickle_dict(pickle.load(open(input_pkls[0],'rb')), ''))\n methyl_arrays_generator = (MethylationArray(*extract_pheno_beta_df_from_pickle_dict(pickle.load(open(input_pkl,'rb')), '')) for input_pkl in input_pkls[1:])\n list_methyl_arrays = MethylationArrays([base_methyl_array])\n", "old_path": "build/lib/pymethylprocess/preprocess.py", "rewrite": "ReplaceText(target='1' @(302,25)->(302,26))"} -{"repo": "https://:@github.com/AndreasSteiner/python-pptx.git", "hash": "3a66082b1326a4263ea6f624a3a263faad65d4c5", "diff": "@@ -998,7 +998,7 @@ def then_categories_levels_contains_count_CategoryLevel_objs(context, count):\n def then_categories_number_format_is_value(context, value):\n expected_value = value\n number_format = context.categories.number_format\n- assert number_format == expected_value, 'got %s' % expected_value\n+ assert number_format == expected_value, 'got %s' % number_format\n \n \n @then('category.add_sub_category(name) is a Category object')\n", "old_path": "features/steps/chart.py", "rewrite": "ReplaceText(target='number_format' @(1001,55)->(1001,69))"} -{"repo": "https://:@github.com/dtkav/specific.git", "hash": "44fc513eaa8f8746eafce36749b8564a0a03a0e8", "diff": "@@ -127,7 +127,7 @@ def validate_array(schema, data):\n return error\n # Run each sub-item through the list of validators.\n for func in VALIDATORS:\n- error = func(subschema, subval)\n+ error = func(subschema, converted_value)\n if error:\n return error\n \n", "old_path": "connexion/decorators/validation.py", "rewrite": "ReplaceText(target='converted_value' @(130,36)->(130,42))"} -{"repo": "https://:@github.com/kreczko/gitlab-migrate.git", "hash": "8dd6f993bc443574e0d3e45776726b6f71141037", "diff": "@@ -36,7 +36,7 @@ def migration_instructions(conn_src, conn_dst, migrate):\n if user:\n names = None\n if user['projects'] != '--all--':\n- names = content['projects']\n+ names = user['projects']\n user_projects = glc.user_projects(conn_src, names=names, statistics=False)\n return instructions, user_projects\n \n", "old_path": "gitlab_migrate/migrate.py", "rewrite": "ReplaceText(target='user' @(39,20)->(39,27))"} -{"repo": "https://:@github.com/kreczko/gitlab-migrate.git", "hash": "ec939be20fccea9337bda4fafce7605170bb31be", "diff": "@@ -57,7 +57,7 @@ def cli(config_file, version, plain, noop):\n dst_server = config.servers['destination']\n \n gl_src = glc.connect(src_server.url, src_server.auth_token, ssl_verify=src_server.ssl_verify)\n- gl_dst = glc.connect(dst_server.url, dst_server.auth_token, ssl_verify=src_server.ssl_verify)\n+ gl_dst = glc.connect(dst_server.url, dst_server.auth_token, ssl_verify=dst_server.ssl_verify)\n \n group_instructions, user_instructions = migration_instructions(gl_src, gl_dst, config.migrate)\n \n", "old_path": "gitlab_migrate/migrate.py", "rewrite": "ReplaceText(target='dst_server' @(60,75)->(60,85))"} -{"repo": "https://:@github.com/igrek51/cliglue.git", "hash": "2de2f9599f15422234a4ccdb9d62c08bd88074ce", "diff": "@@ -116,7 +116,7 @@ def test_default_help_when_no_arguments():\n def test_hiding_internal_options():\n with MockIO('--help') as mockio:\n CliBuilder(hide_internal=True).run()\n- assert '--bash-install' in mockio.output()\n+ assert '--bash-install' not in mockio.output()\n assert '--bash-autocomplete' not in mockio.output()\n with MockIO('--help') as mockio:\n CliBuilder(hide_internal=False).run()\n", "old_path": "tests/help/test_help.py", "rewrite": "ReplaceText(target=' not in ' @(119,31)->(119,35))"} -{"repo": "https://:@github.com/alex-fe/Graphml-to-SVG-converter.git", "hash": "759cb682f91e023a80f64fa4234edf0cded4fd5f", "diff": "@@ -53,7 +53,7 @@ class Graph(NameMixin):\n **label_kwargs\n ):\n if geometry is None:\n- geometry = Geometry(height, width, x, y)\n+ geometry = Geometry(width, height, x, y)\n if fill is None:\n fill = Fill(fill_color, transparent)\n if border is None:\n", "old_path": "app.py", "rewrite": "ArgSwap(idxs=0<->1 @(56,23)->(56,31))"} -{"repo": "https://:@bitbucket.org/mbachett/maltpynt.git", "hash": "f79c6b6ff1fb7e6bb0f3d33a866e220f0b9ff0ed", "diff": "@@ -14,7 +14,7 @@ def mp_calc_lags(freqs, cpds, pds1, pds2, n_chunks, rebin):\n lags = np.angle(cpds) / (2 * np.pi * freqs)\n sigcpd = np.absolute(cpds)\n \n- rawcof = (sigcpd) ** 2 / ((pds1) * (pds1))\n+ rawcof = (sigcpd) ** 2 / ((pds1) * (pds2))\n \n dum = (1. - rawcof) / (2. * rawcof)\n \n", "old_path": "maltpynt/mp_lags.py", "rewrite": "ReplaceText(target='pds2' @(17,40)->(17,44))"} -{"repo": "https://:@github.com/Lantero/battlebots.git", "hash": "253d8e64895f7b7490e8d79e6b65fb39249f0257", "diff": "@@ -41,7 +41,7 @@ class Board(object):\n \n def transposed_index(self, index):\n \"\"\" Return the transposed index \"\"\"\n- return index % self.row_size * self.row_size + index / self.row_size\n+ return index % self.row_size * self.row_size + index // self.row_size\n \n def transposed_board(self):\n \"\"\" Return the transposed board \"\"\"\n", "old_path": "battlebots/board.py", "rewrite": "ReplaceText(target='//' @(44,61)->(44,62))"} -{"repo": "https://:@github.com/narfman0/jeeves.git", "hash": "a4e0401053c41d7d584d316d05845ec75d79c9a8", "diff": "@@ -30,7 +30,7 @@ class Conversation(object):\n plugin, text = self.brain.query(input)\n if plugin and text:\n try:\n- plugin.handle(input, self.mic)\n+ plugin.handle(text, self.mic)\n except Exception:\n self._logger.error('Failed to execute module',\n exc_info=True)\n", "old_path": "client/conversation.py", "rewrite": "ReplaceText(target='text' @(33,38)->(33,43))"} -{"repo": "https://:@bitbucket.org/dranew/remixt.git", "hash": "6aa375e5e1ba81d06e3b5f9d1739e79b22678d9c", "diff": "@@ -22,5 +22,5 @@ if __name__ == '__main__':\n if args['config'] is not None:\n execfile(args['config'], {}, config)\n \n- remixt.ref_data.create_ref_data(ref_data_dir, config)\n-\n+ remixt.ref_data.create_ref_data(config, ref_data_dir)\n+ \n", "old_path": "remixt/setup/remixt_create_ref_data.py", "rewrite": "ArgSwap(idxs=0<->1 @(25,4)->(25,35))"} -{"repo": "https://:@bitbucket.org/dranew/remixt.git", "hash": "6aa375e5e1ba81d06e3b5f9d1739e79b22678d9c", "diff": "@@ -28,7 +28,7 @@ if __name__ == '__main__':\n \n pyp = pypeliner.app.Pypeline(config=config)\n \n- workflow = remixt.mappability.bwa.workflow.create_bwa_mappability_workflow(ref_data_dir, config)\n+ workflow = remixt.mappability.bwa.workflow.create_bwa_mappability_workflow(config, ref_data_dir)\n \n pyp.run(workflow)\n \n", "old_path": "remixt/setup/remixt_mappability_bwa.py", "rewrite": "ArgSwap(idxs=0<->1 @(31,15)->(31,78))"} -{"repo": "https://:@github.com/visym/vipy.git", "hash": "8ac8b78489487631a161fa7ed71cd700ea700154", "diff": "@@ -375,7 +375,7 @@ class Image(object):\n \n def url(self, url=None, username=None, password=None, sha1=None, ignoreUrlErrors=None):\n \"\"\"Image URL and URL download properties\"\"\"\n- if url is None:\n+ if url is not None:\n self._url = url # this does not change anything else, better to use constructor \n if username is not None:\n self._urluser = username # basic authentication\n", "old_path": "vipy/image.py", "rewrite": "ReplaceText(target=' is not ' @(378,14)->(378,18))"} -{"repo": "https://:@github.com/scubbx/webguitest.git", "hash": "ad615df8b42c2adadf5759951ed1029e7a186217", "diff": "@@ -35,7 +35,7 @@ if pyautoguiAvailable:\n numTries += 1\n time.sleep(1)\n if elemToClick is None:\n- print(\" (x): could not locate image {}\".format(elemToClick))\n+ print(\" (x): could not locate image {}\".format(imagepath))\n return False\n time.sleep(1)\n pyautogui.click(pyautogui.center(elemToClick))\n", "old_path": "webguitest/clickGraphic.py", "rewrite": "ReplaceText(target='imagepath' @(38,62)->(38,73))"} -{"repo": "https://:@github.com/PragmaticMates/django-inventor.git", "hash": "2762f3a34313372dd548e0bda6fd24db622bf703", "diff": "@@ -11,5 +11,5 @@ class PlanQuerySet(models.QuerySet):\n \n class UserPlanQuerySet(models.QuerySet):\n def expires_in(self, days=7):\n- threshold = now() - timedelta(days=days)\n+ threshold = now() + timedelta(days=days)\n return self.filter(expiration=threshold.date())\n", "old_path": "inventor/core/subscriptions/querysets.py", "rewrite": "ReplaceText(target='+' @(14,26)->(14,27))"} -{"repo": "https://:@github.com/brentp/combined-pvalues.git", "hash": "7726e0f8b5b35bb43059ae547ca2297bee54f5ec", "diff": "@@ -141,7 +141,7 @@ def pipeline(col_num, step, dist, prefix, threshold, seed, bed_files, mlog=False\n fregions = prefix + \".regions.bed\"\n with open(fregions, \"w\") as fh:\n list(peaks.peaks(prefix + \".fdr.bed\", -1, threshold, seed,\n- step, fh, operator.le))\n+ dist, fh, operator.le))\n n_regions = sum(1 for _ in open(fregions))\n print >>sys.stderr, \"wrote: %s (%i regions)\" % (fregions, n_regions)\n \n", "old_path": "cpv/pipeline.py", "rewrite": "ReplaceText(target='dist' @(144,12)->(144,16))"} -{"repo": "https://:@github.com/axiomabsolute/cs410-information-retrieval.git", "hash": "18725a0cb50a579dc3ad2c32b6fc54451bdb23b3", "diff": "@@ -24,7 +24,7 @@ by_lookup_match_piece = by(by_lookup_match, by_piece_id)\n by_lookup_match_stem = by(by_lookup_match, by_stem)\n \n def bm25_idf(N, df):\n- assert(N > df)\n+ assert(N >= df)\n return log( (N - df + 0.5) / (df + 0.5) )\n \n def bm25_tf(tf, k=1.2):\n", "old_path": "firms/graders.py", "rewrite": "ReplaceText(target='>=' @(27,13)->(27,14))"} -{"repo": "https://:@github.com/JayYip/bert-multitask-service.git", "hash": "a22de7ec24ba873f699e989533122f36b4f6f693", "diff": "@@ -169,7 +169,7 @@ class BertModel(object):\n if token_type_ids is None:\n token_type_ids = tf.zeros(shape=[batch_size, seq_length], dtype=tf.int32)\n \n- with tf.variable_scope(\"bert\", scope):\n+ with tf.variable_scope(scope, \"bert\"):\n with tf.variable_scope(\"embeddings\"):\n # Perform embedding lookup on the word ids.\n (self.embedding_output, self.embedding_table) = embedding_lookup(\n", "old_path": "modeling.py", "rewrite": "ArgSwap(idxs=0<->1 @(172,9)->(172,26))"} -{"repo": "https://:@github.com/JayYip/bert-multitask-service.git", "hash": "52d354bf04ba003a32b5c175775a574064569dcc", "diff": "@@ -22,7 +22,7 @@ def get_args():\n args = parser.parse_args()\n param_str = '\\n'.join(['%20s = %s' % (k, v) for k, v in sorted(vars(args).items())])\n print('usage:\\n{0}\\nparameters: \\n{1}'.format(' '.join([x for x in sys.argv]), param_str))\n- return parser\n+ return args\n \n \n if __name__ == '__main__':\n", "old_path": "app.py", "rewrite": "ReplaceText(target='args' @(25,11)->(25,17))"} -{"repo": "https://:@github.com/JayYip/bert-multitask-service.git", "hash": "4edc2497de0d8ea45d1afdbe636f20e51f2fa044", "diff": "@@ -166,7 +166,7 @@ class BertWorker(Process):\n \n def input_fn_builder(self, worker):\n def gen():\n- while not True:\n+ while True:\n if self.result:\n num_result = len(self.result)\n worker.send_multipart([ident, b'', pickle.dumps(self.result)])\n", "old_path": "service/server.py", "rewrite": "ReplaceText(target='' @(169,18)->(169,22))"} -{"repo": "https://:@github.com/WZBSocialScienceCenter/patternlite.git", "hash": "cdb9262675a96df4ce7b5d25f53b7dc22f043078", "diff": "@@ -129,7 +129,7 @@ m.save(f, final=True)\n print(\"loading model...\")\n \n f = os.path.join(os.path.dirname(__file__), \"en-model.slp\")\n-lexicon.model = Model.load(lexicon, f)\n+lexicon.model = Model.load(f, lexicon)\n \n # To test the accuracy of the language model,\n # we can compare a tagged corpus to the predicted tags.\n", "old_path": "examples/05-vector/07-slp.py", "rewrite": "ArgSwap(idxs=0<->1 @(132,16)->(132,26))"} -{"repo": "https://:@github.com/jsh9/python-plot-utilities.git", "hash": "bbf48002e85a5c27afa879e256184dfa185943ce", "diff": "@@ -1174,7 +1174,7 @@ def piechart(target_array, class_names=None, dropna=False, top_n=None,\n val = int(round(pct*total/100.0))\n return '{p:.1f}% ({v:d})'.format(p=pct, v=val)\n return my_autopct\n- autopct = make_autopct(x)\n+ autopct = make_autopct(counts)\n elif display == None:\n autopct = ''\n else:\n", "old_path": "plot_utils.py", "rewrite": "ReplaceText(target='counts' @(1177,31)->(1177,32))"} -{"repo": "https://:@github.com/maurosilber/binlet.git", "hash": "0c47b4979709a285c437e1090ca6503e6d3dfccf", "diff": "@@ -57,7 +57,7 @@ def binlet_level(inputs, threshold, valfun, covfun, bin_args, args, level, axes)\n \n # Calculate current level\n inputs_coeffs = tuple(modwt_level_nd(x, level, axes) for x in inputs)\n- bin_args = tuple(modwt_level_nd(x, level, axes, approx_only=True) for x in inputs)\n+ bin_args = tuple(modwt_level_nd(x, level, axes, approx_only=True) for x in bin_args)\n \n # Threshold current level\n for key, mask in threshold_masks.items():\n", "old_path": "binlet/binlet.py", "rewrite": "ReplaceText(target='bin_args' @(60,79)->(60,85))"} -{"repo": "https://:@gitlab.com/betse/betsee.git", "hash": "83abaec314e607797890d3f25983c03bc6727ab8", "diff": "@@ -120,7 +120,7 @@ def sanitize_classifiers(\n # formally classify this version as such.\n for python_version_minor in range(\n python_version_min_parts[1], python_version_minor_max):\n- classifiers.append(\n+ classifiers_sane.append(\n 'Programming Language :: Python :: {}.{}'.format(\n PYTHON_VERSION_MAJOR, python_version_minor,))\n # print('classifiers: {}'.format(_CLASSIFIERS))\n", "old_path": "betsee_setup/beuputil.py", "rewrite": "ReplaceText(target='classifiers_sane' @(123,8)->(123,19))"} -{"repo": "https://:@github.com/lensvol/pybetter.git", "hash": "625e8fc854c7544df702d6001a57e46838b7df70", "diff": "@@ -15,7 +15,7 @@ class EqualsNoneIsNoneTransformer(cst.CSTTransformer):\n ):\n return original_node\n \n- return original_node.with_changes(\n+ return updated_node.with_changes(\n operator=cst.Is(\n whitespace_after=original_node.operator.whitespace_after,\n whitespace_before=original_node.operator.whitespace_before,\n", "old_path": "pybetter/transformers/equals_none.py", "rewrite": "ReplaceText(target='updated_node' @(18,15)->(18,28))"} -{"repo": "https://:@github.com/lensvol/pybetter.git", "hash": "625e8fc854c7544df702d6001a57e46838b7df70", "diff": "@@ -14,4 +14,4 @@ class RemoveParenthesesFromReturn(cst.CSTTransformer):\n \n changed_tuple = original_node.value.with_changes(lpar=[], rpar=[])\n \n- return original_node.with_changes(value=changed_tuple)\n+ return updated_node.with_changes(value=changed_tuple)\n", "old_path": "pybetter/transformers/parenthesized_return.py", "rewrite": "ReplaceText(target='updated_node' @(17,15)->(17,28))"} -{"repo": "https://:@github.com/leprikon-cz/leprikon.git", "hash": "1c31a9f054d79c1f75ee4bcd82be41d903e4f0f3", "diff": "@@ -149,7 +149,7 @@ class EventRegistration(SubjectRegistration):\n if discount.accounted.date() <= d and discount.explanation.strip()\n )\n return PaymentStatus(\n- price=self.price if self.approved and self.approved.date() < d else 0,\n+ price=self.price if self.approved and self.approved.date() <= d else 0,\n discount=self.get_discounted(d),\n explanation=explanation,\n paid=self.get_paid(d),\n", "old_path": "leprikon/models/events.py", "rewrite": "ReplaceText(target='<=' @(152,71)->(152,72))"} -{"repo": "https://:@github.com/openclimatedata/openscm.git", "hash": "1f492d38db2808bf7730b707266d53f35f0a2e09", "diff": "@@ -1036,7 +1036,7 @@ class ScmDataFrameBase: # pylint: disable=too-many-public-methods\n # Convert from ParameterType to str\n parameter_type_str = (\n \"average\"\n- if parameter_type == ParameterType.AVERAGE_TIMESERIES\n+ if p_type == ParameterType.AVERAGE_TIMESERIES\n else \"point\"\n )\n res._meta.loc[grp.index] = res._meta.loc[grp.index].assign(\n", "old_path": "openscm/scmdataframe/base.py", "rewrite": "ReplaceText(target='p_type' @(1039,19)->(1039,33))"} -{"repo": "https://:@github.com/jvs/sourcer.git", "hash": "f8175948d0ed0721ceb555837439b77246cdd0f9", "diff": "@@ -341,7 +341,7 @@ class Parser(object):\n def _parse_text(self, term, pos):\n end = pos + len(term)\n part = self.source[pos : end]\n- yield ParseResult(part, end) if part == term else ParseFailure\n+ yield ParseResult(term, end) if part == term else ParseFailure\n \n def _parse_token(self, term, pos):\n if pos >= len(self.source):\n", "old_path": "peg.py", "rewrite": "ReplaceText(target='term' @(344,26)->(344,30))"} -{"repo": "https://:@github.com/SergSHV/SLRIC.git", "hash": "30dccd92ce43affef13bd2731d20c525dcca6a31", "diff": "@@ -38,7 +38,7 @@ def indirect_paths(g, path_lim, aggregation, criterion):\n if path_lim % 2 == 0:\n return indirect_paths(compute_path(g, g, aggregation, criterion), path_lim // 2, type, criterion)\n else:\n- return compute_path(g, indirect_paths(g, path_lim - 1, aggregation, criterion), type, criterion)\n+ return compute_path(indirect_paths(g, path_lim - 1, aggregation, criterion), g, type, criterion)\n \n \n # Evaluate path strength [criterion: 0 (sum), 1 (min), 2 (multiplication)]\n", "old_path": "SLRIC/methods/indirect_influence.py", "rewrite": "ArgSwap(idxs=0<->1 @(41,19)->(41,31))"} -{"repo": "https://:@github.com/jianhuupenn/ItClust.git", "hash": "e09c84bfe42ededd15d95a5f618e83e3ded26271", "diff": "@@ -163,7 +163,7 @@ class transfer_learning_clf(object):\n adata_test.obs[\"trajectory_\"+str(i)]=trajectory_l[i]\n \n #labels=change_to_continuous(q_pred)\n- y_pred=np.asarray(np.argmax(q,axis=1),dtype=int)\n+ y_pred=np.asarray(np.argmax(q_pred,axis=1),dtype=int)\n labels=y_pred.astype('U')\n labels=pd.Categorical(values=labels,categories=natsorted(np.unique(y_pred).astype('U')))\n \n", "old_path": "ItClust_package/ItClust/ItClust.py", "rewrite": "ReplaceText(target='q_pred' @(166,36)->(166,37))"} -{"repo": "https://:@github.com/datalad/git-annex-ria-remote.git", "hash": "556dd2877b24dd277160c36ebeeb03082d19706f", "diff": "@@ -117,7 +117,7 @@ class Install(Clone):\n path=path,\n dataset=dataset,\n description=description,\n- reckless=ephemeral,\n+ reckless=reckless,\n alt_sources=alt_sources,\n result_filter=None,\n result_renderer='disabled',\n", "old_path": "ria_remote/install.py", "rewrite": "ReplaceText(target='reckless' @(120,25)->(120,34))"} -{"repo": "https://:@github.com/dmnfarrell/smallrnaseq.git", "hash": "e4d03158818e7b2d8a67428ace3c1ba9c0723c14", "diff": "@@ -544,7 +544,7 @@ def print_read_stack(reads, refseq=None, outfile=None, cutoff=0, by=None, label=\n else:\n seqlen = reads.end.max()\n f = None\n- reads = reads[reads.reads>cutoff]\n+ reads = reads[reads.reads>=cutoff]\n if by is not None:\n reads = reads.sort_values(by, ascending=False)\n \n", "old_path": "smallrnaseq/utils.py", "rewrite": "ReplaceText(target='>=' @(547,29)->(547,30))"} -{"repo": "https://:@github.com/dmnfarrell/smallrnaseq.git", "hash": "eeed9c4b43346501da633ce78ac4d22440df4608", "diff": "@@ -70,7 +70,7 @@ def run(opts):\n #novel prediction\n if ref_genome != '':\n print ('predicting novel mirnas..')\n- allreads = utils.combine_aligned_reads(temp_path, files, ref_genome)\n+ allreads = utils.combine_aligned_reads(path, files, ref_genome)\n new,cl = novel.find_mirnas(allreads, cow_fasta)\n new.to_csv(os.path.join(out,'novel.csv'), index=False)\n novel.create_report(new, cl, species, filename=os.path.join(out, 'novel.html'))\n", "old_path": "smallrnaseq/app.py", "rewrite": "ReplaceText(target='path' @(73,51)->(73,60))"} -{"repo": "https://:@gitlab.com/danwin/fairways_py.git", "hash": "28c15f9a3e5f59d8767bb803ec8024488b0bf4bd", "diff": "@@ -64,7 +64,7 @@ class HttpQueryTemplate:\n rq_kwargs[\"headers\"] = headers\n body = encoded_data\n if body:\n- rq_kwargs[\"data\"] = data\n+ rq_kwargs[\"data\"] = encoded_data\n \n return rq_kwargs\n \n", "old_path": "fairways/io/generic/net.py", "rewrite": "ReplaceText(target='encoded_data' @(67,32)->(67,36))"} -{"repo": "https://:@github.com/clusterking/clusterking.git", "hash": "86816095fc6c1383b3088dbd93c72c16df8c9710", "diff": "@@ -129,7 +129,7 @@ class BMFOM(FOM):\n (data1.df[\"cluster\"] == cluster) & data1.df[\"bpoint\"]\n ]\n bpoints2 = data2.df[\n- (data1.df[\"cluster\"] == cluster) & data2.df[\"bpoint\"]\n+ (data2.df[\"cluster\"] == cluster) & data2.df[\"bpoint\"]\n ]\n msg = \"Found {} bpoints instead of 1 for dataset {}.\"\n if len(bpoints1) != 1:\n", "old_path": "clusterking/stability/fom.py", "rewrite": "ReplaceText(target='data2' @(132,17)->(132,22))"} -{"repo": "https://:@github.com/clusterking/clusterking.git", "hash": "bdc88d5a931d268d77e5f00119fcca5f16bd562a", "diff": "@@ -611,7 +611,7 @@ class BundlePlot(object):\n plot_histogram(self.ax, self._bins, data, **hist_kw)\n \n hf_kw = dict(color=light_color)\n- hf_kw.update(hist_kwargs)\n+ hf_kw.update(hist_fill_kwargs)\n \n plot_histogram_fill(\n self.ax, self._bins, data - err_low, data + err_high, **hf_kw\n", "old_path": "clusterking/plots/plot_bundles.py", "rewrite": "ReplaceText(target='hist_fill_kwargs' @(614,21)->(614,32))"} -{"repo": "https://:@github.com/julien6387/supvisors.git", "hash": "5163605677362dbe30e3999bc45a44696e2222d9", "diff": "@@ -60,7 +60,7 @@ class ProcessRules(object):\n a required process that is not in the starting sequence is forced to optional\n If addresses are not defined, all addresses are applicable \"\"\"\n # required MUST have start_sequence, so force to optional if no start_sequence\n- if self.required and self.start_sequence <= 0:\n+ if self.required and self.start_sequence == 0:\n self.logger.warn('required forced to False because no start_sequence defined')\n self.required = False\n # if no addresses, consider all addresses\n", "old_path": "supervisors/process.py", "rewrite": "ReplaceText(target='==' @(63,49)->(63,51))"} -{"repo": "https://:@github.com/hncuong/topicmodel-lib.git", "hash": "6257da7e5c9bf7d70d504a6acb62a538dbf91694", "diff": "@@ -344,7 +344,7 @@ def load_mini_batch_term_frequency_from_term_frequency_file(fp, batch_size):\n tf = list_word[j].split(\":\")\n doc_terms[j - 1] = int(tf[0])\n doc_frequency[j - 1] = int(tf[1])\n- mini_batch.append_doc(doc, doc_frequency)\n+ mini_batch.append_doc(doc_terms, doc_frequency)\n return mini_batch, end_file\n except Exception as inst:\n logging.error(inst)\n", "old_path": "tmlib/datasets/base.py", "rewrite": "ReplaceText(target='doc_terms' @(347,34)->(347,37))"} -{"repo": "https://:@github.com/adaptivescale/lxdui.git", "hash": "fce2cbadebf5400fa109a7055fcf2059613c463d", "diff": "@@ -48,7 +48,7 @@ def createContainer():\n for container in input:\n client = LXCContainer(container)\n result.append(client.create())\n- return response.reply(result, message='Container {} created successfully.'.format(input.get('name')))\n+ return response.reply(result, message='Container {} created successfully.'.format(container.get('name')))\n except ValueError as ex:\n return response.reply(message=ex.__str__(), status=403)\n \n", "old_path": "app/api/controllers/container.py", "rewrite": "ReplaceText(target='container' @(51,90)->(51,95))"} -{"repo": "https://:@github.com/desihub/desiutil.git", "hash": "51e58e1174bb9bba78a3fbbe8491c2f6f4ae2d91", "diff": "@@ -66,7 +66,7 @@ def setdep(header, name, version):\n verkey = 'DEPVER{:02d}'.format(i)\n if namekey in header:\n if header[namekey] == name:\n- header[namekey] = version\n+ header[verkey] = version\n return\n else:\n continue\n", "old_path": "py/desiutil/depend.py", "rewrite": "ReplaceText(target='verkey' @(69,23)->(69,30))"} -{"repo": "https://:@github.com/jmoiron/par2ools.git", "hash": "74b8d8885c8ad90f5649a8eb8228c62a840c5f3a", "diff": "@@ -75,7 +75,7 @@ class Par2File(object):\n else:\n self.contents = obj_or_path.read()\n if getattr(obj_or_path, 'name', None):\n- self.path = f.name\n+ self.path = obj_or_path.name\n self.packets = self.read_packets()\n \n def read_packets(self):\n", "old_path": "par2ools/par2.py", "rewrite": "ReplaceText(target='obj_or_path' @(78,28)->(78,29))"} -{"repo": "https://:@github.com/futurecolors/django-cked.git", "hash": "e61ce34219c69582f131dbd922763d0253c2ba83", "diff": "@@ -33,7 +33,7 @@ def elfinder(request):\n 'dictionary type.')\n \n return render(request, 'cked/elfinder.html', {\n- 'options': json_encode(options),\n+ 'options': json_encode(user_options),\n })\n \n \n", "old_path": "cked/views.py", "rewrite": "ReplaceText(target='user_options' @(36,31)->(36,38))"} -{"repo": "https://:@github.com/divi255/bakauditor.git", "hash": "4604cdef011cd2a4d5c4307704a69e1b87d0bb2f", "diff": "@@ -12,7 +12,7 @@ def check(**kwargs):\n result.time = t\n result.size = size\n if 'min-size' in kwargs:\n- result.ok = size > kwargs.get('min-size')\n+ result.ok = size >= kwargs.get('min-size')\n if not result.ok:\n result.err = 'Too small'\n else:\n", "old_path": "bakauditor/plugins/file.py", "rewrite": "ReplaceText(target='>=' @(15,25)->(15,26))"} -{"repo": "https://:@github.com/cwebber/xudd.git", "hash": "69a387685cb87e3e9fd0a68f3161fe21e3eb60fb", "diff": "@@ -139,7 +139,7 @@ class Hive(Thread):\n \"\"\"\n message_id = id or self.gen_message_id()\n message = Message(\n- to=to, directive=to, from_id=from_id, body=body,\n+ to=to, directive=directive, from_id=from_id, body=body,\n in_reply_to=in_reply_to, id=message_id)\n self.hive_action_queue.put(\n (\"queue_message\", message))\n", "old_path": "xudd/hive.py", "rewrite": "ReplaceText(target='directive' @(142,29)->(142,31))"} -{"repo": "https://:@github.com/NotYetGames/po-excel-translate.git", "hash": "5a50131472f50d15354df8a274395d69d8a937b5", "diff": "@@ -219,7 +219,7 @@ def ConvertPoXls():\n for (i, cat) in enumerate(catalogs):\n cat = cat[1]\n msg = cat.find(msgid)\n- if msgid is not None:\n+ if msg is not None:\n if 'fuzzy' in msg.flags:\n sheet.write(row, column, msg.msgstr, italic_style)\n else:\n", "old_path": "lingua/xlsconvert.py", "rewrite": "ReplaceText(target='msg' @(222,15)->(222,20))"} -{"repo": "https://:@github.com/chen0040/pyalgs.git", "hash": "52de8860e4a4e4fdde27c055064d1a4de5dd7074", "diff": "@@ -13,7 +13,7 @@ class BinarySelection(object):\n hi = len(a) - 1\n \n while lo <= hi:\n- mid = lo + (hi - lo) / 2\n+ mid = lo + (hi - lo) // 2\n if less(x, a[mid]):\n hi = mid - 1\n elif less(a[mid], x):\n", "old_path": "pyalgs/algorithms/commons/selecting.py", "rewrite": "ReplaceText(target='//' @(16,33)->(16,34))"} -{"repo": "https://:@github.com/jvivian/rnaseq-lib.git", "hash": "c72b002e39cd0a0646e3a4f228970e5078fecac6", "diff": "@@ -75,7 +75,7 @@ class Holoview:\n :rtype: hv.Overlay\n \"\"\"\n # Subset dataframe by tissue and gene\n- df = self._subset(tissue, gene)\n+ df = self._subset(gene, tissue)\n \n # Subset by dataset\n tumor, normal, gtex = subset_by_dataset(df)\n", "old_path": "src/rnaseq_lib/plot/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(78,13)->(78,25))"} -{"repo": "https://:@github.com/tylertrussell/gae-catnado.git", "hash": "1c469d607226dec29e79b09d3b9a63fc6b558dee", "diff": "@@ -33,4 +33,4 @@ class TestImmutableProperty(SimpleAppEngineTestCase):\n self.assertEqual(refetched_entity.name, NAME)\n \n with self.assertRaises(ImmutablePropertyException):\n- entity.name = 'anything'\n+ refetched_entity.name = 'anything'\n", "old_path": "catnado/properties/test/test_immutable_property.py", "rewrite": "ReplaceText(target='refetched_entity' @(36,6)->(36,12))"} -{"repo": "https://:@github.com/oscar-franzen/adobo.git", "hash": "9c42ed1fad2799077765cb76d531c4218399ef66", "diff": "@@ -183,7 +183,7 @@ https://oscar-franzen.github.io/adobo/adobo.html#adobo.normalize.norm')\n comp, contr = svd(data, ncomp)\n else:\n raise Exception('Unkown PCA method spefified. Valid choices are: irlb and svd')\n- obj.index = data.columns\n+ comp.index = data.columns\n obj.norm_data[k]['dr']['pca'] = {'comp' : comp,\n 'contr' : contr,\n 'method' : method}\n", "old_path": "adobo/dr.py", "rewrite": "ReplaceText(target='comp' @(186,8)->(186,11))"} -{"repo": "https://:@github.com/ngmarchant/oasis.git", "hash": "3b39116447a4d3e4662790e357c257027d398435", "diff": "@@ -62,7 +62,7 @@ def verify_consistency(predictions, scores, proba):\n def verify_unit_interval(value):\n \"\"\"Throw an exception if the value is not on the unit interval [0,1].\n \"\"\"\n- if not (value >= 0 or value <= 1):\n+ if not (value >= 0 and value <= 1):\n raise ValueError(\"expected value on the interval [0, 1].\")\n return value\n \n", "old_path": "oasis/input_verification.py", "rewrite": "ReplaceText(target='and' @(65,23)->(65,25))"} -{"repo": "https://:@github.com/featurelabs/henchman.git", "hash": "283c4812767a4d5b8701e2e7a0077343da8cec57", "diff": "@@ -135,7 +135,7 @@ class Dendrogram():\n self.graphs = templist\n \n def transform(self, df, n_feats=10):\n- assert df.shape[1] <= n_feats\n+ assert df.shape[1] >= n_feats\n step = self.find_set_of_size(n_feats)\n return df[self.features_at_step(step)]\n \n", "old_path": "henchman/selection.py", "rewrite": "ReplaceText(target='>=' @(138,27)->(138,29))"} -{"repo": "https://:@github.com/jackuoll/ultima-py.git", "hash": "de0b3c0964cda0accc65e79e8b6b9c1e260d559f", "diff": "@@ -53,7 +53,7 @@ class Gumps:\n copy = bitmap.copy()\n if hue:\n hue = (hue & 0x3FFF) - 1\n- return Hues.HUES[hue].apply_to(bitmap, only_grey_pixels=partial_hue)\n+ return Hues.HUES[hue].apply_to(copy, only_grey_pixels=partial_hue)\n return copy\n \n \n", "old_path": "ultimapy/sdk/gumps.py", "rewrite": "ReplaceText(target='copy' @(56,43)->(56,49))"} -{"repo": "https://:@github.com/duguyue100/minesweeper.git", "hash": "7d48ad6eb8e1d65b8e61f370e181e246443092f2", "diff": "@@ -39,7 +39,7 @@ class MSGame(object):\n if (board_height <= 0):\n raise ValueError(\"the board height cannot be non-positive!\")\n else:\n- self.board_height = board_width\n+ self.board_height = board_height\n \n if (num_mines >= (board_width*board_height)):\n raise ValueError(\"The number of mines cannot be larger than \"\n", "old_path": "minesweeper/msgame.py", "rewrite": "ReplaceText(target='board_height' @(42,32)->(42,43))"} -{"repo": "https://:@github.com/duguyue100/minesweeper.git", "hash": "e65fd9f5f46cb9c409746889d68d1e8cdc32876d", "diff": "@@ -33,7 +33,7 @@ class MSBoard(object):\n if (board_height <= 0):\n raise ValueError(\"the board height cannot be non-positive!\")\n else:\n- self.board_height = board_width\n+ self.board_height = board_height\n \n if (num_mines >= (board_width*board_height)):\n raise ValueError(\"The number of mines cannot be larger than \"\n", "old_path": "minesweeper/msboard.py", "rewrite": "ReplaceText(target='board_height' @(36,32)->(36,43))"} -{"repo": "https://:@github.com/mtgreenway/python-openid.git", "hash": "8b6d87a5a95552814265911c9d449932c39db768", "diff": "@@ -90,7 +90,7 @@ class DiffieHelmanAssociator(object):\n 'openid.session_type':'DH-SHA1',\n 'openid.dh_modulus': to_b64(long2a(p)),\n 'openid.dh_gen': to_b64(long2a(g)),\n- 'openid.dh_consumer_public': to_b64(long2a(pow(p, priv_key, p))),\n+ 'openid.dh_consumer_public': to_b64(long2a(pow(g, priv_key, p))),\n }\n \n body = urllib.urlencode(args)\n", "old_path": "association.py", "rewrite": "ReplaceText(target='g' @(93,59)->(93,60))"} -{"repo": "https://:@github.com/hhuuggoo/kitchensink.git", "hash": "752722df9109ca74a4fd321915e710eb7def9cb5", "diff": "@@ -33,7 +33,7 @@ def make_app(redis_connection_obj, port, host_url, host_name, datadir):\n rpcblueprint.task_queue = TaskQueue(rpcblueprint.r)\n server_manager = Servers(rpcblueprint.r)\n settings.setup_server(rpcblueprint.r, datadir, host_url, host_name,\n- Catalog(rpcblueprint.r, datadir, host_url),\n+ Catalog(rpcblueprint.r, datadir, host_name),\n server_manager\n )\n rpcblueprint.heartbeat_thread = HeartbeatThread()\n", "old_path": "kitchensink/rpc/server.py", "rewrite": "ReplaceText(target='host_name' @(36,59)->(36,67))"} -{"repo": "https://:@github.com/hhuuggoo/kitchensink.git", "hash": "752722df9109ca74a4fd321915e710eb7def9cb5", "diff": "@@ -45,7 +45,7 @@ def run(redis_connection, node_url, node_name, queue, datadir):\n db=redis_connection_obj['db'])\n server_manager = Servers(r)\n settings.setup_server(r, datadir, node_url, node_name,\n- Catalog(r, datadir, node_url),\n+ Catalog(r, datadir, node_name),\n server_manager\n )\n if queue is None:\n", "old_path": "kitchensink/scripts/start_worker.py", "rewrite": "ReplaceText(target='node_name' @(48,46)->(48,54))"} -{"repo": "https://:@github.com/MPBA/pyphysio.git", "hash": "a86854cc97f7c917f35d6cb424b1edc27e3167ee", "diff": "@@ -317,7 +317,7 @@ class UnevenlySignal(Signal):\n if start_time is None:\n start_time = x_values[0]\n else:\n- assert start_time >= x_values[0], \"More than one sample at or before start_time\"\n+ assert start_time <= x_values[0], \"More than one sample at or before start_time\"\n # WARN: limitation to 10 decimals due to workaround to prevent wrong cast flooring\n # (e.g. np.floor(0.29 * 100) == 28)\n x_values = _np.round((x_values - start_time) * sampling_freq, 10).astype(int)\n", "old_path": "pyphysio/Signal.py", "rewrite": "ReplaceText(target='<=' @(320,34)->(320,36))"} -{"repo": "https://:@github.com/rhasspy/rhasspy-hermes.git", "hash": "aec600af8dfa1112fdd20e0d2187b777e0f1799f", "diff": "@@ -84,7 +84,7 @@ class NluIntent(Message):\n @classmethod\n def from_dict(cls, message_dict: typing.Dict[str, typing.Any]):\n \"\"\"Construct message from dictionary.\"\"\"\n- message_dict = message_dict.only_fields(message_dict)\n+ message_dict = cls.only_fields(message_dict)\n intent_dict = message_dict.pop(\"intent\", {})\n slot_dicts = message_dict.pop(\"slots\", [])\n message = NluIntent( # type: ignore\n", "old_path": "rhasspyhermes/nlu.py", "rewrite": "ReplaceText(target='cls' @(87,23)->(87,35))"} -{"repo": "https://:@github.com/alpacahq/alpaca-backtrader-api.git", "hash": "f198c13c87b8736d0903498fbdb233310ef6f09c", "diff": "@@ -469,7 +469,7 @@ class AlpacaStore(with_metaclass(MetaSingleton, object)):\n # (https://stackoverflow.com/a/1592837/2739124)\n cdl = cdl.loc[\n pytz.timezone(NY).localize(dtbegin):\n- pytz.timezone(NY).localize(dtbegin)\n+ pytz.timezone(NY).localize(dtend)\n ].dropna(subset=['high'])\n records = cdl.reset_index().to_dict('records')\n for r in records:\n", "old_path": "alpaca_backtrader_api/alpacastore.py", "rewrite": "ReplaceText(target='dtend' @(472,41)->(472,48))"} -{"repo": "https://:@github.com/willforde/urlquick.git", "hash": "3023fbbb7646f0e0dfb0393912720137f11165f7", "diff": "@@ -854,7 +854,7 @@ class Session(CacheAdapter):\n reqParams = UnicodeDict(self._params, params)\n \n # Add cookies to headers\n- if reqCookies and not u\"Cookie\" in headers:\n+ if reqCookies and not u\"Cookie\" in reqHeaders:\n header = u\"; \".join([u\"{}={}\".format(key, value) for key, value in reqCookies.items()])\n reqHeaders[u\"Cookie\"] = header\n \n", "old_path": "urlquick.py", "rewrite": "ReplaceText(target='reqHeaders' @(857,43)->(857,50))"} -{"repo": "https://:@github.com/willforde/urlquick.git", "hash": "d207cf47f7bf35163849f35f919a024b001a0f33", "diff": "@@ -962,7 +962,7 @@ class Session(ConnectionManager):\n if req_cookies:\n logger.debug(\"Request cookies: %s\", req_cookies)\n if json:\n- logger.debug(\"Request json: %s\", req_cookies)\n+ logger.debug(\"Request json: %s\", json)\n if data:\n logger.debug(\"Request data: %s\", data)\n \n", "old_path": "urlquick.py", "rewrite": "ReplaceText(target='json' @(965,45)->(965,56))"} -{"repo": "https://:@github.com/dlukes/corpy.git", "hash": "4bf35b8dd0ed5971bd05896adda646f4452e47a8", "diff": "@@ -23,7 +23,7 @@ def print_position(lines, line_no):\n \"represent the same corpus?\"\n )\n position.extend(line[1:])\n- print(\"\\t\".join(line))\n+ print(\"\\t\".join(position))\n \n \n @cli.command()\n", "old_path": "corpy/scripts/zip_verticals.py", "rewrite": "ReplaceText(target='position' @(26,20)->(26,24))"} -{"repo": "https://:@github.com/steinitzu/humblebee.git", "hash": "d95954f99098481ab17e935f63ca734dc8bdf519", "diff": "@@ -50,7 +50,7 @@ def zero_prefix_int(num):\n strnum = str(num)\n if len(strnum) == 1:\n return '0'+strnum\n- return num\n+ return strnum\n \n def timestamp(dt):\n return mktime(dt.timetuple())\n", "old_path": "src/tvunfucker/util.py", "rewrite": "ReplaceText(target='strnum' @(53,11)->(53,14))"} -{"repo": "https://:@github.com/ramasrirama99/AlgoTradeFramework.git", "hash": "011a70532972aa883c66bb9d4f32351bcc24a922", "diff": "@@ -6,7 +6,7 @@ def chunks(l, n):\n n = max(1, n)\n step = int(len(l) / n)\n for i in range(0, len(l), step):\n- big_list.append(l[i:i+n])\n+ big_list.append(l[i:i+step])\n return big_list\n \n \n", "old_path": "algotaf/backend/config.py", "rewrite": "ReplaceText(target='step' @(9,30)->(9,31))"} -{"repo": "https://:@github.com/JonnyTran/OpenOmics.git", "hash": "d49006c61b12a8013c9c1f4a12c5ff390980f9e3", "diff": "@@ -454,7 +454,7 @@ class LncRNAExpression(GenomicData):\n if gene_name not in lnc_seq:\n lnc_seq[gene_name] = str(record.seq)\n else:\n- if len(lnc_seq[gene_name]) > len(str(record.seq)):\n+ if len(lnc_seq[gene_name]) < len(str(record.seq)):\n lnc_seq[gene_name] = str(record.seq)\n \n # Multiple transcripts each lncRNA gene\n", "old_path": "TCGAMultiOmics/genomic.py", "rewrite": "ReplaceText(target='<' @(457,43)->(457,44))"} -{"repo": "https://:@github.com/JonnyTran/OpenOmics.git", "hash": "b034a1b50639f3d302e6da13280093662394b35d", "diff": "@@ -95,7 +95,7 @@ class GeneOntology(Dataset):\n leaf_terms = self.get_child_terms()\n \n go_terms_parents = annotation.map(\n- lambda x: list({term for term in x if term not in leaf_terms}) \\\n+ lambda x: list({term for term in x if term in leaf_terms}) \\\n if isinstance(x, list) else None)\n return go_terms_parents\n \n", "old_path": "openomics/database/ontology.py", "rewrite": "ReplaceText(target=' in ' @(98,54)->(98,62))"} -{"repo": "https://:@github.com/JonnyTran/OpenOmics.git", "hash": "153599d5ce118fcd4c4fb6c44eba9c28fd762983", "diff": "@@ -95,7 +95,7 @@ class GeneOntology(Dataset):\n leaf_terms = self.get_child_terms()\n \n go_terms_parents = annotation.map(\n- lambda x: list({term for term in x if term not in leaf_terms}) \\\n+ lambda x: list({term for term in x if term in leaf_terms}) \\\n if isinstance(x, list) else None)\n return go_terms_parents\n \n", "old_path": "openomics/database/ontology.py", "rewrite": "ReplaceText(target=' in ' @(98,54)->(98,62))"} -{"repo": "https://:@github.com/jqb/django-settings.git", "hash": "6b594eca70c7addfc9e1b30d8e91334da3c6254f", "diff": "@@ -106,7 +106,7 @@ class DataAPI(object):\n \n # XXX: fix this mechanism\n def _set_cache_for(self, name, value):\n- self.get._cache_set(value, name)\n+ self.get._cache_set(name, value)\n \n \n data = DataAPI()\n", "old_path": "django_settings/dataapi.py", "rewrite": "ArgSwap(idxs=0<->1 @(109,8)->(109,27))"} -{"repo": "https://:@github.com/jqb/django-settings.git", "hash": "72acf0e93c8b2a4bc8dd0c78fa1c703e63b7a26f", "diff": "@@ -11,7 +11,7 @@ def initialize_data(sender, **kwargs):\n for name, type_name_and_value in DEFAULT_SETTINGS.items():\n type_name, value = type_name_and_value\n \n- if not dataapi.data.exists(type_name):\n+ if not dataapi.data.exists(name):\n dataapi.data.set(type_name, name, value)\n \n signals.post_syncdb.connect(initialize_data, sender=models)\n", "old_path": "django_settings/management.py", "rewrite": "ReplaceText(target='name' @(14,35)->(14,44))"} -{"repo": "https://:@github.com/qutech/qtune.git", "hash": "a6ca5b76c17a8092c67f2d495c7f422d038008f5", "diff": "@@ -45,5 +45,5 @@ def find_lead_transition(data: np.ndarray, center: float, scan_range: float, npo\n y_red = np.absolute(y_red)\n max_index = int(np.argmax(y_red) + int(round(n / 2)))\n \n- return x_red[max_index]\n+ return x[max_index]\n \n", "old_path": "qtune/util.py", "rewrite": "ReplaceText(target='x' @(48,11)->(48,16))"} -{"repo": "https://:@github.com/qutech/qtune.git", "hash": "b68e78b9da5d2150450fcda75d7266d388794caf", "diff": "@@ -42,7 +42,7 @@ class SubsetTunerTest(unittest.TestCase):\n \n # assert that the solver is called with the right arguments\n self.assertEqual(solver.update_after_step.call_count, 1)\n- pd.testing.assert_series_equal(solver_voltages, solver.update_after_step.call_args[0][0])\n+ pd.testing.assert_series_equal(full_voltages, solver.update_after_step.call_args[0][0])\n \n parameter = pd.Series(data=[10 * i for i in range(n_evaluator)],\n index=[\"parameter_\" + str(i) for i in range(n_evaluator)])\n", "old_path": "tests/test_parameter_tuner.py", "rewrite": "ReplaceText(target='full_voltages' @(45,39)->(45,54))"} -{"repo": "https://:@github.com/plonegovbr/brasil.gov.vlibrasnews.git", "hash": "7d9a28d0b1c48e2599dd6e87fbc9c277c1ea5bd8", "diff": "@@ -18,6 +18,6 @@ class VLibrasVideoViewlet(ViewletBase):\n super(VLibrasVideoViewlet, self).update()\n self.youtube_url = get_video_url(self.context)\n self.is_ready = self.youtube_url is not None\n- self.enabled = self.is_ready and not api.user.is_anonymous()\n+ self.enabled = self.is_ready or not api.user.is_anonymous()\n if self.is_ready:\n self.klass = 'ready'\n", "old_path": "src/brasil/gov/vlibrasvideo/browser/vlibrasvideo.py", "rewrite": "ReplaceText(target='or' @(21,37)->(21,40))"} -{"repo": "https://:@github.com/ch3pjw/format_cef.git", "hash": "91a70b8e6d42edf64d1d4a94a447cb87fa77254e", "diff": "@@ -85,7 +85,7 @@ def str_sanitiser(regex_str='.*', escape_chars='', min_len=0, max_len=None):\n s = s.encode('utf-8')\n s = escape(s)\n if max_len is None:\n- if len(s) <= min_len:\n+ if len(s) < min_len:\n raise ValueError(\n '{}: String longer than {} characters'.format(\n debug_name, min_len))\n", "old_path": "format_cef/cef.py", "rewrite": "ReplaceText(target='<' @(88,26)->(88,28))"} -{"repo": "https://:@github.com/hyan15/proxyscrape.git", "hash": "14c34e8e90643885f1839878b3ac55f4b51bcd29", "diff": "@@ -238,7 +238,7 @@ class Collector:\n self._extend_filter(combined_filter_opts, filter_opts)\n \n self._refresh_resources(False)\n- return self._store.get_proxy(filter_opts, self._blacklist)\n+ return self._store.get_proxy(combined_filter_opts, self._blacklist)\n \n def remove_proxy(self, proxies):\n if not _is_iterable(proxies):\n", "old_path": "proxyscrape/proxyscrape.py", "rewrite": "ReplaceText(target='combined_filter_opts' @(241,37)->(241,48))"} -{"repo": "https://:@github.com/Axilent/Djax.git", "hash": "6ed7214dd303d0358b6adda49eca86511a12e430", "diff": "@@ -203,7 +203,7 @@ def sync_content(token=None,content_type_to_sync=None):\n log.info('Syncing %s.' % content_type_to_sync)\n try:\n content_type = content_registry[content_type_to_sync]\n- sync_content_type(content_type)\n+ sync_content_type(content_type_to_sync)\n except KeyError:\n log.error('%s is not in the content registry.' % content_type_to_sync)\n else:\n", "old_path": "djax/content.py", "rewrite": "ReplaceText(target='content_type_to_sync' @(206,30)->(206,42))"} -{"repo": "https://:@github.com/Axilent/Djax.git", "hash": "60b81a3f9e104bdebfe9fa0668da6644f8fd058f", "diff": "@@ -518,7 +518,7 @@ class ContentManager(Manager):\n channel_results = self._channel(queryset,channel=channel,profile=profile,basekey=basekey,flavor=flavor,limit=limit,include_endorsements=True)\n remainder_results = queryset.exclude(pk__in=[item.pk for item in channel_results])\n final_results = channel_results + [ContentItemWrapper(item,0) for item in remainder_results]\n- final_results.sort(cmp=lambda x,y: cmp(x.rlevel,y.rlevel))\n+ final_results.sort(cmp=lambda x,y: cmp(y.rlevel,x.rlevel))\n return final_results\n \n class ContentItemWrapper(object):\n", "old_path": "djax/content.py", "rewrite": "ArgSwap(idxs=0<->1 @(521,43)->(521,46))"} -{"repo": "https://:@github.com/baverman/supplement.git", "hash": "c1611d29a5ebe5347ddd5107f9f549f256204780", "diff": "@@ -148,7 +148,7 @@ def assist(project, source, position, filename):\n if not ctx:\n names = get_scope_names(scope, lineno)\n else:\n- obj = infer(ctx, scope, position)\n+ obj = infer(ctx, scope, lineno)\n names = [obj.get_names()]\n elif ctx_type == 'import':\n names = (project.get_possible_imports(ctx, filename),)\n", "old_path": "supplement/assistant.py", "rewrite": "ReplaceText(target='lineno' @(151,36)->(151,44))"} -{"repo": "https://:@github.com/baverman/supplement.git", "hash": "82ec55dee23f33c890ab1d8a0e55e694e00dc0b0", "diff": "@@ -105,7 +105,7 @@ class CallDB(object):\n if not args: continue\n \n try:\n- func = scope.eval(func, False)\n+ func = s.eval(func, False)\n except:\n continue\n \n", "old_path": "supplement/calls.py", "rewrite": "ReplaceText(target='s' @(108,27)->(108,32))"} -{"repo": "https://:@github.com/keiserlab/e3fp.git", "hash": "5f5bed7e36138fddc8c64108f9d352260f061d55", "diff": "@@ -332,7 +332,7 @@ def mol_to_sdf(mol, out_file, conf_num=None):\n writer = rdkit.Chem.SDWriter(fobj)\n conf_ids = [conf.GetId() for conf in mol.GetConformers()]\n for i in conf_ids:\n- if conf_num in {-1, None} and i >= conf_num:\n+ if conf_num not in {-1, None} and i >= conf_num:\n break\n writer.write(mol, confId=i)\n writer.close()\n", "old_path": "e3fp/conformer/util.py", "rewrite": "ReplaceText(target=' not in ' @(335,23)->(335,27))"} -{"repo": "https://:@github.com/dbrnz/biosignalml-corelib.git", "hash": "ad805bbdf30919348b05a8e0b6c7a86081dd93dd", "diff": "@@ -91,7 +91,7 @@ class HDF5Signal(BSMLSignal):\n if isinstance(self.clock, UniformClock):\n yield DataSegment(self.clock[startpos], UniformTimeSeries(data, self.clock.rate))\n else:\n- yield DataSegment(0, TimeSeries(self.clock[startpos: startpos+maxpoints], data))\n+ yield DataSegment(0, TimeSeries(data, self.clock[startpos: startpos+maxpoints]))\n startpos += len(data)\n length -= len(data)\n \n", "old_path": "formats/hdf5/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(94,29)->(94,39))"} -{"repo": "https://:@github.com/SOBotics/Redunda-lib-Python.git", "hash": "6187143b32f4f3c4ca9809c347349be1b537cf30", "diff": "@@ -83,7 +83,7 @@ class Redunda:\n \n try:\n if filename.endswith (\".pickle\") or ispickle == True:\n- dict = eval (filename)\n+ dict = eval (filedata)\n try:\n pickle.dump (dict, filename)\n except pickle.PickleError as perr:\n", "old_path": "Redunda.py", "rewrite": "ReplaceText(target='filedata' @(86,29)->(86,37))"} -{"repo": "https://:@github.com/averagehuman/kez.git", "hash": "e923c7dad180ba4f6d8250074b112b2dd7416329", "diff": "@@ -20,7 +20,7 @@ class BuildController(object):\n self.src = src\n self.dst = dst\n self.options = options or {}\n- self.settings = options or {}\n+ self.settings = settings or {}\n self.logfile = pathjoin(self.dst, 'melba.log')\n self.status = None\n self.exc_info = None\n", "old_path": "melba/builders/base.py", "rewrite": "ReplaceText(target='settings' @(23,24)->(23,31))"} -{"repo": "https://:@github.com/fsecada01/TextSpitter.git", "hash": "c7ca706cc19d2d76fa562c045dd8de7a3bc96643", "diff": "@@ -22,7 +22,7 @@ def PdfFileRead(file):\n i += 1\n else:\n pdf_file = open(file, 'rb')\n- pdf_reader = PyPDF2.PdfFileReader(file)\n+ pdf_reader = PyPDF2.PdfFileReader(pdf_file)\n while i < pdf_reader.numPages:\n payload = pdf_reader.getPage(i).extractText().replace('\\n', '')\n text += payload.encode('ascii', 'ignore').decode('unicode_escape')\n", "old_path": "TextSpitter/core.py", "rewrite": "ReplaceText(target='pdf_file' @(25,42)->(25,46))"} -{"repo": "https://:@github.com/WHenderson/HashDb.git", "hash": "4544c95147266221be975c3da18341641078575f", "diff": "@@ -11,7 +11,7 @@ def walk(top, topdown=True, onerror=None, followlinks=False):\n filename = basename(top)\n \n try:\n- scandir_it = scandir(top)\n+ scandir_it = scandir(dirpath)\n except OSError as error:\n onerror(error)\n return\n", "old_path": "hashdb2/walk.py", "rewrite": "ReplaceText(target='dirpath' @(14,33)->(14,36))"} -{"repo": "https://:@github.com/namuyan/bc4py.git", "hash": "946e2296029195123c663840d49d921b517853a8", "diff": "@@ -609,7 +609,7 @@ class TransactionBuilder:\n \n def put_unconfirmed(self, tx):\n assert tx.height is None, 'Not unconfirmed tx {}'.format(tx)\n- if tx.type not in (C.TX_POW_REWARD, C.TX_POS_REWARD):\n+ if tx.type in (C.TX_POW_REWARD, C.TX_POS_REWARD):\n return # It is Reword tx\n elif tx.hash in self.unconfirmed:\n logging.debug('Already unconfirmed tx. {}'.format(tx))\n", "old_path": "bc4py/database/builder.py", "rewrite": "ReplaceText(target=' in ' @(612,18)->(612,26))"} -{"repo": "https://:@github.com/namuyan/bc4py.git", "hash": "1d2b8ad52307769c0ac32ab65dadb0d0bf606532", "diff": "@@ -198,7 +198,7 @@ def contract_signature_check(extra_tx: TX, v: Validator, include_block: Block):\n raise BlockChainError('Unrelated signature include, reject={}'.format(reject_cks))\n elif include_block:\n # check satisfy require?\n- if len(accept_cks) != v.require:\n+ if len(accept_cks) >= v.require:\n raise BlockChainError('Not satisfied require signature. [signed={}, accepted={}, require={}]'\n .format(signed_cks, accept_cks, v.require))\n else:\n", "old_path": "bc4py/chain/checking/tx_contract.py", "rewrite": "ReplaceText(target='>=' @(201,27)->(201,29))"} -{"repo": "https://:@github.com/namuyan/bc4py.git", "hash": "87defc8330c37c6c4a4d32a3187c70d36081a8cf", "diff": "@@ -96,7 +96,7 @@ def validator_fill_iter(v: Validator, best_block=None, best_chain=None):\n c_address, address, flag, sig_diff = decode(tx.message)\n if c_address != v.c_address:\n continue\n- index = tx.height * 0xffffffff + block.txs.index(tx)\n+ index = block.height * 0xffffffff + block.txs.index(tx)\n yield index, flag, address, sig_diff, tx.hash\n # unconfirmed\n if best_block is None:\n", "old_path": "bc4py/database/validator.py", "rewrite": "ReplaceText(target='block' @(99,20)->(99,22))"} -{"repo": "https://:@github.com/namuyan/bc4py.git", "hash": "2083e976751938af11f53bff7f9b303a1e16a29d", "diff": "@@ -147,7 +147,7 @@ async def new_address(request):\n cur = db.cursor()\n user_name = request.query.get('account', C.account2name[C.ANT_UNKNOWN])\n user_id = read_name2user(user_name, cur)\n- address = create_new_user_keypair(user_name, cur)\n+ address = create_new_user_keypair(user_id, cur)\n db.commit()\n if user_id == C.ANT_CONTRACT:\n address = convert_address(address, V.BLOCK_CONTRACT_PREFIX)\n", "old_path": "bc4py/user/api/accountinfo.py", "rewrite": "ReplaceText(target='user_id' @(150,42)->(150,51))"} -{"repo": "https://:@github.com/namuyan/bc4py.git", "hash": "21ac4f74d4d4ec9322e90556e2a4506c5ca1a705", "diff": "@@ -53,7 +53,7 @@ def check_already_started():\n new_pid = os.getpid()\n with open(pid_path, mode='w') as fp:\n fp.write(str(new_pid))\n- log.info(\"create new process lock file pid={}\".format(pid))\n+ log.info(\"create new process lock file pid={}\".format(new_pid))\n \n \n class AESCipher:\n", "old_path": "bc4py/utils.py", "rewrite": "ReplaceText(target='new_pid' @(56,58)->(56,61))"} -{"repo": "https://:@github.com/agtumulak/dabbiew.git", "hash": "58b7fdb7ede8e0ae216e5b4088ff6c4d1bcd6f0e", "diff": "@@ -571,7 +571,7 @@ def run(stdscr, df):\n left, right, top, bottom, moving_right, moving_down = jump(\n left, right, top, bottom, rows, cols, found_row, found_col, resizing)\n if keypress in [ord('g')]:\n- if not keystroke_history and keystroke_history[-1] == 'g':\n+ if keystroke_history and keystroke_history[-1] == 'g':\n left, right, top, bottom, moving_right, moving_down = jump(\n left, right, top, bottom, rows, cols, 0, right, resizing)\n if keypress in [ord('G')]:\n", "old_path": "src/dabbiew.py", "rewrite": "ReplaceText(target='' @(574,15)->(574,19))"} -{"repo": "https://:@github.com/arquolo/glow.git", "hash": "d5b0d511214ff7588ca148819c5d3aa7a5b635d8", "diff": "@@ -20,7 +20,7 @@ def timer(name=''):\n yield\n finally:\n duration = time() - start\n- if name:\n+ if not name:\n logging.warning('done in %.4g seconds', duration)\n else:\n logging.warning('%s - done in %.4g seconds', name, duration)\n", "old_path": "ort/debug.py", "rewrite": "ReplaceText(target='not ' @(23,11)->(23,11))"} -{"repo": "https://:@github.com/joaduo/smoothtest.git", "hash": "f70861b38425b6511e05469e4fb2bb6f5ee989b6", "diff": "@@ -155,7 +155,7 @@ class SmokeCommand(SmoothTestBase):\n for m in s.get_missing(pkg):\n pth = m.__file__\n if pth.endswith('.pyc'):\n- pth = f[:-1]\n+ pth = pth[:-1]\n s.log('Missing test in module %s' % m)\n s.log(formatPathPrint(pth))\n #return results\n", "old_path": "smoothtest/smoke/SmokeTestDiscover.py", "rewrite": "ReplaceText(target='pth' @(158,30)->(158,31))"} -{"repo": "https://:@github.com/timmykuo/mitopipeline.git", "hash": "3888bab80cbcff6a6fbd28c15c1941f1c557d611", "diff": "@@ -36,7 +36,7 @@ class PipelineBuilder():\n #write in the steps requested into the pipeline\n for step in steps:\n #if Complete Genomics data, i.e., did split gap then pipeline requires different scripts with shorter reads due to splitting into multiple reads at the gap\n- if 'split_gap' in steps and step == 'remove_numts':\n+ if 'split_gap' not in steps and step == 'remove_numts':\n job_name = 'remove_numts_no_split_gap.sh'\n #step only is name of the step, not the name of the script\n else:\n", "old_path": "mitopipeline/pipeline_builder.py", "rewrite": "ReplaceText(target=' not in ' @(39,30)->(39,34))"} -{"repo": "https://:@github.com/maqifrnswa/scimpy.git", "hash": "4bec9f14ba49a033bccbaf1fd26fd1102c44126d", "diff": "@@ -208,7 +208,7 @@ def calc_impedance(plotwidget,\n ax_power.set_ylabel('SPL (dB 1W1m)', color='b')\n # ax_phase.set_ylabel('Phase (degrees)')\n ax_groupdelay.set_ylabel('Group Delay (ms)', color='r')\n- ax_groupdelay.set_xlabel('Frequency (Hz)')\n+ ax_power.set_xlabel('Frequency (Hz)')\n ax_power.set_xscale('log')\n ax_power.set_xlim([20, 20000])\n ax_power.xaxis.set_major_formatter(\n", "old_path": "scimpy/speakermodel.py", "rewrite": "ReplaceText(target='ax_power' @(211,4)->(211,17))"} -{"repo": "https://:@github.com/CS207-Project-Group-9/cs207-FinalProject.git", "hash": "0a9f635bd112ddcee71faa0560cf7c364f1af02d", "diff": "@@ -428,7 +428,7 @@ def create_r(vals):\n '''\n if np.array(vals).ndim == 0:\n return rAD(vals)\n- elif np.array(vals).ndim > 2:\n+ elif np.array(vals).ndim >= 2:\n raise ValueError('Input is at most 2D.')\n else:\n ADs = [rAD(val) for val in vals]\n", "old_path": "AutoDiff/AutoDiff.py", "rewrite": "ReplaceText(target='>=' @(431,29)->(431,30))"} -{"repo": "https://:@github.com/CS207-Project-Group-9/cs207-FinalProject.git", "hash": "8157501baf379f85b5f84f4516ac0ba83edfac34", "diff": "@@ -428,7 +428,7 @@ def create_r(vals):\n '''\n if np.array(vals).ndim == 0:\n return rAD(vals)\n- elif np.array(vals).ndim >= 2:\n+ elif np.array(vals).ndim > 2:\n raise ValueError('Input is at most 2D.')\n else:\n ADs = [rAD(val) for val in vals]\n", "old_path": "AutoDiff/AutoDiff.py", "rewrite": "ReplaceText(target='>' @(431,29)->(431,31))"} -{"repo": "https://:@github.com/LucumaTeam/DataQualityHDFS.git", "hash": "d601249bacb744cadc09cfc9d80e4d5fbec61958", "diff": "@@ -49,6 +49,6 @@ class Table:\n return self._is_load_information\n \n def load_dataset(self):\n- if(self._source is None):\n+ if(self._source is not None):\n self._data_set = self._source.retrieve_dataset()\n self._is_load_information = True\n", "old_path": "src/main/Core/Table.py", "rewrite": "ReplaceText(target=' is not ' @(52,23)->(52,27))"} -{"repo": "https://:@github.com/niklasf/python-asyncdgt.git", "hash": "836508723a0cfd71fc752538ab59608819184ac6", "diff": "@@ -52,7 +52,7 @@ def usage():\n def main(port_globs):\n loop = asyncio.get_event_loop()\n \n- dgt = asyncdgt.auto_connect(port_globs, loop)\n+ dgt = asyncdgt.auto_connect(loop, port_globs)\n \n @dgt.on(\"connected\")\n def on_connected(port):\n", "old_path": "asyncdgt/__main__.py", "rewrite": "ArgSwap(idxs=0<->1 @(55,10)->(55,31))"} -{"repo": "https://:@github.com/hackty/elasticsearch-py.git", "hash": "18f2ac12310a8dc4e69ee0a262663232fe0fb6ea", "diff": "@@ -205,7 +205,7 @@ def reindex(client, source_index, target_index, target_client=None, chunk_size=5\n :arg scroll: Specify how long a consistent view of the index should be\n maintained for scrolled search\n \"\"\"\n- target_client = client if target_client is None else target_index\n+ target_client = client if target_client is None else target_client\n \n docs = scan(client, index=source_index, scroll=scroll)\n def _change_doc_index(hits, index):\n", "old_path": "elasticsearch/helpers.py", "rewrite": "ReplaceText(target='target_client' @(208,57)->(208,69))"} -{"repo": "https://:@github.com/ShineyDev/github.py.git", "hash": "84f7746b34d378990a15a0b7a685e1739b4f9350", "diff": "@@ -815,7 +815,7 @@ class Fragment():\n fields = data.get(\"fields\", list())\n for (field) in fields:\n field = Field.from_dict(field)\n- fragment.add_field(fields)\n+ fragment.add_field(field)\n \n return fragment\n \n", "old_path": "github/query/builder.py", "rewrite": "ReplaceText(target='field' @(818,31)->(818,37))"} -{"repo": "https://:@github.com/ShineyDev/github.py.git", "hash": "2dfbdd085dada2ec7bf898180514644b617e08b5", "diff": "@@ -47,7 +47,7 @@ class Topic(Node, Type):\n for (topic) in data:\n topics.append(cls(topic))\n \n- return topic\n+ return topics\n \n @property\n def name(self) -> str:\n", "old_path": "github/objects/topic.py", "rewrite": "ReplaceText(target='topics' @(50,19)->(50,24))"} -{"repo": "https://:@github.com/openbadges/badgecheck.git", "hash": "a1d552fc5142f268640c949dabdeba309c741486", "diff": "@@ -62,7 +62,7 @@ def detect_input_type(state, task_meta=None, **options):\n new_actions.append(set_input_type(detected_type))\n if detected_type == 'url':\n new_actions.append(add_task(FETCH_HTTP_NODE, url=id_url))\n- new_actions.append(set_validation_subject(input_value))\n+ new_actions.append(set_validation_subject(id_url))\n elif input_is_jws(input_value):\n detected_type = 'jws'\n new_actions.append(set_input_type(detected_type))\n", "old_path": "badgecheck/tasks/input.py", "rewrite": "ReplaceText(target='id_url' @(65,54)->(65,65))"} -{"repo": "https://:@github.com/tungminhphan/street_intersection.git", "hash": "b400ad94e424cae8ef8eec6d898508b2044dde1e", "diff": "@@ -78,7 +78,7 @@ def collision_free(object1, object2, car_scale_factor, pedestrian_scale_factor):\n #the if else statements determines whether the object is pedestrian or not so it can unpack its coordinates and angle orientation, and determines if it should get the vertices of a car or pedestrian\n #it returns True if no collision has happened, False otherwise \n object1_vertices, x, y, radius = get_bounding_box(object1, car_scale_factor, pedestrian_scale_factor)\n- object2_vertices, x2, y2, radius2 = get_bounding_box(object1, car_scale_factor, pedestrian_scale_factor)\n+ object2_vertices, x2, y2, radius2 = get_bounding_box(object2, car_scale_factor, pedestrian_scale_factor)\n \n #takes the distance of the centers and compares it to the sum of radius, if the distance is greater then collision not possible\n if no_collision_by_radius_check(x, y, radius, x2, y2, radius2):\n", "old_path": "traffic_intersection/prepare/collision_check.py", "rewrite": "ReplaceText(target='object2' @(81,57)->(81,64))"} -{"repo": "https://:@github.com/aclark4life/Parse2Plone.git", "hash": "49817c3b81b7def16843ae55b30e6145ab21a9a5", "diff": "@@ -676,7 +676,7 @@ class Parse2Plone(object):\n else:\n folder = self.create_folder(parent, utils._remove_ext(obj),\n _replace_types_map)\n- self.set_title(page, utils._remove_ext(obj))\n+ self.set_title(folder, utils._remove_ext(obj))\n create_spreadsheets(folder, obj, parent_path, import_dir)\n _COUNT['files'] += 1\n commit()\n", "old_path": "parse2plone.py", "rewrite": "ReplaceText(target='folder' @(679,43)->(679,47))"} -{"repo": "https://:@github.com/jjyr/mmr.py.git", "hash": "373d5799f4682f4ee94aada12ad1558f9c38ea2b", "diff": "@@ -60,7 +60,7 @@ def get_peaks(mmr_size) -> List[int]:\n poss.append(pos)\n while height > 0:\n height, pos = get_right_peak(height, pos, mmr_size)\n- if height > 0:\n+ if height >= 0:\n poss.append(pos)\n return poss\n \n", "old_path": "mmr/mmr.py", "rewrite": "ReplaceText(target='>=' @(63,18)->(63,19))"} -{"repo": "https://:@github.com/dtkav/datalake-common.git", "hash": "4093508498f0fabcfa451d333a141d307fdfd615", "diff": "@@ -25,7 +25,7 @@ def random_hex(length):\n def random_interval():\n now = datetime.now()\n start = now - timedelta(days=random.randint(0, 365*3))\n- end = start - timedelta(days=random.randint(1, 10))\n+ end = start + timedelta(days=random.randint(1, 10))\n return start.isoformat(), end.isoformat()\n \n def random_work_id():\n", "old_path": "datalake_common/tests/conftest.py", "rewrite": "ReplaceText(target='+' @(28,16)->(28,17))"} -{"repo": "https://:@github.com/cungnv/scrapex.git", "hash": "9a2b814ea328f79ee330381423ebeaddb9b11852", "diff": "@@ -208,7 +208,7 @@ class DB(object):\n \n \t\tfor log in self._db.logs.find(query):\n \n-\t\t\tlogs.append(logs)\n+\t\t\tlogs.append(log)\n \n \t\treturn logs\t\n \n", "old_path": "scrapex/db.py", "rewrite": "ReplaceText(target='log' @(211,15)->(211,19))"} -{"repo": "https://:@github.com/erdc/quest.git", "hash": "b0b34875f72a05122cd33f5f1b4148dedecdfe89", "diff": "@@ -139,7 +139,7 @@ class CoopsPyoos(DataServiceBase):\n with open(csvFile_path, 'w') as f:\n f.write(response)\n \n- data_files[location][parameter] = filename\n+ data_files[location][parameter] = csvFile_path\n else:\n data_files[location][parameter] = None\n \n", "old_path": "dsl/services/coops_pyoos.py", "rewrite": "ReplaceText(target='csvFile_path' @(142,58)->(142,66))"} -{"repo": "https://:@github.com/erdc/quest.git", "hash": "016b54452d1170029e57bcbe117e94513a62702c", "diff": "@@ -96,7 +96,7 @@ class RstMerge(FilterBase):\n \n # update feature geometry metadata\n with rasterio.open(dst) as f:\n- geometry = util.bbox2poly(f.bounds.left, f.bounds.right, f.bounds.bottom, f.bounds.top, as_shapely=True)\n+ geometry = util.bbox2poly(f.bounds.left, f.bounds.bottom, f.bounds.right, f.bounds.top, as_shapely=True)\n update_metadata(feature, quest_metadata={'geometry': geometry.to_wkt()})\n \n # update dataset metadata\n", "old_path": "quest/filters/raster/rst_merge.py", "rewrite": "ArgSwap(idxs=1<->2 @(99,23)->(99,37))"} -{"repo": "https://:@github.com/erdc/quest.git", "hash": "088fce2676801d8ac47d93652d14040296deca36", "diff": "@@ -140,7 +140,7 @@ class RstWatershedDelineation(FilterBase):\n if snap.lower() == 'jenson':\n stream_threshold_pct = options.get('stream_threshold_pct')\n stream_threshold_abs = options.get('stream_threshold_abs')\n- outlet_points = snap_points_jenson(flow_accumulation, proj_points, \n+ proj_points = snap_points_jenson(flow_accumulation, proj_points, \n stream_threshold_pct=stream_threshold_pct, stream_threshold_abs=stream_threshold_abs)\n if p.is_latlong():\n snapped_points = [src.xy(*point) for point in proj_points]\n", "old_path": "quest/filters/raster/rst_watershed.py", "rewrite": "ReplaceText(target='proj_points' @(143,20)->(143,33))"} -{"repo": "https://:@github.com/erdc/quest.git", "hash": "c8e7db0a0b850f8f785e63892e708f2334018d5c", "diff": "@@ -180,7 +180,7 @@ def copy(uris, destination_collection):\n if resource == 'datasets':\n dataset_metadata = get_metadata(uri)[uri]\n \n- collection_path = os.path.join(project_path, feature_metadata['collection'])\n+ collection_path = os.path.join(project_path, dataset_metadata['collection'])\n \n feature = dataset_metadata['feature']\n \n", "old_path": "quest/api/manage.py", "rewrite": "ReplaceText(target='dataset_metadata' @(183,57)->(183,73))"} -{"repo": "https://:@github.com/next-security-lab/deep-confusables-cli.git", "hash": "fe2f6fe46f14778cfcb74852d817d1876d171352", "diff": "@@ -92,7 +92,7 @@ def main():\n print('Similar domains to {}'.format(dom))\n domains.difference_update(set(dom))\n for d in domains:\n- print_diff(d, args.domain)\n+ print_diff(args.domain, d)\n if write:\n f.write(d + \"\\n\")\n if (args.check):\n", "old_path": "v2d/main.py", "rewrite": "ArgSwap(idxs=0<->1 @(95,16)->(95,26))"} -{"repo": "https://:@github.com/jkittley/RFM69.git", "hash": "bcf1e92ee49342ee2ac1d39be7b95671c1ddd6d3", "diff": "@@ -143,7 +143,7 @@ class RFM69():\n self.writeReg(REG_PACKETCONFIG2, 0)\n \n def readReg(self, addr):\n- return self.spi.xfer([addr | 0x7F, 0])\n+ return self.spi.xfer([addr & 0x7F, 0])\n \n def writeReg(self, addr, value):\n self.spi.xfer([addr | 0x80, value])\n", "old_path": "RFM69.py", "rewrite": "ReplaceText(target='&' @(146,31)->(146,32))"} -{"repo": "https://:@github.com/schuderer/mllaunchpad.git", "hash": "93c87d9c160b3270319e6b344f1d1831d4323014", "diff": "@@ -50,7 +50,7 @@ def train_model(complete_conf):\n logger.warning(\"Model's class is not a subclass of ModelInterface: %s\", model)\n \n model_store = resource.ModelStore(complete_conf)\n- model_store.dump_trained_model(model_conf, model, metrics)\n+ model_store.dump_trained_model(complete_conf, model, metrics)\n \n logger.info(\"Created and stored trained model %s, version %s, metrics %s\", model_conf['name'], model_conf['version'], metrics)\n \n", "old_path": "launchpad/train.py", "rewrite": "ReplaceText(target='complete_conf' @(53,35)->(53,45))"} -{"repo": "https://:@github.com/daanvdk/is_valid.git", "hash": "0c78bad8195b8c4b702b368e9d13d1ccaf573382", "diff": "@@ -158,4 +158,4 @@ def is_set_of(predicate):\n return (True, explanation) if valid else (False, {\n elems[i]: value for i, value in explanation.items()\n })\n- return is_if(is_set, predicate, else_valid=False)\n+ return is_if(is_set, is_valid, else_valid=False)\n", "old_path": "is_valid/structure_predicates.py", "rewrite": "ReplaceText(target='is_valid' @(161,25)->(161,34))"} -{"repo": "https://:@github.com/riptano/cdm.git", "hash": "cb0de67c9a5418a052d77575a0c81b9159e0089a", "diff": "@@ -59,7 +59,7 @@ class Importer(object):\n for _ in pool.imap_unordered(save, self.iter()):\n i += 1\n if i % 10 == 0:\n- pool.update(i)\n+ p.update(i)\n \n \n \n", "old_path": "cdm/importer.py", "rewrite": "ReplaceText(target='p' @(62,20)->(62,24))"} -{"repo": "https://:@github.com/moggers87/exhibition.git", "hash": "18f720dd34997c6da7235f2ea1344e09a670f308", "diff": "@@ -95,7 +95,7 @@ class Config:\n \n if self.parent is not None:\n for k in self.parent.keys():\n- if k in _keys_set:\n+ if k not in _keys_set:\n _keys_set.add(k)\n yield k\n \n", "old_path": "exhibition/main.py", "rewrite": "ReplaceText(target=' not in ' @(98,20)->(98,24))"} -{"repo": "https://:@github.com/moggers87/exhibition.git", "hash": "49a8eb6842d2eedecd239f35c651e4afde69cb87", "diff": "@@ -486,7 +486,7 @@ def serve(settings):\n \n path = pathlib.Path(settings[\"deploy_path\"], path)\n \n- if not (path.exists() and path.suffix):\n+ if not (path.exists() or path.suffix):\n for ext in Node._strip_exts:\n new_path = path.with_suffix(ext)\n if new_path.exists():\n", "old_path": "exhibition/main.py", "rewrite": "ReplaceText(target='or' @(489,34)->(489,37))"} -{"repo": "https://:@github.com/civrev/rlrisk.git", "hash": "fb9ba4a28cd8dced235e9cb97b861130baa351a9", "diff": "@@ -575,7 +575,7 @@ class Risk:\n t_count=3\n \n #now add to amount recruited\n- recruit+=t_count\n+ recruit=t_count\n \n #calculate for continents\n for continent in self.continents:\n", "old_path": "rlrisk/environment/risk.py", "rewrite": "ReplaceText(target='=' @(578,15)->(578,17))"} -{"repo": "https://:@gitlab.com/philn/fb2feed.git", "hash": "9e6dc0b80947383a54e0fe99c656d419a4ede2c9", "diff": "@@ -126,7 +126,7 @@ async def page_to_atom(browser, page_id, root_dir, media_dir, media_url_slug):\n \n fe = fg.add_entry()\n fe.author(name=page_id, email=\"%s.facebook.no-reply@fb2feed.org\" % page_id)\n- fe.id(post_url)\n+ fe.id(post_id)\n fe.link(href=post_url, rel=\"alternate\")\n fe.published(timestamp)\n fe.updated(timestamp)\n", "old_path": "fb2feed.py", "rewrite": "ReplaceText(target='post_id' @(129,18)->(129,26))"} -{"repo": "https://:@github.com/sputt/req-compile.git", "hash": "f76edf2e9821dcef6d7bc851282731821e569d81", "diff": "@@ -111,7 +111,7 @@ class DistributionCollection(object):\n self.nodes[key] = node\n \n # If a new extra is being supplied, update the metadata\n- if reason and node.metadata and reason.extras and set(reason.extras) & node.extras:\n+ if reason and node.metadata and reason.extras and set(reason.extras) - node.extras:\n metadata_to_apply = node.metadata\n \n if source is not None and source.key in self.nodes:\n", "old_path": "req_compile/dists.py", "rewrite": "ReplaceText(target='-' @(114,77)->(114,78))"} -{"repo": "https://:@github.com/inovonics/cloud-datastore.git", "hash": "72b1cb9760973b300b5ebf3bad1d6836b15d908a", "diff": "@@ -113,7 +113,7 @@ class InoObjectBase:\n \n def _validate_oid(self):\n # Verify the oid is a UUID type variable\n- if isinstance(getattr(self, 'oid'), uuid.UUID):\n+ if not isinstance(getattr(self, 'oid'), uuid.UUID):\n return \"oid not of type uuid.UUID but type {}, value {}\".format(type(getattr(self, 'oid')), getattr(self, 'oid'))\n return None\n \n", "old_path": "inovonics/cloud/datastore/bases.py", "rewrite": "ReplaceText(target='not ' @(116,11)->(116,11))"} -{"repo": "https://:@github.com/shawnbrown/squint.git", "hash": "9912b140bc25d6d8679819ee8c4fd037a0b01b54", "diff": "@@ -116,7 +116,7 @@ class Result(Iterator):\n value = __next__(self)\n finally:\n self._started_iteration = True\n- bound_method = __next__.__get__(self.__class__, self)\n+ bound_method = __next__.__get__(self, self.__class__)\n self.__next__ = bound_method # <- Replace __next__ method!\n return value\n \n", "old_path": "squint/result.py", "rewrite": "ArgSwap(idxs=0<->1 @(119,27)->(119,43))"} -{"repo": "https://:@github.com/kav2k/singularity-pipeline.git", "hash": "4eacf7dfa1ddcdd7feec8ff928d8cac3ee170c72", "diff": "@@ -136,7 +136,7 @@ class Pipeline():\n self.eprint.bold(\"# Running pipeline...\\n\")\n \n if not self.dry_run:\n- if os.path.isfile(self.imagefile):\n+ if not os.path.isfile(self.imagefile):\n raise RuntimeError(\"Image {} does not exist\".format(self.imagefile))\n \n for spec in self.binds:\n", "old_path": "singularity_pipeline/pipeline.py", "rewrite": "ReplaceText(target='not ' @(139,15)->(139,15))"} -{"repo": "https://:@github.com/mvinii94/aws-lambda-log-collector.git", "hash": "682850f282b70aa18663699c7e5e32bc4f6a8be1", "diff": "@@ -25,7 +25,7 @@ def cli(function_name, profile, region, output, start_time, end_time, pattern, l\n epoch_start_time = parse_time(start_time)\n epoch_end_time = parse_time(end_time)\n \n- if epoch_start_time < epoch_end_time:\n+ if epoch_start_time > epoch_end_time:\n raise Exception(INVALID_DATES)\n \n available_profiles = get_profiles()\n", "old_path": "collector/cli.py", "rewrite": "ReplaceText(target='>' @(28,25)->(28,26))"} -{"repo": "https://:@github.com/peteshadbolt/abp.git", "hash": "9d859145d8a6ec45a7831235bfc05f45932709a7", "diff": "@@ -58,7 +58,7 @@ class CircuitModel(object):\n def act_cz(self, control, target):\n \"\"\" Act a CU somewhere \"\"\"\n control = 1 << control\n- target = 1 << control\n+ target = 1 << target\n for i in xrange(self.d):\n if (i & control) and (i & target):\n self.state[i, 0] *= -1\n", "old_path": "abp/qi.py", "rewrite": "ReplaceText(target='target' @(61,22)->(61,29))"} -{"repo": "https://:@github.com/peteshadbolt/abp.git", "hash": "1b787c47377d73a0519f60cc77657b2b09577b49", "diff": "@@ -134,7 +134,7 @@ class GraphState(object):\n ci = self.get_connection_info(a, b)\n if ci[\"non1\"] and not clifford.is_diagonal(self.node[a][\"vop\"]):\n debug(\"cphase: left one needs treatment again -> putting it to Id\")\n- self.remove_vop(b, a)\n+ self.remove_vop(a, b)\n \n self.cz_with_table(a, b)\n \n", "old_path": "abp/graphstate.py", "rewrite": "ArgSwap(idxs=0<->1 @(137,12)->(137,27))"} -{"repo": "https://:@github.com/jsbroks/imantics.git", "hash": "a9919325c1628d65cc0baf150599e3d04d6cf1be", "diff": "@@ -43,7 +43,7 @@ class Annotation(Semantic):\n :param polygons: bbox to create annotation from\n :type polygons: :class:`BBox`, list, tuple\n \"\"\"\n- return cls(image=image, category=image, bbox=bbox)\n+ return cls(image=image, category=category, bbox=bbox)\n \n @classmethod\n def from_polygons(cls, polygons, image=None, category=None):\n", "old_path": "imantics/annotation.py", "rewrite": "ReplaceText(target='category' @(46,41)->(46,46))"} -{"repo": "https://:@github.com/278mt/cotohappy.git", "hash": "09e71e8a654b93db750a1e5f55b1c063b3070470", "diff": "@@ -26,7 +26,7 @@ class Reshape(object):\n Reshape(mode='links', data=link)\n for link in chunk_info['links']\n ]\n- self.predicate = chunk_info['predicate'] if 'predicate' in data else []\n+ self.predicate = chunk_info['predicate'] if 'predicate' in chunk_info else []\n \n self.tokens = [\n Reshape(mode='tokens', data=token)\n", "old_path": "cotohappy/reshape.py", "rewrite": "ReplaceText(target='chunk_info' @(29,72)->(29,76))"} -{"repo": "https://:@github.com/AntoineToubhans/MongoTs.git", "hash": "79fa91c7f9f3ecd0e0d22ca01a67a9efc84a9611", "diff": "@@ -82,4 +82,4 @@ class MongoTSCollection():\n \n raw_data = list(self._collection.aggregate(pipeline))\n \n- return build_dataframe(raw_data, aggregateby, groupby)\n+ return build_dataframe(raw_data, parsed_aggregateby, groupby)\n", "old_path": "mongots/collection.py", "rewrite": "ReplaceText(target='parsed_aggregateby' @(85,41)->(85,52))"} -{"repo": "https://:@github.com/thenewguy/django-randomfields.git", "hash": "983d6a2940e17a42326137b6592e0ed3ea3de8bd", "diff": "@@ -49,7 +49,7 @@ class RandomStringFieldBase(RandomFieldBase):\n 'min_length': self.min_length,\n }\n defaults.update(kwargs)\n- return super(RandomStringFieldBase, self).formfield(**kwargs)\n+ return super(RandomStringFieldBase, self).formfield(**defaults)\n \n class RandomCharField(RandomStringFieldBase, models.CharField):\n def check(self, **kwargs):\n", "old_path": "randomfields/models/fields/string.py", "rewrite": "ReplaceText(target='defaults' @(52,62)->(52,68))"} -{"repo": "https://:@github.com/mathcamp/devbox.git", "hash": "b014314770fe44557b57c7d9d024959be9fb4f4a", "diff": "@@ -175,7 +175,7 @@ def git_describe(describe_args):\n if proc.returncode != 0:\n print(\"Error parsing git revision! Make sure that you have tagged a \"\n \"commit, and that the tag matches the 'tag_match' argument\")\n- print(\"Git output: \" + output)\n+ print(\"Git output: \" + description)\n return {\n 'tag': 'unknown',\n 'description': 'unknown',\n", "old_path": "version_helper.py", "rewrite": "ReplaceText(target='description' @(178,31)->(178,37))"} -{"repo": "https://:@github.com/mathcamp/devbox.git", "hash": "54a298fc2018e1b4328a68c08740f5bd49f0864a", "diff": "@@ -213,7 +213,7 @@ def unbox(repo, dest=None, no_deps=False, *parents):\n LOG.info(\"Installing into %s\", install_dir)\n dest_conf = load_conf(install_dir)\n venv = dest_conf.get('env')\n- with pushd(dest):\n+ with pushd(install_dir):\n if venv is not None:\n venv['path'] = os.path.abspath(venv['path'])\n run_commands(conf.get('post_setup', []), venv)\n", "old_path": "devbox/unbox.py", "rewrite": "ReplaceText(target='install_dir' @(216,19)->(216,23))"} -{"repo": "https://:@github.com/ccxtechnologies/adbus.git", "hash": "58d6866e77afaac02195d40348e207d9258b4fc2", "diff": "@@ -177,7 +177,7 @@ class Method:\n self.name = x.attrib['name']\n if x.tag == 'arg':\n if x.attrib['direction'] == 'out':\n- self.return_signature = x.attrib['type']\n+ self.return_signature += x.attrib['type']\n elif x.attrib['direction'] == 'in':\n self.arg_signatures.append(x.attrib['type'])\n \n", "old_path": "adbus/client/proxy.py", "rewrite": "ReplaceText(target='+=' @(180,42)->(180,43))"} -{"repo": "https://:@github.com/balazstothofficial/models.git", "hash": "d0b6a34bb0dbd981e3785661f04f04cde9c4222b", "diff": "@@ -107,7 +107,7 @@ def run_mnist_eager(flags_obj):\n \n # Automatically determine device and data_format\n (device, data_format) = ('/gpu:0', 'channels_first')\n- if flags_obj.no_gpu or tf.test.is_gpu_available():\n+ if flags_obj.no_gpu or not tf.test.is_gpu_available():\n (device, data_format) = ('/cpu:0', 'channels_last')\n # If data_format is defined in FLAGS, overwrite automatically set value.\n if flags_obj.data_format is not None:\n", "old_path": "official/mnist/mnist_eager.py", "rewrite": "ReplaceText(target='not ' @(110,25)->(110,25))"} -{"repo": "https://:@github.com/balazstothofficial/models.git", "hash": "e9dbef6be831bac9c5cbacf6b3b13e4557e4777c", "diff": "@@ -353,7 +353,7 @@ class Worker(threading.Thread):\n policy_loss = tf.nn.sparse_softmax_cross_entropy_with_logits(labels=memory.actions,\n logits=logits)\n policy_loss *= tf.stop_gradient(advantage)\n- policy_loss = 0.01 * entropy\n+ policy_loss -= 0.01 * entropy\n total_loss = tf.reduce_mean((0.5 * value_loss + policy_loss))\n return total_loss\n \n", "old_path": "research/a3c_blogpost/a3c_cartpole.py", "rewrite": "ReplaceText(target='-=' @(356,16)->(356,17))"} -{"repo": "https://:@github.com/idigbio/idq.git", "hash": "c3c53aa2eab9d4a958f5ac338c4daac8fae2d192", "diff": "@@ -31,7 +31,7 @@ def create_harness(w):\n \n for f in w.required_fields:\n f_name = f.replace(\":\",\"_\")\n- setattr(SingleForm,f_name,StringField(f_name))\n+ setattr(SingleForm,f_name,StringField(f))\n \n setattr(SingleForm,\"submit\",SubmitField(u'Process'))\n \n", "old_path": "idq/harness/__init__.py", "rewrite": "ReplaceText(target='f' @(34,46)->(34,52))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "659ab9846e81d95bb75dbb3c00147324bf0d6541", "diff": "@@ -22,7 +22,7 @@ def login(request):\n else:\n errors = {}\n response = HttpResponse()\n- response.session.set_test_cookie()\n+ request.session.set_test_cookie()\n t = template_loader.get_template('registration/login')\n c = Context(request, {\n 'form': formfields.FormWrapper(manipulator, request.POST, errors),\n", "old_path": "django/views/auth/login.py", "rewrite": "ReplaceText(target='request' @(25,4)->(25,12))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "a97648a7e03fb95b09e888e5d59d82d57fb289b7", "diff": "@@ -105,7 +105,7 @@ class DecoratorsTest(TestCase):\n \"\"\"\n def my_view(request):\n return \"response\"\n- my_view_cached = cache_page(123, my_view)\n+ my_view_cached = cache_page(my_view, 123)\n self.assertEqual(my_view_cached(HttpRequest()), \"response\")\n \n class MethodDecoratorAdapterTests(TestCase):\n", "old_path": "tests/regressiontests/decorators/tests.py", "rewrite": "ArgSwap(idxs=0<->1 @(108,25)->(108,35))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "7db68a888b633f2b65f753d50f21463b65a01edf", "diff": "@@ -399,7 +399,7 @@ def language(parser, token):\n \n \"\"\"\n bits = token.split_contents()\n- if len(bits) < 2:\n+ if len(bits) != 2:\n raise TemplateSyntaxError(\"'%s' takes one argument (language)\" % bits[0])\n language = parser.compile_filter(bits[1])\n nodelist = parser.parse(('endlanguage',))\n", "old_path": "django/templatetags/i18n.py", "rewrite": "ReplaceText(target='!=' @(402,17)->(402,18))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "b2050ff546da4164f90a795e55d7d8c55981783d", "diff": "@@ -169,7 +169,7 @@ class SQLCompiler(object):\n if isinstance(col, (list, tuple)):\n alias, column = col\n table = self.query.alias_map[alias][TABLE_NAME]\n- if table in only_load and col not in only_load[table]:\n+ if table in only_load and column not in only_load[table]:\n continue\n r = '%s.%s' % (qn(alias), qn(column))\n if with_aliases:\n", "old_path": "django/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='column' @(172,46)->(172,49))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "cfba2460370a6d1808b78e2ba0709ea5c8b7e773", "diff": "@@ -42,7 +42,7 @@ def check_settings(base_url=None):\n Checks if the staticfiles settings have sane values.\n \n \"\"\"\n- if base_url is not None:\n+ if base_url is None:\n base_url = settings.STATIC_URL\n if not base_url:\n raise ImproperlyConfigured(\n", "old_path": "django/contrib/staticfiles/utils.py", "rewrite": "ReplaceText(target=' is ' @(45,15)->(45,23))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "5f2be4ecbb5df3760f4c6e49170478719d3026d7", "diff": "@@ -824,7 +824,7 @@ class SQLInsertCompiler(SQLCompiler):\n for val in values\n ]\n if self.return_id and self.connection.features.can_return_id_from_insert:\n- params = values[0]\n+ params = params[0]\n col = \"%s.%s\" % (qn(opts.db_table), qn(opts.pk.column))\n result.append(\"VALUES (%s)\" % \", \".join(placeholders[0]))\n r_fmt, r_params = self.connection.ops.return_insert_id()\n", "old_path": "django/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='params' @(827,21)->(827,27))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "d72d5ce8274992ce01e39f866a7a250bc459eefe", "diff": "@@ -37,7 +37,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):\n if isinstance(col, (list, tuple)):\n alias, column = col\n table = self.query.alias_map[alias][TABLE_NAME]\n- if table in only_load and col not in only_load[table]:\n+ if table in only_load and column not in only_load[table]:\n continue\n r = self.get_field_select(field, alias, column)\n if with_aliases:\n", "old_path": "django/contrib/gis/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='column' @(40,46)->(40,49))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "6ecbac21a9017a53fe18ac81c9c1d2f28185a292", "diff": "@@ -111,5 +111,5 @@ class OSMWidget(BaseGeometryWidget):\n return 900913\n \n def render(self, name, value, attrs=None):\n- return super(self, OSMWidget).render(name, value,\n+ return super(OSMWidget, self).render(name, value,\n {'default_lon': self.default_lon, 'default_lat': self.default_lat})\n", "old_path": "django/contrib/gis/forms/widgets.py", "rewrite": "ArgSwap(idxs=0<->1 @(114,15)->(114,20))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "86c248aa646183ef4a1cb407bb3e4cb597272f63", "diff": "@@ -575,7 +575,7 @@ class SQLCompiler(object):\n for order, order_params in ordering_group_by:\n # Even if we have seen the same SQL string, it might have\n # different params, so, we add same SQL in \"has params\" case.\n- if order not in seen or params:\n+ if order not in seen or order_params:\n result.append(order)\n params.extend(order_params)\n seen.add(order)\n", "old_path": "django/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='order_params' @(578,44)->(578,50))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "fddb0131d37109c809ec391e1a134ef1d9e442a7", "diff": "@@ -57,7 +57,7 @@ def check_password(password, encoded, setter=None, preferred='default'):\n \n must_update = hasher.algorithm != preferred.algorithm\n if not must_update:\n- must_update = hasher.must_update(encoded)\n+ must_update = preferred.must_update(encoded)\n is_correct = hasher.verify(password, encoded)\n if setter and is_correct and must_update:\n setter(password)\n", "old_path": "django/contrib/auth/hashers.py", "rewrite": "ReplaceText(target='preferred' @(60,22)->(60,28))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "e8223b889aab3b5ac0c2312eb9ee2307ea635c97", "diff": "@@ -228,7 +228,7 @@ class GenericRelationTests(TestCase):\n # then wrong results are produced here as the link to b will also match\n # (b and hs1 have equal pks).\n self.assertEqual(qs.count(), 1)\n- self.assertEqual(qs[0].links__sum, l.id)\n+ self.assertEqual(qs[0].links__sum, hs1.id)\n l.delete()\n # Now if we don't have proper left join, we will not produce any\n # results at all here.\n", "old_path": "tests/generic_relations_regress/tests.py", "rewrite": "ReplaceText(target='hs1' @(231,43)->(231,44))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "3074c5b19e2da5f7a5359c3cf3c5308eb194cdf9", "diff": "@@ -112,7 +112,7 @@ class ClassDecoratedTestCase(ClassDecoratedTestCaseSuper):\n \n @classmethod\n def setUpClass(cls):\n- super(cls, ClassDecoratedTestCase).setUpClass()\n+ super(ClassDecoratedTestCase, cls).setUpClass()\n cls.foo = getattr(settings, 'TEST', 'BUG')\n \n def test_override(self):\n", "old_path": "tests/settings_tests/tests.py", "rewrite": "ArgSwap(idxs=0<->1 @(115,8)->(115,13))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "c2b4967e76fd671e6199e4dd54d2a2c1f096b8eb", "diff": "@@ -23,7 +23,7 @@ def import_string(dotted_path):\n return getattr(module, class_name)\n except AttributeError:\n msg = 'Module \"%s\" does not define a \"%s\" attribute/class' % (\n- dotted_path, class_name)\n+ module_path, class_name)\n six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])\n \n \n", "old_path": "django/utils/module_loading.py", "rewrite": "ReplaceText(target='module_path' @(26,12)->(26,23))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "a3fffdca2472885a99e1ea9159a685753cd45738", "diff": "@@ -99,7 +99,7 @@ class SessionStore(SessionBase):\n \n # Remove expired sessions.\n expiry_age = self.get_expiry_age(expiry=self._expiry_date(session_data))\n- if expiry_age < 0:\n+ if expiry_age <= 0:\n session_data = {}\n self.delete()\n self.create()\n", "old_path": "django/contrib/sessions/backends/file.py", "rewrite": "ReplaceText(target='<=' @(102,30)->(102,31))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "abcdb237bb313d116ce2ac8e90f79f61429afc70", "diff": "@@ -31,7 +31,7 @@ class DatabaseCreation(BaseDatabaseCreation):\n try:\n if verbosity >= 1:\n print(\"Destroying old test database for alias %s...\" % (\n- self._get_database_display_str(target_database_name, verbosity),\n+ self._get_database_display_str(verbosity, target_database_name),\n ))\n cursor.execute(\"DROP DATABASE %s\" % qn(target_database_name))\n cursor.execute(\"CREATE DATABASE %s\" % qn(target_database_name))\n", "old_path": "django/db/backends/mysql/creation.py", "rewrite": "ArgSwap(idxs=0<->1 @(34,28)->(34,58))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "542b7f6c50df18f2aa201cf1de81577c1bee643c", "diff": "@@ -50,7 +50,7 @@ class SeparateDatabaseAndState(Operation):\n to_state = base_state.clone()\n for dbop in self.database_operations[:-(pos + 1)]:\n dbop.state_forwards(app_label, to_state)\n- from_state = base_state.clone()\n+ from_state = to_state.clone()\n database_operation.state_forwards(app_label, from_state)\n database_operation.database_backwards(app_label, schema_editor, from_state, to_state)\n \n", "old_path": "django/db/migrations/operations/special.py", "rewrite": "ReplaceText(target='to_state' @(53,25)->(53,35))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "0d9ff873d9f93efbba875efbf582db88bb0e30ce", "diff": "@@ -147,7 +147,7 @@ class UserAttributeSimilarityValidator(object):\n continue\n value_parts = re.split(r'\\W+', value) + [value]\n for value_part in value_parts:\n- if SequenceMatcher(a=password.lower(), b=value_part.lower()).quick_ratio() > self.max_similarity:\n+ if SequenceMatcher(a=password.lower(), b=value_part.lower()).quick_ratio() >= self.max_similarity:\n try:\n verbose_name = force_text(user._meta.get_field(attribute_name).verbose_name)\n except FieldDoesNotExist:\n", "old_path": "django/contrib/auth/password_validation.py", "rewrite": "ReplaceText(target='>=' @(150,91)->(150,92))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "d5088f838d837fc9e3109c828f18511055f20bea", "diff": "@@ -383,7 +383,7 @@ class CombinedExpression(Expression):\n return DurationExpression(self.lhs, self.connector, self.rhs).as_sql(compiler, connection)\n if (lhs_output and rhs_output and self.connector == self.SUB and\n lhs_output.get_internal_type() in {'DateField', 'DateTimeField', 'TimeField'} and\n- lhs_output.get_internal_type() == lhs_output.get_internal_type()):\n+ lhs_output.get_internal_type() == rhs_output.get_internal_type()):\n return TemporalSubtraction(self.lhs, self.rhs).as_sql(compiler, connection)\n expressions = []\n expression_params = []\n", "old_path": "django/db/models/expressions.py", "rewrite": "ReplaceText(target='rhs_output' @(386,50)->(386,60))"} -{"repo": "https://:@github.com/iMerica/dj-models.git", "hash": "95993a89ce6ca5f5e26b1c22b65c57dcb8c005e9", "diff": "@@ -42,7 +42,7 @@ class PasswordResetTokenGenerator:\n return False\n \n # Check the timestamp is within limit\n- if (self._num_days(self._today()) - ts) > settings.PASSWORD_RESET_TIMEOUT_DAYS:\n+ if (self._num_days(self._today()) - ts) >= settings.PASSWORD_RESET_TIMEOUT_DAYS:\n return False\n \n return True\n", "old_path": "django/contrib/auth/tokens.py", "rewrite": "ReplaceText(target='>=' @(45,48)->(45,49))"} -{"repo": "https://:@github.com/Cologler/lquery-python.git", "hash": "2b2d5a249fd80693660433076d8c79ef119c89bb", "diff": "@@ -55,7 +55,7 @@ class DefaultExprVisitor(ExprVisitor):\n right = expr.right.accept(self)\n if left is expr.left and right is expr.right:\n return expr\n- return Make.binary_op(left, right, expr.op)\n+ return Make.binary_op(left, expr.op, right)\n \n def visit_func_expr(self, expr):\n body = expr.body.accept(self)\n", "old_path": "lquery/expr/visitor.py", "rewrite": "ArgSwap(idxs=1<->2 @(58,15)->(58,29))"} -{"repo": "https://:@github.com/rkhleics/police-api-client-python.git", "hash": "2bedbab8eb7d2efb9ff8e39a821fd2796dd4ce3f", "diff": "@@ -28,7 +28,7 @@ class BaseService(object):\n def request(self, verb, method, **kwargs):\n verb = verb.upper()\n request_kwargs = {}\n- if method == 'GET':\n+ if verb == 'GET':\n request_kwargs['params'] = kwargs\n else:\n request_kwargs['data'] = kwargs\n", "old_path": "police_api/service.py", "rewrite": "ReplaceText(target='verb' @(31,11)->(31,17))"} -{"repo": "https://:@github.com/dw/acid.git", "hash": "7cdd45e62d60ea7e67a2a3d656f8cce8dd9f5571", "diff": "@@ -94,7 +94,7 @@ class RangeIterator(object):\n the iterator is still within the bounds of the collection prefix,\n otherwise False.\"\"\"\n keys_raw, self.data = next(self.it, ('', ''))\n- keys = keylib.KeyList.from_raw(self.prefix, keys_raw)\n+ keys = keylib.KeyList.from_raw(keys_raw, self.prefix)\n self.keys = keys\n return keys is not None\n \n", "old_path": "acid/iterators.py", "rewrite": "ArgSwap(idxs=0<->1 @(97,15)->(97,38))"} -{"repo": "https://:@github.com/dw/acid.git", "hash": "7cdd45e62d60ea7e67a2a3d656f8cce8dd9f5571", "diff": "@@ -35,7 +35,7 @@ class IterTest:\n REVERSE = ITEMS[::-1]\n \n def _encode(self, s):\n- return keylib.packs(self.prefix, s)\n+ return keylib.packs(s, self.prefix)\n \n def setUp(self):\n self.e = acid.engines.ListEngine()\n", "old_path": "tests/core_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(38,15)->(38,27))"} -{"repo": "https://:@github.com/akuendig/RxPython.git", "hash": "f1a5d48b5c22cf5d39e592299a3760be72ba79f1", "diff": "@@ -50,7 +50,7 @@ class GroupBy(Producer):\n else:\n if not key in self.map:\n writer = Subject()\n- self.map[key] = value\n+ self.map[key] = writer\n fireNewMapEntry = True\n except Exception as e:\n self.onError(e)\n", "old_path": "linq/groupBy.py", "rewrite": "ReplaceText(target='writer' @(53,28)->(53,33))"} -{"repo": "https://:@github.com/ANCIR/grano.git", "hash": "0c1c013af342409e68adf8e50a80bd72f66cd9a4", "diff": "@@ -20,7 +20,7 @@ def save(data, project=None):\n \"\"\" Create or update a project with a given slug. \"\"\"\n \n validator = ProjectValidator()\n- data = validator.deserialize(validator)\n+ data = validator.deserialize(data)\n \n if project is None:\n project = Project()\n", "old_path": "grano/logic/projects.py", "rewrite": "ReplaceText(target='data' @(23,33)->(23,42))"} -{"repo": "https://:@github.com/ANCIR/grano.git", "hash": "051a6d6191ba975e6f741c19b354a9017c825de0", "diff": "@@ -50,7 +50,7 @@ def update(slug, name):\n authz.require(authz.project_manage(project))\n schema = object_or_404(Schema.by_name(project, name))\n data = request_data({'project': project})\n- project = schemata.save(data, schema=schema)\n+ schema = schemata.save(data, schema=schema)\n db.session.commit()\n return jsonify(schemata.to_rest(schema))\n \n", "old_path": "grano/views/schemata_api.py", "rewrite": "ReplaceText(target='schema' @(53,4)->(53,11))"} -{"repo": "https://:@github.com/eljost/pysisyphus.git", "hash": "b5fd2ffdadc4b9d84a4b553b2e24a739509659be", "diff": "@@ -100,7 +100,7 @@ class NEB(ChainOfStates):\n \n if self._forces is None:\n # Parallel calculation\n- if self.parallel != 0:\n+ if self.parallel > 0:\n with Pool(processes=self.parallel) as pool:\n image_number = len(self.images)\n par_images = pool.map(self.par_calc, range(image_number))\n", "old_path": "pysisyphus/cos/NEB.py", "rewrite": "ReplaceText(target='>' @(103,29)->(103,31))"} -{"repo": "https://:@github.com/eljost/pysisyphus.git", "hash": "f2aa6358798813b4e77862d57a38ec3286f3a142", "diff": "@@ -425,7 +425,7 @@ class ORCA(Calculator):\n self.store_wfo_data(atoms, coords)\n # In the first iteration we have nothing to compare to\n old_root = self.root\n- if self.calc_counter >= 1:\n+ if self.calc_counter > 1:\n last_two_coords = self.wfow.last_two_coords\n self.root = self.wfow.track(old_root=self.root)\n if self.root != old_root:\n", "old_path": "pysisyphus/calculators/ORCA.py", "rewrite": "ReplaceText(target='>' @(428,29)->(428,31))"} -{"repo": "https://:@github.com/eljost/pysisyphus.git", "hash": "f00266de85fe1696b618f979711c52bafb2312be", "diff": "@@ -58,7 +58,7 @@ def get_geoms(xyz_fns, idpp=False, between=0, dump=False, multiple_geoms=False):\n # How is this different from above?\n elif isinstance(xyz_fns, str) and xyz_fns.endswith(\".trj\"):\n geoms = geoms_from_trj(xyz_fns)\n- elif multiple_geoms:\n+ elif not multiple_geoms:\n geoms = geoms_from_trj(xyz_fns[0])\n # Handle multiple .xyz files\n else:\n", "old_path": "pysisyphus/trj.py", "rewrite": "ReplaceText(target='not ' @(61,9)->(61,9))"} -{"repo": "https://:@github.com/eljost/pysisyphus.git", "hash": "98f7e8f2e9a295c727cf57b2dd6bca90fd829b16", "diff": "@@ -837,7 +837,7 @@ def plot_opt(h5_fn=\"optimization.h5\", group_name=\"opt\"):\n ax1.set_title(\"max(forces)\")\n ax1.set_ylabel(\"$E_h$ Bohr\u207b\u00b9 (rad)\u207b\u00b9\")\n \n- ax2.plot(max_forces, **ax_kwargs)\n+ ax2.plot(rms_forces, **ax_kwargs)\n ax2.set_title(\"rms(forces)\")\n ax2.set_xlabel(\"Step\")\n ax2.set_ylabel(\"$E_h$ Bohr\u207b\u00b9 (rad)\u207b\u00b9\")\n", "old_path": "pysisyphus/plot.py", "rewrite": "ReplaceText(target='rms_forces' @(840,13)->(840,23))"} -{"repo": "https://:@github.com/eljost/pysisyphus.git", "hash": "2aaee0dec2e2c07da386ede88d22bd3c2b2baf5e", "diff": "@@ -131,7 +131,7 @@ def run():\n inp = make_input(**inp_kwargs)\n inp_fn = \"packmol.inp\"\n with open(inp_fn, \"w\") as handle:\n- handle.write(inp_fn)\n+ handle.write(inp)\n print(f\"Wrote packmol input to '{inp_fn}'\")\n \n proc = call_packmol(inp)\n", "old_path": "pysisyphus/pack.py", "rewrite": "ReplaceText(target='inp' @(134,21)->(134,27))"} -{"repo": "https://:@github.com/pashango2/Image4Layer.git", "hash": "24060ba346c534032314d6f28011d2edfceec1a2", "diff": "@@ -191,7 +191,7 @@ def separate_blend(cb, cs, func, eval_str=\"func(float(a), float(b))\"):\n \n # cs has alpha\n if cs_alpha:\n- base_img = img.copy()\n+ base_img = cb.copy()\n base_img.paste(img, mask=cs_alpha)\n img = base_img\n \n", "old_path": "image4layer/image4layer.py", "rewrite": "ReplaceText(target='cb' @(194,23)->(194,26))"} -{"repo": "https://:@github.com/BadrYoubiIdrissi/hydra-plugins.git", "hash": "d690e35407ad42bbf99d99ced25e7f3f77dae25b", "diff": "@@ -46,7 +46,7 @@ class RangeSweeper(Sweeper):\n src_lists = []\n for s in arguments:\n key, value = s.split(\"=\")\n- gl = re.match(r'glob\\((.+)\\)', s)\n+ gl = re.match(r'glob\\((.+)\\)', value)\n if ',' in value:\n possible_values=value.split(',')\n elif ':' in value:\n", "old_path": "badr_range_sweeper/hydra_plugins/range_sweeper_badr/range_sweeper_badr.py", "rewrite": "ReplaceText(target='value' @(49,43)->(49,44))"} -{"repo": "https://:@github.com/annoys-parrot/multi_view_network.git", "hash": "df17d237d8e022cfa14fe76cce812b3914360e20", "diff": "@@ -340,7 +340,7 @@ def BuildMultiViewNetwork(\n [v1, v2, v3, v4], name='concatenation')\n fully_connected = keras.layers.Dense(\n units=hidden_units, name='fully_connected')(concatenation)\n- dropout = keras.layers.Dropout(rate=dropout_rate)(concatenation)\n+ dropout = keras.layers.Dropout(rate=dropout_rate)(fully_connected)\n softmax = keras.layers.Dense(\n units=output_units, activation='softmax',\n name='softmax')(dropout)\n", "old_path": "multi_view_network/models.py", "rewrite": "ReplaceText(target='fully_connected' @(343,54)->(343,67))"} -{"repo": "https://:@github.com/jor-/measurements.git", "hash": "7d2c45bf498b709aa6ff903f87122e24bf02ef06", "diff": "@@ -25,7 +25,7 @@ def npy_or_save_dop_and_po4(npy_file, dop_function, po4_function):\n po4 = po4.reshape((1,) + po4.shape)\n \n data = np.append(dop, po4, axis=0)\n- util.io.save_npy(npy_file, data, make_read_only=True, create_path_if_not_exists=True)\n+ util.io.save_npy(data, npy_file, make_read_only=True, create_path_if_not_exists=True)\n \n return data\n \n", "old_path": "all/woa/data.py", "rewrite": "ArgSwap(idxs=0<->1 @(28,8)->(28,24))"} -{"repo": "https://:@github.com/jor-/measurements.git", "hash": "a7a2d0f753fae4e81297af835aad164120937629", "diff": "@@ -73,7 +73,7 @@ class Cruise():\n z = z_var.data\n \n assert po4_var.units == measurements.po4.wod.constants.PO4_UNIT\n- po4 = z_var.data\n+ po4 = po4_var.data\n \n z_flag = z_flag_var.data\n po4_flag = po4_flag_var.data\n", "old_path": "measurements/po4/wod/cruise.py", "rewrite": "ReplaceText(target='po4_var' @(76,22)->(76,27))"} -{"repo": "https://:@github.com/jor-/measurements.git", "hash": "859a296a6e70664de2e7ff4970b80f311735ef19", "diff": "@@ -678,7 +678,7 @@ class LandSeaMask():\n \n # plot\n cm = matplotlib.pyplot.cm.winter_r\n- util.plot.data(data, file, land_value=0, power_limit=10, colormap=cm)\n+ util.plot.data(file, data, land_value=0, power_limit=10, colormap=cm)\n \n # copy\n def copy(self):\n", "old_path": "measurements/land_sea_mask/lsm.py", "rewrite": "ArgSwap(idxs=0<->1 @(681,8)->(681,22))"} -{"repo": "https://:@github.com/jor-/measurements.git", "hash": "859a296a6e70664de2e7ff4970b80f311735ef19", "diff": "@@ -68,7 +68,7 @@ def _plot_map(data, lsm, file, layer=None, v_min=None, v_max=None, use_log_scale\n data = data[:, :, :, layer]\n data = data.reshape(data.shape + (1,))\n file = _prepare_filename(file, lsm)\n- util.plot.data(data, file, no_data_value=np.inf, v_min=v_min, v_max=v_max, use_log_scale=use_log_scale, contours=False, colorbar=True, power_limit=0, colorbar_kwargs=colorbar_kwargs)\n+ util.plot.data(file, data, no_data_value=np.inf, v_min=v_min, v_max=v_max, use_log_scale=use_log_scale, contours=False, colorbar=True, power_limit=0, colorbar_kwargs=colorbar_kwargs)\n \n def _plot_histogram(data, lsm, file, bins=None, step_size=None, v_min=None, v_max=None, use_log_scale=False, tick_power=None):\n file = _prepare_filename(file, lsm, 'histogram')\n", "old_path": "measurements/util/plot.py", "rewrite": "ArgSwap(idxs=0<->1 @(71,4)->(71,18))"} -{"repo": "https://:@github.com/yeago/django-nonrel-enuff.git", "hash": "77f985134934ef571ea04e9fe6629fffa0bc276d", "diff": "@@ -18,7 +18,7 @@ class EnuffManager(models.Manager):\n def push_to_list(self, queue, instance, trim=500, redis_conn=None, bump=True, site=None):\n backend = RedisBackend(conn=redis_conn)\n key = self.get_key(queue, site=site)\n- current_list = backend.get_ids(queue)\n+ current_list = backend.get_ids(key)\n known_length = len(current_list) + 1\n if bump:\n if instance.pk in current_list:\n", "old_path": "enuff/managers.py", "rewrite": "ReplaceText(target='key' @(21,39)->(21,44))"} -{"repo": "https://:@gitlab.com/ViDA-NYU/reproserver.git", "hash": "4dea7214ea920d07375abefc9b6cafd6be72a418", "diff": "@@ -23,7 +23,7 @@ class OSF(BaseRepository):\n url = url[8:]\n else:\n raise RepositoryError(\"Invalid URL\")\n- if url.lower().startswith('osf.io/'):\n+ if not url.lower().startswith('osf.io/'):\n raise RepositoryError(\"Not OSF URL\")\n \n path = url[7:]\n", "old_path": "reproserver/repositories/osf.py", "rewrite": "ReplaceText(target='not ' @(26,11)->(26,11))"} -{"repo": "https://:@github.com/bmeyers/StatisticalClearSky.git", "hash": "34c593a9d8f1be450f20fe5d3bbd411cf5cef692", "diff": "@@ -399,7 +399,7 @@ class IterativeFitting(SerializationMixin, PlotMixin):\n Since it's used in constructor,\n TimeShift is injected through constructor.\n \"\"\"\n- if time_shift is not None:\n+ if time_shift is None:\n return ClusteringTimeShift(power_signals_d)\n else:\n return time_shift\n", "old_path": "statistical_clear_sky/algorithm/iterative_fitting.py", "rewrite": "ReplaceText(target=' is ' @(402,21)->(402,29))"} -{"repo": "https://:@github.com/dccs-tech/mcmi.git", "hash": "64aa5041a581b2f11782f09dedae15a0d188e5cd", "diff": "@@ -176,7 +176,7 @@ class DataMixin(object, metaclass = MetaDataMixin):\n else:\n method_name = \"{}_name\".format(name)\n \n- relations[name] = getattr(self, method_name, None)\n+ relations[field_name] = getattr(self, method_name, None)\n return relations\n \n \n", "old_path": "app/systems/command/mixins/base.py", "rewrite": "ReplaceText(target='field_name' @(179,22)->(179,26))"} -{"repo": "https://:@github.com/rbwinslow/hq.git", "hash": "6417c2446670e67868162190254759a483b894ab", "diff": "@@ -69,7 +69,7 @@ def _cmp_nodes_to_value(base_op, first, second):\n def _cmp_value_to_nodes(base_op, first, second):\n node_values = set([number(node) for node in second])\n first = number(first)\n- verbose_print('Comparing {0} nodes in node set to value \"{1}\"'.format(len(node_values), second))\n+ verbose_print('Comparing {0} nodes in node set to value \"{1}\"'.format(len(node_values), first))\n \n for node_value in node_values:\n if base_op(first, node_value):\n", "old_path": "hq/xpath/relational_operators.py", "rewrite": "ReplaceText(target='first' @(72,92)->(72,98))"} -{"repo": "https://:@github.com/PennWhartonBudgetModel/Utilities.git", "hash": "dc85c81ce99f0290069d261bdacc675a40e67756", "diff": "@@ -114,7 +114,7 @@ class InterfaceReader(PWBMTask):\n if not exists(destination_folder):\n makedirs(destination_folder)\n \n- if self.filename == \"\":\n+ if self.filename != \"\":\n \n file_location = join(\n server_location,\n", "old_path": "pwbmutils/interface_reader.py", "rewrite": "ReplaceText(target='!=' @(117,29)->(117,31))"} -{"repo": "https://:@github.com/wtrdrnkr/pyrecon.git", "hash": "2055f9cddf60e78a7012ec7dbe9900cd59151e67", "diff": "@@ -288,7 +288,7 @@ def prepare_frontend_payload(session, section, grouped):\n # Add uniques to payload\n unique_ids_query = prepare_unique_query(session, section)\n for unique_id in unique_ids_query:\n- db_contour_unique = session.query(Contour).get(contour_A_id)\n+ db_contour_unique = session.query(Contour).get(unique_id)\n unique_reconstruct_contour = section.contours[db_contour_unique.index]\n unique_dict = prepare_contour_dict_for_frontend(\n unique_reconstruct_contour,\n", "old_path": "pyrecon/tools/mergetool/backend.py", "rewrite": "ReplaceText(target='unique_id' @(291,55)->(291,67))"} -{"repo": "https://:@github.com/chili-epfl/pyrobots.git", "hash": "146de875a3a4cdea20c0778bd454e7255d0ff78d", "diff": "@@ -57,7 +57,7 @@ with robots.PR2(knowledge = pyoro.Oro(), init = False) as pr2:\n for t in e:\n text = pr2.knowledge[\"%s verbalisesTo *\" % t][0]\n logger.warning(\"New verbalization from Dialogs: <%s>\" % text)\n- pr2.say(t)\n+ pr2.say(text)\n \n \n if \"--init\" in sys.argv:\n", "old_path": "scripts/handover.py", "rewrite": "ReplaceText(target='text' @(60,20)->(60,21))"} -{"repo": "https://:@github.com/raviqqe/tensorflow-extenteten.git", "hash": "7d6a40a3bd15292c762e919d1411e8da06791329", "diff": "@@ -19,7 +19,7 @@ def get_attentions():\n def add_metric(tensor, name=None):\n return tf.add_to_collection(\n METRICS,\n- tensor if name is None else util.rename(name, tensor))\n+ tensor if name is None else util.rename(tensor, name))\n \n def get_metrics():\n return tf.get_collection(METRICS)\n", "old_path": "nn/collections.py", "rewrite": "ArgSwap(idxs=0<->1 @(22,34)->(22,45))"} -{"repo": "https://:@github.com/raviqqe/tensorflow-extenteten.git", "hash": "f34e283077d1899902e276dff397defed16537f7", "diff": "@@ -60,7 +60,7 @@ def classify(logits,\n return (predictions,\n loss + l2_regularization_loss(regularization_scale),\n train.minimize(loss),\n- _evaluate(predictions, true_label))\n+ _evaluate(predicted_labels, true_label))\n \n \n @func_scope()\n", "old_path": "extenteten/classification.py", "rewrite": "ReplaceText(target='predicted_labels' @(63,22)->(63,33))"} -{"repo": "https://:@github.com/Gulats/playmate.git", "hash": "e7b2dc953d5117abdbf2d0821bb6991ed0fd26b1", "diff": "@@ -333,7 +333,7 @@ class PlayScraper(object):\n results = s.DEV_RESULTS if results is None else results\n page = 0 if page is None else page\n page_num = (results // 20) * page\n- if not 0 < page_num <= 12:\n+ if not 0 <= page_num <= 12:\n raise ValueError('Page out of range. (results // 20) * page must be between 0 - 12')\n pagtok = self._pagtok[page_num]\n \n", "old_path": "play_scraper/scraper.py", "rewrite": "ReplaceText(target='<=' @(336,17)->(336,18))"} -{"repo": "https://:@github.com/Acrisel/sshpipe.git", "hash": "d87836437f14330751667874ae8ee4bbb257289c", "diff": "@@ -21,7 +21,7 @@ class MySSHPipeHandler(SSHPipeHandler):\n \n def atstart(self, received):\n file = \"{}{}\".format(__file__, \".remote.log\")\n- if hasattr(self, 'mlogger'):\n+ if not hasattr(self, 'mlogger'):\n raise RuntimeError(\"Self missing mlogger method.\")\n self.mlogger.debug(\"Opening file: {}.\".format(file))\n self.file = open(file, 'w')\n", "old_path": "sshpipe/examples/ssh_remote_handler.py", "rewrite": "ReplaceText(target='not ' @(24,11)->(24,11))"} -{"repo": "https://:@github.com/NREL/tracknodes.git", "hash": "38a736a18b767b24a883698f15618bc160dceb5e", "diff": "@@ -124,7 +124,7 @@ class TrackNodes:\n for line in Popen([self.nodes_cmd, '--version'], stdout=PIPE, stderr=PIPE).communicate()[1].strip().split(\"\\n\"):\n fields = line.split()\n \n- if len(fields) > 0:\n+ if len(fields) < 0:\n raise Exception(\"Unable to determine PBSpro or Torque\")\n \n if fields[0] == \"pbs_version\":\n", "old_path": "lib/tracknodes/tracknodes.py", "rewrite": "ReplaceText(target='<' @(127,27)->(127,28))"} -{"repo": "https://:@github.com/podhmo/metafanstatic.git", "hash": "3c8e226e19bc4d3e0ad0c41f0f09da0183a4fd0f", "diff": "@@ -67,7 +67,7 @@ def dependencies_iterator(xs):\n yield k, v\n else:\n for e in xs:\n- yield k, None\n+ yield e, None\n \n \n class TotalComplement(object):\n", "old_path": "metafanstatic/complement.py", "rewrite": "ReplaceText(target='e' @(70,18)->(70,19))"} -{"repo": "https://:@github.com/podhmo/metafanstatic.git", "hash": "335a4deac8f721341e4983fab547082fb926b7e9", "diff": "@@ -58,7 +58,7 @@ def creation(args):\n if \"skip\" not in params[c]:\n sys.stderr.write(\"create package: {}? (y or n)\\n\".format(c))\n sys.stderr.flush()\n- skip = \"y\" == sys.stdin.readline().strip().lower()\n+ skip = \"y\" != sys.stdin.readline().strip().lower()\n else:\n skip = params[c][\"skip\"]\n if skip:\n", "old_path": "metafanstatic/command.py", "rewrite": "ReplaceText(target='!=' @(61,23)->(61,25))"} -{"repo": "https://:@github.com/rte-france/Grid2Op.git", "hash": "a5f67c567a5dda60a015e9c06802927eadd6f5df", "diff": "@@ -57,7 +57,7 @@ if __name__ == \"__main__\":\n old_version = re.sub(\"version=\", \"\", old_version)\n old_version = re.sub(\"'\", \"\", old_version)\n old_version = re.sub('\"', \"\", old_version)\n- if version <= old_version:\n+ if version < old_version:\n raise RuntimeError(\"You provided the \\\"new\\\" version \\\"{}\\\" which is older (or equal) to the current version \"\n \"found: \\\"{}\\\".\".format(version, old_version))\n \n", "old_path": "utils/make_release.py", "rewrite": "ReplaceText(target='<' @(60,15)->(60,17))"} -{"repo": "https://:@bitbucket.org/berkeleylab/als.milo.git", "hash": "e60d005d389cb31b6e99f937e35adbe3fccb7aaf", "diff": "@@ -131,7 +131,7 @@ def get_versions():\n pass\n \n return_key_values = _get_versions()\n- return_key_values[\"authors\"] = pieces[\"authors\"]\n+ return_key_values[\"authors\"] = default_keys_values[\"authors\"]\n return return_key_values\n \n \n", "old_path": "milo/version.py", "rewrite": "ReplaceText(target='default_keys_values' @(134,35)->(134,41))"} -{"repo": "https://:@github.com/astroJeff/dart_board.git", "hash": "1e34f160c6865ba41d49a6261bd56b5ecdb3aa28", "diff": "@@ -42,7 +42,7 @@ def ln_prior(x, dart):\n if key == 'kick_sigma': kick_sigma = value\n if key == 'M1_alpha': M1_alpha = value\n if key == 'M1_min': M1_min = value\n- if key == 'M1_max': M1_min = value\n+ if key == 'M1_max': M1_max = value\n if key == 'M2_min': M2_min = value\n if key == 'a_min': a_min = value\n if key == 'a_max': a_max = value\n", "old_path": "dart_board/priors.py", "rewrite": "ReplaceText(target='M1_max' @(45,28)->(45,34))"} -{"repo": "https://:@github.com/astroJeff/dart_board.git", "hash": "6362e24414b5056aea5b50b99e7a446b9e9a9625", "diff": "@@ -156,7 +156,7 @@ class DartBoard():\n print(\"You must include a binary evolution scheme, e.g. pybse.evolv_wrapper\")\n sys.exit(-1)\n \n- if ntemps != 1 or ntemps is not None:\n+ if ntemps != 1 and ntemps is not None:\n if ln_likelihood_function is None:\n print(\"You must include a likelihood function when using the parallel tempering MCMC method.\")\n sys.exit(-1)\n", "old_path": "dart_board/darts.py", "rewrite": "ReplaceText(target='and' @(159,23)->(159,25))"} -{"repo": "https://:@github.com/celskeggs/themis.git", "hash": "7f075e9140cb32cd691ca4725fa6a1789226ad23", "diff": "@@ -19,7 +19,7 @@ def generate_prebuilt_files(build_lib):\n \n shutil.copyfile(os.path.join(builddir, SO_NAME),\n os.path.join(build_lib, \"themis\", SO_NAME))\n- shutil.copyfile(os.path.join(builddir, HEADER_NAME),\n+ shutil.copyfile(os.path.join(source_dir, HEADER_NAME),\n os.path.join(build_lib, \"themis\", os.path.basename(HEADER_NAME)))\n print(\"finished compiling frc hal\")\n \n", "old_path": "setup.py", "rewrite": "ReplaceText(target='source_dir' @(22,37)->(22,45))"} -{"repo": "https://:@github.com/LanjiaoGong/chinese_province_city_area_mapper.git", "hash": "ef285ed737310b53eb8e44362f5239cd9e9414fe", "diff": "@@ -58,7 +58,7 @@ class Location:\n def __city_and_province(self):\n if self.city.isNotEmpty() and self.province.isNotEmpty():\n if not self.city.isBlong(self.province.name):\n- if self.city.precision > self.province.precision:\n+ if self.city.precision >= self.province.precision:\n self.province.name = self.city.belong\n else:\n self.city.reset()\n", "old_path": "chinese_province_city_area_mapper/domain.py", "rewrite": "ReplaceText(target='>=' @(61,39)->(61,40))"} -{"repo": "https://:@github.com/rkokkelk/python-athom-api.git", "hash": "705215f6ce4bb02de2838e0298baeb70d51897ba", "diff": "@@ -56,7 +56,7 @@ class AthomSession(Session):\n text = response.text\n \n if status_code in range(200, 299):\n- return text\n+ return response\n \n if status_code in (400, 401):\n error = AthomCloudAuthenticationError(text)\n", "old_path": "athom/common/net.py", "rewrite": "ReplaceText(target='response' @(59,19)->(59,23))"} -{"repo": "https://:@github.com/lambdaloop/calligator.git", "hash": "c427e036073748ec86466ecff89e10211567c7fe", "diff": "@@ -719,7 +719,7 @@ class CameraGroup:\n \n t2 = time.time()\n \n- if init_progress:\n+ if verbose:\n print('optimization took {:.2f} seconds'.format(t2 - t1))\n \n return p3ds_new2\n", "old_path": "calligator/cameras.py", "rewrite": "ReplaceText(target='verbose' @(722,11)->(722,24))"} -{"repo": "https://:@github.com/lambdaloop/calligator.git", "hash": "a6503f793a664d7687ed61ba2166ffe16bf47c87", "diff": "@@ -995,7 +995,7 @@ class CameraGroup:\n t1 = time.time()\n \n x0 = self._initialize_params_triangulation(\n- p3ds_med, constraints, constraints_weak)\n+ p3ds_intp, constraints, constraints_weak)\n \n jac = self._jac_sparsity_triangulation(\n points, constraints, constraints_weak, n_deriv_smooth)\n", "old_path": "calligator/cameras.py", "rewrite": "ReplaceText(target='p3ds_intp' @(998,12)->(998,20))"} -{"repo": "https://:@github.com/European-XFEL/EXtra-data.git", "hash": "732de23488baae986f89f9f1e6f63f38d160011e", "diff": "@@ -181,7 +181,7 @@ class VirtualStack:\n try:\n mod_data = self._data[modno]\n except KeyError:\n- if modno > self._nmodules:\n+ if modno >= self._nmodules:\n raise IndexError(modno)\n mod_data = np.full(self._mod_shape, self._fillvalue, self.dtype)\n \n", "old_path": "karabo_data/stacking.py", "rewrite": "ReplaceText(target='>=' @(184,21)->(184,22))"} -{"repo": "https://:@github.com/spohara79/estreamer.git", "hash": "d5bdd807c9d421adb77111aad0d584c0dc26a68a", "diff": "@@ -37,7 +37,7 @@ class eStreamerConnection(object):\n except IOError:\n raise eStreamerKeyError(\"Unable to locate key file {}\".format(pkey_path))\n except crypto.Error:\n- raise eStreamerKeyError(\"Invalid key file or bad passphrase {}\".format(cert_path))\n+ raise eStreamerKeyError(\"Invalid key file or bad passphrase {}\".format(pkey_path))\n try:\n self.cert = crypto.load_certificate(crypto.FILETYPE_PEM, open(cert_path, 'rb').read())\n except IOError:\n", "old_path": "estreamer/streamer.py", "rewrite": "ReplaceText(target='pkey_path' @(40,83)->(40,92))"} -{"repo": "https://:@gitlab.com/mihaicristianpirvu/neural-wrappers.git", "hash": "ee31c3e9b05a3f5bedc923f7bdd5a3243b6d1450", "diff": "@@ -19,7 +19,7 @@ class CityScapesReader(DatasetReader):\n \t\t\t\tassert not data == \"rgb_first_frame\", \"RGB First frame is not available for sequential dataset\"\n \t\t\t\t# Only skipFrames=5 is supported now\n \n-\t\tif dataDimensions:\n+\t\tif sequentialData:\n \t\t\tdataDimensions = list(map(lambda x : \"seq_%s_5\" % (x), dataDimensions))\n \n \t\tself.datasetPath = datasetPath\n", "old_path": "neural_wrappers/readers/cityscapes_reader.py", "rewrite": "ReplaceText(target='sequentialData' @(22,5)->(22,19))"} -{"repo": "https://:@gitlab.com/mihaicristianpirvu/neural-wrappers.git", "hash": "79eeed7ae20989498e3377d4173a7fbca7501530", "diff": "@@ -115,7 +115,7 @@ class NetworkSerializer:\n \t\t\t\t\tStr += \"\\t- %s in current, not in loaded\"% (key)\n \t\t\t\t\tcontinue\n \t\t\t\tif current[key] != loaded[key]:\n-\t\t\t\t\tStr += \"\\t- current[%s]=%s. loaded[%s]=%s\" % (key, current[key], key, current[key])\n+\t\t\t\t\tStr += \"\\t- current[%s]=%s. loaded[%s]=%s\" % (key, current[key], key, loaded[key])\n \t\t\traise Exception(Str)\n \n \t\tfor key in stateKeys:\n", "old_path": "neural_wrappers/pytorch/network_serializer.py", "rewrite": "ReplaceText(target='loaded' @(118,75)->(118,82))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "f32ac6fb766df1abbb613d85e598953dc8122fa5", "diff": "@@ -186,7 +186,7 @@ class TensorRepresentation:\n \"Fancy printing of progress\"\n if facet0 == facet1 == None:\n debug(\"Computing tensor representation for term %d...\" % i)\n- elif facet0 == None:\n+ elif facet1 == None:\n debug(\"Computing tensor representation for term %d, facet %d...\" % (i, facet0))\n else:\n debug(\"Computing tensor representation for term %d, facets (%d, %d)...\" % (i, facet0, facet1))\n", "old_path": "src/ffc/compiler/representation/tensor/tensorrepresentation.py", "rewrite": "ReplaceText(target='facet1' @(189,13)->(189,19))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "68950e19d417ccaf80328da6afd1c52dda61856d", "diff": "@@ -151,7 +151,7 @@ def _generate_tensor_contraction(terms, options, g_set):\n a0 = A0.A0[tuple(i + a)]\n \n # Skip small values\n- if abs(a0) > epsilon: continue\n+ if abs(a0) < epsilon: continue\n \n # Compute value\n if value and a0 < 0.0:\n", "old_path": "ffc/tensor/tensorgenerator.py", "rewrite": "ReplaceText(target='<' @(154,27)->(154,28))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "eda9a71a896b15096615e51c4567692e36672192", "diff": "@@ -77,7 +77,7 @@ def analyze_forms(forms, object_names, parameters, common_cell=None):\n element_numbers = _compute_element_numbers(unique_elements)\n \n # Get common cell\n- common_cell = form_data[0].cell\n+ common_cell = form_datas[0].cell\n \n # Compute element cells and degrees (when cell or degree is undefined)\n element_cells = _auto_select_cells(unique_elements, common_cell)\n", "old_path": "ffc/analysis.py", "rewrite": "ReplaceText(target='form_datas' @(80,18)->(80,27))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "834ccde04aa1d690b5cd293fcd2a83cad320d13d", "diff": "@@ -148,7 +148,7 @@ def _evaluate_basis(data):\n # coordinates from physical element to the FIAT reference element.\n # FIXME: KBO: Change this when supporting R^2 in R^3 elements.\n code += [format[\"jacobian and inverse\"](geometric_dimension, topological_dimension)]\n- code += [\"\", format[\"fiat coordinate map\"](element_cell_domain, topological_dimension)]\n+ code += [\"\", format[\"fiat coordinate map\"](element_cell_domain, geometric_dimension)]\n \n # Get value shape and reset values. This should also work for TensorElement,\n # scalar are empty tuples, therefore (1,) in which case value_shape = 1.\n", "old_path": "ffc/evaluatebasis.py", "rewrite": "ReplaceText(target='geometric_dimension' @(151,68)->(151,89))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "dad40f5d3192ffe0fb614ecf0d4a9d443956dde5", "diff": "@@ -81,7 +81,7 @@ def generate_xi_from_x_snippets(cell, restriction):\n name_x = \"x%s\" % restriction\n name_y = \"vertex_coordinates%s\" % restriction\n name_z = \"xi%s\" % restriction\n- return generate_z_Axmy_snippets(name_z, name_A, name_x, name_y, gd, td)\n+ return generate_z_Axmy_snippets(name_z, name_A, name_x, name_y, td, gd)\n \n \n class test_geometry_snippets(CodegenTestCase):\n", "old_path": "tests/py/test_geometry_snippets.py", "rewrite": "ArgSwap(idxs=4<->5 @(84,11)->(84,35))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "38550e99392b3c6bec52e45364351bd967baf714", "diff": "@@ -650,7 +650,7 @@ def _compute_reference_derivatives(data, dof_data):\n for k in range(tdim)],\n [f_transform(\"JINV\", k, l, tdim, gdim, None)\n for k in range(tdim)]))\n- name = f_component(f_derivatives+_p, f_matrix_index(i, f_r, f_num_derivs(_t)))\n+ name = f_component(f_derivatives+_p, f_matrix_index(p, f_r, f_num_derivs(_t)))\n lines += [f_assign(name, value)]\n else:\n error(\"Unknown mapping: %s\" % mapping)\n", "old_path": "ffc/evaluatebasisderivatives.py", "rewrite": "ReplaceText(target='p' @(653,64)->(653,65))"} -{"repo": "https://:@bitbucket.org/fenics-project/ffc.git", "hash": "e6ee433c0854c86b4e38fedf725097c31d9744d5", "diff": "@@ -703,7 +703,7 @@ class IntegralGenerator(object):\n weights = self.backend.symbols.custom_weights_table()\n weight = weights[iq]\n else:\n- weight = self.backend.symbols.weights_table(num_points)\n+ weights = self.backend.symbols.weights_table(num_points)\n weight = weights[iq]\n \n # Fetch code to access modified arguments\n", "old_path": "ffc/uflacs/integralgenerator.py", "rewrite": "ReplaceText(target='weights' @(706,12)->(706,18))"} -{"repo": "https://:@github.com/Kitware/kwiver.git", "hash": "19cfcc52be6863217fe227448b8dbfd19d6f63e9", "diff": "@@ -209,7 +209,7 @@ def test_datum():\n test_error(\"Could not initialize pipeline: '%s'\" % str(e))\n continue\n \n- s = sreg.create_schedule(sched_type, c, p)\n+ s = sreg.create_schedule(sched_type, p, c)\n \n try:\n s.start()\n", "old_path": "tests/bindings/python/image/test-vil.py", "rewrite": "ArgSwap(idxs=1<->2 @(212,12)->(212,32))"} -{"repo": "https://:@github.com/Jincheng-Sun/Kylearn-pytorch.git", "hash": "c4772f2db257170a0c6a456cd71896f6e393f7f5", "diff": "@@ -63,7 +63,7 @@ class TextualDataloader():\n valid_sampler = SubsetRandomSampler(eval_indices)\n \n self.train_loader = DataLoader(train_set, batch_size, sampler=train_sampler, num_workers=4)\n- self.val_loader = DataLoader(train_set, batch_size, sampler=valid_sampler, num_workers=4)\n+ self.val_loader = DataLoader(test_set, batch_size, sampler=valid_sampler, num_workers=4)\n self.test_loader = DataLoader(test_set, batch_size, num_workers=4)\n \n \n", "old_path": "Implementation/nlp_smart_dispatching/dataloader.py", "rewrite": "ReplaceText(target='test_set' @(66,37)->(66,46))"} -{"repo": "https://:@github.com/itxaka/pychef.git", "hash": "ef4b72b7d13dab406b21c020a24fefe531f4b859", "diff": "@@ -153,7 +153,7 @@ class Key(object):\n size = RSA_size(self.key)\n output = create_string_buffer(size)\n ret = RSA_private_encrypt(len(buf), buf, output, self.key, padding)\n- if ret == 0:\n+ if ret <= 0:\n raise SSLError('Unable to encrypt data')\n return output.raw[:ret]\n \n", "old_path": "chef/rsa.py", "rewrite": "ReplaceText(target='<=' @(156,15)->(156,17))"} -{"repo": "https://:@github.com/hugobranq/ines.git", "hash": "1d4af72308bfe0bbe63ec9292583805e26823f0f", "diff": "@@ -115,7 +115,7 @@ class PostmanCollection(object):\n response_key = camelcase(response_key)\n tests.append(\n 'if (answer.%s){ postman.setEnvironmentVariable(\"%s\", answer.%s); }'\n- % (environment_key, environment_key, response_key))\n+ % (response_key, environment_key, response_key))\n \n if tests:\n tests.insert(0, 'var answer = JSON.parse(responseBody);')\n", "old_path": "ines/views/postman.py", "rewrite": "ReplaceText(target='response_key' @(118,39)->(118,54))"} -{"repo": "https://:@github.com/hugobranq/ines.git", "hash": "d0374fc9f5a5003d09c8137a14adb2eb66d3fd30", "diff": "@@ -58,7 +58,7 @@ class BaseCoreSessionManager(BaseSessionManager):\n def not_inactives_filter(column):\n return and_(\n or_(column.start_date <= func.now(), column.start_date.is_(None)),\n- or_(column.end_date >= func.now(), column.end_date.is_(None)))\n+ or_(column.end_date > func.now(), column.end_date.is_(None)))\n \n \n def table_type(table):\n", "old_path": "ines/api/core/__init__.py", "rewrite": "ReplaceText(target='>' @(61,28)->(61,30))"} -{"repo": "https://:@github.com/brews/proxysiphon.git", "hash": "f1acb73417edcbe4011f468ab66f6c53d6d02fcd", "diff": "@@ -413,7 +413,7 @@ def lmr_da_dfs(sitegrp=None, agemodel_iter=None, find_modern_seasonality=True):\n cut_deep = float(sitegrp['chronology'].cut_deep)\n cut_shallow = -np.inf\n if hasattr(sitegrp['chronology'], 'cut_shallow'):\n- cut_deep = float(sitegrp['chronology'].cut_shallow)\n+ cut_shallow = float(sitegrp['chronology'].cut_shallow)\n depth = sitegrp['data'].variables['depth'][:]\n cutoff_msk = (depth >= cut_shallow) & (depth <= cut_deep)\n \n", "old_path": "proxysiphon/lmr_hdf5/__init__.py", "rewrite": "ReplaceText(target='cut_shallow' @(416,12)->(416,20))"} -{"repo": "https://:@github.com/voytekresearch/bycycle.git", "hash": "8b521e89226a75f9563a92395e1dfd280cda2e02", "diff": "@@ -75,7 +75,7 @@ def find_flank_zerox(sig, flank):\n \"\"\"\n \n assert flank in ['rise', 'decay']\n- pos = sig <= 0 if flank == 'rise' else sig >= 0\n+ pos = sig <= 0 if flank == 'rise' else sig > 0\n \n zero_xs = (pos[:-1] & ~pos[1:]).nonzero()[0]\n \n", "old_path": "bycycle/cyclepoints/zerox.py", "rewrite": "ReplaceText(target='>' @(78,47)->(78,49))"} -{"repo": "https://:@github.com/webcube/django-dockit.git", "hash": "32c8adda7e11c6bc7e53cabea92e880cc291937f", "diff": "@@ -21,7 +21,7 @@ class PrimitiveListWidget(Widget):\n output = []\n final_attrs = self.build_attrs(attrs)\n id_ = final_attrs.get('id', None)\n- i = 0\n+ i = -1\n for i, widget_value in enumerate(value):\n if id_:\n final_attrs = dict(final_attrs, id='%s_%s' % (id_, i))\n", "old_path": "dockit/forms/widgets.py", "rewrite": "ReplaceText(target='-1' @(24,12)->(24,13))"} -{"repo": "https://:@github.com/dimchat/sdk-py.git", "hash": "e0752d614d145ba0a77f87ae06334b891f916c69", "diff": "@@ -295,7 +295,7 @@ class Facebook(Barrack):\n # decrypt key not found, use the same with sign key?\n key = self.private_key_for_signature(identifier)\n if key is not None:\n- keys = [keys]\n+ keys = [key]\n return keys\n \n def contacts(self, identifier: ID) -> Optional[list]:\n", "old_path": "dimsdk/facebook.py", "rewrite": "ReplaceText(target='key' @(298,24)->(298,28))"} -{"repo": "https://:@github.com/tnewman/pat.git", "hash": "ebc0ce494872d7f90e82ca2052d06252a3a0a952", "diff": "@@ -15,7 +15,7 @@ def play(audio_path: str):\n \"\"\"\n pat_error = _libpat.pat_play(_pat, c_char_p(audio_path.encode('ascii')))\n \n- if pat_error != _PATError.PAT_SUCCESS:\n+ if pat_error == _PATError.PAT_SUCCESS:\n return\n elif pat_error == _PATError.PAT_INTERRUPTED_ERROR:\n os.kill(os.getpid(), signal.SIGINT)\n", "old_path": "pypat/pypat/__init__.py", "rewrite": "ReplaceText(target='==' @(18,17)->(18,19))"} -{"repo": "https://:@github.com/openp2pdesign/platform_analysis.git", "hash": "526eb0afcc35b076c1860aad48b9a733681e13c7", "diff": "@@ -52,7 +52,7 @@ def graph_to_pandas_time_series(graph):\n ])\n \n # Iterate over edges to create a DataFrame of actions\n- for i in time_dataframe.edges_iter(data=True):\n+ for i in graph.edges_iter(data=True):\n if \"node\" in i[2]:\n node = i[2][\"node\"]\n else:\n", "old_path": "platform_analysis/sna.py", "rewrite": "ReplaceText(target='graph' @(55,13)->(55,27))"} -{"repo": "https://:@github.com/jun-harashima/pott.git", "hash": "31942b58f1aad8a32969c7a1e6ea4184a4f52d4b", "diff": "@@ -28,7 +28,7 @@ class Assistant:\n original_start = self.option.start\n self.option.start += increment\n papers = self._search()\n- if papers:\n+ if not papers:\n self.option.start = original_start\n return papers\n \n", "old_path": "pott/assistants/assistant.py", "rewrite": "ReplaceText(target='not ' @(31,11)->(31,11))"} -{"repo": "https://:@github.com/Zerostack-open/zs-preflight.git", "hash": "1a0cc81f539606040222ceb11b7974cd48a30cd7", "diff": "@@ -45,7 +45,7 @@ class network_check():\n nic_speed = int(speed.read().strip())\n if(nic_speed == 1000):\n nic.append({'nic_name':o,'nic_speed':nic_speed,'nic_brand':nic_brand,'text':'NIC minimum config'})\n- elif(nic_speed == 10000):\n+ elif(nic_speed >= 10000):\n nic.append({'nic_name':o,'nic_speed':nic_speed,'nic_brand':nic_brand,'text':'NIC recommended config'})\n except Exception as e:\n nic.append({'nic_name':o,'nic_speed':'Unknown','nic_brand':nic_brand,'text':'NIC Unknown'})\n", "old_path": "zspreflight/network.py", "rewrite": "ReplaceText(target='>=' @(48,39)->(48,41))"} -{"repo": "https://:@github.com/inkstitch/pyembroidery.git", "hash": "03f6fded69fc431b28cade51f008de235b09390e", "diff": "@@ -9,7 +9,7 @@ MAX_STITCH_DISTANCE = float('inf')\n \n \n def write(pattern, f, settings=None):\n- if settings is not None:\n+ if settings is None:\n settings = {}\n \n flip_x = settings.get('flip_x', True)\n", "old_path": "pyembroidery/GcodeWriter.py", "rewrite": "ReplaceText(target=' is ' @(12,15)->(12,23))"} -{"repo": "https://:@github.com/mass-project/mass_api_client.git", "hash": "aca9dd7184b27be9c14df9d361b8120fd00f40b0", "diff": "@@ -34,7 +34,7 @@ class SwitchConnection:\n @classmethod\n def _create_instance_from_data(cls, data):\n subcls = cls._unmodified_cls._search_subclass(data['_cls'])\n- return subcls(subcls.connection_alias, **data)\n+ return subcls(cls.connection_alias, **data)\n \n @classmethod\n def _deserialize(cls, data, many=False):\n", "old_path": "mass_api_client/switch_connection.py", "rewrite": "ReplaceText(target='cls' @(37,30)->(37,36))"} -{"repo": "https://:@github.com/pwitab/dlms-cosem.git", "hash": "6d5eec88b05e0020b437aa13f11f5f807334356a", "diff": "@@ -81,4 +81,4 @@ class DlmsUdpMessage:\n raise ValueError((\n f'Length of data in UDP message ({body_length}) does not match '\n f'the length parameter in the UDP Wrapper Header ({length})'))\n- return cls(source_wport, destination_wport, in_data, version)\n+ return cls(source_wport, destination_wport, body, version)\n", "old_path": "dlms_cosem/wrappers.py", "rewrite": "ReplaceText(target='body' @(84,52)->(84,59))"} -{"repo": "https://:@github.com/Heiss/connexion-plus.git", "hash": "df1489bdff879ba6cee2ea7456d503c55e545599", "diff": "@@ -26,7 +26,7 @@ class MultipleResourceResolver(RestyResolver):\n for s in split:\r\n # find the parameter, where a variable was defined to exlude it in resource_name\r\n pattern = re.compile(r\"\\{[a-zA-Z-_]+\\}\")\r\n- if not s and pattern.search(s) is None:\r\n+ if s and pattern.search(s) is None:\r\n resource_name += s.title()\r\n \r\n if x_router_controller:\r\n", "old_path": "connexion_plus/MultipleResourceResolver.py", "rewrite": "ReplaceText(target='' @(29,19)->(29,23))"} -{"repo": "https://:@github.com/kgaughan/imageproxy.git", "hash": "bfab82a641baf3ecfe4f616a9acad6b05178ff41", "diff": "@@ -79,7 +79,7 @@ def is_subpath(base, path, sep=os.path.sep):\n \"\"\"\n Check if the given path is a proper subpath of a base path.\n \"\"\"\n- if path.startswith(path):\n+ if path.startswith(base):\n trailing = base[len(base):]\n return trailing == '' or trailing[0] == sep\n return False\n", "old_path": "imageproxy.py", "rewrite": "ReplaceText(target='base' @(82,23)->(82,27))"} -{"repo": "https://:@github.com/johnlees/glmnet_python.git", "hash": "c9b08ed3713f2448017bc041e78324add75196b7", "diff": "@@ -117,7 +117,7 @@ def plotCoef(beta, norm, lambdau, df, dev, label, xvar, xlab, ylab, **options):\n ax2.xaxis.tick_top()\n \n xlim1 = ax1.get_xlim()\n- ylim1 = ax2.get_ylim()\n+ ylim1 = ax1.get_ylim()\n \n atdf = ax1.get_xticks()\n indat = scipy.ones(atdf.shape, dtype = scipy.integer)\n", "old_path": "lib/glmnetPlot.py", "rewrite": "ReplaceText(target='ax1' @(120,12)->(120,15))"} -{"repo": "https://:@github.com/matheusmoreira/multihash.py.git", "hash": "57a6c7b3f6fb79e72fac08e39d32202cfd7b5b35", "diff": "@@ -24,7 +24,7 @@ class LengthMismatchError(Exception):\n \n def __init__(self, multihash_length: int, digest_length: int) -> None:\n template = \"length from data ({}) and metadata ({}) don't match\"\n- super().__init__(template.format(multihash_length, digest_length))\n+ super().__init__(template.format(digest_length, multihash_length))\n \n self.multihash_length = multihash_length\n self.digest_length = digest_length\n", "old_path": "multihash/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(27,25)->(27,40))"} -{"repo": "https://:@github.com/pytest-buildkite/pipefish.git", "hash": "4ba4918fbd000b6c8f8c7d266d79b0e09b85dd11", "diff": "@@ -39,7 +39,7 @@ def read_version():\n for line in fobj:\n mobj = regex.match(line)\n if mobj:\n- return regex.group(1)\n+ return mobj.group(1)\n raise Exception('Failed to read version')\n \n \n", "old_path": "app/setup.py", "rewrite": "ReplaceText(target='mobj' @(42,23)->(42,28))"} -{"repo": "https://:@github.com/kmarilleau/pytest-django-model.git", "hash": "31fa2011c76bd1581d24bef19f422cebf644b03d", "diff": "@@ -237,7 +237,7 @@ class ModelGenerator:\n # Ignore Special Methods.\n or is_dunder(attr)\n # Ignore Functions.\n- or inspect.isfunction(attr)\n+ or inspect.isfunction(value)\n # Ignore Django Model Attributes.\n or attr in (\"objects\", \"id\", \"_meta\")\n # Ignore Fields.\n", "old_path": "pytest_django_model/objects.py", "rewrite": "ReplaceText(target='value' @(240,34)->(240,38))"} -{"repo": "https://:@github.com/innolitics/hdat.git", "hash": "536b4c0b60a57b2a0d7aa95bf3a8e0a484a2a0c2", "diff": "@@ -31,7 +31,7 @@ class Archive:\n \n results_sorted = sorted(results, key=lambda r: r['ran_on'])\n \n- return results\n+ return results_sorted\n \n def insert(self, result):\n suite_id = result['suite_id']\n", "old_path": "store.py", "rewrite": "ReplaceText(target='results_sorted' @(34,15)->(34,22))"} -{"repo": "https://:@github.com/innolitics/hdat.git", "hash": "37beec7e4e98b5787f87cb083d512c872a9a2ae6", "diff": "@@ -26,7 +26,7 @@ def main():\n golden_store_location = os.path.join(repo_directory, 'golden_results')\n golden_store = GoldenStore(golden_store_location)\n \n- suites = collect_suites(cwd)\n+ suites = collect_suites(repo_directory)\n \n hdat_cli(sys.argv[1:], suites, golden_store, archive, git_info)\n \n", "old_path": "hdat/main.py", "rewrite": "ReplaceText(target='repo_directory' @(29,32)->(29,35))"} -{"repo": "https://:@github.com/innolitics/hdat.git", "hash": "1756c0c9966de2746b1775521771d820004ae859", "diff": "@@ -26,7 +26,7 @@ def main():\n golden_store_location = os.path.join(repo_directory, 'golden_results')\n golden_store = GoldenStore(golden_store_location)\n \n- suites = collect_suites(cwd)\n+ suites = collect_suites(repo_directory)\n \n hdat_cli(sys.argv[1:], suites, golden_store, archive, git_info)\n \n", "old_path": "hdat/main.py", "rewrite": "ReplaceText(target='repo_directory' @(29,32)->(29,35))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "e16932c6b10a0c3fa1b8eda202d857b7e8157f4a", "diff": "@@ -71,7 +71,7 @@ def _get(name, default=None, compat=None):\n compat = [name] + compat\n for i, alias in enumerate(compat):\n try:\n- value = getattr(settings, name)\n+ value = getattr(settings, alias)\n i > 0 and warnings.warn(DeprecationWarning(_DEPRECATION_FMT % (\n alias, name)))\n return value\n", "old_path": "celery/conf.py", "rewrite": "ReplaceText(target='alias' @(74,38)->(74,42))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "b0f42919f173005265e9880d30d166db734ff9c7", "diff": "@@ -43,7 +43,7 @@ class Router(object):\n route = self.lookup_route(task, args, kwargs)\n if route:\n # Also expand \"queue\" keys in route.\n- return merge(options, self.expand_destination(route))\n+ return merge(self.expand_destination(route), options)\n return options\n \n def expand_destination(self, route):\n", "old_path": "celery/routes.py", "rewrite": "ArgSwap(idxs=0<->1 @(46,23)->(46,28))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "d47ae1389c4cb679a13057e24c82ede7581b4ab1", "diff": "@@ -155,7 +155,7 @@ class Namespace(object):\n return\n self.close(parent)\n self.state = CLOSE\n- self.restart(parent, what, 'terminate' if terminate else 'stop')\n+ self.restart(parent, 'terminate' if terminate else 'stop', what)\n \n if self.on_stopped:\n self.on_stopped()\n", "old_path": "celery/bootsteps.py", "rewrite": "ArgSwap(idxs=1<->2 @(158,8)->(158,20))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "551546ceaecb5afdf3a848604faa57117e0a2c1a", "diff": "@@ -182,7 +182,7 @@ class test_Tasks(AppCase):\n tasks = Tasks(c)\n self.assertIsNone(c.task_consumer)\n self.assertIsNone(c.qos)\n- self.assertEqual(tasks.initial_prefetch_count, 2)\n+ self.assertEqual(c.initial_prefetch_count, 2)\n \n c.task_consumer = Mock()\n tasks.stop(c)\n", "old_path": "celery/tests/worker/test_consumer.py", "rewrite": "ReplaceText(target='c' @(185,25)->(185,30))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "1ac10f3b8f2bc0a21b7e418ee6c967df614bd106", "diff": "@@ -91,7 +91,7 @@ class RiakBackend(KeyValueStoreBackend):\n self.host = uhost or config.get('host', self.host)\n self.port = int(uport or config.get('port', self.port))\n self.bucket_name = ubucket or config.get('bucket', self.bucket_name)\n- self.protocol = uprot or config.get('protocol', self.protocol)\n+ self.protocol = protocol or config.get('protocol', self.protocol)\n \n # riak bucket must be ascii letters or numbers only\n if not Validators.validate_riak_bucket_name(self.bucket_name):\n", "old_path": "celery/backends/riak.py", "rewrite": "ReplaceText(target='protocol' @(94,24)->(94,29))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "51592a86a35998d40098db72524ba70299c5c489", "diff": "@@ -273,7 +273,7 @@ class Celery(object):\n if not module_name:\n if silent:\n return False\n- raise ImproperlyConfigured(ERR_ENVVAR_NOT_SET.format(module_name))\n+ raise ImproperlyConfigured(ERR_ENVVAR_NOT_SET.format(variable_name))\n return self.config_from_object(module_name, silent=silent, force=force)\n \n def config_from_cmdline(self, argv, namespace='celery'):\n", "old_path": "celery/app/base.py", "rewrite": "ReplaceText(target='variable_name' @(276,65)->(276,76))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "d5029501ab762c4fb6b7baab7af4ecf96b106fbe", "diff": "@@ -174,7 +174,7 @@ def create_module(name, attrs, cls_attrs=None, pkg=None,\n attr_name: (prepare_attr(attr) if prepare_attr else attr)\n for attr_name, attr in items(attrs)\n }\n- module = sys.modules[fqdn] = type(modname, (base, ), cls_attrs)(fqdn)\n+ module = sys.modules[fqdn] = type(modname, (base, ), cls_attrs)(name)\n module.__dict__.update(attrs)\n return module\n \n", "old_path": "celery/five.py", "rewrite": "ReplaceText(target='name' @(177,68)->(177,72))"} -{"repo": "https://:@github.com/reversefold/celery.git", "hash": "86e7eed314a167ec0f2fa377f36f0f373a334d77", "diff": "@@ -303,7 +303,7 @@ class Request(object):\n task_ready(self)\n if soft:\n warn('Soft time limit (%ss) exceeded for %s[%s]',\n- soft, self.name, self.id)\n+ timeout, self.name, self.id)\n exc = SoftTimeLimitExceeded(soft)\n else:\n error('Hard time limit (%ss) exceeded for %s[%s]',\n", "old_path": "celery/worker/request.py", "rewrite": "ReplaceText(target='timeout' @(306,17)->(306,21))"} -{"repo": "https://:@gitlab.com/elad.noor/optslope.git", "hash": "c810fd18febb83e0212b5a5404dcc82758322541", "diff": "@@ -79,7 +79,7 @@ def create_extended_core_model(\n for ki in knockins:\n add_cytoplasmic_reaction(model, ki, 0, 1000)\n \n- if knockins is not None:\n+ if carbon_sources is not None:\n for cs in carbon_sources:\n add_metabolite_exchange(model, cs)\n \n", "old_path": "optslope/models.py", "rewrite": "ReplaceText(target='carbon_sources' @(82,7)->(82,15))"} -{"repo": "https://:@github.com/jamesjiang52/Bitwise.git", "hash": "796301ae466d418612c6ac291ea9838d7a51ce70", "diff": "@@ -7,7 +7,7 @@ class TestTristateBuffer:\n switch = bw.wire.Wire()\n output = bw.wire.Wire()\n \n- bw.wire.TristateBuffer(input_1, switch, output)\n+ bw.wire.TristateBuffer(switch, input_1, output)\n \n switch.value = 0\n input_1.value = 0\n", "old_path": "tests/wire/test_TristateBuffer.py", "rewrite": "ArgSwap(idxs=0<->1 @(10,8)->(10,30))"} -{"repo": "https://:@github.com/jamesjiang52/Bitwise.git", "hash": "e7fb994abf6b7e9d85cf5b8f3d2b199a717d281b", "diff": "@@ -82,7 +82,7 @@ class FullAdder:\n \n self.carry_in = carry_in\n self.a = a\n- self.b = a\n+ self.b = b\n self.carry_out = carry_out\n self.sum = sum\n \n", "old_path": "bitwise/arithmetic/ADD.py", "rewrite": "ReplaceText(target='b' @(85,17)->(85,18))"} -{"repo": "https://:@github.com/sethmurphy/BrubeckOAuth.git", "hash": "62f218940e723171c3d32115389d3c07c86effb5", "diff": "@@ -269,7 +269,7 @@ class OAuthMixin(object):\n initial_args = json.loads(self.oauth_request_model.initial_request_args)\n self.message.arguments.update(initial_args)\n logging.debug('Merged arguments: %s' % json.dumps(self.message.arguments));\n- if self.oauth_error != None and self.oauth_token != None or self.state != None:\n+ if self.oauth_error == None and self.oauth_token != None or self.state != None:\n self._oauth_request_model = oauth_object.callback(\n provider_settings,\n self.oauth_request_model, \n", "old_path": "brubeckoauth/handlers.py", "rewrite": "ReplaceText(target='==' @(272,36)->(272,38))"} -{"repo": "https://:@bitbucket.org/mosaik/mosaik-pypower.git", "hash": "d05f00ae723c45cccabf1ffc75317f96f74176c5", "diff": "@@ -185,7 +185,7 @@ def _get_branches(loader, raw_case, entity_map, grid_idx):\n tbus = make_eid(tbus, grid_idx)\n \n assert fbus in entity_map, fbus\n- assert tbus in entity_map, fbus\n+ assert tbus in entity_map, tbus\n \n f_idx = entity_map[fbus]['idx']\n t_idx = entity_map[tbus]['idx']\n", "old_path": "mosaik_pypower/model.py", "rewrite": "ReplaceText(target='tbus' @(188,35)->(188,39))"} -{"repo": "https://:@bitbucket.org/mosaik/mosaik-pypower.git", "hash": "8440caae0cc2ac9f18087171866abcf2ee1783b6", "diff": "@@ -131,7 +131,7 @@ def get_cache_entries(cases, entity_map):\n # Use side with higher voltage to calculate I\n if fbus_v >= tbus_v:\n ir = branch[idx_brch.PF] / fbus_v\n- ii = branch[idx_brch.QF] / tbus_v\n+ ii = branch[idx_brch.QF] / fbus_v\n else:\n ir = branch[idx_brch.PT] / tbus_v\n ii = branch[idx_brch.QT] / tbus_v\n", "old_path": "mosaik_pypower/model.py", "rewrite": "ReplaceText(target='fbus_v' @(134,51)->(134,57))"} -{"repo": "https://:@github.com/moble/sxs.git", "hash": "4b224cf7771980d6817413d8d218858ea972a94e", "diff": "@@ -34,7 +34,7 @@ def test_xmb_format():\n \n with tempfile.TemporaryDirectory() as temp_dir:\n file = pathlib.Path(temp_dir) / 'horizons.h5'\n- sxs.horizons.xor_multishuffle_bzip2.save(file, horizons_spec)\n+ sxs.horizons.xor_multishuffle_bzip2.save(horizons_spec, file)\n with pytest.raises(ValueError):\n horizons_error = sxs.horizons.spec_horizons_h5.load(file)\n horizons_xmb = sxs.horizons.xor_multishuffle_bzip2.load(file)\n", "old_path": "tests/test_horizons.py", "rewrite": "ArgSwap(idxs=0<->1 @(37,8)->(37,48))"} -{"repo": "https://:@github.com/inkenbrandt/loggerloader.git", "hash": "4a64ce022708c6e5c93124cf250d59bded529624", "diff": "@@ -80,7 +80,7 @@ def fix_drift(well, manualfile, meas='Level', manmeas='MeasuredDTW', outcolname=\n wellbarofixed.set_index(dtnm, inplace=True)\n drift_info = pd.DataFrame(drift_features).T\n \n- return wellbarofixed, drift_info\n+ return wellbarofixed, drift\n \n def correct_be(site_number, well_table, welldata, be = None, meas = 'corrwl', baro = 'barometer'):\n \n", "old_path": "loggerloader/data_fixers.py", "rewrite": "ReplaceText(target='drift' @(83,26)->(83,36))"} -{"repo": "https://:@gitlab.com/Plasticity/supersqlite.git", "hash": "e6dbaa2a00df2020b62ce72329b5b294762c23a4", "diff": "@@ -119,7 +119,7 @@ def get_modules(THIRD_PARTY, INTERNAL, PROJ_PATH,\n else:\n libraries.append(ICU_UNIX)\n includes.append(ICU_UNIX)\n- link_args.append('-L' + ICU_WIN32)\n+ link_args.append('-L' + ICU_UNIX)\n \n SQLITE_PRE = os.path.relpath(\n os.path.join(SQLITE3, 'sqlite3.c.pre.c'), PROJ_PATH)\n", "old_path": "setup.py", "rewrite": "ReplaceText(target='ICU_UNIX' @(122,32)->(122,41))"} -{"repo": "https://:@github.com/jboes/decaf-espresso.git", "hash": "807549a48404ee3028f5935b8ddfa665378add29", "diff": "@@ -384,7 +384,7 @@ class SiteConfig():\n state = subprocess.call(command, stdout=f)\n \n if state != 0:\n- if grepy(outfile, 'JOB DONE.'):\n+ if grepy('JOB DONE.', outfile):\n pass\n else:\n raise RuntimeError(\n", "old_path": "espresso/siteconfig.py", "rewrite": "ArgSwap(idxs=0<->1 @(387,15)->(387,20))"} -{"repo": "https://:@github.com/Aareon/rtv.git", "hash": "3e6b7c98d529668d5cab946485bd7c3be843574c", "diff": "@@ -126,7 +126,7 @@ class SubredditPage(BasePage):\n return\n \n # Open the submission window\n- submission_info = SUBMISSION_FILE.format(name=sub, content='')\n+ submission_info = SUBMISSION_FILE.format(name=subreddit, content='')\n curses.endwin()\n submission_text = open_editor(submission_info)\n curses.doupdate()\n", "old_path": "rtv/subreddit.py", "rewrite": "ReplaceText(target='subreddit' @(129,54)->(129,57))"} -{"repo": "https://:@github.com/Aareon/rtv.git", "hash": "f5dab8dd560dc319cf23724653de376bdc850e10", "diff": "@@ -813,7 +813,7 @@ class Terminal(object):\n \n # Prune empty lines at the bottom of the textbox.\n for item in stack[::-1]:\n- if item:\n+ if not item:\n stack.pop()\n else:\n break\n", "old_path": "rtv/terminal.py", "rewrite": "ReplaceText(target='not ' @(816,15)->(816,15))"} -{"repo": "https://:@github.com/kgdunn/process_improve.git", "hash": "098e24ca8653f3b94be6f8efcc584f149bb9d8db", "diff": "@@ -143,7 +143,7 @@ def pareto_plot(model,\n (\"Full name\", \"@full_names\"),\n (\"Magnitude and sign\", \"@original_magnitude_with_sign\"),\n ]\n- if len(alias_strings) == 0:\n+ if len(alias_strings) != 0:\n TOOLTIPS.append((\"Aliasing\", \"@alias_strings\"),)\n \n p = figure(plot_width=plot_width,\n", "old_path": "process_improve/plotting.py", "rewrite": "ReplaceText(target='!=' @(146,26)->(146,28))"} -{"repo": "https://:@github.com/gforcada/flake8-plone-api.git", "hash": "dd24cd9846350da8e176296f0c5e51d285c101b6", "diff": "@@ -35,7 +35,7 @@ class PloneAPIChecker(object):\n return found\n \n next_character_position = found + len(old_approach) + 1\n- if next_character_position > len(line):\n+ if next_character_position >= len(line):\n return found\n \n # check that the method is not a substring of another\n", "old_path": "flake8_plone_api.py", "rewrite": "ReplaceText(target='>=' @(38,35)->(38,36))"} -{"repo": "https://:@github.com/prymatex/prymatex.git", "hash": "1b830e8afa9b956c4a603f2f44c20d7ce87f2fb9", "diff": "@@ -779,7 +779,7 @@ class PMXSnippet(PMXBundleItem):\n return hash\n \n def __deepcopy__(self, memo):\n- snippet = PMXSnippet(self.hash, self.namespace)\n+ snippet = PMXSnippet(self.namespace, self.hash)\n memo[\"snippet\"] = deepcopy(self.snippet, memo)\n snippet.bundle = self.bundle\n return snippet\n", "old_path": "src/prymatex/bundles/snippet.py", "rewrite": "ArgSwap(idxs=0<->1 @(782,18)->(782,28))"} -{"repo": "https://:@github.com/prymatex/prymatex.git", "hash": "1595b520a888b1d6635d2bb64c99024ef06d0d7e", "diff": "@@ -43,7 +43,7 @@ class PMXBundleTreeProxyModel(QtGui.QSortFilterProxyModel):\n return self.sourceModel().node(sIndex)\n \n def setFilterNamespace(self, namespace):\n- if namespace:\n+ if not namespace:\n self.namespacesFilter = [ \"prymatex\", \"user\" ]\n else:\n self.namespacesFilter = namespace.split()\n", "old_path": "prymatex/gui/support/proxies.py", "rewrite": "ReplaceText(target='not ' @(46,11)->(46,11))"} -{"repo": "https://:@github.com/prymatex/prymatex.git", "hash": "8bc4aeccf489096d05f1b8fb2a6ad57d75a3f7fd", "diff": "@@ -359,7 +359,7 @@ class CodeEditor(TextEditWidget, PMXBaseEditor):\n cls.SCOPES[scopeHash] = CodeEditorScope(\n name = scopeName,\n path = scopeStack,\n- settings = cls.application.supportManager.getPreferenceSettings(scopeName),\n+ settings = cls.application.supportManager.getPreferenceSettings(scopeStack),\n group = PMXSyntax.findGroup(scopeStack[::-1])\n )\n return scopeHash\n", "old_path": "prymatex/gui/codeeditor/editor.py", "rewrite": "ReplaceText(target='scopeStack' @(362,80)->(362,89))"} -{"repo": "https://:@github.com/prymatex/prymatex.git", "hash": "5e2aeb256ab658a0ef392096ae4c6cea383e4fff", "diff": "@@ -61,7 +61,7 @@ class CodeEditorBlockUserData(QtGui.QTextBlockUserData):\n \n def tokenAtPosition(self, pos):\n for token in self.__tokens[::-1]:\n- if token.start <= pos <= token.end:\n+ if token.start <= pos < token.end:\n return token\n \n # ------------------- Cache Handle\n", "old_path": "prymatex/gui/codeeditor/userdata.py", "rewrite": "ReplaceText(target='<' @(64,34)->(64,36))"} -{"repo": "https://:@github.com/prymatex/prymatex.git", "hash": "4aaa53c919b90ec7d094d6861b9c229fd282c26d", "diff": "@@ -72,7 +72,7 @@ class CodeEditorSyntaxProcessor(CodeEditorBaseProcessor, SyntaxProcessorMixin):\n self.stacks[user_data.revision] = (self.stack[:], self.scope.clone())\n \n def blockRevision(self, block):\n- return _revision(block.text() + \"\\n\", self.scope_name, block.previous().userState())\n+ return _revision(self.scope_name, block.text() + \"\\n\", block.previous().userState())\n \n def testRevision(self, block):\n return block.userData() is not None and block.userData().revision == self.blockRevision(block)\n", "old_path": "prymatex/gui/codeeditor/processors/syntax.py", "rewrite": "ArgSwap(idxs=0<->1 @(75,15)->(75,24))"} -{"repo": "https://:@github.com/cdeitrick/muller_diagrams.git", "hash": "fd5e9df63b9a5c558c6d88f646a5003e3d959402", "diff": "@@ -58,7 +58,7 @@ DF = pandas.DataFrame\n def workflow(trajectories_filename: Path, goptions:calculate_genotypes.GenotypeOptions) -> Tuple[DF, DF, Any]:\n \n \ttrajectory_table, _ = import_trajectory_table(trajectories_filename)\n-\tgenotype_table = calculate_genotypes.workflow(trajectories_filename, options = goptions)\n+\tgenotype_table = calculate_genotypes.workflow(trajectory_table, options = goptions)\n \t# return trajectory_table, genotype_table\n \n \tcache:List[Tuple[DF, DF]] = [(trajectory_table.copy(), genotype_table.copy())]\n", "old_path": "muller/genotype_filters.py", "rewrite": "ReplaceText(target='trajectory_table' @(61,47)->(61,68))"} -{"repo": "https://:@github.com/MacKey-255/GoodByeCatpcha.git", "hash": "39bd93f737d90c82906fdd388a9f8d2e5939bfa5", "diff": "@@ -64,7 +64,7 @@ class Launcher(launcher.Launcher):\n \n def waitForChromeToClose(self):\n \"\"\"Terminate chrome.\"\"\"\n- if self.proc.returncode is not None and not self.chromeClosed:\n+ if self.proc.returncode is None and not self.chromeClosed:\n self.chromeClosed = True\n if psutil.pid_exists(self.proc.pid):\n self.proc.terminate()\n", "old_path": "nonocaptcha/solver.py", "rewrite": "ReplaceText(target=' is ' @(67,31)->(67,39))"} -{"repo": "https://:@gitlab.com/bz1/peempy.git", "hash": "7cbb4d659093bab5848fd3796f059e8ae759466f", "diff": "@@ -54,7 +54,7 @@ def drift(ctx, folder_id, verbose, norm_id, save_xmcd, save_drift,\n \n ppath = ctx.obj[\"ppath\"]\n if norm_id is not None:\n- normfolder = ppath.basedir + \"{}_{}\".format(norm_id, folder_suffix)\n+ normfolder = ppath.basedir / \"{}_{}\".format(norm_id, folder_suffix)\n norm = get_normalisation(fdname=normfolder, name=norm_name)\n else:\n import numpy as np\n", "old_path": "peempy/cmdline/cmd_batch.py", "rewrite": "ReplaceText(target='/' @(57,35)->(57,36))"} -{"repo": "https://:@github.com/termie/farmboy.git", "hash": "35950d1e384b4ea70d2698544aec6652521a1dc1", "diff": "@@ -63,7 +63,7 @@ def update(d, path='farmboy.yaml'):\n doc = {}\n \n doc.update(d)\n- yaml.dump(d,\n+ yaml.dump(doc,\n stream=open(path, 'w'),\n default_flow_style=False,\n indent=2,\n", "old_path": "farmboy/util.py", "rewrite": "ReplaceText(target='doc' @(66,14)->(66,15))"} -{"repo": "https://:@github.com/Mariocj89/hubsync.git", "hash": "47076ad24664e140ce104a11a2845395ae40da27", "diff": "@@ -41,7 +41,7 @@ def zip_pairs(xs, ys, key=lambda x: x):\n yield None, ys.pop()\n elif key(xs[-1]) == key(ys[-1]):\n yield xs.pop(), ys.pop()\n- elif key(xs[-1]) > key(ys[-1]):\n+ elif key(xs[-1]) < key(ys[-1]):\n yield xs.pop(), None\n else:\n yield None, ys.pop()\n", "old_path": "hubsync/sync.py", "rewrite": "ReplaceText(target='<' @(44,25)->(44,26))"} -{"repo": "https://:@github.com/andrewsanchez/NCBITK.git", "hash": "233aa289b2674bf0d2880acb45f7b1f832eceee7", "diff": "@@ -41,7 +41,7 @@ def update(genbank_mirror, genbank_status, path_vars, assembly_summary, species_\n curate.create_species_dirs(genbank_mirror, assembly_summary, logger, species_list)\n local_genomes, new_genomes, old_genomes, sketch_files, missing_sketch_files = genbank_status\n \n- curate.remove_old_genomes(genbank_mirror, assembly_summary, local_genomes, logger)\n+ curate.remove_old_genomes(genbank_mirror, assembly_summary, old_genomes, logger)\n sync.sync_latest_genomes(genbank_mirror, assembly_summary, new_genomes, logger)\n curate.unzip_genbank_mirror(genbank_mirror)\n rename.rename(genbank_mirror, assembly_summary)\n", "old_path": "run.py", "rewrite": "ReplaceText(target='old_genomes' @(44,64)->(44,77))"} -{"repo": "https://:@github.com/williamjameshandley/spherical_kde.git", "hash": "690bedc85f0d7c0fcf419609fbf05f34fe3cd419", "diff": "@@ -68,7 +68,7 @@ class SphericalKDE(object):\n \"shape as weights ({}!={})\".format(\n len(self.phi), len(self.weights)))\n \n- sigmahat = VonMises_std(self.theta, self.phi)\n+ sigmahat = VonMises_std(self.phi, self.theta)\n self.suggested_bandwidth = 1.06*sigmahat*len(weights)**-0.2\n \n def __call__(self, phi, theta):\n", "old_path": "spherical_kde/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(71,19)->(71,31))"} -{"repo": "https://:@github.com/mmcdermo/pressurize.git", "hash": "a5373cd338db37c225d15c61e3531fae1dc3b8ef", "diff": "@@ -33,7 +33,7 @@ class ModelServer(object):\n self._pipe = pipe\n self._resources = ModelServer.acquire_resources(config, model_conf, resource_path)\n self._model_class = ModelServer.import_model(model_conf['path'], source_path)\n- self._model = self._model_class(self._resources, config=config)\n+ self._model = self._model_class(self._resources, config=model_conf)\n \n def run(self):\n handler = logging.handlers.WatchedFileHandler(\n", "old_path": "pressurize/model/model_server.py", "rewrite": "ReplaceText(target='model_conf' @(36,64)->(36,70))"} -{"repo": "https://:@github.com/ladybug-tools/dragonfly.git", "hash": "8c336e3b05084859242d393c51ceab66e56491cf", "diff": "@@ -929,7 +929,7 @@ class Room2D(_BaseGeometry):\n seg_1.distance_to_point(seg_2.p2) <= tolerance:\n # set the boundary conditions of the segments\n room_1.set_adjacency(room_2, j, k)\n- adj_info.append(((room_1, k), (room_2, k)))\n+ adj_info.append(((room_1, j), (room_2, k)))\n break\n except IndexError:\n pass # we have reached the end of the list of zones\n", "old_path": "dragonfly/room2d.py", "rewrite": "ReplaceText(target='j' @(932,62)->(932,63))"} -{"repo": "https://:@github.com/mworion/MountWizzard4.git", "hash": "f242a72c11cd1a6e904daf11afdfdee81c2aeb20", "diff": "@@ -109,7 +109,7 @@ class SiteStatus(object):\n if self.ui.checkRefracNone.isChecked():\n return False\n if self.ui.checkRefracNoTrack.isChecked():\n- if self.app.mount.obsSite.status != 0:\n+ if self.app.mount.obsSite.status == 0:\n return False\n temp, press = self.app.environment.getFilteredRefracParams()\n if temp is None or press is None:\n", "old_path": "mw4/gui/mainWmixin/tabSiteStatus.py", "rewrite": "ReplaceText(target='==' @(112,45)->(112,47))"} -{"repo": "https://:@github.com/mworion/MountWizzard4.git", "hash": "a1d62cbed9ed70e9caebb9f3b66c9367ce584216", "diff": "@@ -128,7 +128,7 @@ class Weather(indiClass.IndiClass):\n else:\n key = element\n \n- self.data[element] = value\n+ self.data[key] = value\n \n if 'WEATHER_DEWPOINT' in self.data:\n return True\n", "old_path": "mw4/environment/weather.py", "rewrite": "ReplaceText(target='key' @(131,22)->(131,29))"} -{"repo": "https://:@github.com/mworion/MountWizzard4.git", "hash": "cf891426dffe2a018621bf2c836ff19bfb086835", "diff": "@@ -460,7 +460,7 @@ class SettMisc(object):\n \n :return: True for test purpose\n \"\"\"\n- if platform.machine() not in Config.excludedPlatforms:\n+ if platform.machine() in Config.excludedPlatforms:\n return False\n \n self.audioSignalsSet['Beep'] = ':/sound/beep.wav'\n", "old_path": "mw4/gui/mainWmixin/tabSettMisc.py", "rewrite": "ReplaceText(target=' in ' @(463,29)->(463,37))"} -{"repo": "https://:@github.com/mworion/MountWizzard4.git", "hash": "03adbd9668d10e81e3a9342c6dc5053442394559", "diff": "@@ -376,7 +376,7 @@ class DataPoint(object):\n track = self.app.mount.setting.meridianLimitTrack\n \n if slew is None or track is None:\n- return True\n+ return False\n \n value = max(slew, track)\n \n", "old_path": "mw4/logic/modeldata/buildpoints.py", "rewrite": "ReplaceText(target='False' @(379,19)->(379,23))"} -{"repo": "https://:@github.com/beincy/utils-mini.git", "hash": "989c19fa9755236023d28748724a64e8a379de07", "diff": "@@ -98,7 +98,7 @@ def isNoneOrEmpty(obj):\n \u5224\u65ad\u5217\u8868\u6216\u8005\u5b57\u7b26\u4e32\u662f\u5426\u4e3a\u7a7a\n '''\n if obj is None:\n- return False\n+ return True\n if isinstance(obj, list):\n return len(obj) <= 0\n if isinstance(obj, str):\n", "old_path": "utilsMini/uitiy.py", "rewrite": "ReplaceText(target='True' @(101,15)->(101,20))"} -{"repo": "https://:@github.com/philipdexter/pear.git", "hash": "41a38e1c951ce4939b28654c0b3269bc7a3afa38", "diff": "@@ -47,7 +47,7 @@ def upgrade(ctx):\n print('failed to find {} on server'.format(n))\n continue\n elif lv != rv:\n- print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(lv, rv, n), end='')\n+ print('found new version {} (old: {}) for {}, do you want to upgrade? [Y/n] '.format(rv, lv, n), end='')\n sys.stdout.flush()\n answer = sys.stdin.readline().strip()\n if answer in ('', ' ', 'Y', 'y'):\n", "old_path": "pear/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(50,18)->(50,96))"} -{"repo": "https://:@github.com/wesselb/matrix.git", "hash": "e0cc62b07fcfe89d4adf592e4ab16d1a4865c71d", "diff": "@@ -93,7 +93,7 @@ def matmul(a, b, tr_a=False, tr_b=False):\n b = _tr(b, tr_b)\n middle = B.matmul(a.right, b.left, tr_a=True)\n rows, cols = B.shape(middle)\n- if rows < cols:\n+ if rows > cols:\n return LowRank(B.matmul(a.left, middle), b.right)\n else:\n return LowRank(a.left, B.matmul(b.right, middle, tr_b=True))\n", "old_path": "matrix/ops/matmul.py", "rewrite": "ReplaceText(target='>' @(96,12)->(96,13))"} -{"repo": "https://:@github.com/cuenca-mx/ivoy-python.git", "hash": "4bc75f0341179efdbf63ddba96e9de8e651adae4", "diff": "@@ -33,7 +33,7 @@ class Waybill(Resource):\n resp = cls._client.post(cls._endpoint, json=json_data)\n return cls(\n id_package_list=id_package_list,\n- guide_list=ivoy_guide_list,\n+ guide_list=guide_list,\n ivoy_guide_list=ivoy_guide_list,\n byte_content=resp.content,\n )\n", "old_path": "ivoy/resources/waybill.py", "rewrite": "ReplaceText(target='guide_list' @(36,23)->(36,38))"} -{"repo": "https://:@github.com/twmacro/pyyeti.git", "hash": "0b1aa385a36ed58d82895e91cbb23bb59823f7ba", "diff": "@@ -733,7 +733,7 @@ def _get_Tlv2sc(sccoord):\n T = np.zeros((6, 6))\n T[:3, :3] = sccoord\n T[3:, 3:] = sccoord\n- return sccoord\n+ return T\n \n # get transform from l/v basic to s/c:\n uset = n2p.addgrid(None, 1, 'b', sccoord, [0, 0, 0], sccoord)\n", "old_path": "pyyeti/cb.py", "rewrite": "ReplaceText(target='T' @(736,15)->(736,22))"} -{"repo": "https://:@github.com/civodlu/trw.git", "hash": "a2e824a5ae886c95af4e2cecd29331401aa61f76", "diff": "@@ -158,7 +158,7 @@ class CallbackExplainDecision(callback.Callback):\n self.dataset_name = next(iter(datasets))\n \n if datasets[self.dataset_name].get(self.split_name) is None:\n- logger.error('can\\'t find split={} for dataset={}'.format(self.dataset_name, self.split_name))\n+ logger.error('can\\'t find split={} for dataset={}'.format(self.split_name, self.dataset_name))\n self.dataset_name = None\n return\n \n", "old_path": "src/trw/train/callback_explain_decision.py", "rewrite": "ArgSwap(idxs=0<->1 @(161,25)->(161,69))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "ff1fe6cc1054b70682a5c3ecf41ba9c0b4e14137", "diff": "@@ -88,7 +88,7 @@ class Interval:\n and _in_interval(other.end, self))\n \n def orientation_with(self, point: Point) -> int:\n- return Angle(self.start, self.end, point).orientation\n+ return Angle(self.end, self.start, point).orientation\n \n \n class Segment(Interval):\n", "old_path": "gon/linear.py", "rewrite": "ArgSwap(idxs=0<->1 @(91,15)->(91,20))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "ff1fe6cc1054b70682a5c3ecf41ba9c0b4e14137", "diff": "@@ -9,7 +9,7 @@ from . import strategies\n def test_basic(vertex: Point,\n first_ray_point: Point,\n second_ray_point: Point) -> None:\n- angle = Angle(vertex, first_ray_point, second_ray_point)\n+ angle = Angle(first_ray_point, vertex, second_ray_point)\n \n assert angle.vertex == vertex\n assert angle.first_ray_point == first_ray_point\n", "old_path": "tests/angular_tests/angle_tests/test_creation.py", "rewrite": "ArgSwap(idxs=0<->1 @(12,12)->(12,17))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "31bfd6196e50ef10a020b3adee21e87705ba5abf", "diff": "@@ -68,7 +68,7 @@ class Vector:\n >>> not zero_vector\n True\n \"\"\"\n- return bool(self._x and self._y)\n+ return bool(self._x or self._y)\n \n @property\n def x(self) -> Scalar:\n", "old_path": "gon/base.py", "rewrite": "ReplaceText(target='or' @(71,28)->(71,31))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "948c5adbfc855d0fcd1fd92d5442fc24ac3986ca", "diff": "@@ -105,7 +105,7 @@ def replace_segment(segments: Set[Segment],\n \n \n def is_non_origin_point(point: Point) -> bool:\n- return bool(point.x and point.y)\n+ return bool(point.x or point.y)\n \n \n def reflect_point(point: Point) -> Point:\n", "old_path": "tests/utils.py", "rewrite": "ReplaceText(target='or' @(108,24)->(108,27))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "e8e6c3d4505c540b8dfb5ca1f5fb29fefad25ee6", "diff": "@@ -49,8 +49,8 @@ class Angle:\n @property\n def kind(self) -> AngleKind:\n return AngleKind(to_sign(\n- projection.signed_length(self._vertex,\n- self._first_ray_point,\n+ projection.signed_length(self._first_ray_point,\n+ self._vertex,\n self._second_ray_point)))\n \n @property\n", "old_path": "gon/angular.py", "rewrite": "ArgSwap(idxs=0<->1 @(52,16)->(52,40))"} -{"repo": "https://:@github.com/lycantropos/gon.git", "hash": "36f206f6debde8166907e917b5a96e08a1dbe256", "diff": "@@ -185,7 +185,7 @@ class Polygon(Geometry):\n >>> polygon > polygon.convex_hull\n False\n \"\"\"\n- return self != other and self <= other\n+ return self != other and self >= other\n \n def __hash__(self) -> int:\n \"\"\"\n", "old_path": "gon/shaped.py", "rewrite": "ReplaceText(target='>=' @(188,38)->(188,40))"} -{"repo": "https://:@github.com/energy-analytics-project/energy-dashboard-lib.git", "hash": "7f6979e46e7d4c015302ac3e826ee317325bf216", "diff": "@@ -161,7 +161,7 @@ def insert_file(logger, resource_name, dbmgr, sql_dir, db_dir, sql_file_name, id\n \"dbmgr\" : str(dbmgr),\n \"message\" : \"completed\",\n })\n- return sql_file\n+ return sql_file_name\n except Exception as e:\n log.error(chlogger, {\n \"name\" : __name__,\n", "old_path": "edl/resources/db.py", "rewrite": "ReplaceText(target='sql_file_name' @(164,15)->(164,23))"} -{"repo": "https://:@github.com/quipucords/camayoc.git", "hash": "5d52f47ce5f7085773edfba8ac3cb0a7016b9500", "diff": "@@ -39,7 +39,7 @@ def browser(request):\n debug_mode = (os.environ.get('SELENIUM_DEBUG', 'false').lower() == 'true')\n if driver_type == 'chrome':\n chrome_options = webdriver.ChromeOptions()\n- if debug_mode:\n+ if not debug_mode:\n chrome_options.add_argument('--headless')\n chrome_options.add_argument('--disable-gpu')\n chrome_options.add_argument('--no-sandbox')\n", "old_path": "camayoc/tests/qpc/ui/conftest.py", "rewrite": "ReplaceText(target='not ' @(42,11)->(42,11))"} -{"repo": "https://:@github.com/AnemoneLabs/unmessage.git", "hash": "cdbdf31e6db0a03b7521240aab8ef7e78f259027", "diff": "@@ -33,7 +33,7 @@ def test_build_regular_packet(iv,\n len(iv_hash) == packets.HASH_LEN and\n len(payload_hash) == packets.HASH_LEN and\n not len(handshake_key) and\n- len(payload_hash)):\n+ len(payload)):\n assert isinstance(packets.build_regular_packet(data),\n packets.RegularPacket)\n else:\n", "old_path": "tests/test_packets.py", "rewrite": "ReplaceText(target='payload' @(36,16)->(36,28))"} -{"repo": "https://:@github.com/datacamp/shellwhat_ext.git", "hash": "a8cf5633b36c6f11da7cb32b604b2cb1dbf246ad", "diff": "@@ -83,7 +83,7 @@ def test_output_does_not_contain(state, text, fixed=True, msg='Submission output\n \n else:\n pat = re.compile(text)\n- if text.search(state.student_result):\n+ if pat.search(state.student_result):\n state.do_test(msg.format(text))\n \n return state\n", "old_path": "shellwhat_ext/__init__.py", "rewrite": "ReplaceText(target='pat' @(86,11)->(86,15))"} -{"repo": "https://:@github.com/fdcl-nrf/fym.git", "hash": "ac48fb4c314929f215ce7a7fa86c245cd9c84261", "diff": "@@ -223,7 +223,7 @@ class Delay:\n return self.clock.get() >= self.T\n \n def set_states(self, time):\n- if time > self.memory_dump.x[-1] - self.T:\n+ if time > self.memory_dump.x[-1] + self.T:\n fit = self.memory[0]\n else:\n fit = self.memory_dump\n", "old_path": "fym/core.py", "rewrite": "ReplaceText(target='+' @(226,41)->(226,42))"} -{"repo": "https://:@github.com/tjbanks/bmtools.git", "hash": "6c3bec26dc0e7338760233359c320ebfd94c4c8d", "diff": "@@ -339,7 +339,7 @@ def connection_divergence_average(config=None,nodes=None,edges=None,sources=[],t\n vc = vc[target_id_type].dropna().sort_index()\n count = vc.ix[target_id]#t_list[t_list[target_id_type]==target_id]\n else:\n- vc = t_list.apply(pd.Series.value_counts)\n+ vc = s_list.apply(pd.Series.value_counts)\n vc = vc[source_id_type].dropna().sort_index()\n count = vc.ix[source_id]#count = s_list[s_list[source_id_type]==source_id]\n \n", "old_path": "bmtools/util.py", "rewrite": "ReplaceText(target='s_list' @(342,17)->(342,23))"} -{"repo": "https://:@github.com/tjbanks/bmtools.git", "hash": "d8cb66f7299499176a5391effe12f55213115f15", "diff": "@@ -1379,7 +1379,7 @@ https://github.com/tjbanks/bmtool\n ctg.add_widget(window_index,column_index,widget)\n \n segpassivewidget = SegregationPassiveWidget(fir_widget,ctg.root_sec.cell(), other_cells,section_selected,ctg.mechanism_dict,gleak_var=gleak,eleak_var=eleak)\n- ctg.add_widget(window_index,column_index,widget)\n+ ctg.add_widget(window_index,column_index,segpassivewidget)\n \n widget = SegregationFIRFitWidget(fir_widget)\n ctg.add_widget(window_index,column_index,widget)\n", "old_path": "bmtools/cli/plugins/util/commands.py", "rewrite": "ReplaceText(target='segpassivewidget' @(1382,45)->(1382,51))"} -{"repo": "https://:@github.com/tslight/ppick.git", "hash": "d610a851b37e3b280fe22c704e5845194420fc86", "diff": "@@ -65,7 +65,7 @@ def process(parent, action, curline):\n curline += 1\n elif action == 'get_size_all':\n for c, d in parent.traverse():\n- child.sized[os.path.abspath(child.name)] = None\n+ child.sized[os.path.abspath(c.name)] = None\n action = None # reset action\n line += 1 # keep scrolling!\n return curline, line\n", "old_path": "treepick/pick.py", "rewrite": "ReplaceText(target='c' @(68,48)->(68,53))"} -{"repo": "https://:@github.com/tslight/ppick.git", "hash": "df4927a8e15cd6ebce72e989da9b12999158d951", "diff": "@@ -58,7 +58,7 @@ def process(parent, action, curline):\n child.picked.add(child.name)\n curline += 1\n elif action == 'next_parent':\n- curline += child.nextparent(parent, curline, depth)\n+ curline = child.nextparent(parent, curline, depth)\n elif action == 'prev_parent':\n curline = child.prevparent(parent, curline, depth)[0]\n elif action == 'get_size':\n", "old_path": "treepick/pick.py", "rewrite": "ReplaceText(target='=' @(61,24)->(61,26))"} -{"repo": "https://:@github.com/tslight/ppick.git", "hash": "0e6b3b8077f15ae49045d1aef5e4b597ec1f7ada", "diff": "@@ -76,7 +76,7 @@ def pick(stdscr, root, hidden=True, relative=False, picked=[]):\n if action == 'reset':\n parent, action, curline = reset(stdscr, root, hidden, picked=[])\n elif action == 'toggle_hidden':\n- curline = scr.toggle_hidden(curline, scr)\n+ curline = parent.toggle_hidden(curline, scr)\n elif action == 'find':\n string = scr.txtbox(\"Find: \").strip()\n if string:\n", "old_path": "treepick/pick.py", "rewrite": "ReplaceText(target='parent' @(79,22)->(79,25))"} -{"repo": "https://:@github.com/cloudve/djcloudbridge.git", "hash": "3a4862c261a0e3457358cd71842d7e0d7b62b11a", "diff": "@@ -194,7 +194,7 @@ class GCECredentials(Credentials):\n gce_creds = json.loads(self.credentials)\n # Overwrite with super values in case gce_creds also has an id property\n gce_creds.update(d)\n- return d\n+ return gce_creds\n \n \n class AzureCredentials(Credentials):\n", "old_path": "djcloudbridge/models.py", "rewrite": "ReplaceText(target='gce_creds' @(197,15)->(197,16))"} -{"repo": "https://:@github.com/suizokukan/katal.git", "hash": "08b3edeb2142136a0f857a185d483ccc75ae2591", "diff": "@@ -1053,7 +1053,7 @@ def fill_select(_debug_datatime=None):\n \": incompatibility with the sieves\".format(prefix, fullname),\n _important_msg=False)\n else:\n- tobeadded, partialhashid, hashid = thefilehastobeadded__db(filename, size, time)\n+ tobeadded, partialhashid, hashid = thefilehastobeadded__db(fullname, size, time)\n \n if tobeadded:\n # ok, let's add to SELECT...\n", "old_path": "katal/katal.py", "rewrite": "ReplaceText(target='fullname' @(1056,75)->(1056,83))"} -{"repo": "https://:@github.com/jrabbit/pyborg-1up.git", "hash": "0552700be4229d7b06c3264bb2e9d1c59c20ecfa", "diff": "@@ -125,7 +125,7 @@ class PyborgDiscord(discord.Client):\n try:\n if self.settings[\"discord\"][\"plaintext_ping\"]:\n exp = re.compile(message.guild.me.display_name, re.IGNORECASE)\n- line = exp.sub(line, \"#nick\")\n+ line = exp.sub(\"#nick\", line)\n except KeyError:\n pass\n \n", "old_path": "pyborg/pyborg/mod/mod_discord.py", "rewrite": "ArgSwap(idxs=0<->1 @(128,23)->(128,30))"} -{"repo": "https://:@github.com/gallantlab/tikreg.git", "hash": "4241a935801cdef4b85a79e361eb365e65385f04", "diff": "@@ -1103,7 +1103,7 @@ def estimate_stem_wmvnp(features_train,\n feature_priors=feature_priors,\n feature_hyparams=spatial_opt,\n weights=weights,\n- performance=weights,\n+ performance=performance,\n predictions=predictions,\n ridge_scale=ridge_opt,\n verbosity=verbosity,\n", "old_path": "tikypy/models.py", "rewrite": "ReplaceText(target='performance' @(1106,67)->(1106,74))"} -{"repo": "https://:@github.com/SpotlightKid/picoredis.git", "hash": "f7996b19a47b6372bd3d29c081320d38ce2f566c", "diff": "@@ -53,7 +53,7 @@ class Redis:\n self.connect(host, port)\n \n def connect(self, host=None, port=None):\n- if port is not None:\n+ if host is not None:\n self._host = host\n \n if port is not None:\n", "old_path": "picoredis/picoredis.py", "rewrite": "ReplaceText(target='host' @(56,11)->(56,15))"} -{"repo": "https://:@github.com/igordejanovic/pyFlies.git", "hash": "915aaec319a22c7e312a45ecded6d2d2a2372321", "diff": "@@ -127,7 +127,7 @@ class ExpTableRow(ModelElement, ScopeProvider):\n for comp_time in cond_comp.comp_times:\n comp_time_inst = comp_time.eval(context, last_comp)\n comp_insts.append(comp_time_inst)\n- last_comp = comp_time_inst\n+ last_comp = comp_time\n setattr(self, f'ph_{phase}', comp_insts)\n break\n \n", "old_path": "src/textx-lang-pyflies/pyflies/table.py", "rewrite": "ReplaceText(target='comp_time' @(130,36)->(130,50))"} -{"repo": "https://:@github.com/igordejanovic/pyFlies.git", "hash": "c1437ff636c345265b020ddbfae245a266372833", "diff": "@@ -151,7 +151,7 @@ class ConditionsTable(ModelElement):\n else:\n cond_template.append(iter(var_exp_resolved))\n else:\n- if has_sequences:\n+ if should_repeat:\n cond_template.append(repeat(var_exp))\n else:\n cond_template.append(iter([var_exp]))\n", "old_path": "src/textx-lang-pyflies/pyflies/lang/pyflies.py", "rewrite": "ReplaceText(target='should_repeat' @(154,27)->(154,40))"} -{"repo": "https://:@github.com/Deeplodocus/deeplodocus.git", "hash": "2c3e93e9faa91aa4b0c992409d3423300402e039", "diff": "@@ -138,7 +138,7 @@ class GenericEvaluator(GenericInferer):\n if DEEP_ENTRY_ADDITIONAL_DATA in metric_args:\n temp_metric_result = metric_method(inputs, outputs, labels, additional_data)\n else:\n- temp_metric_result = metric_method(outputs, labels)\n+ temp_metric_result = metric_method(inputs, labels)\n else:\n if DEEP_ENTRY_ADDITIONAL_DATA in metric_args:\n temp_metric_result = metric_method(inputs, outputs, additional_data)\n", "old_path": "deeplodocus/core/inference/generic_evaluator.py", "rewrite": "ReplaceText(target='inputs' @(141,59)->(141,66))"} -{"repo": "https://:@github.com/mimba/scikit-optimize.git", "hash": "f760e9c43423753fa1912c9ad7db0b4d74c36a7d", "diff": "@@ -215,7 +215,7 @@ class Real(Dimension):\n return (self.low, self.high)\n \n def __contains__(self, point):\n- return self.low <= point <= self.high\n+ return self.low <= point < self.high\n \n @property\n def transformed_bounds(self):\n", "old_path": "skopt/space/space.py", "rewrite": "ReplaceText(target='<' @(218,33)->(218,35))"} -{"repo": "https://:@github.com/mimba/scikit-optimize.git", "hash": "198ddde419c281d5ed698eee0a8f5874cd30e444", "diff": "@@ -227,7 +227,7 @@ class Sobol(InitialPointGenerator):\n for j in range(n_samples):\n r[j, 0:n_dim], seed = self._sobol(n_dim, seed)\n if self.randomize:\n- r = space.inverse_transform(_random_shift(r, random_state))\n+ r = space.inverse_transform(_random_shift(r, rng))\n r = space.inverse_transform(r)\n space.set_transformer(transformer)\n return r\n", "old_path": "skopt/samples/sobol.py", "rewrite": "ReplaceText(target='rng' @(230,57)->(230,69))"} -{"repo": "https://:@github.com/biosustain/sanger-sequencing.git", "hash": "5c730c6b687e3436bb2a0f3dad5d54d326de4021", "diff": "@@ -110,5 +110,5 @@ def drop_missing_records(\n if (~sample_mask).any():\n LOGGER.error(\n \"The following sample(s) have no corresponding sequence record: \"\n- \"%s.\", \", \".join(template.loc[plasmid_mask, \"sample\"]))\n+ \"%s.\", \", \".join(template.loc[sample_mask, \"sample\"]))\n return template.loc[plasmid_mask & sample_mask, :]\n", "old_path": "src/sanger_sequencing/validation/template.py", "rewrite": "ReplaceText(target='sample_mask' @(113,42)->(113,54))"} -{"repo": "https://:@github.com/KrishnaswamyLab/MAGIC.git", "hash": "a9ff9b948fdb3f9754cd9b12c271b56a0deb1476", "diff": "@@ -464,7 +464,7 @@ class MAGIC(BaseEstimator):\n if not np.all(np.isin(genes, X.columns)):\n warnings.warn(\"genes {} missing from input data\".format(\n genes[~np.isin(genes, X.columns)]))\n- genes = np.argwhere(np.isin(genes, X.columns)).reshape(-1)\n+ genes = np.argwhere(np.isin(X.columns, genes)).reshape(-1)\n \n if store_result and self.X_magic is not None:\n X_magic = self.X_magic\n", "old_path": "python/magic/magic.py", "rewrite": "ArgSwap(idxs=0<->1 @(467,36)->(467,43))"} -{"repo": "https://:@github.com/ihgazni2/edict.git", "hash": "86474307d077d0a0b19ed9e26850bddb7a8fcc14", "diff": "@@ -1198,7 +1198,7 @@ def _get_rvmat(d):\n def map_func(ele,indexc,indexr):\n return(_getitem_via_pathlist(d,ele))\n rvmat = elel.matrix_map(km,map_func)\n- rvmat = elel.prepend([],rvmat)\n+ rvmat = elel.prepend(rvmat,[])\n return(rvmat)\n \n \n", "old_path": "edict/edict.py", "rewrite": "ArgSwap(idxs=0<->1 @(1201,12)->(1201,24))"} -{"repo": "https://:@github.com/ihgazni2/edict.git", "hash": "c33c711d302b920b2534d253018e2afa38481e57", "diff": "@@ -1405,7 +1405,7 @@ def _descmat_non_leaf_handler(desc,pdesc):\n pdesc['non_leaf_descendant_paths'] = cpnldpl\n pdesc['non_leaf_descendant_paths'].append(cpkpl)\n else:\n- pdesc['non_leaf_descendant_paths'].extend(cpldpl)\n+ pdesc['non_leaf_descendant_paths'].extend(cpnldpl)\n pdesc['non_leaf_descendant_paths'].append(cpkpl)\n \n def _acc_sons_count(desc):\n", "old_path": "edict/edict.py", "rewrite": "ReplaceText(target='cpnldpl' @(1408,50)->(1408,56))"} -{"repo": "https://:@github.com/ihgazni2/edict.git", "hash": "b27369ea4e770818dbc19f04b744b4f5db0e5185", "diff": "@@ -1799,7 +1799,7 @@ def get_vndmat_attr(d,keypath,attr,**kwargs):\n nlocs = elel.array_map(rslt,ltree.path2loc)\n def cond_func(ele,kdmat):\n return(kdmat[ele[0]][ele[1]]['path'])\n- rslt = elel.array_map(rslt,cond_func,kdmat)\n+ rslt = elel.array_map(nlocs,cond_func,kdmat)\n else:\n pass \n else:\n", "old_path": "edict/edict.py", "rewrite": "ReplaceText(target='nlocs' @(1802,34)->(1802,38))"} -{"repo": "https://:@github.com/ihgazni2/edict.git", "hash": "f392badd01323d2cef4124158581b1e51eaac168", "diff": "@@ -97,7 +97,7 @@ def _cond_sort(d,**kwargs):\n else:\n return(1)\n ntl = sorted(tl,key=functools.cmp_to_key(cmp_func),reverse=reverse)\n- nd = tlist2dict(tl)\n+ nd = tlist2dict(ntl)\n return(nd)\n \n def _reorder_via_klist(d,nkl,**kwargs):\n", "old_path": "edict/edict.py", "rewrite": "ReplaceText(target='ntl' @(100,20)->(100,22))"} -{"repo": "https://:@github.com/ihgazni2/edict.git", "hash": "92c0b13f1cd0db9ec146f26dbb96276d2335e2b5", "diff": "@@ -2771,7 +2771,7 @@ def sub_not_algo(d,kl,**kwargs):\n full_kl = list(d.keys())\n nnd = {}\n for k in full_kl:\n- if(not(k in nd)):\n+ if(not(k in kl)):\n nnd[k] = nd[k]\n else:\n pass\n", "old_path": "edict/edict.py", "rewrite": "ReplaceText(target='kl' @(2774,20)->(2774,22))"} -{"repo": "https://:@github.com/playpauseandstop/setman.git", "hash": "daf7a569ca07add82f3fabc4575b73349532eff7", "diff": "@@ -332,7 +332,7 @@ class TestUI(TestCase):\n )\n self.assertNotContains(response, '
Value:
')\n \n- if not getattr(django_settings, name):\n+ if getattr(django_settings, name):\n self.assertNotContains(\n response, '%s' % getattr(django_settings, name)\n )\n", "old_path": "testproject-django/testapp/tests/test_ui.py", "rewrite": "ReplaceText(target='' @(335,15)->(335,19))"} -{"repo": "https://:@github.com/hvidy/halophot.git", "hash": "c6ad80221bded8b417be0c52a62229ebf7b9fea9", "diff": "@@ -440,7 +440,7 @@ def do_lc(tpf,ts,splits,sub,order,maxiter=101,split_times=None,w_init=None,rando\n else:\n cad1.append(ts['cadence'][low])\n if high is None:\n- cad1.append(ts['cadence'][-1])\n+ cad2.append(ts['cadence'][-1])\n else:\n cad2.append(ts['cadence'][high])\n sat.append(pmap[\"sat_pixels\"])\n", "old_path": "src/halo_tools.py", "rewrite": "ReplaceText(target='cad2' @(443,16)->(443,20))"} -{"repo": "https://:@gitlab.com/nicolas.hainaux/mathmakerlib.git", "hash": "1995fab6610ba450545cc21879259415710e0255", "diff": "@@ -102,7 +102,7 @@ class LineSegment(Drawable, HasThickness, PointsPair):\n else:\n self.label_position = 'above'\n elif label_position == 'clockwise':\n- if self.deltax > 0:\n+ if self.deltax >= 0:\n self.label_position = 'above'\n else:\n self.label_position = 'below'\n", "old_path": "mathmakerlib/geometry/linesegment.py", "rewrite": "ReplaceText(target='>=' @(105,27)->(105,28))"} -{"repo": "https://:@github.com/ecohydro/CropMask_RCNN.git", "hash": "8a09a75073fd96df996f62bef98f8af9380e2aea", "diff": "@@ -694,7 +694,7 @@ def compute_matches(gt_boxes, gt_class_ids, gt_masks,\n # 3. Find the match\n for j in sorted_ixs:\n # If ground truth box is already matched, go to next one\n- if gt_match[j] > 0:\n+ if gt_match[j] > -1:\n continue\n # If we reach IoU smaller than the threshold, end the loop\n iou = overlaps[i, j]\n", "old_path": "mrcnn/utils.py", "rewrite": "ReplaceText(target='-1' @(697,29)->(697,30))"} -{"repo": "https://:@github.com/matteomattei/PySquashfsImage.git", "hash": "7ca480b91e2f1056d14ddc59e5d30d9f94ef4a80", "diff": "@@ -923,7 +923,7 @@ class SquashFsImage(_Squashfs_commons):\n \t\tindex_bytes = SQUASHFS_XATTR_BLOCK_BYTES(ids)\n \t\tindexes = SQUASHFS_XATTR_BLOCKS(ids)\n \t\tindex = []\n-\t\tfor r in range(0,ids):\n+\t\tfor r in range(0,indexes):\n \t\t\tindex.append( self.makeInteger(myfile,SQUASHFS_XATTR_BLOCK_BYTES(1)) )\n \t\tbytes = SQUASHFS_XATTR_BYTES(ids)\n \t\txattr_ids = {}\n", "old_path": "PySquashfsImage/PySquashfsImage.py", "rewrite": "ReplaceText(target='indexes' @(926,19)->(926,22))"} -{"repo": "https://:@github.com/CFPB/django-nudge.git", "hash": "4c69de668bd9a2ba96c639c252f555bea9ec2d34", "diff": "@@ -55,7 +55,7 @@ def process_batch(key, batch_info, iv):\n success = True\n for item in items:\n item.save()\n- if isinstance(Version, item.object):\n+ if isinstance(item.object, Version):\n version = item.object\n if version.type == VERSION_DELETE:\n if version.object:\n", "old_path": "src/nudge/server.py", "rewrite": "ArgSwap(idxs=0<->1 @(58,15)->(58,25))"} -{"repo": "https://:@github.com/terminusdb/terminus-client-python.git", "hash": "4e688ba70754dbe47b72232c720cf1100e6abea6", "diff": "@@ -422,7 +422,7 @@ class WOQLCore:\n def _clean_class(self, user_class, string_only=None):\n if type(user_class) != str:\n return \"\"\n- if \":\" in user_class:\n+ if \":\" not in user_class:\n if self._vocab and (user_class in self._vocab):\n user_class = self._vocab[user_class]\n else:\n", "old_path": "terminusdb_client/woqlquery/woql_core.py", "rewrite": "ReplaceText(target=' not in ' @(425,14)->(425,18))"} -{"repo": "https://:@github.com/terminusdb/terminus-client-python.git", "hash": "a8cb21f0481e248f02f895a7d0c16917f82fcd5d", "diff": "@@ -688,7 +688,7 @@ class WOQLClient:\n request_file_dict[name] = (name, open(path, \"rb\"), \"application/binary\")\n payload = None\n else:\n- file_dict = None\n+ request_file_dict = None\n payload = query_obj\n \n return self.dispatch(\n", "old_path": "terminusdb_client/woqlclient/woqlClient.py", "rewrite": "ReplaceText(target='request_file_dict' @(691,12)->(691,21))"} -{"repo": "https://:@github.com/dnarvaez/osbuild.git", "hash": "bd6517e635b15c77fa5c158e199cdb99139bf41e", "diff": "@@ -70,7 +70,7 @@ def system_check_touch():\n def full_build_is_required():\n full_build = _load_state(_FULL_BUILD)\n if not full_build:\n- return True\n+ return False\n \n return not (full_build[\"last\"] == config.get_full_build())\n \n", "old_path": "osbuild/state.py", "rewrite": "ReplaceText(target='False' @(73,15)->(73,19))"} -{"repo": "https://:@github.com/mwouts/easyplotly.git", "hash": "687645cc6bb61a16c63259a696fe535059f91665", "diff": "@@ -35,7 +35,7 @@ def sunburst_or_treemap(values, root_label=None, branchvalues='total', **kwargs)\n \n for item in org_tree:\n if isinstance(item, tuple):\n- value = values[item]\n+ value = org_tree[item]\n if value < 0:\n raise ValueError('Negative value {} for {}'.format(value, item))\n \n", "old_path": "easyplotly/internals.py", "rewrite": "ReplaceText(target='org_tree' @(38,20)->(38,26))"} -{"repo": "https://:@github.com/affinitic/collective.registration.git", "hash": "9f740984c7d0206ea21321a37b1ba233003b7423", "diff": "@@ -31,6 +31,6 @@ class SubscriberView(BrowserView):\n def available_places_validator(self, context, request, value):\n registration = context.getParentNode().getParentNode()\n period = registration.get(request.form.get('period'))\n- if int(value) < period.available_places:\n+ if int(value) <= period.available_places:\n return False\n return _('Not enough places left in the selected period')\n", "old_path": "src/collective/registration/browser/subscriber.py", "rewrite": "ReplaceText(target='<=' @(34,22)->(34,23))"} -{"repo": "https://:@github.com/alisaifee/pyutrack.git", "hash": "620d59b82e8a5c98fd4568217c74b485f802ac94", "diff": "@@ -17,4 +17,4 @@ class AuthenticationTests(IntegrationTest):\n credentials=Credentials(username='root', password='rooted'),\n base_url='http://localhost:9876'\n )\n- self.assertRaises(connection.login, LoginError)\n+ self.assertRaises(LoginError, connection.login)\n", "old_path": "tests/integration/test_authentication.py", "rewrite": "ArgSwap(idxs=0<->1 @(20,8)->(20,25))"} -{"repo": "https://:@github.com/angelolovatto/gym-cartpole-swingup.git", "hash": "d31a62df97b07609f86358d3e25e70e623797995", "diff": "@@ -33,7 +33,7 @@ class TorchCartPoleSwingUpEnv(CartPoleSwingUpEnv):\n \n def terminal(self, state):\n \"\"\"Return a batched tensor indicating which states are terminal.\"\"\"\n- return (state[..., 0] < -self.params.x_threshold) & (\n+ return (state[..., 0] < -self.params.x_threshold) | (\n state[..., 0] > self.params.x_threshold\n )\n \n", "old_path": "gym_cartpole_swingup/envs/torch_cartpole_swingup.py", "rewrite": "ReplaceText(target='|' @(36,58)->(36,59))"} -{"repo": "https://:@github.com/shubhamjain0594/opalalgorithms.git", "hash": "42258ea2348e9a624ab5deac7a334bab7656f565", "diff": "@@ -29,7 +29,7 @@ class PrivacyAlgorithmRunner(object):\n Return:\n dict: Privacy ensured dictionary\n \"\"\"\n- result = self.algorithm(result, self.params, self.salt)\n+ result = self.algorithm(self.params, result, self.salt)\n if self._validate_result(result):\n return result\n return {}\n", "old_path": "opalalgorithms/utils/privacyrunner.py", "rewrite": "ArgSwap(idxs=0<->1 @(32,17)->(32,31))"} -{"repo": "https://:@github.com/rcook/ibt.git", "hash": "f32b4fadfb4b9a1416864d7cc05ec867128a32d4", "diff": "@@ -54,7 +54,7 @@ class UpCommand(Command):\n subprocess.check_call([\"/bin/sh\", temp_path])\n \n if args.destroy:\n- docker_image_remove(ctx.image_id)\n+ docker_image_remove(project.image_id)\n \n with temp_dir() as dir:\n if docker_image is None:\n", "old_path": "ibtimpl/up_command.py", "rewrite": "ReplaceText(target='project' @(57,32)->(57,35))"} -{"repo": "https://:@github.com/MasterOdin/nullsmtp.git", "hash": "f945b842e6f849834a020af87ad8293de7124451", "diff": "@@ -38,7 +38,7 @@ class NullSMTP(smtpd.SMTPServer):\n smtpd.SMTPServer.__init__(self, localaddr, None)\n \n self.logger = get_logger()\n- if mail_dir is None or isinstance(mail_dir, str):\n+ if mail_dir is None or not isinstance(mail_dir, str):\n msg = \"Invalid mail_dir variable: {}\".format(mail_dir)\n self.logger.error(msg)\n raise SystemExit(msg)\n", "old_path": "nullsmtp/nullsmtp.py", "rewrite": "ReplaceText(target='not ' @(41,31)->(41,31))"} -{"repo": "https://:@github.com/ddbeck/oraide.git", "hash": "2139a3d8eb3de615d3eea3435f9e715b15b82e93", "diff": "@@ -27,7 +27,7 @@ def assert_after_timeout(fn, timeout_duration=2.0):\n try:\n return fn()\n except AssertionError:\n- if time.time() < timeout:\n+ if time.time() > timeout:\n raise\n return wrapper\n \n", "old_path": "oraide/tests.py", "rewrite": "ReplaceText(target='>' @(30,31)->(30,32))"} -{"repo": "https://:@github.com/thespacedoctor/marshallEngine.git", "hash": "c2aa68840d770ad66caaa775d4497bc72dd6b3c5", "diff": "@@ -101,7 +101,7 @@ class data(object):\n print('HTTP Request failed')\n sys.exit(0)\n \n- if status_code != 502:\n+ if status_code == 502:\n print('HTTP Request failed - status %(status_code)s' % locals())\n print(url)\n self.csvDicts = []\n", "old_path": "marshallEngine/feeders/data.py", "rewrite": "ReplaceText(target='==' @(104,23)->(104,25))"} -{"repo": "https://:@github.com/JoshLee0915/youtrack-rest-python-library.git", "hash": "0695b2e31750184cf7fa301821f3d4d050a90820", "diff": "@@ -154,7 +154,7 @@ class Issue(YouTrackObject):\n if getattr(self, 'links', None) is None:\n return self.youtrack.getLinks(self.id, outwardOnly)\n else:\n- return [l for l in self.links if l.source != self.id or not outwardOnly]\n+ return [l for l in self.links if l.source == self.id or not outwardOnly]\n \n \n class Comment(YouTrackObject):\n", "old_path": "python/youtrack/__init__.py", "rewrite": "ReplaceText(target='==' @(157,54)->(157,56))"} -{"repo": "https://:@github.com/JoshLee0915/youtrack-rest-python-library.git", "hash": "7e5d1b3d6ad8e12ae2ef0791e4afcff9b3865fd3", "diff": "@@ -77,7 +77,7 @@ class YouTrackImporter(object):\n [self._to_yt_issue(issue, project_id) for issue in issues])\n for issue in issues:\n issue_id = self._get_issue_id(issue)\n- issue_attachments = self._get_attachments(issue_id)\n+ issue_attachments = self._get_attachments(issue)\n yt_issue_id = u'%s-%s' % (project_id, issue_id)\n self._import_attachments(yt_issue_id, issue_attachments)\n \n", "old_path": "python/youtrackImporter.py", "rewrite": "ReplaceText(target='issue' @(80,58)->(80,66))"} -{"repo": "https://:@github.com/bird-house/malleefowl.git", "hash": "279479a4cba930e14803ea4a748faa57d884399f", "diff": "@@ -52,5 +52,5 @@ class ThreddsDownload(Process):\n \n with open('out.json', 'w') as fp:\n json.dump(obj=files, fp=fp, indent=4, sort_keys=True)\n- request.outputs['outputs'].file = fp.name\n+ response.outputs['outputs'].file = fp.name\n return response\n", "old_path": "malleefowl/processes/wps_thredds.py", "rewrite": "ReplaceText(target='response' @(55,12)->(55,19))"} -{"repo": "https://:@github.com/jeremiedecock/mrif.git", "hash": "51ea19f5d8cec9f4759eb8079dc4c01295719577", "diff": "@@ -228,7 +228,7 @@ class AbstractCleaningAlgorithm(object):\n image_dict[\"img_cleaned_max_pe\"] = float(np.nanmax(cleaned_img))\n image_dict[\"img_cleaned_num_pix\"] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() )\n \n- cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id'])\n+ cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id'])\n hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM\n \n image_dict[\"img_cleaned_hillas_2_size\"] = float(hillas_params_2_cleaned_img.size)\n", "old_path": "datapipe/denoising/abstract_cleaning_algorithm.py", "rewrite": "ReplaceText(target='cleaned_img' @(231,74)->(231,87))"} -{"repo": "https://:@github.com/dsbowen/hemlock.git", "hash": "4fb5980272b7827170bf66d1a405354e50b5deab", "diff": "@@ -35,7 +35,7 @@ def Start():\n Choice(q, '2', value=2)\n \n p = Page(b)\n- q = Question(b, 'Where do you shop?', qtype='free', var='shop')\n+ q = Question(p, 'Where do you shop?', qtype='free', var='shop')\n \n p = Page(b, terminal=True)\n q = Question(p, \"

Thank you for participating!

\")\n", "old_path": "survey.py", "rewrite": "ReplaceText(target='p' @(38,17)->(38,18))"} -{"repo": "https://:@github.com/dsbowen/hemlock.git", "hash": "314a07abb5445aaf7433ef26bfd0cbe7e576018d", "diff": "@@ -128,7 +128,7 @@ def _verify_data(check, last_instr_page, curr_attempt, attempts):\n attempts : int or None\n Maximum number of attempts.\n \"\"\"\n- if all(q.data for q in check.questions) or curr_attempt == attempts:\n+ if all(q.data for q in check.questions) or curr_attempt >= attempts:\n if check != check.branch.pages[-1]:\n # this check does not have to be repeated\n last_instr_page.forward_to = check.branch.pages[check.index+1]\n", "old_path": "hemlock/tools/comprehension.py", "rewrite": "ReplaceText(target='>=' @(131,60)->(131,62))"} -{"repo": "https://:@github.com/cartlogic/manhattan.git", "hash": "4be7aa9c741a051e82e2c11a16af9ddc8758554f", "diff": "@@ -49,5 +49,5 @@ def truncate_recent(max_records):\n offset(max_records)\n delete_before = q.scalar()\n if delete_before:\n- q = t.delete().where(t.c.last_timestamp >= delete_before)\n+ q = t.delete().where(t.c.last_timestamp < delete_before)\n meta.Session.execute(q)\n", "old_path": "manhattan/backends/sql/model/recent.py", "rewrite": "ReplaceText(target='<' @(52,48)->(52,50))"} -{"repo": "https://:@github.com/patryk4815/PySteamWeb.git", "hash": "77176388a1673364d9a2b11018b6508db603d445", "diff": "@@ -52,7 +52,7 @@ class SteamTrade(SteamWebBase):\n def get_parse_trade_url(cls, trade_url):\n regex = re.compile(r'^https?://steamcommunity\\.com/tradeoffer/new/\\?partner=(\\d+)&token=([a-zA-Z0-9_-]+)$')\n match = regex.match(trade_url)\n- if match:\n+ if not match:\n return None\n \n return {\n", "old_path": "pysteamweb/plugins/trade.py", "rewrite": "ReplaceText(target='not ' @(55,11)->(55,11))"} -{"repo": "https://:@github.com/reidmcy/uchicago-pyanno.git", "hash": "f23229e9f63648d04ba10b6fea310742f0fc52b3", "diff": "@@ -11,5 +11,5 @@ def is_display_small():\n size = wx.GetDisplaySize()\n if size is not None:\n w, h = size\n- return w < 1300 and h < 850\n+ return w < 1300 or h < 850\n return False\n", "old_path": "pyanno/ui/appbase/wx_utils.py", "rewrite": "ReplaceText(target='or' @(14,24)->(14,27))"} -{"repo": "https://:@github.com/hbradleyiii/nwid.git", "hash": "86c3d7b9c0b6f35f3310250c0ddc690d3280e023", "diff": "@@ -55,7 +55,7 @@ class TerminalString(object):\n self.escape_markers = []\n for index, char in enumerate(self.string):\n # Mark the stop of an escape sequence\n- if sequence_start is None and char in string.letters:\n+ if sequence_start is not None and char in string.letters:\n self.escape_markers.append(EscapeMarker(sequence_start, index))\n sequence_start = None # Reset start sequence \n \n", "old_path": "nwid/terminal/terminal_string.py", "rewrite": "ReplaceText(target=' is not ' @(58,29)->(58,33))"} -{"repo": "https://:@gitlab.com/metapensiero/metapensiero.sqlalchemy.asyncpg.git", "hash": "107f9fec1716ab99d5deee8deec1e6c92f9ed40c", "diff": "@@ -34,7 +34,7 @@ def compile(stmt, pos_args=None, named_args=None, _d=PGDialect_asyncpg()):\n \"\"\"\n \n if isinstance(stmt, str):\n- return stmt, tuple(pos_args) if pos_args is None else ()\n+ return stmt, tuple(pos_args) if pos_args is not None else ()\n else:\n compiled = stmt.compile(dialect=_d)\n params = compiled.construct_params(named_args)\n", "old_path": "src/arstecnica/ytefas/asyncpg/__init__.py", "rewrite": "ReplaceText(target=' is not ' @(37,48)->(37,52))"} -{"repo": "https://:@github.com/CMU-ARM/alloy.git", "hash": "04200226608ac01de2e5fa0778da0b6ec2a34f79", "diff": "@@ -52,7 +52,7 @@ class PrioritySearchQueue(SearchQueue):\n def update(self, obj, **kwargs):\n for h in self._pheap:\n if h[1] == obj:\n- self._pheap.remove(obj)\n+ self._pheap.remove(h)\n break\n heapq.heappush(self._pheap, (kwargs['cost'], obj))\n \n", "old_path": "alloy/algo/graph_search.py", "rewrite": "ReplaceText(target='h' @(55,35)->(55,38))"} -{"repo": "https://:@github.com/pombredanne/schematics.git", "hash": "8fad1ee655244b3e6cf24a4b4236d414075498ca", "diff": "@@ -47,7 +47,7 @@ def apply_shape(cls, model_or_dict, field_converter, model_converter,\n model_dict[serialized_name] = model_converter(field_value)\n \n ### Convert field as list of models\n- elif isinstance(field_name, list) and len(field_value) > 0:\n+ elif isinstance(field_value, list) and len(field_value) > 0:\n if isinstance(field_value[0], Model):\n model_dict[serialized_name] = [model_converter(vi)\n for vi in field_value]\n", "old_path": "schematics/serialize.py", "rewrite": "ReplaceText(target='field_value' @(50,24)->(50,34))"} -{"repo": "https://:@github.com/Hedgehogues/python-clients.git", "hash": "e4e905beb5cc095f6c2a3d0d0ffec5dda5c6fd68", "diff": "@@ -68,7 +68,7 @@ class Client:\n else:\n r = requests.get(url=url, params=method.params, headers=method.headers, proxies=self.proxies, auth=auth_)\n elif m_type == 'FILE':\n- assert method.files is None, 'For FILE attribute file must not be empty'\n+ assert method.files is not None, 'For FILE attribute file must not be empty'\n if self.proxies is not None:\n r = requests.post(url=url, params=method.params, data=method.body, headers=method.headers, auth=auth_,\n files=method.files)\n", "old_path": "clients/http.py", "rewrite": "ReplaceText(target=' is not ' @(71,31)->(71,35))"} -{"repo": "https://:@github.com/pbrisk/businessdate.git", "hash": "c5359efe862021fe445ef048ac52a30b527cce83", "diff": "@@ -116,7 +116,7 @@ class BusinessPeriod(object):\n def _parse_ymd(cls, period):\n # can even parse strings like '-1B-2Y-4Q+5M' but also '0B', '-1Y2M3D' as well.\n def _parse(p, letter):\n- if p.find(letter) > 0:\n+ if p.find(letter) >= 0:\n s, p = p.split(letter, 1)\n s = s[1:] if s.startswith('+') else s\n sgn, s = (-1, s[1:]) if s.startswith('-') else (1, s)\n", "old_path": "businessdate/businessperiod.py", "rewrite": "ReplaceText(target='>=' @(119,30)->(119,31))"} -{"repo": "https://:@github.com/GenesisCoast/conditions-py.git", "hash": "c6326f3fc1805eddc80f4556e786523bf6725ffd", "diff": "@@ -306,7 +306,7 @@ class StringValidator(Validator):\n \"\"\"\n Checks whether the given value does not match the supplied `pattern`. An exception is thrown otherwise.\n \"\"\"\n- if not RegexHelper.is_match(pattern, self.value):\n+ if RegexHelper.is_match(pattern, self.value):\n raise ArgumentPatternError(\n f'The argument `{self.argument_name}` should match the pattern `{pattern}`',\n self.value,\n", "old_path": "src/validators/string_validator.py", "rewrite": "ReplaceText(target='' @(309,11)->(309,15))"} -{"repo": "https://:@github.com/aperezdc/omni.git", "hash": "5755dd751e818fcb78235a0c1a17a4d654d0cb6e", "diff": "@@ -304,7 +304,7 @@ def authenticate(get_realm, realm_param=\"realm\"):\n if request.authorization:\n password = b64decode(request.authorization[1])\n username, password = password.decode(\"utf-8\").split(\":\", 1)\n- if username is None or realm.authenticate(username, password):\n+ if username is None or not realm.authenticate(username, password):\n raise HTTPUnauthorized(headers=[\n (\"WWW-Authenticate\",\n \"Basic realm=\\\"{}\\\"\".format(realm.description)),\n", "old_path": "omni/web/routing.py", "rewrite": "ReplaceText(target='not ' @(307,35)->(307,35))"} -{"repo": "https://:@github.com/nectar-cs/k8-kat.git", "hash": "5dceaae2ba32d6053cbf8c416b684241f8ed9d96", "diff": "@@ -66,7 +66,7 @@ def get_deployment_pods(deployment):\n \n restarts = None\n age = None\n- if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) < 0:\n+ if returned_pod.status.container_statuses is not None and len(returned_pod.status.container_statuses) > 0:\n first_container = returned_pod.status.container_statuses[0]\n restarts = first_container.restart_count\n age = first_container.restart_count\n", "old_path": "kube_pod.py", "rewrite": "ReplaceText(target='>' @(69,110)->(69,111))"} -{"repo": "https://:@github.com/nectar-cs/k8-kat.git", "hash": "b27ef1a95763299653425c8968aa08d2f59b254e", "diff": "@@ -40,7 +40,7 @@ class StuntPod:\n return self._image\n \n def find(self):\n- return PodHelper.find(self.pod_name, self.namespace)\n+ return PodHelper.find(self.namespace, self.pod_name)\n \n def labels(self):\n return {\"nectar-type\": \"stunt-pod\"}\n", "old_path": "stunt_pods/stunt_pod.py", "rewrite": "ArgSwap(idxs=0<->1 @(43,11)->(43,25))"} -{"repo": "https://:@github.com/nectar-cs/k8-kat.git", "hash": "8a2f45982919c69bc709aa14a16c7a402dcafd4b", "diff": "@@ -26,6 +26,6 @@ class KatServiceAccount(KatRes):\n \n def secrets(self) -> List[any]:\n from k8_kat.res.secret.kat_secret import KatSecret\n- make = lambda sd: KatSecret.find(sd.namespace or self.ns, sd.name)\n+ make = lambda sd: KatSecret.find(sd.name, sd.namespace or self.ns)\n secret_descriptors = self.body().secrets or []\n return [make(secret_desc) for secret_desc in secret_descriptors]\n", "old_path": "k8_kat/res/sa/kat_service_account.py", "rewrite": "ArgSwap(idxs=0<->1 @(29,22)->(29,36))"} -{"repo": "https://:@github.com/nectar-cs/k8-kat.git", "hash": "8a2f45982919c69bc709aa14a16c7a402dcafd4b", "diff": "@@ -12,7 +12,7 @@ class TestKatSvc(ClusterTest):\n test_helper.create_svc(cls.n1, 's1')\n \n def setUp(self) -> None:\n- self.subject: KatSvc = KatSvc.find(self.n1, 's1')\n+ self.subject: KatSvc = KatSvc.find('s1', self.n1)\n \n def test_internal_ip(self):\n self.assertIsNotNone(self.subject.internal_ip)\n", "old_path": "k8_kat/tests/res/svc/test_kat_svc.py", "rewrite": "ArgSwap(idxs=0<->1 @(15,27)->(15,38))"} -{"repo": "https://:@github.com/hlmtre/pybot.git", "hash": "d893f64e69b2d7a8393eacb3620e927f5c7ce10d", "diff": "@@ -155,7 +155,7 @@ class Event:\n self.verb = v\n break\n # channel is unset if it does not begin with #\n- if self.verb == \"PRIVMSG\" and len(self.channel):\n+ if self.verb == \"PRIVMSG\" and not len(self.channel):\n self.is_pm = True\n for s in self.subscribers:\n try:\n", "old_path": "event.py", "rewrite": "ReplaceText(target='not ' @(158,34)->(158,34))"} -{"repo": "https://:@github.com/tboudreaux/vectorpy.git", "hash": "55394cff47bf052127af1a64f0eb9043365864ae", "diff": "@@ -64,7 +64,7 @@ class vector: # Data type name\n return not self.__eq__(other)\n \n def cross(self, other): # Corss product\n- return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y-other.x)\n+ return vector(self.y*other.z - self.z*other.y, self.z*other.x - self.x*other.z, self.x*other.y - self.y*other.x)\n \n def dot(self, other): # dot product\n return self.x*other.x + self.y*other.y + self.z*other.z\n", "old_path": "vectorpy/vector.py", "rewrite": "ReplaceText(target='*' @(67,111)->(67,112))"} -{"repo": "https://:@github.com/detectlabs/aioble.git", "hash": "90e1e234ade4c5fa78df42bc856f3e3a8f571077", "diff": "@@ -116,7 +116,7 @@ async def connect_two():\n cm_all = CentralManager()\n await cm_all.start_scan(scan_callback_all)\n \n- while d_10_device is None and d_5_device is None:\n+ while d_10_device is None or d_5_device is None:\n await asyncio.sleep(.1)\n \n await cm_all.stop_scan()\n", "old_path": "examples/connect.py", "rewrite": "ReplaceText(target='or' @(119,34)->(119,37))"} -{"repo": "https://:@github.com/speezepearson/prpg.git", "hash": "aa36906fdc61e1f57250372d6b7c596c676bc203", "diff": "@@ -27,4 +27,4 @@ def dump_salts(f, salts):\n f.write(payload)\n else:\n with open(f, 'w') as true_f:\n- f.write(payload)\n+ true_f.write(payload)\n", "old_path": "__init__.py", "rewrite": "ReplaceText(target='true_f' @(30,6)->(30,7))"} -{"repo": "https://:@github.com/wehriam/awspider.git", "hash": "cecf24d302f5a2d0f454fecfbb5915f7a4f19ed0", "diff": "@@ -178,4 +178,4 @@ class InterfaceServer(BaseServer):\n \n def _createReservationErrback(self, error, function_name, uuid):\n LOGGER.error(\"Unable to create reservation for %s:%s, %s.\\n\" % (function_name, uuid, error))\n- return uuid\n\\ No newline at end of file\n+ return error\n\\ No newline at end of file\n", "old_path": "awspider/servers2/interface.py", "rewrite": "ReplaceText(target='error' @(181,15)->(181,19))"} -{"repo": "https://:@github.com/combatopera/diapyr.git", "hash": "2deb919498af4943aa18a7281037468809bda2d0", "diff": "@@ -22,7 +22,7 @@ class BinMix(Node):\n self.blockbuf.copybuf(self.tone(self.block))\n if not noiseflag:\n self.blockbuf.orbuf(self.noise(self.block))\n- elif noiseflag:\n+ elif not noiseflag:\n self.blockbuf.copybuf(self.noise(self.block))\n else:\n self.blockbuf.fill(0)\n", "old_path": "pym2149/mix.py", "rewrite": "ReplaceText(target='not ' @(25,9)->(25,9))"} -{"repo": "https://:@github.com/InfluxGraph/graphite-api.git", "hash": "2847d5788bc8adbd8d864a234d7e4cb39210fc29", "diff": "@@ -787,7 +787,7 @@ def file_fetch(fh, fromTime, untilTime, now = None):\n if untilTime > now:\n untilTime = now\n \n- diff = untilTime - fromTime\n+ diff = now - fromTime\n for archive in header['archives']:\n if archive['retention'] >= diff:\n break\n", "old_path": "graphite_api/_vendor/whisper.py", "rewrite": "ReplaceText(target='now' @(790,9)->(790,18))"} -{"repo": "https://:@github.com/JulianKimmig/json_websocket.git", "hash": "188740f4381fea77078950cd5540842f2e3dc75e", "diff": "@@ -11,7 +11,7 @@ def merge(new_values, default_values):\n for key, value in default_values.items():\n nv = new_values.get(key, None)\n if isinstance(value, dict) and isinstance(nv, dict):\n- nd[key] = merge(value, nv)\n+ nd[key] = merge(nv, value)\n else:\n if nv is None:\n nd[key] = value\n", "old_path": "json_websocket/basic/abstract_json_socket.py", "rewrite": "ArgSwap(idxs=0<->1 @(14,22)->(14,27))"} -{"repo": "https://:@github.com/accurrently/evnrg.git", "hash": "b045f854eb398a314608cdd195b114b3a8fa8231", "diff": "@@ -476,7 +476,7 @@ def charge_connected(input_batt, output_batt, fleet, home_bank, away_bank, min_p\n if may_charge:\n pot = (min_per_interval / 60.0) * power\n max_nrg = max_batt * max_soc\n- output_batt[i] = min(current_batt[i] + pot, max_nrg)\n+ output_batt[i] = min(input_batt[i] + pot, max_nrg)\n \n \n @nb.njit(cache=True)\n", "old_path": "evnrg/simulation_nb.py", "rewrite": "ReplaceText(target='input_batt' @(479,33)->(479,45))"} -{"repo": "https://:@github.com/Dominick1993/pyhelm.git", "hash": "f91f0e9216f1436c3671d7eae8920900a398a01d", "diff": "@@ -106,7 +106,7 @@ def from_repo(repo_url, chart, version=None, headers=None):\n _get_from_repo(\n repo_scheme,\n repo_url,\n- url,\n+ fname,\n stream=True,\n headers=headers,\n )\n", "old_path": "pyhelm/repo.py", "rewrite": "ReplaceText(target='fname' @(109,24)->(109,27))"} -{"repo": "https://:@github.com/Dominick1993/pyhelm.git", "hash": "7ce03b8f5b2d35015bf34f6df059d61ee4c57054", "diff": "@@ -106,7 +106,7 @@ def from_repo(repo_url, chart, version=None, headers=None):\n _get_from_repo(\n repo_scheme,\n repo_url,\n- fname,\n+ url,\n stream=True,\n headers=headers,\n )\n", "old_path": "pyhelm/repo.py", "rewrite": "ReplaceText(target='url' @(109,24)->(109,29))"} -{"repo": "https://:@github.com/tazle/bufrpy.git", "hash": "eccb7469feec461e1ede41f8352c3700c7f7a885", "diff": "@@ -66,7 +66,7 @@ def read_tables(b_line_stream, d_line_stream=None):\n constituent_codes = []\n for line in lines:\n l_parts = slices(line, [1,6,1,2,1,6])\n- constituent_codes.append(fxy2int(parts[5]))\n+ constituent_codes.append(fxy2int(l_parts[5]))\n \n descriptors[d_descriptor_code] = LazySequenceDescriptor(d_descriptor_code, constituent_codes, '', table)\n return table\n", "old_path": "bufrpy/table/libbufr.py", "rewrite": "ReplaceText(target='l_parts' @(69,49)->(69,54))"} -{"repo": "https://:@bitbucket.org/mjr129/cluster_searcher.git", "hash": "7af9e61f76366c820fe7bd23b935c2f59fe05c33", "diff": "@@ -250,7 +250,7 @@ def load_taxa( file_name: MOptional[Filename[EXT.TXT]] = None ) -> None:\n raise ValueError( \"load_taxa: Refused because the LECA must be loaded first.\" )\n \n num_clusters, num_taxa = state.leca_file.load_taxa( file_name )\n- MCMD.print( \"{} taxa loaded into {} clusters.\".format( num_clusters, num_taxa ) )\n+ MCMD.print( \"{} taxa loaded into {} clusters.\".format( num_taxa, num_clusters ) )\n \n state.settings.last_taxa = file_name\n \n", "old_path": "cluster_searcher/commands.py", "rewrite": "ArgSwap(idxs=0<->1 @(253,16)->(253,57))"} -{"repo": "https://:@github.com/thadhaines/PSLTDSim.git", "hash": "5dc7e46a081628010935853d830aa82b98e2df69", "diff": "@@ -76,7 +76,7 @@ class tgov1Agent():\n _, y3, self.x3 = sig.lsim(self.sys3, U=uVector, T=self.t, \n X0=[self.r_x1[self.mirror.c_dp-1],self.Gen.r_Pm[self.mirror.c_dp-1]])\n # Addition of damping\n- Pmech = y3 - dwVec*self.Dt # effectively removing the second block...\n+ Pmech = y2 - dwVec*self.Dt # effectively removing the second block...\n \n # Set Generator Mechanical Power\n self.Gen.Pm = float(Pmech[1])\n", "old_path": "psltdsim/dynamicAgents/tgov1Agent.py", "rewrite": "ReplaceText(target='y2' @(79,16)->(79,18))"} -{"repo": "https://:@github.com/rbn42/freetile.git", "hash": "86701ce263f0551e005e9fe5ed11ff03ceb0ce68", "diff": "@@ -45,7 +45,7 @@ class WindowList:\n if name in EXCLUDE_APPLICATIONS:\n continue\n \n- wmclass, minimized = get_wm_class_and_state(winid)\n+ wmclass, minimized = get_wm_class_and_state(win)\n dock = disp.intern_atom('_NET_WM_WINDOW_TYPE_DOCK')\n if dock in ewmh.getWmWindowType(win):\n continue\n", "old_path": "windowlist.py", "rewrite": "ReplaceText(target='win' @(48,56)->(48,61))"} -{"repo": "https://:@github.com/dpays/dpaygo.git", "hash": "5f156fdf5a75367c32d85efb02e456abfa2719f6", "diff": "@@ -714,6 +714,6 @@ class RecentByPath(list):\n comments = []\n for reply in replies:\n post = state[\"content\"][reply]\n- if category is None or (category is not None and post[\"category\"] != category):\n+ if category is None or (category is not None and post[\"category\"] == category):\n comments.append(Comment(post, lazy=True, steem_instance=self.steem))\n super(RecentByPath, self).__init__(comments)\n", "old_path": "beem/comment.py", "rewrite": "ReplaceText(target='==' @(717,78)->(717,80))"} -{"repo": "https://:@github.com/ashinabraham/starlette-bugsnag.git", "hash": "5772b5ab92c63c9f7e397ce976141a92095d2118", "diff": "@@ -11,7 +11,7 @@ class BugsnagMiddleware:\n \n async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:\n if not self._debug:\n- await self.bugsnag_app(scope, send, receive)\n+ await self.bugsnag_app(scope, receive, send)\n return\n await self.app(scope, receive, send)\n \n", "old_path": "starlette_bugsnag/middleware.py", "rewrite": "ArgSwap(idxs=1<->2 @(14,18)->(14,34))"} -{"repo": "https://:@github.com/LowieHuyghe/edmunds.git", "hash": "a0a1669ebbe85c885f4bf1180c82d3c2c475ab61", "diff": "@@ -162,7 +162,7 @@ class EasierSetup(object):\n if value_path.lower().endswith('.md'):\n try:\n import pypandoc\n- value = pypandoc.convert_text(value_path, 'rst', format='md')\n+ value = pypandoc.convert_text(value, 'rst', format='md')\n value = value.replace(\"\\r\", \"\")\n except ImportError:\n print(\"Pandoc not found. Markdown to reStructuredText conversion failed.\")\n", "old_path": "easiersetup.py", "rewrite": "ReplaceText(target='value' @(165,54)->(165,64))"} -{"repo": "https://:@bitbucket.org/suprocktech/asphodel_py.git", "hash": "ccc31dcfd872553cef4cee7f6790ce6d41ed564f", "diff": "@@ -309,7 +309,7 @@ def create_subproxy_util(device, func, proxy_id, identifier, *args, **kwargs):\n subproxy_device = func(device, *args, **kwargs)\n proxy_ids[proxy_id] = subproxy_device\n \n- subproxy_sn = device.get_serial_number()\n+ subproxy_sn = subproxy_device.get_serial_number()\n subproxy_identifier = \"{}->{}\".format(identifier, subproxy_sn)\n device_identifiers[subproxy_device] = subproxy_identifier\n \n", "old_path": "asphodel/proxy.py", "rewrite": "ReplaceText(target='subproxy_device' @(312,22)->(312,28))"} -{"repo": "https://:@github.com/Erotemic/dtool_ibeis.git", "hash": "1be0ef6a963f9ec3409ccbe129b72669a153e222", "diff": "@@ -240,7 +240,7 @@ class DependencyCache(object):\n for args_, kwargs_ in reg_preproc:\n depc._register_prop(*args_, **kwargs_)\n print(' * regsitering %d global algos ' % len(reg_algos))\n- for args_, kwargs_ in reg_preproc:\n+ for args_, kwargs_ in reg_algos:\n depc._register_algo(*args_, **kwargs_)\n \n ut.ensuredir(depc.cache_dpath)\n", "old_path": "dtool/depcache_control.py", "rewrite": "ReplaceText(target='reg_algos' @(243,34)->(243,45))"} -{"repo": "https://:@github.com/Erotemic/dtool_ibeis.git", "hash": "e94087b05c09fc2ebbaba09d55556eb467c77924", "diff": "@@ -2586,7 +2586,7 @@ class SQLDatabaseController(object):\n superkey_index = superkey_colnames_list.index(primary_superkey)\n superkey_paramx = superkey_paramxs_list[superkey_index]\n superkey_colnames = superkey_colnames_list[superkey_index]\n- elif len(superkey_colnames) == 1:\n+ elif len(superkey_colnames_list) == 1:\n superkey_paramx = superkey_paramxs_list[0]\n superkey_colnames = superkey_colnames_list[0]\n else:\n", "old_path": "dtool/sql_control.py", "rewrite": "ReplaceText(target='superkey_colnames_list' @(2589,21)->(2589,38))"} -{"repo": "https://:@github.com/m-laniakea/st_spin.git", "hash": "0f3afc49b40a459947da9c45dc8f715b896f75a1", "diff": "@@ -91,7 +91,7 @@ class SpinDevice:\n :return: Response bytes as int\n \"\"\"\n # payload and payload_size must be either both present, or both absent\n- assert((payload is None) != (payload_size is None))\n+ assert((payload is None) == (payload_size is None))\n \n response = self._write(command)\n \n", "old_path": "stspin/spin_device.py", "rewrite": "ReplaceText(target='==' @(94,33)->(94,35))"} -{"repo": "https://:@github.com/pbromwelljr/gnewcash.git", "hash": "340c6ca3b08b6389cc369878c960e2398b7f444a", "diff": "@@ -38,7 +38,7 @@ class Slot:\n slot_value_node.text = str(self.value)\n elif type(self.value) is list and self.value:\n for sub_slot in self.value:\n- slot_node.append(sub_slot.as_xml)\n+ slot_value_node.append(sub_slot.as_xml)\n elif self.type == 'frame':\n pass # Empty frame element, just leave it\n else:\n", "old_path": "gnewcash/slot.py", "rewrite": "ReplaceText(target='slot_value_node' @(41,16)->(41,25))"} -{"repo": "https://:@github.com/skibblenybbles/django-grunt.git", "hash": "51fa1ede65b294e4610c85329293af6280be3783", "diff": "@@ -14,4 +14,4 @@ class GruntConfigMixin(object):\n def grunt_config(self, config=None, key=None):\n return grunt_conf(\n config={} if config is None else config,\n- key=key if key is None else self.grunt_config_key)\n+ key=key if key is not None else self.grunt_config_key)\n", "old_path": "grunt/views/mixins.py", "rewrite": "ReplaceText(target=' is not ' @(17,26)->(17,30))"} -{"repo": "https://:@github.com/blixt/py-starbound.git", "hash": "3563ff68b92dcf675adb5a861c61b02fc9e34b23", "diff": "@@ -103,7 +103,7 @@ class LeafReader(object):\n def read(self, length):\n offset = self._offset\n \n- if offset + length < len(self._leaf.data):\n+ if offset + length <= len(self._leaf.data):\n self._offset += length\n return self._leaf.data[offset:offset + length]\n \n", "old_path": "sbbf02.py", "rewrite": "ReplaceText(target='<=' @(106,27)->(106,28))"} -{"repo": "https://:@github.com/chrisrink10/basilisp.git", "hash": "fbbc1c14b1e223aa22530a27d1013d97c61469c7", "diff": "@@ -61,7 +61,7 @@ def bootstrap_repl(which_ns: str) -> types.ModuleType:\n assert core_ns is not None\n ns.refer_all(core_ns)\n repl_module = importlib.import_module(REPL_NS)\n- ns.add_alias(sym.symbol(REPL_NS), repl_ns)\n+ ns.add_alias(repl_ns, sym.symbol(REPL_NS))\n ns.refer_all(repl_ns)\n return repl_module\n \n", "old_path": "src/basilisp/cli.py", "rewrite": "ArgSwap(idxs=0<->1 @(64,4)->(64,16))"} -{"repo": "https://:@github.com/chrisrink10/basilisp.git", "hash": "fbbc1c14b1e223aa22530a27d1013d97c61469c7", "diff": "@@ -420,7 +420,7 @@ class TestResolveAlias:\n \n foo_ns_sym = sym.symbol(\"zux.bar.foo\")\n foo_ns = get_or_create_ns(foo_ns_sym)\n- ns.add_alias(sym.symbol(\"foo\"), foo_ns)\n+ ns.add_alias(foo_ns, sym.symbol(\"foo\"))\n assert sym.symbol(\n \"aliased-var\", ns=foo_ns_sym.name\n ) == runtime.resolve_alias(sym.symbol(\"aliased-var\", ns=\"foo\"), ns=ns)\n", "old_path": "tests/basilisp/runtime_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(423,12)->(423,24))"} -{"repo": "https://:@github.com/Blaok/haoda.git", "hash": "66f4f1324648468e2e541ffb9ff37816490a4aca", "diff": "@@ -365,7 +365,7 @@ def print_kernel_xml(name: str, args: Iterable[Arg], kernel_xml: TextIO):\n size=size,\n offset=0 if is_stream else offset,\n host_size=host_size).rstrip('\\n')\n- if is_stream:\n+ if not is_stream:\n offset += size + 4\n hw_ctrl_protocol = 'ap_ctrl_none'\n if has_s_axi_control:\n", "old_path": "haoda/backend/xilinx.py", "rewrite": "ReplaceText(target='not ' @(368,7)->(368,7))"} -{"repo": "https://:@github.com/domokane/FinancePy.git", "hash": "0d71c33594ac248aeb473165ebfd0ae73dea5cab", "diff": "@@ -155,7 +155,7 @@ class FinCalendar(object):\n m = dt._m\n d = dt._d\n \n- startDate = FinDate(y, 1, 1)\n+ startDate = FinDate(1, 1, y)\n dd = dt._excelDate - startDate._excelDate + 1\n weekday = dt._weekday\n \n", "old_path": "financepy/finutils/FinCalendar.py", "rewrite": "ArgSwap(idxs=0<->2 @(158,20)->(158,27))"} -{"repo": "https://:@github.com/domokane/FinancePy.git", "hash": "e4edf39a2f8aa1caa804a63d7058c66dc458aefc", "diff": "@@ -94,7 +94,7 @@ def buildIborCurve(tradeDate):\n dcType)\n swaps.append(swap5)\n \n- liborCurve = FinIborSingleCurve(settlementDate, depos, fras, swaps)\n+ liborCurve = FinIborSingleCurve(valuationDate, depos, fras, swaps)\n \n return liborCurve\n \n", "old_path": "tests/TestFinCDSBasket.py", "rewrite": "ReplaceText(target='valuationDate' @(97,36)->(97,50))"} -{"repo": "https://:@github.com/pypr/automan.git", "hash": "55ada630a37e2dfcecebd69fef20d62eddb8d402", "diff": "@@ -310,7 +310,7 @@ class TestScheduler(unittest.TestCase):\n # Then\n self.assertEqual(len(s.workers), 2)\n count = 0\n- while proxy.status() != 'done' and count < 10:\n+ while proxy1.status() != 'done' and count < 10:\n time.sleep(0.1)\n count += 1\n \n", "old_path": "automan/tests/test_jobs.py", "rewrite": "ReplaceText(target='proxy1' @(313,14)->(313,19))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "66dacd9725338a5f49d12ccee0e0ec8f9e5f8068", "diff": "@@ -68,7 +68,7 @@ class Task(TaskModel):\n def __init__(self, job, frame, parent_task=None, state=None,\n priority=None, attempts=None, agent=None):\n # build parent job id\n- if not modelfor(job, TABLE_JOB):\n+ if modelfor(job, TABLE_JOB):\n jobid = job.jobid\n if jobid is None:\n raise ValueError(\"`job` with null id provided\")\n", "old_path": "models/task.py", "rewrite": "ReplaceText(target='' @(71,11)->(71,15))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "47a4cc9232a09974dea7f246b96d0338a4a4339b", "diff": "@@ -116,5 +116,5 @@ class Task(TaskModel):\n if priority is not None:\n self.priority = priority\n \n- if attempts is None:\n+ if attempts is not None:\n self.attempts = attempts\n", "old_path": "models/task.py", "rewrite": "ReplaceText(target=' is not ' @(119,19)->(119,23))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "10b2c473daa02e8feed96c41cd929a8861b39286", "diff": "@@ -88,7 +88,7 @@ def skip(should_skip, reason):\n def wrapper(func):\n @wraps(func)\n def wrapped_func(*args, **kwargs):\n- if not should_skip:\n+ if should_skip:\n raise SkipTest(reason)\n return func(*args, **kwargs)\n return wrapped_func\n", "old_path": "pyfarm/agent/testutil.py", "rewrite": "ReplaceText(target='' @(91,15)->(91,19))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "1f7a8e553f328860c1f268a668b1d216311e017e", "diff": "@@ -337,7 +337,7 @@ class TypeChecks(object):\n if not isinstance(value, STRING_TYPES):\n raise TypeError(\"Expected a string for `value`\")\n \n- if environment is not None or not isinstance(environment, dict):\n+ if environment is not None and not isinstance(environment, dict):\n raise TypeError(\"Expected None or a dictionary for `environment`\")\n \n def _check_map_path_inputs(self, path):\n", "old_path": "pyfarm/jobtypes/core/internals.py", "rewrite": "ReplaceText(target='and' @(340,35)->(340,37))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "01522e772abfd9c63be8afe679b4293454c1d3fb", "diff": "@@ -214,6 +214,6 @@ class Assign(APIResource):\n # are handled internally in this case.\n jobtype_loader = JobType.load(request_data)\n jobtype_loader.addCallback(loaded_jobtype, assignment_uuid)\n- jobtype_loader.addErrback(assignment_stopped, assignment_uuid)\n+ jobtype_loader.addErrback(assignment_failed, assignment_uuid)\n \n return NOT_DONE_YET\n", "old_path": "pyfarm/agent/http/api/assign.py", "rewrite": "ReplaceText(target='assignment_failed' @(217,34)->(217,52))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "0a73697606f24b15de2a83cbbe226e399a4a9fb7", "diff": "@@ -348,7 +348,7 @@ class TestCase(_TestCase):\n msg, '%s not less than or equal to %s' % (a, b)))\n \n def assertGreaterEqual(self, a, b, msg=None):\n- if not a <= b:\n+ if not a >= b:\n self.fail(\n self._formatMessage(\n msg, '%s not greater than or equal to %s' % (a, b)))\n", "old_path": "pyfarm/agent/testutil.py", "rewrite": "ReplaceText(target='>=' @(351,21)->(351,23))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-agent.git", "hash": "8e2efd42e030089ef0afa266c89e34ed3d2b7a87", "diff": "@@ -158,7 +158,7 @@ class Assign(APIResource):\n request.finish()\n return NOT_DONE_YET\n # If there is only a partial overlap\n- elif existing_task_ids ^ new_task_ids:\n+ elif existing_task_ids & new_task_ids:\n logger.error(\"Rejecting assignment with partial overlap with \"\n \"existing assignment.\")\n unknown_task_ids = new_task_ids - existing_task_ids\n", "old_path": "pyfarm/agent/http/api/assign.py", "rewrite": "ReplaceText(target='&' @(161,35)->(161,36))"} -{"repo": "https://:@github.com/aliok/trnltk.git", "hash": "025fc45d062d902d8c5567b36eaf3b832c5a296e", "diff": "@@ -218,7 +218,7 @@ class DoesntHaveRootAttributes(SuffixFormCondition):\n transitions = filter(lambda transition : not isinstance(transition.suffix_form_application.suffix_form.suffix, ZeroTransitionSuffix), transitions)\n transitions = filter(lambda transition : transition.suffix_form_application.applied_suffix_form, transitions)\n \n- if not transitions:\n+ if transitions:\n return True\n \n if not parse_token.stem.dictionary_item.attributes:\n", "old_path": "trnltk/suffixgraph/suffixconditions.py", "rewrite": "ReplaceText(target='' @(221,11)->(221,15))"} -{"repo": "https://:@github.com/aliok/trnltk.git", "hash": "46c9051f744ef8ce1b9f001281da68257693e20a", "diff": "@@ -89,7 +89,7 @@ class MockMorphemeContainerBuilder(object):\n def lexeme(self, lemma_root_str, lemma_root_syntactic_category=None, lemma_root_secondary_syntactic_category=None):\n self.lemma_root_str = lemma_root_str\n self.lemma_root_syntactic_category = lemma_root_syntactic_category\n- self.lemma_root_secondary_syntactic_category = lemma_root_syntactic_category\n+ self.lemma_root_secondary_syntactic_category = lemma_root_secondary_syntactic_category\n \n return self\n \n", "old_path": "trnltk/morphology/contextful/variantcontiguity/parsecontext.py", "rewrite": "ReplaceText(target='lemma_root_secondary_syntactic_category' @(92,55)->(92,84))"} -{"repo": "https://:@github.com/dgaston/ddbio-ngsflow.git", "hash": "fb220e0eba9a51929c032b6801c2c626f084dc3f", "diff": "@@ -151,7 +151,7 @@ def sambamba_coverage_summary(job, config, samples, outfile):\n for sample in samples:\n output.write(\"\\t{samp_reads}\"\n \"\\t{s_perc1}\"\n- \"\\t{s_perc1}\".format(samp_reads=amplicon[amplicon][sample],\n+ \"\\t{s_perc1}\".format(samp_reads=amplicon_coverage[amplicon][sample],\n s_perc1=amplicon_coverage[amplicon][\"{}_percent_{}\".format(sample, config['coverage_threshold'])],\n s_perc2=amplicon_coverage[amplicon][\"{}_percent_{}\".format(sample, config['coverage_threshold1'])]))\n \n", "old_path": "ddb_ngsflow/utils/utilities.py", "rewrite": "ReplaceText(target='amplicon_coverage' @(154,61)->(154,69))"} -{"repo": "https://:@github.com/dlamotte/statsd-ostools.git", "hash": "531f3f6f2704fc5fa52d0316a5e00e4abfecf6d1", "diff": "@@ -64,7 +64,7 @@ def main():\n for workerklass in worker.workers:\n pid = os.fork()\n kids.append(pid)\n- if pid != 0:\n+ if pid == 0:\n sys.exit(workerklass(statsd, opts.interval).run())\n \n while not SIGNALED:\n", "old_path": "statsd_ostools/cmd.py", "rewrite": "ReplaceText(target='==' @(67,15)->(67,17))"} -{"repo": "https://:@github.com/ipal0/modbus.git", "hash": "19458ca84601917e7d7721b03dce8aa647d20065", "diff": "@@ -60,7 +60,7 @@ class client:\n \t\tif FC == 5 or FC == 15:\n \t\t\tLEN = len(VAL) * 8\n \t\telse:\n-\t\t\tLEN = len(VAL) / 2\n+\t\t\tLEN = len(VAL) // 2\n \t\tlLEN = LEN & 0x00FF\n \t\tmLEN = LEN >> 8\n \t\tif self.TID < 255: \n", "old_path": "client.py", "rewrite": "ReplaceText(target='//' @(63,18)->(63,19))"} -{"repo": "https://:@github.com/CTPUG/pyntnclick.git", "hash": "cde45aba4aee72d730343a89cc4975c29f2a4059", "diff": "@@ -37,7 +37,7 @@ class Widget(object):\n def event(self, ev):\n \"Don't override this without damn good reason\"\n if self.disabled or not self.visible:\n- return True\n+ return False\n \n type_ = ev.type\n if type_ == USEREVENT:\n", "old_path": "pyntnclick/widgets/base.py", "rewrite": "ReplaceText(target='False' @(40,19)->(40,23))"} -{"repo": "https://:@github.com/MakersF/LoLScraper.git", "hash": "b2435d9938a6cc7e0cf49ace811f353cfd7e648c", "diff": "@@ -82,7 +82,7 @@ def download_matches(store_callback, seed_players, minimum_tier = Tier.bronze,\n # Iterate until matches_in_time_slice is big enough, and stop anyways after matches_per_time_slice iterations\n # this ensures the script will always terminate even in strange situations\n # (like when all our seeds have no matches in the time slice)\n- for _ in takewhile(lambda x: matches_in_time_slice >= matches_per_time_slice, range(matches_per_time_slice)):\n+ for _ in takewhile(lambda x: matches_in_time_slice <= matches_per_time_slice, range(matches_per_time_slice)):\n for tier in Tier:\n for player_id, _ in zip(players_to_analyze.consume(tier), range(10)):\n match_list = get_match_list(player_id, begin_time=time_slice.begin, end_time=time_slice.end, ranked_queues=queue.name)\n", "old_path": "TeamComp/main.py", "rewrite": "ReplaceText(target='<=' @(85,63)->(85,65))"} -{"repo": "https://:@github.com/MakersF/LoLScraper.git", "hash": "9f39aab22be4783620f0d458f13e0b782d65bd2b", "diff": "@@ -205,7 +205,7 @@ def download_matches(match_downloaded_callback, end_of_time_slice_callback, conf\n random.random() < EVICTION_RATE}\n \n # When a new patch is released, we can clear all the analyzed players and downloaded_matches if minimum_patch == 'latest'\n- if conf['minimum_patch'].lower() != LATEST and get_patch_changed():\n+ if conf['minimum_patch'].lower() == LATEST and get_patch_changed():\n analyzed_players = set()\n downloaded_matches = set()\n \n", "old_path": "lol_scraper/match_downloader.py", "rewrite": "ReplaceText(target='==' @(208,53)->(208,55))"} -{"repo": "https://:@gitlab.com/claudiop/CLIPy.git", "hash": "cf2bbbfc3877368c493ba97e8ffe3cd0d8e0875d", "diff": "@@ -55,7 +55,7 @@ def get_course_activity_years(page):\n year = int(urls.YEAR_EXP.findall(year_link.attrs['href'])[0])\n if first is None or year < first:\n first = year\n- if last is None or year < last:\n+ if last is None or year > last:\n last = year\n return first, last\n \n", "old_path": "CLIPy/parser.py", "rewrite": "ReplaceText(target='>' @(58,32)->(58,33))"} -{"repo": "https://:@github.com/pyserial/pyparallel.git", "hash": "14213e1c7dda2d62d952305ce0a116f86f77bae2", "diff": "@@ -221,7 +221,7 @@ class Win32Serial(SerialBase):\n if n > 0:\n buf = ctypes.create_string_buffer(n)\n rc = win32.DWORD()\n- err = win32.ReadFile(self.hComPort, buf, size, ctypes.byref(rc), ctypes.byref(self._overlappedRead))\n+ err = win32.ReadFile(self.hComPort, buf, n, ctypes.byref(rc), ctypes.byref(self._overlappedRead))\n if not err and win32.GetLastError() != win32.ERROR_IO_PENDING:\n raise SerialException(\"ReadFile failed (%s)\" % ctypes.WinError())\n err = win32.WaitForSingleObject(self._overlappedRead.hEvent, win32.INFINITE)\n", "old_path": "pyserial/serial/serialwin32.py", "rewrite": "ReplaceText(target='n' @(224,61)->(224,65))"} -{"repo": "https://:@github.com/dschick/udkm1Dsim.git", "hash": "1760819d1df4cb50af1f925c1c3df39c9b7ee020", "diff": "@@ -94,7 +94,7 @@ def finderb_nest(key, vector):\n # if the key is smaller than the first element of the\n # vector we return 1\n if key < vector[0]:\n- return 1\n+ return 0\n \n while (b-a) > 1: # loop until the intervall is larger than 1\n c = int(np.floor((a+b)/2)) # center of intervall\n", "old_path": "udkm1Dsim/helpers.py", "rewrite": "ReplaceText(target='0' @(97,15)->(97,16))"} -{"repo": "https://:@github.com/orsinium/pros.git", "hash": "9ba4c47e7b9283e5dfe209a31ddcda0bc3b1bfbf", "diff": "@@ -70,7 +70,7 @@ class Catalog:\n if command:\n return self._register(name, command)\n else:\n- return partial(self._register, command)\n+ return partial(self._register, name)\n \n def _register(self, name, command):\n if name in self.commands:\n", "old_path": "pipecli/core.py", "rewrite": "ReplaceText(target='name' @(73,43)->(73,50))"} -{"repo": "https://:@github.com/ShaneKent/PyEventLogViewer.git", "hash": "f97696fbe0a5bb94461ccfa2951667ab788aefd5", "diff": "@@ -53,7 +53,7 @@ def xml_convert(records, file_hash, recovered=True):\n \n sys = d['Event']['System']\n \n- dictionary = parser(record, {\n+ dictionary = parser(d, {\n 'timestamp_utc': sys['TimeCreated']['@SystemTime'],\n 'event_id': sys['EventID'],\n 'description': '',\n", "old_path": "winlogtimeline/collector/collect.py", "rewrite": "ReplaceText(target='d' @(56,28)->(56,34))"} -{"repo": "https://:@github.com/BlackEarth/bsql.git", "hash": "76eb385fb3dd8774e2689e2d661ae1338754525c", "diff": "@@ -58,7 +58,7 @@ class Database(Dict):\n elif isinstance(self.adaptor, str):\r\n self.adaptor = importlib.import_module(self.adaptor)\r\n \r\n- if self.connection_string is None:\r\n+ if self.connection_string is not None:\r\n if self.adaptor.__name__ == 'psycopg2':\r\n self.pool = importlib.import_module('psycopg2.pool').ThreadedConnectionPool(\r\n self.minconn or 1, self.maxconn or 1, self.connection_string or ''\r\n", "old_path": "bsql/database.py", "rewrite": "ReplaceText(target=' is not ' @(61,37)->(61,41))"} -{"repo": "https://:@github.com/Pushkar-Singh-14/Polygon-Analysis.git", "hash": "b66ac7e004c04178e8a0e84fd2363b4057b4a878", "diff": "@@ -50,7 +50,7 @@ def polygon_analysis(file_name,\n background = Image.new('RGBA', (bigside, bigside), (255, 255, 255, 255))\n offset = (0,0)\n background.paste(image, offset)\n- file_name2=f'{width_old*2}X{height_old*2}_{file_name}.png'\n+ file_name2=f'{width_old*2}X{height_old*2}_{name_file}.png'\n save_image=os.path.join(cwd,file_name2)\n save_image_in_data=os.path.join(path_save,file_name2)\n \n", "old_path": "py2pyPolygonAnalysis.py", "rewrite": "ReplaceText(target='name_file' @(53,47)->(53,56))"} -{"repo": "https://:@github.com/awiddersheim/github-release-cicd.git", "hash": "05ba9a8f3fea49778cf729dbd82594437b5db5e0", "diff": "@@ -89,7 +89,7 @@ def create(repo, tag, name, message, draft, prerelease, target, assets):\n \n release = repo.create_git_release(\n tag=tag,\n- name=tag,\n+ name=name,\n message=message,\n target_commitish=target,\n prerelease=prerelease,\n", "old_path": "github_release_cicd/cli.py", "rewrite": "ReplaceText(target='name' @(92,13)->(92,16))"} -{"repo": "https://:@github.com/jeiros/msmadapter.git", "hash": "92a42219549fa6cab93250d4c961a72c0fc3de20", "diff": "@@ -289,7 +289,7 @@ class App(object):\n \n def run_local_GPU(self, folders_glob):\n bash_cmd = \"export CUDA_VISIBLE_DEVICES=0\"\n- if len(glob(folders_glob)) != (self.ngpus - self.gpus_in_use):\n+ if len(glob(folders_glob)) > (self.ngpus - self.gpus_in_use):\n raise ValueError(\"Cannot run jobs of {} folders as only {} GPUs are available\".format(len(glob(folders_glob)), self.ngpus - self.gpus_in_use))\n \n for folder in glob(folders_glob):\n", "old_path": "msmadapter/adaptive.py", "rewrite": "ReplaceText(target='>' @(292,35)->(292,37))"} -{"repo": "https://:@github.com/thoth-station/build-analysers.git", "hash": "7bd3caaf26018c4fd5fea647a53c82aa7919e25a", "diff": "@@ -167,7 +167,7 @@ def build_breaker_predict(\n if reverse_scores: # reverse the scores\n scores = 1 / (scores * np.max(1 / scores))\n \n- return np.vstack([winner_scores, winner_indices])\n+ return np.vstack([scores, winner_indices])\n \n \n def build_breaker_analyze(log: str, *, colorize: bool = True):\n", "old_path": "thoth/build_analysers/analysis.py", "rewrite": "ReplaceText(target='scores' @(170,22)->(170,35))"} -{"repo": "https://:@github.com/lcvriend/humannotator.git", "hash": "e39c518621d12bd7e91e9847a05df1c0b75ff0eb", "diff": "@@ -280,6 +280,6 @@ if __name__ == '__main__':\n )\n \n # run annotator\n- annotator = Annotator([task1, task2], data)\n+ annotator = Annotator(data, [task1, task2])\n annotator(data.ids)\n print(annotator.annotated)\n", "old_path": "humannotator/humannotator.py", "rewrite": "ArgSwap(idxs=0<->1 @(283,16)->(283,25))"} -{"repo": "https://:@github.com/paulsbond/autocoord.git", "hash": "688d05f50a4c1ded44fdd3d0309fbeaadf762807", "diff": "@@ -88,7 +88,7 @@ class Pipeline():\n def refmac(self, cycles):\n directory = self.job_directory(\"refmac\")\n use_phases = self.args.unbiased and self.min_rwork > 0.35\n- job = Refmac(self.args, directory, self.current_xyz, use_phases, cycles)\n+ job = Refmac(self.args, directory, self.current_xyz, cycles, use_phases)\n self.jobs[self.cycle].append(job)\n self.current_hkl = job.hklout\n self.current_xyz = job.xyzout\n", "old_path": "modelcraft/pipeline.py", "rewrite": "ArgSwap(idxs=3<->4 @(91,14)->(91,20))"} -{"repo": "https://:@github.com/cyril-s/aptly-ctl.git", "hash": "b7e01c735809dca6ff0ed428d6f3062f5a2c1b86", "diff": "@@ -54,7 +54,7 @@ class PackageRef:\n \n @property\n def dir_ref(self):\n- return \"{}_{}_{}\".format(self.name, self.arch, self.version)\n+ return \"{}_{}_{}\".format(self.name, self.version, self.arch)\n \n \n def __repr__(self):\n", "old_path": "didww_aptly_ctl/utils/PackageRef.py", "rewrite": "ArgSwap(idxs=1<->2 @(57,15)->(57,32))"} -{"repo": "https://:@github.com/south-coast-science/scs_analysis.git", "hash": "fd6148dff62ed13b561cddcce7fe9fd3fbc62532", "diff": "@@ -244,7 +244,7 @@ if __name__ == '__main__':\n while cmd.fill:\n filler = generator.next_localised_datetime(filler)\n \n- if filler == checkpoint:\n+ if filler >= checkpoint:\n break\n \n print(JSONify.dumps(aggregate.report(filler)))\n", "old_path": "src/scs_analysis/sample_aggregate.py", "rewrite": "ReplaceText(target='>=' @(247,30)->(247,32))"} -{"repo": "https://:@github.com/txels/incywincy.git", "hash": "cf0cdbbf2a52ee70b8369f503d3983bd97d8db03", "diff": "@@ -14,7 +14,7 @@ THRESHOLD = 1\n \n \n def log(page, message, level=WARNING):\n- if level > THRESHOLD:\n+ if level >= THRESHOLD:\n print(\">> {0}: {1} | {2}\".format(CRITICALITY[level], message, page.url))\n \n \n", "old_path": "incywincy/report.py", "rewrite": "ReplaceText(target='>=' @(17,13)->(17,14))"} -{"repo": "https://:@github.com/oakeyc/azure-cli-interactive-shell.git", "hash": "10de31097e20cab16a5edce1b043416cc0932d69", "diff": "@@ -171,7 +171,7 @@ def create_layout(lex, examLex, toolbarLex):\n Window(\n content=BufferControl(\n buffer_name='symbols',\n- lexer=lexer\n+ lexer=examLex\n )\n ),\n filter=ShowSymbol()\n", "old_path": "azclishell/layout.py", "rewrite": "ReplaceText(target='examLex' @(174,30)->(174,35))"} -{"repo": "https://:@github.com/sage-home/sage-analysis.git", "hash": "4fb6b2ca074cc5afc8d993ba63ce77f685065351", "diff": "@@ -129,7 +129,7 @@ def generate_func_dict(\n # No extra arguments for this.\n key_args = {}\n \n- func_dict[func_name] = (func, key_args)\n+ func_dict[toggle] = (func, key_args)\n \n return func_dict\n \n", "old_path": "sage_analysis/utils.py", "rewrite": "ReplaceText(target='toggle' @(132,22)->(132,31))"} -{"repo": "https://:@github.com/dhess/lobbyists.git", "hash": "8877cfa738b78dc77ed40533e5f4c7f2b14d95b7", "diff": "@@ -785,7 +785,7 @@ def _import_list(entities, id, filing, cur):\n importer, entity_id = _list_importers[id]\n db_keys = list()\n for entity in entities:\n- db_keys.append(importer(entity[entity_id], id, filing, cur))\n+ db_keys.append(importer(entity[entity_id], entity_id, filing, cur))\n return db_keys\n \n \n", "old_path": "lobbyists/lobbyists.py", "rewrite": "ReplaceText(target='entity_id' @(788,51)->(788,53))"} -{"repo": "https://:@github.com/yedivanseven/PLSA.git", "hash": "12eeb77e941cb7153b009f07104eb3b6f1c99911", "diff": "@@ -76,7 +76,7 @@ class BasePLSA:\n def __rel_change(self, new: float) -> float:\n if self._likelihoods:\n old = self._likelihoods[-1]\n- return abs((new - old) / old)\n+ return abs((new - old) / new)\n return inf\n \n def _result(self) -> PlsaResult:\n", "old_path": "plsa/algorithms/base.py", "rewrite": "ReplaceText(target='new' @(79,37)->(79,40))"} -{"repo": "https://:@github.com/omarryhan/sanic-cookies.git", "hash": "93f915b30b664918ed0877e2ca75c66922fb1c72", "diff": "@@ -29,7 +29,7 @@ class MockApp:\n if attach_to == 'request':\n self.req_middleware.append(middleware)\n elif attach_to == 'response':\n- self.res_middleware = [attach_to] + self.res_middleware\n+ self.res_middleware = [middleware] + self.res_middleware\n \n class MockSession(Session):\n def __init__(self, app=MockApp(), master_interface=MockInterface(), *args, **kwargs):\n", "old_path": "tests/common.py", "rewrite": "ReplaceText(target='middleware' @(32,35)->(32,44))"} -{"repo": "https://:@github.com/Warths/pyTwitchIRC.git", "hash": "8095007fc0d6eb1242b7f845b95b44d77349a2cc", "diff": "@@ -350,7 +350,7 @@ class IRC:\n # request channel join\n def join(self, channel: str):\n channels = list(self.channels)\n- if channel in channels:\n+ if channel not in channels:\n self.__to_join.append((channel, 0, time.time()))\n else:\n self.__warning('Already connected to channel {}, connection aborted'.format(channel))\n", "old_path": "irc.py", "rewrite": "ReplaceText(target=' not in ' @(353,18)->(353,22))"} -{"repo": "https://:@github.com/Warths/pyTwitchIRC.git", "hash": "0088b156487239166a21466917d36b6b61e83bc8", "diff": "@@ -412,7 +412,7 @@ class IRC:\n # send a packet and log it[, obfuscate after a certain index][, ignore the throttling cap]\n def __send(self, packet, obfuscate_after=None, ignore_throttle=0):\n # verify throttling status\n- if self.__anti_throttle() or ignore_throttle:\n+ if self.__anti_throttle() or not ignore_throttle:\n # verify socket instance\n if self.__wait_for_status(0):\n self.__socket.send(packet.encode('UTF-8'))\n", "old_path": "irc.py", "rewrite": "ReplaceText(target='not ' @(415,37)->(415,37))"} -{"repo": "https://:@github.com/Warths/pyTwitchIRC.git", "hash": "6321f5177fa2b2f54f40f77a1aaed486f28cd6da", "diff": "@@ -451,7 +451,7 @@ class IRC:\n # send a message to a channel and prevent sending to disconnected channels\n def __send_message(self) -> None:\n # if there is message to send and socket ready and socket not throttling\n- if len(self.__to_send) > 0 and self.__wait_for_status() and not self.__anti_throttle():\n+ if len(self.__to_send) > 0 and self.__wait_for_status() and self.__anti_throttle():\n # retrieve the first message to send\n item = self.__to_send.pop(0)\n channel = item[0]\n", "old_path": "irc.py", "rewrite": "ReplaceText(target='' @(454,68)->(454,72))"} -{"repo": "https://:@github.com/All-less/trace-generator.git", "hash": "54a30158f1a22cbe8195a921495592e39875159c", "diff": "@@ -36,5 +36,5 @@ def iter_job(task_file, instance_file):\n while next_task[JOB_ID] != '':\n arrive_at, task_lines, instance_lines = next_task[ARR_TIME], [ next_task[REST] ], [ next_instance[REST] ]\n next_task = read_lines(task_file, next_task[JOB_ID], task_lines)\n- next_instance = read_lines(instance_file, next_task[JOB_ID], instance_lines)\n+ next_instance = read_lines(instance_file, next_instance[JOB_ID], instance_lines)\n yield float(arrive_at), { 'tasks': task_lines, 'instances': instance_lines }\n", "old_path": "spar/io.py", "rewrite": "ReplaceText(target='next_instance' @(39,50)->(39,59))"} -{"repo": "https://:@github.com/brandonschabell/models.git", "hash": "d0b6a34bb0dbd981e3785661f04f04cde9c4222b", "diff": "@@ -107,7 +107,7 @@ def run_mnist_eager(flags_obj):\n \n # Automatically determine device and data_format\n (device, data_format) = ('/gpu:0', 'channels_first')\n- if flags_obj.no_gpu or tf.test.is_gpu_available():\n+ if flags_obj.no_gpu or not tf.test.is_gpu_available():\n (device, data_format) = ('/cpu:0', 'channels_last')\n # If data_format is defined in FLAGS, overwrite automatically set value.\n if flags_obj.data_format is not None:\n", "old_path": "official/mnist/mnist_eager.py", "rewrite": "ReplaceText(target='not ' @(110,25)->(110,25))"} -{"repo": "https://:@github.com/hoh/Billabong.git", "hash": "43e4c8a9a42662dde86057a4cdb5d44ab577bd1a", "diff": "@@ -46,7 +46,7 @@ def copy_and_encrypt(filepath, key):\n source_file.close()\n dest_file.close()\n \n- storage.import_blob(open(tmp_destination, 'rb'), id_)\n+ storage.import_blob(id_, open(tmp_destination, 'rb'))\n os.remove(tmp_destination)\n \n return enc_hash.hexdigest()\n", "old_path": "diss/encryption.py", "rewrite": "ArgSwap(idxs=0<->1 @(49,4)->(49,23))"} -{"repo": "https://:@github.com/mkirchner/pockyll.git", "hash": "fa6b9fb6f2e939e9cbe551db3c7fb4b7b2bf2637", "diff": "@@ -133,7 +133,7 @@ def get_list(config):\n \n def create_linkpost(config, item_id, title, url, timestamp, is_draft=True):\n path = ''\n- if is_draft:\n+ if not is_draft:\n path = config.get(\"linkpost_post_dir\", \"_posts/linkposts\")\n else:\n path = config.get(\"linkpost_draft_dir\", \"_drafts/linkposts\")\n", "old_path": "pockyll.py", "rewrite": "ReplaceText(target='not ' @(136,7)->(136,7))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "6d34a00cee5b033bf285994af739a09419e447a2", "diff": "@@ -89,8 +89,8 @@ class Metadata(object):\n if keyspace in cf_def_rows:\n for table_row in cf_def_rows[keyspace]:\n table_meta = self._build_table_metadata(\n- keyspace_meta, table_row, col_def_rows[keyspace])\n- keyspace.tables[table_meta.name] = table_meta\n+ keyspace_meta, table_row, col_def_rows[keyspace])\n+ keyspace_meta.tables[table_meta.name] = table_meta\n \n def _build_keyspace_metadata(self, row):\n name = row[\"keyspace_name\"]\n", "old_path": "cassandra/metadata.py", "rewrite": "ReplaceText(target='keyspace_meta' @(93,20)->(93,28))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "c7a77b8862551e73fd09b749316c422eee7a2308", "diff": "@@ -26,7 +26,7 @@ class RoundRobinPolicy(LoadBalancingPolicy):\n \n def populate(self, cluster, hosts):\n self._live_hosts = set(hosts)\n- if len(hosts) == 1:\n+ if len(hosts) <= 1:\n self._position = 0\n else:\n self._position = randint(0, len(hosts) - 1)\n", "old_path": "cassandra/policies.py", "rewrite": "ReplaceText(target='<=' @(29,22)->(29,24))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "2984ba71634e5c3d4b23bb42a977401ca60ffc01", "diff": "@@ -230,7 +230,7 @@ class BaseModel(object):\n 'unrecognized polymorphic key {} for class {}'.format(poly_key, poly_base.__name__)\n )\n \n- if not issubclass(klass, poly_base):\n+ if not issubclass(klass, cls):\n raise PolyMorphicModelException(\n '{} is not a subclass of {}'.format(klass.__name__, poly_base.__name__)\n )\n", "old_path": "cqlengine/models.py", "rewrite": "ReplaceText(target='cls' @(233,37)->(233,46))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "5dc9e971267c2072c60ae9271c6e230813f72e15", "diff": "@@ -232,7 +232,7 @@ class BaseModel(object):\n \n if not issubclass(klass, cls):\n raise PolyMorphicModelException(\n- '{} is not a subclass of {}'.format(klass.__name__, poly_base.__name__)\n+ '{} is not a subclass of {}'.format(klass.__name__, cls.__name__)\n )\n \n field_dict = {k: v for k, v in field_dict.items() if k in klass._columns.keys()}\n", "old_path": "cqlengine/models.py", "rewrite": "ReplaceText(target='cls' @(235,72)->(235,81))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "c40a1aa79e4721f7892be787eef3c3fe0f324959", "diff": "@@ -772,7 +772,7 @@ class DowngradingConsistencyRetryPolicy(RetryPolicy):\n received_responses, data_retrieved, retry_num):\n if retry_num != 0:\n return (self.RETHROW, None)\n- elif received_responses < required_responses:\n+ elif received_responses <= required_responses:\n return self._pick_consistency(received_responses)\n elif not data_retrieved:\n return (self.RETRY, consistency)\n", "old_path": "cassandra/policies.py", "rewrite": "ReplaceText(target='<=' @(775,32)->(775,33))"} -{"repo": "https://:@github.com/ArunTejCh/python-driver.git", "hash": "21081fb30673a52506de2ef2b3c38ae519afef99", "diff": "@@ -895,7 +895,7 @@ class ModelMetaClass(type):\n if MultipleObjectsReturnedBase is not None:\n break\n \n- MultipleObjectsReturnedBase = DoesNotExistBase or attrs.pop('MultipleObjectsReturned', BaseModel.MultipleObjectsReturned)\n+ MultipleObjectsReturnedBase = MultipleObjectsReturnedBase or attrs.pop('MultipleObjectsReturned', BaseModel.MultipleObjectsReturned)\n attrs['MultipleObjectsReturned'] = type('MultipleObjectsReturned', (MultipleObjectsReturnedBase,), {})\n \n # create the class and add a QuerySet to it\n", "old_path": "cassandra/cqlengine/models.py", "rewrite": "ReplaceText(target='MultipleObjectsReturnedBase' @(898,38)->(898,54))"} -{"repo": "https://:@github.com/unixpickle/mazenv-py.git", "hash": "e1e12b285e2e366c19b99583d934e46cda3798e2", "diff": "@@ -17,7 +17,7 @@ def parse_2d_maze(maze_str):\n start_pos = None\n end_pos = None\n for row, row_str in enumerate(lines):\n- if len(row) != num_cols:\n+ if len(row_str) != num_cols:\n raise ValueError('row length should be %d but got %d' %\n (num_cols, len(row)))\n sub_walls = []\n", "old_path": "mazenv/maze.py", "rewrite": "ReplaceText(target='row_str' @(20,15)->(20,18))"} -{"repo": "https://:@github.com/JGoutin/rfs.git", "hash": "0f3baf03774e56ccdb3177ba5150b79446f84308", "diff": "@@ -122,7 +122,7 @@ def test_s3_raw_io():\n \n s3object = S3RawIO(path)\n assert s3object._client_kwargs == client_args\n- assert s3object.name == url\n+ assert s3object.name == path\n \n # Tests _head\n check_head_methods(s3object, m_time)\n", "old_path": "tests/test_s3.py", "rewrite": "ReplaceText(target='path' @(125,32)->(125,35))"} -{"repo": "https://:@github.com/JGoutin/rfs.git", "hash": "9997aa65673b3f42439ff5b46e1fd4f7bb42524a", "diff": "@@ -27,7 +27,7 @@ def _copy(src, dst, src_is_storage, dst_is_storage):\n if system is get_instance(dst):\n \n # Checks if same file\n- if system.relpath(src) != system.relpath(dst):\n+ if system.relpath(src) == system.relpath(dst):\n raise same_file_error(\n \"'%s' and '%s' are the same file\" % (src, dst))\n \n", "old_path": "pycosio/_core/functions_shutil.py", "rewrite": "ReplaceText(target='==' @(30,35)->(30,37))"} -{"repo": "https://:@github.com/JGoutin/rfs.git", "hash": "76ae1f2720567a6121b264da9fbada3c49e4378b", "diff": "@@ -574,7 +574,7 @@ class SystemBase(ABC):\n stat[key] = S_IFREG\n \n # Add storage specific keys\n- for key, value in tuple(stat.items()):\n+ for key, value in tuple(header.items()):\n stat['st_' + key.lower().replace('-', '_')] = value\n \n # Convert to \"os.stat_result\" like object\n", "old_path": "pycosio/_core/io_system.py", "rewrite": "ReplaceText(target='header' @(577,32)->(577,36))"} -{"repo": "https://:@github.com/ishikota/kyoka.git", "hash": "3f844dec3d6320e376176eb8ff82227deb5ee164", "diff": "@@ -54,7 +54,7 @@ class BaseRLAlgorithmTest(BaseUnitTest):\n task = self.__setup_stub_task()\n policy = GreedyPolicy()\n value_func = self.__setup_stub_value_function()\n- episode = generate_episode(task, value_func, policy)\n+ episode = generate_episode(task, policy, value_func)\n self.eq(3, len(episode))\n self.eq((0, 1, 1, 1), episode[0])\n self.eq((1, 2, 3, 9), episode[1])\n", "old_path": "tests/kyoka/algorithm_/rl_algorithm_test.py", "rewrite": "ArgSwap(idxs=1<->2 @(57,18)->(57,34))"} -{"repo": "https://:@bitbucket.org/batterio/regulome_web.git", "hash": "1872e4fca0b62b46fea9e60f8e15729c37f39fb9", "diff": "@@ -12,7 +12,7 @@ def mark_as_active(pathname):\n \"\"\"Mark the active page in the navbar\"\"\"\n for id_page in ('home', 'data', 'credits', 'contact', 'info'):\n if id_page in pathname:\n- document[pathname].class_name = 'active'\n+ document[id_page].class_name = 'active'\n else:\n document[id_page].class_name = ''\n if 'show' in pathname:\n", "old_path": "regulome_app/webapp/static/python/utils.py", "rewrite": "ReplaceText(target='id_page' @(15,21)->(15,29))"} -{"repo": "https://:@github.com/Mmodarre/pyfujitsu.git", "hash": "956c0d2f02ee05c3312d5472f3921a59b7780ea4", "diff": "@@ -45,7 +45,7 @@ class splitAC:\n \r\n def changeTemperature(self,newTemperature):\r\n ## set temperature for degree C\r\n- if not isinstance(newTemperature,int) or not isinstance(newTemperature,float):\r\n+ if not isinstance(newTemperature,int) and not isinstance(newTemperature,float):\r\n raise Exception('Wrong usage of method')\r\n ## Fixing temps if not given as multiplies of 10 less than 180\r\n if newTemperature < 180:\r\n", "old_path": "pyfujitsu/splitAC.py", "rewrite": "ReplaceText(target='and' @(48,46)->(48,48))"} -{"repo": "https://:@github.com/pushrbx/python3-mal.git", "hash": "9c5710647f2486e53bc8853c71185349312a857a", "diff": "@@ -240,7 +240,7 @@ class Anime(Base):\n related_type = None\n while True:\n if not curr_elt:\n- raise MalformedAnimePageError(self, html, message=\"Prematurely reached end of related anime listing\")\n+ raise MalformedAnimePageError(self, related_elt, message=\"Prematurely reached end of related anime listing\")\n if isinstance(curr_elt, bs4.NavigableString):\n type_match = re.match('(?P[a-zA-Z\\ \\-]+):', curr_elt)\n if type_match:\n", "old_path": "myanimelist/anime.py", "rewrite": "ReplaceText(target='related_elt' @(243,48)->(243,52))"} -{"repo": "https://:@github.com/pushrbx/python3-mal.git", "hash": "36024bc1b0cfa62c59ce9528bed097079f144d1b", "diff": "@@ -38,7 +38,7 @@ class MediaList(Base, collections.Mapping):\n def __init__(self, session, user_name):\n super(MediaList, self).__init__(session)\n self.username = user_name\n- if not isinstance(self.username, unicode) or len(self.username) < 2:\n+ if not isinstance(self.username, unicode) or len(self.username) < 1:\n raise InvalidMediaListError(self.username)\n self._list = None\n self._stats = None\n", "old_path": "myanimelist/media_list.py", "rewrite": "ReplaceText(target='1' @(41,70)->(41,71))"} -{"repo": "https://:@github.com/DrLuke/effigy.git", "hash": "c970d945fc22787bd6b95ec2f1dfd317876ef4dc", "diff": "@@ -41,7 +41,7 @@ class QNodeScene(QGraphicsScene):\n nodes = [x for x in selectedItems if issubclass(type(x), QNodeSceneNode) and not issubclass(type(x), QNodeSceneNodeUndeletable)]\n #remainder = [x for x in selectedItems if not issubclass(type(x), (QNodeSceneNode, NodeLink))]\n \n- if links and nodes:\n+ if links or nodes:\n self.undostack.beginMacro(\"Delete Stuff\")\n for link in links:\n self.undostack.push(type(link.startIO).DeleteLinkCommand(link.startIO))\n", "old_path": "effigy/QNodeScene.py", "rewrite": "ReplaceText(target='or' @(44,17)->(44,20))"} -{"repo": "https://:@github.com/carlosefr/python-kyototycoon-ng.git", "hash": "0a988c311c7858eaa909a50f19d44a3cdf023aa0", "diff": "@@ -124,7 +124,7 @@ class Cursor(object):\n '''Jump the cursor to a record (last record if \"None\") for forward scan.'''\n \n db = str(db) if isinstance(db, int) else quote(db.encode('utf-8'))\n- path += '/rpc/cur_jump_back?DB=' + db\n+ path = '/rpc/cur_jump_back?DB=' + db\n \n request_dict = {'CUR': self.cursor_id}\n if key:\n", "old_path": "kyototycoon/kt_http.py", "rewrite": "ReplaceText(target='=' @(127,13)->(127,15))"} -{"repo": "https://:@github.com/uuazed/numerai_reports.git", "hash": "923f6acc29faff293c02abb7f2b8d39ed9f4dae6", "diff": "@@ -184,7 +184,7 @@ def fetch_one(round_num, tournament):\n if 'nmr_returned' in df:\n df['nmr_returned'] = df['nmr_returned'].astype(float)\n if round_num == 158:\n- df['nmr_bonus'] = bonus_nmr_only.where(df['usd_staking'].isna(), bonus_nmr_only)\n+ df['nmr_bonus'] = bonus_nmr_only.where(df['usd_staking'].isna(), bonus_split)\n df['usd_bonus'] = df['usd_staking'] - df['usd_staking'] / (1 + staking_bonus_perc)\n df['usd_staking'] = df['usd_staking'] - df['usd_bonus']\n df['nmr_returned'] -= bonus_nmr_only\n", "old_path": "numerai_reports/data.py", "rewrite": "ReplaceText(target='bonus_split' @(187,85)->(187,99))"} -{"repo": "https://:@github.com/internetimagery/surface.git", "hash": "ebdcb1f548d4db39fa3e6fac087aeaf49272543b", "diff": "@@ -149,7 +149,7 @@ class ArgMapper(Mapper):\n \n \n def get_comment(func): # type: (Any) -> Optional[Tuple[Dict[str, str], str]]\n- if not inspect.isfunction(func) or not inspect.ismethod(func):\n+ if not inspect.isfunction(func) and not inspect.ismethod(func):\n # Classes should be handled, but are not yet...\n # Handling them would involve determining if they use __new__ or __init__\n # and using that as the function itself.\n", "old_path": "surface/_comment.py", "rewrite": "ReplaceText(target='and' @(152,36)->(152,38))"} -{"repo": "https://:@github.com/internetimagery/surface.git", "hash": "ebdcb1f548d4db39fa3e6fac087aeaf49272543b", "diff": "@@ -12,7 +12,7 @@ from surface._utils import normalize_type\n \n def parse_docstring(func): # type: (Any) -> Optional[Tuple[Dict[str, str], str]]\n \"\"\" Parse out typing information from docstring \"\"\"\n- if not inspect.isfunction(func) or not inspect.ismethod(func):\n+ if not inspect.isfunction(func) and not inspect.ismethod(func):\n # Classes should be handled, but are not yet...\n # Handling them would involve determining if they use __new__ or __init__\n # and using that as the function itself.\n", "old_path": "surface/_doc.py", "rewrite": "ReplaceText(target='and' @(15,36)->(15,38))"} -{"repo": "https://:@github.com/Amper/opyum.git", "hash": "444ce0427ba68f5a0d1f49dc039510476c978c2e", "diff": "@@ -47,6 +47,6 @@ class ConstantFolding(ASTOptimization):\n node = ast.copy_location(ast.Num(n = val), node)\n elif all(isinstance(value, ast.Str) for value in (left, right)):\n if isinstance(node.op, ast.Add):\n- val = left.s + left.s\n+ val = left.s + right.s\n node = ast.copy_location(ast.Str(s = val), node)\n return node\n", "old_path": "opyum/optimizations/constant_folding.py", "rewrite": "ReplaceText(target='right' @(50,32)->(50,36))"} -{"repo": "https://:@gitlab.com/lbartoletti/portsgraph.git", "hash": "3e9e2cae7cc559fdaf062d18a7f6bd2fb0b25fed", "diff": "@@ -96,7 +96,7 @@ class portgraph:\n \n portname = self.__flavorname2port(ports)\n \n- self.__addnode(portname)\n+ self.__addnode(ports)\n \n proc = subprocess.Popen(['make', '-C',\n portname,\n", "old_path": "portgraph/portgraph.py", "rewrite": "ReplaceText(target='ports' @(99,23)->(99,31))"} -{"repo": "https://:@github.com/biolab/orange3-recommendation.git", "hash": "55f4a56c940175a50cd6ccf73783bf66cda42a92", "diff": "@@ -26,7 +26,7 @@ def ReciprocalRank(results, query):\n rank = np.where(results[i] == j)[0]\n \n if len(rank) == 0: # Check values not found\n- rank = len(query[i])\n+ rank = len(results[i])\n else:\n rank = rank[0]\n all_rr.append(rank)\n", "old_path": "orangecontrib/recommendation/evaluation/ranking.py", "rewrite": "ReplaceText(target='results' @(29,27)->(29,32))"} -{"repo": "https://:@github.com/biolab/orange3-recommendation.git", "hash": "971301a39ce26450ac6bdeee8c9028699b9a240e", "diff": "@@ -157,7 +157,7 @@ class TestSVDPlusPlus(unittest.TestCase):\n recommender.compute_objective(data=data, P=recommender.P,\n Q=recommender.Q,\n Y=recommender.Y,\n- bias=learner.bias,\n+ bias=recommender.bias,\n beta=learner.beta))\n \n # Assert objective values decrease\n", "old_path": "orangecontrib/recommendation/tests/test_svdplusplus.py", "rewrite": "ReplaceText(target='recommender' @(160,51)->(160,58))"} -{"repo": "https://:@github.com/silvacms/silva.core.conf.git", "hash": "306ed54d4a7497da3c21d172e5e00215a4746f7d", "diff": "@@ -53,7 +53,7 @@ class ExtensionGrokker(martian.GlobalGrokker):\n module_directory = extension.module_directory\n # Register Silva Views directory\n if os.path.exists(os.path.join(module_directory, 'views')):\n- registerDirectory(module_directory, 'views')\n+ registerDirectory('views', module_directory)\n \n return True\n \n", "old_path": "silva/core/conf/martiansupport/extension.py", "rewrite": "ArgSwap(idxs=0<->1 @(56,16)->(56,33))"} -{"repo": "https://:@github.com/ryneches/pique.git", "hash": "18e98cd6fcbf957012114313f108b7262fc5199d", "diff": "@@ -72,7 +72,7 @@ def detect( name, ipfile, bgfile, mapfile, alpha, l_thresh, pickle_file ) :\n \n # log inputs\n pique.msg( logfile, ' -> IP file : ' + ipfile )\n- pique.msg( logfile, ' -> BG file : ' + ipfile )\n+ pique.msg( logfile, ' -> BG file : ' + bgfile )\n pique.msg( logfile, ' -> map file : ' + mapfile )\n pique.msg( logfile, ' -> alpha : ' + str(alpha) )\n pique.msg( logfile, ' -> l_thresh : ' + str(l_thresh) )\n", "old_path": "pique/runtime.py", "rewrite": "ReplaceText(target='bgfile' @(75,45)->(75,51))"} -{"repo": "https://:@github.com/smok-serwis/coolamqp.git", "hash": "e4c86dec8d84545d9616859290377338bf159df5", "diff": "@@ -87,7 +87,7 @@ class Order(object):\n \"\"\"Return whether the operation failed, ie. completed but with an error code.\n Cancelled and discarded ops are considered failed.\n This assumes that this order has been .wait()ed upon\"\"\"\n- return self._result is True\n+ return self._result is not True\n \n def result(self):\n \"\"\"Wait until this is completed and return a response\"\"\"\n", "old_path": "coolamqp/orders.py", "rewrite": "ReplaceText(target=' is not ' @(90,27)->(90,31))"} -{"repo": "https://:@github.com/smok-serwis/coolamqp.git", "hash": "2aadc44e07e1d6f23cecaf3c65a29807a1fa602c", "diff": "@@ -140,7 +140,7 @@ class Connection(object):\n (self.node_definition.host, self.node_definition.port))\n except socket.error as e:\n time.sleep(0.5) # Connection refused? Very bad things?\n- if monotonic.monotonic() - start_at < timeout:\n+ if monotonic.monotonic() - start_at > timeout:\n raise ConnectionDead()\n else:\n break\n", "old_path": "coolamqp/uplink/connection/connection.py", "rewrite": "ReplaceText(target='>' @(143,52)->(143,53))"} -{"repo": "https://:@github.com/smok-serwis/coolamqp.git", "hash": "a0e62d972ed89ad3a43838caf2f8c8dde438b151", "diff": "@@ -85,7 +85,7 @@ class Operation(object):\n self.enqueued_span = None\n \n def span_finished(self):\n- if self.processing_span is None:\n+ if self.processing_span is not None:\n self.processing_span.finish()\n self.processing_span = None\n \n", "old_path": "coolamqp/attaches/declarer.py", "rewrite": "ReplaceText(target=' is not ' @(88,31)->(88,35))"} -{"repo": "https://:@github.com/ryogrid/Over-NAT-Lib.git", "hash": "86f4eca56bb460e898441cc13c55c663de9d8932", "diff": "@@ -323,7 +323,7 @@ async def sender_server_handler(reader, writer):\n \n while True:\n # if flag backed to False, end this handler because it means receiver side client disconnected\n- if remote_stdout_connected == False or file_transfer_mode == False:\n+ if remote_stdout_connected == False and file_transfer_mode == False:\n # clear bufferd data\n if sender_fifo_q.empty() == False:\n print(\"reset sender_fifo_q because it is not empty\")\n", "old_path": "tools/p2p_com_local_server.py", "rewrite": "ReplaceText(target='and' @(326,48)->(326,50))"} -{"repo": "https://:@github.com/bitcaster-io/bitcaster.git", "hash": "d02b5489dc239a6da6324aa62274ed1311808a15", "diff": "@@ -619,7 +619,7 @@ if DEBUG:\n if request.user.is_authenticated:\n if request.path in ignored:\n return False\n- return True\n+ return False\n \n INSTALLED_APPS = INSTALLED_APPS + ['debug_toolbar']\n MIDDLEWARE = MIDDLEWARE + ['debug_toolbar.middleware.DebugToolbarMiddleware', ]\n", "old_path": "src/bitcaster/config/settings.py", "rewrite": "ReplaceText(target='False' @(622,15)->(622,19))"} -{"repo": "https://:@github.com/bitcaster-io/bitcaster.git", "hash": "8e32c0ae2bf35f2f7a959eeb34adfb80c4bf865a", "diff": "@@ -619,7 +619,7 @@ if DEBUG:\n if request.user.is_authenticated:\n if request.path in ignored:\n return False\n- return False\n+ return True\n \n INSTALLED_APPS = INSTALLED_APPS + ['debug_toolbar']\n MIDDLEWARE = MIDDLEWARE + ['debug_toolbar.middleware.DebugToolbarMiddleware', ]\n", "old_path": "src/bitcaster/config/settings.py", "rewrite": "ReplaceText(target='True' @(622,15)->(622,20))"} -{"repo": "https://:@github.com/cescalara/fancy.git", "hash": "416c970b7b88aa138d2b288b0a9aa1a163334126", "diff": "@@ -57,7 +57,7 @@ class Corner():\n N = np.shape(data_frame)[1]\n for j in range(N):\n for k in range(N):\n- if i != k:\n+ if j != k:\n pairgrid.axes[i, k].spines['right'].set_visible(True)\n pairgrid.axes[i, k].spines['top'].set_visible(True) \n else: \n", "old_path": "fancy/plotting/corner.py", "rewrite": "ReplaceText(target='j' @(60,23)->(60,24))"} -{"repo": "https://:@github.com/cescalara/fancy.git", "hash": "a05d109c3e85debb19ed2d3051fb178f2c19f409", "diff": "@@ -58,7 +58,7 @@ class Corner():\n for i in range(N):\n for j in range(N):\n for k in range(N):\n- if j != k:\n+ if i != k:\n pairgrid.axes[i, k].spines['right'].set_visible(True)\n pairgrid.axes[i, k].spines['top'].set_visible(True) \n else: \n", "old_path": "fancy/plotting/corner.py", "rewrite": "ReplaceText(target='i' @(61,27)->(61,28))"} -{"repo": "https://:@github.com/bbernhard/imagemonkey-libs.git", "hash": "d393bd724b9531963bef3a6d8da74e9bcaae047b", "diff": "@@ -45,7 +45,7 @@ class PolyPoints(object):\n \t\t\tif p.y < 0:\n \t\t\t\ty = 0\n \t\t\telif p.y > rect.height:\n-\t\t\t\tx = rect.height\n+\t\t\t\ty = rect.height\n \t\t\telse:\n \t\t\t\ty = p.y\n \n", "old_path": "python/pyimagemonkey/api.py", "rewrite": "ReplaceText(target='y' @(48,4)->(48,5))"} -{"repo": "https://:@github.com/bbernhard/imagemonkey-libs.git", "hash": "0cce51ce916ffb8f42ff0492bf91937a65cdb78b", "diff": "@@ -221,7 +221,7 @@ class TensorflowTrainer(object):\n \n \t\t\tif self._statistics is not None:\n \t\t\t\tself._statistics.output_path = self._statistics_dir + os.path.sep + \"statistics.json\"\n-\t\t\t\tself._statistics.generate(d)\n+\t\t\t\tself._statistics.generate(data)\n \t\t\t\tself._statistics.save()\n \n \t\t\tself._train_object_detection(labels, data, learning_rate)\n", "old_path": "python/pyimagemonkey/utils.py", "rewrite": "ReplaceText(target='data' @(224,30)->(224,31))"} -{"repo": "https://:@github.com/OSSOS/MOP.git", "hash": "2b9c4af87e1b899b7589cfb04aa272540d2e8a04", "diff": "@@ -61,7 +61,7 @@ class GeneralModelTest(FileReadingTestCase, DirectoryCleaningTestCase):\n # Put a real fits image on the first source, first observation\n apcor_str = \"4 15 0.19 0.01\"\n with open(self.get_abs_path(path), \"rb\") as fh:\n- self.first_image = DownloadedFitsImage(fh.read(), apcor_str, Mock(), in_memory=True)\n+ self.first_image = DownloadedFitsImage(fh.read(), Mock(), apcor_str, in_memory=True)\n first_reading = self.model.get_current_workunit().get_sources()[0].get_readings()[0]\n self.model._on_image_loaded(first_reading, self.first_image)\n \n", "old_path": "src/ossos-pipeline/tests/test_integration/test_models.py", "rewrite": "ArgSwap(idxs=1<->2 @(64,31)->(64,50))"} -{"repo": "https://:@github.com/robofit/arcor2.git", "hash": "08ed34b3a85635a6617ac785b067c3415227a6ce", "diff": "@@ -158,7 +158,7 @@ def object_actions(plugins: Dict[Type, Type[ParameterPlugin]], type_def: Union[T\n \n data = ObjectAction(name=method_name, meta=meta)\n \n- if method_def in type_def.CANCEL_MAPPING:\n+ if method_name in type_def.CANCEL_MAPPING:\n meta.cancellable = True\n \n doc = parse_docstring(method_def.__doc__)\n", "old_path": "arcor2/object_types_utils.py", "rewrite": "ReplaceText(target='method_name' @(161,11)->(161,21))"} -{"repo": "https://:@github.com/YoSTEALTH/Liburing.git", "hash": "35981679eadc569fb31d154d245aeeeef086fff4", "diff": "@@ -81,7 +81,7 @@ def timespec(seconds=0, nanoseconds=0):\n >>> io_uring_wait_cqes(..., ts=timespec(), ...)\n >>> io_uring_wait_cqes(..., ts=timespec(None), ...)\n '''\n- if not seconds or nanoseconds:\n+ if seconds or nanoseconds:\n ts = ffi.new('struct __kernel_timespec[1]')\n ts[0].tv_sec = seconds or 0\n ts[0].tv_nsec = nanoseconds or 0\n", "old_path": "liburing/helper.py", "rewrite": "ReplaceText(target='' @(84,7)->(84,11))"} -{"repo": "https://:@github.com/shaldengeki/python-mal.git", "hash": "9c5710647f2486e53bc8853c71185349312a857a", "diff": "@@ -240,7 +240,7 @@ class Anime(Base):\n related_type = None\n while True:\n if not curr_elt:\n- raise MalformedAnimePageError(self, html, message=\"Prematurely reached end of related anime listing\")\n+ raise MalformedAnimePageError(self, related_elt, message=\"Prematurely reached end of related anime listing\")\n if isinstance(curr_elt, bs4.NavigableString):\n type_match = re.match('(?P[a-zA-Z\\ \\-]+):', curr_elt)\n if type_match:\n", "old_path": "myanimelist/anime.py", "rewrite": "ReplaceText(target='related_elt' @(243,48)->(243,52))"} -{"repo": "https://:@github.com/elastic-infra/kenetsu.git", "hash": "03c7835bf88602e6fb8ab4d149338ed1cde30dba", "diff": "@@ -15,7 +15,7 @@ locale.setlocale(locale.LC_ALL, \"C\")\n \n \n def main():\n- if len(sys.argv) <= 2:\n+ if len(sys.argv) < 2:\n usage(sys.argv[0])\n sys.exit(1)\n duration = int(sys.argv[1])\n", "old_path": "kenetsu/cli.py", "rewrite": "ReplaceText(target='<' @(18,21)->(18,23))"} -{"repo": "https://:@github.com/Quansight-Labs/python-moa.git", "hash": "5a344b476cee3d51e450d405f4b085eb05758358", "diff": "@@ -152,7 +152,7 @@ def _shape_plus_minus_divide_times(symbol_table, node):\n shape = shape + (left_element,)\n elif is_symbolic_element(left_element): # only left is symbolic\n array_name = generate_unique_array_name(symbol_table)\n- symbol_table = add_symbol(symbol_table, array_name, MOANodeTypes.ARRAY, (), (left_element,))\n+ symbol_table = add_symbol(symbol_table, array_name, MOANodeTypes.ARRAY, (), (right_element,))\n conditions.append(BinaryNode(MOANodeTypes.EQUAL, (), left_element, ArrayNode(MOANodeTypes.ARRAY, (), array_name)))\n shape = shape + (right_element,)\n elif is_symbolic_element(right_element): # only right is symbolic\n", "old_path": "moa/shape.py", "rewrite": "ReplaceText(target='right_element' @(155,93)->(155,105))"} -{"repo": "https://:@github.com/Quansight-Labs/python-moa.git", "hash": "a7983c3d549207db15510ccbfc24a07dbb7fa442", "diff": "@@ -116,7 +116,7 @@ def _shape_psi(symbol_table, node):\n conditions.append(BinaryNode(MOANodeTypes.LESSTHAN, (), left_element, right_element))\n elif is_symbolic_element(left_element): # only left is symbolic\n array_name = generate_unique_array_name(symbol_table)\n- symbol_table = add_symbol(symbol_table, array_name, MOANodeTypes.ARRAY, (), (left_element,))\n+ symbol_table = add_symbol(symbol_table, array_name, MOANodeTypes.ARRAY, (), (right_element,))\n conditions.append(BinaryNode(MOANodeTypes.LESSTHAN, (), left_element, ArrayNode(MOANodeTypes.ARRAY, (), array_name)))\n elif is_symbolic_element(right_element): # only right is symbolic\n array_name = generate_unique_array_name(symbol_table)\n", "old_path": "moa/shape.py", "rewrite": "ReplaceText(target='right_element' @(119,89)->(119,101))"} -{"repo": "https://:@github.com/felipeochoa/minecart.git", "hash": "66e29717bab0079029db839a8868c2b7a1878873", "diff": "@@ -48,7 +48,7 @@ class DeviceLoader(pdfminer.pdfdevice.PDFTextDevice):\n device_path.append(\n (segment[0],)\n + pdfminer.utils.apply_matrix_pt(self.ctm, (x, y)))\n- self.page.add_shape(content.Shape(stroke, fill, evenodd, path))\n+ self.page.add_shape(content.Shape(stroke, fill, evenodd, device_path))\n \n def render_image(self, name, stream):\n self.page.add_image(content.Image(self.ctm, stream))\n", "old_path": "src/miner.py", "rewrite": "ReplaceText(target='device_path' @(51,65)->(51,69))"} -{"repo": "https://:@bitbucket.org/creminslab/lib5c.git", "hash": "9562f0ce961bd4ddadb3171783c27eedc8bcf577", "diff": "@@ -158,7 +158,7 @@ def joint_express_normalize(obs_matrices, exp_matrices, max_iter=1000,\n \n # apply optimized bias to observed\n log_corr_obs_matrices = [(log_obs_matrix.T - bias_factors).T - bias_factors\n- for log_obs_matrix in log_exp_matrices]\n+ for log_obs_matrix in log_obs_matrices]\n \n # undo log transform\n normalized_matrices = [np.exp(log_corr_obs_matrix) - 1\n", "old_path": "lib5c/algorithms/express.py", "rewrite": "ReplaceText(target='log_obs_matrices' @(161,51)->(161,67))"} -{"repo": "https://:@github.com/phelimb/cbg.git", "hash": "d35f6bbd778114d6350e81ed1953fd33a5e4148d", "diff": "@@ -21,7 +21,7 @@ def run(parser, args, conn_config):\n if i % 100000 == 0:\n mc.set_kmers(kmers, colour)\n kmers = []\n- mc.set_kmers(kmers, i)\n+ mc.set_kmers(kmers, colour)\n \n # kmers = inf.read().splitlines()\n \n", "old_path": "remcdbg/cmds/insert.py", "rewrite": "ReplaceText(target='colour' @(24,28)->(24,29))"} -{"repo": "https://:@github.com/phelimb/cbg.git", "hash": "8bdef6f8a055e739860a17113a4fb565aec4542e", "diff": "@@ -74,7 +74,7 @@ class AtlasSeq(object):\n def search(self, seq: hug.types.text=None, fasta_file: hug.types.text=None, threshold: hug.types.float_number=1.0):\n \"\"\"Returns samples that contain the searched sequence. \n Use -f to search for sequence from fasta\"\"\"\n- if not seq or fasta_file:\n+ if not seq or not fasta_file:\n return \"-s or -f must be provided\"\n return search(seq=seq,\n fasta_file=fasta_file, threshold=threshold, conn_config=CONN_CONFIG)\n", "old_path": "atlasseq/__main__.py", "rewrite": "ReplaceText(target='not ' @(77,22)->(77,22))"} -{"repo": "https://:@github.com/phelimb/cbg.git", "hash": "6aeae99e79fe215eac5e4fa1defcb77882760891", "diff": "@@ -24,5 +24,5 @@ def build(bloomfilter_filepaths, samples, graph):\n bloomfilters = []\n for f in bloomfilter_filepaths:\n bloomfilters.append(load_bloomfilter(f))\n- graph.build(bloomfilter_filepaths, samples)\n+ graph.build(bloomfilters, samples)\n return {'result': 'success'}\n", "old_path": "bfg/cmds/build.py", "rewrite": "ReplaceText(target='bloomfilters' @(27,16)->(27,37))"} -{"repo": "https://:@github.com/sebpiq/pychedelic.git", "hash": "8bdd4ad6adae0b03e5e84e4667caaf7001fdb4f3", "diff": "@@ -28,7 +28,7 @@ class Buffer(object):\n else: raise StopIteration\n \n def pull(self, block_size, overlap=0, pad=False):\n- if overlap and overlap >= block_size:\n+ if overlap and overlap > block_size:\n raise ValueError('overlap cannot be more than block_size')\n \n # First, get as much blocks of data as needed.\n", "old_path": "pychedelic/core/buffering.py", "rewrite": "ReplaceText(target='>' @(31,31)->(31,33))"} -{"repo": "https://:@github.com/SilMon/NucDetect.git", "hash": "422787856116a7ba2236825d558f51e59988945c", "diff": "@@ -65,7 +65,7 @@ class Detector:\n :param multi_analysis: Needed for multiprocess-analysis\n :return: The analysis results as dict\n \"\"\"\n- if multi_analysis:\n+ if ml_analysis:\n self.analyser = FCN()\n start = time.time()\n logging = logging if self.logging is None else self.logging\n", "old_path": "core/Detector.py", "rewrite": "ReplaceText(target='ml_analysis' @(68,11)->(68,25))"} -{"repo": "https://:@github.com/lafrech/qbirthday.git", "hash": "6c3b545ef66a656d55df7c6b297cadae0b97c491", "diff": "@@ -40,7 +40,7 @@ class DataBase(object):\n # new entries can be saved\n self.CAN_SAVE = can_save\n # additional config options for database connection or fukebane(s)\n- self.HAS_CONFIG = can_save\n+ self.HAS_CONFIG = has_config\n # the widget for additional config\n self.widget = widget\n \n", "old_path": "src/gbirthday/databases/__init__.py", "rewrite": "ReplaceText(target='has_config' @(43,26)->(43,34))"} -{"repo": "https://:@github.com/c00w/btcnet_info.git", "hash": "2501fff74e5c798da1bf15ebf40006198d1f1198", "diff": "@@ -46,7 +46,7 @@ class Site(baseobject.Base_Object):\n value = self.wrapper.handle(dict(self.config.items(item)))\n if value:\n setattr(self, item, value)\n- self.fields.add(value)\n+ self.fields.add(item)\n \n def __repr__(self):\n return '' % (self.name, str(self.coins))\n", "old_path": "difficulty_sites.py", "rewrite": "ReplaceText(target='item' @(49,32)->(49,37))"} -{"repo": "https://:@github.com/nitros12/ics.py.git", "hash": "9e76a3eef5e0d1d1e3d1a2b0fd48d45e9d3e2c5e", "diff": "@@ -76,7 +76,7 @@ class ContentLine:\n params = {}\n for paramstr in params_strings:\n if '=' not in paramstr:\n- raise ParseError(\"No '=' in line '{}'\".format(line))\n+ raise ParseError(\"No '=' in line '{}'\".format(paramstr))\n pname, pvals = paramstr.split('=', 1)\n params[pname] = pvals.split(',')\n return cls(name, params, value)\n", "old_path": "ics/parse.py", "rewrite": "ReplaceText(target='paramstr' @(79,62)->(79,66))"} -{"repo": "https://:@github.com/shirtsgroup/cg_openmm.git", "hash": "40e8d834fd0fb437b40b888c844c9668739999f2", "diff": "@@ -284,7 +284,7 @@ def build_mm_simulation(topology,system,positions,temperature=300.0 * unit.kelvi\n # print(\"to confirm their validity for these model settings,\")\n # print(\"before performing a full simulation.\")\n time_step_list = [(10.0 * (0.5 ** i)) * unit.femtosecond for i in range(0,14)]\n- simulation_time_step,force_cutoff = get_simulation_time_step(topology,system,positions,temperature,time_step_list,total_simulation_time)\n+ simulation_time_step,force_cutoff = get_simulation_time_step(topology,system,positions,temperature,total_simulation_time,time_step_list)\n friction = 0.0\n \n integrator = LangevinIntegrator(temperature._value,friction,simulation_time_step.in_units_of(unit.picosecond)._value)\n", "old_path": "src/build/cg_build.py", "rewrite": "ArgSwap(idxs=4<->5 @(287,46)->(287,70))"} -{"repo": "https://:@github.com/shirtsgroup/cg_openmm.git", "hash": "47b5ee9ca688b3513f64fafab62f088b91bef6e5", "diff": "@@ -252,7 +252,7 @@ def test_expectations_fraction_contacts_pdb(tmpdir):\n # Test free energy fitting / derivative calculation:\r\n ddeltaF_out, d2deltaF_out, spline_tck = get_free_energy_derivative(\r\n deltaF_values,\r\n- temperature_list,\r\n+ full_T_list,\r\n plotfile=f\"{output_directory}/ddeltaF_dT.pdf\",\r\n )\r\n \r\n", "old_path": "cg_openmm/tests/test_native_contacts.py", "rewrite": "ReplaceText(target='full_T_list' @(255,8)->(255,24))"} -{"repo": "https://:@github.com/wplct/yzs-work.git", "hash": "b7c79866bf15c8a7a30b242f80944e8853331048", "diff": "@@ -35,7 +35,7 @@ class ResourceCodeManage:\n \"\"\"\n resource_code = self.map.get(code)\n if not resource_code:\n- if resource_code != 0:\n+ if code != 0:\n warnings.warn('\u672a\u77e5\u9519\u8bef\u7801', DeprecationWarning)\n return \"\"\n return resource_code.get_message()\n", "old_path": "yzs/tastypie_extend/response_code.py", "rewrite": "ReplaceText(target='code' @(38,15)->(38,28))"} -{"repo": "https://:@github.com/wplct/yzs-work.git", "hash": "1d84b0acfacc7c85a3bad11c5c1e4435663125b7", "diff": "@@ -12,7 +12,7 @@ logger = logging.getLogger('system')\n \n \n def upload_aliyun_oss(folder):\n- if hasattr(settings, 'ALIYUN_OSS'):\n+ if not hasattr(settings, 'ALIYUN_OSS'):\n raise Exception('\u672a\u914d\u7f6eoss')\n AccessKeyId = settings.ALIYUN_OSS[\"AccessKeyId\"]\n AccessKeySecret = settings.ALIYUN_OSS[\"AccessKeySecret\"]\n", "old_path": "yzs/django_extend/image_upload.py", "rewrite": "ReplaceText(target='not ' @(15,7)->(15,7))"} -{"repo": "https://:@github.com/tohojo/netperf-wrapper.git", "hash": "9d88395014ba142084b83f8f02fc545976dcdcb9", "diff": "@@ -162,7 +162,7 @@ class TimeseriesAggregator(Aggregator):\n # size\n first_times = [i[0][0] for i in measurements.values() if i and i[0]]\n last_times = [i[-1][0] for i in measurements.values() if i and i[-1]]\n- if not (first_times or last_times):\n+ if not (first_times and last_times):\n raise RuntimeError(u\"No data to aggregate. Run with -l and check log file to investigate.\")\n t_0 = min(first_times)\n t_max = max(last_times)\n", "old_path": "aggregators.py", "rewrite": "ReplaceText(target='and' @(165,28)->(165,30))"} -{"repo": "https://:@github.com/tohojo/netperf-wrapper.git", "hash": "39ec5a73b1c9a09e9e01881e89b53e807c1d2832", "diff": "@@ -422,7 +422,7 @@ class ResultWidget(get_ui_class(\"resultwidget.ui\")):\n return self.settings.ZERO_Y\n \n def disable_log(self, val=None):\n- if val is not None and val != self.settings.LOG_SCALE:\n+ if val is not None and val == self.settings.LOG_SCALE:\n self.settings.LOG_SCALE = not val\n self.update()\n return not self.settings.LOG_SCALE\n", "old_path": "netperf_wrapper/gui.py", "rewrite": "ReplaceText(target='==' @(425,35)->(425,37))"} -{"repo": "https://:@github.com/tohojo/netperf-wrapper.git", "hash": "79e727a68773475c9b0d903102f4bf5eb9593466", "diff": "@@ -281,7 +281,7 @@ class BatchRunner(object):\n settings.load_test(informational=settings.BATCH_DRY)\n settings.DATA_FILENAME = self.gen_filename(settings, b, argset, rep)\n \n- yield batch, settings\n+ yield b, settings\n \n def get_argsets(self, batch):\n argsets = []\n", "old_path": "flent/batch.py", "rewrite": "ReplaceText(target='b' @(284,18)->(284,23))"} -{"repo": "https://:@github.com/tohojo/netperf-wrapper.git", "hash": "20f7794d4f06646cb739372e5fa9d55489a7ea9d", "diff": "@@ -133,7 +133,7 @@ def diff_parts(strings, sep):\n a separator and pruning parts that are identical for all strings\"\"\"\n \n parts = [s.split(sep) for s in strings]\n- np = [p for p in zip(*parts) if len(set(p)) > 1]\n+ np = [p for p in zip(*parts) if len(set(p)) >= 1]\n \n return [sep.join(p) for p in zip(*np)]\n \n", "old_path": "flent/util.py", "rewrite": "ReplaceText(target='>=' @(136,48)->(136,49))"} -{"repo": "https://:@github.com/tohojo/netperf-wrapper.git", "hash": "07c49ab905f90817ee4ade86784241a257dc15bd", "diff": "@@ -1310,7 +1310,7 @@ class Plotter(ArgParam):\n if self.absolute_time:\n start += results.t0\n \n- if end < 0:\n+ if end <= 0:\n end += results.meta(\"TOTAL_LENGTH\")\n \n min_idx = data[0].searchsorted(start, side='right')\n", "old_path": "flent/plotters.py", "rewrite": "ReplaceText(target='<=' @(1313,19)->(1313,20))"} -{"repo": "https://:@github.com/ShagaleevAlexey/openapi-core.git", "hash": "56be4b10eb6dfa1020d451626a2f58f836f1729c", "diff": "@@ -654,4 +654,4 @@ class TestPetstore(object):\n response_result = response_validator.validate(request, response)\n \n assert response_result.errors == []\n- assert response_result.data == data\n+ assert response_result.data == data_json\n", "old_path": "tests/integration/test_petstore.py", "rewrite": "ReplaceText(target='data_json' @(657,39)->(657,43))"} -{"repo": "https://:@github.com/markreidvfx/pyavb.git", "hash": "8c822578aa3a9eef8da895125d6911e998d3b933", "diff": "@@ -331,7 +331,7 @@ class MSMLocator(core.AVBObject):\n self.mob_id = mob_id\n elif tag == 0x03:\n read_assert_tag(f, 76)\n- self.last_known_volume_utf8 = read_string(length, 'utf-8')\n+ self.last_known_volume_utf8 = read_string(f, 'utf-8')\n else:\n raise ValueError(\"%s: unknown ext tag 0x%02X %d\" % (str(self.class_id), tag,tag))\n \n", "old_path": "avb/misc.py", "rewrite": "ReplaceText(target='f' @(334,58)->(334,64))"} -{"repo": "https://:@github.com/franklingu/comp-match.git", "hash": "5fda1eac69ced79b9f489039e060840131f44184", "diff": "@@ -65,7 +65,7 @@ class CompanyUnderline(object):\n def setup_country(self):\n \"\"\"Set country based on known information\n \"\"\"\n- if not hasattr(self, 'exchange') and self.exchange is None:\n+ if not hasattr(self, 'exchange') or self.exchange is None:\n return\n exch_country = find_country_for_exchange(self.exchange)\n if hasattr(self, 'country') and self.country:\n", "old_path": "src/matchers/base.py", "rewrite": "ReplaceText(target='or' @(68,41)->(68,44))"} -{"repo": "https://:@github.com/drtconway/zotmer.git", "hash": "e1742c21684efe296bbf81a90abbfb45e6927d89", "diff": "@@ -36,7 +36,7 @@ def main(argv):\n inp = opts['']\n out = opts['']\n (m, _) = probe(inp)\n- if opts['-D'] is not None:\n+ if opts['-D'] is None:\n if opts['-S'] is not None:\n S = long(opts['-S'])\n random.seed(S)\n", "old_path": "zotmer/commands/sample.py", "rewrite": "ReplaceText(target=' is ' @(39,17)->(39,25))"} -{"repo": "https://:@github.com/programatt/drf-extensions.git", "hash": "19ade585f7ce22c2018cdc0c73f5499f7ceaf877", "diff": "@@ -135,7 +135,7 @@ class ExtendedActionLinkRouterMixin(object):\n dynamic_routes_instances.append(Route(\n url=replace_methodname(route.url, endpoint),\n mapping=dict((httpmethod, methodname) for httpmethod in httpmethods),\n- name=replace_methodname(route.name, methodname),\n+ name=replace_methodname(route.name, endpoint),\n initkwargs=initkwargs,\n ))\n return dynamic_routes_instances\n", "old_path": "rest_framework_extensions/routers.py", "rewrite": "ReplaceText(target='endpoint' @(138,52)->(138,62))"} -{"repo": "https://:@github.com/level12/keg-login.git", "hash": "30308ddd1b45a74b89c280636ef9208fede53ae4", "diff": "@@ -67,7 +67,7 @@ class PasswordResetTokenGenerator:\n return False\n \n # Check the timestamp is within limit\n- if (self._num_days(self._today()) - ts) > self.timeout_days:\n+ if (self._num_days(self._today()) - ts) >= self.timeout_days:\n return False\n \n return True\n", "old_path": "keg_login/tokens.py", "rewrite": "ReplaceText(target='>=' @(70,48)->(70,49))"} -{"repo": "https://:@github.com/xtqxk/owl.git", "hash": "3c8c2ad1dde6ffc87307e6e72fff42d42771bbde", "diff": "@@ -54,7 +54,7 @@ def main_tornado():\n application = tornado.web.Application([(r\"/\", MainHandler)])\n http_server = tornado.httpserver.HTTPServer(application)\n http_server.listen(options.port)\n- loop.start()\n+ xcfg.start()\n \n \n if __name__ == \"__main__\":\n", "old_path": "demo/tornado_and_aiohttp.py", "rewrite": "ReplaceText(target='xcfg' @(57,4)->(57,8))"} -{"repo": "https://:@github.com/bburan/abr.git", "hash": "24ce8fdca6aa62c713476e7a8ff984adcb98c6e4", "diff": "@@ -291,7 +291,7 @@ class SerialWaveformPresenter(WaveformPresenter):\n self.load(model)\r\n \r\n def load_next(self):\r\n- if self.current_model > len(self.unprocessed):\r\n+ if self.current_model >= len(self.unprocessed):\r\n return\r\n self.current_model += 1\r\n filename, frequency = self.unprocessed[self.current_model]\r\n", "old_path": "abr/presenter.py", "rewrite": "ReplaceText(target='>=' @(294,30)->(294,31))"} -{"repo": "https://:@github.com/caiovictormc/mqtt-sentinel.git", "hash": "e582bfc4161cda70200ac4c84ec6d166d2b64386", "diff": "@@ -31,7 +31,7 @@ class WatcherWorker:\n raise NotImplementedError()\n \n def is_available(self):\n- return len(self.subscribed_topics) <= self.max_topics\n+ return len(self.subscribed_topics) < self.max_topics\n \n def _subscribe(self, topic):\n self.subscribed_topics.append(str(topic))\n", "old_path": "sentinel/watcher/resources.py", "rewrite": "ReplaceText(target='<' @(34,43)->(34,45))"} -{"repo": "https://:@github.com/nitely/http-lazy-headers.git", "hash": "1dd901dcf50242d6beb031195c7039ef03d68252", "diff": "@@ -55,7 +55,7 @@ def is_quoted_cookie_octets(txt):\n if len(txt) <= 2:\n return False\n \n- if (not txt.startswith('\"') and\n+ if (not txt.startswith('\"') or\n not txt.endswith('\"')):\n return False\n \n", "old_path": "http_lazy_headers/shared/common/cookies.py", "rewrite": "ReplaceText(target='or' @(58,32)->(58,35))"} -{"repo": "https://:@github.com/AndreMiras/EtherollApp.git", "hash": "dba25b52e26f01e84195aaf0f06598120fde6186", "diff": "@@ -18,7 +18,7 @@ class CoincurveRecipe(PythonRecipe):\n env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'\n libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx)\n libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch)\n- env['CFLAGS'] = ' -I' + os.path.join(libsecp256k1_dir, 'include')\n+ env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')\n # required additional library and path for Crystax\n if self.ctx.ndk == 'crystax':\n # only keeps major.minor (discards patch)\n", "old_path": "src/python-for-android/recipes/coincurve/__init__.py", "rewrite": "ReplaceText(target='+=' @(21,22)->(21,23))"} -{"repo": "https://:@github.com/Kenny2github/brainfuck-fuck.git", "hash": "e7370575f02852774b61cbf6d3d6251f30c4f14c", "diff": "@@ -14,7 +14,7 @@ def main(args=None):\n if '--stats' in args:\n args.remove('--stats')\n args.append('--stats')\n- if len(args) > 1:\n+ if len(args) > 0:\n if args[0] == '-c':\n prog = args[1].strip('\"')\n else:\n", "old_path": "brainfuck_fuck/bf.py", "rewrite": "ReplaceText(target='0' @(17,19)->(17,20))"} -{"repo": "https://:@github.com/gpiantoni/boavus.git", "hash": "1dc1245dead4d4c120ace0254b7bd6b9b56c1ad6", "diff": "@@ -35,6 +35,6 @@ def project_electrodes(electrodes_file, freesurfer_path):\n material = one_chans['material']\n f.write(f'{_chan.label}\\t{xyz}\\t{elec_type}\\t{size}\\t{material}\\n')\n \n- old_json = replace_underscore(Path(f.filename), 'coordframe.json')\n+ old_json = replace_underscore(Path(electrodes_file.filename), 'coordframe.json')\n new_json = replace_underscore(tsv_electrodes, 'coordframe.json')\n copyfile(old_json, new_json) # TODO: add info about transformation\n", "old_path": "boavus/ieeg/project_electrodes.py", "rewrite": "ReplaceText(target='electrodes_file' @(38,39)->(38,40))"} -{"repo": "https://:@github.com/gpiantoni/boavus.git", "hash": "6d383d0e6961f8c55db7d5a33aaf8b933d3a52de", "diff": "@@ -33,7 +33,7 @@ def main(output_dir):\n p.starmap(save_frequency, args)\n else:\n for arg in args:\n- save_frequency(*args)\n+ save_frequency(*arg)\n \n \n def save_frequency(ieeg_file, cond):\n", "old_path": "boavus/ieeg/psd.py", "rewrite": "ReplaceText(target='arg' @(36,28)->(36,32))"} -{"repo": "https://:@github.com/gpiantoni/boavus.git", "hash": "427af8efb68c77d24e4a1b88e14307817559dae0", "diff": "@@ -140,4 +140,4 @@ def make_segments(dat):\n out.axis['time'][i] = dat.axis['time'][0]\n out.axis['chan'][i] = dat.axis['chan'][0]\n \n- return dat\n+ return out\n", "old_path": "boavus/ieeg/preprocessing.py", "rewrite": "ReplaceText(target='out' @(143,11)->(143,14))"} -{"repo": "https://:@github.com/UseAllFive/django-google-cloud-storage.git", "hash": "6a63ffe6f06b4781099586ccff32b77877c93ae8", "diff": "@@ -94,7 +94,7 @@ class GoogleCloudStorage(Storage):\n return self.created_time(name)\n \n def url(self, name):\n- if os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine'):\n+ if not os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine'):\n # we need this in order to display images, links to files, etc from the local appengine server\n filename = \"/gs\"+self.location+\"/\"+name\n key = create_gs_key(filename)\n", "old_path": "django_google_cloud_storage/__init__.py", "rewrite": "ReplaceText(target='not ' @(97,11)->(97,11))"} -{"repo": "https://:@github.com/ConsumerAffairs/django-experiments.git", "hash": "9f7d04c505a1fb1fd70eca209ec1ab285731b5bd", "diff": "@@ -35,7 +35,7 @@ def clear(key, participant_identifier):\n # Remove the direct entry\n cache_key = COUNTER_CACHE_KEY % key\n pipe = r.pipeline()\n- freq, _ = pipe.hget(key, participant_identifier).hdel(cache_key, participant_identifier).execute()\n+ freq, _ = pipe.hget(cache_key, participant_identifier).hdel(cache_key, participant_identifier).execute()\n \n # Remove from the histogram\n freq_cache_key = COUNTER_FREQ_CACHE_KEY % key\n", "old_path": "experiments/counters.py", "rewrite": "ReplaceText(target='cache_key' @(38,28)->(38,31))"} -{"repo": "https://:@github.com/broiledmeat/pydgeot.git", "hash": "54f264d9a0c8613e6c4c30819554777f0c785200", "diff": "@@ -74,7 +74,7 @@ class Generator:\n for s in self.app.sources.get_dependencies(c, reverse=True, recursive=True)])\n \n # Add source and context dependencies to the changeset.\n- changes.generate |= source_deps | context_deps\n+ dep_changes.generate |= source_deps | context_deps\n \n # Prepare dependent changes that weren't in the original changes list\n for path in (dep_changes.generate - changes.generate):\n", "old_path": "pydgeot/generator.py", "rewrite": "ReplaceText(target='dep_changes' @(77,12)->(77,19))"} -{"repo": "https://:@github.com/chameleoncloud/jupyterlab-zenodo.git", "hash": "14517a0c6f765c0f9470fdae3de98fb82d4d36de", "diff": "@@ -189,7 +189,7 @@ class ZenodoUploadHandler(ZenodoBaseHandler):\n print(\"doi: \"+str(doi))\n self.set_status(201)\n self.write(json.dumps(info))\n- store_record(doi, filename, directory_to_zip, access_token)\n+ store_record(doi, path_to_file, directory_to_zip, access_token)\n #self.redirect(\"http://127.0.0.1:7000/portal/upload/\"+doi)\n self.finish()\n else:\n", "old_path": "jupyterlab_zenodo/upload.py", "rewrite": "ReplaceText(target='path_to_file' @(192,30)->(192,38))"} -{"repo": "https://:@github.com/overdev/raylib-py.git", "hash": "db84739a19f8719c1f58cf6946741e29f1ef0262", "diff": "@@ -2126,7 +2126,7 @@ _rl.InitWindow.argtypes = [Int, Int, CharPtr]\n _rl.InitWindow.restype = None\n def init_window(width: int, height: int, title: AnyStr) -> None:\n \"\"\"Initialize window and OpenGL context\"\"\"\n- return _rl.InitWindow(_int(width), _int(width), _str_in(title))\n+ return _rl.InitWindow(_int(width), _int(height), _str_in(title))\n \n \n _rl.CloseWindow.argtypes = _NOARGS\n", "old_path": "raylibpy/__init__.py", "rewrite": "ReplaceText(target='height' @(2129,44)->(2129,49))"} -{"repo": "https://:@github.com/NCI-GDC/bam_readgroup_to_gdc_json.git", "hash": "3e7833e8ec3195f638bbdd3e7a56db429259db73", "diff": "@@ -237,7 +237,7 @@ def extract_readgroup_json(bam_path, logger):\n bam_name, bam_ext = os.path.splitext(bam_file)\n readgroups_json_file = bam_name+'.json'\n with open (bam_path) as f:\n- samfile = pysam.AlignmentFile(bam_path, 'rb', check_header=True, check_sq=False)\n+ samfile = pysam.AlignmentFile(f, 'rb', check_header=True, check_sq=False)\n readgroup_dict_list = get_readgroup_dict_list(samfile)\n with open(readgroups_json_file, 'w') as f:\n json.dump(out_readgroup_dict_list, f, indent=4)\n", "old_path": "bam_readgroup_to_gdc_json/extract_readgroup.py", "rewrite": "ReplaceText(target='f' @(240,38)->(240,46))"} -{"repo": "https://:@github.com/NCI-GDC/bam_readgroup_to_gdc_json.git", "hash": "e4573f93ab837ef2cd81c5276d089af9ba788575", "diff": "@@ -239,7 +239,7 @@ def extract_readgroup_json(bam_path, logger):\n if not bam_readgroup_dict_list:\n logger.error('There are no readgroups in BAM: {}'.format(samfile.filename))\n raise NoReadGroupError\n- readgroup_dict_list = get_readgroup_dict_list(samfile, logger)\n+ readgroup_dict_list = get_readgroup_dict_list(bam_readgroup_dict_list, logger)\n with open(readgroups_json_file, 'w') as f:\n json.dump(readgroup_dict_list, f, indent=4)\n return readgroups_json_file\n", "old_path": "bam_readgroup_to_gdc_json/extract_readgroup.py", "rewrite": "ReplaceText(target='bam_readgroup_dict_list' @(242,54)->(242,61))"} -{"repo": "https://:@github.com/Tynukua/mono.git", "hash": "58368594340912bca030c0b559ce4e3bac205960", "diff": "@@ -11,7 +11,7 @@ def snakeize_dict(dict_):\n answer = {}\n for key in dict_:\n nkey = snakeize_s(key)\n- answer[key] = dict_[key]\n+ answer[nkey] = dict_[key]\n return answer\n \n class MonoCard:\n", "old_path": "mono/types.py", "rewrite": "ReplaceText(target='nkey' @(14,15)->(14,18))"} -{"repo": "https://:@github.com/Helios-Protocol/py-helios-node.git", "hash": "24c35bc490eb8737da1d5a9ec90ad3be3ea5eecd", "diff": "@@ -24,7 +24,7 @@ def setup_trinity_logging(level):\n logger.setLevel(logging.DEBUG)\n logger.addHandler(handler)\n \n- listener = handlers.QueueListener(log_queue, logger)\n+ listener = handlers.QueueListener(log_queue, handler)\n \n return logger, log_queue, listener\n \n", "old_path": "trinity/utils/logging.py", "rewrite": "ReplaceText(target='handler' @(27,49)->(27,55))"} -{"repo": "https://:@github.com/Helios-Protocol/py-helios-node.git", "hash": "8f99b5b6628e75a80ca695750fb313ecb796bb49", "diff": "@@ -273,7 +273,7 @@ class BaseTransactionExecutor(metaclass=ABCMeta):\n valid_transaction = self.validate_transaction(transaction)\n message = self.build_evm_message(valid_transaction)\n computation = self.build_computation(message, valid_transaction)\n- finalized_computation = self.finalize_computation(computation, valid_transaction)\n+ finalized_computation = self.finalize_computation(valid_transaction, computation)\n return finalized_computation\n \n @abstractmethod\n", "old_path": "evm/vm/state.py", "rewrite": "ArgSwap(idxs=0<->1 @(276,32)->(276,57))"} -{"repo": "https://:@github.com/vectorhacker/pygeteventstore.git", "hash": "c311377e282413e5b2e5763eed5931e61d713aa1", "diff": "@@ -44,7 +44,7 @@ class Reader(object):\n self._url = path\n \n if self._index < 0:\n- if self._feed_page is not feedparser.FeedParserDict:\n+ if self._feed_page is feedparser.FeedParserDict:\n for link in self._feed_page.links:\n if link.rel == 'previous':\n self._url = link.href\n", "old_path": "geteventstore/read_stream.py", "rewrite": "ReplaceText(target=' is ' @(47,30)->(47,38))"} -{"repo": "https://:@github.com/javicacheiro/configuration-registry.git", "hash": "c49d2d6ad4ce1edb22023d6ea97973b8d0f045b7", "diff": "@@ -745,4 +745,4 @@ def dn_from(id):\n Basically the ID string is equivalent to a DN but without\n certain characters that can cause problems like '/'\n \"\"\"\n- return id.replace('.', DOT).replace(SLASH, '/')\n+ return id.replace(DOT, '.').replace(SLASH, '/')\n", "old_path": "registry.py", "rewrite": "ArgSwap(idxs=0<->1 @(748,11)->(748,21))"} -{"repo": "https://:@github.com/andrefreitas/schwa.git", "hash": "4a16e3bb49f2afe9c4749c2d8ab68a4f05f66761", "diff": "@@ -38,7 +38,7 @@ class JavaParser(AbstractParser):\n if current_class:\n current_class[1] = last_closing_bracket_number\n if current_method:\n- current_method[1] = last_closing_bracket_number\n+ current_method[1] = penultimate_closing_bracket_number\n components.append(current_method)\n current_class = [line_counter, 0, search.group(2)]\n continue\n", "old_path": "schwa/parsing/java_parser.py", "rewrite": "ReplaceText(target='penultimate_closing_bracket_number' @(41,40)->(41,67))"} -{"repo": "https://:@github.com/pyconuk/conferencescheduler-cli.git", "hash": "74d3dbfc5c23ac119d2a22f259363f0912245e0b", "diff": "@@ -83,7 +83,7 @@ def build(algorithm, objective, diff, input_dir, solution_dir, build_dir):\n \n if diff:\n schedule = solution_to_schedule(solution, events, slots)\n- event_diff = event_schedule_difference(schedule, original_schedule)\n+ event_diff = event_schedule_difference(original_schedule, schedule)\n logger.debug(f'\\nevent_diff:')\n for item in event_diff:\n logger.debug(f'{item.event.name} has moved from {item.old_slot.venue} at {item.old_slot.starts_at} to {item.new_slot.venue} at {item.new_slot.starts_at}')\n", "old_path": "src/scheduler/cli.py", "rewrite": "ArgSwap(idxs=0<->1 @(86,21)->(86,46))"} -{"repo": "https://:@github.com/kangasbros/django-bitcoin.git", "hash": "0efe50d2a1ad192492ae360834e1403600cceb69", "diff": "@@ -46,7 +46,7 @@ class RatingManager(object):\n object_id = self.instance.id,\n key = self.field.key,\n )\n- if not user:\n+ if user:\n kwargs['user'] = user\n else:\n kwargs['user__isnull'] = True\n", "old_path": "djangoratings/__init__.py", "rewrite": "ReplaceText(target='' @(49,11)->(49,15))"} -{"repo": "https://:@github.com/faerbit/grade_change_emailer.git", "hash": "e7c3f657704adf5a2e76cd22f29523f19a8f9113", "diff": "@@ -79,7 +79,7 @@ class GradeChangeEmailer:\n \n if old_html_table != html_table:\n mail_text = \" \"\n- mail_text = \"Es gab \u00c4nderungen in deinen Noten:\\n\"\n+ mail_text += \"Es gab \u00c4nderungen in deinen Noten:\\n\"\n mail_text += html_table\n mail_text += \"\"\n self.send_mail(mail_text)\n", "old_path": "main.py", "rewrite": "ReplaceText(target='+=' @(82,22)->(82,23))"} -{"repo": "https://:@github.com/dcramer/nose-quickunit.git", "hash": "777b3ba3e0a7fd5948fff6f88583d61c1b6c2f2f", "diff": "@@ -72,7 +72,7 @@ class QuickUnitPlugin(Plugin):\n self.verbosity = options.verbosity\n if options.quickunit_prefix:\n self.prefixes = options.quickunit_prefix\n- if len(self.prefixes) == 0:\n+ if len(self.prefixes) == 1:\n self.prefixes = self.prefixes[0].split('\\n')\n else:\n self.prefixes = [\"tests/\"]\n", "old_path": "quickunit/plugin.py", "rewrite": "ReplaceText(target='1' @(75,37)->(75,38))"} -{"repo": "https://:@gitlab.com/atviriduomenys/spinta.git", "hash": "97920623601fc3be0e8623366b29e0cf1125903f", "diff": "@@ -972,7 +972,7 @@ class QueryBuilder:\n if _is_dtype(prop, (String, DateTime, Date)):\n field = jsonb.astext\n else:\n- field = sa.cast(field, JSONB)\n+ field = sa.cast(jsonb, JSONB)\n else:\n field = self.table.main.c[prop.name]\n \n", "old_path": "spinta/backends/postgresql/__init__.py", "rewrite": "ReplaceText(target='jsonb' @(975,32)->(975,37))"} -{"repo": "https://:@github.com/eduardostarling/restio.git", "hash": "417c8fd882a8e922f831ca4ed8999607d3a09867", "diff": "@@ -155,7 +155,7 @@ class TestModel:\n \n model_b._internal_id = model_a._internal_id\n \n- assert model_a == model_b\n+ assert model_a != model_b\n \n @pytest.mark.parametrize(\n \"model, expected_fields, expected_dependency_fields\",\n", "old_path": "tests/unit/test_model.py", "rewrite": "ReplaceText(target='!=' @(158,23)->(158,25))"} -{"repo": "https://:@github.com/dbehrlich/PsychRNN.git", "hash": "aa2e83a6667bb398dc2b65dfac17a17b3c6766b5", "diff": "@@ -54,7 +54,7 @@ class FlipFlop(Task):\n for i, (input_start, echo_start) in enumerate(zip(input_times, echo_times)):\n \n if input_start <= t < input_start + echo_start:\n- x_t = 1.0\n+ x_t += 1.0\n mask_t = np.zeros(self.N_out)\n \n elif echo_start <= t < echo_start + echo_duration:\n", "old_path": "psychrnn/tasks/flip_flop.py", "rewrite": "ReplaceText(target='+=' @(57,20)->(57,21))"} -{"repo": "https://:@github.com/funkybob/knights-templater.git", "hash": "8d4ea7037e74574d98dc376b7413e36b3fd6aa8e", "diff": "@@ -29,7 +29,7 @@ def load_template(name, paths=None, raw=False):\n with open(full_name, encoding='utf-8') as fin:\n src = fin.read()\n \n- return kompile(src, raw=raw, filename=name)\n+ return kompile(src, raw=raw, filename=full_name)\n except FileNotFoundError:\n pass\n else:\n", "old_path": "knights/loader.py", "rewrite": "ReplaceText(target='full_name' @(32,50)->(32,54))"} -{"repo": "https://:@github.com/pgeurin/predpy.git", "hash": "dc4b2c89e719c6a94f3a4e0ab632aec2a5990c35", "diff": "@@ -488,7 +488,7 @@ def compare_predictions(df, y_var_name, percent_data=None,\n timeit(plot_rocs, models, df_X, y)\n plt.show()\n print(f'MAKE SUBSAMPLE TIME: {time() - starttotal}')\n- return names, results, models, pipeline, df_X\n+ return names, results, fit_models, pipeline, df_X\n \n def bootstrap_train_premade(model, X, y, bootstraps=1000, **kwargs):\n \"\"\"Train a (linear) model on multiple bootstrap samples of some data and\n", "old_path": "autoregression/autoregression.py", "rewrite": "ReplaceText(target='fit_models' @(491,27)->(491,33))"} -{"repo": "https://:@github.com/datastax/cstar_perf.git", "hash": "775971343c59a597c45041ae9937d8d41fbff31c", "diff": "@@ -150,7 +150,7 @@ def nodetool(cmd):\n stderr=subprocess.STDOUT,\n shell=True)\n output = proc.communicate()\n- if output.returncode != 0:\n+ if proc.returncode != 0:\n raise NodetoolException(output)\n return output[0]\n \n", "old_path": "tool/cstar_perf/tool/benchmark.py", "rewrite": "ReplaceText(target='proc' @(153,7)->(153,13))"} -{"repo": "https://:@github.com/azazel75/metapensiero.signal.git", "hash": "58a8b6bfb2993e3137b59da1d83da816a67437ed", "diff": "@@ -373,7 +373,7 @@ class Signal:\n if instance is None:\n fnotify = self._fnotify\n else:\n- fnotify = types.MethodType(instance, self._fnotify)\n+ fnotify = types.MethodType(self._fnotify, instance)\n validator = self._fvalidation\n if validator is not None and instance is not None:\n validator = types.MethodType(validator, instance)\n", "old_path": "src/metapensiero/signal/core.py", "rewrite": "ArgSwap(idxs=0<->1 @(376,26)->(376,42))"} -{"repo": "https://:@github.com/datasnakes/rinse.git", "hash": "fe669e8c2ea26510a9509f954272544b95b50ddb", "diff": "@@ -129,7 +129,7 @@ class LInstallR(InstallR):\n version_name = \"R-%s\" % version\n if Path(self.bin_path / \"R\").exists():\n remove(str(self.bin_path / \"R\"))\n- symlink(str(self.lib_path / version_name / \"bin\" / \"R\"), str(self.bin_path / \"R\"))\n+ symlink(str(self.bin_path / \"R\"), str(self.lib_path / version_name / \"bin\" / \"R\"))\n \n def clear_tmp_dir(self):\n # Set up the temporary directory for installation\n", "old_path": "rinse/core.py", "rewrite": "ArgSwap(idxs=0<->1 @(132,8)->(132,15))"} -{"repo": "https://:@github.com/Ircam-Web/mezzanine-organization.git", "hash": "5d66d26e44c82ff7f5c1fd02b8bd368ba1179650", "diff": "@@ -255,7 +255,7 @@ def order_links(links):\n minor = link\n except TypeError:\n pass\n- ordered_links.append(link)\n+ ordered_links.append(minor)\n links_list.remove(minor)\n return ordered_links\n \n", "old_path": "organization/core/templatetags/organization_tags.py", "rewrite": "ReplaceText(target='minor' @(258,29)->(258,33))"} -{"repo": "https://:@github.com/Ircam-Web/mezzanine-organization.git", "hash": "ae8a7252690d9c7801549d30b8734e3e9d76af36", "diff": "@@ -192,7 +192,7 @@ class TopicFilterForm(forms.Form):\n topics = ProjectTopic.objects.all()\n topics_list = []\n \n- for topic in topics_list:\n+ for topic in topics:\n if topic.projects.count():\n topics_list.append((topic.id, topic.name))\n return topics_list\n", "old_path": "organization/projects/forms.py", "rewrite": "ReplaceText(target='topics' @(195,21)->(195,32))"} -{"repo": "https://:@github.com/Jumpscale/core9.git", "hash": "5fc90cb3a2a909103cc735b979a55253cca15f68", "diff": "@@ -1426,7 +1426,7 @@ class SystemFS:\n for root, dirs, files in os.walk(startDir):\n for name in files:\n if fnmatch.fnmatch(name, fileregex):\n- result.append(os.path.join(root, fileregex))\n+ result.append(os.path.join(root, name))\n return result\n \n def grep(self, fileregex, lineregex):\n", "old_path": "JumpScale9/fs/SystemFS.py", "rewrite": "ReplaceText(target='name' @(1429,53)->(1429,62))"} -{"repo": "https://:@github.com/woctezuma/download-steam-reviews.git", "hash": "b34328a97fe7a21d2fdb944fd3f3e1f16084dc27", "diff": "@@ -216,7 +216,7 @@ def download_reviews_for_app_id(app_id,\n else:\n collection_keyword = 'first posted'\n print('Collecting reviews {} after {}'.format(collection_keyword,\n- timestamp_threshold))\n+ date_threshold))\n \n review_dict = load_review_dict(app_id)\n \n", "old_path": "steamreviews/download_reviews.py", "rewrite": "ReplaceText(target='date_threshold' @(219,58)->(219,77))"} -{"repo": "https://:@github.com/merlin-neurotech/WizardHat.git", "hash": "6c4b0cb72f062a0e59034f9a1483c6e207695f99", "diff": "@@ -153,7 +153,7 @@ class PacketHandler(BasePacketHandler):\n # convert from packet to sample ID\n sample_id = (packet_id - 1) * 2 + delta_id + 1\n # 19bit packets hold deltas between two samples\n- self._last_eeg_data += np.array(deltas[delta_id])\n+ self._last_eeg_data -= np.array(deltas[delta_id])\n self._update_counts_and_enqueue(\"EEG\", sample_id)\n \n def _parse_compressed_19bit(self, packet_id, packet):\n", "old_path": "ble2lsl/devices/ganglion/ganglion.py", "rewrite": "ReplaceText(target='-=' @(156,32)->(156,34))"} -{"repo": "https://:@github.com/PiecePaperCode/pyogame2.git", "hash": "ba010e0c9b6c884195448c98c1ef493fba075624", "diff": "@@ -616,7 +616,7 @@ class OGame2(object):\n fleets_list = []\n response = self.session.get('https://s{}-{}.ogame.gameforge.com/game/index.php?page=ingame&component=movement'\n .format(self.server_number, self.server_language))\n- if response.status_code == 302:\n+ if response.status_code != 302:\n fleets = response.text.split('
(619,34))"} -{"repo": "https://:@github.com/pstch/django-crucrudile.git", "hash": "1eaef5f8ee85d2444a3993b73e03d60ace013b4e", "diff": "@@ -21,7 +21,7 @@ class FilteredListView(ListView):\n \n filter_dict = {}\n \n- if not value in self.filter_keys:\n+ if not key in self.filter_keys:\n raise ImproperlyConfigured(\n \"%s is not present in filter_keys (%s)\" % (key, self.filter_keys)\n )\n", "old_path": "django_pstch_helpers/views/filtered.py", "rewrite": "ReplaceText(target='key' @(24,15)->(24,20))"} -{"repo": "https://:@github.com/pstch/django-crucrudile.git", "hash": "399d14d8b52601ce12858af06a0e93f6bf2ade33", "diff": "@@ -337,7 +337,7 @@ class AutoPatternsMixin(object):\n \"\"\"View URL name (unprefixed, this is the name we give to url())\"\"\"\n return cls.get_url_name(view)\n \n- if view not in view.get_views():\n+ if view not in cls.get_views():\n raise ImproperlyConfigured(\n \"Tried to get the URL patterns for a view (%s)\"\n \" that is not defined by get_views\" % view\n", "old_path": "django_crucrudile/models/mixins.py", "rewrite": "ReplaceText(target='cls' @(340,23)->(340,27))"} -{"repo": "https://:@github.com/pstch/django-crucrudile.git", "hash": "fb0a3af53e4c57ea50164c28ecd872ae379e74b4", "diff": "@@ -119,7 +119,7 @@ def make_model_mixin(view_class,\n \n setattr(ModelMixin,\n 'get_%s_url_name' % view_class.get_underscored_action_name(),\n- _get_url)\n+ _get_url_name)\n \n if extra_funcs:\n for func_name, func in extra_funcs.items():\n", "old_path": "django_crucrudile/models/mixins.py", "rewrite": "ReplaceText(target='_get_url_name' @(122,12)->(122,20))"} -{"repo": "https://:@github.com/gawseed/threat-feed-tools.git", "hash": "da1b21ecf69131800d1d782e169de3f1a8535572", "diff": "@@ -28,7 +28,7 @@ class FsdbThreatFeed():\n for (count,entry) in enumerate(self._tfh):\n array.append(entry)\n dictionary[entry[index_column]] = entry # note, may erase older ones; build array?\n- if max_records and count >= max_records:\n+ if max_records and count > max_records:\n break\n \n return (array, dictionary)\n", "old_path": "gawseed/threatfeed/feeds/fsdb.py", "rewrite": "ReplaceText(target='>' @(31,37)->(31,39))"} -{"repo": "https://:@github.com/gawseed/threat-feed-tools.git", "hash": "354e753fde2635223ce189079a16b4b6a6ef8b36", "diff": "@@ -62,7 +62,7 @@ class KafkaDataSource(DataSource):\n if self._end_time:\n self.verbose(\"searching forward from:\")\n self.verbose(decoded_row)\n- count += 0\n+ count = 0\n while True:\n count += 1\n decoded_time = decoded_row[self._time_column]\n", "old_path": "gawseed/threatfeed/datasources/kafka.py", "rewrite": "ReplaceText(target='=' @(65,18)->(65,20))"} -{"repo": "https://:@github.com/gawseed/threat-feed-tools.git", "hash": "41e2731d9ccb0df59446cc0b0aa0f23ffe945a51", "diff": "@@ -51,4 +51,4 @@ class ConnectionCounter(Config):\n \n results = {'connections': conns,\n 'ports': ports}\n- return (self._output_key, conns)\n+ return (self._output_key, results)\n", "old_path": "gawseed/threatfeed/enrichments/connectionCounter.py", "rewrite": "ReplaceText(target='results' @(54,34)->(54,39))"} -{"repo": "https://:@github.com/jlazear/pyoscope.git", "hash": "8d5c3639de70f788c3cfcde695678031f6a8acb7", "diff": "@@ -409,7 +409,7 @@ class PyOscopeStatic(object):\n elif isinstance(y, Iterable):\n newy = y\n yname = 'y_{j}'.format(j=j)\n- elif isinstance(x, NoneType):\n+ elif isinstance(y, NoneType):\n yname = None\n temp = self.data.columns[0]\n newy = range(len(self.data[temp]))\n", "old_path": "pyoscope.py", "rewrite": "ReplaceText(target='y' @(412,28)->(412,29))"} -{"repo": "https://:@gitlab.com/LISTERINE/dj_arp_storm.git", "hash": "06a3ee8610a39c0768a2ef98afdb930a1aa0c1cf", "diff": "@@ -87,7 +87,7 @@ def get_timeout(conf):\n :rtype: int, float\n \"\"\"\n timeout = conf.getint('general', 'timeout')\n- if timeout > 0:\n+ if timeout < 0:\n return float('inf')\n return timeout\n \n", "old_path": "dj_arp_storm/dj_arp_storm.py", "rewrite": "ReplaceText(target='<' @(90,15)->(90,16))"} -{"repo": "https://:@github.com/mozilla/CANOSP-2019.git", "hash": "cada35d7f44d921471da056f272f17c44705bb43", "diff": "@@ -100,7 +100,7 @@ def server_update(\n # calculate the number of clients used in this round\n m = max(int(client_num * C), 1)\n # random set of m client's index\n- S = np.array(random.sample(range(client_num), client_num))\n+ S = np.array(random.sample(range(client_num), m))\n \n num_samples = []\n \n", "old_path": "simulation_util.py", "rewrite": "ReplaceText(target='m' @(103,54)->(103,64))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "7ad6ebdb79672222fbd37571b9414d80a2eb31d1", "diff": "@@ -679,7 +679,7 @@ def eigenvector_centrality(G,max_iter=100,tol=1.0e-6,nstart=None):\n for n in x: x[n]*=s\n # check convergence \n err=sum([abs(x[n]-xlast[n]) for n in x])\n- if err < n*tol:\n+ if err < nnodes*tol:\n return x\n \n raise NetworkXError(\"eigenvector_centrality(): power iteration failed to converge in %d iterations.\"%(i+1))\n", "old_path": "networkx/algorithms/centrality.py", "rewrite": "ReplaceText(target='nnodes' @(682,17)->(682,18))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "e9c5b23d0348c6587955208c0c806fd129ba4a1c", "diff": "@@ -49,7 +49,7 @@ def _initial_tree_solution(G, r, demand = 'demand', capacity = 'capacity',\n maxWeight = 0\n hugeWeight = 1 + n * maxWeight\n \n- labelGenerator = _gen_node_label(G)\n+ labelGenerator = _gen_node_label(H)\n \n for v, d in G.nodes(data = True)[1:]:\n vDemand = d.get(demand, 0)\n", "old_path": "networkx/algorithms/flow/mincost.py", "rewrite": "ReplaceText(target='H' @(52,37)->(52,38))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "9a9b57ed411305c6f8c3a52d424014f17ed2ac5f", "diff": "@@ -85,7 +85,7 @@ def topological_sort(G,nbunch=None):\n \n if nbunch is None:\n nbunch = G.nodes_iter() \n- for v in G: # process all vertices in G\n+ for v in nbunch: # process all vertices in G\n if v in explored: \n continue\n fringe=[v] # nodes yet to look at\n", "old_path": "networkx/algorithms/dag.py", "rewrite": "ReplaceText(target='nbunch' @(88,13)->(88,14))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "f22c0f25b393ad63c2a0273dea3bd095bcb4d63f", "diff": "@@ -67,7 +67,7 @@ def all_simple_paths(G, source, target, cutoff=None):\n if source not in G:\n raise nx.NetworkXError('source node %s not in graph'%source)\n if target not in G:\n- raise nx.NetworkXError('target node %s not in graph'%source)\n+ raise nx.NetworkXError('target node %s not in graph'%target)\n if cutoff is None:\n cutoff = len(G)-1\n if G.is_multigraph():\n", "old_path": "networkx/algorithms/simple_paths.py", "rewrite": "ReplaceText(target='target' @(70,61)->(70,67))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "6ac082b2bdc9d91db7c5c9d84080787f7a98a953", "diff": "@@ -201,7 +201,7 @@ def simple_cycles(G):\n if thisnode in closed:\n _unblock(thisnode,blocked,B)\n else:\n- for nbr in G[thisnode]:\n+ for nbr in subG[thisnode]:\n if thisnode not in B[nbr]:\n B[nbr].add(thisnode)\n stack.pop()\n", "old_path": "networkx/algorithms/cycles.py", "rewrite": "ReplaceText(target='subG' @(204,31)->(204,32))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "31a656f9dd9ca015b4cdfc41c60e27995fb76f30", "diff": "@@ -89,7 +89,7 @@ def current_flow_closeness_centrality(G, normalized=True, weight='weight',\n # this could be done without a copy if we really wanted to\n H = nx.relabel_nodes(G, dict(zip(ordering, range(n))))\n betweenness = dict.fromkeys(H, 0.0) # b[v]=0 for v in H\n- n = G.number_of_nodes()\n+ n = H.number_of_nodes()\n L = laplacian_sparse_matrix(H, nodelist=range(n), weight=weight,\n dtype=dtype, format='csc')\n C2 = solvername[solver](L, width=1, dtype=dtype) # initialize solver\n", "old_path": "networkx/algorithms/centrality/current_flow_closeness.py", "rewrite": "ReplaceText(target='H' @(92,8)->(92,9))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "1f1ee6761d04f572bc9afd892a6b43a77dad1150", "diff": "@@ -38,6 +38,6 @@ class TestDispersion(object):\n disp = nx.dispersion(G)\n for d in disp:\n for dd in d:\n- assert d >= 0\n+ assert dd >= 0\n \n \n", "old_path": "networkx/algorithms/centrality/tests/test_dispersion.py", "rewrite": "ReplaceText(target='dd' @(41,23)->(41,24))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "6f01f084cbf7fd71f3e2e670a2d25c0358d54cd1", "diff": "@@ -89,7 +89,7 @@ def shortest_augmenting_path_impl(G, s, t, capacity, two_phase):\n path = [s]\n u = s\n d = n if not two_phase else int(min(m ** 0.5, 2 * n ** (2. / 3)))\n- done = R.node[s]['height'] < d\n+ done = R.node[s]['height'] >= d\n while not done:\n height = R.node[u]['height']\n curr_edge = R.node[u]['curr_edge']\n", "old_path": "networkx/algorithms/flow/shortest_augmenting_path.py", "rewrite": "ReplaceText(target='>=' @(92,31)->(92,32))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "6b2dbffd2132b4d7034f59d8a9b089f8c9ca848f", "diff": "@@ -158,5 +158,5 @@ def adjacency_graph(data, directed=False, multigraph=True, attrs=_attrs):\n else:\n ky = target_data.pop(key, None)\n graph.add_edge(source, target, key=ky)\n- graph[source][target][ky].update(target_data)\n+ graph[source][target][ky].update(tdata)\n return graph\n", "old_path": "networkx/readwrite/json_graph/adjacency.py", "rewrite": "ReplaceText(target='tdata' @(161,49)->(161,60))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "5864982dd97baf21aac4e743de5fbbb103860017", "diff": "@@ -48,7 +48,7 @@ def cytoscape_data(G, attrs=None):\n n = {\"data\" : j.copy()}\n n[\"data\"][\"id\"] = str(i)\n n[\"data\"][\"value\"] = i\n- n[\"data\"][\"name\"] = n.get(name) or str(i)\n+ n[\"data\"][\"name\"] = j.get(name) or str(i)\n nodes.append(n)\n \n for e in G.edges():\n", "old_path": "networkx/readwrite/json_graph/cytoscape.py", "rewrite": "ReplaceText(target='j' @(51,28)->(51,29))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "fbc901aa2d30c8dfbe145af747097e92d9b5e5c9", "diff": "@@ -594,5 +594,5 @@ def _add_nodes_with_bipartite_label(G, lena, lenb):\n G.add_nodes_from(range(0,lena+lenb))\n b=dict(zip(range(0,lena),[0]*lena))\n b.update(dict(zip(range(lena,lena+lenb),[1]*lenb)))\n- nx.set_node_attributes(G,'bipartite',b)\n+ nx.set_node_attributes(G, b, 'bipartite')\n return G\n", "old_path": "networkx/algorithms/bipartite/generators.py", "rewrite": "ArgSwap(idxs=1<->2 @(597,4)->(597,26))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "fbc901aa2d30c8dfbe145af747097e92d9b5e5c9", "diff": "@@ -440,7 +440,7 @@ def condensation(G, scc=None):\n C.add_edges_from((mapping[u], mapping[v]) for u, v in G.edges()\n if mapping[u] != mapping[v])\n # Add a list of members (ie original nodes) to each node (ie scc) in C.\n- nx.set_node_attributes(C, 'members', members)\n+ nx.set_node_attributes(C, members, 'members')\n # Add mapping dict as graph attribute\n C.graph['mapping'] = mapping\n return C\n", "old_path": "networkx/algorithms/components/strongly_connected.py", "rewrite": "ArgSwap(idxs=1<->2 @(443,4)->(443,26))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "fbc901aa2d30c8dfbe145af747097e92d9b5e5c9", "diff": "@@ -502,8 +502,8 @@ class TestCutoff:\n \n def test_complete_graph_cutoff(self):\n G = nx.complete_graph(5)\n- nx.set_edge_attributes(G, 'capacity',\n- dict(((u, v), 1) for u, v in G.edges()))\n+ nx.set_edge_attributes(G, dict(((u, v), 1) for u, v in G.edges()),\n+ 'capacity')\n for flow_func in [shortest_augmenting_path, edmonds_karp]:\n for cutoff in [3, 2, 1]:\n result = nx.maximum_flow_value(G, 0, 4, flow_func=flow_func,\n", "old_path": "networkx/algorithms/flow/tests/test_maxflow.py", "rewrite": "ArgSwap(idxs=1<->2 @(505,8)->(505,30))"} -{"repo": "https://:@github.com/pattern-inc/cynetworkx.git", "hash": "fbc901aa2d30c8dfbe145af747097e92d9b5e5c9", "diff": "@@ -85,7 +85,7 @@ class TestMaxflowLargeGraph:\n def test_complete_graph(self):\n N = 50\n G = nx.complete_graph(N)\n- nx.set_edge_attributes(G, 'capacity', 5)\n+ nx.set_edge_attributes(G, 5, 'capacity')\n R = build_residual_network(G, 'capacity')\n kwargs = dict(residual=R)\n \n", "old_path": "networkx/algorithms/flow/tests/test_maxflow_large_graph.py", "rewrite": "ArgSwap(idxs=1<->2 @(88,8)->(88,30))"} -{"repo": "https://:@github.com/kundajelab/keras-genomics.git", "hash": "6b6c1a9d123f91193e5311ccd22d169a6c9d0733", "diff": "@@ -4,5 +4,5 @@ from keras import backend as K\n \n def ambig_binary_crossentropy(y_true,y_pred):\n non_ambig = K.cast((y_true > -0.5),'float32')\n- return K.mean(K.binary_crossentropy(y_pred, y_true)\n+ return K.mean(K.binary_crossentropy(y_true, y_pred)\n *non_ambig, axis=-1)\n", "old_path": "keras_genomics/losses.py", "rewrite": "ArgSwap(idxs=0<->1 @(7,22)->(7,43))"} -{"repo": "https://:@github.com/Nekmo/nekumo-cloud.git", "hash": "f111818974631fad02fa0146f04638783b3da8df", "diff": "@@ -41,7 +41,7 @@ class NekumoManagement(object):\n args = self.parser.parse_args(argv[1:])\n self.nekumo.gateways = list(self.parse_gateways(args))\n self.nekumo.ifaces = list(self.parse_ifaces(args))\n- if 'NEKUMO_DEBUG_IFACE' in os.environ:\n+ if 'NEKUMO_DEBUG_IFACE' not in os.environ:\n loop = asyncio.get_event_loop()\n loop.run_forever()\n \n", "old_path": "nekumo/core/management.py", "rewrite": "ReplaceText(target=' not in ' @(44,31)->(44,35))"} -{"repo": "https://:@github.com/stonebig/baresql.git", "hash": "edeb2171759dc758dfa557404982c34e2fe385f2", "diff": "@@ -225,7 +225,7 @@ class baresql(object):\n level = 0\n status=\"normal\"\n self.cte_dico = {}\n- elif token == \"TK_OTHER\" and not cte_inline: \n+ elif token == \"TK_OTHER\" and cte_inline: \n if tk_value.lower() == \"from\":\n from_lvl[level] = True\n elif from_lvl[level]:\n", "old_path": "baresql/baresql.py", "rewrite": "ReplaceText(target='' @(228,41)->(228,45))"} -{"repo": "https://:@github.com/stonebig/baresql.git", "hash": "12ac74b6d6f75f723938608ef1b3202e81f8d7d5", "diff": "@@ -437,7 +437,7 @@ class baresql(object):\n \n for table_ref in tables:\n table_sql = table_ref+\"$$\"\n- df = env[table_ref]\n+ df = names_env[table_ref]\n df = self._ensure_data_frame(df, table_ref)\n #destroy previous Python temp table before importing the new one\n pre_q = \"DROP TABLE IF EXISTS %s\" % table_sql\n", "old_path": "baresql/baresql.py", "rewrite": "ReplaceText(target='names_env' @(440,17)->(440,20))"} -{"repo": "https://:@github.com/takluyver/astsearch.git", "hash": "68b9fe6322acccd76ff8353726e5cb9010064d9b", "diff": "@@ -31,7 +31,7 @@ class ASTPatternFinder(object):\n with open(file, 'rb') as f:\n tree = ast.parse(f.read())\n else:\n- tree = ast.parse(f.read())\n+ tree = ast.parse(file.read())\n yield from self.scan_ast(tree)\n \n def filter_subdirs(self, dirnames):\n", "old_path": "astsearch.py", "rewrite": "ReplaceText(target='file' @(34,29)->(34,30))"} -{"repo": "https://:@github.com/rsanchezgarc/micrograph_cleaner_em.git", "hash": "df470ae67588e8a1c7ba04ce14b517552e0ad788", "diff": "@@ -41,7 +41,7 @@ def cleanOneMic(micFname, boxSize, deepLearningModel=DEFAULT_MODEL_PATH, inputCo\n global MASK_PREDICTOR_HANDLER\n with LOCK:\n if MASK_PREDICTOR_HANDLER is None:\n- MASK_PREDICTOR_HANDLER= MaskPredictor(deepLearningModel, boxSize, gpus)\n+ MASK_PREDICTOR_HANDLER= MaskPredictor(boxSize, deepLearningModel, gpus)\n \n \n maskPredictor= MASK_PREDICTOR_HANDLER\n", "old_path": "micrograph_cleaner_em/cleanOneMic.py", "rewrite": "ArgSwap(idxs=0<->1 @(44,30)->(44,43))"} -{"repo": "https://:@github.com/rsanchezgarc/micrograph_cleaner_em.git", "hash": "df470ae67588e8a1c7ba04ce14b517552e0ad788", "diff": "@@ -19,7 +19,7 @@ class TestMaskPredictor(TestCase):\n \n with mrcfile.open(micFname, permissive=True) as f: mic = f.data.copy()\n \n- with MaskPredictor(deepLearningModelFname, boxSize, gpus=[0]) as mp:\n+ with MaskPredictor(boxSize, deepLearningModelFname, gpus=[0]) as mp:\n mask = mp.predictMask(mic)\n \n self.assertTrue(mask.shape==mic.shape, \"Error, mask shape is not the same that mic shape\")\n", "old_path": "micrograph_cleaner_em/tests/test_maskPredictor.py", "rewrite": "ArgSwap(idxs=0<->1 @(22,9)->(22,22))"} -{"repo": "https://:@github.com/maebert/snoo.git", "hash": "d2d822c48b4acc5046b4ca28a63153a0d0576615", "diff": "@@ -116,7 +116,7 @@ class Client:\n arrow.get(self.session[\"last_updated\"]).shift(\n seconds=int(self.config[\"update_interval\"])\n )\n- < arrow.utcnow()\n+ > arrow.utcnow()\n ):\n return self.session\n \n", "old_path": "snoo/client.py", "rewrite": "ReplaceText(target='>' @(119,16)->(119,17))"} -{"repo": "https://:@github.com/maebert/snoo.git", "hash": "4f8657a2132e8c1dfa84b1a49fb043610b70c934", "diff": "@@ -234,7 +234,7 @@ class Client:\n method=\"get\",\n params={\"startTime\": day.format(\"MM/DD/YYYY hh:mm:ss\")},\n )\n- result.append(Day._from_data(start_time, data))\n+ result.append(Day._from_data(day, data))\n return result\n \n def export_sessions(self, start_time, end_time):\n", "old_path": "snoo/client.py", "rewrite": "ReplaceText(target='day' @(237,41)->(237,51))"} -{"repo": "https://:@github.com/Microsoft/Recommenders.git", "hash": "57d99ce3be798dd2d48a169fbeaaec76a6d9637e", "diff": "@@ -58,7 +58,7 @@ def _merge_rating_true_pred(\n \n # Select the columns needed for evaluations\n rating_true = rating_true[[col_user, col_item, col_rating]]\n- rating_pred = rating_true[[col_user, col_item, col_prediction]]\n+ rating_pred = rating_pred[[col_user, col_item, col_prediction]]\n \n if col_rating == col_prediction:\n rating_true_pred = pd.merge(\n", "old_path": "reco_utils/evaluation/python_evaluation.py", "rewrite": "ReplaceText(target='rating_pred' @(61,18)->(61,29))"} -{"repo": "https://:@github.com/Microsoft/Recommenders.git", "hash": "367ca689d059d7569beb7b3cf153720fed323e30", "diff": "@@ -160,7 +160,7 @@ def split_pandas_data_with_ratios(data, ratios, seed=1234, resample=False):\n splits = np.split(data, [round(x * len(data)) for x in split_index])\n \n # Add split index (this makes splitting by group more efficient).\n- for i in range(len(split_index)):\n+ for i in range(len(ratios)):\n splits[i]['split_index'] = i\n \n return splits\n", "old_path": "reco_utils/dataset/split_utils.py", "rewrite": "ReplaceText(target='ratios' @(163,23)->(163,34))"} -{"repo": "https://:@github.com/jkreklow/radproc.git", "hash": "b319770b94b707a4cdaa335911e857a311f3f92c", "diff": "@@ -374,7 +374,7 @@ def export_dfrows_to_gdb(dataDF, idRaster, outGDBPath, GDBName, statistics=\"\"):\n outRaster = \"R_%i\" % (index.year)\n elif dataDF.index.is_month_end.all() == True or dataDF.index.is_month_start.all() == True:\n outRaster = \"R_%i%02i\" % (index.year, index.month) \n- elif dataDF.index.hour.all() == 0:\n+ elif dataDF.index.hour.all() != 0:\n outRaster = \"R_%i%02i%02i\" % (index.year, index.month, index.day)\n else:\n outRaster = \"R_%i%02i%02i_%02i%02i\" % (index.year, index.month, index.day, index.hour, index.minute)\n", "old_path": "build/lib/radproc/arcgis.py", "rewrite": "ReplaceText(target='!=' @(377,41)->(377,43))"} -{"repo": "https://:@github.com/graham/python_xid.git", "hash": "232f0ae87a6feee945a1b9e09bf99eefbf30c7a5", "diff": "@@ -146,7 +146,7 @@ class Xid(object):\n def from_string(cls, s):\n # type: (str) -> Xid\n val = base32hex.b32decode(s.upper())\n- value_check = [0 < x < 255 for x in val]\n+ value_check = [0 <= x < 255 for x in val]\n \n if not all(value_check):\n raise InvalidXid(s)\n", "old_path": "xid.py", "rewrite": "ReplaceText(target='<=' @(149,25)->(149,26))"} -{"repo": "https://:@github.com/tboser/cwltool.git", "hash": "5d633799f2eae4a5e0fedcae72381213ae9aba30", "diff": "@@ -117,7 +117,7 @@ class Builder(object):\n if \"secondaryFiles\" in binding:\n if \"secondaryFiles\" not in datum:\n datum[\"secondaryFiles\"] = []\n- for sf in aslist(schema[\"secondaryFiles\"]):\n+ for sf in aslist(binding[\"secondaryFiles\"]):\n if isinstance(sf, dict):\n sfpath = expression.do_eval(sf, self.job, self.requirements, self.docpath, datum[\"path\"])\n else:\n", "old_path": "reference/cwltool/draft2tool.py", "rewrite": "ReplaceText(target='binding' @(120,41)->(120,47))"} -{"repo": "https://:@github.com/tboser/cwltool.git", "hash": "c22c762ba871bbe9ab4f6be7f639ad69a7b78942", "diff": "@@ -40,7 +40,7 @@ def _draft2toDraft3dev1(doc, loader, baseuri): # type: (Any, Loader, str) -> An\n impLoaded = loader.fetch(imp)\n r = None # type: Dict[str, Any]\n if isinstance(impLoaded, list):\n- r = {\"@graph\": r}\n+ r = {\"@graph\": impLoaded}\n elif isinstance(impLoaded, dict):\n r = impLoaded\n else:\n", "old_path": "cwltool/update.py", "rewrite": "ReplaceText(target='impLoaded' @(43,35)->(43,36))"} -{"repo": "https://:@github.com/tboser/cwltool.git", "hash": "ad34521788edfe8b9c98841b16846c5eebb07edc", "diff": "@@ -337,7 +337,7 @@ class Loader(object):\n for k in sorted(idmapFieldValue.keys()):\n val = idmapFieldValue[k]\n v = None # type: Dict[unicode, Any]\n- if not isinstance(v, dict):\n+ if not isinstance(val, dict):\n if idmapField in loader.mapPredicate:\n v = {loader.mapPredicate[idmapField]: val}\n else:\n", "old_path": "schema_salad/ref_resolver.py", "rewrite": "ReplaceText(target='val' @(340,42)->(340,43))"} -{"repo": "https://:@github.com/MichaelScript/zerorpc-python.git", "hash": "74899a7f9f7ebe06e08ce486d3e55145131e399e", "diff": "@@ -241,7 +241,7 @@ class ClientBase(object):\n return self._process_response(request_event, bufchan, timeout)\n \n async_result = gevent.event.AsyncResult()\n- gevent.spawn(self._process_response, method, bufchan,\n+ gevent.spawn(self._process_response, request_event, bufchan,\n timeout).link(async_result)\n return async_result\n except:\n", "old_path": "zerorpc/core.py", "rewrite": "ReplaceText(target='request_event' @(244,49)->(244,55))"} -{"repo": "https://:@github.com/CellProfiling/cam_acq.git", "hash": "ff589fdfb73715b09fe27ffd8a2040ae286eca4c", "diff": "@@ -191,7 +191,7 @@ class CamImage(Base):\n \"\"\"Return the part of the name of the image, matching regex.\"\"\"\n if path is None:\n path = self.path\n- return super(CamImage, self).get_name(path, regex)\n+ return super(CamImage, self).get_name(regex, path)\n \n def make_proj(self, path_list):\n \"\"\"Make a dict of max projections from a list of image paths.\n", "old_path": "camacq/image.py", "rewrite": "ArgSwap(idxs=0<->1 @(194,15)->(194,45))"} -{"repo": "https://:@github.com/mvrozanti/youtube-curses.git", "hash": "f4d58ba3be350a25dd70c607be565ac8a21ad1ff", "diff": "@@ -107,7 +107,7 @@ try:\n \t\t\tstdscr.addstr(1,0,\"too small\")\n \t\tkey = stdscr.getch()\n \t\tif key == curses.KEY_DOWN:\n-\t\t\tif highlight + page * maxitems + 1 != totalitems:\n+\t\t\tif highlight + page * maxitems + 1 < totalitems:\n \t\t\t\tif highlight + 1 == maxitems:\n \t\t\t\t\tpage += 1\n \t\t\t\t\thighlight = 0\n", "old_path": "twitch-curses.py", "rewrite": "ReplaceText(target='<' @(110,38)->(110,40))"} -{"repo": "https://:@github.com/seblin/shcol.git", "hash": "96a07be4ba75dcd00374dbf0bf69aabf55bedf36", "diff": "@@ -51,7 +51,7 @@ class ColumnWidthCalculator(object):\n item_widths = [len(item) for item in items]\n if not item_widths:\n column_widths, num_lines = [], 0\n- elif any(width > self.max_line_width for width in item_widths):\n+ elif any(width >= self.max_line_width for width in item_widths):\n column_widths, num_lines = [self.max_line_width], len(item_widths)\n else:\n column_widths, num_lines = self.calculate_columns(item_widths)\n", "old_path": "shcol.py", "rewrite": "ReplaceText(target='>=' @(54,23)->(54,24))"} -{"repo": "https://:@github.com/biothings/biothings_explorer.git", "hash": "aaf17dd35289147c1eb701f6739e576a16a08ca1", "diff": "@@ -41,7 +41,7 @@ class ConnectTwoConcepts():\n print('q2 original nodes', q2.G.nodes())\n q2_subset = q2.G.subgraph(q1_common + [self.output_values])\n print('q2_subset nodes', q2_subset.nodes())\n- self.G = nx.compose(q1_subset, q2_subset)\n+ self.G = nx.compose(q2_subset, q1_subset)\n \n def visualize(self):\n return visualize(self.G.edges())\n", "old_path": "biothings_explorer/connect.py", "rewrite": "ArgSwap(idxs=0<->1 @(44,21)->(44,31))"} -{"repo": "https://:@github.com/QwilApp/gasofo.git", "hash": "839d7bf88cc2ccbc92b980502586614db35b4f42", "diff": "@@ -144,7 +144,7 @@ class ServiceMetaclass(type):\n raise UnknownPort('{}.{} references undeclared Needs - {}'.format(\n class_name,\n attr_name,\n- ', '.join(sorted(deps_used))\n+ ', '.join(sorted(invalid_ports))\n ))\n \n unused_needs = needs_ports_defined.difference(all_deps_used)\n", "old_path": "gasofo/service.py", "rewrite": "ReplaceText(target='invalid_ports' @(147,41)->(147,50))"} -{"repo": "https://:@github.com/mila-udem/blocks.git", "hash": "8f71ba948707c3bc7ddbe28e0bfb2a6f26c2f626", "diff": "@@ -274,7 +274,7 @@ class Application(object):\n annotations = getattr(copy.tag, 'annotations', []) + [brick, call]\n copy.tag.annotations = annotations\n copy.tag.name = name # Blocks name\n- VariableRole.add_role(variable, role)\n+ VariableRole.add_role(copy, role)\n return copy\n \n for i, input_ in enumerate(args):\n", "old_path": "blocks/bricks/base.py", "rewrite": "ReplaceText(target='copy' @(277,34)->(277,42))"} -{"repo": "https://:@github.com/mila-udem/blocks.git", "hash": "a8c99adf643eb8c4edb40acd9c95210a07b36aea", "diff": "@@ -28,7 +28,7 @@ def test_gaussian():\n rng = numpy.random.RandomState(1)\n \n def check_gaussian(rng, mean, std, shape):\n- weights = IsotropicGaussian(mean, std).generate(rng, shape)\n+ weights = IsotropicGaussian(std, mean).generate(rng, shape)\n assert weights.shape == shape\n assert weights.dtype == theano.config.floatX\n assert_allclose(weights.mean(), mean, atol=1e-2)\n", "old_path": "tests/test_initialization.py", "rewrite": "ArgSwap(idxs=0<->1 @(31,18)->(31,35))"} -{"repo": "https://:@github.com/mila-udem/blocks.git", "hash": "a76f7c437ff32103fd9a66c31a1fbcc963dcc82e", "diff": "@@ -105,7 +105,7 @@ def inject_parameter_values(bricks, param_values):\n \n params = bricks.get_params()\n for name in params.keys():\n- if name not in params:\n+ if name not in param_values:\n logger.error(\"No value is provided for the parameter {}\"\n .format(name))\n \n", "old_path": "blocks/serialization.py", "rewrite": "ReplaceText(target='param_values' @(108,23)->(108,29))"} -{"repo": "https://:@github.com/mila-udem/blocks.git", "hash": "54dd52f080177aede81a63f58b276dd1e9cfc915", "diff": "@@ -622,7 +622,7 @@ class VariableClipping(StepRule):\n def compute_step(self, param, previous_step):\n if any(axis >= previous_step.ndim for axis in self.axes):\n raise ValueError(\"Invalid axes {} for {}, ndim={}\".format(\n- self.axes, param, param.ndim))\n+ self.axes, param, previous_step.ndim))\n squares = tensor.sqr(previous_step)\n if len(self.axes) == 0:\n norms = l2_norm([previous_step])\n", "old_path": "blocks/algorithms/__init__.py", "rewrite": "ReplaceText(target='previous_step' @(625,34)->(625,39))"} -{"repo": "https://:@github.com/jeremiedecock/pywi-cta.git", "hash": "51ea19f5d8cec9f4759eb8079dc4c01295719577", "diff": "@@ -228,7 +228,7 @@ class AbstractCleaningAlgorithm(object):\n image_dict[\"img_cleaned_max_pe\"] = float(np.nanmax(cleaned_img))\n image_dict[\"img_cleaned_num_pix\"] = int( (cleaned_img[np.isfinite(cleaned_img)] > 0).sum() )\n \n- cleaned_img1d = geometry_converter.image_2d_to_1d(reference_img, fits_metadata_dict['cam_id'])\n+ cleaned_img1d = geometry_converter.image_2d_to_1d(cleaned_img, fits_metadata_dict['cam_id'])\n hillas_params_2_cleaned_img = get_hillas_parameters(geom1d, cleaned_img1d, HILLAS_IMPLEMENTATION) # GEOM\n \n image_dict[\"img_cleaned_hillas_2_size\"] = float(hillas_params_2_cleaned_img.size)\n", "old_path": "datapipe/denoising/abstract_cleaning_algorithm.py", "rewrite": "ReplaceText(target='cleaned_img' @(231,74)->(231,87))"} -{"repo": "https://:@github.com/jeremiedecock/pywi-cta.git", "hash": "339e74ccf897012a30b4077d3ffa81a37bb005b9", "diff": "@@ -171,7 +171,7 @@ class ObjectiveFunction:\n filter_thresholds_str = \",\".join([str(sigma) for sigma in filter_thresholds])\n \n # Check the length of filter_thresholds_str is consistent with self.num_scales\n- if len(filter_thresholds_str) != (self.num_scales - 1):\n+ if len(filter_thresholds) != (self.num_scales - 1):\n raise ValueError(\"The tested solution has a wrong number of dimensions: \"\n \"{} instead of {}\".format(len(filter_thresholds),\n self.num_scales - 1))\n", "old_path": "pywicta/optimization/objectivefunc/wavelets_mrfilter.py", "rewrite": "ReplaceText(target='filter_thresholds' @(174,15)->(174,36))"} -{"repo": "https://:@github.com/ros/urdf_parser_py.git", "hash": "c0183ac51435815923a9a8aab17698ae29230338", "diff": "@@ -237,7 +237,7 @@ class Inertial(object):\n mass=0.0, origin=None):\n self.matrix = {}\n self.matrix['ixx'] = ixx\n- self.matrix['ixy'] = iyy\n+ self.matrix['ixy'] = ixy\n self.matrix['ixz'] = ixz\n self.matrix['iyy'] = iyy\n self.matrix['iyz'] = iyz\n", "old_path": "src/urdf_parser_py/urdf.py", "rewrite": "ReplaceText(target='ixy' @(240,29)->(240,32))"} -{"repo": "https://:@github.com/Faithforus/Colour-printing.git", "hash": "f927c250c967ea52a74d60587a9709bc9a073454", "diff": "@@ -17,7 +17,7 @@ class Markers:\n self.__cal_flag_len()\n \n def __cal_flag_len(self):\n- if Markers.__flag_len < len(self.__flag_name):\n+ if Markers.__flag_len <= len(self.__flag_name):\n Markers.__flag_len = len(self.__flag_name)+2\n \n def message_style(self, mode='', fore='', back=''):\n", "old_path": "colour_printing/custom/markers.py", "rewrite": "ReplaceText(target='<=' @(20,30)->(20,31))"} -{"repo": "https://:@github.com/ccarocean/pyrads.git", "hash": "11fd786460c69972560cb02cce0a8b8b8a9ab2c9", "diff": "@@ -82,7 +82,7 @@ def ensure_open(\n .. seealso:: :func:`open`\n \"\"\"\n if hasattr(file, \"read\"):\n- if closeio:\n+ if not closeio:\n return cast(IO[Any], _NoCloseIOWrapper(file))\n return cast(IO[Any], file)\n return open(\n", "old_path": "rads/utility.py", "rewrite": "ReplaceText(target='not ' @(85,11)->(85,11))"} -{"repo": "https://:@github.com/paulsbond/modelcraft.git", "hash": "688d05f50a4c1ded44fdd3d0309fbeaadf762807", "diff": "@@ -88,7 +88,7 @@ class Pipeline():\n def refmac(self, cycles):\n directory = self.job_directory(\"refmac\")\n use_phases = self.args.unbiased and self.min_rwork > 0.35\n- job = Refmac(self.args, directory, self.current_xyz, use_phases, cycles)\n+ job = Refmac(self.args, directory, self.current_xyz, cycles, use_phases)\n self.jobs[self.cycle].append(job)\n self.current_hkl = job.hklout\n self.current_xyz = job.xyzout\n", "old_path": "modelcraft/pipeline.py", "rewrite": "ArgSwap(idxs=3<->4 @(91,14)->(91,20))"} -{"repo": "https://:@github.com/gaoyunzhi/readee.git", "hash": "699c229fdcc1ddd2dd52b72d7b7e4b4da76a7585", "diff": "@@ -33,7 +33,7 @@ def _tagReplace(soup, args = {}):\n \t\tif len(children) != 1 or not isinstance(children[0], str):\n \t\t\tcontinue\n \t\tto_replace = None\n-\t\tif l.parent.name != 'blockquote': # douban status specific\n+\t\tif l.parent.name == 'blockquote': # douban status specific\n \t\t\tto_replace = l.parent\n \t\tif 'review-content' in str(l.parent.attrs): # douban reviews specific\n \t\t\tto_replace = l\n", "old_path": "readee/tag_replace.py", "rewrite": "ReplaceText(target='==' @(36,19)->(36,21))"} -{"repo": "https://:@github.com/bkad/gevent.git", "hash": "3444f110d767c8985127c4421c4f79f206122ad5", "diff": "@@ -313,7 +313,7 @@ def _parse_address(address):\n host = ''\n return family, (host, int(port))\n else:\n- return _socket.AF_INET, ('', int(port))\n+ return _socket.AF_INET, ('', int(address))\n elif isinstance(address, integer_types):\n return _socket.AF_INET, ('', int(address))\n else:\n", "old_path": "gevent/baseserver.py", "rewrite": "ReplaceText(target='address' @(316,45)->(316,49))"} -{"repo": "https://:@github.com/jerith/txTwitter.git", "hash": "05cb3871bd345ea0850b223388f37f5a7cf5c3c5", "diff": "@@ -517,7 +517,7 @@ class FakeTwitterAPI(object):\n self._twitter_data.iter_tweets_from(user_id), count, since_id,\n max_id)\n if exclude_replies:\n- tweets = [tweet for tweet in tweets if tweet.reply_to is not None]\n+ tweets = [tweet for tweet in tweets if tweet.reply_to is None]\n if include_rts is not None:\n raise NotImplementedError(\"exclude_rts param\")\n return [\n", "old_path": "txtwitter/tests/fake_twitter.py", "rewrite": "ReplaceText(target=' is ' @(520,65)->(520,73))"} -{"repo": "https://:@github.com/rainwoodman/gaepsi.git", "hash": "2a3b9fca6494eeb84a68cd82e4c8bd1e04f7652f", "diff": "@@ -49,7 +49,7 @@ class Snapshot:\n return [self.P[ptype][bn] for bn in blocknames]\n \n def has(self, blockname, ptype):\n- return self.reader.has_block(self, ptype, blockname)\n+ return self.reader.has_block(self, blockname, ptype)\n \n def save_header(self):\n self.reader.write_header(self)\n", "old_path": "snapshot.py", "rewrite": "ArgSwap(idxs=1<->2 @(52,11)->(52,32))"} -{"repo": "https://:@github.com/staffanm/ferenda.git", "hash": "250cc870c14cbb8089ffd9b1f4dab44865ab4e7d", "diff": "@@ -4,7 +4,7 @@ from ferenda.sources.legal.se import SwedishLegalSource\n \n class LocalURI(SwedishLegalSource):\n def infer_triples(self, d, basefile=None):\n- super(self, LocalURI).infer_triples(d,basefile)\n+ super(LocalURI, self).infer_triples(d,basefile)\n canonicalminter = ...\n sameas = self.canonicalminter(d)\n d.rel(OWL.sameAs, sameas)\n", "old_path": "lagen/nu/localuri.py", "rewrite": "ArgSwap(idxs=0<->1 @(7,8)->(7,13))"} -{"repo": "https://:@github.com/staffanm/ferenda.git", "hash": "268b56a25bb57f04675661603eea670fe33d7085", "diff": "@@ -458,7 +458,7 @@ class Offtryck(SwedishLegalSource):\n else:\n initialstate['pageno'] = lastpagebreak.ordinal + 1\n allbody += body[:]\n- self.validate_body(body, basefile) # Throws exception if invalid\n+ self.validate_body(allbody, basefile) # Throws exception if invalid\n return allbody\n except Exception as e:\n errmsg = str(e)\n", "old_path": "ferenda/sources/legal/se/offtryck.py", "rewrite": "ReplaceText(target='allbody' @(461,35)->(461,39))"} -{"repo": "https://:@github.com/staffanm/ferenda.git", "hash": "133ebd33435acb8a7d6ed611341c50755881538e", "diff": "@@ -56,7 +56,7 @@ class TestGlue(unittest.TestCase):\n self._f('')\n textbox = self._p('Det \u00e4r nu h\u00f6g tid att g\u00f6ra en kraftsamling f\u00f6r informationsf\u00f6rs\u00f6rj-')\n prevbox = self._p('ningen till forskning och utbildning.')\n- self.assertTrue(self.gluefunc(prevbox, prevbox, textbox))\n+ self.assertTrue(self.gluefunc(textbox, prevbox, textbox))\n textbox = textbox + prevbox\n nextbox = self._p(' Den tekniska utvecklingen g\u00e5r ')\n self.assertTrue(self.gluefunc(textbox, nextbox, prevbox))\n", "old_path": "test/integrationOfftryck.py", "rewrite": "ReplaceText(target='textbox' @(59,38)->(59,45))"} -{"repo": "https://:@github.com/staffanm/ferenda.git", "hash": "699fb245c4cb447a0f8cf7d4fd62bbb1d6efcfec", "diff": "@@ -986,7 +986,7 @@ with the *config* object as single parameter.\n if response.status_code == 304:\n self.log.debug(\"%s: 304 Not modified\" % url)\n return False # ie not updated\n- elif response.status_code > 400:\n+ elif response.status_code >= 400:\n self.log.error(\"Failed to retrieve %s\" % url)\n response.raise_for_status()\n \n", "old_path": "ferenda/documentrepository.py", "rewrite": "ReplaceText(target='>=' @(989,34)->(989,35))"} -{"repo": "https://:@github.com/staffanm/ferenda.git", "hash": "158f09f9d9152ccb71b1af4a60a17e53349f0226", "diff": "@@ -561,7 +561,7 @@ class Offtryck(SwedishLegalSource):\n # fix the json file at pagemapping_path as well?\n for idx, page in enumerate(sanitized):\n sanitized[idx].number = idx + 1\n- sanitized[idx].src = \"%s/sid%s.png\" % (basefile, idx+1)\n+ sanitized[idx].src = \"%s/sid%s.png\" % (baseuri, idx+1)\n else:\n analyzer = sanitized.analyzer\n if not os.path.exists(pagemapping_path) or self.config.force:\n", "old_path": "ferenda/sources/legal/se/offtryck.py", "rewrite": "ReplaceText(target='baseuri' @(564,55)->(564,63))"} -{"repo": "https://:@github.com/pyopenapi/pyopenapi.git", "hash": "fbe951506252bffe083942c246736bca14f13a4c", "diff": "@@ -30,7 +30,7 @@ class SwaggerApp(BaseObj):\n # default initialization is passing the url\n # you can override this behavior by passing an\n # initialized getter object.\n- local_getter = getter(url)\n+ local_getter = local_getter(url)\n \n ctx = ResourceListContext(None, local_getter)\n ctx.parse()\n", "old_path": "pyopenapi/core.py", "rewrite": "ReplaceText(target='local_getter' @(33,27)->(33,33))"} -{"repo": "https://:@github.com/pyopenapi/pyopenapi.git", "hash": "54bdc346b45deb8277831a7ac70886bc81568696", "diff": "@@ -39,7 +39,7 @@ class ScopeDict(dict):\n \n def __init__(self, sep=SCOPE_SEPARATOR):\n self.__sep = sep\n- super(self, ScopeDict).__init__()\n+ super(ScopeDict, self).__init__()\n \n def __getitem__(self, *keys):\n \"\"\" to access an obj with key: 'n!##!m...!##!z', caller can pass as key:\n", "old_path": "pyopenapi/utils.py", "rewrite": "ArgSwap(idxs=0<->1 @(42,8)->(42,13))"} -{"repo": "https://:@github.com/clindatsci/dicomweb-client.git", "hash": "a8426098bf10c893366be9043bc3366a47c22b48", "diff": "@@ -1427,7 +1427,7 @@ class DICOMwebClient(object):\n response = self._session.post(\n url=url,\n data=data_chunks,\n- headers=headers\n+ headers=chunked_headers\n )\n else:\n response = self._session.post(url=url, data=data, headers=headers)\n", "old_path": "src/dicomweb_client/api.py", "rewrite": "ReplaceText(target='chunked_headers' @(1430,24)->(1430,31))"} -{"repo": "https://:@github.com/clindatsci/dicomweb-client.git", "hash": "e9d9410e7de9108e6cda82c5c44a3fb177e32163", "diff": "@@ -403,7 +403,7 @@ class DICOMwebClient(object):\n self._session.proxies = proxies\n if callback is not None:\n self._session.hooks = {'response': [callback, ]}\n- if chunk_size is not None:\n+ if chunk_size is None:\n # There is a bug in the requests library that sets the Host header\n # again when using chunked transer encoding. Apparently this is\n # tricky to fix (see https://github.com/psf/requests/issues/4392).\n", "old_path": "src/dicomweb_client/api.py", "rewrite": "ReplaceText(target=' is ' @(406,21)->(406,29))"} -{"repo": "https://:@gitlab.com/koala-lms/django-learning.git", "hash": "600bf3b8691699936ebffccd7f31f2f937eab388", "diff": "@@ -88,7 +88,7 @@ class ActivityCreateOnCourseView(LoginRequiredMixin, PermissionRequiredMixin, Up\n \n def form_invalid(self, form):\n for sub_form in form:\n- update_valid_or_invalid_form_fields(form)\n+ update_valid_or_invalid_form_fields(sub_form)\n for error in sub_form.errors:\n messages.error(self.request, sub_form.errors[error])\n return self.get_success_url()\n", "old_path": "learning/views/activity.py", "rewrite": "ReplaceText(target='sub_form' @(91,48)->(91,52))"} -{"repo": "https://:@github.com/finderseyes/upkit.git", "hash": "5f39342aa3261683f3aa675617c9f505409c346f", "diff": "@@ -172,7 +172,7 @@ class PackageLinker(object):\n item_source = os.path.abspath(os.path.join(source, item['source']))\r\n item_target = os.path.abspath(self._render_template(item['target'], params))\r\n \r\n- content = package_linkspec.get('content', None)\r\n+ content = item.get('content', None)\r\n if not content:\r\n utils.fs_link(item_source, item_target, hard_link=True, forced=forced)\r\n else:\r\n", "old_path": "unity_tools/package_linker.py", "rewrite": "ReplaceText(target='item' @(175,26)->(175,42))"} -{"repo": "https://:@github.com/spoorcc/cppumockify.git", "hash": "8b4f2089cda3cc3071cd8fb5d83a36c5f6b0552b", "diff": "@@ -82,7 +82,7 @@ class MockError(Exception):\n def generate_mock(mocked_module, mock_prototype):\n ''' Generates the mock '''\n mock_filename = \"{0}_mock.cpp\".format(mocked_module)\n- include_filename = \"{0}.h\".format(mock_filename)\n+ include_filename = \"{0}.h\".format(mocked_module)\n logger.debug(\"working directory: %s\", os.getcwd())\n logger.debug(\"mock_filename: %s\", mock_filename)\n logger.debug(\"include_filename: %s\", include_filename)\n", "old_path": "cppumockify.py", "rewrite": "ReplaceText(target='mocked_module' @(85,38)->(85,51))"} -{"repo": "https://:@github.com/pigmonkey/django-vellum.git", "hash": "f8edc139fe9f8a6d6e63af6d6b1a2a42d3c38002", "diff": "@@ -208,7 +208,7 @@ def tag_detail(request, slug, page=0, **kwargs):\n \n return list_detail.object_list(\n request,\n- queryset=Post.objects.filter(tags__name__in=[slug]),\n+ queryset=Post.objects.filter(tags__name__in=[tag]),\n paginate_by=blog_settings.BLOG_PAGESIZE,\n page=page,\n extra_context={\n", "old_path": "basic/blog/views.py", "rewrite": "ReplaceText(target='tag' @(211,53)->(211,57))"} -{"repo": "https://:@github.com/asoroa/ical2org.py.git", "hash": "ac33b4760b1d87eb35ce9892e329dc6926d83f57", "diff": "@@ -63,7 +63,7 @@ def recurring_event_days(event_start, event_end, delta_str, start_utc, end_utc):\n else :\n event_aux = event_start\n \n- while event_aux < end_utc:\n+ while event_aux <= end_utc:\n result.append( (event_aux, event_aux.tzinfo.normalize(event_aux + event_duration), 1) )\n event_aux = add_delta_dst(event_aux, delta)\n return result\n", "old_path": "ical2org.py", "rewrite": "ReplaceText(target='<=' @(66,20)->(66,21))"} -{"repo": "https://:@github.com/PaloAltoNetworks/ansible-pan.git", "hash": "370d08e2204b387e30596c6cec3ddb388acc11dc", "diff": "@@ -434,7 +434,7 @@ def main():\n if destination_lower <= obj <= destination_upper:\n destination_ip_match = True\n else:\n- if source_ip == object_string:\n+ if destination_ip == object_string:\n destination_ip_match = True\n if isinstance(obj, objects.AddressObject) and addr_in_obj(destination_ip, obj):\n destination_ip_match = True\n", "old_path": "library/panos_query_rules.py", "rewrite": "ReplaceText(target='destination_ip' @(437,31)->(437,40))"} -{"repo": "https://:@github.com/bond005/impartial_text_cls.git", "hash": "d81895309fc7a26004fb50e5b5ced3fd62307c46", "diff": "@@ -97,7 +97,7 @@ class ImpatialTextClassifier(BaseEstimator, ClassifierMixin):\n if self.verbose:\n lengths_of_texts = []\n sum_of_lengths = 0\n- for sample_idx in range(len(y_train_)):\n+ for sample_idx in range(len(y_train_tokenized)):\n lengths_of_texts.append(sum(X_train_tokenized[1][sample_idx]))\n sum_of_lengths += lengths_of_texts[-1]\n if X_unlabeled_tokenized is not None:\n", "old_path": "impatial_text_cls/impatial_text_cls.py", "rewrite": "ReplaceText(target='y_train_tokenized' @(100,40)->(100,48))"} -{"repo": "https://:@bitbucket.org/padraicshafer/pkgscript.git", "hash": "2839ec817483697e30480486957df7e82994eae1", "diff": "@@ -131,7 +131,7 @@ def get_versions():\n pass\n \n return_key_values = _get_versions()\n- return_key_values[\"authors\"] = pieces[\"authors\"]\n+ return_key_values[\"authors\"] = default_keys_values[\"authors\"]\n return return_key_values\n \n \n", "old_path": "pkgscript/version.py", "rewrite": "ReplaceText(target='default_keys_values' @(134,35)->(134,41))"} -{"repo": "https://:@github.com/rpatterson/iiswsgi.git", "hash": "5be4e27875d2e28bfe7148ecc90b995c6e32c828", "diff": "@@ -43,7 +43,7 @@ app_attr_defaults_init = dict(\n def get_web_config_apps(web_config):\n doc = minidom.parse(web_config)\n for fcgi in doc.getElementsByTagName(\"fastCgi\"):\n- for app in doc.getElementsByTagName(\"application\"):\n+ for app in fcgi.getElementsByTagName(\"application\"):\n yield dict((key, value) for key, value in app.attributes.items())\n \n \n", "old_path": "iiswsgi/deploy.py", "rewrite": "ReplaceText(target='fcgi' @(46,19)->(46,22))"} -{"repo": "https://:@github.com/Sebatyne/django-feed-manager.git", "hash": "d54f6eb66e1e6fd5b848fcb1d330eccadf3e369c", "diff": "@@ -48,7 +48,7 @@ class FeedView(SyndicationFeed):\n @csrf_exempt\n def createAccount(request):\n if 'username' not in request.POST \\\n- or 'password' not in request.POST:\n+ and 'password' not in request.POST:\n return HttpResponse(status=500)\n \n user = User.objects.create_user(request.POST['username'], password=request.POST['password'], is_active=False)\n", "old_path": "feedmanager/views.py", "rewrite": "ReplaceText(target='and' @(51,12)->(51,14))"} -{"repo": "https://:@github.com/pjdelport/django-payfast.git", "hash": "8b9de727d901a6698a8f7118d73ffb5e8d7fa1d0", "diff": "@@ -32,7 +32,7 @@ def data_is_valid(post_data, postback_url=POSTBACK_URL):\n \"\"\"\n post_str = urlencode(_values_to_encode(post_data))\n try:\n- response = urllib2.urlopen(postback_url, post_data).read()\n+ response = urllib2.urlopen(postback_url, post_str).read()\n except urllib2.HTTPError:\n return None\n if response == 'VALID':\n", "old_path": "payfast/api.py", "rewrite": "ReplaceText(target='post_str' @(35,49)->(35,58))"} -{"repo": "https://:@github.com/engdan77/tasks_collector.git", "hash": "80b4eb078fcfec4fdc9c24632f779dddd1e17822", "diff": "@@ -370,7 +370,7 @@ def get_lowest_value(input_dict_list: Dict, key_name: str) -> int:\n for d in input_dict_list:\n current_value = d[key_name]\n if type(current_value) is int:\n- if current_value < lowest:\n+ if current_value >= lowest:\n lowest = current_value\n return lowest\n \n", "old_path": "tasks_collector/reportgenerator/api.py", "rewrite": "ReplaceText(target='>=' @(373,29)->(373,30))"} -{"repo": "https://:@github.com/Princeton-CDH/django-annotator-store.git", "hash": "4572a52a6ec49dc039b9b2b06039e2698e638bdb", "diff": "@@ -46,7 +46,7 @@ def search(request):\n if 'collection' in request.GET:\n filter_val = request.GET['collection']\n # filter the solr query based on the requested collection\n- q = solr.query(collection_label='\"%s\"' % filter_val)\n+ q = q.query(collection_label='\"%s\"' % filter_val)\n # generate link to remove the facet\n unfacet_urlopts = url_params.copy()\n del unfacet_urlopts['collection']\n", "old_path": "readux/books/views.py", "rewrite": "ReplaceText(target='q' @(49,16)->(49,20))"} -{"repo": "https://:@github.com/unlearnai/genemunge.git", "hash": "84d323239f43571ccc95bb80caa76fbac464d917", "diff": "@@ -108,7 +108,7 @@ def create_tissue_stats():\n fraction_zero, pandas.DataFrame(\n (tpm == 0).mean().astype(float), columns=[t])], axis=1)\n # Convert tpms to clr with 0.5*min imputation\n- clr = norm.clr_from_tpm(tissue_expression, imputer=normalize.impute)\n+ clr = norm.clr_from_tpm(tpm, imputer=normalize.impute)\n mean_clr = pandas.concat(\n [mean_clr, pandas.DataFrame(clr.mean(), columns=[t])], axis=1)\n median_clr = pandas.concat(\n", "old_path": "genemunge/data/gtex/process_gtex.py", "rewrite": "ReplaceText(target='tpm' @(111,32)->(111,49))"} -{"repo": "https://:@github.com/robotpt/interaction-engine.git", "hash": "e12a35db12e4e97431f0c5be18034c545fa0dc48", "diff": "@@ -90,7 +90,7 @@ class TextPopulator:\n else:\n default_value = None\n \n- if DatabasePopulator.Tags.POST_OP in kwargs and is_test:\n+ if DatabasePopulator.Tags.POST_OP in kwargs and not is_test:\n fn = kwargs[DatabasePopulator.Tags.POST_OP]\n value = self._database_populator.get_replacement(\n key,\n", "old_path": "text_populator/populator.py", "rewrite": "ReplaceText(target='not ' @(93,60)->(93,60))"} -{"repo": "https://:@github.com/Storj/storj-kademlia.git", "hash": "61631b21db3a4204bef38431799244fda90e7e4d", "diff": "@@ -9,7 +9,7 @@ from kademlia.log import Logger\n class KademliaProtocol(RPCProtocol):\n def __init__(self, sourceNode, storage, ksize):\n RPCProtocol.__init__(self)\n- self.router = RoutingTable(self, sourceNode, ksize)\n+ self.router = RoutingTable(self, ksize, sourceNode)\n self.storage = storage\n self.sourceID = sourceNode.id\n self.log = Logger(system=self)\n", "old_path": "kademlia/protocol.py", "rewrite": "ArgSwap(idxs=1<->2 @(12,22)->(12,34))"} -{"repo": "https://:@github.com/ProbonoBonobo/dash.git", "hash": "765a58e651914b5f51939b5d869d1dcdc0f094f5", "diff": "@@ -49,7 +49,7 @@ class Dash(object):\n secret_key = os.environ.get(\n secret_key_name, SeaSurf()._generate_token()\n )\n- os.environ[secret_key_name] = secret_key_name\n+ os.environ[secret_key_name] = secret_key\n self.server.secret_key = secret_key\n \n if filename is not None:\n", "old_path": "dash/dash.py", "rewrite": "ReplaceText(target='secret_key' @(52,42)->(52,57))"} -{"repo": "https://:@github.com/ProbonoBonobo/dash.git", "hash": "84c52140b8e9f2dd7ce088ff6e78d91e9c605fe9", "diff": "@@ -185,7 +185,7 @@ class TestGenerateClasses(unittest.TestCase):\n 'default_namespace'\n )\n \n- generate_classes(METADATA_PATH, 'default_namespace')\n+ generate_classes('default_namespace', METADATA_PATH)\n from default_namespace.MyComponent import MyComponent \\\n as MyComponent_buildtime\n from default_namespace.A import A as A_buildtime\n", "old_path": "tests/development/test_component_loader.py", "rewrite": "ArgSwap(idxs=0<->1 @(188,8)->(188,24))"} -{"repo": "https://:@bitbucket.org/ptr-yudai/ptrlib.git", "hash": "094080b5205972ee6bc845d9f29823015885f52b", "diff": "@@ -82,7 +82,7 @@ class Socket(Tube):\n recv_size = size\n while read_byte < size:\n data += self.sock.recv(recv_size)\n- read_byte += len(data)\n+ read_byte = len(data)\n recv_size = size - read_byte\n except socket.timeout:\n dump(\"recv: Timeout\", \"error\")\n", "old_path": "ptrlib/pwn/sock.py", "rewrite": "ReplaceText(target='=' @(85,26)->(85,28))"} -{"repo": "https://:@github.com/brndnmtthws/tweet-delete.git", "hash": "3ac99e2b0278b8348595d056678baa8514d6d7d3", "diff": "@@ -122,7 +122,7 @@ class Deleter:\n # same tweets as the previous run\n favourite_counts = []\n retweet_counts = []\n- while len(statuses) > 0 and (last_max_id is None or last_min_id is not None or last_min_id < last_max_id):\n+ while len(statuses) > 0 and (last_max_id is None or last_min_id is None or last_min_id < last_max_id):\n statuses = self.api.GetUserTimeline(\n include_rts=True,\n exclude_replies=False,\n", "old_path": "tweet_delete/deleter.py", "rewrite": "ReplaceText(target=' is ' @(125,71)->(125,79))"} -{"repo": "https://:@github.com/fantasticfears/kgegrok.git", "hash": "cc7f0c2a3ed727b7f2cc656c6205be6e08be9f23", "diff": "@@ -15,7 +15,7 @@ def _evaluate_predict_element(model, triple_index, num_expands, element_type, ra\n logging.debug(element_type)\n logging.debug(\"Batch len: \" + str(len(batch)) + \"; batch sample: \" + str(batch[0]))\n predicted_batch = model.forward(batch).cpu()\n- logging.debug(\"Predicted batch len\" + str(len(batch)) + \"; batch sample: \" + str(predicted_batch[0]))\n+ logging.debug(\"Predicted batch len\" + str(len(predicted_batch)) + \"; batch sample: \" + str(predicted_batch[0]))\n rank, filtered_rank = rank_fn(predicted_batch.data.numpy(), triple_index)\n logging.debug(\"Rank :\" + str(rank) + \"; Filtered rank length :\" + str(filtered_rank))\n ranks_list.append(rank)\n", "old_path": "estimate.py", "rewrite": "ReplaceText(target='predicted_batch' @(18,50)->(18,55))"} -{"repo": "https://:@github.com/fantasticfears/kgegrok.git", "hash": "9e6c504d07c0faaebf7f5f4ec46509ba0c71622c", "diff": "@@ -122,7 +122,7 @@ def train_and_validate(triple_source,\n stats.report_prediction_result(\n config, result, epoch=i_epoch, drawer=drawer)\n \n- if config.save_per_epoch != 0 and i_epoch % config.save_per_epoch:\n+ if config.save_per_epoch > 0 and i_epoch % config.save_per_epoch:\n save_checkpoint({\n 'epoch': i_epoch,\n 'state_dict': model.state_dict(),\n", "old_path": "kgexpr/estimate.py", "rewrite": "ReplaceText(target='>' @(125,33)->(125,35))"} -{"repo": "https://:@github.com/klem4/panacea.git", "hash": "feef5bb935bd8fb1626dbf9670a24ed858133473", "diff": "@@ -39,7 +39,7 @@ def cache_thing(model, cache_key, data, cond_dnf=[[]], timeout=None):\n \n # Write data to cache\n if timeout is not None:\n- txn.setex(cache_key, data, timeout)\n+ txn.setex(cache_key, timeout, data)\n else:\n txn.set(cache_key, data)\n \n", "old_path": "panacea/tools.py", "rewrite": "ArgSwap(idxs=1<->2 @(42,8)->(42,17))"} -{"repo": "https://:@github.com/mrk-its/s3fs.git", "hash": "b5a5e712b40da1938760fce0095a9f9d99a436fc", "diff": "@@ -23,7 +23,7 @@ class S3FSOpener(Opener):\n strict = (\n parse_result.params[\"strict\"] == \"1\"\n if \"strict\" in parse_result.params\n- else True\n+ else False\n )\n s3fs = S3FS(\n bucket_name,\n", "old_path": "fs_s3fs/opener.py", "rewrite": "ReplaceText(target='False' @(26,17)->(26,21))"} -{"repo": "https://:@github.com/python-trio/asyncclick.git", "hash": "336e5e08acf98a4033e5aa4c6fcef118d4f469ec", "diff": "@@ -224,7 +224,7 @@ def version_option(version=None, *param_decls, **attrs):\n message = attrs.pop('message', '%(prog)s, version %(version)s')\n \n def callback(ctx, param, value):\n- if value or ctx.resilient_parsing:\n+ if not value or ctx.resilient_parsing:\n return\n prog = prog_name\n if prog is None:\n", "old_path": "click/decorators.py", "rewrite": "ReplaceText(target='not ' @(227,15)->(227,15))"} -{"repo": "https://:@github.com/python-trio/asyncclick.git", "hash": "598c6d76fbc036fb3219d9f09948a682cda66601", "diff": "@@ -213,7 +213,7 @@ class CliRunner(object):\n old_env = {}\n try:\n for key, value in iteritems(env):\n- old_env[key] = os.environ.get(value)\n+ old_env[key] = os.environ.get(key)\n if value is None:\n try:\n del os.environ[key]\n", "old_path": "click/testing.py", "rewrite": "ReplaceText(target='key' @(216,46)->(216,51))"} -{"repo": "https://:@github.com/KonstantinTogoi/aiomailru.git", "hash": "d506e10c260e749ff986a9acfa939016faf683e8", "diff": "@@ -94,7 +94,7 @@ class TokenSession(PublicSession):\n \n for cookie in cookies:\n loose_cookie = Cookie.to_morsel(cookie)\n- loose_cookies.append((loose_cookies.key, loose_cookie))\n+ loose_cookies.append((loose_cookie.key, loose_cookie))\n \n self.session.cookie_jar.update_cookies(loose_cookies)\n \n", "old_path": "aiomailru/sessions.py", "rewrite": "ReplaceText(target='loose_cookie' @(97,34)->(97,47))"} -{"repo": "https://:@github.com/muma378/moose.git", "hash": "7068cc3a5636a5bebd005af13e601e5a6bddeefd", "diff": "@@ -101,7 +101,7 @@ class ConfigLoader(object):\n \t\t\t\tcontent = self.__update_with_locales(raw_content)\n \t\t\texcept UnicodeError as e:\n \t\t\t\tresult = chardet.detect(raw_content)\n-\t\t\t\tif not result and result['encoding'] in ['ascii', settings.FILE_CHARSET]:\n+\t\t\t\tif not result or result['encoding'] in ['ascii', settings.FILE_CHARSET]:\n \t\t\t\t\t# Tried, but failed\n \t\t\t\t\traise ImproperlyConfigured(\n \t\t\t\t\t\t\"Unknown encoding for '%s'.\" % self.path)\n", "old_path": "moose/core/configs/loader.py", "rewrite": "ReplaceText(target='or' @(104,18)->(104,21))"} -{"repo": "https://:@github.com/S1M0N38/aao.git", "hash": "77ed1c21e6f2f4b0e51620aa044ef2192998938f", "diff": "@@ -161,7 +161,7 @@ class Soccer(Spider888sport):\n value = [''] + value\n try:\n yes, no = float(value[7]), float(value[9])\n- odds[i]['both_teams_to_score'] = {'yes': no, 'no': no}\n+ odds[i]['both_teams_to_score'] = {'yes': yes, 'no': no}\n except IndexError:\n pass\n self.log.debug(' * got both teams to score odds')\n", "old_path": "aao/spiders/spider_888sport.py", "rewrite": "ReplaceText(target='yes' @(164,57)->(164,59))"} -{"repo": "https://:@github.com/silvacms/silva.ui.git", "hash": "8012cc5c85765254d22d4313db35fcb71e98b10d", "diff": "@@ -75,7 +75,7 @@ class ContentSerializer(object):\n formatter = locale.dates.getFormatter('dateTime', 'short')\n self.format_date = lambda d: formatter.format(d.asdatetime())\n self.format_author = lambda a: a.userid()\n- if not getUtility(IMemberService).get_display_usernames():\n+ if getUtility(IMemberService).get_display_usernames():\n self.format_author = lambda a: a.fullname()\n \n def get_access(self, content):\n", "old_path": "src/silva/ui/rest/container/serializer.py", "rewrite": "ReplaceText(target='' @(78,11)->(78,15))"} -{"repo": "https://:@github.com/sglumac/pyislands.git", "hash": "d76a611240c3b2cc9b5a6cef7f503feb0919e314", "diff": "@@ -39,7 +39,7 @@ def policy_2tournament(population, immigrants):\n new_population = list(population)\n \n for immigrant in immigrants:\n- _, idxs = ktournament(population, 2)\n+ _, idxs = ktournament(2, population)\n bad_idx = idxs[1]\n \n new_population[bad_idx] = immigrant\n", "old_path": "pyislands/archipelago/immigration.py", "rewrite": "ArgSwap(idxs=0<->1 @(42,18)->(42,29))"} -{"repo": "https://:@github.com/AmyOlex/Chrono.git", "hash": "91f5ba63a7825e0b85b5b69b6d32a2336d5142ba", "diff": "@@ -264,7 +264,7 @@ def hasPartOfDay(text):\n #convert to all lower\n text_lower = text.lower()\n #remove all punctuation\n- text_norm = text.translate(str.maketrans(string.punctuation, \" \"*len(string.punctuation))).strip()\n+ text_norm = text_lower.translate(str.maketrans(string.punctuation, \" \"*len(string.punctuation))).strip()\n #convert to list\n text_list = text_norm.split(\" \")\n \n", "old_path": "Chrono/temporalTest.py", "rewrite": "ReplaceText(target='text_lower' @(267,16)->(267,20))"} -{"repo": "https://:@bitbucket.org/bgframework/bglogs.git", "hash": "20a9bb781132eaecf084c6998056e7c07c7a5df8", "diff": "@@ -81,7 +81,7 @@ def configure(_name=None, debug=False, conf=None):\n default_conf['loggers'][logger.name] = {\n 'level': logging.DEBUG if debug else logging.INFO\n }\n- if conf is not None:\n+ if conf is None:\n conf_ = default_conf\n else:\n conf_ = copy.deepcopy(default_conf)\n", "old_path": "bglogs/configuration.py", "rewrite": "ReplaceText(target=' is ' @(84,11)->(84,19))"} -{"repo": "https://:@github.com/QuailTeam/Quail.git", "hash": "4903f493bef0f297a8209f6eb4f603710396dd79", "diff": "@@ -34,7 +34,7 @@ def run(solution, installer, builder=Builder()):\n elif args.quail_uninstall:\n manager.uninstall()\n else:\n- if installer.is_installed():\n+ if manager.is_installed():\n manager.run()\n else:\n manager.install()\n", "old_path": "quail/run.py", "rewrite": "ReplaceText(target='manager' @(37,11)->(37,20))"} -{"repo": "https://:@github.com/QuailTeam/Quail.git", "hash": "5b1ac96b6b0d1707b1cd7cb5c85a222e8b782292", "diff": "@@ -20,7 +20,7 @@ def _validate_side_img(path):\n logger.warn(\"Side image not valid: height should be 250px\")\n return False\n \n- if width <= 250:\n+ if width > 250:\n logger.warn(\"Side image not valid: width should be <= 250px\")\n return False\n else:\n", "old_path": "iquail/validate/validate.py", "rewrite": "ReplaceText(target='>' @(23,21)->(23,23))"} -{"repo": "https://:@github.com/davidhalter/depl.git", "hash": "518ab778c71bbfa5d9038d623e6c658222279160", "diff": "@@ -70,7 +70,7 @@ class Config(object):\n for key, value in current.items():\n if key not in grammar:\n raise ValidationError(\"Key %s is not in grammar.\" % key)\n- result[key] = self._validate_detail(element, grammar[key])\n+ result[key] = self._validate_detail(value, grammar[key])\n else:\n # normal type\n if type(grammar) != type(current):\n", "old_path": "depl/config.py", "rewrite": "ReplaceText(target='value' @(73,52)->(73,59))"} -{"repo": "https://:@github.com/davidhalter/depl.git", "hash": "b74ad2d1308a0af5eae349f79aa87661f222621a", "diff": "@@ -20,7 +20,7 @@ def load(name, settings):\n module_dependencies, commands = module.load(settings, _Package.system())\n \n for dep in module_dependencies:\n- dep_name = dependencies[name][_Package.system()]\n+ dep_name = dependencies[dep][_Package.system()]\n yield 'sudo %s %s' % (_Package.install(), dep_name)\n for cmd in commands:\n yield cmd\n", "old_path": "depl/deploy/__init__.py", "rewrite": "ReplaceText(target='dep' @(23,32)->(23,36))"} -{"repo": "https://:@github.com/nukesor/gitalizer.git", "hash": "1b778e4064198676069d1a339a2f1faf97aad2c0", "diff": "@@ -82,7 +82,7 @@ class Repository(db.Model):\n If that is the case, we want to skip it.\n \"\"\"\n timeout_threshold = datetime.utcnow() - current_app.config['REPOSITORY_RESCAN_TIMEOUT']\n- up_to_date = self.completely_scanned and self.updated_at <= timeout_threshold\n+ up_to_date = self.completely_scanned and self.updated_at >= timeout_threshold\n \n if self.fork or self.broken or up_to_date:\n return False\n", "old_path": "gitalizer/models/repository.py", "rewrite": "ReplaceText(target='>=' @(85,65)->(85,67))"} -{"repo": "https://:@github.com/qualinext/ionosphere.git", "hash": "1a1ec05ce9fb48dfbb0362aebbb779e8ba92f3f6", "diff": "@@ -372,7 +372,7 @@ class Template(object):\n if isinstance(values, list):\n for v in values:\n if v.title in d:\n- self.handle_duplicate_key(values.title)\n+ self.handle_duplicate_key(v.title)\n d[v.title] = v\n else:\n if values.title in d:\n", "old_path": "troposphere/__init__.py", "rewrite": "ReplaceText(target='v' @(375,46)->(375,52))"} -{"repo": "https://:@github.com/natcap/ecoshard.git", "hash": "ef72a3898ccc18018f1d048211b681edb7cd29ab", "diff": "@@ -60,7 +60,7 @@ def hash_file(\n prefix = match_result.group(1)\r\n \r\n LOGGER.debug('calculating hash for %s', base_path)\r\n- hash_val = calculate_hash(base_filename, hash_algorithm)\r\n+ hash_val = calculate_hash(base_path, hash_algorithm)\r\n \r\n if target_dir is None:\r\n target_dir = os.path.dirname(base_path)\r\n", "old_path": "src/ecoshard/ecoshard.py", "rewrite": "ReplaceText(target='base_path' @(63,30)->(63,43))"} -{"repo": "https://:@github.com/natcap/ecoshard.git", "hash": "ddb17b5c75dc78ac1f0687b12d0ca0d3c1c42ff7", "diff": "@@ -37,7 +37,7 @@ def main():\n payload = {\r\n \"style\": {\r\n \"name\": style_name,\r\n- \"filename\": style_path\r\n+ \"filename\": filepath\r\n }\r\n }\r\n LOGGER.debug(payload)\r\n", "old_path": "load_to_geoserver.py", "rewrite": "ReplaceText(target='filepath' @(40,24)->(40,34))"} -{"repo": "https://:@github.com/startling/argent.git", "hash": "5353bc7b29abd2e0d2a1307496c84287becdb326", "diff": "@@ -40,7 +40,7 @@ class Argument(object):\n # `self.name` is what we get but with no underscores and all dashes.\n self.name = name.replace(\"_\", \"-\")\n # `self.underscored` is the opposite.\n- self.underscored = name.replace(\"_\", \"-\")\n+ self.underscored = name.replace(\"-\", \"_\")\n # this is the default value; can be None if there isn't one.\n self.default = default\n # if the name starts with an underscore or dash, it's a flag,\n", "old_path": "argent/arguments.py", "rewrite": "ArgSwap(idxs=0<->1 @(43,27)->(43,39))"} -{"repo": "https://:@github.com/joakimskoog/anapioficeandfire-python.git", "hash": "da65bed5110c34f62c872f55f1ffb09326940a63", "diff": "@@ -4,7 +4,7 @@\n class AnApiOfIceAndFireError(Exception):\n \n def __init__(self, reason, response=None):\n- self.reason = response\n+ self.reason = reason\n self.response = response\n Exception.__init__(self, reason)\n \n", "old_path": "anapioficeandfire/error.py", "rewrite": "ReplaceText(target='reason' @(7,22)->(7,30))"} -{"repo": "https://:@github.com/prologic/udns.git", "hash": "80988bc30391f48cd9189623043db516c0217a5a", "diff": "@@ -244,7 +244,7 @@ class Server(Component):\n )\n )\n \n- lookup = DNSRecord(q=DNSQuestion(qname, qclass, qtype))\n+ lookup = DNSRecord(q=DNSQuestion(qname, qtype, qclass))\n id = lookup.header.id\n self.peers[id] = peer\n self.requests[id] = request\n", "old_path": "udns/server.py", "rewrite": "ArgSwap(idxs=1<->2 @(247,29)->(247,40))"} -{"repo": "https://:@github.com/ShadauxCat/csbuild.git", "hash": "53b88d8dbcb6c14ed2d5155d8312142e3c1db9ff", "diff": "@@ -72,7 +72,7 @@ class project_generator_qtcreator( project_generator.project_generator ):\n \t\t# These values don't matter much as they're likely to be the same (or close enough to the same for our purposes)\n \t\t# across all targets.\n \t\tarchDict = projectDict[list(projectDict.keys())[0]]\n-\t\ttoolchainDict = projectDict[list(archDict.keys())[0]]\n+\t\ttoolchainDict = archDict[list(archDict.keys())[0]]\n \t\tproject = toolchainDict[list(toolchainDict.keys())[0]]\n \n \t\tprojectpath = os.path.join( self.rootpath, parentPath, project.name )\n", "old_path": "csbuild/project_generator_qtcreator.py", "rewrite": "ReplaceText(target='archDict' @(75,18)->(75,29))"} -{"repo": "https://:@github.com/Ciaran1981/geospatial-learn.git", "hash": "9c5a1d76e1eff22ec986f2bb6bbf2d4bb8337033", "diff": "@@ -1655,7 +1655,7 @@ def multi_temp_filter(inRas, outRas, bands=None, windowSize=None):\n if bands==None:\n bands = inDataset.RasterCount\n \n- outDataset = _copy_dataset_config(inRas, outMap = outRas,\n+ outDataset = _copy_dataset_config(inDataset, outMap = outRas,\n bands = bands)\n \n \n", "old_path": "geospatial_learn/geodata.py", "rewrite": "ReplaceText(target='inDataset' @(1658,38)->(1658,43))"} -{"repo": "https://:@github.com/oslandia/geo3dfeatures.git", "hash": "0ee727feb8ba02991c6546783c6d786ae1e63563", "diff": "@@ -195,7 +195,7 @@ def save_clusters(\n io.write_xyz(results, output_file_path)\n else:\n input_file_path = Path(datapath, \"input\", experiment + \".las\")\n- io.write_las(results, output_file_path, input_file_path)\n+ io.write_las(results, input_file_path, output_file_path)\n logger.info(\"Clusters saved into %s\", output_file_path)\n \n \n", "old_path": "geo3dfeatures/tools/kmean.py", "rewrite": "ArgSwap(idxs=1<->2 @(198,8)->(198,20))"} -{"repo": "https://:@github.com/MBravoS/splot.git", "hash": "f469d20ba0500925408bd33e90ac3ec2a2a9046d", "diff": "@@ -237,7 +237,7 @@ def scat(x,y,xlim=None,ylim=None,xinvert=False,yinvert=False,cbar_invert=False,x\n \t\tcbar.set_label(clabel)\n \t\tif cbar_invert:\n \t\t\tcbar.ax.invert_yaxis()\n-\tif plot_par[0] is not None:\n+\tif plabel[0] is not None:\n \t\tplt.legend(loc=lab_loc)\n \tif not multi:\n \t\tplot_finalizer(xlog,ylog,xlim,ylim,title,xlabel,ylabel,xinvert,yinvert)\n", "old_path": "splotch/plots_2d.py", "rewrite": "ReplaceText(target='plabel' @(240,4)->(240,12))"} -{"repo": "https://:@github.com/MBravoS/splot.git", "hash": "6a56f84589b416b32e5344de94dc23d4c8ea08e2", "diff": "@@ -603,7 +603,7 @@ def cornerplot(data,columns=None,pair_type='contour',nsamples=None,sample_type='\n \t\t\t\tif (jj == 0 and ii != 0):\n \t\t\t\t\taxes[ii,jj].set_ylabel(labels[ii])\n \t\t\t\tif (len(pair_type) == 2 and jj == npar-1 and ii != npar-1):\n-\t\t\t\t\taxes[ii,jj].set_ylabel(labels[jj])\n+\t\t\t\t\taxes[ii,jj].set_ylabel(labels[ii])\n \t\t\t\t\taxes[ii,jj].yaxis.tick_right()\n \t\t\t\t\taxes[ii,jj].yaxis.set_label_position('right')\n \n", "old_path": "src/splotch/axis_func.py", "rewrite": "ReplaceText(target='ii' @(606,35)->(606,37))"} -{"repo": "https://:@github.com/GiulioRossetti/ANGEL.git", "hash": "a04ff79e2e3625c49aebcdf4143aa62422e70172", "diff": "@@ -94,7 +94,7 @@ class ArchAngel(object):\n edge_list = []\n \n self.slices_ids.append(actual_slice)\n- yield g, actual_slice\n+ yield g, previous_slice\n \n previous_slice = actual_slice\n \n", "old_path": "angel/alg/iArchAngel.py", "rewrite": "ReplaceText(target='previous_slice' @(97,29)->(97,41))"} -{"repo": "https://:@github.com/tdi/pyPEPA.git", "hash": "98934ecf6c42e589938e607e1b075395b37586df", "diff": "@@ -55,7 +55,7 @@ def range_maker(low, hi, step):\n nonlocal hi\n nonlocal step\n cur = low\n- while cur < hi:\n+ while cur <= hi:\n yield cur\n cur += step\n return counter\n", "old_path": "pyPEPA/experiments/experiment.py", "rewrite": "ReplaceText(target='<=' @(58,18)->(58,19))"} -{"repo": "https://:@github.com/hellupline/flask-crud.git", "hash": "1760827b285ba24f20e111e8d8146e3514ca2c96", "diff": "@@ -20,7 +20,7 @@ class Tree:\n if items is not None:\n self.register_items(items)\n \n- if url is not None:\n+ if url is None:\n self.url = slugify(name)\n else:\n self.url = url\n", "old_path": "flask_crud/tree.py", "rewrite": "ReplaceText(target=' is ' @(23,14)->(23,22))"} -{"repo": "https://:@github.com/IMTMarburg/pypipegraph.git", "hash": "6a69a16a320e712e114af10cc578be7737e3a620", "diff": "@@ -173,7 +173,7 @@ if PY3:\n def reraise(tp, value, tb=None):\n if tb:\n raise tp.with_traceback(tb)\n- raise value\n+ raise tp\n else:\n def exec_(code, globs=None, locs=None):\n \"\"\"Execute code in a namespace.\"\"\"\n", "old_path": "pypipegraph/util.py", "rewrite": "ReplaceText(target='tp' @(176,14)->(176,19))"} -{"repo": "https://:@github.com/IMTMarburg/pypipegraph.git", "hash": "d4e04e455117994041e921742ee1599931a44915", "diff": "@@ -120,7 +120,7 @@ def check_closure_vars(f1, f2):\n return False\n for item_name in [\"nonlocals\"]:\n map1 = getattr(cv1, item_name)\n- map2 = getattr(cv1, item_name)\n+ map2 = getattr(cv2, item_name)\n for key in map1:\n o1 = map1[key]\n if key not in map2:\n", "old_path": "src/pypipegraph/job.py", "rewrite": "ReplaceText(target='cv2' @(123,23)->(123,26))"} -{"repo": "https://:@github.com/JJamesWWang/noteutil.git", "hash": "867e11505f85724ad5494c58419c497c978f94c6", "diff": "@@ -81,7 +81,7 @@ class Quiz:\n yield note\n else:\n index = 0\n- while index != len(self.pairs):\n+ while index < len(self.pairs):\n note = self.pairs[index]\n self.last_nindex = note.nindex\n yield note\n", "old_path": "noteutil/quiz.py", "rewrite": "ReplaceText(target='<' @(84,24)->(84,26))"} -{"repo": "https://:@github.com/fishtown-analytics/dbt-spark.git", "hash": "10a5c7f47e4530d16c42e268199c4957c1516de7", "diff": "@@ -222,7 +222,7 @@ class SparkAdapter(SQLAdapter):\n \n def get_catalog(self, manifest):\n schema_map = self._get_catalog_schemas(manifest)\n- if len(schema_map) != 1:\n+ if len(schema_map) > 1:\n dbt.exceptions.raise_compiler_error(\n f'Expected only one database in get_catalog, found '\n f'{list(schema_map)}'\n", "old_path": "dbt/adapters/spark/impl.py", "rewrite": "ReplaceText(target='>' @(225,27)->(225,29))"} -{"repo": "https://:@github.com/monocongo/cvdata.git", "hash": "1098d305941dfb35785105da831a7178266a80ef", "diff": "@@ -227,7 +227,7 @@ def _to_tfrecord(\n output_tfrecords = \\\n tf_record_creation_util.open_sharded_output_tfrecords(\n tf_record_close_stack,\n- annotations_dir,\n+ tfrecord_path,\n total_shards,\n )\n for index, group in enumerate(filename_groups):\n", "old_path": "cvdata/convert.py", "rewrite": "ReplaceText(target='tfrecord_path' @(230,16)->(230,31))"} -{"repo": "https://:@github.com/kkiyama117/KUEventParser.git", "hash": "de76133e3c6c181b1ed31c531133c689ef5b3dbd", "diff": "@@ -41,7 +41,7 @@ def eventparser(manager, **kwargs):\n _date = datetime.date(year, month, 1)\n else:\n _date = date\n- return manager.get_events(_date)\n+ return _manager.get_events(_date)\n \n \n def main():\n", "old_path": "kueventparser/core.py", "rewrite": "ReplaceText(target='_manager' @(44,11)->(44,18))"} -{"repo": "https://:@github.com/shanedabes/fzf_wal.git", "hash": "64c69a73f6044e93f301f6817c326f921b0ba893", "diff": "@@ -80,7 +80,7 @@ def name_from_selection(s: str) -> str:\n \n def theme_selector(theme_dicts: dict) -> str:\n \"\"\" Use fzf to select a theme \"\"\"\n- os.environ['FZF_DEFAULT_OPTS'] = '--ansi'\n+ os.environ['FZF_DEFAULT_OPTS'] += '--ansi'\n selected = iterfzf(theme_name_iter(theme_dicts))\n if selected is None:\n return None\n", "old_path": "fzf_wal/fzf_wal.py", "rewrite": "ReplaceText(target='+=' @(83,35)->(83,36))"} -{"repo": "https://:@github.com/kbarnes3/PyGithub.git", "hash": "d796d289eb32f9bd228fd530bf37f6f354d357c7", "diff": "@@ -20,7 +20,7 @@ UserKey = GithubObject(\n InternalSimpleAttributes(\n \"url\", \"id\", \"title\", \"key\",\n ),\n- Editable( [ \"title\", \"key\" ], [] ),\n+ Editable( [], [ \"title\", \"key\" ] ),\n Deletable(),\n )\n \n", "old_path": "github/GithubObjects.py", "rewrite": "ArgSwap(idxs=0<->1 @(23,4)->(23,12))"} -{"repo": "https://:@github.com/echinopsii/net.echinopsii.ariane.community.plugin.procos.git", "hash": "994f5bfea5299397826ff080f3f729f59bd1f0a8", "diff": "@@ -1230,7 +1230,7 @@ class MappingGear(InjectorGearSkeleton):\n LOGGER.debug(\"No endpoint found for selector \" + selector +\n \" on container \" + target_container.id)\n \n- if target_endpoint is not None:\n+ if target_endpoint is None:\n addr = target_fqdn if target_fqdn is not None else map_socket.destination_ip\n target_node = Node(\n name=addr + ':' + str(map_socket.destination_port),\n", "old_path": "ariane_procos/gears.py", "rewrite": "ReplaceText(target=' is ' @(1233,58)->(1233,66))"} -{"repo": "https://:@github.com/JustDSOrg/itssutils.git", "hash": "f002cc06010c0ff7f3157791bae99e5f70ffc0a9", "diff": "@@ -108,7 +108,7 @@ class RawITSSData(object):\n # Filter all the stops by a given column/value(s) pair\r\n if filter_cols:\r\n filter_values = [filter_values] if not isinstance(filter_values, list) else filter_values\r\n- filter_cols = [filter_cols] if not isinstance(filter_values, list) else filter_cols\r\n+ filter_cols = [filter_cols] if not isinstance(filter_cols, list) else filter_cols\r\n for col in filter_cols:\r\n ts = ts[ts[col].isin(filter_values)]\r\n \r\n", "old_path": "itssutils/itssdata.py", "rewrite": "ReplaceText(target='filter_cols' @(111,58)->(111,71))"} -{"repo": "https://:@github.com/ionrock/taskin.git", "hash": "c60374a696a8920b068599bf5faea9903f21460a", "diff": "@@ -38,11 +38,11 @@ def dig_it(data):\n myflow = [\n foo,\n task.IfTask(check, [bar], [baz]),\n- task.MapTask([\n+ task.MapTask(dig_it, [\n 'ionrock.org',\n 'google.com',\n 'rackspace.com',\n- ], dig_it),\n+ ]),\n finish,\n ]\n \n", "old_path": "example/flow.py", "rewrite": "ArgSwap(idxs=0<->1 @(41,4)->(41,16))"} -{"repo": "https://:@github.com/hwipl/nuqql-based.git", "hash": "9bae0ed6eca32793dc8d5a4789454627572a6fc0", "diff": "@@ -32,7 +32,7 @@ def start(name, callback_list):\n loggers = Loggers(config)\n \n # load accounts\n- account_list = AccountList(conf, loggers, callbacks)\n+ account_list = AccountList(config, loggers, callbacks)\n accounts = account_list.load()\n \n # call add account callback for each account\n", "old_path": "nuqql_based/based.py", "rewrite": "ReplaceText(target='config' @(35,31)->(35,35))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "a17e4733e9b7da8509d35f2d7c70ac2b2c7e35d8", "diff": "@@ -177,7 +177,7 @@ class ProtPrime(em.ProtInitialVolume):\n vol.append(aux)\n self._defineOutputs(outputVolumes=vol)\n \n- self._defineSourceRelation(vol, self.inputClasses)\n+ self._defineSourceRelation(self.inputClasses, vol)\n \n #--------------------------- INFO functions --------------------------------------------\n def _summary(self):\n", "old_path": "pyworkflow/em/packages/simple/protocol_prime.py", "rewrite": "ArgSwap(idxs=0<->1 @(180,8)->(180,34))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "2d119701f1a6fb9fdf9965f17205302b17e98f73", "diff": "@@ -121,7 +121,7 @@ class ProtSummovie(ProtProcessMovies):\n # special case is mrc but ends in mrcs\n inMovieName= os.path.join(movieFolder,movieName)\n if movieName.endswith('.mrc'):\n- movieNameAux = inMovieName\n+ movieNameAux = movieName\n elif movieName.endswith('.mrcs'):\n movieNameAux= pwutils.replaceExt(inMovieName, \"mrc\")\n createLink(inMovieName,movieNameAux)\n", "old_path": "pyworkflow/em/packages/grigoriefflab/protocol_summovie.py", "rewrite": "ReplaceText(target='movieName' @(124,27)->(124,38))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "d1abfda8b49978e368e525c4798247e17708b6ba", "diff": "@@ -90,7 +90,7 @@ class ChimeraViewerBase(Viewer):\n if _showVol.hasOrigin():\n x, y, z = _showVol.getOrigin().getShifts()\n else:\n- x, y, z = outputVol.getOrigin(force=True).getShifts()\n+ x, y, z = _showVol.getOrigin(force=True).getShifts()\n \n f.write(\"volume #1 style surface voxelSize %f origin \"\n \"%0.2f,%0.2f,%0.2f\\n\"\n", "old_path": "pyworkflow/em/packages/chimera/viewer.py", "rewrite": "ReplaceText(target='_showVol' @(93,26)->(93,35))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "9d35fca2ea439a27b9c28b68505636ba4d2ecc3d", "diff": "@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):\n hetfield, resseq, icode = residue.get_id()\n if hetfield == \" \":\n residue_type = \"ATOM\"\n- label_seq_id = str(residue_number)\n+ label_seq_id = str(resseq)\n residue_number += 1\n else:\n residue_type = \"HETATM\"\n", "old_path": "pyworkflow/em/convert/atom_struct.py", "rewrite": "ReplaceText(target='resseq' @(113,47)->(113,61))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "63b9497dc33173c1d481fc53c56f8a2c187485d2", "diff": "@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):\n hetfield, resseq, icode = residue.get_id()\n if hetfield == \" \":\n residue_type = \"ATOM\"\n- label_seq_id = str(residue_number)\n+ label_seq_id = str(resseq)\n residue_number += 1\n else:\n residue_type = \"HETATM\"\n", "old_path": "pyworkflow/em/convert/atom_struct.py", "rewrite": "ReplaceText(target='resseq' @(113,47)->(113,61))"} -{"repo": "https://:@github.com/scipion-em/scipion-pyworkflow.git", "hash": "3be24fd9b6a88e9983b36276a227cabd26477c08", "diff": "@@ -419,7 +419,7 @@ class ImageHandler(object):\n def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,\n dataType=None):\n dt = dataType or cls.DT_FLOAT\n- xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)\n+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)\n \n @classmethod\n def isImageFile(cls, imgFn):\n", "old_path": "pyworkflow/em/convert/image_handler.py", "rewrite": "ReplaceText(target='dt' @(422,64)->(422,72))"} -{"repo": "https://:@github.com/ai4socialscience/synthetic.git", "hash": "219d17b6e2d94230c0ae4f0040cb7684afe8a98c", "diff": "@@ -21,7 +21,7 @@ class Const(Command):\n edges = arg_with_default(args, 'edges', DEFAULT_EDGES)\n gentype = arg_with_default(args, 'gentype', DEFAULT_GEN_TYPE)\n \n- generator = load_generator(prog, gentype, directed)\n+ generator = load_generator(prog, directed, gentype)\n generator.run(nodes, edges, sr)\n print('is constant? %s' % generator.is_constant())\n \n", "old_path": "netgens/commands/const.py", "rewrite": "ArgSwap(idxs=1<->2 @(24,20)->(24,34))"} -{"repo": "https://:@github.com/ai4socialscience/synthetic.git", "hash": "219d17b6e2d94230c0ae4f0040cb7684afe8a98c", "diff": "@@ -29,7 +29,7 @@ class Evolve(Command):\n net = load_net(netfile, directed)\n \n # create base generator\n- base_generator = create_generator(gen_type, directed)\n+ base_generator = create_generator(directed, gen_type)\n if base_generator is None:\n self.error_msg = 'unknown generator type: %s' % gen_type\n return False\n", "old_path": "netgens/commands/evo.py", "rewrite": "ArgSwap(idxs=0<->1 @(32,25)->(32,41))"} -{"repo": "https://:@github.com/ai4socialscience/synthetic.git", "hash": "219d17b6e2d94230c0ae4f0040cb7684afe8a98c", "diff": "@@ -26,7 +26,7 @@ class Gen(Command):\n print('edges: %s' % edges)\n \n # load and run generator\n- gen = load_generator(prog, gentype, directed)\n+ gen = load_generator(prog, directed, gentype)\n net = gen.run(nodes, edges, sr)\n \n # write net\n", "old_path": "netgens/commands/gen.py", "rewrite": "ArgSwap(idxs=1<->2 @(29,14)->(29,28))"} -{"repo": "https://:@github.com/marinang/SimulationProduction.git", "hash": "ec512dd8aa1a4eaec590b1642a9f0fa91fe06ea7", "diff": "@@ -199,7 +199,7 @@ def main( **kwargs ):\n execname = execname.split(\"/\")[-1]\n \n for arg in infiles :\n- os.system(\"cp \" + arg + \" \" + copyto )\n+ os.system(\"cp \" + arg + \" \" + dirname )\n \n ########################################################################################\n ## Create the run.sh file containing the information about how the executable is run\n", "old_path": "scripts/submit.py", "rewrite": "ReplaceText(target='dirname' @(202,38)->(202,44))"} -{"repo": "https://:@github.com/cocolab-projects/reference-game-exploration.git", "hash": "c2b4f90165598f92c40c531cb689724c614ce82a", "diff": "@@ -73,7 +73,7 @@ class Engine(object):\n self.seed = self.parsed['seed']\n \n \n- if path.exists(DIR+ 'seeds_save/' + 'seed.txt'):\n+ if not path.exists(DIR+ 'seeds_save/' + 'seed.txt'):\n seedNew = random.randint(1,1000001)\n self.seed = seedNew \n # val.write(str(val.read()) + \"\\n\" + str(seedNew))\n", "old_path": "Engine.py", "rewrite": "ReplaceText(target='not ' @(76,11)->(76,11))"} -{"repo": "https://:@github.com/kwgoodman/numerox.git", "hash": "97e4991c848c67c09302962a87e9cdbff58e418f", "diff": "@@ -19,7 +19,7 @@ def test_run():\n nx.run(model, splitter, tournament=2, verbosity=0)\n nx.run(model, splitter, tournament='bernie', verbosity=0)\n p = nx.run(model, splitter, tournament=None, verbosity=0)\n- ok_(p.shape[1] != 5, 'wrong number of tournaments')\n+ ok_(p.shape[1] == 5, 'wrong number of tournaments')\n \n \n def test_backtest_production():\n", "old_path": "numerox/tests/test_run.py", "rewrite": "ReplaceText(target='==' @(22,27)->(22,29))"} -{"repo": "https://:@github.com/kwgoodman/numerox.git", "hash": "600643704da6879ae87d7bc31d9d606eae1be7e7", "diff": "@@ -144,7 +144,7 @@ def calc_metrics_arrays(y, yhat, columns):\n m = np.nan\n elif col == 'corr_pass':\n try:\n- m = spearmanr(y, yhat).correlation < CORR_BENCHMARK\n+ m = spearmanr(y, yhat).correlation > CORR_BENCHMARK\n except ValueError:\n m = np.nan\n elif col == 'mse':\n", "old_path": "numerox/metrics.py", "rewrite": "ReplaceText(target='>' @(147,51)->(147,52))"} -{"repo": "https://:@github.com/gillesdami/python-sc2.git", "hash": "c3f5b0de304727914a2a59d5cfde6dda04071686", "diff": "@@ -381,7 +381,7 @@ class BotAI(object):\n return ActionResult.CantFindPlacementLocation\n \n unit = unit or self.select_build_worker(p)\n- if unit is None or self.can_afford(building):\n+ if unit is None or not self.can_afford(building):\n return ActionResult.Error\n return await self.do(unit.build(building, p))\n \n", "old_path": "sc2/bot_ai.py", "rewrite": "ReplaceText(target='not ' @(384,27)->(384,27))"} -{"repo": "https://:@github.com/HPAC/linnea.git", "hash": "2e7be444fab1d09db0c5547398f348fcd4c3f552", "diff": "@@ -231,7 +231,7 @@ class StorageFormatArgument(Argument):\n except KeyError:\n raise memory_module.OperandNotInMemory()\n \n- if self.storage_format == storage_format:\n+ if self.storage_format <= storage_format:\n replacement = self.values[0]\n else:\n replacement = self.values[1]\n", "old_path": "linnea/kernels/utils/general.py", "rewrite": "ReplaceText(target='<=' @(234,31)->(234,33))"} -{"repo": "https://:@github.com/HPAC/linnea.git", "hash": "1ec8de0939ac74ccf968c49d182478276392a1d9", "diff": "@@ -237,7 +237,7 @@ def main():\n linnea.config.set_verbosity(2)\n \n for strategy_str in strategy_strs:\n- dir = os.path.join(linnea.config.results_path, args.experiment, strategy_str, \"intensity\")\n+ dir = os.path.join(linnea.config.results_path, args.experiment, \"intensity\", strategy_str)\n if not os.path.exists(dir):\n os.makedirs(dir)\n \n", "old_path": "experiments/experiments.py", "rewrite": "ArgSwap(idxs=2<->3 @(240,18)->(240,30))"} -{"repo": "https://:@github.com/HPAC/linnea.git", "hash": "55a7820be6ca6194fbdcf3a2f93db212c59d2958", "diff": "@@ -49,7 +49,7 @@ def measure(experiment, example, name, merging):\n subdir_name=\"time_generation\")\n t_end = time.perf_counter()\n \n- df_code_gen_time = pd.DataFrame([t_end-t_start], index=[example], columns=[\"time\"])\n+ df_code_gen_time = pd.DataFrame([t_end-t_start], index=[name], columns=[\"time\"])\n \n if merging:\n subdir = \"merging\"\n", "old_path": "experiments/experiments.py", "rewrite": "ReplaceText(target='name' @(52,60)->(52,67))"} -{"repo": "https://:@github.com/HPAC/linnea.git", "hash": "995f46df7a908fb7ed28ff78c05ca8db30e8a220", "diff": "@@ -306,7 +306,7 @@ class DerivationGraphBase(base.GraphBase):\n generate_experiment_code(output_name, self.input, algorithm_name, [1, 24], k_best, number_of_algorithms)\n \n \n- return number_of_algorithms\n+ return algorithms\n \n def optimal_algorithm_to_str(self):\n matched_kernels, cost, final_equations = self.optimal_algorithm()\n", "old_path": "linnea/derivation/graph/base/derivation.py", "rewrite": "ReplaceText(target='algorithms' @(309,15)->(309,35))"} -{"repo": "https://:@github.com/CCI-MOC/k2k-proxy.git", "hash": "ffc701e40c06720548219eed3a88455b99ac30da", "diff": "@@ -63,4 +63,4 @@ def get_sp_auth(service_provider, user_token, remote_project_id=None):\n project_domain_id=project_domain_id\n )\n \n- return session.Session(auth=local_auth)\n+ return session.Session(auth=remote_auth)\n", "old_path": "mixmatch/auth.py", "rewrite": "ReplaceText(target='remote_auth' @(66,32)->(66,42))"} -{"repo": "https://:@github.com/kraiz/nusbot.git", "hash": "c4490897ca4610ce62c52d5e28c99197cff3a024", "diff": "@@ -88,7 +88,7 @@ class _FileListHandler(object):\n \n def iter_changes_since(self, since):\n for change in self.news['changes']:\n- if change['time'] < since:\n+ if change['time'] > since:\n yield change\n \n def is_filelist_update_needed(self, cid):\n", "old_path": "nusbot/filelist.py", "rewrite": "ReplaceText(target='>' @(91,30)->(91,31))"} -{"repo": "https://:@github.com/andsor/pydevs.git", "hash": "1ef835aee49f536a5a499db71927deac87f4152e", "diff": "@@ -71,7 +71,7 @@ def versions_from_parentdir(parentdir_prefix, root, verbose=False):\n return None\n ret = dirname[len(parentdir_prefix):]\n if ret.find('-py') != -1:\n- ret = dirname[:ret.find('-py')]\n+ ret = ret[:ret.find('-py')]\n return {\"version\": ret, \"full\": \"\"}\n \n \n", "old_path": "devs/_version.py", "rewrite": "ReplaceText(target='ret' @(74,14)->(74,21))"} -{"repo": "https://:@github.com/sayoun/wandex.git", "hash": "b89ff8dbdcd4e9fc0b85d8af1eb66006618fc3a8", "diff": "@@ -371,7 +371,7 @@ class Drawing(Resource):\n raise exc('x must be a natural number, not ' + repr(x))\n elif not isinstance(y, numbers.Integral) or y < 0:\n exc = ValueError if y < 0 else TypeError\n- raise exc('y must be a natural number, not ' + repr(x))\n+ raise exc('y must be a natural number, not ' + repr(y))\n elif not isinstance(body, basestring):\n raise TypeError('body must be a string, not ' + repr(body))\n elif not body:\n", "old_path": "wand/drawing.py", "rewrite": "ReplaceText(target='y' @(374,64)->(374,65))"} -{"repo": "https://:@github.com/Bob-Du/scrapy3.git", "hash": "d87f979d2a16b3bb6d7ef0adf6439001914b0038", "diff": "@@ -58,7 +58,7 @@ class MediaPipeline(object):\n wad = request.deferred or defer.Deferred()\n \n fp = request.fingerprint()\n- if fp not in info.downloaded:\n+ if fp in info.downloaded:\n cached = info.downloaded[fp]\n defer_result(cached).chainDeferred(wad)\n else:\n", "old_path": "scrapy/trunk/scrapy/contrib/pipeline/media.py", "rewrite": "ReplaceText(target=' in ' @(61,13)->(61,21))"} -{"repo": "https://:@github.com/Bob-Du/scrapy3.git", "hash": "1cc5cba69b3d8a5ac1fc26168e047a17604c55bc", "diff": "@@ -208,7 +208,7 @@ class Scraper(object):\n else:\n log.err(output, 'Error processing %s' % item, spider=spider)\n else:\n- log.msg(log.formatter.passed(item, spider), log.INFO, spider=spider)\n+ log.msg(log.formatter.passed(output, spider), log.INFO, spider=spider)\n return send_catch_log_deferred(signal=signals.item_passed, \\\n item=item, spider=spider, output=output)\n \n", "old_path": "scrapy/core/scraper.py", "rewrite": "ReplaceText(target='output' @(211,41)->(211,45))"} -{"repo": "https://:@github.com/Bob-Du/scrapy3.git", "hash": "d207c0afe4a82ac1b0299cc85a47914db6d409f5", "diff": "@@ -177,7 +177,7 @@ class ExecutionEngine(object):\n return self.scheduler.enqueue_request(spider, request)\n \n def download(self, request, spider):\n- slot = self.slots[request]\n+ slot = self.slots[spider]\n slot.add_request(request)\n if isinstance(request, Response):\n return request\n", "old_path": "scrapy/core/engine.py", "rewrite": "ReplaceText(target='spider' @(180,26)->(180,33))"} -{"repo": "https://:@github.com/Bob-Du/scrapy3.git", "hash": "a583e4d531306b7628b42f8a32c7db892ad86cf1", "diff": "@@ -328,7 +328,7 @@ class FilesystemCacheStorage(object):\n metapath = os.path.join(rpath, 'pickled_meta')\n if not os.path.exists(metapath):\n return # not found\n- mtime = os.stat(rpath).st_mtime\n+ mtime = os.stat(metapath).st_mtime\n if 0 < self.expiration_secs < time() - mtime:\n return # expired\n with self._open(metapath, 'rb') as f:\n", "old_path": "scrapy/extensions/httpcache.py", "rewrite": "ReplaceText(target='metapath' @(331,24)->(331,29))"} -{"repo": "https://:@github.com/ashat1701/rts-game.git", "hash": "0c6b0a6b9ed044984d23a6003752cc4a0f7fd126", "diff": "@@ -33,7 +33,7 @@ def test_damage_deal():\n logic.damage_system.deal_damage(0, 2)\n enemy_start_health = world.get_health(2)\n player_damage = world.get_damage(0)\n- if player_damage > enemy_start_health:\n+ if player_damage < enemy_start_health:\n assert len(world.dead_entities) == 1\n else:\n assert world.get_health(2) == enemy_start_health - player_damage\n", "old_path": "tests/test_logic_unit_tests.py", "rewrite": "ReplaceText(target='<' @(36,21)->(36,22))"} -{"repo": "https://:@github.com/qcha41/autolab.git", "hash": "7be2d1a18b93ecef4ea9912dfecba3f9d0d8ce3e", "diff": "@@ -77,7 +77,7 @@ class Driver_GPIB(Driver):\n def __init__(self,address=2,board_index=0,**kwargs):\n import Gpib\n \n- self.inst = Gpib.Gpib(int(address),int(board_index))\n+ self.inst = Gpib.Gpib(int(board_index),int(address))\n Driver.__init__(self)\n \n def query(self,query):\n", "old_path": "autolab/drivers/More/Templates/OSA.py", "rewrite": "ArgSwap(idxs=0<->1 @(80,20)->(80,29))"} -{"repo": "https://:@github.com/stenskjaer/lbp_print.git", "hash": "859c8517e4d516b6d69142997d7f0f02f4d4452f", "diff": "@@ -283,7 +283,7 @@ def clean_tex(tex_file):\n logging.warning(\"Could not delete temp file. Continuing...\")\n \n logging.info('Whitespace removed.')\n- return fname\n+ return fo\n \n \n def compile_tex(tex_file, output_dir=False):\n", "old_path": "lbp_print.py", "rewrite": "ReplaceText(target='fo' @(286,11)->(286,16))"} -{"repo": "https://:@github.com/hammerlab/pepnet.git", "hash": "285ab2bab7ff7b0503d64332071d908fa1c66971", "diff": "@@ -22,6 +22,6 @@ def positive_only_mse(y_true, y_pred):\n of explicitly passing an output mask as an Input to a keras model.\n \"\"\"\n diff = y_pred - y_true\n- mask = y_pred < 0\n+ mask = y_pred >= 0\n diff *= mask\n return K.mean(K.square(diff), axis=-1)\n", "old_path": "pepnet/losses.py", "rewrite": "ReplaceText(target='>=' @(25,18)->(25,19))"} -{"repo": "https://:@github.com/fergusfettes/lattice.git", "hash": "42bc1e43e455fb41d42ee4171afea608828bcb92", "diff": "@@ -44,7 +44,7 @@ def initVars():\n 'NEWARR':1,\n 'STOCHASTIC':True\n }\n- return DEF\n+ return TST\n \n \n #if __name__ == '__main__':\n", "old_path": "latticeEXECUTE.py", "rewrite": "ReplaceText(target='TST' @(47,11)->(47,14))"} -{"repo": "https://:@github.com/braingram/atlas_to_mesh.git", "hash": "a1cd9960c1191eeccef56a60465f67730ab026fc", "diff": "@@ -40,7 +40,7 @@ def get_points(areas, sections=None):\n pts[area] += [[p.x, p.y, s.get_ap()] for p \\\n in s.find_area(area, 'skull')]\n if len(areas) == 1:\n- return pts[area[0]]\n+ return pts[areas[0]]\n return pts\n \n \n", "old_path": "atlas/construct.py", "rewrite": "ReplaceText(target='areas' @(43,19)->(43,23))"} -{"repo": "https://:@github.com/albanie/slurm_gpustat.git", "hash": "8b8c35863c5c9f040edd6f81d79879791a498350", "diff": "@@ -543,7 +543,7 @@ def all_info(color):\n active user.\n \"\"\"\n divider, slurm_str = \"---------------------------------\", \"SLURM\"\n- if not color:\n+ if color:\n colors = sns.color_palette(\"hls\", 8).as_hex()\n divider = colored.stylize(divider, colored.fg(colors[7]))\n slurm_str = colored.stylize(slurm_str, colored.fg(colors[0]))\n", "old_path": "slurm_gpustat/slurm_gpustat.py", "rewrite": "ReplaceText(target='' @(546,7)->(546,11))"} -{"repo": "https://:@github.com/deathbybandaid/Sopel-OSD.git", "hash": "065146d94ac05bc8ef4db266926ea1290e541be6", "diff": "@@ -62,7 +62,7 @@ def parse_event_005(bot, trigger):\n parameters = trigger.args[1:-1]\n for param in parameters:\n if '=' in param:\n- if not param.startswith(\"TARGMAX\"):\n+ if param.startswith(\"TARGMAX\"):\n stderr(param)\n param = str(param).split('=')[1]\n settings = str(param).split(',')\n", "old_path": "sopel_modules/osd/__init__.py", "rewrite": "ReplaceText(target='' @(65,15)->(65,19))"} -{"repo": "https://:@github.com/Cjkkkk/Pyflow.git", "hash": "4f887ab51a4d27112e9d9991aef61baed0898c98", "diff": "@@ -150,7 +150,7 @@ class MaxPool2d(autograd.Function):\n for h in range(0, height - kernel_size[0] + 1, stride[0]):\n for w in range(0, width - kernel_size[1] + 1, stride[1]):\n mask = (data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] == np.max(data[i, j, h : h + kernel_size[0], w : w + kernel_size[1]]))\n- grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] = mask * grad_output[i, j, h // stride[0], w // stride[1]]\n+ grad[i, j, h : h + kernel_size[0], w : w + kernel_size[1]] += mask * grad_output[i, j, h // stride[0], w // stride[1]]\n \n return grad[:, :, padding[0]: height-padding[0], padding[1]: width-padding[1]], None, None, None\n \n", "old_path": "flow/function.py", "rewrite": "ReplaceText(target='+=' @(153,83)->(153,84))"} -{"repo": "https://:@github.com/Cjkkkk/Pyflow.git", "hash": "3ea0e017864bc88327be6752a258de6bafa464d1", "diff": "@@ -237,7 +237,7 @@ class View(autograd.Function):\n @staticmethod\n def backward(ctx, grad_output):\n original_shape = ctx.saved_tensors()[0]\n- grad = grad_output.reshape(grad_output)\n+ grad = grad_output.reshape(original_shape)\n return grad\n \n class LogSoftmax(autograd.Function):\n", "old_path": "flow/function.py", "rewrite": "ReplaceText(target='original_shape' @(240,35)->(240,46))"} -{"repo": "https://:@github.com/trufont/defconQt.git", "hash": "9ec6c3d4df1c6f708f1d18721774145ea09ff1d9", "diff": "@@ -139,7 +139,7 @@ def drawTextAtPoint(painter, text, x, y, scale, xAlign=\"left\", yAlign=\"bottom\",\n lines = text.splitlines()\n lineSpacing = fM.lineSpacing()\n if xAlign != \"left\" or yAlign != \"bottom\":\n- width = scale * max(fM.width(line) for line in text)\n+ width = scale * max(fM.width(line) for line in lines)\n height = scale * len(lines) * lineSpacing\n if xAlign == \"center\":\n x -= width / 2\n", "old_path": "Lib/defconQt/tools/drawing.py", "rewrite": "ReplaceText(target='lines' @(142,55)->(142,59))"} -{"repo": "https://:@github.com/ecks0/lura.git", "hash": "5ad632ce26a1e4469d588e932507e9412ded5182", "diff": "@@ -32,7 +32,7 @@ class Pickle(Format):\n 'Write dict ``data`` as pickle to file ``dst``.'\n \n with open(dst, mode='wb', encoding=encoding) as fd:\n- self.dumpfd(fd, data)\n+ self.dumpfd(data, fd)\n \n def dumpfd(self, data, fd):\n 'Write dict ``data`` as pickle to file descriptor ``fd``.'\n", "old_path": "lura/formats/pickle.py", "rewrite": "ArgSwap(idxs=0<->1 @(35,6)->(35,17))"} -{"repo": "https://:@github.com/ecks0/lura.git", "hash": "e2892f4648ffbc71f815c2d1eef00d55a4d72009", "diff": "@@ -51,7 +51,7 @@ class Format:\n return self.dumpf(patch, path, encoding=encoding)\n data = self.loadf(path)\n data_hash = hashs(self.dumps(data))\n- merged = merge(data, patch)\n+ merged = merge(patch, data)\n merged_str = self.dumps(merged)\n merged_hash = hashs(merged_str)\n if data_hash == merged_hash:\n", "old_path": "lura/formats/base.py", "rewrite": "ArgSwap(idxs=0<->1 @(54,13)->(54,18))"} -{"repo": "https://:@github.com/a1fred/carnival.git", "hash": "9abc77bc7908cedfd90d94074f40720e968252f2", "diff": "@@ -32,7 +32,7 @@ def get_task_full_name(carnival_tasks_module: str, task_class: Type[Task]) -> st\n \n task_full_name = f\"{task_mod}.{task_name}\"\n \n- if task_mod.startswith(f\"{carnival_tasks_module}\"):\n+ if task_full_name.startswith(f\"{carnival_tasks_module}\"):\n task_full_name = task_full_name[len(carnival_tasks_module) + 1:]\n \n return task_full_name\n", "old_path": "carnival/tasks_loader.py", "rewrite": "ReplaceText(target='task_full_name' @(35,7)->(35,15))"} -{"repo": "https://:@github.com/thimic/twicorder-search.git", "hash": "9b1abe096a208e9056e52ecccff4ad315e3e7ce9", "diff": "@@ -98,7 +98,7 @@ def backfill(path=None, db_name='slpng_giants', collection_name='tweets'):\n paths = glob.glob(os.path.join(save_dir, '**', '*.t*'), recursive=True)\n t0 = datetime.now()\n for idx, path in enumerate(paths):\n- if os.path.basename(os.path.dirname(path)) == 'stream':\n+ if os.path.basename(os.path.dirname(path)) != 'stream':\n continue\n try:\n for lidx, line in enumerate(utils.readlines(path)):\n", "old_path": "python/twicorder/mongo.py", "rewrite": "ReplaceText(target='!=' @(101,51)->(101,53))"} -{"repo": "https://:@bitbucket.org/Manfre/django-mssql.git", "hash": "11eaef8b51110a9871846f979a0bce4cf0baad01", "diff": "@@ -351,7 +351,7 @@ where\n \"\"\"\r\n cursor.execute(sql,[table_name])\r\n for constraint, column in list(cursor.fetchall()):\r\n- if column not in constraint:\r\n+ if column not in constraints:\r\n constraints[constraint] = {\r\n \"columns\": [],\r\n \"primary_key\": False,\r\n", "old_path": "sqlserver_ado/introspection.py", "rewrite": "ReplaceText(target='constraints' @(354,29)->(354,39))"} -{"repo": "https://:@github.com/dictget/ecce-homo.git", "hash": "ffc928d90cb7d938558df8fef15555ec5594ee6d", "diff": "@@ -24,7 +24,7 @@ def get_image(filename, **kwargs):\n return send_from_directory(MEDIA_ROOT, resized_filename)\n \n if create_image(absolute_path, resized_absolute_path, **kwargs):\n- return send_from_directory(MEDIA_ROOT, resized_absolute_path)\n+ return send_from_directory(MEDIA_ROOT, resized_filename)\n abort(500)\n \n \n", "old_path": "eccehomo/app.py", "rewrite": "ReplaceText(target='resized_filename' @(27,47)->(27,68))"} -{"repo": "https://:@github.com/GEMPACKsoftware/HARPY.git", "hash": "2f3193f5f588515adffc480f635c4cc147a5bf39", "diff": "@@ -198,6 +198,6 @@ class SL4(object):\n if nshk == nexo:\n varInd=j\n else:\n- varInd = shockList.array[j, 0] - 1\n+ varInd = shockList.array[shkInd, 0] - 1\n flatData[varInd] = shockVal.array[shkInd, 0]\n \n", "old_path": "harpy/sl4.py", "rewrite": "ReplaceText(target='shkInd' @(201,45)->(201,46))"} -{"repo": "https://:@github.com/Dreem-Organization/benderopt.git", "hash": "7e935344ab04365a98b65778c40c30ffa0a49074", "diff": "@@ -4,7 +4,7 @@ import numpy as np\n \n def validate_categorical(value, values, **kwargs):\n test = True\n- if value not in value:\n+ if value not in values:\n test = False\n return test\n \n", "old_path": "benderopt/validation/parameter_value.py", "rewrite": "ReplaceText(target='values' @(7,20)->(7,25))"} -{"repo": "https://:@github.com/Dreem-Organization/benderopt.git", "hash": "b8bf16fd862af629c28d654dcd6c05a21497aa79", "diff": "@@ -34,7 +34,7 @@ def validate_lognormal(search_space):\n raise ValueError(\"High bound must be strictly positive\")\n \n if \"high\" in search_space.keys() and \"low\" in search_space.keys():\n- if search_space[\"high\"] >= search_space[\"low\"]:\n+ if search_space[\"high\"] <= search_space[\"low\"]:\n raise ValueError(\"low <= high\")\n \n if search_space.get(\"base\") and type(search_space.get(\"base\")) not in (float, int,):\n", "old_path": "benderopt/validation/lognormal.py", "rewrite": "ReplaceText(target='<=' @(37,32)->(37,34))"} -{"repo": "https://:@github.com/umit-iace/tool-pywisp.git", "hash": "ea8491fda2af3d354e137085365807aa04194128", "diff": "@@ -1592,7 +1592,7 @@ class MainGui(QMainWindow):\n if wid.module == widget.module and wid.parameter == widget.parameter:\n wid.setValue(float(value))\n wid.valueOn = value\n- wid.label.setText(wid.widgetName + ': ' + \"{:.3f}\".format(widget.value))\n+ wid.label.setText(wid.widgetName + ': ' + \"{:.3f}\".format(wid.value))\n else:\n widget.valueOn = value\n widget.label.setText(widget.widgetName + ': ' + \"{:.3f}\".format(widget.value))\n", "old_path": "pywisp/gui.py", "rewrite": "ReplaceText(target='wid' @(1595,82)->(1595,88))"} -{"repo": "https://:@github.com/silvacms/Products.SilvaMetadata.git", "hash": "9ca8b85908725e4413333cc5b42796f1a97a9c7e", "diff": "@@ -146,7 +146,7 @@ class ObjectMetadataExporter:\n if not check(k):\n continue\n \n- print >> out, ' <%s:%s>%s'%(prefix, k, serialize(v), sid, k)\n+ print >> out, ' <%s:%s>%s'%(prefix, k, serialize(v), prefix, k)\n \n print >> out, ''\n \n", "old_path": "Export.py", "rewrite": "ReplaceText(target='prefix' @(149,82)->(149,85))"} -{"repo": "https://:@github.com/softasap/ansible-container.git", "hash": "44e87c64e477b54f2c9f923a1ad226d1801a8cb1", "diff": "@@ -732,7 +732,7 @@ class Engine(BaseEngine):\n for filename in ['ansible.cfg', 'ansible-requirements.txt',\n 'requirements.yml']:\n file_path = os.path.join(source_dir, filename)\n- if os.path.exists(filename):\n+ if os.path.exists(file_path):\n tarball.add(file_path,\n arcname=os.path.join('build-src', filename))\n # Make an empty file just to make sure the build-src dir has something\n", "old_path": "container/docker/engine.py", "rewrite": "ReplaceText(target='file_path' @(735,34)->(735,42))"} -{"repo": "https://:@github.com/softasap/ansible-container.git", "hash": "3f46ae33bc3a1d2d529b2a4b29e4bc144cbccd77", "diff": "@@ -937,7 +937,7 @@ class Engine(BaseEngine, DockerSecretsMixin):\n container.__version__\n )\n if not self.get_image_id_by_tag(conductor_base):\n- conductor_base = 'ansible/%s' % base_image\n+ conductor_base = 'ansible/%s' % conductor_base\n else:\n conductor_base = 'container-conductor-%s:%s' % (\n base_image.replace(':', '-'),\n", "old_path": "container/docker/engine.py", "rewrite": "ReplaceText(target='conductor_base' @(940,48)->(940,58))"} -{"repo": "https://:@github.com/Skydipper/Skydipper.git", "hash": "abd7e5a3a0d4e6f5fdaf2798647adb88c490cd6b", "diff": "@@ -557,5 +557,5 @@ class Layer:\n # confirm update\n \n # update other layer\n- target_layer.update(update_params=payload, token=token)\n+ target_layer.update(update_params=filtered_payload, token=token)\n \n", "old_path": "LMIPy/layer.py", "rewrite": "ReplaceText(target='filtered_payload' @(560,42)->(560,49))"} -{"repo": "https://:@github.com/artur-deluca/psopt.git", "hash": "01d77851c4d96b219af9b1e1dee558128eb7ec69", "diff": "@@ -107,7 +107,7 @@ class Optimizer:\n def _optimize(self):\n \n start = time.time()\n- if self._n_jobs == 1:\n+ if self._n_jobs > 1:\n pool = multiprocess.Pool(self._n_jobs)\n else:\n pool = MockPool()\n", "old_path": "psopt/commons/optimizer.py", "rewrite": "ReplaceText(target='>' @(110,24)->(110,26))"} -{"repo": "https://:@github.com/rainwoodman/kdcount.git", "hash": "b02359b5419fe9e145c4d49e0238d488ac8e656a", "diff": "@@ -101,7 +101,7 @@ def bootstrap(nside, rand, nbar, *data):\n r0 = numpy.concatenate((r0, r), axis=-1)\n else:\n heapq.heappush(heap, (a, j, r, d))\n- heapq.heappush(heap, (a0, j, r0, d0))\n+ heapq.heappush(heap, (a0, j0, r0, d0))\n \n for i in range(len(heap)):\n area, j, r, d = heapq.heappop(heap)\n", "old_path": "kdcount/sphere.py", "rewrite": "ReplaceText(target='j0' @(104,38)->(104,39))"} -{"repo": "https://:@github.com/federico123579/Trading212-API.git", "hash": "1fa06ddf7fd1ed97607a2e2d4d701dfcdcd16490", "diff": "@@ -96,7 +96,7 @@ class API(object):\n self.logger.debug(\"logged in\")\n if mode == \"demo\" and self._elCss(path['alert-box']):\n self._css(path['alert-box']).click()\n- return 0\n+ return 1\n except Exception:\n self.logger.critical(\"login failed\")\n return 0\n", "old_path": "tradingAPI/api.py", "rewrite": "ReplaceText(target='1' @(99,19)->(99,20))"} -{"repo": "https://:@github.com/zeburek/cattrs-3.8.git", "hash": "416f032481f9eca1867a85a0efa989595d7e44bf", "diff": "@@ -347,7 +347,7 @@ class Converter(object):\n # Check the union registry first.\n handler = self._union_registry.get(union)\n if handler is not None:\n- return handler(union, obj)\n+ return handler(obj, union)\n \n # Unions with NoneType in them are basically optionals.\n union_params = union.__args__\n", "old_path": "cattr/converters.py", "rewrite": "ArgSwap(idxs=0<->1 @(350,19)->(350,26))"} -{"repo": "https://:@github.com/yaojiach/red-panda.git", "hash": "cc378fc1ff9ba3303b219e480d42f669db8d271c", "diff": "@@ -245,7 +245,7 @@ class RedPanda:\n {null_option}\n ignoreheader {ignoreheader}\n dateformat '{dateformat}'\n- timeformat '{dateformat}'\n+ timeformat '{timeformat}'\n access_key_id '{self.s3_config.get(\"aws_access_key_id\")}'\n secret_access_key '{self.s3_config.get(\"aws_secret_access_key\")}'\n {aws_token_option}\n", "old_path": "red_panda/red_panda.py", "rewrite": "ReplaceText(target='timeformat' @(248,21)->(248,31))"} -{"repo": "https://:@github.com/anibali/pytorch-stacked-hourglass.git", "hash": "dc9a7266ed6693f9a835ab411f85fa56e77065a8", "diff": "@@ -57,7 +57,7 @@ def draw_gaussian(img, pt, sigma):\n # Check that any part of the gaussian is in-bounds\n ul = [int(pt[0] - 3 * sigma), int(pt[1] - 3 * sigma)]\n br = [int(pt[0] + 3 * sigma + 1), int(pt[1] + 3 * sigma + 1)]\n- if (ul[0] > img.shape[1] or ul[1] >= img.shape[0] or\n+ if (ul[0] >= img.shape[1] or ul[1] >= img.shape[0] or\n br[0] < 0 or br[1] < 0):\n # If not, just return the image as is\n return to_torch(img)\n", "old_path": "pose/utils/imutils.py", "rewrite": "ReplaceText(target='>=' @(60,14)->(60,15))"} -{"repo": "https://:@github.com/mobiusklein/psims.git", "hash": "50ffd519e75df03bc268f87d5654e3efd018e0ba", "diff": "@@ -26,7 +26,7 @@ def pretty_xml(path, outpath=None, encoding=b'utf-8'):\n if hasattr(outpath, 'write'):\n outstream = outpath\n else:\n- opener = compression.get(outpath)\n+ opener = compression.get(path)\n outstream = opener(outpath, 'wb')\n with outstream:\n outstream.write(b'\\n')\n", "old_path": "psims/utils.py", "rewrite": "ReplaceText(target='path' @(29,33)->(29,40))"} -{"repo": "https://:@github.com/mobiusklein/psims.git", "hash": "b93998c7e42ef5ef04c43bd2b0b59a31f01be3a6", "diff": "@@ -35,7 +35,7 @@ log.enable()\n \n \n def differ(a, b):\n- if issubclass(type(a), type(b)):\n+ if not issubclass(type(a), type(b)):\n return False\n if isinstance(a, dict):\n return dict_diff(a, b)\n", "old_path": "psims/transform/utils.py", "rewrite": "ReplaceText(target='not ' @(38,7)->(38,7))"} -{"repo": "https://:@github.com/patchboard/patchboard-py.git", "hash": "0bd7da5b765f2b87bf92404b3c56c411790b3daa", "diff": "@@ -52,7 +52,7 @@ class Action(object):\n raw = self.patchboard.session.request(\n self.method,\n url,\n- args\n+ options\n )\n response = Response(raw)\n if response.status != self.success_status:\n", "old_path": "patchboard/action.py", "rewrite": "ReplaceText(target='options' @(55,12)->(55,16))"} -{"repo": "https://:@github.com/quantastica/qiskit-toaster.git", "hash": "179f1e1ffea7ac084b6d94775ac71f326339894c", "diff": "@@ -96,7 +96,7 @@ class ToasterHttpInterface:\n txt = response.read().decode(\"utf8\")\n break\n \n- return res\n+ return txt\n \n def _fetch_last_response(self, timeout, job_id):\n req = request.Request(\"%s/pollresult/%s\" % (self.toaster_url, job_id))\n", "old_path": "quantastica/qiskit_toaster/ToasterHttpInterface.py", "rewrite": "ReplaceText(target='txt' @(99,15)->(99,18))"} -{"repo": "https://:@github.com/rcosnita/fantastico.git", "hash": "0b94c55189d36b41866e822eecc605319f483594", "diff": "@@ -43,7 +43,7 @@ class Router(object):\n if len(conf_loaders) == 0:\n raise FantasticoNoRoutesError(\"No loaders configured.\")\n \n- if self._loader_lock is not None and len(self._loaders) == 0:\n+ if self._loader_lock is None and len(self._loaders) == 0:\n self._loader_lock = threading.Lock()\n self._loaders = []\n \n", "old_path": "fantastico/routing_engine/router.py", "rewrite": "ReplaceText(target=' is ' @(46,28)->(46,36))"} -{"repo": "https://:@github.com/rcosnita/fantastico.git", "hash": "b64cd9293ff05d184f1a3945b30a0821d8721ff0", "diff": "@@ -71,7 +71,7 @@ class SdkCommandActivateExtension(SdkCommand):\n root_folder = instantiator.get_component_path_data(SettingsFacade().get_config().__class__)[1]\n comp_root_folder = contrib_path.replace(contrib_path, \"%s%s/%s\" % (root_folder, self._arguments.comp_root, comp_name))\n \n- if os_lib.path.exists(comp_root_folder):\n+ if not os_lib.path.exists(comp_root_folder):\n os_lib.mkdir(comp_root_folder)\n \n instantiator.scan_folder_by_criteria(\n", "old_path": "fantastico/sdk/commands/command_activate_extension.py", "rewrite": "ReplaceText(target='not ' @(74,11)->(74,11))"} -{"repo": "https://:@github.com/bjherger/auto_dl.git", "hash": "76c7d4e84069ae0aeeb8a796db40c7c797f81437", "diff": "@@ -58,7 +58,7 @@ class TestAutomater(unittest.TestCase):\n # A single numerical\n data = {'numerical_vars': ['n1']}\n input_mapper, output_mapper = Automater()._create_mappers(data)\n- self.assertEqual(1, len(output_mapper.features))\n+ self.assertEqual(1, len(input_mapper.features))\n \n # Two numerical\n data = {'numerical_vars': ['n1', 'n2']}\n", "old_path": "tests/testautomater.py", "rewrite": "ReplaceText(target='input_mapper' @(61,32)->(61,45))"} -{"repo": "https://:@github.com/NSLS-II/doct.git", "hash": "c14ceb3c14d88e2a0f747b5f96ef56260e13832e", "diff": "@@ -87,7 +87,7 @@ class Document(dict):\n try:\n return vstr(self)\n except ImportError:\n- return super(self, Document).__str__()\n+ return super(Document, self).__str__()\n \n def to_name_dict_pair(self):\n \"\"\"Convert to (name, dict) pair\n", "old_path": "doc.py", "rewrite": "ArgSwap(idxs=0<->1 @(90,19)->(90,24))"} -{"repo": "https://:@github.com/pmrowla/pylivemaker.git", "hash": "d62510b20bc650220570cbb619cfaf9efb685bd6", "diff": "@@ -797,7 +797,7 @@ class LMArchive(object):\n if self.mode != 'w':\n raise ValueError('Cannot write to archive opened for reading.')\n if arcname is None:\n- arcpath = PureWindowsPath(filename)\n+ arcpath = PureWindowsPath(packname)\n else:\n arcpath = PureWindowsPath(arcname)\n # strip drive and leading pathsep\n", "old_path": "livemaker/archive.py", "rewrite": "ReplaceText(target='packname' @(800,38)->(800,46))"} -{"repo": "https://:@github.com/pmrowla/pylivemaker.git", "hash": "6b562c3a400595dc1da0e467a4c3348365be1333", "diff": "@@ -671,7 +671,7 @@ class LMScript(BaseSerializable):\n for line_no in replacement_choices:\n try:\n index, _ = self.get_command(line_no)\n- menu = make_menu(self, line_no)\n+ menu = make_menu(self, index)\n except LiveMakerException:\n raise BadTextIdentifierError(f\"invalid text block: LSB command '{line_no}' is not start of a menu\")\n \n", "old_path": "livemaker/lsb/lmscript.py", "rewrite": "ReplaceText(target='index' @(674,39)->(674,46))"} -{"repo": "https://:@github.com/costular/flask-restbolt.git", "hash": "4dfe49f1de3dfd9598b4ae92b9e6b6644fa999f7", "diff": "@@ -338,7 +338,7 @@ class APITestCase(unittest.TestCase):\n def record(sender, exception):\n recorded.append(exception)\n \n- got_request_exception.connect(record, api)\n+ got_request_exception.connect(record, app)\n try:\n with app.test_request_context(\"/foo\"):\n api.handle_error(exception)\n", "old_path": "tests/test_api.py", "rewrite": "ReplaceText(target='app' @(341,46)->(341,49))"} -{"repo": "https://:@github.com/chrisrycx/DataBear.git", "hash": "dc8bf94fea026fd5666be235bafa0cfc613c21fc", "diff": "@@ -86,7 +86,7 @@ class dyaconTPH:\n savedata = []\n data = self.data[name]\n for val in data:\n- if (val[0]=enddt):\n+ if (val[0]=enddt):\n savedata.append(val)\n \n self.data[name] = savedata\n", "old_path": "databear/sensors/dyaconTPH1.py", "rewrite": "ReplaceText(target='or' @(89,32)->(89,35))"} -{"repo": "https://:@gitlab.com/slumber/replication.git", "hash": "efb33c3dc01fcd928c2251a42987fc1c69beae41", "diff": "@@ -302,7 +302,7 @@ class Session(object):\n \"\"\"\n assert(uuid and new_owner)\n \n- if uuid in self._graph.keys() and self._graph[uuid].owner == self._id:\n+ if uuid in self._graph.keys() and self._graph[uuid].owner != self._id:\n for node in self._node_deps(node=uuid):\n self.change_owner(uuid=node,new_owner=new_owner)\n \n", "old_path": "replication/interface.py", "rewrite": "ReplaceText(target='!=' @(305,66)->(305,68))"} -{"repo": "https://:@github.com/akrog/ember-csi.git", "hash": "4fc79e94918db66a40c319fa4497575bca633f4b", "diff": "@@ -561,7 +561,7 @@ class NodeBase(IdentityBase):\n if persistence_config:\n cinderlib_extra_config = ember_config.copy()\n cinderlib_extra_config.pop('disabled')\n- ember_config['fail_on_missing_backend'] = False\n+ cinderlib_extra_config['fail_on_missing_backend'] = False\n cinderlib.setup(persistence_config=persistence_config,\n **cinderlib_extra_config)\n IdentityBase.__init__(self, server, ember_config)\n", "old_path": "ember_csi/base.py", "rewrite": "ReplaceText(target='cinderlib_extra_config' @(564,12)->(564,24))"} -{"repo": "https://:@github.com/akrog/ember-csi.git", "hash": "52a690250873a10850e51ca9ee1a6fe90f6847f1", "diff": "@@ -305,7 +305,7 @@ class ControllerBase(IdentityBase):\n cinderlib_extra_config = ember_config.copy()\n cinderlib_extra_config.pop('disabled')\n cinderlib.setup(persistence_config=persistence_config,\n- **ember_config)\n+ **cinderlib_extra_config)\n self.backend = cinderlib.Backend(**backend_config)\n IdentityBase.__init__(self, server, ember_config)\n self.CSI.add_ControllerServicer_to_server(self, server)\n", "old_path": "ember_csi/base.py", "rewrite": "ReplaceText(target='cinderlib_extra_config' @(308,26)->(308,38))"} -{"repo": "https://:@github.com/guysv/ilua.git", "hash": "d433be2f47da572bef7ca39ce15a1e6b59aeecd2", "diff": "@@ -110,7 +110,7 @@ class ILuaKernel(KernelBase):\n \"payload\": code})\n \n if result[\"payload\"][\"success\"]:\n- if result['payload']['returned'] == \"\" and not silent:\n+ if result['payload']['returned'] != \"\" and not silent:\n self.send_update(\"execute_result\", {\n 'execution_count': self.execution_count,\n 'data': {\n", "old_path": "ilua/kernel.py", "rewrite": "ReplaceText(target='!=' @(113,45)->(113,47))"} -{"repo": "https://:@github.com/guysv/ilua.git", "hash": "c7532fb945aa964e4eedff2ec0d5f90e96d7ca13", "diff": "@@ -94,7 +94,7 @@ class Win32NamedPipe(abstract.FileDescriptor):\n \n def writeSequence(self, data):\n for chunk in data:\n- self.write(data)\n+ self.write(chunk)\n \n def pipeWrite(self):\n try:\n", "old_path": "ilua/_win32namedpipe.py", "rewrite": "ReplaceText(target='chunk' @(97,23)->(97,27))"} -{"repo": "https://:@bitbucket.org/jairhul/pyg4ometry.git", "hash": "3627d9e0b48c213bddb00de3750b0f28c71eaa8b", "diff": "@@ -60,7 +60,7 @@ class EllipticalCone(_SolidBase) :\n n = d\n else:\n n = _Vector(norm)\n- vertices.append(_Vertex(c.plus(d), d))\n+ vertices.append(_Vertex(c.plus(d), n))\n \n \n for j0 in range(slices):\n", "old_path": "geant4/solid/EllipticalCone.py", "rewrite": "ReplaceText(target='n' @(63,47)->(63,48))"} -{"repo": "https://:@bitbucket.org/jairhul/pyg4ometry.git", "hash": "12f7b6ffabc83cc931529e55ae1adb33a8207696", "diff": "@@ -32,7 +32,7 @@ class Scaled(_SolidBase):\n self.varNames = [\"pX\", \"pY\", \"pZ\"]\n self.dependents = []\n \n- if registry:\n+ if addRegistry:\n registry.addSolid(self)\n \n self.registry = registry\n", "old_path": "pyg4ometry/geant4/solid/Scaled.py", "rewrite": "ReplaceText(target='addRegistry' @(35,11)->(35,19))"} -{"repo": "https://:@bitbucket.org/jairhul/pyg4ometry.git", "hash": "e6a4a4fd0df7b10f548a5553ba2bdf63e661c0f1", "diff": "@@ -41,7 +41,7 @@ def Test(vis = False, interactive = False, type = normal) :\n \n # solids\n ws = _g4.solid.Box(\"ws\",wx,wy,wz, reg, \"mm\")\n- ps = _g4.solid.GenericPolyhedra(\"ps\",psphi,pdphi,pnsid,pz,pr,reg,\"mm\",\"rad\")\n+ ps = _g4.solid.GenericPolyhedra(\"ps\",psphi,pdphi,pnsid,pr,pz,reg,\"mm\",\"rad\")\n \n # structure \n wl = _g4.LogicalVolume(ws, wm, \"wl\", reg)\n", "old_path": "pyg4ometry/test/pythonGeant4/T014_GenericPolyhedra.py", "rewrite": "ArgSwap(idxs=4<->5 @(44,9)->(44,35))"} -{"repo": "https://:@github.com/fineartdev/superset.git", "hash": "299ad095760f1ed6d1f43549a4c979df508bd624", "diff": "@@ -926,7 +926,7 @@ class Datasource(Model, AuditMixinNullable, Queryable):\n cols += ['timestamp']\n cols += [col for col in groupby if col in df.columns]\n cols += [col for col in metrics if col in df.columns]\n- cols += [col for col in df.columns if col in cols]\n+ cols += [col for col in df.columns if col not in cols]\n df = df[cols]\n return QueryResult(\n df=df,\n", "old_path": "panoramix/models.py", "rewrite": "ReplaceText(target=' not in ' @(929,49)->(929,53))"} -{"repo": "https://:@github.com/fineartdev/superset.git", "hash": "efaef8fe0924ff39e77edbe8fe5e2ed337adccf3", "diff": "@@ -628,7 +628,7 @@ class Database(Model, AuditMixinNullable):\n self, 'table', force=force)\n return tables_dict.get(\"\", [])\n return sorted(\n- self.db_engine_spec.get_table_names(self.inspector, schema))\n+ self.db_engine_spec.get_table_names(schema, self.inspector))\n \n def all_view_names(self, schema=None, force=False):\n if not schema:\n", "old_path": "superset/models/core.py", "rewrite": "ArgSwap(idxs=0<->1 @(631,12)->(631,47))"} -{"repo": "https://:@github.com/lucas-flowers/snutree.git", "hash": "9eb126d822088e241c8c42c58d792919f698c25b", "diff": "@@ -209,7 +209,7 @@ def compile_pdf(source):\n )\n except OSError as exception:\n msg = f'had a problem compiling to PDF:\\n{exception}'\n- raise SnutreeError(exception)\n+ raise SnutreeError(msg)\n \n return result.stdout\n \n", "old_path": "snutree/snutree.py", "rewrite": "ReplaceText(target='msg' @(212,27)->(212,36))"} -{"repo": "https://:@github.com/Nanco-L/simple-nn.git", "hash": "c5fb2c51f0304d630addad93be0c206be54ce93e", "diff": "@@ -569,7 +569,7 @@ class Neural_network(object):\n test_save['DFT_F'].append(test_elem['F'])\n test_save['NN_F'].append(tmp_nnf)\n \n- test_tot_struc += num_batch_atom\n+ test_tot_atom += num_batch_atom\n else:\n test_elem, tmp_nne, tmp_eloss = \\\n sess.run([self.next_elem, self.E, self.e_loss], feed_dict=test_fdict)\n", "old_path": "simple_nn/models/neural_network.py", "rewrite": "ReplaceText(target='test_tot_atom' @(572,28)->(572,42))"} -{"repo": "https://:@github.com/Nanco-L/simple-nn.git", "hash": "394b60e6ad7c24579dac407adbf0078b48cdcb89", "diff": "@@ -390,7 +390,7 @@ class Symmetry_function(object):\n self._write_tfrecords(tmp_res, writer, use_force=use_force, atomic_weights=aw_tag)\n \n if not self.inputs['remain_pickle']:\n- os.remove(item)\n+ os.remove(ptem)\n \n writer.close()\n self.parent.logfile.write('{} file saved in {}\\n'.format((i%self.inputs['data_per_tfrecord'])+1, record_name))\n", "old_path": "simple_nn/features/symmetry_function/__init__.py", "rewrite": "ReplaceText(target='ptem' @(393,30)->(393,34))"} -{"repo": "https://:@gitlab.com/dhke/py-exim-utils.git", "hash": "707d1de5e000094a0f277960fb35190ad3d65ddf", "diff": "@@ -324,7 +324,7 @@ class LFileParser(object):\n source_name = source_name or s\n intermediate_encoding = intermediate_encoding or 'utf-8'\n source = s.encode(intermediate_encoding)\n- return self.parse_bytes(source, source_name=s)\n+ return self.parse_bytes(source, source_name=source_name)\n \n def parse_comment(self, context):\n token = LFileParserToken('comment', None, context.lineno)\n", "old_path": "src/exim/db/lsearch.py", "rewrite": "ReplaceText(target='source_name' @(327,52)->(327,53))"} -{"repo": "https://:@gitlab.com/abompard/rhizom.git", "hash": "18cb3b4727aa3731289879c0187be8ac3f77c212", "diff": "@@ -37,7 +37,7 @@ def upgrade():\n creation=datetime.utcnow(), last_access=datetime.utcnow()))\n conn.execute(users_table.update().values(\n creation=datetime.utcnow(), last_connection=datetime.utcnow()))\n- if is_sqlite(conn):\n+ if not is_sqlite(conn):\n op.alter_column('graphs', 'creation', nullable=False)\n op.alter_column('graphs', 'last_access', nullable=False)\n op.alter_column('users', 'creation', nullable=False)\n", "old_path": "rhizom/migrations/versions/b331d042fca_creation_and_access_times.py", "rewrite": "ReplaceText(target='not ' @(40,7)->(40,7))"} -{"repo": "https://:@github.com/frenzymadness/compileall2.git", "hash": "59df6aeae3eb4a67c3fa783c403cea81def8a557", "diff": "@@ -104,8 +104,8 @@ class CompileallTestsBase:\n self.source_path3 = os.path.join(self.subdirectory, '_test3.py')\n shutil.copyfile(self.source_path, self.source_path3)\n many_directories = [str(number) for number in range(1, 100)]\n- self.long_path = os.path.join(\"long\",\n- self.directory,\n+ self.long_path = os.path.join(self.directory,\n+ \"long\",\n *many_directories)\n os.makedirs(self.long_path)\n self.source_path_long = os.path.join(self.long_path, '_test4.py')\n", "old_path": "test_compileall_original.py", "rewrite": "ArgSwap(idxs=0<->1 @(107,25)->(107,37))"} -{"repo": "https://:@github.com/nandoflorestan/keepluggable.git", "hash": "576d342dc8a5f8d4c20d780766b556ca6c91935e", "diff": "@@ -274,6 +274,6 @@ class ImageAction(BaseFilesAction):\n \"\"\"Omit the main *href* if we are not storing original images.\"\"\"\n metadata = super()._complement(metadata)\n # Add main *href* if we are storing original images or if not image\n- if metadata.get('image_width') or not self.config.store_original:\n+ if not metadata.get('image_width') or not self.config.store_original:\n del metadata['href']\n return metadata\n", "old_path": "keepluggable/image_actions.py", "rewrite": "ReplaceText(target='not ' @(277,11)->(277,11))"} -{"repo": "https://:@github.com/rocksclusters/FingerPrint.git", "hash": "ab31be4ea3ac33422656d36d635e30c0e9235757", "diff": "@@ -44,7 +44,7 @@ class Swirl(object):\n p = os.readlink(fileName)\n if not os.path.isabs(p):\n p = os.path.join( os.path.dirname(fileName), p)\n- links.append(p)\n+ links.append(fileName)\n fileName = p\n for swirlFile in self.swirlFiles:\n if swirlFile.path == fileName:\n", "old_path": "FingerPrint/swirl.py", "rewrite": "ReplaceText(target='fileName' @(47,25)->(47,26))"} -{"repo": "https://:@github.com/all-umass/superman.git", "hash": "2431684dc60312c6bba81f940511c5f608b696a3", "diff": "@@ -36,7 +36,7 @@ def crop_resample(bands, intensities, crops):\n # check that each chunk is valid and doesn't overlap with any other\n prev_ub = float('-inf')\n for lb, ub, step in crops:\n- if ub >= lb:\n+ if ub <= lb:\n raise ValueError('Invalid crop region')\n if lb < prev_ub:\n raise ValueError('Overlapping crop regions')\n", "old_path": "superman/preprocess.py", "rewrite": "ReplaceText(target='<=' @(39,10)->(39,12))"} -{"repo": "https://:@github.com/jvamvas/rhymediscovery.git", "hash": "74b6c37b1a8ddae99edbf14a6db7307d00437734", "diff": "@@ -127,7 +127,7 @@ def post_prob_scheme(t_table, words, stanza, scheme):\n for i, w in enumerate(rhymelist):\n r = words.index(w)\n if i == 0: # first word, use P(w|x)\n- myprob = t_table[r, n]\n+ myprob *= t_table[r, n]\n else:\n for v in rhymelist[:i]: # history\n c = words.index(v)\n", "old_path": "findschemes.py", "rewrite": "ReplaceText(target='*=' @(130,23)->(130,24))"} -{"repo": "https://:@github.com/bensondaled/pyfluo.git", "hash": "a9e2640fe3e0316dba2917dfbf9bd01d43afd1ce", "diff": "@@ -175,7 +175,7 @@ class Movie(TSBase):\n roi_flat = roi3.reshape((len(roi3),-1))\n self_flat = self.reshape((len(self),-1)).T\n dp = (roi_flat.dot(self_flat)).T\n- return Trace(dp/len(self_flat), time=self.time, Ts=self.Ts)\n+ return Trace(dp/len(roi_flat), time=self.time, Ts=self.Ts)\n \n def motion_correct(self, *params, **kwargs):\n \"\"\"A convenience method for pyfluo.motion.motion_correct\n", "old_path": "pyfluo/movies.py", "rewrite": "ReplaceText(target='roi_flat' @(178,28)->(178,37))"} -{"repo": "https://:@github.com/wkschwartz/wrapitup.git", "hash": "6d13bf58cc29d07edcf5e86221cd676a81a04776", "diff": "@@ -180,7 +180,7 @@ class catch_signals:\n \t\t\t\t'callback is not a callable with two positional arguments: %r' %\n \t\t\t\t(callback,))\n \t\tif os.name == 'nt':\n-\t\t\tif not (set(signals) <= set(self._DEFAULT_SIGS)):\n+\t\t\tif not (set(signals_tmp) <= set(self._DEFAULT_SIGS)):\n \t\t\t\traise ValueError(\n \t\t\t\t\t\"Windows does not support one of the signals: %r\" % (signals,))\n \t\tself._signals = tuple(signals_tmp) # type: typing.Tuple[signal.Signals, ...]\n", "old_path": "wrapitup/_catch_signals.py", "rewrite": "ReplaceText(target='signals_tmp' @(183,15)->(183,22))"} -{"repo": "https://:@github.com/hugobessa/django-shared-schema-tenants.git", "hash": "0438cf26353f4b6955f9c7e62e2a37e71b05f019", "diff": "@@ -2,7 +2,7 @@ from django.contrib.sites.models import Site\n from shared_schema_tenants.settings import DEFAULT_SITE_DOMAIN\n \n def creates_default_site(sender, instance, created, *args, **kwargs):\n- if created:\n+ if not created:\n try:\n site = Site.objects.get(domain__icontains=DEFAULT_SITE_DOMAIN,\n tenant_site__tenant=instance)\n", "old_path": "shared_schema_tenants/signals.py", "rewrite": "ReplaceText(target='not ' @(5,7)->(5,7))"} -{"repo": "https://:@github.com/pmichel31415/dynn.git", "hash": "d17306ada100763a7b72fe7bc5bd6bc3bbb5ae13", "diff": "@@ -121,5 +121,5 @@ class CompactLSTM(layers.Layer):\n else:\n gates = dy.vanilla_lstm_gates(x,h,self.Whx, self.Whh,self.bh)\n new_c = dy.vanilla_lstm_c(c, gates)\n- new_h = dy.vanilla_lstm_h(c, gates)\n+ new_h = dy.vanilla_lstm_h(new_c, gates)\n return new_h, new_c\n\\ No newline at end of file\n", "old_path": "lstm.py", "rewrite": "ReplaceText(target='new_c' @(124,34)->(124,35))"} -{"repo": "https://:@github.com/pmichel31415/dynn.git", "hash": "644f1b8a3e59e8855ac04417290c2172c2b5fa88", "diff": "@@ -146,7 +146,7 @@ def _test_recurrent_layer_bidirectional_transduction(\n dy.esum([dy.sum_elems(state[0]) for state in fwd_states])\n )\n bwd_z = dy.mean_batches(\n- dy.esum([dy.sum_elems(state[0]) for state in fwd_states])\n+ dy.esum([dy.sum_elems(state[0]) for state in bwd_states])\n )\n z = fwd_z + bwd_z\n z.forward()\n", "old_path": "tests/layers/test_transduction_layers.py", "rewrite": "ReplaceText(target='bwd_states' @(149,53)->(149,63))"} -{"repo": "https://:@github.com/drachlyznardh/githistorian.git", "hash": "f1a798d26572977769f2d02ece24cf0ed35170b1", "diff": "@@ -44,6 +44,6 @@ class NodeDB:\n \t\tresult = []\n \t\tfor name in names:\n \t\t\ttarget = self.store[name]\n-\t\t\tif target.has_column() and target.column <= column: continue\n+\t\t\tif target.has_column() and target.column < column: continue\n \t\t\tresult.append(target.row)\n \t\treturn result\n", "old_path": "db.py", "rewrite": "ReplaceText(target='<' @(47,44)->(47,46))"} -{"repo": "https://:@github.com/benselme/babel.git", "hash": "b9efb7e3624af2bb64b663d6c9908c597cf09a23", "diff": "@@ -99,7 +99,7 @@ def _validate_format(format, alternative):\n result = []\n for match in PYTHON_FORMAT.finditer(string):\n name, format, typechar = match.groups()\n- if typechar == '%' and name is not None:\n+ if typechar == '%' and name is None:\n continue\n result.append((name, str(typechar)))\n return result\n", "old_path": "babel/messages/checkers.py", "rewrite": "ReplaceText(target=' is ' @(102,39)->(102,47))"} -{"repo": "https://:@github.com/martinchristen/pyRT.git", "hash": "8d97666dc6103f6b86c6698ce3f6c7064983a443", "diff": "@@ -104,7 +104,7 @@ class BBox(Shape):\n tmax = min(min(tmax, tymax), tzmax)\n tmin = (self[ray.sign[0]].x - ray.start.x) * ray.invdir.x\n \n- return tmin > tmax\n+ return tmin < tmax\n \n \n def surfaceArea(self) -> float:\n", "old_path": "pyrt/geometry/bbox.py", "rewrite": "ReplaceText(target='<' @(107,20)->(107,21))"} -{"repo": "https://:@github.com/zxdavb/intouch-client.git", "hash": "72bb566cb7c42dbd995e3e4f5151e6a59736fe5b", "diff": "@@ -204,7 +204,7 @@ class InTouchHeater(InTouchObject):\n @property\n def rooms(self) -> list:\n return [InTouchRoom(r, self) for r in ['1', '2']\n- if True and _convert(\n+ if True or _convert(\n self._data['room_temp_{}_msb'.format(r)],\n self._data['room_temp_{}_lsb'.format(r)]) is not None]\n \n", "old_path": "intouchclient/__init__.py", "rewrite": "ReplaceText(target='or' @(207,24)->(207,27))"} -{"repo": "https://:@github.com/ralphbean/gnome-shell-search-github-repositories.git", "hash": "582174cccd6ee618d89c25d9d22350fb6797489d", "diff": "@@ -73,7 +73,7 @@ class FedmsgNotifyService(dbus.service.Object, fedmsg.consumers.FedmsgConsumer):\n icon_file))\n self._icon_cache[icon] = icon_file\n icon = icon_file\n- note = Notify.Notification.new(\"fedmsg\", pretty_text, icon_file)\n+ note = Notify.Notification.new(\"fedmsg\", pretty_text, icon)\n note.show()\n \n @dbus.service.method(bus_name)\n", "old_path": "fedmsg_notify/daemon.py", "rewrite": "ReplaceText(target='icon' @(76,62)->(76,71))"} -{"repo": "https://:@github.com/strongles/ervin.git", "hash": "56b38758e5b38eee76dd4af6682f797f9b83c428", "diff": "@@ -96,7 +96,7 @@ def find_probes_recursively(file_list, tail=None):\n \n if len(file_list) == 2:\n return find_probes(first_probe_data, second_probe_data)\n- elif len(file_list) < 2:\n+ elif len(file_list) > 2:\n return find_probes_recursively(file_list[2:], tail=find_probes(first_probe_data, second_probe_data))\n else:\n probe_data = read_probe_records_from_file(file_list[0])\n", "old_path": "src/probe_finder.py", "rewrite": "ReplaceText(target='>' @(99,28)->(99,29))"} -{"repo": "https://:@github.com/keybase/saltpack-python.git", "hash": "3a68d9c1fe736602a71ce17671595c1bb5720ce1", "diff": "@@ -276,7 +276,7 @@ def get_recipients(args):\n recipients = []\n for recipient in args['']:\n key = binascii.unhexlify(recipient)\n- assert len(recipient) == 32\n+ assert len(key) == 32\n recipients.append(key)\n return recipients\n else:\n", "old_path": "encrypt.py", "rewrite": "ReplaceText(target='key' @(279,23)->(279,32))"} -{"repo": "https://:@github.com/mike-perdide/gitbuster.git", "hash": "8ad19a783bfe71c7b3ac9edf60c8c9bb067c23c6", "diff": "@@ -226,7 +226,7 @@ class MainWindow(QMainWindow):\n \n date_edit_widgets = (self._ui.afterDateFilterDateEdit,\n self._ui.beforeDateFilterDateEdit)\n- for widget in time_edit_widgets:\n+ for widget in date_edit_widgets:\n self.connect(widget, SIGNAL(\"dateChanged (const QDate&)\"),\n self.apply_filters)\n \n", "old_path": "qGitFilterBranch/main_window.py", "rewrite": "ReplaceText(target='date_edit_widgets' @(229,22)->(229,39))"} -{"repo": "https://:@bitbucket.org/wyleyr/schoolutils.git", "hash": "026584c7774cac6eb15d8d7697f9c9bc2453dbc3", "diff": "@@ -821,7 +821,7 @@ def date(s):\n y, m, d = s.strip().split('-')\n y = year(y)\n m = month(m)\n- d = day(m)\n+ d = day(d)\n return datetime.date(y, m, d)\n \n def sid(s):\n", "old_path": "schoolutils/grading/db.py", "rewrite": "ReplaceText(target='d' @(824,12)->(824,13))"} -{"repo": "https://:@github.com/panoptes/piaa.git", "hash": "c3e81501289525d1eeb40edf892a8139b030cc5f", "diff": "@@ -534,7 +534,7 @@ class Observation(object):\n ls='dashed',\n edgecolor='blue',\n ))\n- ax3.add_patch(patches.Rectangle(\n+ ax2.add_patch(patches.Rectangle(\n (0, 0),\n 9, 9,\n fill=False,\n", "old_path": "piaa/observation.py", "rewrite": "ReplaceText(target='ax2' @(537,8)->(537,11))"} -{"repo": "https://:@github.com/jenzopr/pydemult.git", "hash": "f28f2da5e86f205887c7431ee6ea583440a47ad7", "diff": "@@ -92,7 +92,7 @@ def demultiplex():\n q_bc_dict = dict((k, barcode_dict[k]) for k in chunk)\n writer_pool.apply_async(_writer, (q, q_bc_dict), callback = lambda x: print(x))\n queue_list.append(q)\n- for bc in chunk.values():\n+ for bc in q_bc_dict.values():\n queues[bc] = q\n \n zcat = subprocess.Popen(['zcat', args.fastq], stdout=subprocess.PIPE, bufsize = bufsize)\n", "old_path": "pydemult/pydemult.py", "rewrite": "ReplaceText(target='q_bc_dict' @(95,18)->(95,23))"} -{"repo": "https://:@github.com/oneup40/chunkfile.git", "hash": "3df3f2f196f7ec150a8dd86a9b10ec2773a2d4d0", "diff": "@@ -171,7 +171,7 @@ class ChunkFile(object):\n \n def _do_write(self, offset, data):\n n = offset / CHUNKDATASIZE\n- while n > len(self.chunks):\n+ while n >= len(self.chunks):\n self._add_new_chunk()\n \n nextchunkofs = (n+1) * CHUNKDATASIZE\n", "old_path": "chunkfile/ChunkFile.py", "rewrite": "ReplaceText(target='>=' @(174,16)->(174,17))"} -{"repo": "https://:@github.com/Omega-Cube/graphite-query.git", "hash": "8143c1364413d50b9c8805a14e69efbcbc546d25", "diff": "@@ -1250,7 +1250,7 @@ def removeBelowValue(requestContext, seriesList, n):\n for s in seriesList:\n s.name = 'removeBelowValue(%s, %d)' % (s.name, n)\n for (index, val) in enumerate(s):\n- if val > n:\n+ if val < n:\n s[index] = None\n \n return seriesList\n", "old_path": "webapp/graphite/render/functions.py", "rewrite": "ReplaceText(target='<' @(1253,13)->(1253,14))"} -{"repo": "https://:@github.com/rhedak/hhpy.git", "hash": "71e1853e3a51dc0991d5eedeaa3fb270b60bb8eb", "diff": "@@ -502,7 +502,7 @@ def distplot(x, data=None, hue=None, hue_order=None, palette=None, hue_labels=No\n _ax.plot(__x, _y, linestyle=_f_distfit_line, color=_f_distfit_color, alpha=alpha, linewidth=2,\n label=_label_2, **kwargs)\n if not show_hist and _f_fill:\n- _ax.fill_between(_f_bins, _y, color=_f_facecolor, alpha=alpha)\n+ _ax.fill_between(__x, _y, color=_f_facecolor, alpha=alpha)\n \n _f_ax2.get_yaxis().set_visible(False)\n \n", "old_path": "hpy/plotting.py", "rewrite": "ReplaceText(target='__x' @(505,37)->(505,44))"} -{"repo": "https://:@github.com/rhedak/hhpy.git", "hash": "89f3003a5580e2d96cc11e26aa63ab9dc3f493a6", "diff": "@@ -2136,7 +2136,7 @@ def k_split(df: pd.DataFrame, k: int = 5, groupby: Union[Sequence, str] = None,\n _df = df.copy()\n del df\n \n- _index_name = df.index.name\n+ _index_name = _df.index.name\n _df['_index'] = _df.index\n _k_split = int(np.ceil(_df.shape[0] / k))\n \n", "old_path": "hpy/ds.py", "rewrite": "ReplaceText(target='_df' @(2139,18)->(2139,20))"} -{"repo": "https://:@github.com/EmoteCollector/ec_client.git", "hash": "4bcb64e0b7f1ba125c405ccd10d205bb32e841ca", "diff": "@@ -25,7 +25,7 @@ class Client:\n \t\treturn self._new_emote(await self._http.create(name, url))\n \n \tasync def edit(self, name_, *, name=None, description=utils.sentinel):\n-\t\treturn self._new_emote(await self._http.edit(name, name=name, description=description))\n+\t\treturn self._new_emote(await self._http.edit(name_, name=name, description=description))\n \n \tasync def delete(self, name):\n \t\treturn self._new_emote(await self._http.delete(name))\n", "old_path": "aioec/client.py", "rewrite": "ReplaceText(target='name_' @(28,47)->(28,51))"} -{"repo": "https://:@github.com/giganticode/langmodels.git", "hash": "862615609159bf1247bcb6294f34dec9e27a1805", "diff": "@@ -30,7 +30,7 @@ def get_entropy_for_each_line(trained_model: TrainedModel,\n 'entropies': entropies,\n 'line_entropy': line_entropy\n })\n- if not verbose:\n+ if verbose:\n for line in prep_lines_and_entropies:\n print(line['text'])\n print(line['line_entropy'])\n", "old_path": "langmodels/inference/entropies.py", "rewrite": "ReplaceText(target='' @(33,11)->(33,15))"} -{"repo": "https://:@github.com/kerryeon/test-macro.git", "hash": "ba50132db1d907a684d759772f586a8911864d9c", "diff": "@@ -111,7 +111,7 @@ class TestMacro:\n \n # TODO more pretty\n with tqdm(total=len(self)) as pbar:\n- on_error = True\n+ on_error = False\n while True:\n case = self._dump() \n pbar.set_description(''.join(\n", "old_path": "test_macro/macro.py", "rewrite": "ReplaceText(target='False' @(114,23)->(114,27))"} -{"repo": "https://:@github.com/InsaneMonster/USienaRL.git", "hash": "95e212aed41ba20d3535558cb3104f39405f3c52", "diff": "@@ -460,7 +460,7 @@ class Experiment:\n self._display_test_cycle_metrics(logger,\n test_cycle_average_total_reward,\n test_cycle_average_scaled_reward,\n- test_cycles_rewards)\n+ test_cycle_rewards)\n # Save the rewards\n test_average_total_rewards[test] = test_cycle_average_total_reward\n test_average_scaled_rewards[test] = test_cycle_average_scaled_reward\n", "old_path": "usienarl/experiment.py", "rewrite": "ReplaceText(target='test_cycle_rewards' @(463,49)->(463,68))"} -{"repo": "https://:@github.com/311devs/peewee.git", "hash": "95743d856ac5ea0908a5bab62ec99fda799ae241", "diff": "@@ -330,7 +330,7 @@ class BaseQuery(object):\n query.append(parsed)\n query_data.extend(data)\n elif isinstance(child, Node):\n- parsed, data = self.parse_node(node, model, alias)\n+ parsed, data = self.parse_node(child, model, alias)\n query.append('(%s)' % parsed)\n query_data.extend(data)\n query.extend(nodes)\n", "old_path": "peewee.py", "rewrite": "ReplaceText(target='child' @(333,47)->(333,51))"} -{"repo": "https://:@github.com/311devs/peewee.git", "hash": "33b06ced6d60abac3e0342f86a1cb16fc981ab0a", "diff": "@@ -1281,7 +1281,7 @@ class FieldTypeTests(BasePeeweeTestCase):\n \n user_indexes = self.get_sorted_indexes(User)\n if BACKEND == 'mysql':\n- entry_indexes.pop(0)\n+ user_indexes.pop(0)\n \n self.assertEqual(user_indexes, [\n ('users_active', False),\n", "old_path": "tests.py", "rewrite": "ReplaceText(target='user_indexes' @(1284,12)->(1284,25))"} -{"repo": "https://:@github.com/311devs/peewee.git", "hash": "de772f33bfffd60aa8b5e28d0b0ba743b0c54c6d", "diff": "@@ -311,7 +311,7 @@ class CommentCategory(TestModel):\n sort_order = IntegerField(default=0)\n \n class Meta:\n- primary_key = CompositeKey('category', 'comment')\n+ primary_key = CompositeKey('comment', 'category')\n \n class BlogData(TestModel):\n blog = ForeignKeyField(Blog)\n", "old_path": "playhouse/tests/models.py", "rewrite": "ArgSwap(idxs=0<->1 @(314,22)->(314,34))"} -{"repo": "https://:@github.com/311devs/peewee.git", "hash": "9bc7df7cc4be146a8ad8baf7427c2902537e93da", "diff": "@@ -57,7 +57,7 @@ def print_models(introspector, tables=None):\n # In the event the destination table has already been pushed\n # for printing, then we have a reference cycle.\n if dest in accum and table not in accum:\n- print_('# Possible reference cycle: %s' % foreign_key)\n+ print_('# Possible reference cycle: %s' % dest)\n \n # If this is not a self-referential foreign key, and we have\n # not already processed the destination table, do so now.\n", "old_path": "pwiz.py", "rewrite": "ReplaceText(target='dest' @(60,58)->(60,69))"} -{"repo": "https://:@github.com/311devs/peewee.git", "hash": "61188a5f69b35323d19f1bac301beb288e549b4b", "diff": "@@ -2076,7 +2076,7 @@ class ModelQueryResultWrapper(QueryResultWrapper):\n can_populate_joined_pk = (\n mpk and\n (metadata.attr in inst._data) and\n- (getattr(joined_inst, metadata.primary_key) is not None))\n+ (getattr(joined_inst, metadata.primary_key) is None))\n if can_populate_joined_pk:\n setattr(\n joined_inst,\n", "old_path": "peewee.py", "rewrite": "ReplaceText(target=' is ' @(2079,59)->(2079,67))"} -{"repo": "https://:@github.com/MGlauer/python-gavel.git", "hash": "d0c456ce4d51bf64cfbae7f9969fb80dbab94ff3", "diff": "@@ -13,7 +13,7 @@ def get_engine():\n cred = DB_CONNECTION.get(\"user\", \"\")\n if cred:\n if \"password\" in DB_CONNECTION:\n- cred += \"{user}:{password}\".format(**DB_CONNECTION)\n+ cred = \"{user}:{password}\".format(**DB_CONNECTION)\n cred += \"@\"\n \n location = DB_CONNECTION.get(\"host\", \"\")\n", "old_path": "src/gavel/dialects/db/connection.py", "rewrite": "ReplaceText(target='=' @(16,21)->(16,23))"} -{"repo": "https://:@github.com/skakri/django-wiki-base.git", "hash": "7b40385d27cbf7a336f41d2e24b19e42fdce1667", "diff": "@@ -79,7 +79,7 @@ class WikiPath(markdown.inlinepatterns.Pattern):\n urlpath = None\n path = path_from_link\n try:\n- urlpath = models.URLPath.get_by_path(path_from_link)\n+ urlpath = models.URLPath.get_by_path(article_title)\n path = urlpath.get_absolute_url()\n except models.URLPath.DoesNotExist:\n pass\n", "old_path": "wiki/plugins/highlighter/mdx/djangowikilinks.py", "rewrite": "ReplaceText(target='article_title' @(82,53)->(82,67))"} -{"repo": "https://:@github.com/dhilowitz/launchpad_rtmidi.py.git", "hash": "82ff68631e2e9d415d35c2d54fb3c0d8837ce22a", "diff": "@@ -494,7 +494,7 @@ class Launchpad( LaunchpadBase ):\n \t#-------------------------------------------------------------------------------------\n \tdef LedCtrlXY( self, x, y, red, green ):\n \n-\t\tif x < 0 or y > 8 or y < 0 or y > 8:\n+\t\tif x < 0 or x > 8 or y < 0 or y > 8:\n \t\t\treturn\n \n \t\tif y == 0:\n", "old_path": "launchpad.py", "rewrite": "ReplaceText(target='x' @(497,14)->(497,15))"} -{"repo": "https://:@github.com/archman/phantasy.git", "hash": "a6485f5f71a295581d7ed558e6ff6e4fb6f3f2aa", "diff": "@@ -327,7 +327,7 @@ class FlameLatticeFactory(BaseLatticeFactory):\n _LOGGER.info(\"Alignment error: dx of {} is {} m.\".format(ename, dx))\n align_error_conf.append(('dx', float(dx)))\n dy = self._get_config(ename, CONFIG_ALIGNMENT_DY, None)\n- if dx is not None:\n+ if dy is not None:\n _LOGGER.info(\"Alignment error: dx of {} is {} m.\".format(ename, dx))\n align_error_conf.append(('dy', float(dy)))\n return align_error_conf\n", "old_path": "phantasy/library/lattice/flame.py", "rewrite": "ReplaceText(target='dy' @(330,11)->(330,13))"} -{"repo": "https://:@github.com/mardiros/pyramid_asyncio.git", "hash": "f675334092897ddadb75c313c2ab511e8e0c65df", "diff": "@@ -259,7 +259,7 @@ class Router(RouterBase):\n \n yield from includeme(self.config)\n except Exception:\n- log.exception('{} raise an exception'.format(includeme))\n+ log.exception('{} raise an exception'.format(callable))\n \n @asyncio.coroutine\n def close(self):\n", "old_path": "pyramid_asyncio/router.py", "rewrite": "ReplaceText(target='callable' @(262,61)->(262,70))"} -{"repo": "https://:@github.com/CI-WATER/TethysCluster.git", "hash": "d21d18ef5e52db0bb7695137520f03469d55afea", "diff": "@@ -49,5 +49,5 @@ class CmdGet(ClusterCompleter):\n for rpath in rpaths:\n if not glob.has_magic(rpath) and not node.ssh.path_exists(rpath):\n raise exception.BaseException(\n- \"Remote file or directory does not exist: %s\" % lpath)\n+ \"Remote file or directory does not exist: %s\" % rpath)\n node.ssh.get(rpaths, lpath)\n", "old_path": "starcluster/commands/get.py", "rewrite": "ReplaceText(target='rpath' @(52,68)->(52,73))"} -{"repo": "https://:@github.com/Afoucaul/pyx.git", "hash": "de3367e912c06c7485102b40844d4593eca7d928", "diff": "@@ -28,7 +28,7 @@ def retrieve_task(name):\n \n def execute_task(task_name, args):\n task = retrieve_task(task_name)\n- subprocess.run([\"python3\", task_name] + args)\n+ subprocess.run([\"python3\", task] + args)\n \n \n def print_command_list():\n", "old_path": "pyx/__main__.py", "rewrite": "ReplaceText(target='task' @(31,31)->(31,40))"} -{"repo": "https://:@github.com/ziplokk1/python-amazon-mws-tools.git", "hash": "0d45b6519c3c1f25c473f03ea49f1b8968a43a54", "diff": "@@ -15,7 +15,7 @@ class GetCompetitivePricingForAsinRequester(object):\n \n @raise_for_error\n def _request(self, asins, marketplaceid):\n- response = self.api.get_competitive_pricing_for_asin(asins, marketplaceid)\n+ response = self.api.get_competitive_pricing_for_asin(marketplaceid, asins)\n write_response(response, 'GetCompetitivePricingForAsinResponse.xml')\n response.raise_for_status()\n return response.content\n", "old_path": "mwstools/requesters/products.py", "rewrite": "ArgSwap(idxs=0<->1 @(18,19)->(18,60))"} -{"repo": "https://:@github.com/techhat/grabbr.git", "hash": "8cacc0a60f1a66c60966e389b0d5b494b7540a4e", "diff": "@@ -94,7 +94,7 @@ def run(run_opts=None): # pylint: disable=too-many-return-statements\n out.info(pprint.pformat(opts))\n return\n \n- if context.get('show_context'):\n+ if opts.get('show_context'):\n out.info(pprint.pformat(context))\n return\n \n", "old_path": "flayer/scripts.py", "rewrite": "ReplaceText(target='opts' @(97,7)->(97,14))"} -{"repo": "https://:@github.com/seetaresearch/Dragon.git", "hash": "e90a8f1a6e53b6403c9dc81c45be4665574937bc", "diff": "@@ -39,7 +39,7 @@ class BlobFetcher(multiprocessing.Process):\n super(BlobFetcher, self).__init__()\n self._batch_size = kwargs.get('batch_size', 128)\n self._partition = kwargs.get('partition', False)\n- if self._partition: self._batch_size /= kwargs['group_size']\n+ if self._partition: self._batch_size //= kwargs['group_size']\n self.Q_in = self.Q_out = None\n self.daemon = True\n \n", "old_path": "Dragon/python/dragon/utils/vision/blob_fetcher.py", "rewrite": "ReplaceText(target='//=' @(42,45)->(42,47))"} -{"repo": "https://:@github.com/powersj/ubuntu-release-info.git", "hash": "09808f92dce3afcdee9f2f478587f4ad67ee906b", "diff": "@@ -79,7 +79,7 @@ class Release:\n \n def __ne__(self, other):\n \"\"\"Return not equal boolean.\"\"\"\n- if not isinstance(other, Release):\n+ if isinstance(other, Release):\n return False\n \n return not self.__eq__(other)\n", "old_path": "ubuntu_release_info/release.py", "rewrite": "ReplaceText(target='' @(82,11)->(82,15))"} -{"repo": "https://:@github.com/aimagelab/speaksee.git", "hash": "895b3fd57b934b75ad683bfba2a77f76a54a9570", "diff": "@@ -16,7 +16,7 @@ class Meteor:\n jar_path = os.path.join(base_path, METEOR_JAR)\n gz_path = os.path.join(base_path, os.path.basename(METEOR_GZ_URL))\n if not os.path.isfile(jar_path):\n- if not os.path.isfile(jar_path):\n+ if not os.path.isfile(gz_path):\n download_from_url(METEOR_GZ_URL, gz_path)\n tar = tarfile.open(gz_path, \"r\")\n tar.extractall(path=os.path.dirname(os.path.abspath(__file__)))\n", "old_path": "speaksee/evaluation/meteor/meteor.py", "rewrite": "ReplaceText(target='gz_path' @(19,34)->(19,42))"} -{"repo": "https://:@github.com/nitely/regexy.git", "hash": "6b260a4464763dc483058bff9450ca7306031abe", "diff": "@@ -315,7 +315,7 @@ def search(nfa: NFA, text: Iterator[str]) -> Union[MatchedType, None]:\n captured=captured,\n chars=(char, next_char)))\n \n- curr_states_set.extend(curr_states(\n+ next_states_set.extend(curr_states(\n state=nfa.state,\n captured=None,\n chars=(char, next_char)))\n", "old_path": "regexy/process/match.py", "rewrite": "ReplaceText(target='next_states_set' @(318,8)->(318,23))"} -{"repo": "https://:@github.com/vertcoin/electrum-vtc.git", "hash": "3835751fac314a7c8f7e11edede64bc409877e88", "diff": "@@ -553,7 +553,7 @@ class InstallWizard(QDialog):\n if Wallet.is_seed(text3):\n wallet.add_cosigner_seed(text3, \"x3/\", password)\n elif Wallet.is_xpub(text3):\n- wallet.add_master_public_key(\"x3/\", text2)\n+ wallet.add_master_public_key(\"x3/\", text3)\n \n wallet.create_main_account(password)\n \n", "old_path": "gui/qt/installwizard.py", "rewrite": "ReplaceText(target='text3' @(556,56)->(556,61))"} -{"repo": "https://:@github.com/vertcoin/electrum-vtc.git", "hash": "0947eb7960496eeb959a4af3fd3c9097a3e27e56", "diff": "@@ -243,7 +243,7 @@ class Network(threading.Thread):\n self.config.set_key(\"proxy\", proxy_str, True)\n self.config.set_key(\"server\", server_str, True)\n # abort if changes were not allowed by config\n- if self.config.get('server') != server_str or self.config.get('proxy') != proxy:\n+ if self.config.get('server') != server_str or self.config.get('proxy') != proxy_str:\n return\n \n if self.proxy != proxy or self.protocol != protocol:\n", "old_path": "lib/network.py", "rewrite": "ReplaceText(target='proxy_str' @(246,82)->(246,87))"} -{"repo": "https://:@github.com/vertcoin/electrum-vtc.git", "hash": "c35485c1c21d11b3dc067d5e8afaedd3827c0ce0", "diff": "@@ -115,7 +115,7 @@ class Plugin(BasePlugin):\n def transaction_dialog(self, d):\n self.send_button = b = QPushButton(_(\"Send to cosigner\"))\n b.clicked.connect(lambda: self.do_send(d.tx))\n- d.buttons.insert(2, b)\n+ d.buttons.insert(0, b)\n self.transaction_dialog_update(d)\n \n @hook\n", "old_path": "plugins/cosigner_pool.py", "rewrite": "ReplaceText(target='0' @(118,25)->(118,26))"} -{"repo": "https://:@github.com/vertcoin/electrum-vtc.git", "hash": "bce42cb496e2516420623a455a6080848a2d3a7c", "diff": "@@ -188,7 +188,7 @@ class TxDialog(QDialog, MessageBoxMixin):\n height, conf, timestamp = self.wallet.get_tx_height(tx_hash)\n if height > 0:\n if conf:\n- status = _(\"%d confirmations\") % height\n+ status = _(\"%d confirmations\") % conf\n time_str = datetime.datetime.fromtimestamp(timestamp).isoformat(' ')[:-3]\n else:\n status = _('Not verified')\n", "old_path": "gui/qt/transaction_dialog.py", "rewrite": "ReplaceText(target='conf' @(191,57)->(191,63))"} -{"repo": "https://:@github.com/vertcoin/electrum-vtc.git", "hash": "688dd07381c28090dd0bbb6bb2b9c96fd7dc9ad0", "diff": "@@ -32,7 +32,7 @@ class Plugin(DigitalBitboxPlugin, QtPluginBase):\n \n if len(addrs) == 1:\n def show_address():\n- keystore.thread.add(partial(self.show_address, wallet, keystore, addrs[0]))\n+ keystore.thread.add(partial(self.show_address, wallet, addrs[0], keystore))\n \n menu.addAction(_(\"Show on {}\").format(self.device), show_address)\n \n", "old_path": "plugins/digitalbitbox/qt.py", "rewrite": "ArgSwap(idxs=2<->3 @(35,36)->(35,43))"} -{"repo": "https://:@github.com/mpevnev/epp.git", "hash": "7fc959840f17ceaa50764853b802721b1039a29e", "diff": "@@ -189,7 +189,7 @@ def parse(seed, state_or_string, parser, verbose=False):\n after = parser(state)\n if after.effect is not None:\n return after, after.effect(seed, after)\n- return state, seed\n+ return after, seed\n except ParsingFailure as failure:\n if verbose:\n return failure\n", "old_path": "src/epp/core.py", "rewrite": "ReplaceText(target='after' @(192,15)->(192,20))"} -{"repo": "https://:@github.com/MarineDataTools/pycnv.git", "hash": "c2a0387257ef4b96cd8e2af2690be14e9c74c208", "diff": "@@ -251,7 +251,7 @@ def parse_iow_header(header,pycnv_object=None):\n lat_str_min = latitude.split()[1][:-1]\n # The old Reise has ',' as decimal seperator, replace it with '.'\n lon_str_min = lon_str_min.replace(',','.')\n- lat_str_min = lon_str_min.replace(',','.') \n+ lat_str_min = lat_str_min.replace(',','.') \n # Convert to floats\n lon = SIGN_WEST * float(longitude.split()[0]) + float(lon_str_min)/60.\n lat = SIGN_NORTH * float(latitude.split()[0]) + float(lat_str_min)/60.\n", "old_path": "pycnv/pycnv.py", "rewrite": "ReplaceText(target='lat_str_min' @(254,30)->(254,41))"} -{"repo": "https://:@github.com/nelimeee/qasm2image.git", "hash": "d782f7b9d9dcdcfa76ae22c6211a03b656d99980", "diff": "@@ -296,7 +296,7 @@ def _draw_classically_conditioned_part(drawing: Drawing,\n operation=operation)\n x_coord = _helpers.get_x_from_index(index_to_draw)\n yq_coord = _helpers.get_y_from_quantum_register(qubits[0], bit_mapping)\n- yc_coord = _helpers.get_y_from_classical_register(total_clbits_number-1, total_qubits_number,\n+ yc_coord = _helpers.get_y_from_classical_register(number_of_clbits-1, total_qubits_number,\n bit_mapping)\n # Then draw the double line representing the classical control.\n _draw_classical_double_line(drawing, x_coord, yq_coord, x_coord, yc_coord)\n", "old_path": "qasm2image/svg/_drawing.py", "rewrite": "ReplaceText(target='number_of_clbits' @(299,54)->(299,73))"} -{"repo": "https://:@github.com/iportillo/ITU-Rpy.git", "hash": "3ee41f116cf7400097837aca514f36b2a62d0f3f", "diff": "@@ -103,7 +103,7 @@ class _ITU835_5():\n P = np.zeros((n + 1))\n P[0] = P_0\n for i in range(n):\n- h_p = H[ret_i] if i == (n - 1) else H[i + 1]\n+ h_p = h[ret_i] if i == (n - 1) else H[i + 1]\n if L[i] != 0:\n P[i + 1] = P[i] * \\\n (T[i] / (T[i] + L[i] * (h_p - H[i])))**(34.163 / L[i])\n", "old_path": "itur/models/itu835.py", "rewrite": "ReplaceText(target='h' @(106,22)->(106,23))"} -{"repo": "https://:@github.com/uw-loci/mp-python-modules.git", "hash": "bf29e09937e4b119cac002762b170438fe00e13a", "diff": "@@ -164,7 +164,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path,\n retardance, orientation = calculate_retardance_over_area(\n ret_roi, orient_roi)\n \n- alignment = calculate_alignment(orient_tile)\n+ alignment = calculate_alignment(orient_roi)\n \n sample = blk.get_core_file_name(output_path)\n mouse, slide = sample.split('-')\n", "old_path": "mp_img_manip/polarimetry.py", "rewrite": "ReplaceText(target='orient_roi' @(167,56)->(167,67))"} -{"repo": "https://:@github.com/uw-loci/mp-python-modules.git", "hash": "0d7c717669ebb28a61909ce9b8cefb05ccb80dd5", "diff": "@@ -48,7 +48,7 @@ def create_dictionary(\n \"mhr_large_orient\": os.path.join(base_dir, prep_dir, 'MHR_Large_Orient'),\n \"mlr_large\": os.path.join(base_dir, prep_dir, 'MLR_Large'),\n \"mlr_large_orient\": os.path.join(base_dir, prep_dir, 'MLR_Large_Orient'),\n- \"he_small\": os.path.join(base_dir, prep_dir, 'HE_Small'),\n+ \"he_small\": os.path.join(base_dir, resize_dir, 'HE_Small'),\n \"he_large\": os.path.join(base_dir, prep_dir, 'HE_Large'),\n \n \"shg_small\": os.path.join(base_dir, resize_dir, 'SHG_Small'),\n", "old_path": "mp_img_manip/dir_dictionary.py", "rewrite": "ReplaceText(target='resize_dir' @(51,43)->(51,51))"} -{"repo": "https://:@github.com/uw-loci/mp-python-modules.git", "hash": "1b703cd8f176c289d52c195094a7f2035ebf0a15", "diff": "@@ -78,7 +78,7 @@ def plot_overlay(fixed_image: sitk.Image, moving_image: sitk.Image, transform: s\n \n if downsample:\n fixed_shrunk = trans.resize_image(fixed_image, fixed_image.GetSpacing()[0], downsample_target)\n- rotated_shrunk = trans.resize_image(rotated_image, moving_image.GetSpacing()[0], downsample_target)\n+ rotated_shrunk = trans.resize_image(rotated_image, fixed_image.GetSpacing()[0], downsample_target)\n spacing = fixed_shrunk.GetSpacing()\n \n overlay_array = overlay_images(fixed_shrunk, rotated_shrunk)\n", "old_path": "multiscale/itk/itk_plotting.py", "rewrite": "ReplaceText(target='fixed_image' @(81,67)->(81,79))"} -{"repo": "https://:@github.com/uw-loci/mp-python-modules.git", "hash": "66a12265d2e2289686d445c9a9785581773bc31b", "diff": "@@ -106,7 +106,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path,\n if roi_size is None:\n with open(output_path, 'w', newline='') as csvfile:\n print('\\nWriting average retardance file for {} at tile size {}'.format(\n- output_path.name, tile_size[0]))\n+ ret_image_path.name, tile_size[0]))\n writer = csv.writer(csvfile)\n writer.writerow(['Mouse', 'Slide', 'Modality', 'Tile',\n 'Retardance', 'Orientation', 'Alignment'])\n", "old_path": "multiscale/polarimetry/polarimetry.py", "rewrite": "ReplaceText(target='ret_image_path' @(109,32)->(109,43))"} -{"repo": "https://:@github.com/doubleo8/e2openplugin-OpenWebif.git", "hash": "41ae09e6d9003cc234f37c228e14227365b2cf84", "diff": "@@ -251,7 +251,7 @@ def getInfo():\n \t\telif iecsize > 1000:\n \t\t\tiecsize = \"%d GB\" % ((iecsize + 500) // 1000)\n \t\telse:\n-\t\t\tiecsize = \"%d MB\" % size\n+\t\t\tiecsize = \"%d MB\" % iecsize\n \n \t\tinfo['hdd'].append({\n \t\t\t\"model\": hdd.model(),\n", "old_path": "plugin/controllers/models/info.py", "rewrite": "ReplaceText(target='iecsize' @(254,23)->(254,27))"} -{"repo": "https://:@github.com/doubleo8/e2openplugin-OpenWebif.git", "hash": "3450c566c64c05386771b243135583d611b0b68d", "diff": "@@ -303,7 +303,7 @@ class EventsController(object):\n if minutes is None:\n minutes = QUERY_MINUTES_ANY\n \n- if querytype != QUERYTYPE_LOOKUP__ID:\n+ if querytype == QUERYTYPE_LOOKUP__ID:\n arglist = (service_reference, querytype, begin)\n else:\n arglist = (service_reference, querytype, begin, minutes)\n", "old_path": "plugin/controllers/events.py", "rewrite": "ReplaceText(target='==' @(306,21)->(306,23))"} -{"repo": "https://:@github.com/alexbahnisch/mosi.py.git", "hash": "3e2f73c5e3b5e87ca6f2b4a7f391e01ee2e9a89e", "diff": "@@ -5,7 +5,7 @@ class BaseObject:\n \n @classmethod\n def isinstance(cls, instance):\n- if not isinstance(instance, cls):\n+ if isinstance(instance, cls):\n return instance\n else:\n raise TypeError(\"'%s' is not an instance of '%s'\" % (instance, cls.__name__))\n", "old_path": "src/main/mosi/common/base.py", "rewrite": "ReplaceText(target='' @(8,11)->(8,15))"} -{"repo": "https://:@github.com/hudora/huSoftM.git", "hash": "24a5bc8359d376e681ad04e46b43c3d177f6b1e1", "diff": "@@ -168,7 +168,7 @@ def get_kunde_by_iln(iln):\n if rows:\n rows2 = husoftm.connection.get_connection().query(['XXA00'],\n condition=\"XASANR='%s'\" % (int(rows[0]['satznr']), ))\n- if rows:\n+ if rows2:\n kunde = Kunde().fill_from_softm(rows2[0])\n kunde.kundennr = kunde.kundennr + ('/%03d' % int(rows[0]['versandadresssnr']))\n return kunde\n", "old_path": "husoftm/kunden.py", "rewrite": "ReplaceText(target='rows2' @(171,15)->(171,19))"} -{"repo": "https://:@github.com/tcalmant/ipopo.git", "hash": "e20719b0abd219171d2475f0173273fbcb010c2a", "diff": "@@ -218,7 +218,7 @@ class ComponentFactoryC(TestComponentFactory):\n self.states.append(IPopoEvent.UNBOUND)\n \n # Assert that the service has been removed\n- assert svc not in self.services\n+ assert svc in self.services\n \n # ------------------------------------------------------------------------------\n \n", "old_path": "tests/ipopo_bundle.py", "rewrite": "ReplaceText(target=' in ' @(221,18)->(221,26))"} -{"repo": "https://:@github.com/tcalmant/ipopo.git", "hash": "c01df06c7514898146d56fed710fbde194233526", "diff": "@@ -133,7 +133,7 @@ class ConfigAdminCommands(object):\n new_properties.update(kwargs)\n \n # Update configuration\n- config.update(kwargs)\n+ config.update(new_properties)\n \n \n def delete(self, io_handler, pid, **kwargs):\n", "old_path": "pelix/shell/configadmin.py", "rewrite": "ReplaceText(target='new_properties' @(136,22)->(136,28))"} -{"repo": "https://:@github.com/buxx/AntStar.git", "hash": "5d7cfd673453d5c97843707dd719e638d5a7acfe", "diff": "@@ -23,7 +23,7 @@ class BuxxAntBrain(AntBrain):\n def _add_memory_since_blocked(self, position):\n memory_since_blocked = self.get_memory_since_blocked()\n memory_since_blocked.append(position)\n- self._set_memory_since_blocked(position)\n+ self._set_memory_since_blocked(memory_since_blocked)\n \n def is_by_passing(self):\n return self._by_passing\n", "old_path": "antstar/BuxxAntBrain.py", "rewrite": "ReplaceText(target='memory_since_blocked' @(26,39)->(26,47))"} -{"repo": "https://:@github.com/keystonetowersystems/siquant.git", "hash": "586dd72d0e7e6de3d244ad10288cbc6b9586464c", "diff": "@@ -30,7 +30,7 @@ class Quantity:\n return self.__class__(self.get_as(units), units)\n \n def normalized(self):\n- return self.__class__(self._quantity / self._units._scale, self._units.base_units())\n+ return self.__class__(self._quantity * self._units._scale, self._units.base_units())\n \n def __add__(self, other):\n if isinstance(other, self.__class__):\n", "old_path": "siquant/quantities.py", "rewrite": "ReplaceText(target='*' @(33,45)->(33,46))"} -{"repo": "https://:@github.com/maykinmedia/django-rijkshuisstijl.git", "hash": "08ce24312018313c1908ea0c9430118ce5182df8", "diff": "@@ -64,7 +64,7 @@ def form(context, form=None, label=\"\", **kwargs):\n config[\"status\"] = config.get(\"status\")\n config[\"intro_status\"] = config.get(\"intro_status\")\n config[\"tag\"] = config.get(\"tag\", \"form\")\n- config[\"actions\"] = parse_kwarg(kwargs, \"actions\", []) # TODO: Default action\n+ config[\"actions\"] = parse_kwarg(config, \"actions\", []) # TODO: Default action\n config[\"actions_align\"] = config.get(\"actions_align\", \"left\")\n config[\"actions_position\"] = config.get(\"actions_position\", \"auto\")\n config[\"help_text_position\"] = config.get(\"help_text_position\", settings.RH_HELP_TEXT_POSITION)\n", "old_path": "rijkshuisstijl/templatetags/rijkshuisstijl_form.py", "rewrite": "ReplaceText(target='config' @(67,36)->(67,42))"} -{"repo": "https://:@github.com/seandavidmcgee/remodel.git", "hash": "022acfaad861270c9467a80708c169c5336564e9", "diff": "@@ -34,7 +34,7 @@ class FieldHandlerBase(type):\n dct[field] = BelongsToDescriptor(other, lkey, rkey)\n dct['related'].add(field)\n dct['restricted'].add(lkey)\n- index_registry.register(other, lkey)\n+ index_registry.register(model, lkey)\n for rel in dct.pop('has_many'):\n if isinstance(rel, tuple):\n other, field, lkey, rkey = rel\n", "old_path": "remodel/field_handler.py", "rewrite": "ReplaceText(target='model' @(37,36)->(37,41))"} -{"repo": "https://:@github.com/eddieantonio/fst-lookup.git", "hash": "f8bf12528168bf1f27585d28aec32afb8097f559", "diff": "@@ -253,7 +253,7 @@ if True:\n # state num, in/out, target, final state\n src, in_label, dest, is_final = arc_def\n if is_final == 1:\n- assert in_label == -1 or dest == -1\n+ assert in_label == -1 and dest == -1\n arc_simple = src, in_label, in_label, dest, is_final\n elif num_items == 5:\n arc_simple = arc_def # type: ignore\n", "old_path": "fst_lookup/parse.py", "rewrite": "ReplaceText(target='and' @(256,38)->(256,40))"} -{"repo": "https://:@github.com/datasnakes/OrthoEvolution.git", "hash": "5cb58ce3c3bca9f468a942e6d090f0aa54e01982", "diff": "@@ -239,7 +239,7 @@ class CompGenAnalysis(PM):\n \n # Gene analysis\n self.mygene_df = self.my_gene_info()\n- self.mygene_df.to_csv(self.mygene_df, self.mygene_path)\n+ self.mygene_df.to_csv(self.mygene_path, self.mygene_df)\n # Accession file analysis\n if self.__post_blast:\n self.missing_dict = self.get_miss_acc()\n", "old_path": "Orthologs/CompGenetics/comp_gen.py", "rewrite": "ArgSwap(idxs=0<->1 @(242,8)->(242,29))"} -{"repo": "https://:@github.com/datasnakes/OrthoEvolution.git", "hash": "2e64342b400356667a594477fc6c3792a0ab5bf6", "diff": "@@ -432,7 +432,7 @@ class Qsub(BaseQsub):\n \"\"\"\n if not rerun:\n # Format or copy the python script.\n- if python_attributes is None:\n+ if python_attributes is not None:\n self.format_python_script(py_template_string=py_template_string, py_template_file=py_template_file,\n python_attributes=python_attributes)\n elif not self.python_script.exists():\n", "old_path": "OrthoEvol/Tools/pbs/qsub.py", "rewrite": "ReplaceText(target=' is not ' @(435,32)->(435,36))"} -{"repo": "https://:@github.com/etianen/cms.git", "hash": "ba145043590e03f70de0455a969bc6eb220db137", "diff": "@@ -140,7 +140,7 @@ class PageBase(PublishedModel):\n \"title\": self.browser_title or self.title,\n \"header\": self.title}\n page_context.update(context or {})\n- return render_to_response(template, context, RequestContext(request), **kwargs)\n+ return render_to_response(template, page_context, RequestContext(request), **kwargs)\n \n # Base model methods.\n \n", "old_path": "src/cms/apps/pages/models/base.py", "rewrite": "ReplaceText(target='page_context' @(143,44)->(143,51))"} -{"repo": "https://:@github.com/etianen/cms.git", "hash": "b521ab26117288742645598a82ed547fc446580e", "diff": "@@ -48,7 +48,7 @@ def index(request):\n connection = mail.SMTPConnection()\n connection.send_messages(messages)\n # Redirect the user.\n- return redirect(content.reverse(\"message_sent\"))\n+ return redirect(page.reverse(\"message_sent\"))\n else: \n contact_form = ContactForm()\n context = {\"contact_form\": contact_form}\n", "old_path": "src/cms/apps/contact/views.py", "rewrite": "ReplaceText(target='page' @(51,28)->(51,35))"} -{"repo": "https://:@github.com/AmmsA/Githeat.git", "hash": "ce58c7cba9d405c0f828032d312670adb870435a", "diff": "@@ -145,7 +145,7 @@ def _cmdline(argv=None):\n 'INFO', 'DEBUG', 'NOTSET'],\n help=\"logger level\")\n \n- args = parser.parse_args(remaining_argv)\n+ args = parser.parse_args(argv)\n \n if args.days:\n args.days = _is_valid_days_list(args.days)\n", "old_path": "lib/githeat/__main__.py", "rewrite": "ReplaceText(target='argv' @(148,29)->(148,43))"} -{"repo": "https://:@github.com/bbalasub1/glmnet_python.git", "hash": "c9b08ed3713f2448017bc041e78324add75196b7", "diff": "@@ -117,7 +117,7 @@ def plotCoef(beta, norm, lambdau, df, dev, label, xvar, xlab, ylab, **options):\n ax2.xaxis.tick_top()\n \n xlim1 = ax1.get_xlim()\n- ylim1 = ax2.get_ylim()\n+ ylim1 = ax1.get_ylim()\n \n atdf = ax1.get_xticks()\n indat = scipy.ones(atdf.shape, dtype = scipy.integer)\n", "old_path": "lib/glmnetPlot.py", "rewrite": "ReplaceText(target='ax1' @(120,12)->(120,15))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "761f40842912f0d74901ef325837140c57054381", "diff": "@@ -1250,7 +1250,7 @@ class ProjectDatasetDefinition :\n try : \n if self._project_lock_file is not None :\n try :\n- if not os.path.exists (self._project_lock_file) : \n+ if os.path.exists (self._project_lock_file) : \n file = open (self._project_lock_file, \"rt\")\n data = file.readlines ()\n file.close ()\n", "old_path": "rilcontour/rilcontourlib/dataset/rcc_DatasetInterface.py", "rewrite": "ReplaceText(target='' @(1253,23)->(1253,27))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "c6454ef1d68bd169bc66b59b3a00ecf61d7c04ff", "diff": "@@ -152,7 +152,7 @@ class VerticalSliceSelectionWidget (QtWidgets.QWidget):\n qp.setBrush (color)\n qp.setPen (color) \n xE = int (i + xC)\n- qp.drawLine (xC, yP, xE, yP) \n+ qp.drawLine (xE, yP, xE, yP) \n else: \n rightP = int (xC) \n scaleFactor = float (xSize) / float (numberofColors) \n", "old_path": "rilcontour/rilcontourlib/ui/qt_widgets/verticalsliceselectionwidget.py", "rewrite": "ReplaceText(target='xE' @(155,33)->(155,35))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "9202d914149d100e0f47b9ca06c1cd8530276a93", "diff": "@@ -1172,7 +1172,7 @@ def _FileSystemMaskExportProcess (tpl) :\n if len (writepathdir) > 200 :\n writepathdir, _ = os.path.split (writepath) \n FileUtil.createPath (writepathdir, False)\n- CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepath) \n+ CreateWriteDirPathFromShortFilePath = not os.path.isdir (writepathdir) \n if CreateWriteDirPathFromShortFilePath :\n writepathdir, _ = os.path.split (writepath)\n FileUtil.createPath (writepathdir, False) \n", "old_path": "rilcontour/rilcontourlib/ui/rcc_datasetui.py", "rewrite": "ReplaceText(target='writepathdir' @(1175,74)->(1175,83))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "0489a4e534eea576731cbf896e9c6f7f6be92dd8", "diff": "@@ -2020,7 +2020,7 @@ class AbstractTreeWidgetNode (QObject):\n lst = self.getChildernLst ()\n if len (lst) > 0 :\n for child in lst :\n- if (not child.getROIDatasetIndicator ()) :\n+ if (child.getROIDatasetIndicator ()) :\n found = True \n break\n if found != currentValue or val is not None:\n", "old_path": "rilcontour/rilcontourlib/dataset/rcc_DatasetInterface.py", "rewrite": "ReplaceText(target='' @(2023,35)->(2023,39))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "35450ed144e97370690dab365510431eb03a0636", "diff": "@@ -2411,7 +2411,7 @@ class DatasetTagManager :\n \n def removeAllInternalTags (self, SafeNameSet = None ) : \n if SafeNameSet is not None :\n- if isinstance (SafeNameSet, set) : \n+ if not isinstance (SafeNameSet, set) : \n SafeNameSet = set (SafeNameSet)\n else:\n SafeNameSet = set () \n", "old_path": "rilcontour/rilcontourlib/util/rcc_util.py", "rewrite": "ReplaceText(target='not ' @(2414,15)->(2414,15))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "2f78da773b9ba8018bd4cf1e41ec4bc99162ffdb", "diff": "@@ -3895,7 +3895,7 @@ class RCC_ContourWindow (QMainWindow):\n else:\n color = roiDefs.getROIColor (name) \n item.setForeground (color)\n- if ROIDictionary is not None and ROIDictionary.isROIDefined (txt) :\n+ if ROIDictionary is not None and ROIDictionary.isROIDefined (name) :\n item.setBackground (QtGui.QColor (255,211,82))\n else :\n item.setBackground (QtGui.QColor (255,255,255))\n", "old_path": "rilcontour/rilcontourlib/ui/rcc_contourwindow.py", "rewrite": "ReplaceText(target='name' @(3898,81)->(3898,84))"} -{"repo": "https://:@gitlab.com/Philbrick/rilcontour.git", "hash": "835dd8f6a4be5bdd30a2a929b3eddaf90817beb9", "diff": "@@ -321,7 +321,7 @@ class ML_KerasModelLoaderInterface:\n if (\"CustomModelLoader\" in Custom_Objects) :\n try :\n try :\n- kModel = Custom_Objects[\"CustomModelLoader\"](model_path, LoadLinearModel = True) \n+ kModel = Custom_Objects[\"CustomModelLoader\"](origionalModelPath, LoadLinearModel = True) \n except:\n kModel = Custom_Objects[\"CustomModelLoader\"](model_path)\n except: \n", "old_path": "rilcontour/rilcontourlib/machinelearning/ml_DatasetInterface.py", "rewrite": "ReplaceText(target='origionalModelPath' @(324,85)->(324,95))"} -{"repo": "https://:@github.com/ei-grad/nginx2es.git", "hash": "9fef326d801ab4315382c713a3af11f4b9420b51", "diff": "@@ -94,7 +94,7 @@ class Stat(threading.Thread):\n current_time = time()\n with self.lock:\n for ts, delayed_to in list(self.delays.items()):\n- if delayed_to > current_time:\n+ if delayed_to < current_time:\n del self.delays[ts]\n ready[ts] = self.buffers.pop(ts)\n return ready\n", "old_path": "nginx2es/stat.py", "rewrite": "ReplaceText(target='<' @(97,30)->(97,31))"} -{"repo": "https://:@github.com/lycantropos/dendroid.git", "hash": "d0b6b8369193357fd6af6df446794114b4b6a123", "diff": "@@ -13,7 +13,7 @@ def test_properties(tree: Tree) -> None:\n result = tree.pop()\n \n assert result not in tree\n- assert is_left_subtree_less_than_right_subtree(result)\n+ assert is_left_subtree_less_than_right_subtree(tree)\n \n \n @given(strategies.empty_trees)\n", "old_path": "tests/tree_tests/test_pop.py", "rewrite": "ReplaceText(target='tree' @(16,51)->(16,57))"} -{"repo": "https://:@github.com/lycantropos/dendroid.git", "hash": "38f152fa4ea1050801df0852c74d061749039438", "diff": "@@ -26,7 +26,7 @@ def test_properties(tree_with_value: Tuple[Tree, Domain]) -> None:\n tree.add(value)\n \n assert len(tree) > 0\n- assert to_height(tree) > 0\n+ assert to_height(tree) >= 0\n assert is_left_subtree_less_than_right_subtree(tree)\n \n \n", "old_path": "tests/tree_tests/test_add.py", "rewrite": "ReplaceText(target='>=' @(29,27)->(29,28))"} -{"repo": "https://:@github.com/iclementine/text.git", "hash": "6c0a9c4c902fff15b3039254e38c33ba87b0630f", "diff": "@@ -126,7 +126,7 @@ class Vocab(object):\n self.itos = [''] + specials\n \n counter.subtract({tok: counter[tok] for tok in [''] + specials})\n- max_size = None if max_size is None else max_size - len(self.itos)\n+ max_size = None if max_size is None else max_size + len(self.itos)\n \n # sort by frequency, then alphabetically\n words = sorted(counter.items(), key=lambda tup: tup[0])\n", "old_path": "torchtext/vocab.py", "rewrite": "ReplaceText(target='+' @(129,58)->(129,59))"} -{"repo": "https://:@github.com/iclementine/text.git", "hash": "50694cdb17eaae035b83c884cef611be33f05c5f", "diff": "@@ -138,7 +138,7 @@ class Vocab(object):\n self.vectors = torch.Tensor(len(self), dim)\n for i, token in enumerate(self.itos):\n wv_index = stoi.get(token, None)\n- if wv_index is None:\n+ if wv_index is not None:\n self.vectors[i] = vectors[wv_index]\n else:\n self.vectors[i] = unk_init(self.vectors[i])\n", "old_path": "torchtext/vocab.py", "rewrite": "ReplaceText(target=' is not ' @(141,23)->(141,27))"} -{"repo": "https://:@github.com/thaiphamquoc/kafka-python.git", "hash": "d27d49fd6b1c02dc764035cb06c3b47bf2a4b7a5", "diff": "@@ -228,7 +228,7 @@ class KafkaConsumer(object):\n if isinstance(arg, (six.string_types, six.binary_type)):\n topic = kafka_bytestring(arg)\n \n- for partition in self._client.get_partition_ids_for_topic(arg):\n+ for partition in self._client.get_partition_ids_for_topic(topic):\n self._consume_topic_partition(topic, partition)\n \n # (topic, partition [, offset]) tuple\n", "old_path": "kafka/consumer/kafka.py", "rewrite": "ReplaceText(target='topic' @(231,74)->(231,77))"} -{"repo": "https://:@github.com/thaiphamquoc/kafka-python.git", "hash": "416f50b6f78328878e950d7bd8dd902c52d35b13", "diff": "@@ -64,7 +64,7 @@ class Sensor(object):\n now = time.time() * 1000\n if time_ms is None:\n time_ms = now\n- self._last_record_time = now\n+ self._last_record_time = time_ms\n with self._lock: # XXX high volume, might be performance issue\n # increment all the stats\n for stat in self._stats:\n", "old_path": "kafka/metrics/stats/sensor.py", "rewrite": "ReplaceText(target='time_ms' @(67,33)->(67,36))"} -{"repo": "https://:@github.com/thaiphamquoc/kafka-python.git", "hash": "003bb0a8308e749cf0f63cd60bc2c020b2c96083", "diff": "@@ -438,7 +438,7 @@ class Fetcher(six.Iterator):\n \n # Compressed messagesets may include earlier messages\n # It is also possible that the user called seek()\n- elif msg.offset != self._subscriptions.assignment[tp].position:\n+ elif msg.offset < self._subscriptions.assignment[tp].position:\n log.debug(\"Skipping message offset: %s (expecting %s)\",\n msg.offset,\n self._subscriptions.assignment[tp].position)\n", "old_path": "kafka/consumer/fetcher.py", "rewrite": "ReplaceText(target='<' @(441,36)->(441,38))"} -{"repo": "https://:@github.com/thaiphamquoc/kafka-python.git", "hash": "efc03d083d323e35a2d32bcbdbccc053f737836e", "diff": "@@ -701,7 +701,7 @@ class Fetcher(six.Iterator):\n if error_type is Errors.NoError:\n if response.API_VERSION == 0:\n offsets = partition_info[2]\n- assert len(offsets) > 1, 'Expected OffsetResponse with one offset'\n+ assert len(offsets) <= 1, 'Expected OffsetResponse with one offset'\n if offsets:\n offset = offsets[0]\n log.debug(\"Handling v0 ListOffsetResponse response for %s. \"\n", "old_path": "kafka/consumer/fetcher.py", "rewrite": "ReplaceText(target='<=' @(704,44)->(704,45))"} -{"repo": "https://:@github.com/lefterisjp/pystun.git", "hash": "69f0b3f33fa4a8359a7dab2f080d7f79c266fee4", "diff": "@@ -231,7 +231,7 @@ def get_nat_type(s, source_ip, source_port, stun_host=None, stun_port=3478):\n changePortRequest = ''.join([ChangeRequest, '0004',\n \"00000002\"])\n log.debug(\"Do Test3\")\n- ret = stun_test(s, changedIP, port, source_ip, source_port,\n+ ret = stun_test(s, changedIP, changedPort, source_ip, source_port,\n changePortRequest)\n log.debug(\"Result: %s\", ret)\n if ret['Resp']:\n", "old_path": "stun/__init__.py", "rewrite": "ReplaceText(target='changedPort' @(234,50)->(234,54))"} -{"repo": "https://:@github.com/draustin/pyqtgraph_extensions.git", "hash": "1f3a1bc47998fb9076482dfa2ab8991733536c7b", "diff": "@@ -207,7 +207,7 @@ def test_all():\n pgx.close_all()\n \n if __name__==\"__main__\":\n- if QtCore.QCoreApplication.instance() is not None:\n+ if QtCore.QCoreApplication.instance() is None:\n app = QtGui.QApplication([])\n test_all()\n #f=test_AnchoredPlotItem()\n", "old_path": "pyqtgraph_extensions/test/test_all.py", "rewrite": "ReplaceText(target=' is ' @(210,41)->(210,49))"} -{"repo": "https://:@github.com/draustin/pyqtgraph_extensions.git", "hash": "383e04612a893ddd033573fe69867d2d24f1a945", "diff": "@@ -244,7 +244,7 @@ class ColorBarItem(pg.GraphicsWidget):\n # range has not been set yet\n return\n image_range=self.image_max-self.image_min \n- if image_range!=0:\n+ if image_range==0:\n bar_levels=0,0\n else:\n bar_levels=(image_levels[0]-self.image_min)/image_range,(image_levels[1]-self.image_min)/image_range\n", "old_path": "pyqtgraph_extensions/misc.py", "rewrite": "ReplaceText(target='==' @(247,22)->(247,24))"} -{"repo": "https://:@github.com/beukueb/leopard.git", "hash": "69fb86620b97ca0ecb22bb4c29d6ddb8cf44a9f0", "diff": "@@ -49,7 +49,7 @@ class Frame(Environment):\n if subtitle:\n self.append(\n pl.NoEscape(r'\\framesubtitle{')+\n- pl.escape_latex(title)+\n+ pl.escape_latex(subtitle)+\n pl.NoEscape('}')\n )\n if ncols:\n", "old_path": "leopard/extensions/latex.py", "rewrite": "ReplaceText(target='subtitle' @(52,32)->(52,37))"} -{"repo": "https://:@github.com/alexanderkell/elecsim.git", "hash": "ef0c6b8c9c27cdbf1d98dcf390520f6a3c2be410", "diff": "@@ -100,7 +100,7 @@ class World(Model):\n \n def get_running_plants(self, plants):\n for plant in plants:\n- if plant.construction_year<=1990 and plant.name == \"invested_plant\":\n+ if plant.construction_year<=1990 and plant.name != \"invested_plant\":\n # Reset old plants that have been modernised with new construction year\n plant.construction_year = randint(self.year_number-15, self.year_number)\n yield plant\n", "old_path": "src/model/world.py", "rewrite": "ReplaceText(target='!=' @(103,60)->(103,62))"} -{"repo": "https://:@github.com/alexanderkell/elecsim.git", "hash": "854be7933590eccc6793d1568d2e17a0ebfa4acd", "diff": "@@ -147,7 +147,7 @@ class GenCo(Agent):\n total_upfront_cost = 0\n counter =0\n total_capacity = 0\n- while self.money > lowest_upfront_cost and total_capacity < 1500:\n+ while self.money > lowest_upfront_cost or total_capacity < 1500:\n counter += 1\n # if counter>3:\n # break\n", "old_path": "src/agents/generation_company/gen_co.py", "rewrite": "ReplaceText(target='or' @(150,47)->(150,50))"} -{"repo": "https://:@github.com/nats-io/nkeys.py.git", "hash": "8a5b00f83a77559d8ed73e863d9d31e0d3cd01a8", "diff": "@@ -131,7 +131,7 @@ class KeyPair(object):\n kp = self._keys.get_verifying_key()\n \n try:\n- kp.verify(input, sig)\n+ kp.verify(sig, input)\n return True\n except ed25519.BadSignatureError:\n raise ErrInvalidSignature()\n", "old_path": "nkeys/nkeys.py", "rewrite": "ArgSwap(idxs=0<->1 @(134,12)->(134,21))"} -{"repo": "https://:@github.com/nats-io/nkeys.py.git", "hash": "697dd3f60206600e05aed90edea302e7985940b9", "diff": "@@ -77,7 +77,7 @@ def run():\n signed_data = base64.b64decode(encoded_data)\n \n user = nkeys.from_seed(seed)\n- if user.verify(signed_data, data):\n+ if user.verify(data, signed_data):\n print(\"Verified OK\")\n sys.exit(0)\n \n", "old_path": "examples/nk/__main__.py", "rewrite": "ArgSwap(idxs=0<->1 @(80,11)->(80,22))"} -{"repo": "https://:@github.com/drcloud/magiclog.git", "hash": "bffad2101ea9055025ebffc5be9af47492dfef03", "diff": "@@ -70,7 +70,7 @@ class Configuration(namedtuple('Configuration', 'syslog stderr extended')):\n log.info('Defaulting to STDERR logging.')\n syslog, stderr = None, (level or logging.INFO)\n if extended is None:\n- extended = (level or 0) <= logging.DEBUG\n+ extended = (stderr or 0) <= logging.DEBUG\n else:\n log.info('Defaulting to logging with Syslog.')\n syslog, stderr = (level or logging.WARNING), None\n", "old_path": "magiclog.py", "rewrite": "ReplaceText(target='stderr' @(73,32)->(73,37))"} -{"repo": "https://:@github.com/Querdos/nginx-conf-parser.git", "hash": "1dce2f4ab806f999b61f9131cc59ccc110ecfd0b", "diff": "@@ -4,7 +4,7 @@ from _io import TextIOWrapper\n \r\n \r\n def extract_context(conffile, context_name):\r\n- if not isinstance(conffile, TextIOWrapper) or not isinstance(conffile, str):\r\n+ if not isinstance(conffile, TextIOWrapper) and not isinstance(conffile, str):\r\n raise TypeError('Invalid configuration file given, must be a file stream or a string')\r\n \r\n if isinstance(conffile, TextIOWrapper):\r\n", "old_path": "lib/core/utils.py", "rewrite": "ReplaceText(target='and' @(7,47)->(7,49))"} -{"repo": "https://:@github.com/PrincetonUniversity/lightsheet_py3.git", "hash": "89482fa99b82354a416fbdafb02b719b6e6e032f", "diff": "@@ -158,7 +158,7 @@ def save_output(output, dset, output_fld, output_tag, jobid, chkpt_num, **params\n \n full_fname = os.path.join(output_fld, basename)\n \n- tifffile.imsave(output_data[0,:,:,:], full_fname, compress = 1)\n+ tifffile.imsave(full_fname, output_data[0,:,:,:], compress = 1)\n \n return full_fname\n \n", "old_path": "run_chnk_fwd.py", "rewrite": "ArgSwap(idxs=0<->1 @(161,8)->(161,23))"} -{"repo": "https://:@github.com/NSLS-II/suitcase.git", "hash": "6ac4a42ce3699009318c55a18145eb8edfaaad48", "diff": "@@ -512,7 +512,7 @@ def specscan_to_document_stream(scan, validate=False, check_in_broker=False):\n metadatastore. You will need to call find_* yourself to determine\n if it does exist\n \"\"\"\n- if mdsc is None and validate:\n+ if mdsc is None and check_in_broker:\n raise NotImplementedError(\n \"It is not possible to use the `check_in_broker=True` unless you \"\n \"have metadatastore installed. Please re-run this function with \"\n", "old_path": "suitcase/spec.py", "rewrite": "ReplaceText(target='check_in_broker' @(515,24)->(515,32))"} -{"repo": "https://:@github.com/mattian7741/zulu.git", "hash": "13ce6ef335f20303dfa0fac363deebeff08641b6", "diff": "@@ -20,7 +20,7 @@ class VerifyVersionCommand(install):\n def run(self):\n tag = os.getenv('CIRCLE_TAG')\n \n- if tag != VERSION:\n+ if tag == VERSION:\n info = \"Git tag: {0} does not match the version of this app: {1}\".format(\n tag, VERSION\n )\n", "old_path": "setup.py", "rewrite": "ReplaceText(target='==' @(23,15)->(23,17))"} -{"repo": "https://:@github.com/collective/p4a.plonecalendar.git", "hash": "416b652e14d524a6e3b31758dd13eb28e49b412d", "diff": "@@ -37,8 +37,8 @@ def setup_site(site):\n \n sm = site.getSiteManager()\n if not sm.queryUtility(interfaces.ICalendarSupport):\n- sm.registerUtility(interfaces.ICalendarSupport,\n- content.CalendarSupport('calendar_support'))\n+ sm.registerUtility(content.CalendarSupport('calendar_support'),\n+ interfaces.ICalendarSupport)\n \n def _cleanup_utilities(site):\n raise NotImplementedError('Current ISiteManager support does not '\n", "old_path": "p4a/plonecalendar/sitesetup.py", "rewrite": "ArgSwap(idxs=0<->1 @(40,8)->(40,26))"} -{"repo": "https://:@github.com/collective/p4a.plonecalendar.git", "hash": "c89a0c772798bbd3f831d159fc728da6b6af0eb0", "diff": "@@ -286,7 +286,7 @@ class RecurringBrainEvent(BrainEvent):\n for each in recurrence.getOccurrenceDays():\n if start is not None and each < startdate:\n continue\n- if stop is not None and each > stopdate:\n+ if stop is not None and each >= stopdate:\n break\n dt = datetime.date.fromordinal(each)\n res.append(BrainEvent(self.context, dt))\n", "old_path": "p4a/plonecalendar/eventprovider.py", "rewrite": "ReplaceText(target='>=' @(289,41)->(289,42))"} -{"repo": "https://:@github.com/AlexandrKhabarov/SUPER_PYCALCCCCC.git", "hash": "e884f876336f85e5a8ac6ceb66577286e5dc669d", "diff": "@@ -13,7 +13,7 @@ available_operations = {\n \"<=\": (0, lambda x, y: x <= y),\n \">=\": (0, lambda x, y: x >= y),\n \"==\": (0, lambda x, y: x >= y),\n- \"!=\": (0, lambda x, y: x >= y),\n+ \"!=\": (0, lambda x, y: x != y),\n \"/\": (2, lambda x, y: x / y),\n }\n \n", "old_path": "core/operatios.py", "rewrite": "ReplaceText(target='!=' @(16,29)->(16,31))"} -{"repo": "https://:@github.com/AlexandrKhabarov/SUPER_PYCALCCCCC.git", "hash": "fb47de33e776a1b92b900508f421bcc3bb7ee619", "diff": "@@ -124,7 +124,7 @@ class Interpreter:\n return float(left) - float(right)\n elif expr.operator.type_ == TokenTypes.SLASH:\n self.check_number_operands(expr.operator, left, right)\n- return float(left) - float(right)\n+ return float(left) / float(right)\n elif expr.operator.type_ == TokenTypes.STAR:\n self.check_number_operands(expr.operator, left, right)\n return float(left) * float(right)\n", "old_path": "pycalc/core/expressions.py", "rewrite": "ReplaceText(target='/' @(127,31)->(127,32))"} -{"repo": "https://:@github.com/winster/xmppgcm.git", "hash": "e4517df5b4b714d899bb9e932e674d3b6e9992b7", "diff": "@@ -103,7 +103,7 @@ class GCM(ClientXMPP):\n self.connecton_draining = True\n \n elif data.message_type == GCMMessageType.RECEIPT:\n- logging.debug('Received Receipts for message_id: %s' % msg.message_id)\n+ logging.debug('Received Receipts for message_id: %s' % data.message_id)\n self.event(XMPPEvent.RECEIPT, data)\n \n else:\n", "old_path": "xmppgcm/gcm.py", "rewrite": "ReplaceText(target='data' @(106,67)->(106,70))"} -{"repo": "https://:@github.com/geertj/bluepass.git", "hash": "5c3bb3833033d329fa6e4447f51c73cb02de26fe", "diff": "@@ -647,7 +647,7 @@ class VaultView(QWidget):\n current_order.removeat(curpos)\n items.removeItem(item)\n item.hide(); item.destroy()\n- self.groupRemoved.emit(uuid, group)\n+ self.groupRemoved.emit(uuid, curgroup)\n # We can now update the version cache\n for version in versions:\n current_versions[version['id']] = version\n", "old_path": "bluepass/frontends/qt/passwordview.py", "rewrite": "ReplaceText(target='curgroup' @(650,49)->(650,54))"} -{"repo": "https://:@github.com/ajbouh/tfi.git", "hash": "029bc838140ad2d9f9a24d8900a918a9ffc1eacd", "diff": "@@ -21,7 +21,7 @@ class SavedModelTest(unittest.TestCase):\n self.assertEqual(3.0, m.add(x=1.0, y=2.0).sum)\n self.assertEqual(2.0, m.mult(x=1.0, y=2.0).prod)\n \n- tfi.saved_model.export(\"math.saved_model\", Math)\n+ tfi.saved_model.export(\"math.saved_model\", m)\n # Prove that we can save it.\n # Prove that we can restore it to a new class.\n \n", "old_path": "tests/saved_model_test.py", "rewrite": "ReplaceText(target='m' @(24,51)->(24,55))"} -{"repo": "https://:@github.com/lelit/nssjson.git", "hash": "ff9cb965faa144b3f221fad0e7f6f09cc91ac30d", "diff": "@@ -53,7 +53,7 @@ class TestRecursion(TestCase):\n x = {}\n y = {\"a\": x, \"b\": x}\n # ensure that the marker is cleared\n- json.dumps(x)\n+ json.dumps(y)\n \n def test_defaultrecursion(self):\n enc = RecursiveJSONEncoder()\n", "old_path": "simplejson/tests/test_recursion.py", "rewrite": "ReplaceText(target='y' @(56,19)->(56,20))"} -{"repo": "https://:@github.com/combatopera/lagoon.git", "hash": "993c4be530b1768731517a7275b0a8978f8255f5", "diff": "@@ -54,7 +54,7 @@ class Stuff:\n while j < len(atoms):\n i = j\n chunksize = 0\n- while j < len(atoms) and chunksize + len(atoms[j]) < self.buffersize:\n+ while j < len(atoms) and chunksize + len(atoms[j]) <= self.buffersize:\n chunksize += len(atoms[j])\n j += 1\n self._juststuff(b''.join(atoms[i:j]))\n", "old_path": "screen.py", "rewrite": "ReplaceText(target='<=' @(57,63)->(57,64))"} -{"repo": "https://:@github.com/OnroerendErfgoed/crabpy_pyramid.git", "hash": "a918c37502fc569c052ff16952b3f3bc1b6c5a90", "diff": "@@ -359,4 +359,4 @@ class HttpCachingFunctionalTests(FunctionalTests):\n self.assertEqual('200 OK', res.status)\n etag = res.headers['Etag']\n res2 = self.testapp.get('/crab/gewesten', headers={'If-None-Match': etag})\n- self.assertEqual('304 Not Modified', res.status)\n+ self.assertEqual('304 Not Modified', res2.status)\n", "old_path": "crabpy_pyramid/tests/test_functional.py", "rewrite": "ReplaceText(target='res2' @(362,45)->(362,48))"} -{"repo": "https://:@github.com/certae/django-softmachine.git", "hash": "12a9f0f5f016395f34bf03afa50889aa8ac36e3c", "diff": "@@ -109,7 +109,7 @@ def protoList(request):\n \n \n # Prepara las cols del Query \n- pList = Q2Dict(protoFields , pRows )\n+ pList = Q2Dict(protoMeta , pRows )\n \n context = json.dumps({\n 'success': True,\n", "old_path": "src/protoLib/protoActionList.py", "rewrite": "ReplaceText(target='protoMeta' @(112,19)->(112,30))"} -{"repo": "https://:@github.com/certae/django-softmachine.git", "hash": "331b58a38d644e8ee611f4f5603a56529419810f", "diff": "@@ -94,7 +94,7 @@ def getQbeStmt( fieldName , sQBE, sType ):\n bAndConector = True \n sCondicion = sCondicion[1:]\n \n- Qtmp = getQbeStmt(fieldName, sType, sCondicion)\n+ Qtmp = getQbeStmt(fieldName, sCondicion, sType)\n if bAndConector: \n QResult = QResult & Qtmp \n else: \n", "old_path": "src/protoLib/protoQbe.py", "rewrite": "ArgSwap(idxs=1<->2 @(97,19)->(97,29))"} -{"repo": "https://:@github.com/inveniosoftware/invenio-app-ils.git", "hash": "bdeb4bcb9bdd8d75e8231b032134b3bf008e0c4d", "diff": "@@ -155,7 +155,7 @@ class LoanMailResource(IlsCirculationResource):\n \"\"\"Loan email post method.\"\"\"\n days_ago = circulation_overdue_loan_days(record)\n is_overdue = days_ago > 0\n- if is_overdue:\n+ if not is_overdue:\n raise OverdueLoansMailError(description=\"This loan is not overdue\")\n send_loan_overdue_reminder_mail(record, days_ago)\n return self.make_response(\n", "old_path": "invenio_app_ils/circulation/views.py", "rewrite": "ReplaceText(target='not ' @(158,11)->(158,11))"} -{"repo": "https://:@github.com/hugosenari/Kupfer-Plugins.git", "hash": "500371bfea20e856242186f0f6d6c1d1446b19c5", "diff": "@@ -72,7 +72,7 @@ class LastStatus(Action):\n info = get_tracking_info(content.decode('iso-8859-1'))\n if info:\n txt = '-'.join(reversed(info[0]))\n- return TextLeaf(txt, leaf.object)\n+ return TextLeaf(leaf.object, txt)\n \n def item_types(self):\n yield TextLeaf\n", "old_path": "curreios/curreios.py", "rewrite": "ArgSwap(idxs=0<->1 @(75,23)->(75,31))"} -{"repo": "https://:@github.com/janhybs/ci-hpc.git", "hash": "bf6e060a313c57667a4b75b41dbbb5114d9fb927", "diff": "@@ -50,7 +50,7 @@ def process_step_collect(step, format_args=None):\n with logger:\n for file, timers in timers_info:\n logger.debug('%20s: %5d timers found', file, timers)\n- logger.info('artifacts: found %d timer(s) in %d file(s)', len(files), timers_total)\n+ logger.info('artifacts: found %d timer(s) in %d file(s)', timers_total, len(files))\n \n # insert artifacts into db\n if step.collect.save_to_db:\n", "old_path": "ci-hpc/proc/step/step_collect.py", "rewrite": "ArgSwap(idxs=1<->2 @(53,12)->(53,23))"} -{"repo": "https://:@github.com/Infinidat/infi.pypi_manager.git", "hash": "d7b669eaf58a03e887135683264dd475d67f2e39", "diff": "@@ -115,7 +115,7 @@ def mirror_file(repository_config, filename, package_name, package_version, meta\n data.update(metadata)\n \n for key, value in list(data.items()):\n- if isinstance(value, str):\n+ if not isinstance(value, str):\n data[key] = value.encode(\"utf-8\")\n \n repository = repository_config[\"repository\"]\n", "old_path": "src/infi/pypi_manager/mirror/mirror_all.py", "rewrite": "ReplaceText(target='not ' @(118,11)->(118,11))"} -{"repo": "https://:@github.com/novopl/fabops.git", "hash": "ea5c44f518554a239afd8650d216ea1f7e23db9e", "diff": "@@ -105,7 +105,7 @@ def lint(exclude, include_untracked, commit_only, pretend):\n exclude = list(exclude) # Convert from tuple to easily concatenate.\n \n if commit_only:\n- include = ['*' + f for f in git.staged() if f.endswith('.py')]\n+ include += ['*' + f for f in git.staged() if f.endswith('.py')]\n exclude += git.ignore()\n \n if not include_untracked:\n", "old_path": "src/peltak/commands/lint.py", "rewrite": "ReplaceText(target='+=' @(108,16)->(108,17))"} -{"repo": "https://:@github.com/novopl/fabops.git", "hash": "94bb4222594c1be8cb1d760d21abccf8393fbe57", "diff": "@@ -95,7 +95,7 @@ def finish():\n common.git_branch_delete(branch.name)\n common.git_prune()\n \n- common.git_checkout(develop)\n+ common.git_checkout(master)\n \n \n def merged():\n", "old_path": "src/peltak/extra/gitflow/logic/release.py", "rewrite": "ReplaceText(target='master' @(98,24)->(98,31))"} -{"repo": "https://:@github.com/novopl/fabops.git", "hash": "4ace52dda2d85cb734ee74e126530e805777a000", "diff": "@@ -72,7 +72,7 @@ def add_hooks():\n \n # Write pre-push hook\n log.info(\"Adding pre-push hook: <33>{}\", push_hook)\n- fs.write_file(commit_hook, util.remove_indent('''\n+ fs.write_file(push_hook, util.remove_indent('''\n #!/bin/bash\n PATH=\"/opt/local/libexec/gnubin:$PATH\"\n \n", "old_path": "src/peltak/logic/git.py", "rewrite": "ReplaceText(target='push_hook' @(75,18)->(75,29))"} -{"repo": "https://:@github.com/ome/omero-scripts.git", "hash": "bcf0a97fecbc46da12cd0fc1dc679d6eb1a002d4", "diff": "@@ -186,7 +186,7 @@ def createmovie_figure(conn, pixel_ids, t_indexes, z_start, z_end, width,\n plane_def = omero.romio.PlaneDef()\n plane_def.z = pro_start\n plane_def.t = time\n- plane_def = re.renderCompressed(plane_def)\n+ rendered_img = re.renderCompressed(plane_def)\n # create images and resize, add to list\n image = Image.open(io.BytesIO(rendered_img))\n resized_image = imgUtil.resizeImage(image, width, height)\n", "old_path": "omero/figure_scripts/Movie_Figure.py", "rewrite": "ReplaceText(target='rendered_img' @(189,20)->(189,29))"} -{"repo": "https://:@github.com/MozillaSecurity/grizzly.git", "hash": "5ff196df7b3e4cb6fafece51f3a92dd6fe240639", "diff": "@@ -71,7 +71,7 @@ def test_adapter_04(tmp_path):\n # path to file\n file1 = (tmp_path / \"test1.txt\")\n file1.touch()\n- found = tuple(SimpleAdapter.scan_path(str(tmp_path)))\n+ found = tuple(SimpleAdapter.scan_path(str(file1)))\n assert len(found) == 1\n assert str(file1) in found\n # path to directory\n", "old_path": "grizzly/common/test_adapter.py", "rewrite": "ReplaceText(target='file1' @(74,46)->(74,54))"} -{"repo": "https://:@github.com/CIMAC-CIDC/schemas.git", "hash": "e7ecb7443f00d666cd8e67b7e643f5837fc2f8f2", "diff": "@@ -743,7 +743,7 @@ def merge_artifact(\n _set_data_format(ct, existing_artifact)\n \n # return new object and the artifact that was merged\n- return ct, artifact\n+ return ct, existing_artifact\n \n class InvalidMergeTargetException(ValueError):\n \"\"\"Exception raised for target of merge_clinical_trial_metadata being non schema compliant.\"\"\"\n", "old_path": "cidc_schemas/prism.py", "rewrite": "ReplaceText(target='existing_artifact' @(746,15)->(746,23))"} -{"repo": "https://:@github.com/CIMAC-CIDC/schemas.git", "hash": "c7ddda9fbcc6fed237e11e3024e6ea610b08ecfa", "diff": "@@ -535,7 +535,7 @@ class Template:\n raise Exception(e)\n \n changes.extend(chs)\n- fs.extend(fs)\n+ files.extend(fs)\n \n return changes, files\n \n", "old_path": "cidc_schemas/template.py", "rewrite": "ReplaceText(target='files' @(538,12)->(538,14))"} -{"repo": "https://:@github.com/ggstuart/pyEMIS.git", "hash": "05b6ac16ca87ee3a9e5696ecc27b9bb4024cc7f1", "diff": "@@ -29,7 +29,7 @@ class SimpleProfile(AnalysisBase):\n result = {}\n pred = self.baseline_model.prediction(this_week)\n for p in percentiles:\n- result[p] = pred + self.baseline_model.percentile_in_place(p, this_week)\n+ result[p] = pred + self.baseline_model.percentile_in_place(this_week, p)\n return result\n \n \n", "old_path": "lib/analysis/profile.py", "rewrite": "ArgSwap(idxs=0<->1 @(32,31)->(32,70))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "aab3b1e42dbced18cebf4b6e8fd15265288693d0", "diff": "@@ -122,7 +122,7 @@ class ProtFrealignClassify(ProtFrealignBase, ProtClassify3D):\n for ref in range(1, self.numberOfRef + 1):\n refVol = self._getFileName('ref_vol_class', iter=iter, ref=ref) # reference volume of the step.\n iterVol = self._getFileName('iter_vol_class', iter=iter, ref=ref) # refined volumes of the step\n- if iter != 1:\n+ if iter == 1:\n copyFile(volFn, iterVol) #Copy the initial volume in the current directory.\n else:\n self._splitParFile(iter, ref, cpusRef[ref-1])\n", "old_path": "pwem/packages/brandeis/protocol_ml_classification.py", "rewrite": "ReplaceText(target='==' @(125,20)->(125,22))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "79434578b0e8d5d29e900b60aa9fadddcc75d1bf", "diff": "@@ -177,7 +177,7 @@ class ProtPrime(em.ProtInitialVolume):\n vol.append(aux)\n self._defineOutputs(outputVolumes=vol)\n \n- self._defineSourceRelation(vol, self.inputClasses)\n+ self._defineSourceRelation(self.inputClasses, vol)\n \n #--------------------------- INFO functions --------------------------------------------\n def _summary(self):\n", "old_path": "pwem/packages/simple/protocol_prime.py", "rewrite": "ArgSwap(idxs=0<->1 @(180,8)->(180,34))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "14b6a308b1710c111cdc515b1d4367b0d6289c77", "diff": "@@ -121,7 +121,7 @@ class ProtSummovie(ProtProcessMovies):\n # special case is mrc but ends in mrcs\n inMovieName= os.path.join(movieFolder,movieName)\n if movieName.endswith('.mrc'):\n- movieNameAux = inMovieName\n+ movieNameAux = movieName\n elif movieName.endswith('.mrcs'):\n movieNameAux= pwutils.replaceExt(inMovieName, \"mrc\")\n createLink(inMovieName,movieNameAux)\n", "old_path": "pwem/packages/grigoriefflab/protocol_summovie.py", "rewrite": "ReplaceText(target='movieName' @(124,27)->(124,38))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "9c9bbe991ab901a16c11eece48cb54468b1b663a", "diff": "@@ -90,7 +90,7 @@ class ChimeraViewerBase(Viewer):\n if _showVol.hasOrigin():\n x, y, z = _showVol.getOrigin().getShifts()\n else:\n- x, y, z = outputVol.getOrigin(force=True).getShifts()\n+ x, y, z = _showVol.getOrigin(force=True).getShifts()\n \n f.write(\"volume #1 style surface voxelSize %f origin \"\n \"%0.2f,%0.2f,%0.2f\\n\"\n", "old_path": "pwem/packages/chimera/viewer.py", "rewrite": "ReplaceText(target='_showVol' @(93,26)->(93,35))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "2d9ba7dfcd59de3b77e19cb23d5fa2ad34c80d55", "diff": "@@ -110,7 +110,7 @@ class scipionMMCIFIO(MMCIFIO):\n hetfield, resseq, icode = residue.get_id()\n if hetfield == \" \":\n residue_type = \"ATOM\"\n- label_seq_id = str(residue_number)\n+ label_seq_id = str(resseq)\n residue_number += 1\n else:\n residue_type = \"HETATM\"\n", "old_path": "pwem/convert/atom_struct.py", "rewrite": "ReplaceText(target='resseq' @(113,47)->(113,61))"} -{"repo": "https://:@github.com/scipion-em/scipion-em.git", "hash": "18a1a11d22aa9a2e8e046e685264fb8d53a96af5", "diff": "@@ -419,7 +419,7 @@ class ImageHandler(object):\n def createEmptyImage(cls, fnOut, xDim=1, yDim=1, zDim=1, nDim=1,\n dataType=None):\n dt = dataType or cls.DT_FLOAT\n- xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dataType)\n+ xmippLib.createEmptyFile(fnOut, xDim, yDim, zDim, nDim, dt)\n \n @classmethod\n def isImageFile(cls, imgFn):\n", "old_path": "pwem/convert/image_handler.py", "rewrite": "ReplaceText(target='dt' @(422,64)->(422,72))"} -{"repo": "https://:@github.com/gedaskir/qmeq.git", "hash": "347cea42998433ead153e7701cf69caa5086ee13", "diff": "@@ -364,8 +364,8 @@ class LeadsTunneling(object):\n self.Tba0 = construct_Tba(tleadsp, self.stateind, self.mtype, self.Tba0)\n if updateq:\n for j0 in tleadsp:\n- try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:\n- except: self.tleads.update({j0:tleads[j0]}) # if tleads[j0] != 0:\n+ try: self.tleads[j0] += tleadsp[j0] # if tleads[j0] != 0:\n+ except: self.tleads.update({j0:tleadsp[j0]}) # if tleads[j0] != 0:\n \n def change(self, tleads=None, mulst=None, tlst=None, dlst=None, updateq=True):\n \"\"\"\n", "old_path": "qmeq/leadstun.py", "rewrite": "ReplaceText(target='tleadsp' @(368,51)->(368,57))"} -{"repo": "https://:@github.com/caleb-easterly/metaquant.git", "hash": "745e72d4ef68c944db5395e09bd85070b8e2652a", "diff": "@@ -17,7 +17,7 @@ def common_hierarchical_analysis(db, df, annot_colname, samp_grps, min_peptides,\n \n # filter\n int_all_ranks_filt = stats.filter_min_observed(intensity_all_ranks, threshold, samp_grps)\n- int_all_ranks_filt['id'] = intensity_all_ranks.index\n+ int_all_ranks_filt['id'] = int_all_ranks_filt.index\n \n # calculate means\n int_w_means = stats.calc_means(int_all_ranks_filt, samp_grps)\n", "old_path": "metaquant/analysis/common.py", "rewrite": "ReplaceText(target='int_all_ranks_filt' @(20,31)->(20,50))"} -{"repo": "https://:@github.com/matthiask/django-keyed-urls.git", "hash": "85701797d220d26d175a834250969d86aa8a08c6", "diff": "@@ -55,7 +55,7 @@ def get_url(key, language=None, fail_silently=False):\n url = None\n \n if url is None and not fail_silently:\n- raise KeyDoesNotExist('No match found for key \"%s\".' % url)\n+ raise KeyDoesNotExist('No match found for key \"%s\".' % key)\n \n return None if url == _none_type else url\n \n", "old_path": "keyed_urls/__init__.py", "rewrite": "ReplaceText(target='key' @(58,63)->(58,66))"} -{"repo": "https://:@github.com/sommalia/moco-wrapper.git", "hash": "8463f534ca51588a6619f61f59bb5d0d064511ab", "diff": "@@ -42,7 +42,7 @@ class Unit(MWRAPBase):\n if value is not None:\n params[key] = value\n \n- if sort_order is not None:\n+ if sort_by is not None:\n params[\"sort_by\"] = \"{} {}\".format(sort_by, sort_order)\n \n return self._moco.get(API_PATH[\"unit_getlist\"], params=params)\n", "old_path": "moco_wrapper/models/unit.py", "rewrite": "ReplaceText(target='sort_by' @(45,11)->(45,21))"} -{"repo": "https://:@github.com/scupid-admin/morph-python-sdk.git", "hash": "0739734905cb5e49f54807792dc9426884be6eae", "diff": "@@ -11,7 +11,7 @@ def read_and_set_attribute(event, context):\n \"9711xxx400\": True,\n \"8130xxx599\": True\n }\n- phone_number = context[\"userVariables\"][\"_PHONE_NUMBER\"]\n+ phone_number = event[\"userVariables\"][\"_PHONE_NUMBER\"]\n if phone_number is None:\n phone_number = \"\"\n else:\n", "old_path": "morph/examples.py", "rewrite": "ReplaceText(target='event' @(14,19)->(14,26))"} -{"repo": "https://:@github.com/Scorpi000/QuantStudio.git", "hash": "c158be9b67b0058be35cc3b7e8b1c04e3c06d252", "diff": "@@ -315,7 +315,7 @@ class FactorTurnover(BaseModule):\n HTML += \"\"\n else:\n HTML = \"\"\n- iHTML += self._Output[\"\u7edf\u8ba1\u6570\u636e\"].to_html(formatters=[_QS_formatPandasPercentage]*5)\n+ iHTML = self._Output[\"\u7edf\u8ba1\u6570\u636e\"].to_html(formatters=[_QS_formatPandasPercentage]*5)\n Pos = iHTML.find(\">\")\n HTML += iHTML[:Pos]+' align=\"center\"'+iHTML[Pos:]\n Fig = self.genMatplotlibFig()\n", "old_path": "QuantStudio/BackTest/SectionFactor/Correlation.py", "rewrite": "ReplaceText(target='=' @(318,14)->(318,16))"} -{"repo": "https://:@github.com/Scorpi000/QuantStudio.git", "hash": "2d2788d5d5192b8b90868c30e247ef6533fb1164", "diff": "@@ -667,7 +667,7 @@ class SQLDB(QSSQLObject, WritableFactorDB):\n if (DataLenMax!=DataLenMin).sum()>0:\n self._QS_Logger.warning(\"'%s' \u5728\u5199\u5165\u56e0\u5b50 '%s' \u65f6\u51fa\u73b0\u56e0\u5b50\u503c\u957f\u5ea6\u4e0d\u4e00\u81f4\u7684\u60c5\u51b5, \u5c06\u586b\u5145\u7f3a\u5931!\" % (self.Name, str(data.columns.tolist())))\n for i in range(data.shape[0]):\n- iDataLen = DataLen.iloc[i]\n+ iDataLen = DataLenMax.iloc[i]\n if iDataLen>0:\n iData = data.iloc[i].apply(lambda x: [None]*(iDataLen-len(x))+x if isinstance(x, list) else [x]*iDataLen).tolist()\n NewData.extend(zip(*iData))\n", "old_path": "QuantStudio/FactorDataBase/SQLDB.py", "rewrite": "ReplaceText(target='DataLenMax' @(670,23)->(670,30))"} -{"repo": "https://:@github.com/servir-mekong/hydra-floods.git", "hash": "f7de9b4516deb7ac5055624fb9012596ac25374c", "diff": "@@ -129,7 +129,7 @@ def globalOtsu(collection,target_date,region,\n imageEdge = target.mask(edges)\n histogram_image = target.mask(edgeBuffer)\n \n- histogram = histogram_image.reduceRegion(ee.Reducer.histogram(255, 2)\\\n+ histogram = target.reduceRegion(ee.Reducer.histogram(255, 2)\\\n .combine('mean', None, True)\\\n .combine('variance', None,True),sampleRegion,reductionScale,bestEffort=True)\n \n", "old_path": "hydrafloods/geeutils.py", "rewrite": "ReplaceText(target='target' @(132,17)->(132,32))"} -{"repo": "https://:@github.com/pytorchbearer/visual.git", "hash": "c2d6f39bebb1754a92d3499ff0a5eca64b206ca4", "diff": "@@ -265,7 +265,7 @@ class CPPNImage(Image):\n \n x_coord_range = torch.linspace(-r, r, steps=self.width)\n y_coord_range = torch.linspace(-r, r, steps=self.height)\n- x, y = torch.meshgrid(x_coord_range, y_coord_range)\n+ x, y = torch.meshgrid(y_coord_range, x_coord_range)\n \n self.loc = nn.Parameter(torch.stack((x, y), dim=0).unsqueeze(0), requires_grad=False)\n \n", "old_path": "visual/images.py", "rewrite": "ArgSwap(idxs=0<->1 @(268,15)->(268,29))"} -{"repo": "https://:@github.com/ocsmit/raster-indices-calc.git", "hash": "d8eb85db236c048cccf1506180e37d1bbd2734ff", "diff": "@@ -473,7 +473,7 @@ def NDBaI(landsat_dir, ndbai_out):\n swir1_band = SWIR1_path.GetRasterBand(1).ReadAsArray().astype(np.float32)\n TIR_path = gdal.Open(os.path.join(landsat_dir, tir[0]))\n tir_band = TIR_path.GetRasterBand(1).ReadAsArray().astype(np.float32)\n- snap = gdal.Open(os.path.join(landsat_dir, swir1[0]))\n+ snap = gdal.Open(os.path.join(landsat_dir, tir[0]))\n \n # Perform Calculation\n ndbai = ((swir1_band - tir_band) / (swir1_band + tir_band))\n", "old_path": "rindcalc/index_utils.py", "rewrite": "ReplaceText(target='tir' @(476,47)->(476,52))"} -{"repo": "https://:@github.com/spacegraphcats/spacegraphcats.git", "hash": "99052c4fbbebc852ccc6e6eca6f3732b054ed274", "diff": "@@ -75,7 +75,7 @@ def load_and_compute_augg(project):\n changed = True\n d = 1\n print(\"Augmenting\", end=\" \", flush=True)\n- while changed and d <= project.radius:\n+ while changed and d < project.radius:\n if d in augs:\n print(\"({})\".format(d), end=\" \", flush=True) \n with open(augname.format(d), 'r') as f:\n", "old_path": "build-catlas.py", "rewrite": "ReplaceText(target='<' @(78,24)->(78,26))"} -{"repo": "https://:@github.com/spacegraphcats/spacegraphcats.git", "hash": "5267323b50570258de758732d04239fef6cc0a93", "diff": "@@ -55,7 +55,7 @@ def main():\n \n query_mh = query_sig.minhash\n query_mh = query_mh.downsample_max_hash(frontier_mh)\n- frontier_mh = query_mh.downsample_max_hash(query_mh)\n+ frontier_mh = frontier_mh.downsample_max_hash(query_mh)\n \n containment = query_mh.contained_by(frontier_mh)\n similarity = query_mh.similarity(frontier_mh)\n", "old_path": "search/frontier_search_batch.py", "rewrite": "ReplaceText(target='frontier_mh' @(58,22)->(58,30))"} -{"repo": "https://:@github.com/spacegraphcats/spacegraphcats.git", "hash": "df62df921fd822029c1ae7a139f0d75c8b576295", "diff": "@@ -120,7 +120,7 @@ def main(args=sys.argv[1:]):\n if 2**ratio < 10:\n new_node_set.add(node_id)\n \n- if mh_size > 1:\n+ if mh > 1:\n n_merged += 1\n merge_mh.merge(mh)\n \n", "old_path": "search/extract_nodes_by_shadow_ratio.py", "rewrite": "ReplaceText(target='mh' @(123,15)->(123,22))"} -{"repo": "https://:@github.com/spacegraphcats/spacegraphcats.git", "hash": "73bf57a0d3b45aa1c5f524e361676a1297e85db0", "diff": "@@ -90,7 +90,7 @@ def main(args=sys.argv[1:]):\n if 1:\n terminal = set()\n for subnode in dag[top_node_id]:\n- mh = load_minhash(node_id, minhash_db)\n+ mh = load_minhash(subnode, minhash_db)\n if mh:\n terminal.update(find_terminal_nodes(subnode, args.maxsize))\n \n", "old_path": "search/extract_nodes_by_shadow_ratio.py", "rewrite": "ReplaceText(target='subnode' @(93,30)->(93,37))"} -{"repo": "https://:@github.com/podhmo/cssdiff.git", "hash": "fbe359fe1837b98694e9c83a96af2ed7cde53083", "diff": "@@ -108,7 +108,7 @@ def difference(s1, s2, op=\"+\", iterate=lambda s: sorted(s.items())):\n if another_value is None:\n d[style].append(add(name, value))\n elif value != another_value:\n- d[style].append(change(name, value, another_value))\n+ d[style].append(change(name, another_value, value))\n return d\n \n \n", "old_path": "cssdiff/__init__.py", "rewrite": "ArgSwap(idxs=1<->2 @(111,32)->(111,38))"} -{"repo": "https://:@github.com/bodylabs/capysule.git", "hash": "d28605af4e7b127dd3e823252bb817666e41fe00", "diff": "@@ -10,4 +10,4 @@ class Collection(WrenCollection):\n if response.status_code == requests.codes.not_found and response.json() == {'message': 'Could not find resource'}:\n raise NotFound(response.text)\n else:\n- super(self, Collection).handle_error(response)\n+ super(Collection, self).handle_error(response)\n", "old_path": "capysule/collection.py", "rewrite": "ArgSwap(idxs=0<->1 @(13,12)->(13,17))"} -{"repo": "https://:@github.com/kaaengine/kaa.git", "hash": "172bc5493ac61b92b4acf49ff6e124f10b6e9c2c", "diff": "@@ -79,7 +79,7 @@ class DemoScene(Scene):\n z_index=10,\n ))\n \n- self.spawn_timer = Timer(20, self._spawn_heartbeat,\n+ self.spawn_timer = Timer(self._spawn_heartbeat, 20,\n single_shot=False)\n self.spawn_timer.start()\n \n", "old_path": "demos/physics3/main.py", "rewrite": "ArgSwap(idxs=0<->1 @(82,27)->(82,32))"} -{"repo": "https://:@github.com/oladotunr/cosine.git", "hash": "2497192592fd0709608c0b6b16dc342b7f645cdc", "diff": "@@ -98,7 +98,7 @@ class CosineAlgo(object):\n instrument = CosineInstrument.load(self.instr_cache, **instr_defs[instr])\n self._cxt.instruments[instrument.name] = instrument\n order_worker = CosineOrderWorker(self._cfg.orders.ActiveDepth, instrument, venue, logger=self.logger)\n- self._cxt.orders[k][instr.symbol] = order_worker\n+ self._cxt.orders[k][instrument.symbol] = order_worker\n venue_instruments += 1\n if venue_instruments == 0:\n raise LookupError(\"No instruments loaded for any of the provided venues\")\n", "old_path": "cosine/core/algo.py", "rewrite": "ReplaceText(target='instrument' @(101,36)->(101,41))"} -{"repo": "https://:@github.com/hcji/CTSgetPy.git", "hash": "93ac966118febd2bd7120f1149eb1f8572939afa", "diff": "@@ -52,7 +52,7 @@ def CTSget(source, targets, identifiers, top_only=True, timeout=60, server=\"http\n result = {}\n if type(targets) is str:\n result[targets] = CTS_translate_multi(source, targets, identifiers, top_only, timeout, server)\n- elif type(identifiers) is list:\n+ elif type(targets) is list:\n for i in range(len(targets)):\n target = targets[i]\n print ('translating from ' + source + ' to ' + target)\n", "old_path": "CTSgetPy/CTSgetPy.py", "rewrite": "ReplaceText(target='targets' @(55,14)->(55,25))"} -{"repo": "https://:@github.com/phylliade/vinci.git", "hash": "8b1940c5613e124a55d11ba257a8800bc12d65a5", "diff": "@@ -31,7 +31,7 @@ class SARSAAgent(Agent):\n self.model = model\n self.nb_actions = nb_actions\n self.policy = policy\n- self.test_policy = policy\n+ self.test_policy = test_policy\n self.gamma = gamma\n self.nb_steps_warmup = nb_steps_warmup\n self.train_interval = train_interval\n", "old_path": "rl/agents/sarsa.py", "rewrite": "ReplaceText(target='test_policy' @(34,27)->(34,33))"} -{"repo": "https://:@github.com/phelimb/atlas.git", "hash": "dfacc38b17582837e32e711ecc23926476c19b66", "diff": "@@ -297,7 +297,7 @@ class Genotyper(object):\n for probe_name, probe_coverages in self.variant_covgs.items():\n probe_id = self._name_to_id(probe_name)\n variant = None\n- call = gt.type(probe_coverages, variant=variant)\n+ call = gt.type(probe_coverages, variant=probe_name)\n genotypes.append(sum(call[\"genotype\"]))\n filters.append(int(call[\"info\"][\"filter\"] == \"PASS\"))\n if sum(call[\"genotype\"]) > 0 or not call[\n", "old_path": "mykatlas/typing/typer/genotyper.py", "rewrite": "ReplaceText(target='probe_name' @(300,52)->(300,59))"} -{"repo": "https://:@github.com/munisisazade/startmicro.git", "hash": "4c74f41a31a6bef9aaa09586628e8427a7d68851", "diff": "@@ -54,7 +54,7 @@ class Command(object):\n self.write_file(self.folder_name, \"docker-compose.yml\", docker_compose)\n self.write_file(self.folder_name, \"Dockerfile\", Dockerfile)\n self.write_file(self.folder_name, \"README.md\", readme)\n- if answers.get(\"type\") == \"Restful\" and not answers:\n+ if answers.get(\"type\") == \"Restful\" or not answers:\n self.write_file(self.api_path, \"producer.py\", producer_restful)\n self.write_file(self.folder_name, \"run.py\", run_restful)\n elif answers.get(\"type\") == \"Redis pubsub\":\n", "old_path": "startmicro/core/base.py", "rewrite": "ReplaceText(target='or' @(57,44)->(57,47))"} -{"repo": "https://:@github.com/EdMan1022/PySpot.git", "hash": "c5624d03bc367d65859ec67e2bee62464e212996", "diff": "@@ -17,4 +17,4 @@ class Auth(object):\n \n :return: (Bool) True if expired, False if not\n \"\"\"\n- return self.expires_at > datetime.datetime.now()\n+ return self.expires_at < datetime.datetime.now()\n", "old_path": "pyspot/auth.py", "rewrite": "ReplaceText(target='<' @(20,31)->(20,32))"} -{"repo": "https://:@github.com/jolyonb/olxcleaner.git", "hash": "775eed61ebf7b79e304f9012c5e9264bb7ec505f", "diff": "@@ -121,7 +121,7 @@ def traverse_course(edxobj, node, filename, errorstore, pointer=False):\n try:\n new_node = etree.parse(new_file).getroot()\n except XMLSyntaxError as e:\n- errorstore.add_error(InvalidXML(filename, e.args[0]))\n+ errorstore.add_error(InvalidXML(new_file, e.args[0]))\n return\n else:\n traverse_course(edxobj, new_node, new_file, errorstore, pointer=True)\n", "old_path": "edx-xml-clean/loader/xml.py", "rewrite": "ReplaceText(target='new_file' @(124,44)->(124,52))"} -{"repo": "https://:@github.com/socek/confsave.git", "hash": "6cb0b0b47e72f019cd92a4eddf8b2794c01b1e6e", "diff": "@@ -46,7 +46,7 @@ class Commands(object):\n self._init_repo()\n for filename in glob(self.app.get_home_path() + '/.*'):\n endpoint = Endpoint(self.app, filename)\n- if not endpoint.is_visible():\n+ if endpoint.is_visible():\n print(endpoint.path)\n \n def ignore(self, filename):\n", "old_path": "confsave/commands.py", "rewrite": "ReplaceText(target='' @(49,15)->(49,19))"} -{"repo": "https://:@github.com/asulibraries/django-asutheme.git", "hash": "ab1982643a4145db1954d38d0a7088b8478bdbc6", "diff": "@@ -3,6 +3,6 @@ from django.conf import settings\n \n def container_style(request):\n classname = 'container'\n- if getattr('ASU_THEME_FLUID', settings, False):\n+ if getattr(settings, 'ASU_THEME_FLUID', False):\n classname += '-fluid'\n return {'asutheme_container_class': classname}\n", "old_path": "asutheme/context_processors.py", "rewrite": "ArgSwap(idxs=0<->1 @(6,7)->(6,14))"} -{"repo": "https://:@github.com/neuropoly/bids_neuropoly.git", "hash": "aa37aa05e2ebff34631a0ec101749587d1d4b372", "diff": "@@ -73,7 +73,7 @@ def convert_dcm2nii(path_data, subject, path_out='./'):\n # Build output file name\n fname_out = os.path.join(subject, contrast_dict[contrast][1],\n subject + '_' + contrast_dict[contrast][0] + '.'\n- + nii_file.split(os.extsep, 1)[1])\n+ + nii_file_all_ext.split(os.extsep, 1)[1])\n os.makedirs(os.path.abspath(os.path.dirname(fname_out)), exist_ok=True)\n # Move\n shutil.move(nii_file_all_ext, fname_out)\n", "old_path": "scripts/convert_dcm2nii.py", "rewrite": "ReplaceText(target='nii_file_all_ext' @(76,47)->(76,55))"} -{"repo": "https://:@github.com/cea-ufmg/sym2num.git", "hash": "49bd276097ec6efaf8b5e33541f75f5cdae58d25", "diff": "@@ -152,7 +152,7 @@ def isstatic(arguments):\n if len(arguments) == 0:\n return True\n elif not isinstance(arguments[0], var.SymbolObject):\n- return False\n+ return True\n else:\n return 'cls' != arguments[0].name != 'self'\n \n", "old_path": "sym2num/function.py", "rewrite": "ReplaceText(target='True' @(155,15)->(155,20))"} -{"repo": "https://:@github.com/python-odin/baldr.git", "hash": "fbce55b525f2fa4b171dc1b688bea4ca42b8a099", "diff": "@@ -212,7 +212,7 @@ class ResourceApiCommon(object):\n except Exception as e:\n # Special case when a request raises a 500 error. If we are in debug mode and a default is used (ie\n # request does not explicitly specify a content type) fall back to the Django default exception page.\n- if settings.DEBUG and getattr(response_codec, 'is_default', False):\n+ if settings.DEBUG and getattr(response_type, 'is_default', False):\n raise\n # Catch any other exceptions and pass them to the 500 handler for evaluation.\n resource = self.handle_500(request, e)\n", "old_path": "baldr/api.py", "rewrite": "ReplaceText(target='response_type' @(215,46)->(215,60))"} -{"repo": "https://:@github.com/CallmeNezha/xmldiffs.git", "hash": "51dab2722f963206b71bde197c283efb63079b49", "diff": "@@ -130,7 +130,7 @@ else:\n def write_sorted_file(fpath, outdir=None, cfg=None):\n if outdir is not None:\n fbasename = os.path.splitext(os.path.basename(fpath))[0]\n- sorted_fpath = os.path.join(outdir, \"{}.cmp.xml\".format(fpath))\n+ sorted_fpath = os.path.join(outdir, \"{}.cmp.xml\".format(fbasename))\n tmp = unicode_writer(open(sorted_fpath, 'w'))\n else:\n tmp = unicode_writer(NamedTemporaryFile('w'))\n", "old_path": "xmldiffs/command_line.py", "rewrite": "ReplaceText(target='fbasename' @(133,64)->(133,69))"} -{"repo": "https://:@github.com/ahmed-shariff/ml-pipeline.git", "hash": "2aa119fe99d2e96857754b56b601a82463f13c9c", "diff": "@@ -418,7 +418,7 @@ class Metric():\n return 0\n \n def get_tracking_delta(self):\n- if len(self.track_value_list) > self.track_average_epoc_count:\n+ if len(self.track_value_list) == self.track_average_epoc_count:\n return sum(\n [self.track_value_list[idx + 1] -\n self.track_value_list[idx]\n", "old_path": "mlpipeline/utils/_utils.py", "rewrite": "ReplaceText(target='==' @(421,38)->(421,39))"} -{"repo": "https://:@github.com/rshk/jobcontrol.git", "hash": "41187069493848c41741b1217b32aeb21e442c43", "diff": "@@ -112,7 +112,7 @@ class MemoryJobControl(JobControlBase):\n if jrdef['job_id'] == job_id)\n \n for jrid, jrdef in sorted(list(runs)):\n- yield jrdef\n+ yield jrid\n \n # ------------------------------------------------------------\n # Logging\n", "old_path": "jobcontrol/ext/memory.py", "rewrite": "ReplaceText(target='jrid' @(115,18)->(115,23))"} -{"repo": "https://:@github.com/spatialucr/geosnap.git", "hash": "73d2b50077271c9f3c530a52ef97890200c29751", "diff": "@@ -171,7 +171,7 @@ def harmonize(\n profiles.append(profile)\n \n if len(intensive_variables) > 0:\n- profile = pd.DataFrame(interpolation[1], columns=extensive_variables)\n+ profile = pd.DataFrame(interpolation[1], columns=intensive_variables)\n profiles.append(profile)\n \n profile = pd.concat(profiles, sort=True)\n", "old_path": "geosnap/harmonize/harmonize.py", "rewrite": "ReplaceText(target='intensive_variables' @(174,61)->(174,80))"} -{"repo": "https://:@github.com/stefanseefeld/faber.git", "hash": "3cb344b107e599396c70e3e72488abbeff4af738", "diff": "@@ -416,7 +416,7 @@ def extend (name, values):\n if __implicit_features.has_key(v):\n raise BaseException (\"'%s' is already associated with the feature '%s'\" % (v, __implicit_features [v]))\n \n- __implicit_features[v] = name\n+ __implicit_features[v] = feature\n \n if len (feature.values()) == 0 and len (values) > 0:\n # This is the first value specified for this feature,\n", "old_path": "src/build/feature.py", "rewrite": "ReplaceText(target='feature' @(419,37)->(419,41))"} -{"repo": "https://:@github.com/stefanseefeld/faber.git", "hash": "475c635167c32ee61b5951e2c1ba6a5613723437", "diff": "@@ -160,7 +160,7 @@ def refine (properties, requirements):\n # Record them so that we can handle 'properties'.\n for r in requirements:\n # Don't consider conditional requirements.\n- if r.condition():\n+ if not r.condition():\n required[r.feature()] = r\n \n for p in properties:\n", "old_path": "src/build/property.py", "rewrite": "ReplaceText(target='not ' @(163,11)->(163,11))"} -{"repo": "https://:@github.com/stefanseefeld/faber.git", "hash": "632ab9c8665f96399b75d4c36b7e50db9cd05812", "diff": "@@ -362,7 +362,7 @@ def __add_flag (rule_or_module, variable_name, condition, values):\n assert m\n module = m.group(1)\n \n- __module_flags.setdefault(m, []).append(f)\n+ __module_flags.setdefault(module, []).append(f)\n __flags.setdefault(rule_or_module, []).append(f)\n \n __requirements = []\n", "old_path": "src/build/toolset.py", "rewrite": "ReplaceText(target='module' @(365,30)->(365,31))"} -{"repo": "https://:@github.com/ivirshup/ConsistentClusters.git", "hash": "c2ad610430164fe7a56ce5d3f1f8357e1dd336bc", "diff": "@@ -518,7 +518,7 @@ def _call_get_edges(args):\n def _get_edges(clustering1: np.array, clustering2: np.array):\n edges = []\n offset1 = clustering1.min()\n- offset2 = clustering1.min()\n+ offset2 = clustering2.min()\n # Because of how I've done unique node names, potentially this\n # could be done in a more generic way by creating a mapping here.\n offset_clusts1 = clustering1 - offset1\n", "old_path": "constclust/aggregate.py", "rewrite": "ReplaceText(target='clustering2' @(521,14)->(521,25))"} -{"repo": "https://:@github.com/nowells/python-wellrested.git", "hash": "8d016faf90f3a0d833cf9b1c52aaa66ee7de9514", "diff": "@@ -35,7 +35,7 @@ class RestClient(object):\n request_body = self._serialize(data)\n response_headers, response_content = self._connection.request(resource, method, args=args, body=request_body, headers=headers, content_type=self.content_type)\n if response_headers.get('status') == HTTP_STATUS_OK:\n- data = self._deserialize(response_content)\n+ response_data = self._deserialize(response_content)\n return Response(response_headers, response_content, response_data)\n \n def _serialize(self, data):\n", "old_path": "wellrested/connections/__init__.py", "rewrite": "ReplaceText(target='response_data' @(38,12)->(38,16))"} -{"repo": "https://:@github.com/packagecontrol/st_package_reviewer.git", "hash": "85b67bc0d381d382b2805e6464ab80eb31e2d484", "diff": "@@ -45,7 +45,7 @@ def main():\n help=\"URL to the repository or path to the package to be checked.\")\n parser.add_argument(\"--repo-only\", action='store_true',\n help=\"Do not check the package itself and only its repository.\")\n- parser.add_argument(\"--verbose\", \"-v\", action='store_true',\n+ parser.add_argument(\"-v\", \"--verbose\", action='store_true',\n help=\"Increase verbosity.\")\n parser.add_argument(\"--debug\", action='store_true',\n help=\"Enter pdb on excpetions. Implies --verbose.\")\n", "old_path": "package_reviewer/__main__.py", "rewrite": "ArgSwap(idxs=0<->1 @(48,4)->(48,23))"} -{"repo": "https://:@github.com/emilbjorklund/django-template-shortcodes.git", "hash": "b2788b9d7fd1211de9666fd5c977274f8f343e30", "diff": "@@ -31,7 +31,7 @@ def parse(value, request):\n try:\n if cache.get(cache_key):\n try:\n- parsed = re.sub(r'\\[' + item + r'\\]', cache.get(item), parsed)\n+ parsed = re.sub(r'\\[' + item + r'\\]', cache.get(cache_key), parsed)\n except:\n pass\n else:\n", "old_path": "shortcodes/parser.py", "rewrite": "ReplaceText(target='cache_key' @(34,58)->(34,62))"} -{"repo": "https://:@github.com/ods/aiochsa.git", "hash": "24dcfdbc52b0a1009ce4a7b7ebcf72a1b26be18b", "diff": "@@ -61,7 +61,7 @@ class Client:\n if response.status != 200:\n body = await response.read()\n raise DBException.from_message(\n- statement, body.decode(errors='replace'),\n+ query, body.decode(errors='replace'),\n )\n \n if response.content_type == 'application/json':\n", "old_path": "aiochsa/client.py", "rewrite": "ReplaceText(target='query' @(64,20)->(64,29))"} -{"repo": "https://:@github.com/lega911/sqlmapper.git", "hash": "cf7f674b0186e12ce37c5a9deb84e6b8d4d58919", "diff": "@@ -116,7 +116,7 @@ class MysqlTable(Table):\n scolumn += ' AUTO_INCREMENT'\n \n if default != NoValue:\n- if not_null or primary:\n+ if auto_increment or primary:\n raise ValueError('Can''t have default value')\n scolumn += ' DEFAULT %s'\n values.append(default)\n", "old_path": "sqlmapper/mysql.py", "rewrite": "ReplaceText(target='auto_increment' @(119,15)->(119,23))"} -{"repo": "https://:@github.com/vanceeasleaf/aces.git", "hash": "c4097285794c957a7242162570b41412be547ce0", "diff": "@@ -34,5 +34,5 @@ class Device(Material):\n \t\t#atoms.center()\n \t\tx=atoms.positions[:,0]\n \n-\t\treturn atoms\n+\t\treturn center\n \n", "old_path": "aces/runners/negf/device/device.py", "rewrite": "ReplaceText(target='center' @(37,9)->(37,14))"} -{"repo": "https://:@github.com/marcofavorito/temprl.git", "hash": "1b0cb65d54ba2696fea2d41401990e406a8859f0", "diff": "@@ -195,7 +195,7 @@ def _compute_levels(dfa: DFA, property_states):\n # levels for failure state (i.e. that cannot reach a final state)\n failure_states = set()\n for s in filter(lambda x: x not in z_current, dfa.states):\n- state2level[s] = max_level\n+ state2level[s] = level\n failure_states.add(s)\n \n return state2level, max_level, failure_states\n", "old_path": "temprl/automata.py", "rewrite": "ReplaceText(target='level' @(198,25)->(198,34))"} -{"repo": "https://:@github.com/equinor/stea.git", "hash": "bdebfe3c0cb939db2dd7b1a39a029d00ffe555a9", "diff": "@@ -82,5 +82,5 @@ def calculate(stea_input):\n \n request.add_profile(profile_id, start_year, data)\n \n- return SteaResult(client.calculate(request), project)\n+ return SteaResult(client.calculate(request), stea_input)\n \n", "old_path": "stea/__init__.py", "rewrite": "ReplaceText(target='stea_input' @(85,49)->(85,56))"} -{"repo": "https://:@github.com/tandonneur/AdvancedAnalytics.git", "hash": "4a73a8c616db33f69c5361eca1f4ca18ca7a2b17", "diff": "@@ -710,7 +710,7 @@ class tree_classifier(object):\n print(fstr2.format('Class ', dt.classes_[i]), end=\"\")\n \n for j in range(n_classes):\n- print(\"{:>10d}\".format(conf_mat_t[i][j]), end=\"\")\n+ print(\"{:>10d}\".format(conf_mat_v[i][j]), end=\"\")\n print(\"\")\n print(\"\")\n \n", "old_path": "AdvancedAnalytics/Tree.py", "rewrite": "ReplaceText(target='conf_mat_v' @(713,43)->(713,53))"} -{"repo": "https://:@github.com/usc-isi-i2/dsbox-cleaning.git", "hash": "961d92886916dfbc0a0e1bfd2a51e9c4677301f7", "diff": "@@ -342,7 +342,7 @@ class Profiler(TransformerPrimitiveBase[Input, Output, Hyperparams]):\n inputs.iloc[:, col] = numerics\n else:\n if \"http://schema.org/Float\" not in old_metadata['semantic_types']:\n- old_metadata['semantic_types'] = (\"http://schema.org/Float\",)\n+ old_metadata['semantic_types'] += (\"http://schema.org/Float\",)\n old_metadata['structural_type'] = type(10.2)\n inputs.iloc[:, col] = numerics\n \n", "old_path": "dsbox/datapreprocessing/cleaner/data_profile.py", "rewrite": "ReplaceText(target='+=' @(345,63)->(345,64))"} -{"repo": "https://:@github.com/azavea/djsonb.git", "hash": "90e97fc29ca5df0cc56b3193c9f7a4a1543111b5", "diff": "@@ -72,7 +72,7 @@ class FilterTree:\n sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, True)\n else:\n sql_tuple = FilterTree.text_similarity_filter(rule[0], pattern, False)\n- pattern_specs.append(sql_tuple)\n+ rule_specs.append(sql_tuple)\n \n rule_strings = [' AND '.join([rule[0] for rule in rule_specs]),\n ' OR '.join([rule[0] for rule in pattern_specs])]\n", "old_path": "djsonb/lookups.py", "rewrite": "ReplaceText(target='rule_specs' @(75,20)->(75,33))"} -{"repo": "https://:@github.com/ionelmc/python-pth.git", "hash": "5e8cbdd87050b06018ef04cc994d8dc155931e98", "diff": "@@ -235,7 +235,7 @@ class Path(AbstractPath):\n normpath = property(lambda self: pth(ospath.normpath(self)))\n norm = property(lambda self: pth(ospath.normcase(ospath.normpath(self))))\n real = realpath = property(lambda self: pth(ospath.realpath(self)))\n- rel = relpath = lambda self, start: pth(ospath.relpath(self, start))\n+ rel = relpath = lambda self, start: pth(ospath.relpath(start, self))\n same = samefile = lambda self, other: ospath.samefile(self, other)\n if hasattr(os, 'link'):\n if PY33:\n", "old_path": "src/pth.py", "rewrite": "ArgSwap(idxs=0<->1 @(238,44)->(238,58))"} -{"repo": "https://:@github.com/savex/tempest-parser.git", "hash": "8c2ad3b8d13573924408bf3d2bf50ddc05fdd3d8", "diff": "@@ -33,7 +33,7 @@ def get_date_from_source(source):\n # _ctime = time.strftime(\"%d/%m/%Y %H:%M\", time.gmtime(ctime))\n return time.strftime(\n \"%d/%m/%Y %H:%M GMT\",\n- time.gmtime(ctime)\n+ time.gmtime(mtime)\n )\n \n \n", "old_path": "tempest_parser/manager/importers.py", "rewrite": "ReplaceText(target='mtime' @(36,20)->(36,25))"} -{"repo": "https://:@github.com/solidfire/solidfire-cli.git", "hash": "fcb6c5f4abbe9cc7ef2c6dded6d2d7fb2492f931", "diff": "@@ -88,5 +88,5 @@ def remove(ctx, name=None, index=None):\n if(name is None and index is not None):\n cli_utils.print_result(connections[int(index)], ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)\n if(name is not None and index is None):\n- connections = [connection for connection in connections if connection[\"name\"]!=name]\n+ connections = [connection for connection in connections if connection[\"name\"]==name]\n cli_utils.print_result(connections, ctx.logger, as_json=ctx.json, as_pickle=ctx.pickle, depth=ctx.depth, filter_tree=ctx.filter_tree)\n", "old_path": "element/cli/commands/cmd_connection.py", "rewrite": "ReplaceText(target='==' @(91,85)->(91,87))"} -{"repo": "https://:@github.com/glimix/numpy-sugar.git", "hash": "59fb36f9110b7ac9ae2ce6e06d443c7d44aac42f", "diff": "@@ -50,7 +50,7 @@ def ddot(L, R, left=True, out=None):\n else:\n if out is None:\n out = copy(L)\n- return multiply(out, R, out=out)\n+ return multiply(L, R, out=out)\n \n \n def cdot(L, out=None):\n", "old_path": "numpy_sugar/linalg/dot.py", "rewrite": "ReplaceText(target='L' @(53,24)->(53,27))"} -{"repo": "https://:@github.com/kuzmoyev/Google-Calendar-Simple-API.git", "hash": "9a902a5ce43d8dc2b18c53b8140443a2a99c2810", "diff": "@@ -474,7 +474,7 @@ class Recurrence:\n if freq not in (HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY, YEARLY):\n raise ValueError('\"freq\" parameter must be one of HOURLY, MINUTELY, DAILY, WEEKLY, MONTHLY or YEARLY. '\n '{} was provided'.format(freq))\n- if interval and (isinstance(interval, int) or interval < 1):\n+ if interval and (not isinstance(interval, int) or interval < 1):\n raise ValueError('\"interval\" parameter must be a positive int. '\n '{} was provided'.format(interval))\n if count and (not isinstance(count, int) or count < 1):\n", "old_path": "gcsa/recurrence.py", "rewrite": "ReplaceText(target='not ' @(477,25)->(477,25))"} -{"repo": "https://:@github.com/NFontrodona/Lazyparser.git", "hash": "8e3888ea5248c4f1e599bff0bd40b4e96c58e92f", "diff": "@@ -383,7 +383,7 @@ def set_env(delim1, delim2, hd, tb):\n :param hd: (string) the header of parameter\n :param tb: (int) the number of space/tab that bedore the docstring\n \"\"\"\n- if isinstance(int, tb):\n+ if isinstance(tb, int):\n global tab\n tab = tb\n else:\n", "old_path": "src/lazyparser.py", "rewrite": "ArgSwap(idxs=0<->1 @(386,7)->(386,17))"} -{"repo": "https://:@github.com/mikemill/rq_retry_scheduler.git", "hash": "d279c059418831f33d588d963252de0610cb17a7", "diff": "@@ -59,7 +59,7 @@ class Scheduler(object):\n \n def delay_job(self, job, time_delta):\n amount = int(time_delta.total_seconds())\n- self.connection.zincrby(self.scheduler_jobs_key, job.id, amount)\n+ self.connection.zincrby(self.scheduler_jobs_key, amount, job.id)\n \n def should_repeat_job(self, job):\n max_runs = job.meta['max_runs']\n", "old_path": "rq_retry_scheduler/scheduler.py", "rewrite": "ArgSwap(idxs=1<->2 @(62,8)->(62,31))"} -{"repo": "https://:@github.com/jbaber/pedigree.git", "hash": "d4f17753d97d279e2845e1b5569c8f5f99fa9939", "diff": "@@ -633,7 +633,7 @@ def toml_to_family(toml_filename):\n for relation in big_dict['spouse']\n if relation[0] == spouse_uid\n ]\n- family.add_spouses(spouse, children)\n+ family.add_spouses(spouse, spouses)\n \n return family\n \n", "old_path": "src/pedigree/pedigree_lib.py", "rewrite": "ReplaceText(target='spouses' @(636,31)->(636,39))"} -{"repo": "https://:@github.com/wayne-li2/Flask-User.git", "hash": "928e09cff2d773d5f2cbfa1ed847e32b1b5eae07", "diff": "@@ -83,7 +83,7 @@ def test_roles(db):\n role1 = db_adapter.find_first_object(RoleClass, name='Role 1')\n db_adapter.delete_object(role1)\n role2 = db_adapter.find_first_object(RoleClass, name='Role 2')\n- db_adapter.delete_object(role1)\n+ db_adapter.delete_object(role2)\n \n db_adapter.commit()\n \n", "old_path": "flask_user/tests/test_roles.py", "rewrite": "ReplaceText(target='role2' @(86,33)->(86,38))"} -{"repo": "https://:@github.com/manodeep/astro3D.git", "hash": "38bca8c32c783779f5ddd2bfab66ec69427f4d12", "diff": "@@ -117,7 +117,7 @@ def test_sorted_order(opt):\n return False \n \n if (outer_sort == outer_sort_next):\n- if (inner_sort > inner_sort_next):\n+ if (inner_sort < inner_sort_next):\n print(\"For Halo ID {0} we had a {1} of {2}. After sorting via lexsort \"\n \"inner-key {1}, the next Halo has ID {3} and a {1} of {4}\"\n .format(halo_id, opt[\"sort_mass\"], inner_sort, halo_id_next,\n", "old_path": "tests/tests.py", "rewrite": "ReplaceText(target='<' @(120,35)->(120,36))"} -{"repo": "https://:@github.com/manodeep/astro3D.git", "hash": "69e10a4b7b50701e65a9ca0f6782fc2654987588", "diff": "@@ -119,7 +119,7 @@ def my_test_sorted_order(opt):\n pytest.fail()\n \n if (outer_sort == outer_sort_next):\n- if (inner_sort < inner_sort_next):\n+ if (inner_sort > inner_sort_next):\n print(\"For Halo ID {0} we had a {1} of {2}. After sorting via lexsort \"\n \"inner-key {1}, the next Halo has ID {3} and a {1} of {4}\"\n .format(halo_id, opt[\"sort_mass\"], inner_sort, halo_id_next,\n", "old_path": "tests/forest_sorter_test.py", "rewrite": "ReplaceText(target='>' @(122,35)->(122,36))"} -{"repo": "https://:@github.com/kazenniy/atapt.git", "hash": "993a7734447b17a5d96db5428b267556f90b10b4", "diff": "@@ -416,7 +416,7 @@ class atapt:\n \n # word 83 \"Commands and feature sets supported\"\n features = int.from_bytes(buf[166] + buf[167], byteorder='little')\n- if major & 0x400:\n+ if features & 0x400:\n self.lba48bit = True\n else:\n self.lba48bit = False\n", "old_path": "atapt/atapt.py", "rewrite": "ReplaceText(target='features' @(419,11)->(419,16))"} -{"repo": "https://:@github.com/RI-imaging/DryMass.git", "hash": "d92c19314359ae4e3b4feb0136bc649840cf57a7", "diff": "@@ -221,7 +221,7 @@ def plot_qpi_sphere(qpi_real, qpi_sim, path=None, simtype=\"simulation\"):\n plt.tight_layout(rect=(0, 0, 1, .95))\n \n # add identifier\n- fig.text(x=.5, y=.99, s=qpi_real[\"identifier\"],\n+ fig.text(x=.5, y=.99, s=qpi_sim[\"identifier\"],\n verticalalignment=\"top\",\n horizontalalignment=\"center\",\n fontsize=14)\n", "old_path": "drymass/plot.py", "rewrite": "ReplaceText(target='qpi_sim' @(224,28)->(224,36))"} -{"repo": "https://:@github.com/lazaret/anuket.git", "hash": "6f069e0d5d6498048990cacd743cd5d63e0e84fa", "diff": "@@ -59,7 +59,7 @@ class UniqueAuthEmail(validators.FancyValidator):\n user_id = values['user_id']\n else:\n user_id = None\n- if email and (user.user_id != user_id):\n+ if user and (user.user_id != user_id):\n errors = {'email': self.message('not_unique_email', state)}\n raise Invalid(self.message('not_unique_email', state),\n values, state, error_dict=errors)\n", "old_path": "wepwawet/lib/validators.py", "rewrite": "ReplaceText(target='user' @(62,15)->(62,20))"} -{"repo": "https://:@github.com/esteinig/dartqc.git", "hash": "b98781ae43cc97f8df60a703a594395ddca18d87", "diff": "@@ -292,7 +292,7 @@ class CommandLine:\n \n for value in [command[\"maf\"], command[\"call\"], command[\"rep\"], command[\"seq_identity\"]]:\n if value != -1:\n- if value < 1 or value > 1:\n+ if value < 0 or value > 1:\n raise ValueError(\"Filter and identity thresholds must be larger >= 0 and <= 1.\")\n \n for value in [command[\"clone_selector\"], command[\"identity_selector\"]]:\n", "old_path": "dart_qc.py", "rewrite": "ReplaceText(target='0' @(295,27)->(295,28))"} -{"repo": "https://:@github.com/dmentipl/phantom-build.git", "hash": "09e3fcdf5c2ca013f55ec9d9d4af396c99b655f8", "diff": "@@ -387,7 +387,7 @@ def setup_calculation(\n raise SetupError(msg)\n else:\n logger.info('Successfully set up Phantom calculation')\n- logger.info(f'run_path: {run_path}')\n+ logger.info(f'run_path: {_run_path}')\n \n shutil.copy(_in_file, _run_path)\n \n", "old_path": "phantombuild/phantombuild.py", "rewrite": "ReplaceText(target='_run_path' @(390,33)->(390,41))"} -{"repo": "https://:@github.com/shane-breeze/zinv-analysis.git", "hash": "206e736a62c914f577717679adc3f16b9fa1d6b7", "diff": "@@ -36,7 +36,7 @@ class EventSumsProducer(object):\n event.METnoX_diMuonParaProjPt_Minus_DiMuon_pt = dimu_para - dimu_pt\n event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt = dimu_perp + dimu_pt\n event.METnoX_diMuonParaProjPt_Div_DiMuon_pt = dimu_para / dimu_pt\n- event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_para + dimu_pt) / dimu_pt\n+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_perp + dimu_pt) / dimu_pt\n \n # MHT\n ht, mht, mhphi = create_mht(\n", "old_path": "sequence/Readers/EventSumsProducer.py", "rewrite": "ReplaceText(target='dimu_perp' @(39,70)->(39,79))"} -{"repo": "https://:@github.com/mbr/ragstoriches.git", "hash": "a99ce338a03bc04bf4f6045b5e18c590177bb3ef", "diff": "@@ -78,7 +78,7 @@ def run_scraper():\n scraper = obj\n \n for name, obj in getattr(mod, '_rr_export', {}).iteritems():\n- scope[name] = name\n+ scope[name] = obj\n \n scraper.scrape(url=args.url,\n scraper_name=args.scraper,\n", "old_path": "ragstoriches/apps.py", "rewrite": "ReplaceText(target='obj' @(81,29)->(81,33))"} -{"repo": "https://:@github.com/NickYi1990/Kaggle_Buddy.git", "hash": "e461b1afe43f676923157628cb528833cf480882", "diff": "@@ -83,7 +83,7 @@ class callbacks_keras:\n if epoch%self.decay_after_n_epoch==0 and epoch!=0:\n lr = K.get_value(self.model.optimizer.lr)\n K.set_value(self.model.optimizer.lr, lr*self.decay_rate)\n- print(\"lr changed to {}\".format(lr**self.decay_rate))\n+ print(\"lr changed to {}\".format(lr*self.decay_rate))\n return K.get_value(self.model.optimizer.lr)\n \n def ka_xgb_r2_error(preds, dtrain):\n", "old_path": "Utils/KA_utils.py", "rewrite": "ReplaceText(target='*' @(86,46)->(86,48))"} -{"repo": "https://:@github.com/Qingluan/QmongoHelper.git", "hash": "67bf4fbd01beddd456583429cc428b4aeb1c2025", "diff": "@@ -69,7 +69,7 @@ class dbhelper(object):\n \n @_run\n def update(self,document,target,**kargs):\n- self._db[document].update(kargs,target,callback=self.callback)\n+ self._db[document].update(target,kargs,callback=self.callback)\n \n \n # def to_list_callback(self,infos,error):\n", "old_path": "__db.py", "rewrite": "ArgSwap(idxs=0<->1 @(72,8)->(72,33))"} -{"repo": "https://:@github.com/abelcarreras/aiida_extensions.git", "hash": "90d585773141882b4c16bca8aa6ecdea3ca34072", "diff": "@@ -224,7 +224,7 @@ class OptimizeCalculation(JobCalculation):\n \n \n structure_txt = generate_LAMMPS_structure(structure)\n- input_txt = generate_LAMMPS_input(potential_data,\n+ input_txt = generate_LAMMPS_input(potential_object,\n parameters_data,\n structure_file=self._INPUT_STRUCTURE,\n optimize_path_file=self._OUTPUT_TRAJECTORY_FILE_NAME)\n", "old_path": "plugins/jobs/lammps/optimize.py", "rewrite": "ReplaceText(target='potential_object' @(227,42)->(227,56))"} -{"repo": "https://:@github.com/abelcarreras/aiida_extensions.git", "hash": "22dc45e2580529558e5e80e1f9fbd24e2540c201", "diff": "@@ -547,7 +547,7 @@ class WorkflowQHA(Workflow):\n test_range[0] -= np.ceil(np.min([total_range/2, abs(test_range[0] - min_stress)]) / interval) * interval\n # test_range[0] -= np.ceil(abs(test_range[0] - min_stress) / interval) * interval\n \n- if max_stress < test_range[1] or min_stress > test_range[0]:\n+ if max_stress < test_range[1] and min_stress > test_range[0]:\n if abs(max_stress - test_range[1]) < interval * 2 or abs(test_range[0] - min_stress) < interval * 2:\n interval *= 0.5\n \n", "old_path": "workflows/wf_qha.py", "rewrite": "ReplaceText(target='and' @(550,42)->(550,44))"} -{"repo": "https://:@github.com/GeoStat-Framework/welltestpy.git", "hash": "1f9ba2a6af846ae9ef0004c885d807a45a26a911", "diff": "@@ -833,7 +833,7 @@ class Well(object):\n )\n if not self._radius.scalar:\n raise ValueError(\"Well: 'radius' needs to be scalar\")\n- if self.radius <= 0.0:\n+ if self.radius < 0.0:\n raise ValueError(\"Well: 'radius' needs to be positiv\")\n \n if isinstance(coordinates, Variable):\n", "old_path": "welltestpy/data/varlib.py", "rewrite": "ReplaceText(target='<' @(836,23)->(836,25))"} -{"repo": "https://:@github.com/GeoStat-Framework/welltestpy.git", "hash": "412f42ecf1bf2f9ae284aefd96802ee99cacdf2a", "diff": "@@ -544,7 +544,7 @@ def load_obs(obsfile):\n \n obs = load_var(TxtIO(zfile.open(obsf)))\n \n- observation = varlib.Observation(name, time, obs, description)\n+ observation = varlib.Observation(name, obs, time, description)\n except Exception:\n raise Exception(\"loadObs: loading the observation was not possible\")\n return observation\n", "old_path": "welltestpy/data/data_io.py", "rewrite": "ArgSwap(idxs=1<->2 @(547,22)->(547,40))"} -{"repo": "https://:@github.com/GeoStat-Framework/welltestpy.git", "hash": "412f42ecf1bf2f9ae284aefd96802ee99cacdf2a", "diff": "@@ -370,7 +370,7 @@ class PumpingTest(Test):\n description : :class:`str`, optional\n Description of the Variable. Default: ``\"Drawdown observation\"``\n \"\"\"\n- obs = varlib.DrawdownObs(well, time, observation, description)\n+ obs = varlib.DrawdownObs(well, observation, time, description)\n self.add_observations(obs)\n \n def add_observations(self, obs):\n", "old_path": "welltestpy/data/testslib.py", "rewrite": "ArgSwap(idxs=1<->2 @(373,14)->(373,32))"} -{"repo": "https://:@github.com/biosustain/venom.git", "hash": "94aab380cb41a3923248adc51e3bbe312fe98cf0", "diff": "@@ -48,7 +48,7 @@ def _route_handler(venom: 'venom.rpc.Venom', method: Method, protocol_factory: T\n http_request_query.decode(http_request.url.query, request)\n http_request_path.decode(http_request.match_info, request)\n \n- response = await venom.invoke(method, request, context=AioHTTPRequestContext(request))\n+ response = await venom.invoke(method, request, context=AioHTTPRequestContext(http_request))\n return web.Response(body=rpc_response.pack(response),\n content_type=rpc_response.mime,\n status=http_status)\n", "old_path": "venom/rpc/comms/aiohttp.py", "rewrite": "ReplaceText(target='http_request' @(51,89)->(51,96))"} -{"repo": "https://:@github.com/altio/foundation.git", "hash": "e39b13a5046467ebed3014bb2b5b4a47c5cd0e80", "diff": "@@ -117,7 +117,7 @@ class Backend(six.with_metaclass(MediaDefiningClass, Router)):\n # set app_index_class on app to \"None\" to skip creation\n app_index_class = getattr(app_config, 'app_index_class', None)\n if app_index_class:\n- template_name = getattr(app_config, 'template_name', 'app_index.html')\n+ template_name = getattr(app_index_class, 'template_name', 'app_index.html')\n app_index = app_index_class.as_view(\n app_config=app_config, backend=self, template_name=template_name\n )\n", "old_path": "foundation/backend/base.py", "rewrite": "ReplaceText(target='app_index_class' @(120,36)->(120,46))"} -{"repo": "https://:@github.com/privacyidea/crontabparser.git", "hash": "19e8fe34a9f9f1a2156c17d3b4b756f3aca17cdc", "diff": "@@ -30,7 +30,7 @@ class CronJob(object):\n assert len(time) <= 5\n padded_time = tuple(time) + ('*',) * (5 - len(time))\n assert len(padded_time) == 5\n- return cls(command, time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])\n+ return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])\n \n @property\n def time(self):\n", "old_path": "cronjobparser.py", "rewrite": "ReplaceText(target='padded_time' @(33,28)->(33,32))"} -{"repo": "https://:@github.com/privacyidea/crontabparser.git", "hash": "8a6a177a47b83938946ea7bf76741d96352eab08", "diff": "@@ -30,7 +30,7 @@ class CronJob(object):\n if len(time) > 5:\n raise RuntimeError(\"Malformed cronjob time: {!r}\".format(time))\n padded_time = tuple(time) + ('*',) * (5 - len(time))\n- if len(padded_time) > 5:\n+ if len(padded_time) != 5:\n raise RuntimeError(\"Malformed cronjob time: {!r}\".format(padded_time))\n return cls(command, padded_time[0], user, padded_time[1], padded_time[2], padded_time[3], padded_time[4])\n \n", "old_path": "cronjobparser.py", "rewrite": "ReplaceText(target='!=' @(33,28)->(33,29))"} -{"repo": "https://:@github.com/smurn/sourblossom.git", "hash": "9071c9cc86f2755254ed3d36b7a08080c64ac19f", "diff": "@@ -116,7 +116,7 @@ class MsgConnection(protocol.Protocol):\n def done(result):\n self._sending = False\n return result\n- d.addBoth(d)\n+ d.addBoth(done)\n \n def _frame_received(self, frameid, blob):\n return self.frame_received(frameid, blob)\n", "old_path": "sourblossom/router.py", "rewrite": "ReplaceText(target='done' @(119,18)->(119,19))"} -{"repo": "https://:@github.com/PMCC-BioinformaticsCore/pipelines.git", "hash": "44406718107c18b4fe00e2a3abb4077dd158e298", "diff": "@@ -770,7 +770,7 @@ class Workflow(Tool):\n wtools[s.id()] = wf_wdl\n wtools.update(wf_tools)\n else:\n- wtools[s.id()] = t.wdl(with_docker=with_docker)\n+ wtools[t.id()] = t.wdl(with_docker=with_docker)\n \n w.calls.append(\n s.wdl(tool_aliases[t.id().lower()].upper() + \".\" + t.id(), s.id())\n", "old_path": "Pipeline/workflow/workflow.py", "rewrite": "ReplaceText(target='t' @(773,23)->(773,24))"} -{"repo": "https://:@github.com/nvaytet/visens.git", "hash": "320e6fed81a09d158e3728b7de54233657a24e0d", "diff": "@@ -13,7 +13,7 @@ def image(filename, colormap=\"viridis\", vmin=None, vmax=None, log=False,\n \n z, edges = np.histogram(data.ids,\n bins=np.arange(-0.5, data.nx * data.ny + 0.5))\n- z = z.reshape(data.nx, data.ny)\n+ z = z.reshape(data.ny, data.nx)\n if side_panels:\n z_sumx = np.sum(z, axis=1)\n z_sumy = np.sum(z, axis=0)\n", "old_path": "src/visens/image.py", "rewrite": "ArgSwap(idxs=0<->1 @(16,8)->(16,17))"} -{"repo": "https://:@github.com/nvaytet/visens.git", "hash": "320e6fed81a09d158e3728b7de54233657a24e0d", "diff": "@@ -65,7 +65,7 @@ def slicer(filename, colormap=\"viridis\", vmin=None, vmax=None, log=False,\n z, xe, ye = np.histogram2d(data.ids, data.tofs/1.0e3,\n bins=[np.arange(-0.5, data.nx * data.ny + 0.5),\n t])\n- z = z.reshape(data.nx, data.ny, nbins)\n+ z = z.reshape(data.ny, data.nx, nbins)\n # Transpose should be True for old December 2018 files\n if transpose:\n z = np.transpose(z, axes=[1, 0, 2])\n", "old_path": "src/visens/slicer.py", "rewrite": "ArgSwap(idxs=0<->1 @(68,8)->(68,17))"} -{"repo": "https://:@github.com/compmech/structmanager.git", "hash": "3082bac86d0c1ad2826111bde8c2e5d5976dd7c8", "diff": "@@ -200,7 +200,7 @@ class Model(object):\n \n print('Building stringers...')\n for s in stringers.values():\n- s.elements = [bdf.elements[eid] for eid in p.eids]\n+ s.elements = [bdf.elements[eid] for eid in s.eids]\n setelements = set(s.elements)\n print('finished!')\n \n", "old_path": "structMan/model.py", "rewrite": "ReplaceText(target='s' @(203,55)->(203,56))"} -{"repo": "https://:@github.com/al-fontes-jr/bardolph.git", "hash": "c4429c7a1453ff8088bffa4066b8fe9ff7d4c164", "diff": "@@ -61,7 +61,7 @@ def as_raw(reg, logical_value, use_float=False):\n else:\n value = (logical_value % 360.0) / 360.0 * 65535.0\n elif reg in (Register.BRIGHTNESS, Register.SATURATION):\n- if logical_value == 100.0:\n+ if logical_value >= 100.0:\n value = 65535.0\n else:\n value = logical_value / 100.0 * 65535.0\n", "old_path": "bardolph/controller/units.py", "rewrite": "ReplaceText(target='>=' @(64,25)->(64,27))"} -{"repo": "https://:@github.com/bluecoveltd/contracts.git", "hash": "f5b74e088920520642500d4da990580c841cbb22", "diff": "@@ -25,7 +25,7 @@ class SeparateContext(Contract):\n return SeparateContext(tokens[0]['child'], where=where)\n \n \n-sepcon = (Group(Literal('$') - Literal('(') -\n+sepcon = (Group(Literal('$') + Literal('(') -\n contract_expression('child') - Literal(')')))\n sepcon.setParseAction(SeparateContext.parse_action)\n sepcon.setName('Context separation construct')\n", "old_path": "src/contracts/library/separate_context.py", "rewrite": "ReplaceText(target='+' @(28,29)->(28,30))"} -{"repo": "https://:@github.com/TimHessels/WaporTranslator.git", "hash": "58f1b770f5b60b2468677294c51c52460305b12f", "diff": "@@ -111,7 +111,7 @@ class Rasterdata_tiffs:\n time_or = ''\n \n # Apply gapfilling if needed\n- if gap_filling != None and ~np.isnan(np.nanmean(Array)): \n+ if gap_filling != None and ~np.isnan(np.nanmean(Array_end)): \n Array_end[np.isnan(Array_end)] = -9999\n Array_end = RC.gap_filling(Array_end, -9999, gap_filling)\n Array_end = Array_end * MASK\n", "old_path": "LEVEL_1/DataCube.py", "rewrite": "ReplaceText(target='Array_end' @(114,60)->(114,65))"} -{"repo": "https://:@github.com/TimHessels/WaporTranslator.git", "hash": "fab158818a8bcc5a90b04347469916bdb2cd8fa9", "diff": "@@ -311,7 +311,7 @@ def main(Start_year_analyses, End_year_analyses, output_folder):\n if not np.isnan(np.nanmean(Crop_S1_End.Data)):\n for Date_Year in Dates_Years:\n year_diff = int(Date_Year.year - Dates_Years[0].year)\n- for dekad in range(0,int(np.nanmax(Crop_S2_End.Data))):\n+ for dekad in range(0,int(np.nanmax(Crop_S3_End.Data))):\n Accumulated_NPP_Data_Start_S1[year_diff, Crop_S1_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S1_End.Data[year_diff, :, :] == dekad] \n Accumulated_NPP_Data_Start_S2[year_diff, Crop_S2_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S2_End.Data[year_diff, :, :] == dekad] \n Accumulated_NPP_Data_Start_S3[year_diff, Crop_S3_End.Data[year_diff, :, :] == dekad] = NPPcum.Data[np.minimum(NPPcum.Size[0]-1, int(year_diff * 36 + dekad-1)), Crop_S3_End.Data[year_diff, :, :] == dekad] \n", "old_path": "LEVEL_3/Food_Security/LEVEL_3_Calc_Food_Security.py", "rewrite": "ReplaceText(target='Crop_S3_End' @(314,47)->(314,58))"} -{"repo": "https://:@github.com/padraic-padraic/StabilizerSearch.git", "hash": "9a7b666656f60cbeb5a271e8e6c4ceb168f754fd", "diff": "@@ -121,7 +121,7 @@ def get_positive_stabilizer_groups(n_qubits, n_states):\n continue \n subspaces.append(res)\n generators.append(tuple(candidate.generators))\n- if len(generators) == n_states:\n+ if len(generators) == target:\n break\n return generators\n \n", "old_path": "stabilizer_search/stabilizers/py_generators.py", "rewrite": "ReplaceText(target='target' @(124,30)->(124,38))"} -{"repo": "https://:@github.com/jwg4/volly.git", "hash": "fabca57aac55f7350f24c006d2035360e94d29fc", "diff": "@@ -16,4 +16,4 @@ class TestService(TestCase):\n \n def test_write_missing_value(self):\n svc = Service(\"https://volatile.wtf\")\n- self.assertRaises(lambda: svc[\"UNGYIZFHIA\"], MissingKeyException)\n+ self.assertRaises(MissingKeyException, lambda: svc[\"UNGYIZFHIA\"])\n", "old_path": "tests/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(19,8)->(19,25))"} -{"repo": "https://:@github.com/ismaelpessa/Muse_Cube.git", "hash": "e01ea96ba7095c502c18faf927f43b8528eb76a2", "diff": "@@ -934,7 +934,7 @@ class MuseCube:\n print('Fit Aceptado')\n print(str(x[i]) + ',' + str(y[i]))\n units = u.km / u.s\n- vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z_line).to(units).value\n+ vel = ltu.dv_from_z((mean / wv_line_vac) - 1, z).to(units).value\n kine_im[y[i]][x[i]] = vel\n else:\n if debug:\n", "old_path": "PyMUSE/musecube.py", "rewrite": "ReplaceText(target='z' @(937,62)->(937,68))"} -{"repo": "https://:@github.com/chie8842/mldatautils.git", "hash": "ccc35e5d07c30e7ec685bfe305ad5e2623015147", "diff": "@@ -20,7 +20,7 @@ def _config_parse(config_file):\n 'port': os.getenv('DB_PORT'),\n 'database': os.getenv('DATABASE'),\n }\n- return config_file\n+ return dwh_config\n \n def create_engine(config_file=None):\n dwh_config = _config_parse(config_file)\n", "old_path": "mldatautils/db_utils.py", "rewrite": "ReplaceText(target='dwh_config' @(23,11)->(23,22))"} -{"repo": "https://:@github.com/andrewbihl/bted.git", "hash": "d04bda7b1d287b1b1f06983c306455f5fee0f152", "diff": "@@ -24,7 +24,7 @@ class TestAppend(unittest.TestCase):\n expected = fin.read()\n cmd, flags = self.interpreter.build_command(command, input_file)\n res = self.interpreter.execute_command(cmd, flags, return_output=True)\n- self.assertEqual(res, expected)\n+ self.assertEqual(expected, res)\n \n def perform_test_from_key(self, key: str):\n tests = self.tests[key]\n", "old_path": "bted/tests/test_append.py", "rewrite": "ArgSwap(idxs=0<->1 @(27,8)->(27,24))"} -{"repo": "https://:@github.com/muammar/mlchem.git", "hash": "dbb7de0379cb8881538d211899e4bec8794f16e3", "diff": "@@ -344,7 +344,7 @@ def train(inputs, targets, model=None, data=None, optimizer=None, lr=None,\n logger.info('Training finished in {} hours {} minutes {:.2f} seconds.'\n .format(h, m, s))\n logger.info('outputs')\n- logger.info(outputs)\n+ logger.info(outputs_)\n logger.info('targets')\n logger.info(targets)\n \n", "old_path": "mlchem/models/neuralnetwork.py", "rewrite": "ReplaceText(target='outputs_' @(347,16)->(347,23))"} -{"repo": "https://:@github.com/ibrokemypie/m3uspiff.git", "hash": "e44882b66620c92ba437313d4b305c835506a5d5", "diff": "@@ -39,7 +39,7 @@ def mdata(path, track_element):\n for tag in tags:\n tagstring = tag+\":\"\n if tagstring in linecheck:\n- stringf = out.split(': ')[1]\n+ stringf = decoded.split(': ')[1]\n ttag = tag\n if tag == \"artist\":\n ttag = \"creator\"\n", "old_path": "m3uspiff.py", "rewrite": "ReplaceText(target='decoded' @(42,30)->(42,33))"} -{"repo": "https://:@github.com/ibrokemypie/m3uspiff.git", "hash": "aca86931f7453d9c90c2ef779ede1659d10af00d", "diff": "@@ -45,7 +45,7 @@ def mdata(path, track_element):\n ttag = \"creator\"\n if tag == \"genre\":\n ttag = \"info\"\n- ttag = SubElement(track_element, tag)\n+ ttag = SubElement(track_element, ttag)\n ttag.text = stringf.rstrip()\n else:\n break\n", "old_path": "m3uspiff.py", "rewrite": "ReplaceText(target='ttag' @(48,53)->(48,56))"} -{"repo": "https://:@github.com/LanguageMachines/CLIN28_ST_spelling_correction.git", "hash": "b95343c354ae7ee1934b9bba9a9ded0a89bd3048", "diff": "@@ -8,7 +8,7 @@ class ValidationError(Exception):\n \n class CLIN28JSON:\n def __init__(self, filename):\n- if os.path.exists(filename):\n+ if not os.path.exists(filename):\n raise FileExistsError(\"File not found: \" + filename)\n \n with open(filename,'r', encoding='utf-8') as f:\n", "old_path": "clin28tools/format.py", "rewrite": "ReplaceText(target='not ' @(11,11)->(11,11))"} -{"repo": "https://:@github.com/LanguageMachines/CLIN28_ST_spelling_correction.git", "hash": "f6d60c45406614fc6fbf930d3a44cc5e7b1453fb", "diff": "@@ -57,7 +57,7 @@ class CLIN28JSON:\n correction['confidence'] = float(correction['confidence'])\n except:\n raise ValidationError(\"Invalid confidence value (\" + str(correction['confidence']) + \") \" + repr(correction))\n- if correction['confidence'] < 0 or correction['confidence'] > 0:\n+ if correction['confidence'] < 0 or correction['confidence'] > 1:\n raise ValidationError(\"Confidence value out of bounds (\" + str(correction['confidence']) + \") \" + repr(correction))\n \n def words(self):\n", "old_path": "clin28tools/format.py", "rewrite": "ReplaceText(target='1' @(60,82)->(60,83))"} -{"repo": "https://:@github.com/drmartiner/django-smsaero.git", "hash": "067445a9613fcdb635f49750ac2d49b3eac5a38a", "diff": "@@ -24,7 +24,7 @@ class SmsSenderTest(TestCase):\n @patch('urllib2.urlopen', _fake_urlopen)\n def test_send_request(self):\n sender = SmsSender()\n- response = sender.send_request('/link/', {})\n+ response = sender.send_request({}, '/link/')\n self.assertIn(SMSMessage.STATUS_ACCEPTED, response)\n \n @patch('smsaero.conf.SMSAERO_PASSWORD', 'FAKE')\n", "old_path": "smsaero/tests.py", "rewrite": "ArgSwap(idxs=0<->1 @(27,19)->(27,38))"} -{"repo": "https://:@github.com/drmartiner/django-smsaero.git", "hash": "916bcb1b7a9b1546a0944752f909e5a752cb99a6", "diff": "@@ -68,7 +68,7 @@ def send_sms(to, text, signature_id=None, date=None, link='/send/'):\n 'from': signature.name,\n 'date': date or '',\n }\n- response = sender.send_request(link, params)\n+ response = sender.send_request(params, link)\n sms_id, status = sender.parse_response(response)\n \n if not sms_id or not status:\n", "old_path": "smsaero/utils.py", "rewrite": "ArgSwap(idxs=0<->1 @(71,15)->(71,34))"} -{"repo": "https://:@github.com/jakirkham/kenjutsu.git", "hash": "c532fe8f06fd9facc284639e0a87f88e44de852a", "diff": "@@ -103,7 +103,7 @@ def reformat_slice(a_slice, a_length=None):\n start = a_length - 1\n if stop_i and stop < -a_length:\n stop = None\n- stop_i = True\n+ stop_i = False\n \n # Catch some known empty slices.\n if (step > 0) and (stop == 0):\n", "old_path": "kenjutsu/kenjutsu.py", "rewrite": "ReplaceText(target='False' @(106,29)->(106,33))"} -{"repo": "https://:@github.com/jakirkham/kenjutsu.git", "hash": "a3b1486a8711d57b93f43a35bb7dea2ab70a83ff", "diff": "@@ -55,7 +55,7 @@ def reformat_slice(a_slice, a_length=None):\n new_slice = a_slice\n if new_slice is Ellipsis:\n new_slice = slice(None)\n- elif not isinstance(new_slice, slice):\n+ elif not isinstance(a_slice, slice):\n raise ValueError(\n \"Expected a `slice` type. Instead got `%s`.\" % str(new_slice)\n )\n", "old_path": "kenjutsu/kenjutsu.py", "rewrite": "ReplaceText(target='a_slice' @(58,24)->(58,33))"} -{"repo": "https://:@github.com/jakirkham/kenjutsu.git", "hash": "dbedbd6ff58c9aadf79edc7cc840d6ec15552674", "diff": "@@ -57,7 +57,7 @@ def reformat_slice(a_slice, a_length=None):\n new_slice = slice(None)\n elif not isinstance(a_slice, slice):\n raise ValueError(\n- \"Expected a `slice` type. Instead got `%s`.\" % str(new_slice)\n+ \"Expected a `slice` type. Instead got `%s`.\" % str(a_slice)\n )\n \n if new_slice.step == 0:\n", "old_path": "kenjutsu/kenjutsu.py", "rewrite": "ReplaceText(target='a_slice' @(60,63)->(60,72))"} -{"repo": "https://:@github.com/bh/python-keepass-httpd.git", "hash": "548473a3d4044f89e3a30639fa2aafb71bb321b6", "diff": "@@ -86,7 +86,7 @@ def main():\n if success is False:\n sys.exit(\"Wrong passphrase after %d attempts\" % max_try_count)\n \n- server.set_backend(backend)\n+ kpconf.set_backend(backend)\n \n # config daemon\n if is_daemon:\n", "old_path": "src/keepass_http/scripts/python_keepass_httpd.py", "rewrite": "ReplaceText(target='kpconf' @(89,4)->(89,10))"} -{"repo": "https://:@github.com/frkhit/pyxtools.git", "hash": "678039c852edb8b94a45aa39393043019a52bdc7", "diff": "@@ -20,7 +20,7 @@ class IndexType(Enum):\n def to_train(self) -> bool:\n if self.name == \"compress\":\n return True\n- return True\n+ return False\n \n @property\n def index_factory(self) -> str:\n", "old_path": "pyxtools/faiss_tools/faiss_utils.py", "rewrite": "ReplaceText(target='False' @(23,15)->(23,19))"} -{"repo": "https://:@github.com/combatopera/Concern.git", "hash": "32c056654b62e455261ac6381c7207c6c1e4be39", "diff": "@@ -69,7 +69,7 @@ def main_Concern():\n (-Concern).printf('vimArgs := $list()')\n for arg in vimargs:\n (-Concern).printf(\"vimArgs += %s\", arg)\n- import_module(f\".consumer.{Concern.consumerName}\", package = __package__).configure(config)\n+ import_module(f\".consumer.{Concern.consumerName}\", package = __package__).configure(Concern)\n (-Concern).processtemplate(resource_filename(templates.__name__, 'vimrc.aridt'), concernvimrc)\n (-Concern).printf('\" = $(pystr)')\n (-Concern).processtemplate(resource_filename(templates.__name__, 'sendblock.py.aridt'), sendblock)\n", "old_path": "concern/concern.py", "rewrite": "ReplaceText(target='Concern' @(72,92)->(72,98))"} -{"repo": "https://:@github.com/brianhie/ample.git", "hash": "8fc0e7a08beb33770dcad583debf60b1bd06cc51", "diff": "@@ -66,7 +66,7 @@ def kmeanspp(X, n_clusters, seed=None, replace=False,\n centers[c] = X[best_candidate].toarray()\n else:\n centers[c] = X[best_candidate]\n- centers_idx.append(c)\n+ centers_idx.append(best_candidate)\n current_pot = best_pot\n closest_dist_sq = best_dist_sq\n \n", "old_path": "geosketch/kmeanspp.py", "rewrite": "ReplaceText(target='best_candidate' @(69,27)->(69,28))"} -{"repo": "https://:@github.com/AWehrhahn/PyReduce.git", "hash": "3971160a9dc6f308d452b99fadc27da10a8eb36a", "diff": "@@ -35,7 +35,7 @@ def UVES_HD132205(local_dir=\"./\"):\n with tarfile.open(filename) as file:\n file.extractall(path=target_dir)\n \n- return local_dir\n+ return target_dir\n \n \n if __name__ == \"__main__\":\n", "old_path": "pyreduce/datasets.py", "rewrite": "ReplaceText(target='target_dir' @(38,11)->(38,20))"} -{"repo": "https://:@github.com/4degrees/segue.git", "hash": "06d1a4945dcf6c99630412967d6c20ba400f8bb7", "diff": "@@ -120,7 +120,7 @@ class SelectorWidget(QtGui.QFrame):\n '''\n matches = self.list_widget.findItems(\n item,\n- QtCore.Qt.MatchFixedString | QtCore.Qt.CaseSensitive\n+ QtCore.Qt.MatchFixedString & QtCore.Qt.CaseSensitive\n )\n \n if matches:\n", "old_path": "source/segue/frontend/selector.py", "rewrite": "ReplaceText(target='&' @(123,39)->(123,40))"} -{"repo": "https://:@github.com/gmrukwa/divik.git", "hash": "7a46f680e9c5832ef3b81ab6a73bc6a1f25efa21", "diff": "@@ -143,6 +143,6 @@ class SpearmanDistance(DistanceMetric):\n if first is not self._last:\n self._last = first\n self._last_ranks = np.apply_along_axis(st.rankdata, 0, first)\n- second_ranks = np.apply_along_axis(st.rankdata, 0, first)\n+ second_ranks = np.apply_along_axis(st.rankdata, 0, second)\n return dist.cdist(self._last_ranks, second_ranks, metric='correlation')\n \n", "old_path": "spdivik/distance.py", "rewrite": "ReplaceText(target='second' @(146,59)->(146,64))"} -{"repo": "https://:@github.com/takahi-i/hideout.git", "hash": "49d6acc882c0d666ed214c5c33360b4e8ac2ea3b", "diff": "@@ -15,7 +15,7 @@ def resume(file_name):\n with open(file_path, mode='rb') as f:\n target = pickle.load(f)\n yield target\n- if target is None:\n+ if target is not None:\n freeze(target, file_name)\n \n \n", "old_path": "hideout/__init__.py", "rewrite": "ReplaceText(target=' is not ' @(18,13)->(18,17))"} -{"repo": "https://:@github.com/LordFlashmeow/pycent.git", "hash": "a51cc6b53b9da5b5ee26026d51648eabbc9c0c61", "diff": "@@ -3,7 +3,7 @@ class pycent:\n pass\n \n def percent_of(self, percent, whole):\n- return (percent * whole) * 100\n+ return (percent * whole) / 100\n \n def percentage(self, part, whole):\n return 100 * float(part)/float(whole)\n", "old_path": "pycent.py", "rewrite": "ReplaceText(target='/' @(6,33)->(6,34))"} -{"repo": "https://:@github.com/jdrubin91/GeneLab-Microarray.git", "hash": "06df0ad32f1d93ead0b76557cf1137b570eb82d2", "diff": "@@ -52,7 +52,7 @@ def run():\n \n if batch:\n import batch_process\n- batch_process.run(batch)\n+ batch_process.run(indir)\n else:\n metadata_dir = os.path.join(indir,'metadata')\n if os.path.isdir(metadata_dir):\n", "old_path": "GeneLab-Microarray/__main__.py", "rewrite": "ReplaceText(target='indir' @(55,26)->(55,31))"} -{"repo": "https://:@github.com/kszucs/sequely.git", "hash": "61dec39fd7d7ff2beb2dd051e761c2004f6dcbed", "diff": "@@ -680,7 +680,7 @@ class IsNullOperator(UnaryPostfixOperator):\n \"\"\"\n \n def __init__(self, operand, invert=False):\n- super(IsNullOperator, self).__init__(u' IS NOT NULL' if invert else u' IS NULL', operand)\n+ super(IsNullOperator, self).__init__(operand, u' IS NOT NULL' if invert else u' IS NULL')\n self.invert = invert\n \n def NOT(self):\n", "old_path": "sqlbuilder/sql.py", "rewrite": "ArgSwap(idxs=0<->1 @(683,8)->(683,44))"} -{"repo": "https://:@github.com/muteria/muteria.git", "hash": "6609a8e8e8acd2c0b5bcfbca516de7c746f02d14", "diff": "@@ -102,7 +102,7 @@ class MetaCriteriaTool(object):\n self.tools_config_by_criterion_dict = tools_config_by_criterion_dict\n \n # Verify Direct Arguments Variables\n- ERROR_HANDLER.assert_true(self.criteria_working_dir is None, \\\n+ ERROR_HANDLER.assert_true(self.criteria_working_dir is not None, \\\n \"Must specify criteria_working_dir\", __file__)\n for criterion in self.tools_config_by_criterion_dict:\n ERROR_HANDLER.assert_true( \\\n", "old_path": "muteria/drivers/criteria/meta_testcriteriatool.py", "rewrite": "ReplaceText(target=' is not ' @(105,59)->(105,63))"} -{"repo": "https://:@github.com/muteria/muteria.git", "hash": "6609a8e8e8acd2c0b5bcfbca516de7c746f02d14", "diff": "@@ -127,7 +127,7 @@ class MetaTestcaseTool(object):\n self.test_tool_config_list = test_tool_config_list\n \n # Verify Direct Arguments Variables\n- ERROR_HANDLER.assert_true(self.tests_working_dir is None, \\\n+ ERROR_HANDLER.assert_true(self.tests_working_dir is not None, \\\n \"Must specify tests_working_dir\", __file__)\n ERROR_HANDLER.assert_true(len(self.test_tool_config_list) != \\\n len(set([c.get_tool_config_alias() for c in \\\n", "old_path": "muteria/drivers/testgeneration/meta_testcasetool.py", "rewrite": "ReplaceText(target=' is not ' @(130,56)->(130,60))"} -{"repo": "https://:@github.com/muteria/muteria.git", "hash": "43adff6c76b0fbeeacc6a87b54c29ac82b4d38e8", "diff": "@@ -56,7 +56,7 @@ class IdentityCodeConverter(BaseCodeFormatConverter):\n for src, dest in list(file_src_dest_map.items()):\n abs_src = os.path.join(self.repository_rootdir, src)\n if os.path.abspath(abs_src) != os.path.abspath(dest):\n- shutil.copy2(src, dest)\n+ shutil.copy2(abs_src, dest)\n return DefaultCallbackObject.after_command(self)\n #~ def after_command()\n #~ class CopyCallbackObject\n", "old_path": "muteria/repositoryandcode/codes_convert_support.py", "rewrite": "ReplaceText(target='abs_src' @(59,33)->(59,36))"} -{"repo": "https://:@github.com/muteria/muteria.git", "hash": "69571204b176aade524ca8d4259db5cf14550599", "diff": "@@ -489,7 +489,7 @@ class TestcasesToolKlee(BaseTestcaseTool):\n KTestTestFormat.get_dir(dp, folders)) \\\n for dp in dup_tuple[1:]]\n for df in dup_tuple[1:]:\n- if KTestTestFormat.get_dir(kt, folders) == \\\n+ if KTestTestFormat.get_dir(df, folders) == \\\n self.tests_storage_dir:\n os.remove(df)\n common_fs.dumpJSON(kepttest2duptest_map, self.keptktest2dupktests)\n", "old_path": "muteria/drivers/testgeneration/tools_by_languages/c/klee/klee.py", "rewrite": "ReplaceText(target='df' @(492,43)->(492,45))"} -{"repo": "https://:@github.com/muteria/muteria.git", "hash": "99f435844fc4a30e5b8351943feee77c96f9630e", "diff": "@@ -56,7 +56,7 @@ class CliUserInterface(object):\n parser_customexec = subparsers.add_parser('customexec', \\\n help=\"Make some custom execution AFTER the\"\n \" main execution is done\")\n- parser_run.add_argument(\"--nohashoutlog\", action='store_true', \\\n+ parser_customexec.add_argument(\"--nohashoutlog\", action='store_true', \\\n help=\"When set, enforce no hash log\")\n \n if len(sys.argv)==1:\n", "old_path": "muteria/cli/cli.py", "rewrite": "ReplaceText(target='parser_customexec' @(59,8)->(59,18))"} -{"repo": "https://:@github.com/Tetrite/cBinder.git", "hash": "36123e9438d3dd26c34c95a5e6de613ddcb0d788", "diff": "@@ -17,7 +17,7 @@ def get_definitions_pairs(defines_list):\n def_pairs = {}\n for define_statement_string in defines_list:\n elems = re.split(\" \", define_statement_string)\n- if len(elems) > 3: # When define statement is not a simple NAME <--> VALUE PAIR\n+ if len(elems) != 3: # When define statement is not a simple NAME <--> VALUE PAIR\n continue # Do not preprocess this\n name = elems[1]\n value = elems[2]\n", "old_path": "MiniPreprocessing.py", "rewrite": "ReplaceText(target='!=' @(20,22)->(20,23))"} -{"repo": "https://:@github.com/CovertLab/vivarium.git", "hash": "7a3dc56b996fd44f4c028dcd299e2fc78cbb3144", "diff": "@@ -133,7 +133,7 @@ class Motor(Analysis):\n max_length = max(run_lengths + tumble_lengths)\n bins = np.linspace(0, max_length, 10)\n logbins = np.logspace(0, np.log10(bins[-1]), len(bins))\n- ax5.hist([run_lengths, tumble_lengths], bins=logbins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])\n+ ax5.hist([run_lengths, tumble_lengths], bins=bins, label=['run_lengths', 'tumble_lengths'], color=['b', 'm'])\n \n # plot expected values\n ax5.axvline(x=expected_tumble, color='m', linestyle='dashed', label='expected tumble')\n", "old_path": "vivarium/analysis/motor.py", "rewrite": "ReplaceText(target='bins' @(136,53)->(136,60))"} -{"repo": "https://:@github.com/CovertLab/vivarium.git", "hash": "365a08b14a6d25915605e68c586933f702b4994c", "diff": "@@ -43,7 +43,7 @@ class ShepherdControl(ActorControl):\n experiment_id, number, agent_type, environment_type))\n \n # boot environment\n- self.add_agent(experiment_id, environment_type, lattice_config)\n+ self.add_agent(experiment_id, environment_type, actor_config)\n time.sleep(10) # wait for the environment to boot\n \n # boot agents\n", "old_path": "vivarium/environment/control.py", "rewrite": "ReplaceText(target='actor_config' @(46,56)->(46,70))"} -{"repo": "https://:@github.com/CovertLab/vivarium.git", "hash": "7b17a044e3d13866f61e7530952f5da27f21e896", "diff": "@@ -771,7 +771,7 @@ def load_compartment(composite, boot_config={}):\n 'emitter': boot_config.get('emitter', 'timeseries'),\n 'time_step': boot_config.get('time_step', 1.0)})\n \n- return Compartment(processes, states, derivers, options)\n+ return Compartment(processes, derivers, states, options)\n \n \n def simulate_compartment(compartment, settings={}):\n", "old_path": "vivarium/compartment/composition.py", "rewrite": "ArgSwap(idxs=1<->2 @(774,11)->(774,22))"} -{"repo": "https://:@github.com/CovertLab/vivarium.git", "hash": "049723f40d7994f2511f9b52e72082152a88cc3d", "diff": "@@ -67,7 +67,7 @@ def plot_signal_transduction(timeseries, out_dir='out', filename='signal_transdu\n ax2.tick_params(right=False, top=False)\n ax2.set_ylabel(\"cluster activity \\n P(on)\", fontsize=10)\n \n- ax2.set_xticklabels([])\n+ ax3.set_xticklabels([])\n ax3.spines['right'].set_visible(False)\n ax3.spines['top'].set_visible(False)\n ax3.tick_params(right=False, top=False)\n", "old_path": "vivarium/plots/chemotaxis_flagella.py", "rewrite": "ReplaceText(target='ax3' @(70,4)->(70,7))"} -{"repo": "https://:@github.com/wtsi-hgi/gitlab-build-variables.git", "hash": "da55a3494cb0c375b5efb9f5248f0f3774d9c0c5", "diff": "@@ -63,7 +63,7 @@ class ProjectVariablesUpdater(VariablesUpdater):\n _logger.info(\"Set variables for \\\"%s\\\": %s\" % (self.project, variables))\n \n def update_required(self) -> bool:\n- return self._variables_manager.get_variables() == self._get_required_variables()\n+ return self._variables_manager.get_variables() != self._get_required_variables()\n \n def _get_required_variables(self) -> Dict[str, str]:\n \"\"\"\n", "old_path": "gitlabbuildvariables/updater.py", "rewrite": "ReplaceText(target='!=' @(66,55)->(66,57))"} -{"repo": "https://:@github.com/felfel/logging-py.git", "hash": "27cc7bab2404993e04a07ee8f676fb646bd0f640", "diff": "@@ -115,7 +115,7 @@ class LogEntryParser:\n Logger.data_property_placeholder_name: data # here we set the data property with a special key\n }\n \n- if log_entry.message is not \"\" or log_entry.message is not None:\n+ if log_entry.message is not \"\" and log_entry.message is not None:\n dto[\"message\"] = log_entry.message\n \n if exception_info is not None:\n", "old_path": "loggingpy/log.py", "rewrite": "ReplaceText(target='and' @(118,39)->(118,41))"} -{"repo": "https://:@github.com/urban48/debpackager.git", "hash": "fa24b2f2eb79059ec65edb8fc32eb1aaa46e689c", "diff": "@@ -94,7 +94,7 @@ class GeneralPackage(object):\n install_path=deb.get('install_path'),\n dependencies=deb_dependencies,\n description=deb.get('description'),\n- excludes=project.get('excludes', []))\n+ excludes=deb.get('excludes', []))\n \n generated_builds.append(dpm.generate())\n return generated_builds\n", "old_path": "debpackager/packages/general_package.py", "rewrite": "ReplaceText(target='deb' @(97,31)->(97,38))"} -{"repo": "https://:@github.com/noobermin/lspreader.git", "hash": "4ab4049cfe95c5927f01406bd6a4653335752904", "diff": "@@ -88,7 +88,7 @@ if __name__ == \"__main__\":\n else:\n angleopt = None;\n KE, good = totalKE(d, ecut, angleopt, return_bools=True);\n- LE = laserE(E_0, w, T, dim=dim);\n+ LE = laserE(E_0, T, w, dim=dim);\n totalq = d['q'][good].sum()*1e12;\n print('total charge: {} {}'.format(totalq,'pC/cm' if opts['--2D'] else 'pC'));\n print(\"total energy: {} J\".format(KE));\n", "old_path": "pext/quantities.py", "rewrite": "ArgSwap(idxs=1<->2 @(91,9)->(91,15))"} -{"repo": "https://:@github.com/andycasey/sick.git", "hash": "580f4072957817f483ed79de3f6b5208a07cfc42", "diff": "@@ -516,7 +516,7 @@ def load_aaomega_multispec(filename, fill_value=-1, clean=True):\n for i, index in enumerate(program_indices):\n \n headers = base_headers.copy()\n- headers['FIBRE_NUM'] = i + 1\n+ headers['FIBRE_NUM'] = index + 1\n \n for header in req_fibre_headers:\n headers[header] = image[2].data[index][header]\n", "old_path": "scope/specutils.py", "rewrite": "ReplaceText(target='index' @(519,31)->(519,32))"} -{"repo": "https://:@github.com/gilsondev/django-faleconosco.git", "hash": "eb394ea946b658ffe4706620e12a0992e847ae4c", "diff": "@@ -26,7 +26,7 @@ def form(request, template_name='contato/contato_form.html',\n mensagem.update(dict)\n \n # Enviando o email\n- enviar_email(email, settings.DEFAULT_FROM_EMAIL, nome,\n+ enviar_email(settings.DEFAULT_FROM_EMAIL, email, nome,\n assunto, template_email, mensagem)\n \n # Mostra mensagem de sucesso\n", "old_path": "contato/views.py", "rewrite": "ArgSwap(idxs=0<->1 @(29,8)->(29,20))"} -{"repo": "https://:@github.com/lijinbio/cmsip.git", "hash": "a9ac427f65d7fe2dd116b01d2506261686700231", "diff": "@@ -115,7 +115,7 @@ def bsmap(config):\n def mcall_stat_parse(infile):\n \twith open(infile) as f:\n \t\tdstr=f.read()\n-\treturn float(re.search('bisulfite conversion ratio = ([\\d.]+)', f).groups()[0])\n+\treturn float(re.search('bisulfite conversion ratio = ([\\d.]+)', dstr).groups()[0])\n \n def mcall_runcmd(infile, outdir, sampleid, reference, numthread, verbose=False):\n \tif os.path.exists(outdir):\n", "old_path": "cmsip/cmsip.py", "rewrite": "ReplaceText(target='dstr' @(118,65)->(118,66))"} -{"repo": "https://:@github.com/TwoRavens/raven-metadata-service.git", "hash": "dae36f1eab88f12cfb14d451124cc9d293f89ce0", "diff": "@@ -34,7 +34,7 @@ class PlotValuesUtil(object):\n \n # x-data for the ECDF: x_\n x_value = np.sort(data)\n- size_data = x_value.size\n+ size_data = raw_data.size\n # y-data for the ECDF: y\n y_value = []\n \n", "old_path": "preprocess/code/plot_values.py", "rewrite": "ReplaceText(target='raw_data' @(37,20)->(37,27))"} -{"repo": "https://:@github.com/TwoRavens/raven-metadata-service.git", "hash": "1c19733c86b514a93342126535de899aed40b40e", "diff": "@@ -137,7 +137,7 @@ class JobUtil(object):\n \n @staticmethod\n def retrieve_rows_csv(request, job, **kwargs):\n- if request.method != 'POST':\n+ if request.method == 'POST':\n print('kwargs', kwargs)\n start_row = kwargs.get('start_row')\n num_rows = kwargs.get('number_rows')\n", "old_path": "preprocess_web/code/ravens_metadata_apps/preprocess_jobs/job_util.py", "rewrite": "ReplaceText(target='==' @(140,26)->(140,28))"} -{"repo": "https://:@github.com/Clinical-Genomics/cgbeacon.git", "hash": "98f6705d3e6971111831cedfc4926e84880ec341", "diff": "@@ -74,7 +74,7 @@ def cli( dataset, vcf, db_connection, qual, ref, use_panel, outfile, customer, s\n vcfsamples = _compare_samples(vcfsamples, samples)\n \n ## returns a this tuple-> ( total_vars, beacon_vars(type: dict), discaded_vars(type: dict))\n- vcf_results = get_variants(vcf_obj, vcfsamples, raw_variants, qual)\n+ vcf_results = get_variants(vcf_obj, raw_variants , vcfsamples, qual)\n \n ## Print overall results of VCF file parsing to terminal\n vars_to_beacon = _print_results(vcf_results, qual)\n", "old_path": "cgbeacon/cli/root.py", "rewrite": "ArgSwap(idxs=1<->2 @(77,18)->(77,30))"} -{"repo": "https://:@github.com/Clinical-Genomics/cgbeacon.git", "hash": "98f6705d3e6971111831cedfc4926e84880ec341", "diff": "@@ -38,7 +38,7 @@ def beacon_upload(connection, vcf_path, panel_path, dataset, outfile=\"\", custome\n # returns a this tuple-> ( n_total_vars, beacon_vars(type: dict), discaded_vars(type: dict))\n ### beacon_vars is a disctionary with key --> sample, and value --> list of tuples containing the non-reference variants. Each tuple is defined as: (chr, start, alt_allele)\n ### discaded_vars is a dictionary with key --> sample and value --> number of discarded vars due to quality for that sample.\n- vcf_results = get_variants(panel_filtered_results[0], samples, raw_variants, qual)\n+ vcf_results = get_variants(panel_filtered_results[0], raw_variants, samples, qual)\n \n # Insert variants into the beacon. It returns a tuple: (vars_before_upload, vars_after_upload)\n beacon_update_result = bare_variants_uploader(connection, dataset, vcf_results, genome_reference)\n", "old_path": "cgbeacon/utils/Utility.py", "rewrite": "ArgSwap(idxs=1<->2 @(41,18)->(41,30))"} -{"repo": "https://:@github.com/magistral-io/MagistralPython.git", "hash": "29e567448385b02c287ffeb64593ca21d745b23b", "diff": "@@ -84,7 +84,7 @@ class JsonConverter(object):\n for ch in channels:\n permissions[int(ch)] = (read, write) \n else:\n- permissions[int(ch)] = (read, write)\n+ permissions[int(channels)] = (read, write)\n \n return permissions;\n \n", "old_path": "src/magistral/client/util/JsonConverter.py", "rewrite": "ReplaceText(target='channels' @(87,28)->(87,30))"} -{"repo": "https://:@github.com/ebachelet/pyLIMA.git", "hash": "1e18750dcdf80430af3b48a8225110bcbdc70447", "diff": "@@ -26,7 +26,7 @@ def microlensing_flux_priors(size_dataset, f_source, g_blending):\n \n \n def microlensing_parameters_limits_priors(parameters, limits):\n- for i in xrange(len(parameters)):\n+ for i in xrange(len(limits)):\n \n if (parameters[i] > limits[i][1]) | (parameters[i] < limits[i][0]):\n \n", "old_path": "pyLIMA/microlpriors.py", "rewrite": "ReplaceText(target='limits' @(29,24)->(29,34))"} -{"repo": "https://:@github.com/ebachelet/pyLIMA.git", "hash": "7b358f94c59afc973bce950f1a0051fe74693e80", "diff": "@@ -178,7 +178,7 @@ def sort_2lenses_wide_caustics(caustic_points, critical_curves_points):\n first_branch = positive_y_branches[0]\n second_branch = positive_y_branches[1]\n \n- if np.max((caustic_points[:, first_branch]).real) > np.max((caustic_points[:, second_branch]).real):\n+ if np.max((caustic_points[:, first_branch]).real) < np.max((caustic_points[:, second_branch]).real):\n \n central_caustic = np.r_[caustic_points[:, first_branch], np.conj(caustic_points[:, first_branch])[::-1]]\n central_cc = np.r_[critical_curves_points[:, first_branch],\n", "old_path": "pyLIMA/microlcaustics.py", "rewrite": "ReplaceText(target='<' @(181,58)->(181,59))"} -{"repo": "https://:@github.com/RedFantom/mtTkinter.git", "hash": "666f0351850ba1eed400e49ca33b2291cb6f3fb3", "diff": "@@ -141,7 +141,7 @@ class _TkAttr(object):\n if is_exception:\n ex_type, ex_value, ex_tb = response\n raise ex_type(ex_value, ex_tb)\n- return response_queue\n+ return response\n \n \n def _Tk__init__(self, *args, **kwargs):\n", "old_path": "mttkinter/mtTkinter.py", "rewrite": "ReplaceText(target='response' @(144,23)->(144,37))"} -{"repo": "https://:@github.com/wheeler-microfluidics/dmf-device-ui.git", "hash": "2443e29f710e516ebb3df7fc56db4f7e56f75893", "diff": "@@ -454,7 +454,7 @@ class DmfDeviceViewBase(SlaveView):\n # Find the closest corner point in the frame to the starting point.\n frame_corner_i = find_closest(slave.df_frame_corners, frame_point_i)\n # Find the closest corner point in the canvas to the end point.\n- canvas_corner_i = find_closest(slave.df_canvas_corners, end_xy)\n+ canvas_corner_i = find_closest(slave.df_canvas_corners, start_xy)\n \n # Save current state of corners to allow undo.\n corners_state = {'df_frame_corners':\n", "old_path": "dmf_device_ui/view.py", "rewrite": "ReplaceText(target='start_xy' @(457,64)->(457,70))"} -{"repo": "https://:@github.com/jisunglim/ethereum-etl.git", "hash": "f7e7e55441816e291d73a90c3aa19e287b881989", "diff": "@@ -247,7 +247,7 @@ while True:\n token_transfers = token_transfers_item_exporter.get_items('token_transfer')\n \n enriched_transactions = enrich_transactions(blocks, transactions, receipts)\n- if len(enriched_transactions) == len(transactions):\n+ if len(enriched_transactions) != len(transactions):\n raise ValueError('The number of transactions is wrong ' + str(enriched_transactions))\n enriched_logs = enrich_logs(blocks, logs)\n if len(enriched_logs) != len(logs):\n", "old_path": "stream.py", "rewrite": "ReplaceText(target='!=' @(250,38)->(250,40))"} -{"repo": "https://:@github.com/cpnota/autonomous-learning-library.git", "hash": "a0debf34fdff31c56e93b572edfe2b1578772c77", "diff": "@@ -18,7 +18,7 @@ class TestAccumulatingTraces(unittest.TestCase):\n self.basis = FourierBasis(space, 2, 2)\n self.approximation = DiscreteLinearApproximation(0.1, self.basis, actions=3)\n self.env = Env()\n- self.traces = AccumulatingTraces(self.env, self.approximation, 0.5)\n+ self.traces = AccumulatingTraces(self.approximation, self.env, 0.5)\n \n def test_init(self):\n np.testing.assert_equal(self.traces.call(x), np.array([0, 0, 0]))\n", "old_path": "all/approximation/traces/accumulating_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(21,18)->(21,36))"} -{"repo": "https://:@github.com/cpnota/autonomous-learning-library.git", "hash": "f6c89200ee016ac98c856254defdaf52cc8ba454", "diff": "@@ -18,7 +18,7 @@ class TestLinearFunctionApproximation(unittest.TestCase):\n approximation = LinearApproximation(0.1, basis)\n x = np.array([0.5, 1])\n self.assertEqual(approximation.call(x), 0)\n- approximation.update(x, 1)\n+ approximation.update(1, x)\n self.assertAlmostEqual(approximation.call(x), 0.6)\n \n if __name__ == '__main__':\n", "old_path": "all/approximation/state/linear_test.py", "rewrite": "ArgSwap(idxs=0<->1 @(21,4)->(21,24))"} -{"repo": "https://:@github.com/redhog/fcdjangoutils.git", "hash": "8302cf9148f8034930d5dca7f46392431a3ed866", "diff": "@@ -35,7 +35,7 @@ def duration_verbose(duration):\n \n if minutes != 0:\n if not first: res += \", \"\n- res += _(\"%d min\") % hours;\n+ res += _(\"%d min\") % minutes;\n first = False\n \n if seconds != 0:\n", "old_path": "templatetags/time_tags.py", "rewrite": "ReplaceText(target='minutes' @(38,29)->(38,34))"} -{"repo": "https://:@github.com/chairbender/fantasy-football-auction.git", "hash": "2f31b12d9fccae46e4ad6f389808f9b93046ad1b", "diff": "@@ -189,7 +189,7 @@ class Auction:\n \n if self.state != AuctionState.BID:\n raise InvalidActionError(\"Bid was attempted, but it is not currently time to submit bids.\")\n- elif self.bid > bid:\n+ elif self.bid >= bid:\n raise InvalidActionError(\"Bid amount \" + str(bid) + \" must be greater than current bid of \" + str(self.bid))\n elif not self.owners[owner_id].can_buy(self.nominee, bid):\n raise InvalidActionError(\"The owner with index \" + str(owner_id) +\n", "old_path": "fantasy_football_auction/auction.py", "rewrite": "ReplaceText(target='>=' @(192,22)->(192,23))"} -{"repo": "https://:@github.com/slazarov/python-signalr-client.git", "hash": "33f58244b15ab6056cb0a0ad4ad53b040aacb8e8", "diff": "@@ -40,7 +40,7 @@ class HubClient(object):\n if hub.lower() == self.name.lower():\n method = inner_data['M']\n message = inner_data['A']\n- await self.__handlers[method](message)\n+ await self.__handlers[method](inner_data)\n \n connection.received += handle\n \n", "old_path": "signalr_aio/hubs/_hub.py", "rewrite": "ReplaceText(target='inner_data' @(43,50)->(43,57))"} -{"repo": "https://:@github.com/slazarov/python-signalr-client.git", "hash": "afdb4f05445acdfa4b1c9dfbbfccf5fb990cd6b0", "diff": "@@ -40,7 +40,7 @@ class HubClient(object):\n if hub.lower() == self.name.lower():\n method = inner_data['M']\n message = inner_data['A']\n- await self.__handlers[method](inner_data)\n+ await self.__handlers[method](message)\n \n connection.received += handle\n \n", "old_path": "signalr_aio/hubs/_hub.py", "rewrite": "ReplaceText(target='message' @(43,50)->(43,60))"} -{"repo": "https://:@gitlab.com/nsbl/nsbl.git", "hash": "d853aa6323d0ba9f14cd25ae8f76b67b8376d422", "diff": "@@ -232,7 +232,7 @@ class NsblTasklist(Frklist):\n elif res_type == \"ansible-tasklist\":\n \n tasklists = res_urls\n- if isinstance(tasklist, string_types):\n+ if isinstance(tasklists, string_types):\n tasklists = [tasklists]\n \n for tl_name in tasklists:\n", "old_path": "src/nsbl/nsbl_tasklist.py", "rewrite": "ReplaceText(target='tasklists' @(235,34)->(235,42))"} -{"repo": "https://:@github.com/vishalsubbiah/darkchess.git", "hash": "399c8bde5e12f905a47ee06c6a4ec8297e57cf96", "diff": "@@ -14,7 +14,7 @@ class Board(object):\n \n def __init__(self, starting_board=None):\n self.board = np.empty((8,8),dtype=Piece)\n- if starting_board is not None:\n+ if starting_board is None:\n self._start_pos()\n else:\n self.board = starting_board\n", "old_path": "src/board.py", "rewrite": "ReplaceText(target=' is ' @(17,25)->(17,33))"} -{"repo": "https://:@github.com/dongkai1993/social-core.git", "hash": "d1d23e7e3cf4364c0d35289290b27787b84f5211", "diff": "@@ -50,7 +50,7 @@ def sanitize_redirect(host, redirect_to):\n \"\"\"\n # Quick sanity check.\n if not redirect_to or \\\n- not isinstance(redirect_to, six.string_types) and \\\n+ not isinstance(redirect_to, six.string_types) or \\\n getattr(redirect_to, 'decode', None) and \\\n not isinstance(redirect_to.decode(), six.string_types):\n return None\n", "old_path": "social/utils.py", "rewrite": "ReplaceText(target='or' @(53,53)->(53,56))"} -{"repo": "https://:@github.com/dongkai1993/social-core.git", "hash": "7d0628e7a756526b50449435eb02b2806e815755", "diff": "@@ -132,7 +132,7 @@ def partial_pipeline_data(strategy, user, *args, **kwargs):\n kwargs.setdefault('user', user)\n kwargs.setdefault('request', strategy.request)\n kwargs.update(xkwargs)\n- return idx, backend, xargs, xkwargs\n+ return idx, backend, xargs, kwargs\n \n \n def build_absolute_uri(host_url, path=None):\n", "old_path": "social/utils.py", "rewrite": "ReplaceText(target='kwargs' @(135,36)->(135,43))"} -{"repo": "https://:@github.com/dongkai1993/social-core.git", "hash": "d53529b57f0a4992889ad490e5314a2244155afa", "diff": "@@ -27,7 +27,7 @@ class SocialAuthExceptionMiddleware(object):\n return\n \n if isinstance(exception, SocialAuthBaseException):\n- backend_name = strategy.backend.name\n+ backend_name = request.backend.name\n message = self.get_message(request, exception)\n url = self.get_redirect_uri(request, exception)\n try:\n", "old_path": "social/apps/django_app/middleware.py", "rewrite": "ReplaceText(target='request' @(30,27)->(30,35))"} -{"repo": "https://:@github.com/barseghyanartur/django-dummy-thumbnails.git", "hash": "a97e0e6a75b3408484b736c541794e489b436f2a", "diff": "@@ -27,7 +27,7 @@ def get_setting(setting, override=None):\n if hasattr(settings, attr_name):\n value = getattr(settings, attr_name)\n else:\n- if hasattr(defaults, attr_name):\n+ if hasattr(defaults, setting):\n value = getattr(defaults, setting)\n else:\n return override\n", "old_path": "src/dummy_thumbnails/conf.py", "rewrite": "ReplaceText(target='setting' @(30,29)->(30,38))"} -{"repo": "https://:@github.com/phil1425/jupyter-pc.git", "hash": "d96265319699f32e575280623e0b67ec588214d6", "diff": "@@ -48,7 +48,7 @@ def fit(data_x, data_y, sigma_x=None, sigma_y=None, func=None, beta=[1., 0.], *a\n \n if type(data_x[0]) in ucvar:\n values_x = [d.n for d in data_x]\n- sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_y]\n+ sigma_x = [d.s if d.s!=0 else 1e-5 for d in data_x]\n elif type(data_x[0]) in [float, int]:\n values_x = data_x\n \n", "old_path": "jupyterpc/jupyterpc.py", "rewrite": "ReplaceText(target='data_x' @(51,52)->(51,58))"} -{"repo": "https://:@github.com/mrshu/python-imhdsk-api.git", "hash": "bbd3b584f1ed575ec2cb6493e4e99de22038b8bf", "diff": "@@ -93,6 +93,6 @@ def routes(start, dest, city='ba'):\n \n route.begin_time = route.drives[0].begin_time\n route.end_time = route.drives[-1].end_time\n- route.append(route)\n+ routes.append(route)\n \n return routes\n", "old_path": "imhdsk/__init__.py", "rewrite": "ReplaceText(target='routes' @(96,8)->(96,13))"} -{"repo": "https://:@github.com/juliusvonkohout/sparkmagic.git", "hash": "54804b9adb02f02e5fccca8c21bcfd390426098e", "diff": "@@ -50,7 +50,7 @@ class UserCommandParser(object):\n \n # When no magic, add run command\n if not first_line.startswith(\"%\"):\n- first_line = \"%{} {}\".format(UserCommandParser.run_command, code)\n+ first_line = \"%{} {}\".format(UserCommandParser.run_command, first_line)\n \n # Remove percentage sign\n first_line = first_line[1:]\n", "old_path": "remotespark/wrapperkernel/usercommandparser.py", "rewrite": "ReplaceText(target='first_line' @(53,72)->(53,76))"} -{"repo": "https://:@github.com/morinted/plover_layout_display.git", "hash": "8f071445dd2da69bfec2f5caf184627e713fd395", "diff": "@@ -58,7 +58,7 @@ class LayoutDisplayView(QGraphicsView):\n if key.label:\n label = QGraphicsTextItem(key.label)\n label.setFont(font)\n- label.setDefaultTextColor(QColor(steno_layout.font_color))\n+ label.setDefaultTextColor(QColor(key.font_color))\n \n label_rect = label.boundingRect()\n label_rect.moveCenter(path.boundingRect().center())\n", "old_path": "layout_display/layout_graphics.py", "rewrite": "ReplaceText(target='key' @(61,49)->(61,61))"} -{"repo": "https://:@github.com/JulienPeloton/s4cmb.git", "hash": "c4533367bf725c8486dc2140f841a8db649887f4", "diff": "@@ -445,7 +445,7 @@ class HealpixFitsMap():\n alm = hp.map2alm([self.I,self.Q,self.U], self.lmax)\n Elm=alm[1]\n Blm=alm[2]\n- lmax=hp.Alm.getlmax(alm.size)\n+ lmax=hp.Alm.getlmax(Elm.size)\n if 'P1' in self.derivatives_type:\n out = alm2map_spin_der1([Elm,Blm], self.nside_in, 2)\n self.dQdt =out[1][0]\n", "old_path": "s4cmb/input_sky.py", "rewrite": "ReplaceText(target='Elm' @(448,28)->(448,31))"} -{"repo": "https://:@github.com/tjstretchalot/pympanim.git", "hash": "ac45774fcbc0532095c17be74fdabe8186879ed6", "diff": "@@ -42,7 +42,7 @@ def find_child(ends_arr: typing.List[float],\n last = 0\r\n for i, etime in enumerate(ends_arr):\r\n if time < etime:\r\n- return i, etime - last\r\n+ return i, time - last\r\n last = etime\r\n if time == last:\r\n return len(ends_arr) - 1, 0\r\n", "old_path": "pympanim/utils.py", "rewrite": "ReplaceText(target='time' @(45,22)->(45,27))"} -{"repo": "https://:@github.com/j-walker23/cattrs.git", "hash": "416f032481f9eca1867a85a0efa989595d7e44bf", "diff": "@@ -347,7 +347,7 @@ class Converter(object):\n # Check the union registry first.\n handler = self._union_registry.get(union)\n if handler is not None:\n- return handler(union, obj)\n+ return handler(obj, union)\n \n # Unions with NoneType in them are basically optionals.\n union_params = union.__args__\n", "old_path": "cattr/converters.py", "rewrite": "ArgSwap(idxs=0<->1 @(350,19)->(350,26))"} -{"repo": "https://:@github.com/mitchnegus/pyleiades.git", "hash": "85a44d967870cd395675d594ea56f1d0a18748e5", "diff": "@@ -42,7 +42,7 @@ class EClass:\n data = load_dataset(dataset_date=data_date,dataset_type=stat_type)\n \n # Isolate this energy's data, separate frequencies, and format the data\n- self.E_data = self._isolate_energy(data,E_code)\n+ self.E_data = self._isolate_energy(E_code,data)\n self.monthly_data, self.yearly_data = self._sep_freqs(self.E_data)\n for data_df in self.monthly_data,self.yearly_data:\n data_df.set_index('Date_code',inplace=True)\n", "old_path": "main/eclass.py", "rewrite": "ArgSwap(idxs=0<->1 @(45,22)->(45,42))"} -{"repo": "https://:@github.com/vgalisson/pySankey.git", "hash": "44c01d55c6132a003adae938132f9f5bcc4e6b32", "diff": "@@ -158,7 +158,7 @@ def sankey(\n if len(rightLabels) == 0:\n rightLabels = pd.Series(dataFrame.right.unique()).unique()\n else:\n- check_data_matches_labels(leftLabels, dataFrame[\"right\"], \"right\")\n+ check_data_matches_labels(rightLabels, dataFrame[\"right\"], \"right\")\n # If no colorDict given, make one\n if colorDict is None:\n colorDict = {}\n", "old_path": "pysankey/sankey.py", "rewrite": "ReplaceText(target='rightLabels' @(161,34)->(161,44))"} -{"repo": "https://:@github.com/kshitij10496/lexico.git", "hash": "a47f45857e2c389833e3f4d3f151b44973520714", "diff": "@@ -52,7 +52,7 @@ def handle_word(word):\n else:\n word_object = fetch_word(word)\n click.echo_via_pager(word_object.stringify())\n- word_save_status = save_word(word)\n+ word_save_status = save_word(word_object)\n if word_save_status:\n click.echo('{} has been added to your personal dictionary.'.format(word))\n else:\n", "old_path": "familiarize/cli.py", "rewrite": "ReplaceText(target='word_object' @(55,37)->(55,41))"} -{"repo": "https://:@github.com/speedcell4/aku.git", "hash": "b96231d5ae8da4987bdf350ab8b8b4bbcf5f8059", "diff": "@@ -19,7 +19,7 @@ class Tp(object, metaclass=ABCMeta):\n origin = get_origin(tp)\n \n if origin is None and args == ():\n- return PrimitiveTp(origin)\n+ return PrimitiveTp(tp)\n if origin is list and len(args) == 1:\n return ListTp(origin, cls[args[0]])\n if origin is tuple:\n", "old_path": "aku/tp.py", "rewrite": "ReplaceText(target='tp' @(22,31)->(22,37))"} -{"repo": "https://:@github.com/rembish/cfb.git", "hash": "220ec866dbbae13cebbff3e5ba2da95cf433ef32", "diff": "@@ -76,7 +76,7 @@ class CfbIO(FileIO, MaybeDefected, ByteHelpers):\n sector_size = self.header.sector_size // 4\n sector = self.header.minifat_sector_start\n \n- while sector != ENDOFCHAIN and (current + 1) * sector_size <= current:\n+ while sector != ENDOFCHAIN and (position + 1) * sector_size <= current:\n sector = self.next_fat(sector)\n position += 1\n \n", "old_path": "cfb/__init__.py", "rewrite": "ReplaceText(target='position' @(79,40)->(79,47))"} -{"repo": "https://:@github.com/acgt-tax-consultants/orchard.git", "hash": "05d5b3ca4b5b6eaf6da380b8d5655b6f8d10342c", "diff": "@@ -58,7 +58,7 @@ def build(link_file_path, config_file_path, output):\n try:\n link_file = LinkFile(link_file_path)\n config_file = ConfigFile(config_file_path, True)\n- if validate(link_file_path, config_file_path):\n+ if not validate(link_file_path, config_file_path):\n click.secho('Invalid configuration file.', fg='red', err=True)\n click.get_current_context().exit(1)\n \n", "old_path": "orchard/cli.py", "rewrite": "ReplaceText(target='not ' @(61,11)->(61,11))"} -{"repo": "https://:@github.com/ostdotcom/ost-kyc-sdk-python.git", "hash": "c348eb67f5beb94e238746b6c52987c10eb53542", "diff": "@@ -54,7 +54,7 @@ class HTTPHelper:\n # \n def verify_required(self):\n if self.urlparse()(self.api_base_url).scheme == \"http\":\n- return True\n+ return False\n return True \n \n # \n", "old_path": "ost_kyc_sdk_python/util/http_helper.py", "rewrite": "ReplaceText(target='False' @(57,19)->(57,23))"} -{"repo": "https://:@github.com/IBM/yaps.git", "hash": "43d298bdbf36cb2f1dde75a4d85a4a3ee66aff7a", "diff": "@@ -516,7 +516,7 @@ class Slice(Expression):\n # is this an operator precedence issue?\n if self.lower:\n self.to_stan_prec(self.lower, acc, indent)\n- if self.lower and self.upper:\n+ if self.lower or self.upper:\n acc += self.mkString(\":\")\n if self.upper:\n self.to_stan_prec(self.upper, acc, indent)\n", "old_path": "yaps/ir.py", "rewrite": "ReplaceText(target='or' @(519,22)->(519,25))"} -{"repo": "https://:@github.com/larsyunker/PythoMS.git", "hash": "9d393ed6083fe08e3f58439c99cedd084571df2f", "diff": "@@ -552,7 +552,7 @@ def estimated_exact_mass(\n \"\"\"\n # narrow range to that of the isotope pattern\n l = bisect_left(x, simmin - lookwithin)\n- r = bisect_right(x, simmax - lookwithin)\n+ r = bisect_right(x, simmax + lookwithin)\n locmax = max(y[l:r]) # find local max in that range\n for ind, val in enumerate(y):\n if val == locmax: # if the y-value equals the local max\n", "old_path": "pythoms/tome.py", "rewrite": "ReplaceText(target='+' @(555,31)->(555,32))"} -{"repo": "https://:@github.com/kcl-tscm/mff.git", "hash": "0c7f60c26344c4a68f8e06b518e3ef7b0b11c834", "diff": "@@ -613,7 +613,7 @@ class Sampling(object):\n SMAE = np.std(np.sqrt(np.sum(np.square(error), axis=1)))\n RMSE = np.sqrt(np.mean((error) ** 2)) \n else:\n- m.fit_energy(train_confs, train_forces)\n+ m.fit_energy(train_confs, train_energy)\n y_hat = m.predict_energy(self.x)\n error = y_hat - self.y\n MAE = np.mean(np.abs(error))\n", "old_path": "mff/advanced_sampling.py", "rewrite": "ReplaceText(target='train_energy' @(616,38)->(616,50))"} -{"repo": "https://:@github.com/kcl-tscm/mff.git", "hash": "0dd4e341b2fb23bb8b39a267ccb32728c841650f", "diff": "@@ -39,7 +39,7 @@ def eam_descriptor(dist, norm, rc, alpha, r0):\n try:\n dqdrij = -1/(2*q) * (dq1*q2 + q1*dq2)\n except ZeroDivisionError:\n- dqdrij = np.zeros(len(q))\n+ dqdrij = np.zeros(len(q1))\n dqdr = -dqdrij[:, None]*norm\n return q, dqdr\n \n", "old_path": "mff/calculators.py", "rewrite": "ReplaceText(target='q1' @(42,30)->(42,31))"} -{"repo": "https://:@github.com/mlavin/django-hilbert.git", "hash": "f550bd0292f4d0e3a32a1da894d7f70711e5ad67", "diff": "@@ -38,7 +38,7 @@ class SSLRedirectMiddleware(object):\n urls = tuple([re.compile(url) for url in getattr(settings, 'SSL_PATTERNS', [])])\n secure = any([url.search(request.path) for url in urls])\n if request.is_secure():\n- if not secure and not getattr(request, 'keep_secure', False):\n+ if secure and not getattr(request, 'keep_secure', False):\n if getattr(settings, 'SSL_WHITELIST', False):\n # Redirect off SSL\n return _redirect(request, False)\n", "old_path": "hilbert/middleware.py", "rewrite": "ReplaceText(target='' @(41,15)->(41,19))"} -{"repo": "https://:@github.com/jbaiter/zotero-cli.git", "hash": "4e1f926aa016e5a081609e24b8498d94139949ad", "diff": "@@ -45,7 +45,7 @@ def find_storage_directories():\n if zotero_dir.exists():\n candidates.append(zotero_dir.iterdir())\n zotero5_dir = home_dir/\"Zotero/storage\"\n- if zotero_dir.exists():\n+ if zotero5_dir.exists():\n yield ('default', zotero5_dir)\n candidate_iter = itertools.chain.from_iterable(candidates)\n for fpath in candidate_iter:\n", "old_path": "zotero_cli/cli.py", "rewrite": "ReplaceText(target='zotero5_dir' @(48,7)->(48,17))"} -{"repo": "https://:@github.com/mjwen/kliff.git", "hash": "6d15ef5257545fe7c716db02cc80a34120e93a04", "diff": "@@ -129,7 +129,7 @@ def get_descriptor():\n desc_params['g5'] = [{'zeta': 1, 'lambda': -1, 'eta': 0.0001},\n {'zeta': 2, 'lambda': 1, 'eta': 0.003}]\n \n- desc = SymmetryFunction(cutfunc, cutvalue, desc_params)\n+ desc = SymmetryFunction(cutvalue, cutfunc, desc_params)\n \n return desc\n \n", "old_path": "tests/descriptors/test_symmetry_function.py", "rewrite": "ArgSwap(idxs=0<->1 @(132,11)->(132,27))"} -{"repo": "https://:@github.com/wheeler-microfluidics/mpm.git", "hash": "ce40cbc346ba0bbb0770d2ab71165d84b8c1ffaa", "diff": "@@ -441,7 +441,7 @@ def enable_plugin(plugin_name):\n logger.debug('Plugin already enabled: `%s` -> `%s`', plugin_path_i,\n plugin_link_path_i)\n enabled_now[plugin_path_i.name] = False\n- return enabled_now if not singleton else singleton.values()[0]\n+ return enabled_now if not singleton else enabled_now.values()[0]\n \n \n def disable_plugin(plugin_name):\n", "old_path": "mpm/api.py", "rewrite": "ReplaceText(target='enabled_now' @(444,45)->(444,54))"} -{"repo": "https://:@github.com/N2ITN/RPiViz.git", "hash": "61199407198a9d674f7836b25da74a6956a93917", "diff": "@@ -46,4 +46,4 @@ def crop2face(pic, predictor):\n clahe_crop = clahe_image[y1:y2, x1:x2]\n #LBP_img = LBP.main(clahe_crop)\n shape = predictor(clahe_crop, detections)\n- return shape, clahe_image\n+ return shape, clahe_crop\n", "old_path": "raspiviz/identify.py", "rewrite": "ReplaceText(target='clahe_crop' @(49,22)->(49,33))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "bf735aeb2594c55e777037d8680cde1c45926f6d", "diff": "@@ -279,7 +279,7 @@ class table:\n if (alt_row_name is None): continue\n if (alt_row_name == path):\n result.extend(row_objects)\n- elif (not path.startswith(alt_row_name+\".\")):\n+ elif (path.startswith(alt_row_name+\".\")):\n for row_object in row_objects:\n result.extend(row_object.get(path=path[len(alt_row_name)+1:]))\n return result\n", "old_path": "iotbx/iotbx/parameters/__init__.py", "rewrite": "ReplaceText(target='' @(282,14)->(282,18))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "d2b0c38feb91a6d3ca5d23614cc7d67daff71bd6", "diff": "@@ -25,7 +25,7 @@ cns_dna_rna_residue_names = {\n }\n \n mon_lib_dna_rna_cif = [\"AD\", \"AR\", \"CD\", \"CR\", \"GD\", \"GR\", \"TD\", \"UR\"]\n-if (\"set\" not in __builtins__):\n+if (\"set\" in __builtins__):\n mon_lib_dna_rna_cif = set(mon_lib_dna_rna_cif)\n \n rna_dna_reference_residue_names = {\n", "old_path": "iotbx/iotbx/pdb/__init__.py", "rewrite": "ReplaceText(target=' in ' @(28,9)->(28,17))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "bb89e67604a536127da9b373ddac969a43c21077", "diff": "@@ -568,7 +568,7 @@ def input(\n lines=None,\n pdb_id=None):\n if (pdb_id is not None):\n- assert file_name is not None\n+ assert file_name is None\n file_name = ent_path_local_mirror(pdb_id=pdb_id)\n if (file_name is not None):\n return ext.input(\n", "old_path": "iotbx/pdb/__init__.py", "rewrite": "ReplaceText(target=' is ' @(571,20)->(571,28))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "1f3ebf35ac25f18b43f5ce2454f898f4609e9e2e", "diff": "@@ -1218,7 +1218,7 @@ class _(boost.python.injector, pair_sym_table):\n if (pair_count == 0):\n print >> out, \" no neighbors\"\n pair_counts.append(pair_count)\n- return pair_count\n+ return pair_counts\n \n def number_of_pairs_involving_symmetry(self):\n result = 0\n", "old_path": "cctbx/crystal/__init__.py", "rewrite": "ReplaceText(target='pair_counts' @(1221,11)->(1221,21))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "5beb4735b28360b9f33f71020d3c1459330f4053", "diff": "@@ -50,7 +50,7 @@ class mod_hdf5(common_mode.common_mode_correction):\n \n # If no detector distance is available set it to NaN, since\n # Python's None is not permitted in HDF5\n- distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)\n+ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)\n if distance is None:\n distance = float('nan')\n \n", "old_path": "xfel/cxi/cspad_ana/mod_hdf5.py", "rewrite": "ArgSwap(idxs=0<->1 @(53,15)->(53,37))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "5beb4735b28360b9f33f71020d3c1459330f4053", "diff": "@@ -76,7 +76,7 @@ class mod_param(object):\n return\n \n # XXX This hardcodes the address for the front detector!\n- detz = cspad_tbx.env_detz(env, 'CxiDs1-0|Cspad-0')\n+ detz = cspad_tbx.env_detz('CxiDs1-0|Cspad-0', env)\n if (detz is None):\n self.m_no_detz += 1\n \n", "old_path": "xfel/cxi/cspad_ana/mod_param.py", "rewrite": "ArgSwap(idxs=0<->1 @(79,11)->(79,29))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "5beb4735b28360b9f33f71020d3c1459330f4053", "diff": "@@ -342,7 +342,7 @@ class mod_view(common_mode.common_mode_correction):\n # Get the distance for the detectors that should have it, and set\n # it to NaN for those that should not.\n if self.detector == 'CxiDs1' or self.detector == 'CxiDsd':\n- distance = cspad_tbx.env_distance(env, self.address, self._detz_offset)\n+ distance = cspad_tbx.env_distance(self.address, env, self._detz_offset)\n if distance is None:\n self.nfail += 1\n self.logger.warning(\"event(): no distance, shot skipped\")\n", "old_path": "xfel/cxi/cspad_ana/mod_view.py", "rewrite": "ArgSwap(idxs=0<->1 @(345,17)->(345,39))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "f60ef549166e775043ee96a9d55ea7946e6042af", "diff": "@@ -1212,7 +1212,7 @@ def get_matching_atoms(chains_info,a_id,b_id,res_num_a,res_num_b,\n a_altloc = chains_info[a_id].no_altloc.count(False) > 0\n b_altloc = bool(chains_info[b_id].no_altloc)\n if b_altloc:\n- b_altloc = chains_info[a_id].no_altloc.count(False) > 0\n+ b_altloc = chains_info[b_id].no_altloc.count(False) > 0\n test_altloc = a_altloc or b_altloc\n #\n res_num_a_updated = []\n", "old_path": "mmtbx/ncs/ncs_search.py", "rewrite": "ReplaceText(target='b_id' @(1215,27)->(1215,31))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "2621ef9d6d7a761b026f833837cf885945745986", "diff": "@@ -188,7 +188,7 @@ class torsion_ncs(object):\n # and in another - MSE. They will be excluded without\n # raising Sorry. They could matched, but it is difficult\n # to figure out in this code how to make it happen.\n- not (resname1 in [\"MET\", \"MSE\"] and resname1 in [\"MET\", \"MSE\"])):\n+ not (resname1 in [\"MET\", \"MSE\"] and resname2 in [\"MET\", \"MSE\"])):\n msg = \"Error in matching procedure: matching \"\n msg += \"'%s %s' and '%s %s'.\\n\" % (\n resname1, rg1.id_str(), resname2, rg2.id_str())\n", "old_path": "mmtbx/geometry_restraints/torsion_restraints/torsion_ncs.py", "rewrite": "ReplaceText(target='resname2' @(191,54)->(191,62))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "7b8295b84a75a33064f917be984d6017d53a3494", "diff": "@@ -795,7 +795,7 @@ class ResidualsPlotter(object):\n reflections['xyzcal.px'] = reflections['xyzcal.px.%s'%dest]\n \n if 'xyzobs.mm.value' not in reflections:\n- reflections.centroid_px_to_mm(detector)\n+ reflections.centroid_px_to_mm(experiments)\n reflections['difference_vector_norms'] = (reflections['xyzcal.mm']-reflections['xyzobs.mm.value']).norms()\n \n n = len(reflections)\n", "old_path": "xfel/command_line/detector_residuals.py", "rewrite": "ReplaceText(target='experiments' @(798,36)->(798,44))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "b2783566840ae3392e09171bcb4141e46e6481e5", "diff": "@@ -115,7 +115,7 @@ class reader(iotbx_shelx_ext.hklf_reader):\n miller_set = miller.set(\n crystal_symmetry=crystal_symmetry,\n indices=self.indices(), anomalous_flag=anomalous)\n- if anomalous is not None:\n+ if anomalous is None:\n miller_set = miller_set.auto_anomalous()\n miller_arrays = []\n obs = (miller.array(\n", "old_path": "iotbx/shelx/hklf.py", "rewrite": "ReplaceText(target=' is ' @(118,16)->(118,24))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "0a50a4f43be57400f7aed41055b7ae401954724d", "diff": "@@ -189,7 +189,7 @@ def exercise():\n pdb_inp1 = iotbx.pdb.input(source_info=None, lines=test_pdb)\n pdb_inp2 = iotbx.pdb.input(source_info=None, lines=test_cif)\n model1 = mmtbx.model.manager(pdb_inp1)\n- model2 = mmtbx.model.manager(pdb_inp1)\n+ model2 = mmtbx.model.manager(pdb_inp2)\n trans_obj1 = iotbx.ncs.input(hierarchy=model1.get_hierarchy())\n trans_obj2 = iotbx.ncs.input(hierarchy=model2.get_hierarchy())\n \n", "old_path": "iotbx/pdb/tst_read_mtrix_records_from_cif.py", "rewrite": "ReplaceText(target='pdb_inp2' @(192,31)->(192,39))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "46af355112348574b808a6b026a7f3cafdc8c745", "diff": "@@ -965,7 +965,7 @@ class manager(object):\n atoms = atoms.select(~ias_selection)\n grm_geometry = self.get_restraints_manager().geometry\n grm_geometry.pair_proxies(sites_cart)\n- struct_conn_loop = grm_geometry.get_struct_conn_mmcif(atoms)\n+ struct_conn_loop = grm_geometry.get_struct_conn_mmcif(hierarchy_to_output)\n cif_block.add_loop(struct_conn_loop)\n self.get_model_statistics_info()\n # outputting HELIX/SHEET records\n", "old_path": "mmtbx/model/model.py", "rewrite": "ReplaceText(target='hierarchy_to_output' @(968,60)->(968,65))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "fb3e93f9dc70a7d6027cdf4fcf906f78ad39ccf6", "diff": "@@ -244,7 +244,7 @@ def run(args, log=None, ccp4_map=None,\n mtz_dataset.add_miller_array(\n miller_array = f_obs.generate_r_free_flags(),\n column_root_label = \"R-free-flags\")\n- if not nohl and params.k_blur is not None and params.b_blur is None:\n+ if not nohl and params.k_blur is not None and params.b_blur is not None:\n # convert phases into HL coefficeints\n broadcast(m=\"Convert phases into HL coefficients:\", log=log)\n hl = get_hl(f_obs_cmpl=f_obs_cmpl, k_blur=params.k_blur, b_blur=params.b_blur)\n", "old_path": "mmtbx/command_line/map_to_structure_factors.py", "rewrite": "ReplaceText(target=' is not ' @(247,61)->(247,65))"} -{"repo": "https://:@github.com/cctbx/cctbx_project.git", "hash": "534896eb6cac83fd73eec3cbc32a391e77ecdedc", "diff": "@@ -512,7 +512,7 @@ def select_crystal_symmetry(\n if cs and not cs.is_nonsense() and not cs.is_empty():\n is_similar_cs = cs0.is_similar_symmetry(cs,\n absolute_angle_tolerance=absolute_angle_tolerance,\n- absolute_length_tolerance=absolute_angle_tolerance)\n+ absolute_length_tolerance=absolute_length_tolerance)\n if(not is_similar_cs):\n msg = \"Crystal symmetry mismatch between different files.\\n\"\n msg += \"%s %s\\n\" % (cs0.unit_cell(), cs0.space_group_info())\n", "old_path": "cctbx/crystal/__init__.py", "rewrite": "ReplaceText(target='absolute_length_tolerance' @(515,37)->(515,61))"} -{"repo": "https://:@github.com/youngershen/django-super-cache.git", "hash": "89da4b6ee32fe55c483b3919f6f1ee307da37f7a", "diff": "@@ -29,7 +29,7 @@ class FileBackend(BaseBackend):\n cache_file = self.cache_dir + key\n \n with open(cache_file, 'w') as f:\n- f.write(cache_file)\n+ f.write(content)\n f.flush()\n \n def get(self, key):\n", "old_path": "django_super_cache/backends.py", "rewrite": "ReplaceText(target='content' @(32,20)->(32,30))"} -{"repo": "https://:@github.com/T-Eberle/tgbot.git", "hash": "26a4dbd36902a1554c22f52f13f335a2b9e9bbe4", "diff": "@@ -59,4 +59,4 @@ def singleradiocommand(wrapped):\n logger.exception(typo)\n MessageController.hide_keyboard(message, message.chat_id(), \"Witzbold.\")\n deleteconv(message)\n- return wrapped\n+ return _wrapped\n", "old_path": "telegram/bot/decorators/singleradiocommand.py", "rewrite": "ReplaceText(target='_wrapped' @(62,15)->(62,22))"} -{"repo": "https://:@github.com/Azure-Developments/ezzybot.git", "hash": "0ebe7d860712b23bde58ba10bf4933277fa1db9b", "diff": "@@ -305,7 +305,7 @@ class ezzybot(Socket):\n if regex._thread:\n regex_thread = threading.Thread(target=self.run_trigger, args=(regex, wrappers.connection_wrapper(self), self.info))\n regex_thread.daemon = True\n- plugin_thread.start()\n+ regex_thread.start()\n else:\n self.run_trigger(regex, wrappers.connection_wrapper(self), self.info)\n if self.nick not in self.db['users'].keys():\n", "old_path": "ezzybot/bot.py", "rewrite": "ReplaceText(target='regex_thread' @(308,32)->(308,45))"} -{"repo": "https://:@bitbucket.org/shiumachi/sphinxcontrib-recentpages.git", "hash": "22c35dbac880b95d121bedb3b9e255c5ce67e654", "diff": "@@ -83,7 +83,7 @@ def get_file_list_ordered_by_mtime(target_dir, env):\n for docname in env.found_docs:\n abspath = env.doc2path(docname)\n mtime = os.path.getmtime(abspath)\n- res.append((abspath,mtime))\n+ res.append((docname,mtime))\n \n res = list(set(res))\n res.sort(cmp=lambda x,y: cmp(x[1], y[1]), reverse=True)\n", "old_path": "sphinx.recentpages/recentpages.py", "rewrite": "ReplaceText(target='docname' @(86,20)->(86,27))"} -{"repo": "https://:@github.com/frkhit/bl_wxpy.git", "hash": "e2e191f226e74c9ea3547b94a5f4cf4bef2120dc", "diff": "@@ -85,7 +85,7 @@ class SentMessage(object):\n \"\"\"\n from wxpy import Group\n \n- if isinstance(Group, self.receiver):\n+ if isinstance(self.receiver, Group):\n return self.receiver.self\n \n @property\n", "old_path": "wxpy/api/messages/sent_message.py", "rewrite": "ArgSwap(idxs=0<->1 @(88,11)->(88,21))"} -{"repo": "https://:@github.com/frkhit/bl_wxpy.git", "hash": "c782a43af904ea346f4482f2e9e6617bece06166", "diff": "@@ -148,7 +148,7 @@ class Chat(object):\n :param friend_or_mp: \u597d\u53cb\u5bf9\u8c61\u6216\u516c\u4f17\u53f7\u5bf9\u8c61\n \"\"\"\n \n- card_name = friend_or_mp.nickname if isinstance(Chat, friend_or_mp) else friend_or_mp\n+ card_name = friend_or_mp.nickname if isinstance(friend_or_mp, Chat) else friend_or_mp\n logger.info('sending {} to {}: {}'.format(CARD, self, card_name))\n \n return self.core.send(\n", "old_path": "wxpy/api/chats/chat.py", "rewrite": "ArgSwap(idxs=0<->1 @(151,45)->(151,55))"} -{"repo": "https://:@github.com/kmarilleau/pytest-django-models.git", "hash": "31fa2011c76bd1581d24bef19f422cebf644b03d", "diff": "@@ -237,7 +237,7 @@ class ModelGenerator:\n # Ignore Special Methods.\n or is_dunder(attr)\n # Ignore Functions.\n- or inspect.isfunction(attr)\n+ or inspect.isfunction(value)\n # Ignore Django Model Attributes.\n or attr in (\"objects\", \"id\", \"_meta\")\n # Ignore Fields.\n", "old_path": "pytest_django_model/objects.py", "rewrite": "ReplaceText(target='value' @(240,34)->(240,38))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "d751a0614598bf05b9bbfd15eb0d05e26e562649", "diff": "@@ -151,7 +151,7 @@ class BatchNormalization(function.Function):\n \n def check_type_backward(self, in_types, out_types):\n type_check.expect(out_types.size() == 1)\n- x_type, = out_types\n+ x_type, = in_types\n y_type, = out_types\n \n type_check.expect(\n", "old_path": "chainer/functions/batch_normalization.py", "rewrite": "ReplaceText(target='in_types' @(154,18)->(154,27))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "447e1e6aaf5590b7bdce63afb826a754d03274d8", "diff": "@@ -208,7 +208,7 @@ class Optimizer(object):\n with cuda.get_device(g_dst):\n if (isinstance(g_src, cuda.ndarray) and\n g_dst.gpudata.device != g_src.gpudata.device):\n- g_dst += cuda.copy(g_src, out_device=g_src.gpudata.device)\n+ g_dst += cuda.copy(g_src, out_device=g_dst.gpudata.device)\n else:\n g_dst += cuda.to_gpu(g_src)\n \n", "old_path": "chainer/optimizer.py", "rewrite": "ReplaceText(target='g_dst' @(211,57)->(211,62))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "2cd7ddd29647184e00e79a551c37d6e975141e83", "diff": "@@ -10,7 +10,7 @@ class Contrastive(function.Function):\n \"\"\"Contrastive loss function.\"\"\"\n \n def __init__(self, margin):\n- if margin < 0:\n+ if margin <= 0:\n raise Exception(\"margin should be positive value.\")\n self.margin = margin\n \n", "old_path": "chainer/functions/loss/contrastive.py", "rewrite": "ReplaceText(target='<=' @(13,18)->(13,19))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "1f29bf157ef8289a6a16cfc19ea8737473623a7e", "diff": "@@ -32,7 +32,7 @@ def array_split(ary, indices_or_sections, axis=0):\n for index in indices:\n ret.append(ary[skip + (slice(i, index),)])\n i = index\n- ret.append(ary[skip + (slice(index, size),)])\n+ ret.append(ary[skip + (slice(i, size),)])\n \n return ret\n \n", "old_path": "cupy/manipulation/split.py", "rewrite": "ReplaceText(target='i' @(35,33)->(35,38))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "74b521b9ec3a8b0ceda86041d9e9f78ffdd8d5a1", "diff": "@@ -123,7 +123,7 @@ def hstack(tup):\n axis = 1\n if arrs[0].ndim == 1:\n axis = 0\n- return concatenate(tup, axis)\n+ return concatenate(arrs, axis)\n \n \n def vstack(tup):\n", "old_path": "cupy/manipulation/join.py", "rewrite": "ReplaceText(target='arrs' @(126,23)->(126,26))"} -{"repo": "https://:@github.com/fixstars/clpy.git", "hash": "4faf0402e83dcb3e2486fff862142f92f61cf75f", "diff": "@@ -54,7 +54,7 @@ def exec_ultima(source, _clpy_header=''):\n proc.kill()\n source, errstream = proc.communicate()\n \n- if proc.returncode != 0 and len(errstream) > 0:\n+ if proc.returncode != 0 or len(errstream) > 0:\n raise clpy.backend.ultima.exceptions.UltimaRuntimeError(\n proc.returncode, errstream)\n \n", "old_path": "tests/clpy_tests/opencl_tests/ultima_tests/utility.py", "rewrite": "ReplaceText(target='or' @(57,32)->(57,35))"} -{"repo": "https://:@github.com/ashleysommer/sanic-oauthlib.git", "hash": "ae9f946b2b2739bb352961c200b2e4eeaba67044", "diff": "@@ -323,7 +323,7 @@ class OAuthRemoteApp(object):\n if attr:\n return attr\n if default is not False and not self.app_key:\n- return attr\n+ return default\n app = self.oauth.app or current_app\n config = app.config[self.app_key]\n if default is not False:\n", "old_path": "flask_oauthlib/client.py", "rewrite": "ReplaceText(target='default' @(326,19)->(326,23))"} -{"repo": "https://:@github.com/arangb/isbnlib-dnb.git", "hash": "929ff7c071c452c316769df0d236af29f92d5cbf", "diff": "@@ -51,7 +51,7 @@ def parser_dnb(data):\n #
\n elif re.search(r\"Titel(.*)/.*', '').replace('', '').replace('Zeitliche Einordnung\n", "old_path": "isbnlib_dnb/_dnb.py", "rewrite": "ReplaceText(target='title' @(54,16)->(54,25))"} -{"repo": "https://:@github.com/parantapa/xactor.git", "hash": "c4e136ac827da189b19fe8f9be1e54f426dba777", "diff": "@@ -133,7 +133,7 @@ class MPIRankActor:\n while not self.stopping:\n actor_id, message = self.acomm.recv()\n if actor_id not in self.local_actors:\n- raise RuntimeError(\"Message received for non-local actor: %r\" % message)\n+ raise RuntimeError(\"Message received for non-local actor: %r\" % actor_id)\n \n actor = self.local_actors[actor_id]\n try:\n", "old_path": "xactor/mpi_actor.py", "rewrite": "ReplaceText(target='actor_id' @(136,80)->(136,87))"} -{"repo": "https://:@github.com/openlmi/openlmi-scripts.git", "hash": "da316f00c9b29f4bc58fc5bc38274551e0f3aea3", "diff": "@@ -510,7 +510,7 @@ def set_autoconnect(ns, setting, device=None, state=True):\n # Set IsNext = 2 (Is Not Next), don't change IsCurrent\n mode = service.ApplySettingToIPNetworkConnection.ModeValues.Mode5\n \n- if device is not None:\n+ if device is None:\n result = service.SyncApplySettingToIPNetworkConnection(SettingData=setting, Mode=mode)\n else:\n result = service.SyncApplySettingToIPNetworkConnection(SettingData=setting, IPNetworkConnection=device, Mode=mode)\n", "old_path": "commands/networking/lmi/scripts/networking/__init__.py", "rewrite": "ReplaceText(target=' is ' @(513,13)->(513,21))"} -{"repo": "https://:@github.com/socek/hatak.git", "hash": "68f03e13ae99fd2769e5bfeb5cd49bcea218d9f4", "diff": "@@ -62,7 +62,7 @@ class ControllerFixture(RequestFixture):\n request.registry['controller_plugins'] = app.controller_plugins\n controller = self._get_controller_class()(root_tree, request)\n controller.data = data\n- controller.matchdict = matchdict\n+ request.matchdict = matchdict\n return controller\n \n \n", "old_path": "src/hatak/testing.py", "rewrite": "ReplaceText(target='request' @(65,8)->(65,18))"} -{"repo": "https://:@github.com/DaniFdezAlvarez/shexerp3.git", "hash": "913462770932107c1230a56677029e7cccd5957a", "diff": "@@ -125,7 +125,7 @@ def get_instance_tracker(instances_file_input=None, graph_file_input=None,\n selectors_tracker = ShapeMapInstanceTracker(shape_map=valid_shape_map)\n if _are_there_some_target_classes(target_classes, file_target_classes, all_classes_mode, shape_qualifiers_mode):\n model_classes = None\n- if all_classes_mode or target_classes is not None:\n+ if file_target_classes or target_classes is not None:\n list_of_str_target_classes = tune_target_classes_if_needed(\n target_classes) if target_classes is not None else read_target_classes_from_file(file_target_classes)\n model_classes = get_list_of_model_classes(list_of_str_target_classes)\n", "old_path": "shexer/utils/factories/instance_tracker_factory.py", "rewrite": "ReplaceText(target='file_target_classes' @(128,11)->(128,27))"} -{"repo": "https://:@github.com/remykarem/mixed-naive-bayes.git", "hash": "669a9c2aacc6c3a75e0dc54ce06db57e1db7b672", "diff": "@@ -429,7 +429,7 @@ def _validate_training_data(X_raw, y_raw, categorical_features, max_categories):\n if not np.array_equal(X[:, feature_no], X[:, feature_no].astype(int)):\n warnings.warn(f\"Feature no. {feature_no} is continuous data. \" +\n \"Casting data to integer.\")\n- if max_categories is not None:\n+ if max_categories is None:\n uniques = np.unique(X[:, feature_no]).astype(int)\n if not np.array_equal(uniques, np.arange(0, np.max(uniques)+1)):\n raise ValueError(f\"Expected feature no. {feature_no} to have \" +\n", "old_path": "mixed_naive_bayes/mixed_naive_bayes.py", "rewrite": "ReplaceText(target=' is ' @(432,29)->(432,37))"} -{"repo": "https://:@github.com/remykarem/mixed-naive-bayes.git", "hash": "e5f53782e0edba232d4468a267274524c08ec180", "diff": "@@ -153,7 +153,7 @@ class MixedNB():\n if len(self.priors) != num_classes:\n raise ValueError(\n 'Number of priors must match number of classes.')\n- if np.isclose(self.priors.sum(), 1.0):\n+ if not np.isclose(self.priors.sum(), 1.0):\n raise ValueError(\"The sum of priors should be 1.\")\n if (self.priors < 0).any():\n raise ValueError('Priors must be non-negative.')\n", "old_path": "mixed_naive_bayes/mixed_naive_bayes.py", "rewrite": "ReplaceText(target='not ' @(156,15)->(156,15))"} -{"repo": "https://:@github.com/hprid/adblockeval.git", "hash": "89311b75f3460835e764947dd794f62e7a95d031", "diff": "@@ -167,7 +167,7 @@ class Rule:\n self.is_exception = False\n \n def match(self, url, netloc, domain, origin=None):\n- if self.options and not self.options.can_apply_rule(netloc, origin):\n+ if self.options and not self.options.can_apply_rule(domain, origin):\n return False\n return True\n \n", "old_path": "adblockeval/rules.py", "rewrite": "ReplaceText(target='domain' @(170,60)->(170,66))"} -{"repo": "https://:@github.com/mbkupfer/bls-datasets.git", "hash": "3ffd9be073ca6ed9591d1633c1b4ef15b6e32c24", "diff": "@@ -151,7 +151,7 @@ def get_data(year=CUR_YEAR, cut_by='national', area_focus=None,\n if filename == None:\n raise ValueError('\"{}\" is not a valid area focus\\n' \\\n 'valid options include:\\n{}' \\\n- .format(cut_by, ['metros', 'metros-divisions', 'non-metros']))\n+ .format(area_focus, ['metros', 'metros-divisions', 'non-metros']))\n else:\n filename = OES_FILENAMES.get(cut_by)\n \n", "old_path": "bls_datasets/oes.py", "rewrite": "ReplaceText(target='area_focus' @(154,24)->(154,30))"} -{"repo": "https://:@github.com/krrr/wstan.git", "hash": "52b8e527af3bbaeadc25c796a960bd46b573f63e", "diff": "@@ -24,7 +24,7 @@ def _get_digest(dat):\n def _on_pushToTunTaskDone(task):\n # suppress annoying \"CancelledError exception not retrieved\" error on Py3.5+\n try:\n- if not isinstance(task.exception(), CancelledError):\n+ if isinstance(task.exception(), CancelledError):\n logging.error(\"pushToTunTask exception: %s\" % type(task.exception()))\n except CancelledError: # doc says it will raise this if canceled, but...\n pass\n", "old_path": "wstan/relay.py", "rewrite": "ReplaceText(target='' @(27,11)->(27,15))"} -{"repo": "https://:@github.com/rmarkello/snfpy.git", "hash": "c777b0fb8b2ddb88f3a2ddd97b6d7bacc6e82055", "diff": "@@ -408,7 +408,7 @@ def group_predict(train, test, labels, *, K=20, mu=0.4, t=20):\n # generate affinity matrices for stacked train/test data sets\n affinities = []\n for (tr, te) in zip(train, test):\n- if len(tr.T) == len(te.T):\n+ if len(tr.T) != len(te.T):\n raise ValueError('Train and test data must have same number of '\n 'features for each data type. Make sure to '\n 'supply data types in the same order.')\n", "old_path": "snf/compute.py", "rewrite": "ReplaceText(target='!=' @(411,21)->(411,23))"} -{"repo": "https://:@github.com/PartnershipOnAI/safelife.git", "hash": "be6c06c82569bde428c986399d8fa3fe159deb26", "diff": "@@ -283,7 +283,7 @@ class SafeLifeLogger(BaseLogger):\n log_data['level_name'] = game.title\n log_data['length'] = length.tolist()\n log_data['reward'] = reward.tolist()\n- log_data['completed'] = reward.tolist()\n+ log_data['completed'] = completed.tolist()\n log_data['reward_possible'] = reward_possible.tolist()\n log_data['reward_needed'] = required_points.tolist()\n log_data['time'] = datetime.utcnow().isoformat()\n", "old_path": "safelife/safelife_logger.py", "rewrite": "ReplaceText(target='completed' @(286,32)->(286,38))"} -{"repo": "https://:@github.com/PartnershipOnAI/safelife.git", "hash": "5c9ddd2bb0d304bb159c5b452ce028e515c7c4cc", "diff": "@@ -745,7 +745,7 @@ def _summarize_run(logfile, wandb_run=None, artifact=None):\n \n \"\"\"))\n \n- if wandb_run is not None and bare_name == 'benchmark-data':\n+ if wandb_run is not None and file_name == 'benchmark-data':\n wandb_run.summary['success'] = np.average(success)\n wandb_run.summary['avg_length'] = np.average(length)\n wandb_run.summary['side_effects'] = np.average(side_effects)\n", "old_path": "safelife/safelife_logger.py", "rewrite": "ReplaceText(target='file_name' @(748,33)->(748,42))"} -{"repo": "https://:@github.com/rymurr/dremio_client.git", "hash": "3119593dbb6db992a34b7008130a16ff4717aa0d", "diff": "@@ -410,7 +410,7 @@ def delete_catalog(args, cid, path):\n warning, this process is destructive and permanent\n \"\"\"\n base_url, token, verify = get_base_url_token(args)\n- x = _delete_catalog(token, base_url, verify, cid, path)\n+ x = _delete_catalog(base_url, token, verify, cid, path)\n click.echo(json.dumps(x))\n \n \n", "old_path": "dremio_client/cli.py", "rewrite": "ArgSwap(idxs=0<->1 @(413,8)->(413,23))"} -{"repo": "https://:@github.com/kubostech/kubos-cli.git", "hash": "128e898be2aa04eb1e7b60203dd348122dc2c9b9", "diff": "@@ -83,7 +83,7 @@ def main():\n 'all dependencies, run:\\n yotta build all_tests\\n\\n',\n 'Build the current module.'\n )\n- add_yotta_command('link', 'link',\n+ add_kubos_command('link', 'link',\n 'Symlink a module to be used into another module.\\n\\n'+\n 'Use: \"yotta link\" in a module to link it globally, then use \"yotta '+\n 'link \" to link it into the module where you want to use '+\n", "old_path": "kubos/main.py", "rewrite": "ReplaceText(target='add_kubos_command' @(86,4)->(86,21))"} -{"repo": "https://:@github.com/bsdphk/PyReveng3.git", "hash": "cdd2a273a00c008999a6b38f75f6c33e029c3c7e", "diff": "@@ -489,7 +489,7 @@ class vector(data.Data):\n super().__init__(asp, adr, adr + 4)\n self.ws = asp.bu16(adr)\n self.dstadr = asp.bu16(adr + 2)\n- cx.disass(asp, self.dstadr)\n+ cx.disass(self.dstadr, asp)\n \n def render(self):\n return \"WP=0x%04x,IP=%s\" % (self.ws, self.aspace.adr(self.dstadr))\n", "old_path": "pyreveng/cpu/tms9900.py", "rewrite": "ArgSwap(idxs=0<->1 @(492,8)->(492,17))"} -{"repo": "https://:@github.com/ehickox2012/bitraider.git", "hash": "0499f84ed9c06dfc72ef604cffe0dd5105c34a13", "diff": "@@ -67,7 +67,7 @@ class strategy(object):\n print(\"Times sold: \"+str(self.exchange.times_sold))\n print(\"The Market's performance: \"+str(market_performance)+\" %\")\n print(\"Strategy's performance: \"+str(strategy_performance)+\" %\")\n- print(\"Account's ending value if no trades were made: \"+str(start_amt)+\" BTC\")\n+ print(\"Account's ending value if no trades were made: \"+str(end_amt_no_trades)+\" BTC\")\n print(\"Account's ending value with this strategy: \"+str(end_amt)+\" BTC\")\n strategy_performance_vs_market = strategy_performance - market_performance\n if strategy_performance > market_performance:\n", "old_path": "bitraider/strategy.py", "rewrite": "ReplaceText(target='end_amt_no_trades' @(70,68)->(70,77))"} -{"repo": "https://:@github.com/Yatoom/Optimus.git", "hash": "f33e600b5e873e08cedb864d1c4fb3ecf07e9d93", "diff": "@@ -98,7 +98,7 @@ def decode_params(params, prefix=\"!\", remove_prefixes=True):\n # Make a copy\n params_copy = copy(params)\n \n- for key in params_copy:\n+ for key in params:\n \n # Check if key starts with prefix\n if key[0:len(prefix)] == prefix:\n", "old_path": "vault/decoder.py", "rewrite": "ReplaceText(target='params' @(101,15)->(101,26))"} -{"repo": "https://:@github.com/Yatoom/Optimus.git", "hash": "6c1faf98462d128189e4e52dfe50d585311dec12", "diff": "@@ -113,7 +113,7 @@ class Benchmark:\n for i in range(0, len(results[\"best_score\"])):\n iteration = {\n \"task\": self.task_id,\n- \"method\": \"{} (EI: {}, RT: {})\".format(method.name, time_regressor, score_regressor),\n+ \"method\": \"{} (EI: {}, RT: {})\".format(method.name, score_regressor, time_regressor),\n \"iteration\": i,\n \"score\": results[\"mean_test_score\"][i],\n \"best_score\": results[\"best_score\"][i],\n", "old_path": "benchmarks/benchmark.py", "rewrite": "ArgSwap(idxs=1<->2 @(116,26)->(116,54))"} -{"repo": "https://:@github.com/nicholasturner1/Synaptor.git", "hash": "661e148c09be514e874af3c5a2f2c2a6a401b1ba", "diff": "@@ -23,7 +23,7 @@ def main(psd_cvname, cc_cvname, proc_dir_path,\n \n \n #Processing\n- dil_ccs = s.dilated_components(psd_output, cc_thresh, dil_param)\n+ dil_ccs = s.dilated_components(psd_output, dil_param, cc_thresh) \n \n continuations = s.extract_continuations(dil_ccs)\n cont_ids = set(cont.segid for cont in continuations)\n", "old_path": "tasks/chunk_ccs.py", "rewrite": "ArgSwap(idxs=1<->2 @(26,14)->(26,34))"} -{"repo": "https://:@github.com/nicholasturner1/Synaptor.git", "hash": "8f529876b19ee670791f5860b9808f7ce12f2528", "diff": "@@ -31,7 +31,7 @@ def read_network(proc_dir_path):\n local_model = io.pull_file(model_fname)\n local_chkpt = io.pull_file(chkpt_fname)\n \n- model = imp.load_source(\"Model\",model_fname).InstantiatedModel\n+ model = imp.load_source(\"Model\",local_model).InstantiatedModel\n model.load_state_dict(torch.load(local_chkpt))\n \n return model\n", "old_path": "synaptor/edges/io.py", "rewrite": "ReplaceText(target='local_model' @(34,36)->(34,47))"} -{"repo": "https://:@github.com/metrasynth/radiant-voices.git", "hash": "b472a30772349e0f274629a4a516ded96cd80567", "diff": "@@ -121,4 +121,4 @@ class Module(object, metaclass=ModuleMeta):\n def load_options(self, chunk):\n for i, name in enumerate(self.options.keys()):\n value = chunk.chdt[i]\n- setattr(self, name, i)\n+ setattr(self, name, value)\n", "old_path": "rv/modules/module.py", "rewrite": "ReplaceText(target='value' @(124,32)->(124,33))"} -{"repo": "https://:@github.com/Lursun/p2p_grpc_blockchain_package.git", "hash": "964fada4f1d9b0c065c327d9f190c5310f9d8f37", "diff": "@@ -82,6 +82,6 @@ class Transaction():\n print (\"=> unixtime:%s\\tbody:%s\" % (pb2tx.unixtime,pb2tx.body))\n tx=Transaction()\n tx.pb2=pb2tx\n- Transaction.Transactions[tx.pb2.txhash]=pb2tx\n+ Transaction.Transactions[tx.pb2.txhash]=tx\n \n threading.Thread(target=Transaction.sync).start()\n\\ No newline at end of file\n", "old_path": "p2p_grpc_blockchain/transaction/transaction.py", "rewrite": "ReplaceText(target='tx' @(85,48)->(85,53))"} -{"repo": "https://:@github.com/wbsoft/livelex.git", "hash": "928383697438c2c14ec530eeec25eb00422ff70f", "diff": "@@ -899,7 +899,7 @@ class TreeDocumentMixin:\n def contents_changed(self, start, removed, added):\n \"\"\"Called after modification of the text, retokenizes the modified part.\"\"\"\n if self._tree.lexicon:\n- start, end = self._builder().rebuild(self._tree, self.text(), start, added, removed)\n+ start, end = self._builder().rebuild(self._tree, self.text(), start, removed, added)\n else:\n end = start + added\n self.set_modified_range(start, end)\n", "old_path": "livelex/tree.py", "rewrite": "ArgSwap(idxs=3<->4 @(902,25)->(902,48))"} -{"repo": "https://:@github.com/griffithlab/civicpy.git", "hash": "13f1945d0fcbb4e1bbf9fcc555710edab4ff4f71", "diff": "@@ -99,7 +99,7 @@ class CivicRecord:\n try:\n data['type'] = data.get('type', singularize(field))\n except AttributeError: # if data has no 'get' method, i.e. not a Dict\n- result.append(v)\n+ result.append(data)\n else:\n result.append(cls(partial=True, **data))\n self.__setattr__(field, result)\n", "old_path": "pycivic/civic.py", "rewrite": "ReplaceText(target='data' @(102,38)->(102,39))"} -{"repo": "https://:@github.com/JoeriHermans/dist-keras.git", "hash": "7b9f4110efd7470daa8e1ad9e93ab92fc3c135ea", "diff": "@@ -63,7 +63,7 @@ class LabelVectorTransformerUDF(Transformer):\n v = to_dense_vector(label, self.output_dim)\n new_row = new_dataframe_row_fast(row, self.output_column, v)\n \n- return row\n+ return new_row\n \n def transform(self, data):\n return data.map(self._transform).toDF()\n", "old_path": "distkeras/distributed.py", "rewrite": "ReplaceText(target='new_row' @(66,15)->(66,18))"} -{"repo": "https://:@github.com/JoeriHermans/dist-keras.git", "hash": "b2c8dee25e9687403108fbeb31efc2b309a51675", "diff": "@@ -158,7 +158,7 @@ class AsynchronousDistributedTrainer(DistributedTrainer):\n \n def __init__(self, keras_model, worker_optimizer, loss, num_workers=2, batch_size=32,\n features_col=\"features\", label_col=\"label\", num_epoch=1):\n- super(AsynchronousDistributedTrainer, self).__init__(keras_model, loss, worker_optimizer,\n+ super(AsynchronousDistributedTrainer, self).__init__(keras_model, worker_optimizer, loss,\n num_workers, batch_size, features_col,\n label_col, num_epoch)\n # Initialize asynchronous methods variables.\n", "old_path": "distkeras/trainers.py", "rewrite": "ArgSwap(idxs=1<->2 @(161,8)->(161,60))"} -{"repo": "https://:@github.com/JoeriHermans/dist-keras.git", "hash": "325770acaebbd0a6f05603d1d277d1a7c6d7b0c4", "diff": "@@ -385,7 +385,7 @@ class ExperimentalParameterServer(SocketParameterServer):\n data = recv_data(conn)\n # Extract the data from the dictionary.\n r = data['residual']\n- worker_id = r['worker_id']\n+ worker_id = data['worker_id']\n with self.mutex:\n self.add_staleness(worker_id)\n # Update the center variable.\n", "old_path": "distkeras/parameter_servers.py", "rewrite": "ReplaceText(target='data' @(388,20)->(388,21))"} -{"repo": "https://:@github.com/K1DV5/ScpyCalc.git", "hash": "a4f2b442c7db6ed936811d4fea74854dc03ceb4a", "diff": "@@ -306,7 +306,7 @@ class MathVisitor(ast.NodeVisitor):\n return to_math(tree, mul=self.mul, div=self.div,\n mat_size=self.mat_size, decimal=self.decimal,\n syntax=self.s, ital=self.ital)\n- if not self.subs and not shallow:\n+ if not self.subs or not shallow:\n return self.format_name(n.id)\n # substitute the value of the variable by formatted value\n try:\n", "old_path": "docal/parsing.py", "rewrite": "ReplaceText(target='or' @(309,25)->(309,28))"} -{"repo": "https://:@github.com/kylebittinger/unassigner.git", "hash": "20c134aeafa34ed6c626677064c0b67183f812a4", "diff": "@@ -61,7 +61,7 @@ def blastdb_fps(fp):\n \n def get_url(url):\n fp = url_fp(url)\n- if not os.path.exists(fp):\n+ if os.path.exists(fp):\n os.remove(fp)\n subprocess.check_call([\"wget\", url])\n return fp\n", "old_path": "unassign/download.py", "rewrite": "ReplaceText(target='' @(64,7)->(64,11))"} -{"repo": "https://:@github.com/AFM-analysis/PyJibe.git", "hash": "9946f6261a7ea6bbf7309e077788cafd3f6ba7e6", "diff": "@@ -57,7 +57,7 @@ class PyJibe(QtWidgets.QMainWindow, MainBase):\n # Add export choices\n if hasattr(inst, \"get_export_choices\"):\n choices = inst.get_export_choices()\n- menobj = self.menuExport.addMenu(inst.windowTitle())\n+ menobj = self.menuExport.addMenu(sub.windowTitle())\n for choice in choices:\n action = menobj.addAction(choice[0])\n action.triggered.connect(getattr(inst, choice[1]))\n", "old_path": "pyjibe/head/main.py", "rewrite": "ReplaceText(target='sub' @(60,45)->(60,49))"} -{"repo": "https://:@gitlab.com/petra-sim/petra.git", "hash": "dda7d9769193fbcf1419f7f55353819a805193e6", "diff": "@@ -107,7 +107,7 @@ def create_mesh(structure, path):\n for element in structure.elements])\n min_size = 1 * c.nm\n \n- with geo.Geo(points_geo) as g:\n+ with geo.Geo(mesh_geo) as g:\n g.include(\"structure.geo\")\n g.include(\"points.geo\")\n g.attractor(1, geo.range(idx0, idx))\n", "old_path": "transport/poisson/geometry.py", "rewrite": "ReplaceText(target='mesh_geo' @(110,17)->(110,27))"} -{"repo": "https://:@github.com/robertbuecker/diffractem.git", "hash": "9eb32dde6f3998ccdf27c5c5a64cd0a6b62f3415", "diff": "@@ -588,7 +588,7 @@ def lorentz_fast(img, x_0: float = None, y_0: float = None, amp: float = None,\n \"\"\"\n if (x_0 is None) or (not np.isfinite(x_0)):\n x_0 = img.shape[1] / 2\n- if (y_0 is None) or (not np.isfinite(x_0)):\n+ if (y_0 is None) or (not np.isfinite(y_0)):\n y_0 = img.shape[0] / 2\n if radius is not None:\n x1 = int(x_0 - radius)\n", "old_path": "diffractem/proc2d.py", "rewrite": "ReplaceText(target='y_0' @(591,41)->(591,44))"} -{"repo": "https://:@github.com/kikuchi-m/ceryle.git", "hash": "03f69077698b989fa1fb344d3fb1a29a7e2e10dc", "diff": "@@ -165,7 +165,7 @@ def main(argv):\n }[args.pop('log_level')],\n console=args.pop('log_stream'),\n filename=args.pop('log_filename'))\n- logger.debug(f'arguments: {argv}')\n+ logger.debug(f'arguments: {args}')\n \n try:\n if args.pop('list_tasks', False):\n", "old_path": "ceryle/main.py", "rewrite": "ReplaceText(target='args' @(168,31)->(168,35))"} -{"repo": "https://:@github.com/persepolisdm/persepolis.git", "hash": "3765f351be8734881e5556f75e7f4fdba8991f82", "diff": "@@ -38,7 +38,7 @@ class Tor:\n \n def check_tor(self):\n \"\"\" True If Tor Is Installed \"\"\"\n- return (self.tor is None)\n+ return (self.tor is not None)\n \n def socks_tor(self):\n \"\"\" Checks If Socks Proxy Is Configured For Tor \"\"\"\n", "old_path": "persepolis/scripts/check_proxy.py", "rewrite": "ReplaceText(target=' is not ' @(41,24)->(41,28))"} -{"repo": "https://:@github.com/persepolisdm/persepolis.git", "hash": "11559164cbc09d141949b464e4d5ec7ea07ec016", "diff": "@@ -103,7 +103,7 @@ def spider(add_link_dictionary):\n file_size = humanReadbleSize(file_size)\n \n # return results\n- return filename, filesize\n+ return filename, file_size\n \n \n # this function finds and returns file name for links.\n", "old_path": "persepolis/scripts/spider.py", "rewrite": "ReplaceText(target='file_size' @(106,21)->(106,29))"} -{"repo": "https://:@gitlab.com/sumner/sublime-music.git", "hash": "fab385a778c4486043bc069ce46accac6f0cffa7", "diff": "@@ -159,7 +159,7 @@ class PlayerControls(Gtk.ActionBar):\n self.album_art.set_loading(False)\n \n def update_scrubber(self, current, duration):\n- if current is None and duration is None:\n+ if current is None or duration is None:\n self.song_duration_label.set_text('-:--')\n self.song_progress_label.set_text('-:--')\n self.song_scrubber.set_value(0)\n", "old_path": "libremsonic/ui/player_controls.py", "rewrite": "ReplaceText(target='or' @(162,27)->(162,30))"} -{"repo": "https://:@github.com/INM-6/hybridLFPy.git", "hash": "e165d8eb36122f4647297989e4da50c25e445c5f", "diff": "@@ -48,7 +48,7 @@ if __name__ == '__main__':\n \n fname = os.path.join(jobscriptdir, job + '.job')\n f = open(fname, 'w')\n- f.write(content.format(job, stime, oe, oe, ntasks, memPerCPU, mpiexec, sim))\n+ f.write(content.format(job, stime, oe, oe, memPerCPU, ntasks, mpiexec, sim))\n f.close()\n \n jobscripts.append(fname)\n", "old_path": "examples/Hagen_et_al_2016_cercor/run_all_jobs.py", "rewrite": "ArgSwap(idxs=4<->5 @(51,16)->(51,30))"} -{"repo": "https://:@github.com/tgalal/microbus.git", "hash": "ad908781df4151ae453e0d832fe6324d470363d7", "diff": "@@ -13,7 +13,7 @@ class BusSchedulerTest(unittest.TestCase):\n self.stop2 = microbus.BusStop(\"stop2\")\n self.stop3 = microbus.BusStop(\"stop3\")\n self.stops = [self.stop1, self.stop2, self.stop3]\n- self.busRoute1 = microbus.BusRoute(\"test\", self.stops)\n+ self.busRoute1 = microbus.BusRoute(self.stops, \"test\")\n self.busRoute2 = self.busRoute1[::-1]\n self.bus = Bus(keep_prev=2)\n self.scheduler = BusScheduler(self.bus)\n", "old_path": "microbus/test_scheduler.py", "rewrite": "ArgSwap(idxs=0<->1 @(16,25)->(16,42))"} -{"repo": "https://:@github.com/nanvel/c2p2.git", "hash": "554470ca3827bf276f15159434de4996a65bc130", "diff": "@@ -64,6 +64,6 @@ class GitHubPullHandler(RequestHandler):\n \n if event == 'push':\n ref = json.loads(self.request.body.decode('utf8'))['ref']\n- if ref != 'refs/heads/{branch}'.format(branch=options.GITHUB_BRANCH):\n+ if ref == 'refs/heads/{branch}'.format(branch=options.GITHUB_BRANCH):\n result = yield github_pull()\n logger.warning(result)\n", "old_path": "mdpages/handlers/github.py", "rewrite": "ReplaceText(target='==' @(67,19)->(67,21))"} -{"repo": "https://:@github.com/caleblareau/bap.git", "hash": "063364d986c20b9eeca8072b763feead8573038e", "diff": "@@ -68,7 +68,7 @@ class bapProject():\n \t\tself.minimum_cell_fragments = minimum_cell_fragments\n \t\tself.minimum_jaccard_fragments = minimum_jaccard_fragments\n \t\tself.extract_mito = extract_mito\n-\t\tself.drop_tag = barcode_tag\n+\t\tself.drop_tag = drop_tag\n \t\tself.barcode_tag = barcode_tag\n \t\t\n \t\t# Figure out operating system just for funzies; not presently used\n", "old_path": "bap/bapProjectClass.py", "rewrite": "ReplaceText(target='drop_tag' @(71,18)->(71,29))"} -{"repo": "https://:@github.com/skblaz/tax2vec.git", "hash": "722d18184211d2f1e4934cdac4464be2a37de869", "diff": "@@ -370,7 +370,7 @@ class tax2vec:\n \n if out is not None:\n hypernyms.extend(out)\n- for h in hypernyms:\n+ for h in out:\n local_graph.append((str(token), h))\n \n return initial_terms, idx, hypernyms, local_graph\n", "old_path": "tax2vec/__init__.py", "rewrite": "ReplaceText(target='out' @(373,29)->(373,38))"} -{"repo": "https://:@github.com/apertif/apercal.git", "hash": "e0a3e59de9c906da7bd7b22b99e0eed7a75b4b05", "diff": "@@ -144,7 +144,7 @@ def run_casa(cmd, raise_on_severe=False, timeout=1800):\n casa = drivecasa.Casapy()\n try:\n casa_output, casa_error = casa.run_script(cmd, raise_on_severe=True, timeout=timeout)\n- logger.debug('\\n'.join(casa_output))\n+ logger.debug('\\n'.join(casa_error))\n except RuntimeError:\n logger.error(\"Casa command failed\")\n if raise_on_severe:\n", "old_path": "apercal/libs/lib.py", "rewrite": "ReplaceText(target='casa_error' @(147,31)->(147,42))"} -{"repo": "https://:@github.com/apertif/apercal.git", "hash": "be536be1cbe8f89017d77b6139d6742dbc059a42", "diff": "@@ -68,7 +68,7 @@ class transfer(BaseModule):\n logger.debug(\n \"Setting amplitude selfcal file name: {}\".format(datasetname_amp))\n logger.debug(\n- \"Setting phase selfcal file name: {}\".format(datasetname_amp))\n+ \"Setting phase selfcal file name: {}\".format(datasetname_phase))\n # datasetname_amp = self.get_target_path().rstrip('.mir') + '_amp.mir'\n # datasetname_phase = self.get_target_path()\n if os.path.isdir(datasetname_amp) and selfcaltargetbeamsampstatus:\n", "old_path": "apercal/modules/transfer.py", "rewrite": "ReplaceText(target='datasetname_phase' @(71,65)->(71,80))"} -{"repo": "https://:@github.com/apertif/apercal.git", "hash": "2bd6291a92fe9fd1e9c175ab79fea9e03ef56cc4", "diff": "@@ -41,7 +41,7 @@ def create_beam(beam, beam_map_dir, corrtype = 'Gaussian', primary_beam_path = N\n beamoutname = 'beam_{}.map'.format(beam.zfill(2))\n \n # check if file exists:\n- if os.path.isdir(beamoutname):\n+ if not os.path.isdir(beamoutname):\n #then test type and proceed for different types\n if corrtype == 'Gaussian':\n make_gaussian_beam(beam_map_dir,beamoutname,bm_size,cell,fwhm,cutoff)\n", "old_path": "apercal/subs/mosaic_utils.py", "rewrite": "ReplaceText(target='not ' @(44,7)->(44,7))"} -{"repo": "https://:@github.com/GalakVince/skin_lesion_symmetry.git", "hash": "cbad346417689f3a698035f0393fef710ae6dedd", "diff": "@@ -338,7 +338,7 @@ def classifierTrainer(maxLeafNodes, data=None, data_backup_file='patchesDataSet/\n clf: The fitted classifier.\n acc: The accuracy score of the classifier\n \"\"\"\n- if data is not None:\n+ if data is None:\n data = pd.read_csv(f\"{package_path()}/data/patchesDataSet/{data_backup_file}.csv\", index_col=False)\n features = list(data)\n del features[0]\n", "old_path": "dermoscopic_symmetry/classifier_feeder.py", "rewrite": "ReplaceText(target=' is ' @(341,11)->(341,19))"} -{"repo": "https://:@github.com/Infinidat/infi.hbaapi.git", "hash": "b0e2322452b83d0c9d037a502eee5e3b90ce1344", "diff": "@@ -32,7 +32,7 @@ class GeneratorTestCase(unittest.TestCase):\n port_test_class.assert_port(port)\n \n def _assert_wwn_translation(self, expected, actual):\n- self.assertEquals(expected, sysfs.translate_wwn(actual))\n+ self.assertEquals(sysfs.translate_wwn(actual), expected)\n \n def test_wwn_translation(self):\n for expected, actual in [('01:02:03:04:05:06:07:08', '01:02:03:04:05:06:07:08'),\n", "old_path": "src/infi/hbaapi/generators/sysfs/tests/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(35,8)->(35,25))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "d501b7defb163d213b08e69100e1b4ddc30b68f0", "diff": "@@ -154,7 +154,7 @@ class BaseData(object):\n logger.warning('failed to convert data for key=%s, raw=%s to type=%s' % (kname, raw, ktype))\n return defval\n \n- return raw.lower() in ['1', 'true', 'yes']\n+ return val.lower() in ['1', 'true', 'yes']\n \n def clean_dictdata(self, raw, ktype, kname=None, defval=None):\n \"\"\"\n", "old_path": "pilot/info/basedata.py", "rewrite": "ReplaceText(target='val' @(157,15)->(157,18))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "db2a9ae0873c0c53e97e4a43f2d929ca89729128", "diff": "@@ -36,7 +36,7 @@ def verify_proxy(limit=None):\n \n # add setup for arcproxy if it exists\n arcproxy_setup = \"%s/atlas.cern.ch/repo/sw/arc/client/latest/slc6/x86_64/setup.sh\" % get_file_system_root_path()\n- envsetup += \". %s;\" % (arcproxy_setup)\n+ envsetup = \". %s;\" % (arcproxy_setup)\n \n # first try to use arcproxy since voms-proxy-info is not working properly on SL6\n # (memory issues on queues with limited memory)\n", "old_path": "pilot/user/atlas/proxy.py", "rewrite": "ReplaceText(target='=' @(39,13)->(39,15))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "11ef7369f5f48c183709c3f4143deef9c8d9335a", "diff": "@@ -101,7 +101,7 @@ class Analytics(Services):\n else:\n raise NotDefined('Fit has not been defined')\n \n- return intersect\n+ return x2\n \n \n class Fit(object):\n", "old_path": "pilot/api/analytics.py", "rewrite": "ReplaceText(target='x2' @(104,15)->(104,24))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "bf8e5359f24dd7da724fe770d893ba3e3af41ef7", "diff": "@@ -194,7 +194,7 @@ def copy_output(job, job_scratch_dir, work_dir):\n try:\n for outfile in job.output_files.keys():\n if os.path.exists(outfile):\n- copy(os.path.join(job_scratch_dir, outfile), os.path.join(job_scratch_dir, outfile))\n+ copy(os.path.join(job_scratch_dir, outfile), os.path.join(work_dir, outfile))\n os.chdir(work_dir)\n except IOError:\n raise FileHandlingFailure(\"Copy from scratch dir to access point failed\")\n", "old_path": "pilot/workflow/generic_hpc.py", "rewrite": "ReplaceText(target='work_dir' @(197,74)->(197,89))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "db0b653efeda7aed7af5ce710b7f57d94c241124", "diff": "@@ -148,7 +148,7 @@ def get_proper_pid(pid, command, use_container=True, transformation=\"\"):\n imax = 120\n while i < imax:\n # abort if main process has finished already\n- if is_process_running(pid):\n+ if not is_process_running(pid):\n return -1\n \n ps = get_ps_info()\n", "old_path": "pilot/user/atlas/utilities.py", "rewrite": "ReplaceText(target='not ' @(151,11)->(151,11))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "7810aa90923f7e6380f364a173db0fdedc65f07c", "diff": "@@ -113,7 +113,7 @@ def get_copysetup(copytools, copytool_name):\n \"\"\"\n copysetup = \"\"\n \n- if not copysetup:\n+ if not copytools:\n return \"\"\n \n for ct in list(copytools.keys()): # Python 2/3\n", "old_path": "pilot/copytool/common.py", "rewrite": "ReplaceText(target='copytools' @(116,11)->(116,20))"} -{"repo": "https://:@github.com/PanDAWMS/pilot2.git", "hash": "4d3fafc26c46daa348d7c9e61bf60f3f73562cba", "diff": "@@ -288,7 +288,7 @@ def send_state(job, args, state, xml=None, metadata=None): # noqa: C901\n time_before = int(time.time())\n res = https.request('{pandaserver}/server/panda/updateJob'.format(pandaserver=pandaserver), data=data)\n time_after = int(time.time())\n- log.info('server updateJob request completed in %ds for job %s' % (time_after - time_after, job.jobid))\n+ log.info('server updateJob request completed in %ds for job %s' % (time_after - time_before, job.jobid))\n log.info(\"server responded with: res = %s\" % str(res))\n if res is not None:\n # does the server update contain any backchannel information? if so, update the job object\n", "old_path": "pilot/control/job.py", "rewrite": "ReplaceText(target='time_before' @(291,92)->(291,102))"} -{"repo": "https://:@github.com/jmoswalt/django-things.git", "hash": "d83bb4dc5f222f3074ad91eb63089989bc41dc57", "diff": "@@ -12,7 +12,7 @@ class ThingDetailView(DetailView):\n default_template_name = \"things/thing_detail.html\"\n \n def get_object(self, **kwargs):\n- return get_thing_object(self.model, self.request.user, self.kwargs['slug'])\n+ return get_thing_object(self.model, self.kwargs['slug'], self.request.user)\n \n def get_template_names(self):\n names = []\n", "old_path": "things/views.py", "rewrite": "ArgSwap(idxs=1<->2 @(15,15)->(15,31))"} -{"repo": "https://:@github.com/dignio/py-smsframework-pswin.git", "hash": "fcebe208a6ec6de47a187295adceb9e49b6cad97", "diff": "@@ -15,7 +15,7 @@ class PswinProvider(IProvider):\n :param password: Account password\n :param https: Use HTTPS for outgoing messages?\n \"\"\"\n- self.api = PswinHttpApi(user, password, https, hostname)\n+ self.api = PswinHttpApi(user, password, hostname, https)\n super(PswinProvider, self).__init__(gateway, name)\n \n def send(self, message):\n", "old_path": "smsframework_pswin/provider.py", "rewrite": "ArgSwap(idxs=2<->3 @(18,19)->(18,31))"} -{"repo": "https://:@github.com/hsolbrig/pyjsg.git", "hash": "951dac74c9d9c99b601b350330d985e368a1a64b", "diff": "@@ -99,7 +99,7 @@ def iterable_conforms(element, etype, namespace: Dict[str, Any]) -> bool:\n \n def element_conforms(element, etype) -> bool:\n if element is None and etype == object:\n- return True\n+ return False\n elif isinstance(etype, type(type)) and (issubclass(etype, type(None))):\n return element is None\n elif element is None:\n", "old_path": "pyjsg/jsglib/typing_patch_36.py", "rewrite": "ReplaceText(target='False' @(102,15)->(102,19))"} -{"repo": "https://:@github.com/TrackerSB/DriveBuild.git", "hash": "cb617d93003c0bd64fd35a0289615224cac6baaf", "diff": "@@ -324,7 +324,7 @@ def generate_scenario(env: _ElementTree, participants_node: _Element) -> Scenari\n movements = list()\n waypoint_nodes = xpath(node, \"db:movement/db:waypoint\")\n for wp_node in waypoint_nodes:\n- common_state_vals = _extract_common_state_vals(initial_state_node)\n+ common_state_vals = _extract_common_state_vals(wp_node)\n movements.append(WayPoint(\n (float(wp_node.get(\"x\")), float(wp_node.get(\"y\"))),\n float(wp_node.get(\"tolerance\")),\n", "old_path": "generator.py", "rewrite": "ReplaceText(target='wp_node' @(327,59)->(327,77))"} -{"repo": "https://:@bitbucket.org/madssj/fabric-coat.git", "hash": "093e2a926dce52b47a5f47b98413287cd9f31588", "diff": "@@ -22,7 +22,7 @@ def update_env(*args, **kwargs):\n \n env.versions_dir = env.base_dir + \"/versions\"\n \n- if 'wsgi_file' in env:\n+ if 'wsgi_file' not in env:\n env.wsgi_file = env.django_appname + \".wsgi\"\n \n if 'local_base_dir' not in env:\n", "old_path": "src/coat/django.py", "rewrite": "ReplaceText(target=' not in ' @(25,18)->(25,22))"} -{"repo": "https://:@github.com/soreau/catt-qt.git", "hash": "b795ef486b5cdbb3a7d4758a8e5acd978423db3f", "diff": "@@ -764,7 +764,7 @@ class App(QMainWindow):\n if self.combo_box.currentIndex() == device.index:\n self.play_button.setEnabled(True)\n self.stop_button.setEnabled(True)\n- d.disconnect_volume = round(device.cast.status.volume_level * 100)\n+ device.disconnect_volume = round(device.cast.status.volume_level * 100)\n if self.reconnect_volume == -1:\n if last_volume != round(device.cast.status.volume_level * 100):\n d.volume(last_volume / 100)\n", "old_path": "cattqt/cattqt.py", "rewrite": "ReplaceText(target='device' @(767,8)->(767,9))"} -{"repo": "https://:@github.com/FredHutch/find-cags.git", "hash": "e45d29450aad390dd8da28ed6285ba089728abd8", "diff": "@@ -271,7 +271,7 @@ def make_summary_abund_df(df, cags, singletons):\n cag_ix: df.loc[cag].mean()\n for cag_ix, cag in cags.items()\n }).T,\n- cags.loc[singletons]\n+ df.loc[singletons]\n ])\n \n assert summary_df.shape[0] == len(cags) + len(singletons)\n", "old_path": "find-cags.py", "rewrite": "ReplaceText(target='df' @(274,8)->(274,12))"} -{"repo": "https://:@github.com/thuctran289/aztex.git", "hash": "3732482a5ea5d7a6972e8adb33a286b77fb77fef", "diff": "@@ -104,7 +104,7 @@ class Parser(object):\n \t\t\t\tmatch = container.get()\n \t\t\t\tem = LinkTextMatch(match)\n \t\t\t\tsubelement = self.parseText(em.text())\n-\t\t\t\telement = LinkElement(element, em.url())\n+\t\t\t\telement = LinkElement(subelement, em.url())\n \n \t\t\telif container.set(self.matcher.matchImage(block)):\n \t\t\t\tmatch = container.get()\n", "old_path": "Parser.py", "rewrite": "ReplaceText(target='subelement' @(107,26)->(107,33))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "917db18b29e37685517bde78b827c41729f3512d", "diff": "@@ -56,7 +56,7 @@ def get_scanner(hass, config):\n _LOGGER.warning('Found username or password but no host')\n return None\n \n- scanner = NetgearDeviceScanner(host, password, username)\n+ scanner = NetgearDeviceScanner(host, username, password)\n \n return scanner if scanner.success_init else None\n \n", "old_path": "homeassistant/components/device_tracker/netgear.py", "rewrite": "ArgSwap(idxs=1<->2 @(59,14)->(59,34))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "33b0f4d05d5e7479fce392053763f98d650085b3", "diff": "@@ -45,7 +45,7 @@ def trigger(hass, config, action):\n and not convert(seconds.lstrip('/'), int) % 60 == 0:\n _LOGGER.warning('Periodic seconds should be divisible with 60'\n 'there will be an offset every minute')\n- if isinstance(minutes, str) and hours.startswith('/') \\\n+ if isinstance(hours, str) and hours.startswith('/') \\\n and not convert(hours.lstrip('/'), int) % 24 == 0:\n _LOGGER.warning('Periodic hours should be divisible with 24'\n 'there will be an offset every midnight')\n", "old_path": "homeassistant/components/automation/time.py", "rewrite": "ReplaceText(target='hours' @(48,22)->(48,29))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "f5227e1de07066b2ae67b48a3f2312f0057207be", "diff": "@@ -109,7 +109,7 @@ def setup(hass, base_config):\n (LIGHT, DISCOVER_LIGHTS),\n (SWITCH, DISCOVER_SWITCHES))):\n component = get_component(comp_name)\n- bootstrap.setup_component(hass, component.DOMAIN, config)\n+ bootstrap.setup_component(hass, component.DOMAIN, base_config)\n hass.bus.fire(EVENT_PLATFORM_DISCOVERED,\n {ATTR_SERVICE: discovery,\n ATTR_DISCOVERED: {}})\n", "old_path": "homeassistant/components/vera.py", "rewrite": "ReplaceText(target='base_config' @(112,58)->(112,64))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "e44c2a4016a12c992154b62ecfbed5a6013623e2", "diff": "@@ -39,7 +39,7 @@ def _conf_preprocess(value):\n return value\n \n _SINGLE_GROUP_CONFIG = vol.Schema(vol.All(_conf_preprocess, {\n- vol.Optional(CONF_ENTITIES): vol.Any(None, cv.entity_ids),\n+ vol.Optional(CONF_ENTITIES): vol.Any(cv.entity_ids, None),\n CONF_VIEW: bool,\n CONF_NAME: str,\n CONF_ICON: cv.icon,\n", "old_path": "homeassistant/components/group.py", "rewrite": "ArgSwap(idxs=0<->1 @(42,33)->(42,40))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "b1736994b72a90ff18d7461b0afe00dd93ba2cdc", "diff": "@@ -258,7 +258,7 @@ class AndroidIPCamEntity(Entity):\n def device_state_attributes(self):\n \"\"\"Return the state attributes.\"\"\"\n state_attr = {}\n- if self._ipcam.status_data is not None:\n+ if self._ipcam.status_data is None:\n return state_attr\n \n state_attr[ATTR_VID_CONNS] = \\\n", "old_path": "homeassistant/components/android_ip_webcam.py", "rewrite": "ReplaceText(target=' is ' @(261,34)->(261,42))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "32b7f4d16f3c790d3370df3f4bcaf1a1462c8944", "diff": "@@ -288,7 +288,7 @@ class TadoClimate(ClimateDevice):\n \n if 'setting' in overlay_data:\n setting_data = overlay_data['setting']\n- setting = setting is not None\n+ setting = setting_data is not None\n \n if setting:\n if 'mode' in setting_data:\n", "old_path": "homeassistant/components/climate/tado.py", "rewrite": "ReplaceText(target='setting_data' @(291,26)->(291,33))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "6505019701d57bf497cd42fc087e4a2e7a9ef546", "diff": "@@ -89,7 +89,7 @@ class PushBulletNotificationService(BaseNotificationService):\n \n if not targets:\n # Backward compatibility, notify all devices in own account\n- self._push_data(filepath, message, title, self.pushbullet, url)\n+ self._push_data(filepath, message, title, url, self.pushbullet)\n _LOGGER.info(\"Sent notification to self\")\n return\n \n", "old_path": "homeassistant/components/notify/pushbullet.py", "rewrite": "ArgSwap(idxs=3<->4 @(92,12)->(92,27))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "e2ce1d05aeb825efcc324d0e4ac38fd868e80875", "diff": "@@ -27,7 +27,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):\n \n # Get all regular switches that are not excluded or marked as lights\n for device in data.abode.get_devices(generic_type=CONST.TYPE_SWITCH):\n- if data.is_excluded(device) or not data.is_light(device):\n+ if data.is_excluded(device) or data.is_light(device):\n continue\n \n devices.append(AbodeSwitch(data, device))\n", "old_path": "homeassistant/components/switch/abode.py", "rewrite": "ReplaceText(target='' @(30,39)->(30,43))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "486263fff771a5f647d70d062e67022ae5031378", "diff": "@@ -118,7 +118,7 @@ class Concord232ZoneSensor(BinarySensorDevice):\n def is_on(self):\n \"\"\"Return true if the binary sensor is on.\"\"\"\n # True means \"faulted\" or \"open\" or \"abnormal state\"\n- return bool(self._zone['state'] == 'Normal')\n+ return bool(self._zone['state'] != 'Normal')\n \n def update(self):\n \"\"\"Get updated stats from API.\"\"\"\n", "old_path": "homeassistant/components/binary_sensor/concord232.py", "rewrite": "ReplaceText(target='!=' @(121,40)->(121,42))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "cf3f1c3081405034dcd96cf5d2ae6f070c5bbfa8", "diff": "@@ -48,7 +48,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):\n dev = []\n \n for pmname in coll.supported_values():\n- if config.get(CONF_NAME) is None:\n+ if config.get(CONF_NAME) is not None:\n name = '{} PM{}'.format(config.get(CONF_NAME), pmname)\n else:\n name = 'PM{}'.format(pmname)\n", "old_path": "homeassistant/components/sensor/serial_pm.py", "rewrite": "ReplaceText(target=' is not ' @(51,32)->(51,36))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "74c249e57d16340ebd89fcd989942ff8b2fac26f", "diff": "@@ -194,7 +194,7 @@ class SpotifyMediaPlayer(MediaPlayerDevice):\n self._title = item.get('name')\n self._artist = ', '.join([artist.get('name')\n for artist in item.get('artists')])\n- self._uri = current.get('uri')\n+ self._uri = item.get('uri')\n images = item.get('album').get('images')\n self._image_url = images[0].get('url') if images else None\n # Playing state\n", "old_path": "homeassistant/components/media_player/spotify.py", "rewrite": "ReplaceText(target='item' @(197,24)->(197,31))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "2a5751c09d62823371da14e9bdb1b19143851c85", "diff": "@@ -173,7 +173,7 @@ class TestHomeKit(unittest.TestCase):\n \n self.assertEqual(mock_add_bridge_acc.mock_calls, [call(state)])\n self.assertEqual(mock_show_setup_msg.mock_calls, [\n- call(homekit.bridge, self.hass)])\n+ call(self.hass, homekit.bridge)])\n self.assertEqual(homekit.driver.mock_calls, [call.start()])\n self.assertTrue(homekit.started)\n \n", "old_path": "tests/components/homekit/test_homekit.py", "rewrite": "ArgSwap(idxs=0<->1 @(176,12)->(176,16))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "bd23145331c2a3497160d311da5853393852df61", "diff": "@@ -185,7 +185,7 @@ class EntityRegistry:\n for listener_ref in new.update_listeners:\n listener = listener_ref()\n if listener is None:\n- to_remove.append(listener)\n+ to_remove.append(listener_ref)\n else:\n try:\n listener.async_registry_updated(old, new)\n", "old_path": "homeassistant/helpers/entity_registry.py", "rewrite": "ReplaceText(target='listener_ref' @(188,33)->(188,41))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "34d7758b4a04b6cdc44a763cb1da194d4168b833", "diff": "@@ -46,7 +46,7 @@ def async_register_http(hass, cfg):\n entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)\n \n domain_exposed_by_default = \\\n- expose_by_default and entity.domain in exposed_domains\n+ expose_by_default or entity.domain in exposed_domains\n \n # Expose an entity if the entity's domain is exposed by default and\n # the configuration doesn't explicitly exclude it from being\n", "old_path": "homeassistant/components/google_assistant/http.py", "rewrite": "ReplaceText(target='or' @(49,30)->(49,33))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "04c7d5c128c61bc26caf6950ccb231cb27faacac", "diff": "@@ -48,7 +48,7 @@ def async_register_http(hass, cfg):\n entity_config.get(entity.entity_id, {}).get(CONF_EXPOSE)\n \n domain_exposed_by_default = \\\n- expose_by_default or entity.domain in exposed_domains\n+ expose_by_default and entity.domain in exposed_domains\n \n # Expose an entity if the entity's domain is exposed by default and\n # the configuration doesn't explicitly exclude it from being\n", "old_path": "homeassistant/components/google_assistant/http.py", "rewrite": "ReplaceText(target='and' @(51,30)->(51,32))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "d13c892b281049415c67370d34ca711b5c3691c5", "diff": "@@ -19,7 +19,7 @@ async def async_handle_state_update(hass, context, msg):\n _LOGGER.debug(\"[state handler] context: %s msg: %s\", context, msg)\n entity_id = context.get(ATTR_ENTITY_ID)\n state = bool(int(msg.get(ATTR_STATE)))\n- if msg.get(CONF_INVERSE):\n+ if context.get(CONF_INVERSE):\n state = not state\n \n async_dispatcher_send(\n", "old_path": "homeassistant/components/konnected/handlers.py", "rewrite": "ReplaceText(target='context' @(22,7)->(22,10))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "3d91d76d3d87dc28958c70c25cbd7568c8c20d4c", "diff": "@@ -355,7 +355,7 @@ async def _async_set_up_integrations(\n if stage_1_domains:\n await asyncio.gather(*[\n async_setup_component(hass, domain, config)\n- for domain in logging_domains\n+ for domain in stage_1_domains\n ])\n \n # Load all integrations\n", "old_path": "homeassistant/bootstrap.py", "rewrite": "ReplaceText(target='stage_1_domains' @(358,26)->(358,41))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "02f927ae2dfc1ed8de305a3cb7a7ee2b955b97cf", "diff": "@@ -62,7 +62,7 @@ async def async_setup_entry(hass, entry, async_add_entities):\n return\n \n if _token_info:\n- await store.async_save(token_info)\n+ await store.async_save(_token_info)\n token_info = _token_info\n \n data_connection = ambiclimate.AmbiclimateConnection(oauth,\n", "old_path": "homeassistant/components/ambiclimate/climate.py", "rewrite": "ReplaceText(target='_token_info' @(65,31)->(65,41))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "e824c553ca72c2b6de0197ae515486d32785e8a2", "diff": "@@ -254,7 +254,7 @@ class WazeTravelTimeData():\n \n if self.exclude is not None:\n routes = {k: v for k, v in routes.items() if\n- self.exclude.lower() in k.lower()}\n+ self.exclude.lower() not in k.lower()}\n \n route = sorted(routes, key=(lambda key: routes[key][0]))[0]\n \n", "old_path": "homeassistant/components/waze_travel_time/sensor.py", "rewrite": "ReplaceText(target=' not in ' @(257,50)->(257,54))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "0653f57fb41563385b141efcd2ffcfb60572042b", "diff": "@@ -433,7 +433,7 @@ class Entity:\n async def _async_registry_updated(self, event):\n \"\"\"Handle entity registry update.\"\"\"\n data = event.data\n- if data['action'] != 'update' and data.get(\n+ if data['action'] != 'update' or data.get(\n 'old_entity_id', data['entity_id']) != self.entity_id:\n return\n \n", "old_path": "homeassistant/helpers/entity.py", "rewrite": "ReplaceText(target='or' @(436,38)->(436,41))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "066254afdfcc7cd513b9450e0693c1d188d12c4d", "diff": "@@ -156,7 +156,7 @@ class AtaDeviceClimate(MelCloudClimate):\n )\n \n vane_vertical = self._device.vane_vertical\n- if vane_horizontal:\n+ if vane_vertical:\n attr.update(\n {\n ATTR_VANE_VERTICAL: vane_vertical,\n", "old_path": "homeassistant/components/melcloud/climate.py", "rewrite": "ReplaceText(target='vane_vertical' @(159,11)->(159,26))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "a6b407d706a0ed00d740a9c50eeb5107acccddc1", "diff": "@@ -58,7 +58,7 @@ def setup(hass, config):\n success = True\n \n for conf in config[DOMAIN]:\n- protocol = \"https\" if config[CONF_SSL] else \"http\"\n+ protocol = \"https\" if conf[CONF_SSL] else \"http\"\n \n host_name = conf[CONF_HOST]\n server_origin = f\"{protocol}://{host_name}\"\n", "old_path": "homeassistant/components/zoneminder/__init__.py", "rewrite": "ReplaceText(target='conf' @(61,30)->(61,36))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "6c3ea2a904ab38afcb0de424592949ff2d26e99d", "diff": "@@ -153,7 +153,7 @@ async def async_setup(hass, config):\n entity_filter = conf[CONF_FILTER]\n entity_config = conf[CONF_ENTITY_CONFIG]\n interface_choice = (\n- InterfaceChoice.Default if config.get(CONF_ZEROCONF_DEFAULT_INTERFACE) else None\n+ InterfaceChoice.Default if conf.get(CONF_ZEROCONF_DEFAULT_INTERFACE) else None\n )\n \n homekit = HomeKit(\n", "old_path": "homeassistant/components/homekit/__init__.py", "rewrite": "ReplaceText(target='conf' @(156,35)->(156,41))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "233284056ae02d0423ef590d2c931dad450a6447", "diff": "@@ -119,5 +119,5 @@ class XS1ThermostatEntity(XS1DeviceEntity, ClimateEntity):\n async def async_update(self):\n \"\"\"Also update the sensor when available.\"\"\"\n await super().async_update()\n- if self.sensor is None:\n+ if self.sensor is not None:\n await self.hass.async_add_executor_job(self.sensor.update)\n", "old_path": "homeassistant/components/xs1/climate.py", "rewrite": "ReplaceText(target=' is not ' @(122,22)->(122,26))"} -{"repo": "https://:@github.com/sviete/home-assistant.git", "hash": "01bac9f433f26440eff3a4f1365cda9480dc971c", "diff": "@@ -60,7 +60,7 @@ async def async_setup_entry(hass, config_entry):\n \n shark_vacs = await ayla_api.async_get_devices(False)\n device_names = \", \".join([d.name for d in shark_vacs])\n- LOGGER.debug(\"Found %d Shark IQ device(s): %s\", len(device_names), device_names)\n+ LOGGER.debug(\"Found %d Shark IQ device(s): %s\", len(shark_vacs), device_names)\n coordinator = SharkIqUpdateCoordinator(hass, config_entry, ayla_api, shark_vacs)\n \n await coordinator.async_refresh()\n", "old_path": "homeassistant/components/sharkiq/__init__.py", "rewrite": "ReplaceText(target='shark_vacs' @(63,56)->(63,68))"} -{"repo": "https://:@github.com/Melevir/flake8-super-mario.git", "hash": "1aba55ed7cd233a511372c6bfa552684c7243136", "diff": "@@ -14,6 +14,6 @@ def run_validator_for_test_file(filename: str) -> List:\n with open(test_file_path, 'r') as file_handler:\n raw_content = file_handler.read()\n tree = ast.parse(raw_content)\n- checker = SuperMarionChecker(tree=tree, filename=filename)\n+ checker = SuperMarionChecker(tree=tree, filename=test_file_path)\n \n return list(checker.run())\n", "old_path": "tests/conftest.py", "rewrite": "ReplaceText(target='test_file_path' @(17,53)->(17,61))"} -{"repo": "https://:@github.com/OxfordHED/sunbear.git", "hash": "f7d00ff0471d6e1bd301a965f4550fa2e8f81f7a", "diff": "@@ -78,7 +78,7 @@ class Momentum(GradOptInterface):\n # check the stopping conditions\n if self._is_stop():\n break\n- return x\n+ return xmin\n \n def _is_stop(self):\n def disp(s):\n", "old_path": "sunbear/gradopt/momentum.py", "rewrite": "ReplaceText(target='xmin' @(81,15)->(81,16))"} -{"repo": "https://:@github.com/The-Politico/django-politico-staff.git", "hash": "119c1cd3ba70d18e733d4c0cb2d4dc2f89be5428", "diff": "@@ -64,7 +64,7 @@ def sync_slack_users(pks):\n profile, created = Profile.objects.update_or_create(\n user=user,\n defaults={\n- \"slack_api_id\": slack_profile[\"id\"],\n+ \"slack_api_id\": slack_user[\"id\"],\n \"politico_title\": slack_profile.get(\"title\", \"Staff writer\"),\n },\n )\n", "old_path": "staff/tasks/user.py", "rewrite": "ReplaceText(target='slack_user' @(67,32)->(67,45))"} -{"repo": "https://:@bitbucket.org/verisage/python-harvest-oauth.git", "hash": "e31145b870253beda1cf37671a84036864c05544", "diff": "@@ -135,7 +135,7 @@ class TestHarvest(unittest.TestCase):\n \n with patch('add_time.json') as oauth2_mock:\n r = self.oauth_client.add(add_data, params={'access_token': self.TEST_ACCESS})\n- add_mock.assert_called_once_with('POST', '/daily/add', add_data, params={'access_token':self.TEST_ACCESS})\n+ oauth2_mock.assert_called_once_with('POST', '/daily/add', add_data, params={'access_token':self.TEST_ACCESS})\n self.assertTrue(r)\n \n if __name__ == '__main__':\n", "old_path": "tests/harvest_test.py", "rewrite": "ReplaceText(target='oauth2_mock' @(138,12)->(138,20))"} -{"repo": "https://:@github.com/zadorlab/KinBot.git", "hash": "47ebac0df7af70d23b52bd2681a42f91b99c824a", "diff": "@@ -16,7 +16,7 @@ class IntraRAddExocyclicF(GeneralReac):\n self.fix_bonds(fix)\n \n if step < self.dihstep:\n- self.set_dihedrals(change, fix, cut=1)\n+ self.set_dihedrals(change, step, cut=1)\n \n elif step == self.dihstep:\n self.fix_dihedrals(fix)\n", "old_path": "kinbot/reac_Intra_R_Add_Exocyclic_F.py", "rewrite": "ReplaceText(target='step' @(19,39)->(19,42))"} -{"repo": "https://:@github.com/zadorlab/KinBot.git", "hash": "11b23a25b4b4e814ac43dcda3d395687498b076d", "diff": "@@ -1037,7 +1037,7 @@ class ReactionFinder:\n if k not in korcek_chain_filt and l not in korcek_chain_filt:\n korcek_chain_filt.append(kch)\n \n- for ins in korcek_chain:\n+ for ins in korcek_chain_filt:\n if bond[ins[0]][ins[-1]] == 1: # it is a ring\n rxns += [ins]\n \n", "old_path": "kinbot/reaction_finder.py", "rewrite": "ReplaceText(target='korcek_chain_filt' @(1040,23)->(1040,35))"} -{"repo": "https://:@github.com/fabiommendes/kpop.git", "hash": "67feb4ed935ad5e52840c410ec9a61958c2e65d0", "diff": "@@ -126,7 +126,7 @@ class Plot(Attr):\n \n kwargs.pop('self', None)\n pop = self._population\n- coords = pop.projection(which, 2, **coords_kwargs)\n+ coords = pop.projection(2, which, **coords_kwargs)\n return self.scatter_coords(coords, **scatter_kwargs)\n \n def scatter_coords(self, coords, merge=False, colors=None, title=None,\n", "old_path": "src/kpop/population/plot.py", "rewrite": "ArgSwap(idxs=0<->1 @(129,17)->(129,31))"} -{"repo": "https://:@github.com/fabiommendes/kpop.git", "hash": "f7ed21864aab121b3cca7544545059b9c93008e5", "diff": "@@ -11,7 +11,7 @@ def file_or_path(func):\n def decorated(file, *args, **kwargs):\n if isinstance(file, str):\n with open(file) as F:\n- result = func(file, *args, **kwargs)\n+ result = func(F, *args, **kwargs)\n return result\n else:\n return func(file, *args, **kwargs)\n", "old_path": "src/kpop/io/utils.py", "rewrite": "ReplaceText(target='F' @(14,30)->(14,34))"} -{"repo": "https://:@github.com/ocean-perception/auv_nav.git", "hash": "b9d53bbb3836981f47891730e765f9ccbb726345", "diff": "@@ -251,7 +251,7 @@ def interpolate_sensor_list(sensor_list,\n sensor_list[i].eastings,\n sensor_list[i].northings)\n \n- if _centre_list[i].covariance is not None:\n+ if _centre_list[j].covariance is not None:\n sensor_list[i].covariance = interpolate_covariance(\n sensor_list[i].epoch_timestamp,\n _centre_list[j-1].epoch_timestamp,\n", "old_path": "auv_nav/tools/interpolate.py", "rewrite": "ReplaceText(target='j' @(254,28)->(254,29))"} -{"repo": "https://:@github.com/ocean-perception/auv_nav.git", "hash": "338d30cbe4b97a33d0e85c880ac3dd44bd1212b5", "diff": "@@ -671,7 +671,7 @@ def plot_2d_deadreckoning(camera1_list,\n [float(i.eastings) for i in pf_fusion_dvl_list],\n [float(i.northings) for i in pf_fusion_dvl_list]],\n i)\n- if len(pf_timestamps_interval) > 1:\n+ if len(pf_fusion_centre_list) > 1:\n make_frame(frame,\n ['pf_dvl_distribution',\n pf_timestamps_interval,\n", "old_path": "auv_nav/plot/plot_process_data.py", "rewrite": "ReplaceText(target='pf_fusion_centre_list' @(674,15)->(674,37))"} -{"repo": "https://:@github.com/ocean-perception/auv_nav.git", "hash": "189387b6c5a95518839624237c2f95073c301a8b", "diff": "@@ -49,7 +49,7 @@ def run_ransac(data, estimate, is_inlier, sample_size, goal_inliers, max_iterati\n if ic > goal_inliers and stop_at_goal:\n break\n # estimate final model using all inliers\n- m = fit_plane(inliers)\n+ best_model = fit_plane(inliers)\n return best_model, inliers, i\n \n \n", "old_path": "auv_cal/ransac.py", "rewrite": "ReplaceText(target='best_model' @(52,4)->(52,5))"} -{"repo": "https://:@github.com/ocean-perception/auv_nav.git", "hash": "8767eda5191ee84d65f3338f30382fbfd7815281", "diff": "@@ -428,7 +428,7 @@ class LaserCalibrator():\n point_cloud_local = random.sample(inliers_cloud_list, cloud_sample_size)\n total_no_points = len(point_cloud_local)\n p = Plane([1, 0, 0, 1.5])\n- m = p.fit_non_robust(cloud)\n+ m = p.fit_non_robust(point_cloud_local)\n \"\"\"\n m, _ = plane_fitting_ransac(\n point_cloud_local,\n", "old_path": "auv_cal/laser_calibrator.py", "rewrite": "ReplaceText(target='point_cloud_local' @(431,33)->(431,38))"} -{"repo": "https://:@github.com/DiffusionMapsAcademics/pyDiffMap.git", "hash": "94705d0c523a9a87b7f6dd9b4074d895c805ce8d", "diff": "@@ -196,7 +196,7 @@ class Kernel(object):\n elif epsilon == 'bgh': # Berry, Giannakis Harlim method.\n if (self.metric != 'euclidean'): # TODO : replace with call to scipy metrics.\n warnings.warn('The BGH method for choosing epsilon assumes a euclidean metric. However, the metric being used is %s. Proceed at your own risk...' % self.metric)\n- if self.scaled_dists is not None:\n+ if self.scaled_dists is None:\n self.scaled_dists = self._get_scaled_distance_mat(self.data, self.bandwidths)\n self.epsilon_fitted, self.d = choose_optimal_epsilon_BGH(self.scaled_dists.data**2)\n else:\n", "old_path": "src/pydiffmap/kernel.py", "rewrite": "ReplaceText(target=' is ' @(199,32)->(199,40))"} -{"repo": "https://:@github.com/grm/py-smart-gardena.git", "hash": "1851380e4082d4440fdc12d0dc77e04eebfd3e2a", "diff": "@@ -162,7 +162,7 @@ class SmartSystem:\n devices_smart_system[real_id][device[\"type\"]] = []\n devices_smart_system[real_id][device[\"type\"]].append(device)\n for parsed_device in devices_smart_system.values():\n- location.add_device(DeviceFactory.build(self, device))\n+ location.add_device(DeviceFactory.build(self, parsed_device))\n \n def start_ws(self):\n url = f\"{self.SMART_HOST}/v1/locations\"\n", "old_path": "src/gardena/smart_system.py", "rewrite": "ReplaceText(target='parsed_device' @(165,62)->(165,68))"} -{"repo": "https://:@github.com/Stupeflix/zfs_backup.git", "hash": "95be33619441d81b9797e249625de88afcc764d5", "diff": "@@ -81,7 +81,7 @@ class Snapshot(object):\n \n def try_to_create(self):\n limit = datetime.now() - timedelta(seconds=self.settings['SNAPSHOT_INTERVAL'])\n- if 'date' in self.last_snapshot or self.last_snapshot['date'] <= limit:\n+ if 'date' not in self.last_snapshot or self.last_snapshot['date'] <= limit:\n self.create()\n \n def remove_snapshot(self, snapshot):\n", "old_path": "zfs_backup/snapshot.py", "rewrite": "ReplaceText(target=' not in ' @(84,17)->(84,21))"} -{"repo": "https://:@github.com/ilblackdragon/studio.git", "hash": "c6a526f0966c0bd609904d5edc3d530bee4b21b7", "diff": "@@ -14,7 +14,7 @@ class PubsubQueue(object):\n self.logger.setLevel(verbose)\n sub_name = sub_name if sub_name else queue_name + \"_sub\"\n self.logger.info(\"Topic name = {}\".format(queue_name))\n- self.logger.info(\"Subscription name = {}\".format(queue_name))\n+ self.logger.info(\"Subscription name = {}\".format(sub_name))\n if queue_name not in [t.name for t in self.client.list_topics()]:\n self.topic.create()\n self.logger.info('topic {} created'.format(queue_name))\n", "old_path": "studio/pubsub_queue.py", "rewrite": "ReplaceText(target='sub_name' @(17,57)->(17,67))"} -{"repo": "https://:@github.com/ilblackdragon/studio.git", "hash": "eb2c4eb5fc61d879b77062bec7c626815d20e30f", "diff": "@@ -195,7 +195,7 @@ class RMQueue(object):\n \"\"\"\n self._logger.debug('declare queue ' + queue_name)\n with self._rmq_lock:\n- self._channel.queue_declare(self.on_queue_declareok, queue_name)\n+ self._channel.queue_declare(queue_name, self.on_queue_declareok)\n \n def on_queue_declareok(self, method_frame):\n \"\"\"\n", "old_path": "studio/rabbit_queue.py", "rewrite": "ArgSwap(idxs=0<->1 @(198,12)->(198,39))"} -{"repo": "https://:@github.com/exopy/exopy_hqc_legacy.git", "hash": "50201c6854aaac9abac67ba1a2c53bf41b871e34", "diff": "@@ -221,7 +221,7 @@ class SPADQ14(DllInstrument):\n \n # If we are not averaging we wait for all records to be acquired.\n if not n_records or (not average and\n- n_records < retrieved_records):\n+ n_records < records_per_capture):\n time.sleep(1e-6)\n continue\n if not get_data(cu, id_, buffers_ptr,\n", "old_path": "exopy_hqc_legacy/instruments/drivers/dll/sp_adq14.py", "rewrite": "ReplaceText(target='records_per_capture' @(224,45)->(224,62))"} -{"repo": "https://:@github.com/uw-loci/multiscale.git", "hash": "bf29e09937e4b119cac002762b170438fe00e13a", "diff": "@@ -164,7 +164,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path,\n retardance, orientation = calculate_retardance_over_area(\n ret_roi, orient_roi)\n \n- alignment = calculate_alignment(orient_tile)\n+ alignment = calculate_alignment(orient_roi)\n \n sample = blk.get_core_file_name(output_path)\n mouse, slide = sample.split('-')\n", "old_path": "mp_img_manip/polarimetry.py", "rewrite": "ReplaceText(target='orient_roi' @(167,56)->(167,67))"} -{"repo": "https://:@github.com/uw-loci/multiscale.git", "hash": "1b703cd8f176c289d52c195094a7f2035ebf0a15", "diff": "@@ -78,7 +78,7 @@ def plot_overlay(fixed_image: sitk.Image, moving_image: sitk.Image, transform: s\n \n if downsample:\n fixed_shrunk = trans.resize_image(fixed_image, fixed_image.GetSpacing()[0], downsample_target)\n- rotated_shrunk = trans.resize_image(rotated_image, moving_image.GetSpacing()[0], downsample_target)\n+ rotated_shrunk = trans.resize_image(rotated_image, fixed_image.GetSpacing()[0], downsample_target)\n spacing = fixed_shrunk.GetSpacing()\n \n overlay_array = overlay_images(fixed_shrunk, rotated_shrunk)\n", "old_path": "multiscale/itk/itk_plotting.py", "rewrite": "ReplaceText(target='fixed_image' @(81,67)->(81,79))"} -{"repo": "https://:@github.com/uw-loci/multiscale.git", "hash": "66a12265d2e2289686d445c9a9785581773bc31b", "diff": "@@ -106,7 +106,7 @@ def process_orientation_alignment(ret_image_path, orient_image_path,\n if roi_size is None:\n with open(output_path, 'w', newline='') as csvfile:\n print('\\nWriting average retardance file for {} at tile size {}'.format(\n- output_path.name, tile_size[0]))\n+ ret_image_path.name, tile_size[0]))\n writer = csv.writer(csvfile)\n writer.writerow(['Mouse', 'Slide', 'Modality', 'Tile',\n 'Retardance', 'Orientation', 'Alignment'])\n", "old_path": "multiscale/polarimetry/polarimetry.py", "rewrite": "ReplaceText(target='ret_image_path' @(109,32)->(109,43))"} -{"repo": "https://:@github.com/l616769490/fc-utils.git", "hash": "9ce6c047b524094d5dce68b8b39bd880f25a51b8", "diff": "@@ -71,7 +71,7 @@ def fieldStrAndPer(d):\n if v != None:\n l1.append(k)\n noAppend = True # \u6807\u8bb0lper\u548cl2\u8fd8\u672a\u8d4b\u503c\n- if isinstance(l2, str):\n+ if isinstance(v, str):\n if v.startswith('+') or v.startswith('-') or v.startswith('*') or v.startswith('/'):\n vv = dataToFloat(v[1:])\n if vv:\n", "old_path": "fcutils/sql_utils.py", "rewrite": "ReplaceText(target='v' @(74,26)->(74,28))"} -{"repo": "https://:@github.com/shlomikushchi/zipline-live2.git", "hash": "102cfcbe5b21dd95e73616e78b9d1b0dac7af55b", "diff": "@@ -139,7 +139,7 @@ def get_next_trading_dt(current, interval):\n next_dt = next_dt + interval\n next_dt = pd.Timestamp(next_dt, tz=trading.environment.exchange_tz)\n next_dt_utc = next_dt.tz_convert('UTC')\n- if trading.environment.is_market_hours(next_dt):\n+ if trading.environment.is_market_hours(next_dt_utc):\n break\n next_dt = next_dt_utc.tz_convert(trading.environment.exchange_tz)\n \n", "old_path": "zipline/utils/factory.py", "rewrite": "ReplaceText(target='next_dt_utc' @(142,47)->(142,54))"} -{"repo": "https://:@github.com/shlomikushchi/zipline-live2.git", "hash": "0e4f3f957ad95d43e4890cc4b2ea3a10f9b3d4da", "diff": "@@ -272,7 +272,7 @@ def create_test_df_source(sim_params=None, bars='daily'):\n elif bars == 'minute':\n freq = pd.datetools.Minute()\n else:\n- raise ValueError('%s bars not understood.' % freq)\n+ raise ValueError('%s bars not understood.' % bars)\n \n if sim_params:\n index = sim_params.trading_days\n", "old_path": "zipline/utils/factory.py", "rewrite": "ReplaceText(target='bars' @(275,53)->(275,57))"} -{"repo": "https://:@github.com/shlomikushchi/zipline-live2.git", "hash": "2104a35af8d43a398b4df4a947d79b642189c346", "diff": "@@ -2215,7 +2215,7 @@ class TradingAlgorithm(object):\n \"\"\"\n control = RestrictedListOrder(on_error, restrictions)\n self.register_trading_control(control)\n- self.restrictions = restrictions\n+ self.restrictions |= restrictions\n \n @api_method\n def set_long_only(self, on_error='fail'):\n", "old_path": "zipline/algorithm.py", "rewrite": "ReplaceText(target='|=' @(2218,26)->(2218,27))"} -{"repo": "https://:@github.com/shlomikushchi/zipline-live2.git", "hash": "03782fdfd3e49af0407b15e796adb89268997dd1", "diff": "@@ -550,7 +550,7 @@ def assert_timestamp_and_datetime_equal(result,\n )\n \n result = pd.Timestamp(result)\n- expected = pd.Timestamp(result)\n+ expected = pd.Timestamp(expected)\n if compare_nat_equal and pd.isnull(result) and pd.isnull(expected):\n return\n \n", "old_path": "zipline/testing/predicates.py", "rewrite": "ReplaceText(target='expected' @(553,28)->(553,34))"} -{"repo": "https://:@github.com/shlomikushchi/zipline-live2.git", "hash": "6f5e353647162c074e0e88e16046cb1ec3be1563", "diff": "@@ -64,7 +64,7 @@ class RealtimeClock(object):\n current_time = pd.to_datetime('now', utc=True)\n server_time = (current_time + self.time_skew).floor('1 min')\n \n- if (server_time == self.before_trading_start_minutes[0] and\n+ if (server_time >= self.before_trading_start_minutes[0] and\n not self._before_trading_start_bar_yielded):\n self._last_emit = server_time\n self._before_trading_start_bar_yielded = True\n", "old_path": "zipline/gens/realtimeclock.py", "rewrite": "ReplaceText(target='>=' @(67,28)->(67,30))"} -{"repo": "https://:@github.com/SiLab-Bonn/testbeam_analysis.git", "hash": "e5351795584850b633befa2cf63f7a372b58c9e5", "diff": "@@ -313,7 +313,7 @@ def calculate_residuals(input_tracks_file, input_alignment_file, output_residual\n name='XResidualsY_DUT%d' % (actual_dut),\n title='Residual distribution in y direction as a function of the x position for DUT %d ' % (actual_dut),\n atom=tb.Atom.from_dtype(hist_x_residual_y_hist.dtype),\n- shape=hist_x_residual_x_hist.shape,\n+ shape=hist_x_residual_y_hist.shape,\n filters=tb.Filters(complib='blosc', complevel=5, fletcher32=False))\n out_x_res_y.attrs.xedges = hist_x_residual_y_xedges\n out_x_res_y.attrs.yedges = hist_x_residual_y_yedges\n", "old_path": "testbeam_analysis/result_analysis.py", "rewrite": "ReplaceText(target='hist_x_residual_y_hist' @(316,61)->(316,83))"} -{"repo": "https://:@github.com/SiLab-Bonn/testbeam_analysis.git", "hash": "c44b1a0a37f1897ef97caa7f510931d958b6291d", "diff": "@@ -398,7 +398,7 @@ def calculate_residuals(input_tracks_file, input_alignment_file, output_residual\n name='ColumnResidualsRow_DUT%d' % (actual_dut),\n title='Residual distribution in row direction as a function of the column position for DUT %d ' % (actual_dut),\n atom=tb.Atom.from_dtype(hist_col_residual_row_hist.dtype),\n- shape=hist_col_residual_col_hist.shape,\n+ shape=hist_col_residual_row_hist.shape,\n filters=tb.Filters(complib='blosc', complevel=5, fletcher32=False))\n out_col_res_row.attrs.xedges = hist_col_residual_row_xedges\n out_col_res_row.attrs.yedges = hist_col_residual_row_yedges\n", "old_path": "testbeam_analysis/result_analysis.py", "rewrite": "ReplaceText(target='hist_col_residual_row_hist' @(401,65)->(401,91))"} -{"repo": "https://:@github.com/SiLab-Bonn/testbeam_analysis.git", "hash": "7b1825cc07d59af6921e6b95c2e020e116d65c21", "diff": "@@ -418,7 +418,7 @@ def fit_tracks(input_track_candidates_file, input_alignment_file, output_tracks_\n \n # Split data and fit on all available cores\n n_slices = cpu_count()\n- slices = np.array_split(n_tracks, n_slices)\n+ slices = np.array_split(track_hits, n_slices)\n results = pool.map(_fit_tracks_loop, slices)\n del track_hits\n \n", "old_path": "testbeam_analysis/track_analysis.py", "rewrite": "ReplaceText(target='track_hits' @(421,48)->(421,56))"} -{"repo": "https://:@github.com/SiLab-Bonn/testbeam_analysis.git", "hash": "4f8bb30949aba54a1c83b0cc2e9dc03c633a6673", "diff": "@@ -593,7 +593,7 @@ def _find_tracks_loop(tracklets, tr_column, tr_row, tr_z, tr_charge, column_sigm\n # print '== ACTUAL DUT ==', dut_index\n actual_column_sigma, actual_row_sigma = column_sigma[dut_index], row_sigma[dut_index]\n \n- if not reference_hit_set and not np.isnan(tr_row[track_index][dut_index]): # Search for first DUT that registered a hit\n+ if not reference_hit_set and not np.isnan(tr_column[track_index][dut_index]): # Search for first DUT that registered a hit\n actual_track_column, actual_track_row = tr_column[track_index][dut_index], tr_row[track_index][dut_index]\n reference_hit_set = True\n tracklets[track_index]['track_quality'] |= (65793 << dut_index) # First track hit has best quality by definition\n", "old_path": "testbeam_analysis/track_analysis.py", "rewrite": "ReplaceText(target='tr_column' @(596,54)->(596,60))"} -{"repo": "https://:@github.com/pfalcon/ScratchABlock.git", "hash": "3d0617383d0937d2e743d3eeb37fc5389129e831", "diff": "@@ -47,7 +47,7 @@ def loop_single_entry(cfg):\n if not b.items:\n landing_site = p\n if not landing_site:\n- farthest = max(back_jumps)\n+ farthest = max(back_preds)\n print(\"farthest\", farthest)\n newb = BBlock(farthest + \"_1\")\n cfg.add_node(newb.addr, newb)\n", "old_path": "xform.py", "rewrite": "ReplaceText(target='back_preds' @(50,31)->(50,41))"} -{"repo": "https://:@github.com/theislab/trVAE.git", "hash": "839a30f966f4bd7654d56910dee543f129efea94", "diff": "@@ -493,7 +493,7 @@ class RCCVAE:\n if self.train_with_fake_labels:\n x_train = np.reshape(train_data.X, newshape=(-1, *self.x_dim))\n x = [x_train, train_labels, pseudo_labels]\n- y = [x_train, pseudo_labels]\n+ y = [x_train, train_labels]\n else:\n x_train = np.reshape(train_data.X, newshape=(-1, *self.x_dim))\n x = [x_train, train_labels, train_labels]\n", "old_path": "rcvae/models/_rccvae.py", "rewrite": "ReplaceText(target='train_labels' @(496,26)->(496,39))"} -{"repo": "https://:@github.com/theislab/trVAE.git", "hash": "7eac79cf26380e6f665884ef1b1a330aecdab93a", "diff": "@@ -139,7 +139,7 @@ def train_network(data_dict=None,\n model_path=f\"../models/{data_name}-{img_resize}-{preprocess}/{arch_style}-{z_dim}/\",\n dropout_rate=dropout_rate)\n \n- print(train_data.shape, data_valid.shape)\n+ print(train_data.shape, valid_data.shape)\n \n network.train(train_data,\n use_validation=True,\n", "old_path": "tests/test_rccvae.py", "rewrite": "ReplaceText(target='valid_data' @(142,28)->(142,38))"} -{"repo": "https://:@github.com/theislab/trVAE.git", "hash": "106ef16445334677462106453aa6e43ce1ece084", "diff": "@@ -106,7 +106,7 @@ def reconstruct_whole_data(data_dict={}, z_dim=100):\n \n cell_type_data = train[train.obs[cell_type_key] == cell_type]\n cell_type_ctrl_data = train[((train.obs[cell_type_key] == cell_type) & (train.obs[\"condition\"] == ctrl_key))]\n- pred = network.predict(cell_type_data,\n+ pred = network.predict(cell_type_ctrl_data,\n encoder_labels=np.zeros((cell_type_ctrl_data.shape[0], 1)),\n decoder_labels=np.ones((cell_type_ctrl_data.shape[0], 1)))\n \n", "old_path": "tests/test_rcvae.py", "rewrite": "ReplaceText(target='cell_type_ctrl_data' @(109,31)->(109,45))"} -{"repo": "https://:@github.com/theislab/trVAE.git", "hash": "6a19b6aa1c89f14ac093ebf0f20a8c6cb902a632", "diff": "@@ -222,7 +222,7 @@ def evaluate_network(data_dict=None, z_dim=100, n_files=5, k=5, arch_style=1, pr\n if sparse.issparse(valid_data.X):\n valid_data.X = valid_data.X.A\n \n- source_images_train = train_data[valid_data.obs[\"condition\"] == source_key].X\n+ source_images_train = train_data[train_data.obs[\"condition\"] == source_key].X\n source_images_valid = valid_data[valid_data.obs[\"condition\"] == source_key].X\n \n source_images_train = np.reshape(source_images_train, (-1, img_width, img_height, n_channels))\n", "old_path": "tests/test_rccvae.py", "rewrite": "ReplaceText(target='train_data' @(225,41)->(225,51))"} -{"repo": "https://:@github.com/theislab/trVAE.git", "hash": "99e9fa47a8024f4ea73c83f462ea2a5f5c78b87e", "diff": "@@ -318,7 +318,7 @@ def visualize_trained_network_results(data_dict, z_dim=100, mmd_dimension=128, a\n frameon=False)\n \n for gene in top_100_genes[:3]:\n- sc.pl.violin(cell_type_adata, keys=gene, groupby=condition_key,\n+ sc.pl.violin(pred_adatas, keys=gene, groupby=condition_key,\n save=f\"_{data_name}_{cell_type}_{gene}.pdf\",\n show=False,\n wspace=0.2,\n", "old_path": "tests/test_rcvae_multi.py", "rewrite": "ReplaceText(target='pred_adatas' @(321,25)->(321,40))"} -{"repo": "https://:@github.com/succhiello/hieratic.git", "hash": "1a67208b4af1892081323d0f4ff4db36e5500ec8", "diff": "@@ -108,7 +108,7 @@ class ItemResource(Resource):\n persistence_converter = self.get_persistence_converter(self.engine_name)\n if persistence_converter is not None:\n updates = persistence_converter(updates)\n- self.engine.update(patch, primary_index, context, updates)\n+ self.engine.update(primary_index, patch, context, updates)\n self.get_data()\n \n def delete(self, context=None):\n", "old_path": "hieratic/item.py", "rewrite": "ArgSwap(idxs=0<->1 @(111,8)->(111,26))"} -{"repo": "https://:@github.com/jeff-99/hashdex.git", "hash": "db7083cb6b71fdb7a28c04721b3551a146bfd6cb", "diff": "@@ -14,7 +14,7 @@ class DirectoryScanner(object):\n file_list.append(File(os.path.join(root, file), file))\n \n for subdir in subdirs:\n- self._fetch_files(subdir, files)\n+ self._fetch_files(subdir, file_list)\n \n return file_list\n \n", "old_path": "hashdex/files.py", "rewrite": "ReplaceText(target='file_list' @(17,42)->(17,47))"} -{"repo": "https://:@github.com/Gab0/linkageMapper.git", "hash": "2e302c068dc6e0512eb5ec185273c7e34eca32cd", "diff": "@@ -186,7 +186,7 @@ def Execute(options):\n outputFastaName = \"LOCI_%s.fasta\" % locus_name\n \n outputFastaPath = os.path.join(options.outputPath, outputFastaName)\n- if os.path.isfile(outputFastaName):\n+ if os.path.isfile(outputFastaPath):\n print(\"Skipping locus %s. Already exists...\" % locus_name)\n continue\n \n", "old_path": "linkageMapper/primerFinder.py", "rewrite": "ReplaceText(target='outputFastaPath' @(189,26)->(189,41))"} -{"repo": "https://:@github.com/enzoampil/psequant.git", "hash": "a393849078b354a869643126d16e33273cfecf59", "diff": "@@ -155,7 +155,7 @@ def backtest(\n else:\n \n # Allow instance of BaseStrategy or from the predefined mapping\n- if issubclass(strategy, bt.Strategy):\n+ if issubclass(bt.Strategy, strategy):\n strat_name = str(strategy)\n else:\n strat_name = strategy\n", "old_path": "python/fastquant/backtest/backtest.py", "rewrite": "ArgSwap(idxs=0<->1 @(158,11)->(158,21))"} -{"repo": "https://:@github.com/infobyte/faraday_agent_dispatcher.git", "hash": "c833c82e068e54645c983c5c50f4535661f6c2b1", "diff": "@@ -181,7 +181,7 @@ def process_repo_var_envs(executor_name, metadata: dict):\n env_vars = metadata[\"environment_variables\"]\n \n for env_var in env_vars:\n- def_value = config.instance[section].get(executor_name, None)\n+ def_value = config.instance[section].get(env_var, None)\n value = click.prompt(f\"Environment variable {env_var} value\", default=def_value)\n config.instance.set(section, env_var, value)\n \n", "old_path": "faraday_agent_dispatcher/cli/utils/model_load.py", "rewrite": "ReplaceText(target='env_var' @(184,49)->(184,62))"} -{"repo": "https://:@github.com/leylabmpi/pyTecanFluent.git", "hash": "a5ca3f143da09723ffc3fed37fe5e9f0dcb243d4", "diff": "@@ -680,7 +680,7 @@ def write_report(df_map, outFH, pcr_volume, mm_volume,\n ## total PCR\n total_pcr_volume = pcr_volume * n_rxn\n ## total mastermix\n- total_mm_volume = pcr_volume * n_rxn\n+ total_mm_volume = mm_volume * n_rxn\n ## total primer\n if fp_tube > 0 and fp_volume > 0:\n total_fp_volume = fp_volume * n_rxn\n", "old_path": "pyTecanFluent/Map2Robot.py", "rewrite": "ReplaceText(target='mm_volume' @(683,22)->(683,32))"} -{"repo": "https://:@github.com/mindey/langsplit.git", "hash": "11c289b80c6999eeeb17fc91212fb00a9d1b8354", "diff": "@@ -87,7 +87,7 @@ def split(text, sep='.:', ends=['\\n', ':'], min_key_length=2, max_key_length=2,\n \n except Exception as e:\n # Alternatively, we could assign it to None key.\n- name[settings.UNKNOWN_LANGUAGE] += paragraph\n+ result[settings.UNKNOWN_LANGUAGE] += paragraph\n logger.info('Language not detected: {}'.format(paragraph))\n \n if i < number_of_paragraphs - 1:\n", "old_path": "langsplit/splitter.py", "rewrite": "ReplaceText(target='result' @(90,24)->(90,28))"} -{"repo": "https://:@github.com/tkf/factlog.git", "hash": "c032135fe5abcdedeb5a26c013e2f74c1c466a7d", "diff": "@@ -170,7 +170,7 @@ def list_run(\n from .filetitle import write_paths_and_titles\n write_paths_and_titles(output, paths, showpaths, separator)\n else:\n- output.writelines(interleave(paths, itertools.repeat(separator)))\n+ output.writelines(interleave(showpaths, itertools.repeat(separator)))\n if output is not sys.stdout:\n output.close()\n \n", "old_path": "factlog/record.py", "rewrite": "ReplaceText(target='showpaths' @(173,37)->(173,42))"} -{"repo": "https://:@github.com/l0kix2/python-dehydrate.git", "hash": "47212c6e5d2433bbe399dfbdb01ba65b48c5636b", "diff": "@@ -151,7 +151,7 @@ class ComplexField(Field):\n if self.is_iterable:\n return map(dehydrator.dehydrate, target)\n else:\n- return dehydrator.dehydrate(obj)\n+ return dehydrator.dehydrate(target)\n \n @property\n def target(self):\n", "old_path": "dehydrate/fields.py", "rewrite": "ReplaceText(target='target' @(154,40)->(154,43))"} -{"repo": "https://:@github.com/wf4ever/ro-manager.git", "hash": "cc9a10e9cd88e634ee8ff745e099696d173021de", "diff": "@@ -74,7 +74,7 @@ class Minim_graph(object):\n self._minimgr.add( (rule, MINIM.query, querynode) )\n self._minimgr.add( (querynode, MINIM.sparql_query, rdflib.Literal(ForEach)) )\n if ResultMod:\n- self._minimgr.add( (querynode, MINIM.result_mod, rdflib.Literal(Exists)) )\n+ self._minimgr.add( (querynode, MINIM.result_mod, rdflib.Literal(ResultMod)) )\n if Exists:\n existsnode = rdflib.BNode()\n self._minimgr.add( (rule, MINIM.exists, existsnode) )\n", "old_path": "src/checklist/minim_graph.py", "rewrite": "ReplaceText(target='ResultMod' @(77,80)->(77,86))"} -{"repo": "https://:@github.com/frlender/qn.git", "hash": "5b94be8b02089eb0d50c102c249c9ddd4a185091", "diff": "@@ -253,7 +253,7 @@ def loadPkl(path):\n \n def dumpPkl(obj,path):\n \twith open(path,'wb') as pf:\n-\t\tpickle.dump(obj,path)\n+\t\tpickle.dump(obj,pf)\n \n def getBaseDir():\n \tcurrentPath = os.getcwd()\n", "old_path": "py/qn.py", "rewrite": "ReplaceText(target='pf' @(256,18)->(256,22))"} -{"repo": "https://:@bitbucket.org/pyKLIP/pyklip.git", "hash": "e2bf632237365bd23a1b8287ba1bfd85d8cb7702", "diff": "@@ -311,7 +311,7 @@ class Data(object):\n self.filenums = filenums_collapsed\n self.filenames = filenames_collapsed\n \n- if additional_collapsed is not None:\n+ if additional_params is not None:\n for param_field, param_collapsed in zip(additional_params, additional_collapsed):\n param_collapsed.shape = (Ncubes * collapse_channels, ) + param_collapsed.shape[2:]\n setattr(self, param_field, param_collapsed)\n", "old_path": "pyklip/instruments/Instrument.py", "rewrite": "ReplaceText(target='additional_params' @(314,11)->(314,31))"} -{"repo": "https://:@bitbucket.org/pyKLIP/pyklip.git", "hash": "dc2b513633ddd04ac1746a971723a38dafb9365d", "diff": "@@ -200,7 +200,7 @@ class CHARISData(Data):\n with fits.open(filepath, lazy_load_hdus=False) as hdulist:\n cube = hdulist[1].data\n prihdr = hdulist[0].header\n- exthdr = hdulist[0].header\n+ exthdr = hdulist[1].header\n w = wcs.WCS(header=prihdr, naxis=[1,2])\n astr_hdrs = [w.deepcopy() for _ in range(cube.shape[0])] #repeat astrom header for each wavelength slice\n \n", "old_path": "pyklip/instruments/CHARIS.py", "rewrite": "ReplaceText(target='1' @(203,33)->(203,34))"} -{"repo": "https://:@bitbucket.org/pyKLIP/pyklip.git", "hash": "34a9207f22f175f184748b87f9cef6416647890e", "diff": "@@ -1173,7 +1173,7 @@ def klip_dataset(dataset, mode='ADI+SDI', outputdir=\".\", fileprefix=\"\", annuli=5\n if psf_library.dataset is dataset:\n raise ValueError(\"The PSF Library is not prepared for this dataset. Run psf_library.prepare_library()\")\n if aligned_center is not None:\n- if np.array_equal(aligned_center, psf_library.aligned_center): \n+ if not np.array_equal(aligned_center, psf_library.aligned_center): \n raise ValueError(\"The images need to be aligned to the same center as the RDI Library\")\n \n else:\n", "old_path": "pyklip/parallelized.py", "rewrite": "ReplaceText(target='not ' @(1176,15)->(1176,15))"} -{"repo": "https://:@bitbucket.org/pyKLIP/pyklip.git", "hash": "4748ec86588a4b3b60dcb17d36e14485cdcd19ff", "diff": "@@ -63,7 +63,7 @@ def point_source_detection(image, center,threshold,pix2as=None,mask_radius = 4,m\n \n # Mask out a band of 10 pixels around the edges of the finite pixels of the image.\n if maskout_edge is not None:\n- IWA,OWA,inner_mask,outer_mask = get_occ(image, centroid = (center[0][0]+stamp_size//2,center[0][1]+stamp_size//2))\n+ IWA,OWA,inner_mask,outer_mask = get_occ(image_cpy, centroid = (center[0][0]+stamp_size//2,center[0][1]+stamp_size//2))\n conv_kernel = np.ones((maskout_edge,maskout_edge))\n flat_cube_wider_mask = convolve2d(outer_mask,conv_kernel,mode=\"same\")\n image_cpy[np.where(np.isnan(flat_cube_wider_mask))] = np.nan\n", "old_path": "pyklip/kpp/detection/detection.py", "rewrite": "ReplaceText(target='image_cpy' @(66,52)->(66,57))"} -{"repo": "https://:@github.com/kalaspuff/stockholm.git", "hash": "08ee0890e1b7b22c8fc757ee2584e5cdc9ec459c", "diff": "@@ -564,7 +564,7 @@ class MoneyModel(Generic[MoneyType]):\n if self._currency and isinstance(self._currency, BaseCurrency):\n min_decimals = self._currency.decimal_digits\n min_decimals = DEFAULT_MIN_DECIMALS if min_decimals is None else min_decimals\n- min_decimals = min(cast(min_decimals, int), max_decimals)\n+ min_decimals = min(cast(int, min_decimals), max_decimals)\n elif max_decimals is None:\n max_decimals = max(min_decimals, DEFAULT_MAX_DECIMALS)\n \n", "old_path": "stockholm/money.py", "rewrite": "ArgSwap(idxs=0<->1 @(567,31)->(567,35))"} -{"repo": "https://:@github.com/rbw/snowstorm.git", "hash": "dcbeaa22bd05821a088861feb4f8f3ad76ff3db1", "diff": "@@ -33,7 +33,7 @@ class Response:\n body = await self.text()\n content = ujson.loads(body).get(\"result\")\n \n- if \"error\" in body:\n+ if \"error\" in content:\n err = ErrorSchema().load(content[\"error\"])\n text = f\"{err['message']} ({self.status}): {err['detail']}\" if err[\"detail\"] else err[\"message\"]\n raise ErrorResponse(text)\n", "old_path": "snow/request/core/base.py", "rewrite": "ReplaceText(target='content' @(36,22)->(36,26))"} -{"repo": "https://:@github.com/mayjolux/udata.git", "hash": "2a578ad9630779fced19b836b5252f62c7ed2caa", "diff": "@@ -207,7 +207,7 @@ class DatasetBlueprintTest(FrontTestCase):\n for i in range(1, len(feed.entries)):\n published_date = feed.entries[i].published_parsed\n prev_published_date = feed.entries[i - 1].published_parsed\n- self.assertGreaterEqual(published_date, prev_published_date)\n+ self.assertGreaterEqual(prev_published_date, published_date)\n \n def test_recent_feed_owner(self):\n owner = UserFactory()\n", "old_path": "udata/tests/frontend/test_dataset_frontend.py", "rewrite": "ArgSwap(idxs=0<->1 @(210,12)->(210,35))"} -{"repo": "https://:@github.com/mayjolux/udata.git", "hash": "e70455456fabb68859a47a6ef916bc4adb2ccddb", "diff": "@@ -148,7 +148,7 @@ class DatasetBadgesAPI(API):\n form.populate_obj(badge)\n for existing_badge in dataset.badges:\n if existing_badge.kind == badge.kind:\n- return badge\n+ return existing_badge\n dataset.add_badge(badge)\n return badge, 201\n \n", "old_path": "udata/core/dataset/api.py", "rewrite": "ReplaceText(target='existing_badge' @(151,23)->(151,28))"} -{"repo": "https://:@github.com/mayjolux/udata.git", "hash": "6b1aaaff35c2f373873324561fea22752adf37e9", "diff": "@@ -104,7 +104,7 @@ class ReuseDatasetsAPI(API):\n except Dataset.DoesNotExist:\n api.abort(404, 'Dataset {0} does not exists'.format(request.json['id']))\n if dataset in reuse.datasets:\n- return dataset\n+ return reuse\n reuse.datasets.append(dataset)\n reuse.save()\n return reuse, 201\n", "old_path": "udata/core/reuse/api.py", "rewrite": "ReplaceText(target='reuse' @(107,19)->(107,26))"} -{"repo": "https://:@github.com/liushilive/LsBook.git", "hash": "ef6afa367b34525354dee724607c2490bed605b6", "diff": "@@ -83,6 +83,6 @@ def is_summary_exist(book: Book):\n \"\"\"\n book_summary = os.path.join(book.book_path, \"summary.md\")\n if not os.path.isfile(book_summary):\n- file_not_found_error(book)\n+ file_not_found_error(book_summary)\n else:\n book.summary_path = book_summary\n", "old_path": "LsBook/parse/parse_summary.py", "rewrite": "ReplaceText(target='book_summary' @(86,29)->(86,33))"} -{"repo": "https://:@github.com/liushilive/LsBook.git", "hash": "592651c6c34d89532a35cfffb597e42512146525", "diff": "@@ -58,7 +58,7 @@ def _render_html(book_title, title, author, basePath, book_summary,\n language, i18n, github_url, base_assets):\n \"\"\"\u751f\u4ea7HTML\uff0c\u8fd4\u56de\u7d22\u5f15\"\"\"\n # \u89e3\u6790\u9875\u9762\n- base_assets_path = os.path.join(base_assets, basePath) if base_assets else basePath # \u8d44\u6e90\u8def\u5f84\n+ base_assets_path = os.path.join(basePath, base_assets) if base_assets else basePath # \u8d44\u6e90\u8def\u5f84\n \n book_page, toc_tree, tag_katex, tag_mermaid, tag_prism, tag_lightbox, assets_img = parse_file(\n os.path.join(book_path, href),\n", "old_path": "LsBook/renderer/renderer_html.py", "rewrite": "ArgSwap(idxs=0<->1 @(61,23)->(61,35))"} -{"repo": "https://:@github.com/eieste/MethodCache.git", "hash": "672a3590ede2a2e6f7a347fd69c0583b2ec4bd9b", "diff": "@@ -66,7 +66,7 @@ def add_to_cache(options={}, func=None, params=None):\n if \"ttl\" not in options:\n \n assert type(cleaned_options[\"store\"].ttl) is int\n- cleaned_options[\"ttl\"] = options[\"store\"].ttl\n+ cleaned_options[\"ttl\"] = cleaned_options[\"store\"].ttl\n \n else:\n assert type(options[\"ttl\"]) is int\n", "old_path": "methodcache/cache.py", "rewrite": "ReplaceText(target='cleaned_options' @(69,33)->(69,40))"} -{"repo": "https://:@github.com/alphardex/crawltools.git", "hash": "89c92158c4c366af1e22a16d060fdb390683c4b5", "diff": "@@ -17,7 +17,7 @@ def crawl(url):\n data['url'] = item['url']\n data['downloads'] = item['downloads_count']\n data['votes'] = item['votes_count']\n- data['comments'] = items['comments_count']\n+ data['comments'] = item['comments_count']\n pprint(data)\n total.append(data)\n \n", "old_path": "looter/examples/sharecuts.py", "rewrite": "ReplaceText(target='item' @(20,27)->(20,32))"} -{"repo": "https://:@github.com/andrewsanchez/genbankqc.git", "hash": "2aa87a49e09fefbbe7fe2cba2e6074bba157322b", "diff": "@@ -38,7 +38,7 @@ def cli(filter_level, max_unknowns, c_deviations, s_deviations, m_deviations,\n print(\"Completed \", s.species)\n print(s)\n except Exception:\n- print('Failed ', species.species)\n+ print('Failed ', s.species)\n traceback.print_exc()\n else:\n from genbankqc import Genbank\n", "old_path": "genbankqc/__main__.py", "rewrite": "ReplaceText(target='s' @(41,29)->(41,36))"} -{"repo": "https://:@github.com/mattlong/fabric.git", "hash": "7d2c14330a3382a86e51fe16a0151299cc4d23ba", "diff": "@@ -207,4 +207,4 @@ Got:\n \n def eq_contents(path, text):\n with open(path) as fd:\n- eq_(fd.read(), text)\n+ eq_(text, fd.read())\n", "old_path": "tests/utils.py", "rewrite": "ArgSwap(idxs=0<->1 @(210,8)->(210,11))"} -{"repo": "https://:@github.com/rsanchezgarc/carbonCleaner.git", "hash": "df470ae67588e8a1c7ba04ce14b517552e0ad788", "diff": "@@ -41,7 +41,7 @@ def cleanOneMic(micFname, boxSize, deepLearningModel=DEFAULT_MODEL_PATH, inputCo\n global MASK_PREDICTOR_HANDLER\n with LOCK:\n if MASK_PREDICTOR_HANDLER is None:\n- MASK_PREDICTOR_HANDLER= MaskPredictor(deepLearningModel, boxSize, gpus)\n+ MASK_PREDICTOR_HANDLER= MaskPredictor(boxSize, deepLearningModel, gpus)\n \n \n maskPredictor= MASK_PREDICTOR_HANDLER\n", "old_path": "micrograph_cleaner_em/cleanOneMic.py", "rewrite": "ArgSwap(idxs=0<->1 @(44,30)->(44,43))"} -{"repo": "https://:@github.com/Storj/storjkademlia.git", "hash": "61631b21db3a4204bef38431799244fda90e7e4d", "diff": "@@ -9,7 +9,7 @@ from kademlia.log import Logger\n class KademliaProtocol(RPCProtocol):\n def __init__(self, sourceNode, storage, ksize):\n RPCProtocol.__init__(self)\n- self.router = RoutingTable(self, sourceNode, ksize)\n+ self.router = RoutingTable(self, ksize, sourceNode)\n self.storage = storage\n self.sourceID = sourceNode.id\n self.log = Logger(system=self)\n", "old_path": "kademlia/protocol.py", "rewrite": "ArgSwap(idxs=1<->2 @(12,22)->(12,34))"} -{"repo": "https://:@github.com/biwin/django-allauth-underground.git", "hash": "e34cc91401970a2c2c265ca7e3f76c44b26dc1c9", "diff": "@@ -27,7 +27,7 @@ def verified_email_required(function=None,\n def _wrapped_view(request, *args, **kwargs):\n if not EmailAddress.objects.filter(user=request.user,\n verified=True).exists():\n- send_email_confirmation(request.user, request)\n+ send_email_confirmation(request, request.user)\n return render(request,\n 'account/verified_email_required.html')\n return view_func(request, *args, **kwargs)\n", "old_path": "allauth/account/decorators.py", "rewrite": "ArgSwap(idxs=0<->1 @(30,16)->(30,39))"} -{"repo": "https://:@github.com/tuxdna/django-mako.git", "hash": "066efc87e5324ae40f188150c9c59a4edf477513", "diff": "@@ -27,7 +27,7 @@ def render_to_string(template_name, dictionary, context_instance=None):\n context_dictionary.update(d)\n # fetch and render template\n template = middleware.lookup.get_template(template_name)\n- return template.render(**dictionary)\n+ return template.render(**context_dictionary)\n \n def render_to_response(template_name, dictionary, context_instance=None, **kwargs):\n \"\"\"\n", "old_path": "djangomako/shortcuts.py", "rewrite": "ReplaceText(target='context_dictionary' @(30,29)->(30,39))"} -{"repo": "https://:@github.com/brainiak/brainiak-cloud.git", "hash": "43c7525c9a9be12d33426b24fac353dc4d92c35a", "diff": "@@ -130,5 +130,5 @@ class FCMAExperiment(Experiment):\n if result > -1:\n tmp = result\n result = -1\n- return str(result)\n+ return str(tmp)\n return \"Data received!\"\n", "old_path": "rtcloud/experiments/FCMAExperiment.py", "rewrite": "ReplaceText(target='tmp' @(133,23)->(133,29))"} -{"repo": "https://:@github.com/NCATS-Tangerine/ros.git", "hash": "3d8810f69f4c417b8fe46464667d082882b99f81", "diff": "@@ -29,6 +29,6 @@ def exec_operator(self, model, job_name):\n op_node = wf.spec.get(\"workflow\",{}).get(job_name,{})\n if op_node:\n router = Router (wf)\n- result = router.route (wf, op_node, job_name, op_node['code'], op_node['args'])\n+ result = router.route (wf, job_name, op_node, op_node['code'], op_node['args'])\n wf.set_result (job_name, result)\n return result\n", "old_path": "ros/dag/tasks.py", "rewrite": "ArgSwap(idxs=1<->2 @(32,17)->(32,29))"} -{"repo": "https://:@github.com/ICIJ/solr2es.git", "hash": "e4d9cad0605a2a3048b237167f8523b02a47fc22", "diff": "@@ -158,7 +158,7 @@ def translate_doc(row, translation_names, default_values) -> dict:\n translated_value = value[0] if type(value) is list else value\n \n if '.' in translated_key:\n- translated_value = reduce(lambda i, acc: (acc, i), reversed(translated_key.split('.')[1:] + [value]))\n+ translated_value = reduce(lambda i, acc: (acc, i), reversed(translated_key.split('.')[1:] + [translated_value]))\n translated_key = translated_key.split('.')[0]\n elif translated_key == '_id':\n return key, value\n", "old_path": "solr2es/__main__.py", "rewrite": "ReplaceText(target='translated_value' @(161,105)->(161,110))"} -{"repo": "https://:@github.com/guyfawcus/ArchMap.git", "hash": "3dc6ce049e92b3997c00c443d3da1a42da586105", "diff": "@@ -123,7 +123,7 @@ def make_gis(parsed_users, output_file_geojson, output_file_kml, send_to_geojson\n \n message(\"Writing geojson to \" + output_file_geojson)\n output = open(output_file_geojson, 'w')\n- output.write(geojson_str)\n+ output.write(geojson_str_pretty)\n output.close()\n \n # Write 'kml' to 'output_file_kml' if wanted.\n", "old_path": "archmap.py", "rewrite": "ReplaceText(target='geojson_str_pretty' @(126,21)->(126,32))"} -{"repo": "https://:@github.com/machinekoder/speed-friending-matcher.git", "hash": "ea954a502879b22a25d54fd8f40bf35315aede13", "diff": "@@ -45,7 +45,7 @@ class Application(object):\n for output in raw_ouputs:\n name, arguments = output.split(':')\n outputs.append((name, arguments))\n- if len(output) == 0:\n+ if len(outputs) == 0:\n raise ValueError()\n except ValueError:\n raise RuntimeError('Incorrect output plugin string')\n", "old_path": "application.py", "rewrite": "ReplaceText(target='outputs' @(48,19)->(48,25))"} -{"repo": "https://:@github.com/ruipgil/TrackToTrip.git", "hash": "a67fab1c7801d2eaf8086db367f04282dcadf822", "diff": "@@ -70,7 +70,7 @@ def update_location_centroid(point, cluster, max_distance, min_samples):\n biggest_centroid = centroid\n \n if biggest_centroid is None:\n- biggest_centroid = compute_centroid(cluster)\n+ biggest_centroid = compute_centroid(points)\n \n return biggest_centroid, cluster\n \n", "old_path": "tracktotrip/location.py", "rewrite": "ReplaceText(target='points' @(73,44)->(73,51))"} -{"repo": "https://:@github.com/neurodata/primitives-interfaces.git", "hash": "8df5f9ba565690a95034f2d41b00f38d5c70a592", "diff": "@@ -106,7 +106,7 @@ class DatasetToGraphList(transformer.TransformerPrimitiveBase[Inputs, Outputs, H\n graphs.append(temp_graph)\n \n # get the task type from the task docs\n- temp_path = location_base_uri.split('/')\n+ temp_path = datasetDoc_uri.split('/')\n problemDoc_uri = '/'.join(temp_path[:-2]) + '/' + '/'.join(temp_path[-2:]).replace('dataset', 'problem')\n \n with open(problemDoc_uri) as json_file:\n", "old_path": "jhu_primitives/dataset_to_graph_list/dataset_to_graph_list.py", "rewrite": "ReplaceText(target='datasetDoc_uri' @(109,20)->(109,37))"} -{"repo": "https://:@github.com/neurodata/primitives-interfaces.git", "hash": "67d23cf31c662487d6aac6bae63e2c54ad00066c", "diff": "@@ -100,7 +100,7 @@ class LargestConnectedComponent(TransformerPrimitiveBase[Inputs, Outputs, Hyperp\n # check if the component is largest\n if len(connected_component) > len(G_largest):\n # if it is largest - flag as such\n- G_largest = i\n+ G_largest = connected_component\n # obtain indices associated with the node_ids in this component\n temp_indices = [i for i, x in enumerate(nodeIDs)\n if x in list(connected_component)]\n", "old_path": "jhu_primitives/lcc/lcc.py", "rewrite": "ReplaceText(target='connected_component' @(103,28)->(103,29))"} -{"repo": "https://:@github.com/agorinenko/power_dict.git", "hash": "25aaa83e38e440e9f2d49c49f1620d071805410d", "diff": "@@ -96,7 +96,7 @@ class SchemaValidator:\n \n return DictUtils.get_required_value(context, name, **kwargs)\n else:\n- if required_error is not None:\n+ if default_value is not None:\n kwargs['default_value'] = default_value\n \n return DictUtils.get_value(context, name, **kwargs)\n", "old_path": "power_dict/schema_validator.py", "rewrite": "ReplaceText(target='default_value' @(99,19)->(99,33))"} -{"repo": "https://:@github.com/mwilliamson/nope.git", "hash": "cd87dfe247ad7fb3a9f324a8369a3a741c56104f", "diff": "@@ -164,7 +164,7 @@ def _create_type_rules():\n primary_type.define(sub_signature | applied_type | type_ref)\n explicit_type = (signature | type_) + finished >> (lambda result: result[0])\n \n- type_definition = (type_ref + skip(equals) + type_ + skip(finished)) >> _make_type_definition\n+ type_definition = (type_name + skip(equals) + type_ + skip(finished)) >> _make_type_definition\n \n return explicit_type, type_definition\n \n", "old_path": "nope/parser/typing.py", "rewrite": "ReplaceText(target='type_name' @(167,23)->(167,31))"} -{"repo": "https://:@github.com/mwilliamson/nope.git", "hash": "17ff327b5165e537fa683d94ad430564a974a9b3", "diff": "@@ -168,7 +168,7 @@ def _create_type_rules():\n \n type_definition = (type_name + skip(equals) + type_ + skip(finished)) >> _make_type_definition\n \n- structural_type_attr = (attr_name + skip(colon) + type_) >> tuple\n+ structural_type_attr = (attr_name + skip(colon) + explicit_type) >> tuple\n structural_type_attrs = many(structural_type_attr)\n \n structural_type_definition = (type_name + skip(colon) + structural_type_attrs + skip(finished)) >> _make_structural_type_definition\n", "old_path": "nope/parser/typing.py", "rewrite": "ReplaceText(target='explicit_type' @(171,54)->(171,59))"} -{"repo": "https://:@github.com/regexpressyourself/passman.git", "hash": "0ed931e680654f9ca017a093115f1f7f0e833ca4", "diff": "@@ -96,7 +96,7 @@ def generatePasswordPrompt():\n \n siz = getUserInput(\"Password length\")\n \n- if not siz=='' and not siz.isdecimal():\n+ if not siz=='' or not siz.isdecimal():\n print(\"not a number\")\n return \"\"\n \n", "old_path": "menu.py", "rewrite": "ReplaceText(target='or' @(99,19)->(99,22))"} -{"repo": "https://:@github.com/BFriedrichs/motorturbine.git", "hash": "f42dc59b1228d645dce3e9c711385d094990727f", "diff": "@@ -29,7 +29,7 @@ class ListField(base_field.BaseField):\n raise errors.TypeMismatch(list, value)\n \n for item in value:\n- self.validate(value)\n+ self.validate(item)\n old_val = copy.deepcopy(self.value)\n sync_val = {}\n self.value.clear()\n", "old_path": "motorturbine/fields/list_field.py", "rewrite": "ReplaceText(target='item' @(32,26)->(32,31))"} -{"repo": "https://:@github.com/commerceblock/pymainstay.git", "hash": "8cd31dc74cc63ab966ab5f6585d29972b089de1a", "diff": "@@ -127,7 +127,7 @@ def parse_msc_args(raw_args):\n dest='txid',\n help=\"Verify that the proof sequence is committed to the staychain containing TxID\")\n \n- parser_verify.add_argument(\"-l\",\"--list\", type=str,\n+ verify_group.add_argument(\"-l\",\"--list\", type=str,\n dest='list',\n help=\"Verify the list of comma separated commitments against the sequence proof\")\n \n", "old_path": "mst/args.py", "rewrite": "ReplaceText(target='verify_group' @(130,4)->(130,17))"} -{"repo": "https://:@github.com/lxml-cffi/lxml-cffi.git", "hash": "7baf99b8232de27923d0a607ac10a2f77f6a66e2", "diff": "@@ -275,7 +275,7 @@ class Cleaner(object):\n for el in _find_styled_elements(doc):\n old = el.get('style')\n new = _css_javascript_re.sub('', old)\n- new = _css_import_re.sub('', old)\n+ new = _css_import_re.sub('', new)\n if self._has_sneaky_javascript(new):\n # Something tricky is going on...\n del el.attrib['style']\n", "old_path": "src/lxml/html/clean.py", "rewrite": "ReplaceText(target='new' @(278,49)->(278,52))"} -{"repo": "https://:@github.com/lxml-cffi/lxml-cffi.git", "hash": "ce0d5931b9e5293b8375457de2e40c9c197f4dda", "diff": "@@ -334,7 +334,7 @@ class LXMLOutputChecker(OutputChecker):\n attrs.append('-%s=\"%s\"' % (name, self.format_text(value, False)))\n else:\n if name in want.attrib:\n- text = self.collect_diff_text(value, want.attrib[name], False)\n+ text = self.collect_diff_text(want.attrib[name], value, False)\n else:\n text = self.format_text(value, False)\n attrs.append('%s=\"%s\"' % (name, text))\n", "old_path": "src/lxml/doctestcompare.py", "rewrite": "ArgSwap(idxs=0<->1 @(337,27)->(337,49))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "03b1d8ebd465d1153f35d7956d1937418b7be7ae", "diff": "@@ -296,7 +296,7 @@ class RelaxFWWorkflowSRC(AbstractFWWorkflow):\n initialization_info=initialization_info,\n wf_task_index_prefix='ioncell',\n deps={SRC_ion_fws['run_fw'].tasks[0].task_type: '@structure'})\n- fws.extend(SRC_ion_fws['fws'])\n+ fws.extend(SRC_ioncell_fws['fws'])\n links_dict.update(SRC_ioncell_fws['links_dict'])\n \n links_dict.update({SRC_ion_fws['check_fw']: SRC_ioncell_fws['setup_fw']})\n", "old_path": "abiflows/fireworks/workflows/abinit_workflows.py", "rewrite": "ReplaceText(target='SRC_ioncell_fws' @(299,19)->(299,30))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "5e2edecbad2a8bef67436888703c9ba54eb80a18", "diff": "@@ -807,7 +807,7 @@ class AbiFireTask(BasicTaskMixin, FireTaskBase):\n optconf, qadapter_spec, qtk_qadapter = self.run_autoparal(self.abiinput, os.path.abspath('.'), self.ftm)\n if self.use_SRC_scheme:\n return FWAction(mod_spec={'_set': {'_queueadapter': qadapter_spec, 'mpi_ncpus': optconf['mpi_ncpus'],\n- 'optconf': optconf, 'qtk_queueadapter': qadapter_spec.as_dict()}})\n+ 'optconf': optconf, 'qtk_queueadapter': qtk_qadapter.as_dict()}})\n self.history.log_autoparal(optconf)\n self.abiinput.set_vars(optconf.vars)\n \n", "old_path": "abiflows/fireworks/tasks/abinit_tasks.py", "rewrite": "ReplaceText(target='qtk_qadapter' @(810,87)->(810,100))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "701df642b1ef138bbbae47cf771f1671d8a15537", "diff": "@@ -695,7 +695,7 @@ class PiezoElasticFWWorkflowSRC(AbstractFWWorkflow):\n \n ec_nostress_clamped = myfw_nostress.tasks[-1].get_elastic_tensor(tensor_type='clamped_ion')\n ec_nostress_relaxed = myfw_nostress.tasks[-1].get_elastic_tensor(tensor_type='relaxed_ion')\n- ec_stress_relaxed = myfw_nostress.tasks[-1].get_elastic_tensor(tensor_type='relaxed_ion_stress_corrected')\n+ ec_stress_relaxed = myfw_stress.tasks[-1].get_elastic_tensor(tensor_type='relaxed_ion_stress_corrected')\n \n ec_dicts = {'clamped_ion': ec_nostress_clamped.extended_dict(),\n 'relaxed_ion': ec_nostress_relaxed.extended_dict(),\n", "old_path": "abiflows/fireworks/workflows/abinit_workflows.py", "rewrite": "ReplaceText(target='myfw_stress' @(698,28)->(698,41))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "0d2231a3586ae709e7be68977369c685e9818e7b", "diff": "@@ -409,7 +409,7 @@ def createSRCFireworks(setup_task, run_task, handlers=None, validators=None, spe\n else:\n src_task_index = SRCTaskIndex.from_task(run_task)\n setup_spec = copy.deepcopy(spec)\n- setup_spec['SRC_task_index'] = task_index\n+ setup_spec['SRC_task_index'] = src_task_index\n pass\n \n \n", "old_path": "abiflows/fireworks/tasks/src_tasks_abc.py", "rewrite": "ReplaceText(target='src_task_index' @(412,35)->(412,45))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "597da3f247e9fc96c786b140f2bba3e734eed034", "diff": "@@ -353,7 +353,7 @@ def createSRCFireworks(setup_task, run_task, control_task, spec=None, initializa\n control_fw = Firework(control_task, spec=run_spec, name=src_task_index.run_str)\n \n links_dict = {setup_fw.fw_id: [run_fw.fw_id],\n- run_fw.fw_id: [control_task.fw_id]}\n+ run_fw.fw_id: [control_fw.fw_id]}\n return {'setup_fw': setup_fw, 'run_fw': run_fw, 'control_fw': control_fw, 'links_dict': links_dict,\n 'fws': [setup_fw, run_fw, control_fw]}\n \n", "old_path": "abiflows/fireworks/tasks/src_tasks_abc.py", "rewrite": "ReplaceText(target='control_fw' @(356,33)->(356,45))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "5379371a8a68ecf3226958a55cbcee8e6d2664d8", "diff": "@@ -425,7 +425,7 @@ def createSRCFireworks(setup_task, run_task, control_task, spec=None, initializa\n control_spec = copy.deepcopy(spec)\n control_spec = set_short_single_core_to_spec(control_spec)\n control_spec['SRC_task_index'] = src_task_index\n- control_fw = Firework(control_task, spec=run_spec, name=src_task_index.control_str)\n+ control_fw = Firework(control_task, spec=control_spec, name=src_task_index.control_str)\n \n links_dict = {setup_fw.fw_id: [run_fw.fw_id],\n run_fw.fw_id: [control_fw.fw_id]}\n", "old_path": "abiflows/fireworks/tasks/src_tasks_abc.py", "rewrite": "ReplaceText(target='control_spec' @(428,45)->(428,53))"} -{"repo": "https://:@github.com/abinit/abiflows.git", "hash": "54110d5a1108a2b41d4b038d78b3362ecb89fae9", "diff": "@@ -397,7 +397,7 @@ class ControlTask(SRCTaskMixin, FireTaskBase):\n modified_objects[update['key']] = mod\n else:\n new_spec[update['key']] = target_object\n- modified_objects[update['key']] = mod\n+ modified_objects[update['key']] = target_object\n elif update['target'] == 'setup_fw_spec':\n if 'mod' in update:\n mod = getattr(target_object, update['mod'])()\n", "old_path": "abiflows/fireworks/tasks/src_tasks_abc.py", "rewrite": "ReplaceText(target='target_object' @(400,58)->(400,61))"} -{"repo": "https://:@github.com/ecotrust/madrona.git", "hash": "9d39eb4684bcb2a3b37879c4d7641e1d608f9b78", "diff": "@@ -18,7 +18,7 @@ def simpleLoad(request):\n user = loadform.cleaned_data['user']\n name = loadform.cleaned_data['name']\n mpas = Mpa.objects.filter(user=user, name=name)\n- return mpaLoad(request, loadform, mpas)\n+ return mpaLoad(request, mpas, loadform)\n \n def simpleCommit(request):\n '''\n", "old_path": "example_projects/simple/views.py", "rewrite": "ArgSwap(idxs=1<->2 @(21,11)->(21,18))"} -{"repo": "https://:@github.com/ecotrust/madrona.git", "hash": "25d8645a5a7a7db8bed2cbc25e21ac164b4a0f50", "diff": "@@ -58,7 +58,7 @@ def show(request, map_name='default'):\n # if any one fails, 403 or 404 will be raised\r\n user = request.user\r\n from lingcod.sharing.utils import get_viewable_object_or_respond \r\n- for pk in mpaids:\r\n+ for pk in mpas:\r\n # Does it even exist?\r\n try:\r\n obj = mpa_class.objects.get(pk=pk)\r\n", "old_path": "lingcod/staticmap/views.py", "rewrite": "ReplaceText(target='mpas' @(61,14)->(61,20))"} -{"repo": "https://:@github.com/YugaByte/cassandra-python-driver.git", "hash": "6d34a00cee5b033bf285994af739a09419e447a2", "diff": "@@ -89,8 +89,8 @@ class Metadata(object):\n if keyspace in cf_def_rows:\n for table_row in cf_def_rows[keyspace]:\n table_meta = self._build_table_metadata(\n- keyspace_meta, table_row, col_def_rows[keyspace])\n- keyspace.tables[table_meta.name] = table_meta\n+ keyspace_meta, table_row, col_def_rows[keyspace])\n+ keyspace_meta.tables[table_meta.name] = table_meta\n \n def _build_keyspace_metadata(self, row):\n name = row[\"keyspace_name\"]\n", "old_path": "cassandra/metadata.py", "rewrite": "ReplaceText(target='keyspace_meta' @(93,20)->(93,28))"} -{"repo": "https://:@github.com/YugaByte/cassandra-python-driver.git", "hash": "c7a77b8862551e73fd09b749316c422eee7a2308", "diff": "@@ -26,7 +26,7 @@ class RoundRobinPolicy(LoadBalancingPolicy):\n \n def populate(self, cluster, hosts):\n self._live_hosts = set(hosts)\n- if len(hosts) == 1:\n+ if len(hosts) <= 1:\n self._position = 0\n else:\n self._position = randint(0, len(hosts) - 1)\n", "old_path": "cassandra/policies.py", "rewrite": "ReplaceText(target='<=' @(29,22)->(29,24))"} -{"repo": "https://:@github.com/YugaByte/cassandra-python-driver.git", "hash": "2984ba71634e5c3d4b23bb42a977401ca60ffc01", "diff": "@@ -230,7 +230,7 @@ class BaseModel(object):\n 'unrecognized polymorphic key {} for class {}'.format(poly_key, poly_base.__name__)\n )\n \n- if not issubclass(klass, poly_base):\n+ if not issubclass(klass, cls):\n raise PolyMorphicModelException(\n '{} is not a subclass of {}'.format(klass.__name__, poly_base.__name__)\n )\n", "old_path": "cqlengine/models.py", "rewrite": "ReplaceText(target='cls' @(233,37)->(233,46))"} -{"repo": "https://:@github.com/YugaByte/cassandra-python-driver.git", "hash": "5dc9e971267c2072c60ae9271c6e230813f72e15", "diff": "@@ -232,7 +232,7 @@ class BaseModel(object):\n \n if not issubclass(klass, cls):\n raise PolyMorphicModelException(\n- '{} is not a subclass of {}'.format(klass.__name__, poly_base.__name__)\n+ '{} is not a subclass of {}'.format(klass.__name__, cls.__name__)\n )\n \n field_dict = {k: v for k, v in field_dict.items() if k in klass._columns.keys()}\n", "old_path": "cqlengine/models.py", "rewrite": "ReplaceText(target='cls' @(235,72)->(235,81))"} -{"repo": "https://:@github.com/YugaByte/cassandra-python-driver.git", "hash": "21081fb30673a52506de2ef2b3c38ae519afef99", "diff": "@@ -895,7 +895,7 @@ class ModelMetaClass(type):\n if MultipleObjectsReturnedBase is not None:\n break\n \n- MultipleObjectsReturnedBase = DoesNotExistBase or attrs.pop('MultipleObjectsReturned', BaseModel.MultipleObjectsReturned)\n+ MultipleObjectsReturnedBase = MultipleObjectsReturnedBase or attrs.pop('MultipleObjectsReturned', BaseModel.MultipleObjectsReturned)\n attrs['MultipleObjectsReturned'] = type('MultipleObjectsReturned', (MultipleObjectsReturnedBase,), {})\n \n # create the class and add a QuerySet to it\n", "old_path": "cassandra/cqlengine/models.py", "rewrite": "ReplaceText(target='MultipleObjectsReturnedBase' @(898,38)->(898,54))"} -{"repo": "https://:@github.com/redvox/piranha.git", "hash": "94ece99f61f2c12e57b36d3bf00e9260304cee67", "diff": "@@ -14,7 +14,7 @@ def assume_role(account, role):\n sts = boto3.client('sts')\n response = sts.assume_role(RoleArn=f'arn:aws:iam::{account}:role/{role}',\n RoleSessionName=f'{role}-session-{account}')\n- if not response and not response['ResponseMetadata']['HTTPStatusCode'] == 200:\n+ if not response or not response['ResponseMetadata']['HTTPStatusCode'] == 200:\n raise Exception(f'could not assume {role} in {account}')\n return boto3.Session(\n aws_access_key_id=response['Credentials']['AccessKeyId'],\n", "old_path": "piranha/client.py", "rewrite": "ReplaceText(target='or' @(17,20)->(17,23))"} -{"repo": "https://:@github.com/NeuralSandwich/stone.git", "hash": "f51cc62e6b9fed63302e585294a3790e4eef5b1d", "diff": "@@ -51,7 +51,7 @@ def create_add_page(site: Site, source: str, target: str, data=None,\n content=None):\n \"\"\"Create a Page() and file on disk\"\"\"\n init_content = '# Hello, World!'\n- if content is None and not isinstance(str, content):\n+ if content is None and not isinstance(content, str):\n content = init_content\n \n try:\n", "old_path": "stone/stone.py", "rewrite": "ArgSwap(idxs=0<->1 @(54,31)->(54,41))"} -{"repo": "https://:@github.com/legoktm/wdapi.git", "hash": "b7b1335a06b92c9b5182d54db8f8d1ba46c2cbe5", "diff": "@@ -94,7 +94,7 @@ def canClaimBeAdded(item, claim, checkDupe=True):\n if not claim.getTarget().getID() in prop.constraints()['oneof']:\n return False, 'oneof'\n if 'single' in prop.constraints():\n- if item.getID() in item.claims:\n+ if claim.getID() in item.claims:\n return False, 'single'\n \n #TODO: target, unique, item, reciprocal\n", "old_path": "wdapi/main.py", "rewrite": "ReplaceText(target='claim' @(97,11)->(97,15))"} -{"repo": "https://:@github.com/rileyjmurray/sageopt.git", "hash": "61205194a6127bf10cc751efa5dfdf8f180967e6", "diff": "@@ -355,7 +355,7 @@ class Polynomial(Signomial):\n vec = self.alpha[j, :].copy()\n c = self.c[j] * vec[i]\n vec[i] -= 1\n- d[tuple(vec.tolist())] = c\n+ d[tuple(vec.tolist())] += c\n d[self.n * (0,)] += 0\n p = Polynomial(d)\n return p\n", "old_path": "sageopt/symbolic/polynomials.py", "rewrite": "ReplaceText(target='+=' @(358,39)->(358,40))"} -{"repo": "https://:@github.com/adammhaile/dotconfig.git", "hash": "2fec17b2aa23c329b0570f73cf86c082a914d2cd", "diff": "@@ -76,7 +76,7 @@ class Config(object):\n \r\n # finally, override with given cli args\r\n for k, v in cli_args.iteritems():\r\n- if k not in self._data or k is not None:\r\n+ if k not in self._data or v is not None:\r\n self._data[k] = v\r\n \r\n def __getitem__(self, item):\r\n", "old_path": "dotconfig/__init__.py", "rewrite": "ReplaceText(target='v' @(79,42)->(79,43))"} -{"repo": "https://:@github.com/ralphje/pesigcheck.git", "hash": "a043237a56b6e55a6e8250dde8811883d4ce9d03", "diff": "@@ -125,7 +125,7 @@ class VerificationContext(object):\n intermediates, trust_roots = [], []\n for store in self.stores:\n for cert in store:\n- asn1cert = certificate.to_asn1crypto\n+ asn1cert = cert.to_asn1crypto\n (trust_roots if store.trusted else intermediates).append(asn1cert)\n all_certs[asn1cert] = cert\n \n", "old_path": "signify/context.py", "rewrite": "ReplaceText(target='cert' @(128,27)->(128,38))"} -{"repo": "https://:@github.com/fritzprix/jconfigpy.git", "hash": "535f34af57ff0e5c9673de43f00ded78c17d2347", "diff": "@@ -762,7 +762,7 @@ def prompt_int(item):\n def prompt_hex(item):\n if not isinstance(item, JConfigHex):\n return\n- if item.is_visible():\n+ if not item.is_visible():\n return\n print('\\nCONFIG_{0}'.format(item.get_name()))\n val = 'h'\n", "old_path": "jconfigpy.py", "rewrite": "ReplaceText(target='not ' @(765,7)->(765,7))"} -{"repo": "https://:@github.com/radimsuckr/onesignal-client.git", "hash": "55031d8ffb8b2c9ebd96a5b19f8ecb5daf4035f8", "diff": "@@ -75,7 +75,7 @@ class OneSignal:\n \n notification.id = response[\"id\"]\n \n- return response\n+ return notification\n \n def cancel(self, notification):\n \"\"\"Cancel a notification\n", "old_path": "onesignal/core.py", "rewrite": "ReplaceText(target='notification' @(78,15)->(78,23))"} -{"repo": "https://:@github.com/dmonroy/schema-migrations.git", "hash": "c70624818776029230bfe6438c121fcbcfde2f26", "diff": "@@ -82,7 +82,7 @@ class MigrationController(object):\n if not os.path.isdir(migration_folder):\n continue\n \n- if migration_folder == '__pycache__':\n+ if migration == '__pycache__':\n continue\n \n migration_info = self.migration_info(\n", "old_path": "schema_migrations/__init__.py", "rewrite": "ReplaceText(target='migration' @(85,19)->(85,35))"} -{"repo": "https://:@github.com/EnigmaCurry/nose-test-select.git", "hash": "815e528ec9a2772bddf672b888456154fafbb817", "diff": "@@ -79,7 +79,7 @@ class NoseTestSelect(Plugin):\n for pattern in self.patterns['exclude']:\n file_pattern, method_pattern = pattern.split(':', 1)\n if fnmatch.fnmatch(method_file, file_pattern) and \\\n- fnmatch.fnmatch(method_name, method_pattern):\n+ fnmatch.fnmatch(class_method_name, method_pattern):\n return False\n \n return None\n", "old_path": "nose_test_select/nose_test_select.py", "rewrite": "ReplaceText(target='class_method_name' @(82,31)->(82,42))"} -{"repo": "https://:@github.com/jiwoncpark/baobab.git", "hash": "a6a56166079636e36467522f1854976980648167", "diff": "@@ -49,7 +49,7 @@ class TestDistributions(unittest.TestCase):\n exp_kurtosis = gamma(5/p) * gamma(1/p) / gamma(3/p)**2.0 - 3.0\n #exp_entropy = 1/p - np.log(p / (2 * alpha * gamma(1/p)))\n precision = 2\n- np.testing.assert_almost_equal(sample_mean, mu, precision)\n+ np.testing.assert_almost_equal(sample_mean, exp_mean, precision)\n np.testing.assert_almost_equal(sample_var, exp_var, precision)\n np.testing.assert_almost_equal(sample_skew, exp_skew, precision)\n np.testing.assert_almost_equal(sample_kurtosis, exp_kurtosis, precision)\n", "old_path": "baobab/tests/test_distributions/test_distributions.py", "rewrite": "ReplaceText(target='exp_mean' @(52,52)->(52,54))"} -{"repo": "https://:@github.com/andrewlorente/catsnap.git", "hash": "eec5e151ce2751dbd8ceeded16137e7db353c63b", "diff": "@@ -48,8 +48,8 @@ def view_album(request_format, album_id):\n \n if request_format == 'html':\n return render_template('view_album.html.jinja',\n- images = image_structs,\n+ images=image_structs,\n album=album)\n else:\n- return images\n+ return image_structs\n \n", "old_path": "catsnap/web/controllers/album.py", "rewrite": "ReplaceText(target='image_structs' @(54,15)->(54,21))"} -{"repo": "https://:@github.com/d9pouces/DebTools.git", "hash": "fa678ba16208c0725036f0e5c407b3e39a2cf60e", "diff": "@@ -140,7 +140,7 @@ def main():\n package_names = [x for x in packages_to_create]\n package_names.sort()\n for package_name in package_names:\n- package_version = package_names[package_name]\n+ package_version = packages_to_create[package_name]\n if normalize_package_name(package_name) in excluded_packages:\n print('%s is excluded' % package_name)\n continue\n", "old_path": "debtools/multideb.py", "rewrite": "ReplaceText(target='packages_to_create' @(143,26)->(143,39))"} -{"repo": "https://:@github.com/shiroyuki/passerine.git", "hash": "c9ac93750b7b09b440c8cd53654264d52135c005", "diff": "@@ -79,7 +79,7 @@ class Collection(object):\n \n update_instruction = {'$set': changeset}\n \n- self.api.update({'_id': document.id}, changeset, upsert=upsert)\n+ self.api.update({'_id': document.id}, update_instruction, upsert=upsert)\n \n document.reset_bits()\n \n", "old_path": "tori/db/odm/collection.py", "rewrite": "ReplaceText(target='update_instruction' @(82,46)->(82,55))"} -{"repo": "https://:@github.com/mattian7741/ergo.git", "hash": "13ce6ef335f20303dfa0fac363deebeff08641b6", "diff": "@@ -20,7 +20,7 @@ class VerifyVersionCommand(install):\n def run(self):\n tag = os.getenv('CIRCLE_TAG')\n \n- if tag != VERSION:\n+ if tag == VERSION:\n info = \"Git tag: {0} does not match the version of this app: {1}\".format(\n tag, VERSION\n )\n", "old_path": "setup.py", "rewrite": "ReplaceText(target='==' @(23,15)->(23,17))"} -{"repo": "https://:@github.com/wallento/riscv-python-model.git", "hash": "e62d687b72d75f6d5e6037963c1e533b00cbc1d8", "diff": "@@ -30,7 +30,7 @@ class InstructionAUIPC(InstructionUType):\n class InstructionJAL(InstructionJType):\n def execute(self, model: Model):\n model.state.intreg[self.rd] = model.state.pc + 4\n- model.state.pc = self.imm\n+ model.state.pc += self.imm\n \n \n @isa(\"jalr\", RV32I, opcode=0b1100111, funct3=0b000)\n", "old_path": "riscvmodel/insn.py", "rewrite": "ReplaceText(target='+=' @(33,23)->(33,24))"} -{"repo": "https://:@github.com/wojtekwanczyk/easy_manage.git", "hash": "4b06119cd0c88ad6bdac965479e49b9170163956", "diff": "@@ -125,7 +125,7 @@ class RedfishTools:\n to_find = name_list[0]\n found = None\n for key, value in data.items():\n- if in_or_eq(to_find, key):\n+ if in_or_eq(key, to_find):\n found = self.find(name_list[1:], strict, value, misses)\n else:\n found = self.find(name_list, strict, value, misses-1)\n", "old_path": "easy_manage/tools/redfish_tools.py", "rewrite": "ArgSwap(idxs=0<->1 @(128,15)->(128,23))"} -{"repo": "https://:@github.com/CTSNE/NodeDefender.git", "hash": "62a1dbb0099406b2e1d6e254d69c4d2b764b8ae7", "diff": "@@ -43,7 +43,7 @@ def Current(node):\n ret_data.append(sensor_data)\n \n ret_data.append(node_data)\n- return ret_data\n+ return node_data\n \n def Average(node):\n node = db.session.query(NodeModel).filter(NodeModel.name ==\n", "old_path": "NodeDefender/models/manage/data/node/heat.py", "rewrite": "ReplaceText(target='node_data' @(46,11)->(46,19))"} -{"repo": "https://:@github.com/CTSNE/NodeDefender.git", "hash": "cd60da0847ef6b05456608f19d7235ecb6a53e52", "diff": "@@ -9,7 +9,7 @@ from geopy.geocoders import Nominatim\n def create(name, group, location):\n NodeDefender.db.node.create(name)\n NodeDefender.db.group.add_node(group, name)\n- NodeDefender.db.node.set_location(group, **location)\n+ NodeDefender.db.node.set_location(name, **location)\n NodeDefender.mail.node.new_node(name)\n url = url_for('NodeView.NodesNode', name = serializer.dumps(name))\n emit('redirect', (url), namespace='/general')\n", "old_path": "NodeDefender/frontend/sockets/node.py", "rewrite": "ReplaceText(target='name' @(12,38)->(12,43))"} -{"repo": "https://:@github.com/ShixiangWang/loon.git", "hash": "73ed4c8148e5f4ae188eb76453fee0a2f84133d5", "diff": "@@ -15,7 +15,7 @@ def batch(input, cmds, sep=',', header=False, dry_run=False, _logger=None):\n sys.exit(1)\n \n data = read_csv(input, sep=sep, rm_comment=True)\n- if not header:\n+ if header:\n # Remove header\n _ = data.pop(0)\n \n", "old_path": "src/loon/tool.py", "rewrite": "ReplaceText(target='' @(18,7)->(18,11))"} -{"repo": "https://:@github.com/colemanja91/pyeloqua.git", "hash": "30aaf05072a734ac40836ae4542844b05c6abb25", "diff": "@@ -384,7 +384,7 @@ class Eloqua(object):\n \n try:\n test1 = datetime.strptime(start, '%Y-%m-%d %H:%M:%S')\n- test2 = datetime.strptime(start, '%Y-%m-%d %H:%M:%S')\n+ test2 = datetime.strptime(end, '%Y-%m-%d %H:%M:%S')\n except:\n raise ValueError(\"Invalid datetime format; use 'YYYY-MM-DD hh:mm:ss'\")\n \n", "old_path": "pyeloqua/pyeloqua.py", "rewrite": "ReplaceText(target='end' @(387,38)->(387,43))"} -{"repo": "https://:@github.com/colemanja91/pyeloqua.git", "hash": "aa8d74f801c77ed45e1dda75a4a5008584f5a7ee", "diff": "@@ -388,7 +388,7 @@ class Eloqua(object):\n except:\n raise ValueError(\"Invalid datetime format; use 'YYYY-MM-DD hh:mm:ss'\")\n \n- if (entity!='activities' or (entity in ['contacts', 'accounts'] and field in ['createdAt', 'updatedAt'])):\n+ if (entity!='activities' or (entity in ['contacts', 'accounts'] and field not in ['createdAt', 'updatedAt'])):\n fieldDef = self.GetFields(entity=entity, fields=[field], cdoID=cdoID)\n \n if (fieldDef[0]['dataType'] != 'date'):\n", "old_path": "pyeloqua/pyeloqua.py", "rewrite": "ReplaceText(target=' not in ' @(391,81)->(391,85))"} -{"repo": "https://:@github.com/catalogicsoftware/kubedrctl.git", "hash": "c63739163b5305947daf5bb0fc8c36e6f69f9e30", "diff": "@@ -25,7 +25,7 @@ def cli(ctx, accesskey, secretkey, repopwd, endpoint, bucket, targetdir, snapid)\n \n \"\"\"\n \n- if not accesskey or not secretkey or not repopwd or not endpoint or not bucket and not targetdir:\n+ if not accesskey or not secretkey or not repopwd or not endpoint or not bucket or not targetdir:\n raise Exception('One of the required parameters (accesskey, secretkey, repopwd, endpoint, bucket, targetdir) is missing. ')\n \n params = {\n", "old_path": "kubedrctl/cli/commands/cmd_restore.py", "rewrite": "ReplaceText(target='or' @(28,83)->(28,86))"} -{"repo": "https://:@github.com/celliern/energy_plus_wrapper.git", "hash": "4dcb0b83b81bcaed91696567caea30c80a01ca5c", "diff": "@@ -85,7 +85,7 @@ def _build_command_line(tmp, idd_file, idf_file, weather_file,\n \"-w\", tmp / weather_file.basename(),\n \"-p\", prefix,\n \"-d\", tmp.abspath()] +\n- ([\"-i\", tmp / idf_file.basename()]\n+ ([\"-i\", tmp / idd_file.basename()]\n if idd_file is not None else []) +\n [\"-s\", \"d\",\n \"-r\",\n", "old_path": "src/energyplus_wrapper/main.py", "rewrite": "ReplaceText(target='idd_file' @(88,33)->(88,41))"} -{"repo": "https://:@github.com/shuoli84/gevent_socketio2.git", "hash": "7eed4169f86cd7522cab0ef7552da0f2187d7b6c", "diff": "@@ -228,7 +228,7 @@ class Socket(EventEmitter):\n def ping_timeout():\n pass\n \n- self.ping_timeout_job = gevent.spawn_later(ping_timeout, self.ping_timeout)\n+ self.ping_timeout_job = gevent.spawn_later(self.ping_timeout, ping_timeout)\n \n if 'open' == self.ready_state or 'opening' == self.ready_state:\n self.ping_job = gevent.spawn_later(self.ping_interval/1000, ping)\n", "old_path": "socketio_client/engine/socket.py", "rewrite": "ArgSwap(idxs=0<->1 @(231,36)->(231,54))"} -{"repo": "https://:@bitbucket.org/berkeleylab/pypixie16.git", "hash": "f7202b4fe9fa06ce4a176f5c694ab0210ab43630", "diff": "@@ -70,7 +70,7 @@ def read_list_mode_data(filename, progress=False, keep_trace=False):\n # about 300x faster than multiple f.read(2)\n trace = np.fromfile(f, '({},2)(73,23))"} -{"repo": "https://:@bitbucket.org/berkeleylab/pypixie16.git", "hash": "9a9d982f2880a48b4a723f395589a491d673daf5", "diff": "@@ -90,7 +90,7 @@ def calculate_CFD(traces, t=None, CFD_threshold=None, w=1, B=5, D=5, L=1, Nbkgd=\n CFD = CFD[0]\n errors = errors[0]\n \n- return CFD, cfdtime, errors\n+ return CFD, cfdtrigger, errors\n \n \n def calculate_CFD_using_FF(traces, t=None, CFD_threshold=None, w=1, B=5, D=5, L=1, Nbkgd=100):\n", "old_path": "analyze.py", "rewrite": "ReplaceText(target='cfdtrigger' @(93,16)->(93,23))"} -{"repo": "https://:@github.com/toros-astro/corral.git", "hash": "51ffc50bbb290899fb9e64f5719903c1ba987e3d", "diff": "@@ -15,7 +15,7 @@ import importlib\n \n def to_namedtuple(name, d):\n keys = list(d.keys())\n- namedtuple = collections.namedtuple(name, d)\n+ namedtuple = collections.namedtuple(name, keys)\n return namedtuple(**d)\n \n \n", "old_path": "corral/util.py", "rewrite": "ReplaceText(target='keys' @(18,46)->(18,47))"} -{"repo": "https://:@github.com/karimbahgat/PyAgg.git", "hash": "23867f72529c5843bd585a0124a9b67099bd8ed9", "diff": "@@ -11,7 +11,7 @@ def test_smoothline():\n smooth=True,\n fillcolor=(222,0,0),\n fillsize=2)\n- canvas.draw_text((50,50), \"Hello\", textfont=\"segoe print bold\", textsize=55)\n+ canvas.draw_text(\"Hello\", (50,50), textfont=\"segoe print bold\", textsize=55)\n return canvas\n \n def test_histogram():\n", "old_path": "graph_tester.py", "rewrite": "ArgSwap(idxs=0<->1 @(14,4)->(14,20))"} -{"repo": "https://:@github.com/nikist97/Python-DataStructures.git", "hash": "c6621b3e0914f635762da1e16298441534b5758c", "diff": "@@ -1345,7 +1345,7 @@ class DuplicatePriorityQueue(PriorityQueue):\n if self.type() is not None and type(element) != self.type():\n raise TypeError(\"Type of the parameter is not \" + str(self.type()))\n \n- if self.has_duplicates():\n+ if not self.has_duplicates():\n return super().contains_element(element)\n \n for test_element in self.__elements.values():\n", "old_path": "ADTs/AbstractDataStructures.py", "rewrite": "ReplaceText(target='not ' @(1348,11)->(1348,11))"} -{"repo": "https://:@github.com/heewinkim/hian.git", "hash": "2c199eaf141fc1fa049c3c7b9eaf56731b8d4694", "diff": "@@ -62,7 +62,7 @@ class PyAlgorithm(object):\n intersection = intersection.intersection(box_)\n \n if intersection.area == box_list[0].area:\n- if intersection.area == PyAlgorithm.unionRects(rect_list).area:\n+ if intersection.area <= PyAlgorithm.unionRects(rect_list).area:\n return intersection\n else:\n return box(0,0,0,0)\n", "old_path": "utilpack/core/algorithm.py", "rewrite": "ReplaceText(target='<=' @(65,33)->(65,35))"} -{"repo": "https://:@bitbucket.org/whatshap/whatshap.git", "hash": "e6a843308297d2a4b170ea9feffc33159a40ea91", "diff": "@@ -365,7 +365,7 @@ def run_whatshap(phase_input_files, variant_file, reference=None,\n \t\t\t# for each family.\n \t\t\tfor representative_sample, family in families.items():\n \t\t\t\tif len(family) == 1:\n-\t\t\t\t\tlogger.info('---- Processing individual %s', sample)\n+\t\t\t\t\tlogger.info('---- Processing individual %s', representative_sample)\n \t\t\t\telse:\n \t\t\t\t\tlogger.info('---- Processing family with individuals: %s', ','.join(family))\n \t\t\t\tmax_coverage_per_sample = max(1, max_coverage // len(family))\n", "old_path": "whatshap/phase.py", "rewrite": "ReplaceText(target='representative_sample' @(368,50)->(368,56))"} -{"repo": "https://:@bitbucket.org/whatshap/whatshap.git", "hash": "cd3f978e88fe07fb886ad4026b35979962bf0d14", "diff": "@@ -163,7 +163,7 @@ def eval_overlap(n1, n2):\n \toverlap = zip(n1['sites'][hang1:], n2['sites'])\n \tmatch, mismatch = (0, 0)\n \tfor (c1, c2) in overlap:\n-\t\tif c1 in ['A', 'C', 'G', 'T'] and c1 in ['A', 'C', 'G', 'T']:\n+\t\tif c1 in ['A', 'C', 'G', 'T'] and c2 in ['A', 'C', 'G', 'T']:\n \t\t\tif c1 == c2:\n \t\t\t\tmatch += 1\n \t\t\telse:\n", "old_path": "whatshap/cli/phase.py", "rewrite": "ReplaceText(target='c2' @(166,36)->(166,38))"} -{"repo": "https://:@github.com/zach-king/oink.git", "hash": "4580509c05ac17322f1ac19cffbee9dde781e902", "diff": "@@ -114,7 +114,7 @@ def route(command):\n arg_index = command_args_length - given_args_length\n if arg_index >= len(comm['required_args']):\n arg_index = 0\n- error = colorize(comm['required_args'][arg_index], 'blue') + ' is required'\n+ error = colorize(comm['required_args'][given_args_length], 'blue') + ' is required'\n elif given_args_length > max_args_length:\n error = '{} argument(s) were expected, but {} were given.'.format(\n command_args_length, given_args_length)\n", "old_path": "oink/router.py", "rewrite": "ReplaceText(target='given_args_length' @(117,55)->(117,64))"} -{"repo": "https://:@github.com/Mordred/certbot-plugin-websupport.git", "hash": "b170de9b1db0678ac502540948f1cd062d2f84b9", "diff": "@@ -95,7 +95,7 @@ class _WebsupportClient(object):\n }\n \n logger.debug('Attempting to add record to zone %s: %s', zone_id, data)\n- response = self._send_request('POST', '/v1/user/self/zone/{0}/record'.format(domain), data)\n+ response = self._send_request('POST', '/v1/user/self/zone/{0}/record'.format(zone_id), data)\n \n if response.status_code != 200 and response.status_code != 201:\n raise errors.PluginError('Error communicating with Websupport API: {0}'.format(response.status_code))\n", "old_path": "certbot_plugin_websupport/dns.py", "rewrite": "ReplaceText(target='zone_id' @(98,85)->(98,91))"} -{"repo": "https://:@github.com/riot-appstore/memory_map_manager.git", "hash": "4a4ea7729853b223ad080495226a2dbae5082e29", "diff": "@@ -12,7 +12,7 @@ from gen_helpers import to_underscore_case\n \n \n def _parse_filename(f_arg, d_arg, name_contains):\n- if f_arg is None:\n+ if f_arg is not None:\n for file in os.listdir(os.path.join(os.path.dirname(__file__), d_arg)):\n if file.endswith(\".json\"):\n if name_contains in file:\n", "old_path": "memory_map_manager/code_gen.py", "rewrite": "ReplaceText(target=' is not ' @(15,12)->(15,16))"} -{"repo": "https://:@github.com/PlaceDevs/place-scraper.git", "hash": "c13614931c14e05a2cf8efcc0ef70706f9f56315", "diff": "@@ -142,7 +142,7 @@ class PlaceScraper(object):\n \n def handle_batch_place(self, frame):\n for x in frame['payload']:\n- self.handle_place(frame)\n+ self.handle_place(x)\n \n \n def main():\n", "old_path": "placescraper/base.py", "rewrite": "ReplaceText(target='x' @(145,30)->(145,35))"} -{"repo": "https://:@github.com/niklasf/python-agentspeak.git", "hash": "e102065b7df1fd92c539be5c3bd2a012edcec740", "diff": "@@ -165,7 +165,7 @@ def _member(env, agent, term, intention):\n choicepoint = object()\n \n for member in pyson.evaluate(term.args[1], intention.scope):\n- agent.stack.append(choicepoint)\n+ intention.stack.append(choicepoint)\n \n if pyson.unify(term.args[0], member, intention.scope, intention.stack):\n yield\n", "old_path": "pyson/stdlib.py", "rewrite": "ReplaceText(target='intention' @(168,8)->(168,13))"} -{"repo": "https://:@github.com/thepinkowl/tuyaha-float.git", "hash": "8c48c10d8d8bda1f996551e16820d6c9cc1ea82f", "diff": "@@ -165,7 +165,7 @@ class TuyaApi:\n json = data\n )\n if not response.ok:\n- _LOGGER.warning(\"request error, status code is %d, device %s\", devId, response.status_code)\n+ _LOGGER.warning(\"request error, status code is %d, device %s\", response.status_code, devId)\n return\n response_json = response.json()\n if response_json['header']['code'] != 'SUCCESS':\n", "old_path": "tuyaha/tuyaapi.py", "rewrite": "ArgSwap(idxs=1<->2 @(168,12)->(168,27))"} -{"repo": "https://:@github.com/shane-breeze/atuproot.git", "hash": "206e736a62c914f577717679adc3f16b9fa1d6b7", "diff": "@@ -36,7 +36,7 @@ class EventSumsProducer(object):\n event.METnoX_diMuonParaProjPt_Minus_DiMuon_pt = dimu_para - dimu_pt\n event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt = dimu_perp + dimu_pt\n event.METnoX_diMuonParaProjPt_Div_DiMuon_pt = dimu_para / dimu_pt\n- event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_para + dimu_pt) / dimu_pt\n+ event.METnoX_diMuonPerpProjPt_Plus_DiMuon_pt_Div_DiMuon_pt = (dimu_perp + dimu_pt) / dimu_pt\n \n # MHT\n ht, mht, mhphi = create_mht(\n", "old_path": "sequence/Readers/EventSumsProducer.py", "rewrite": "ReplaceText(target='dimu_perp' @(39,70)->(39,79))"} -{"repo": "https://:@github.com/lpryszcz/redundans.git", "hash": "4a62bd283b434b2faebbab9b82fd6a333bfad8ea", "diff": "@@ -65,7 +65,7 @@ def get_libraries(fastq, fasta, mapq, threads, verbose, limit=0):\n # add libraries strating from lowest insert size\n for fq1, fq2, ismedian, ismean, isstd, pairs in sorted(libdata, key=lambda x: x[3]):\n # add new library set if \n- if not libraries or ismedian > 1.5*libraries[-1][4][0]:\n+ if not libraries or ismean > 1.5*libraries[-1][4][0]:\n # libnames, libFs, libRs, orientations, libIS, libISStDev\n libraries.append([[], [], [], [], [], []])\n i = 1\n", "old_path": "redundans.py", "rewrite": "ReplaceText(target='ismean' @(68,28)->(68,36))"} -{"repo": "https://:@github.com/hammerlab/epitopes.git", "hash": "0d8477a0e957f316d6005ba87853d1699307e0f5", "diff": "@@ -223,7 +223,7 @@ def mutate_protein_from_transcript(\n seq = str(seq_region),\n start = start_pos,\n stop = end_pos,\n- mutation_start = aa_position,\n+ mutation_start = mutation_start_pos_in_region,\n n_removed = n_aa_deleted,\n n_inserted = n_aa_inserted,\n annot = annot)\n", "old_path": "epitopes/mutate.py", "rewrite": "ReplaceText(target='mutation_start_pos_in_region' @(226,25)->(226,36))"} -{"repo": "https://:@gitlab.com/pjbecotte/settingscascade.git", "hash": "390778a0958c04c13ef365b4c0c159f7d353ba3e", "diff": "@@ -45,7 +45,7 @@ class Item:\n self.items.add(val)\n count[key] += 1\n if key == \"el\":\n- self.el = key\n+ self.el = val\n \n self.score = Score(count[\"id\"], count[\"class\"], count[\"el\"])\n \n", "old_path": "src/settingscascade/selector.py", "rewrite": "ReplaceText(target='val' @(48,26)->(48,29))"} -{"repo": "https://:@github.com/Javinator9889/ServiceCreator.git", "hash": "f874aa280e7860ed7603d182fca0c62997debbb4", "diff": "@@ -81,7 +81,7 @@ def makeBashScript(filename: str, new_sh_file: str):\n pprint(script_content)\n pprint(script_content[0].rstrip())\n pprint(script_content[0].strip())\n- if (script_content[0].rstrip() != OP_BASH_HEADER) or (script_content[0].rstrip() != OP_SH_HEADER):\n+ if (script_content[0].rstrip() != OP_BASH_HEADER) and (script_content[0].rstrip() != OP_SH_HEADER):\n script_content.insert(0, OP_SH_HEADER + \"\\n\\n\")\n usr_exec_file = os.path.basename(new_sh_file)\n pprint(script_content)\n", "old_path": "service_creator/utils/__init__.py", "rewrite": "ReplaceText(target='and' @(84,54)->(84,56))"} -{"repo": "https://:@github.com/AlexeyTrekin/pansharpen.git", "hash": "ab65f7248e7b2fbac5f5ac43ff0af7c8902766e3", "diff": "@@ -54,7 +54,7 @@ def scale(img, dtype,\n if np.issubdtype(dtype, np.integer):\n if out_min is None:\n out_min = np.iinfo(dtype).min\n- if in_max is None:\n+ if out_max is None:\n out_max = np.iinfo(dtype).max\n # default range for float is 0:1\n else:\n", "old_path": "pysharpen/preprocessing/type_conversion.py", "rewrite": "ReplaceText(target='out_max' @(57,11)->(57,17))"} -{"repo": "https://:@github.com/hendrikx-itc/python-minerva.git", "hash": "6044f69ae630756a5e2ba468cc1da4f1ea904725", "diff": "@@ -64,7 +64,7 @@ def names_to_entity_ids(cursor, entity_type: str, names: List[str]) -> List[int]\n \n for name, entity_id in rows:\n if entity_id is None:\n- entity_id = create_entity_from_name(cursor, entity_type, name)\n+ entity_id = create_entity_from_name(cursor, entity_type_name, name)\n \n entity_ids.append(entity_id)\n \n", "old_path": "src/minerva/directory/helpers.py", "rewrite": "ReplaceText(target='entity_type_name' @(67,56)->(67,67))"} -{"repo": "https://:@github.com/maykinmedia/django-better-admin-arrayfield.git", "hash": "4ff331cf5b11f24e87e5573d36960802603a5773", "diff": "@@ -30,7 +30,7 @@ class DynamicArrayField(forms.Field):\n )\n if errors:\n raise forms.ValidationError(list(chain.from_iterable(errors)))\n- if cleaned_data and self.required:\n+ if not cleaned_data and self.required:\n raise forms.ValidationError(self.error_messages[\"required\"])\n return cleaned_data\n \n", "old_path": "django_better_admin_arrayfield/forms/fields.py", "rewrite": "ReplaceText(target='not ' @(33,11)->(33,11))"} -{"repo": "https://:@github.com/gsanhueza/BlastSight.git", "hash": "e569ea39b5e97a60abf3e0d8a75eb4f7299b00b9", "diff": "@@ -22,7 +22,7 @@ class NormalMode(Mode):\n self.set_z_rotation(widget, widget.zWorldRot + dx)\n elif event.buttons() == Qt.RightButton:\n self.set_x_rotation(widget, widget.xWorldRot + dy)\n- self.set_y_rotation(widget, widget.yWorldRot - dx)\n+ self.set_y_rotation(widget, widget.yWorldRot + dx)\n elif event.buttons() == Qt.MiddleButton:\n # FIXME Dependent on aspect ratio\n distance_x = 200 * abs(widget.zCameraPos + widget.centroid[2]) / widget.width()\n", "old_path": "libraries/Controller/normalmode.py", "rewrite": "ReplaceText(target='+' @(25,57)->(25,58))"} -{"repo": "https://:@github.com/gsanhueza/BlastSight.git", "hash": "ba4c91b6850cb04fec7d049d0f20e7ea86b79454", "diff": "@@ -34,7 +34,7 @@ class LineGL(GLDrawable):\n \n # Fill buffers (see GLDrawable)\n self.fill_buffer(_POSITION, 3, vertices, GLfloat, GL_FLOAT, self.vbos[_POSITION])\n- self.fill_buffer(_COLOR, 4, colors, GLfloat, GL_FLOAT, self.vbos[_POSITION])\n+ self.fill_buffer(_COLOR, 4, colors, GLfloat, GL_FLOAT, self.vbos[_COLOR])\n \n glVertexAttribDivisor(_COLOR, 1)\n \n", "old_path": "blastsight/view/drawables/linegl.py", "rewrite": "ReplaceText(target='_COLOR' @(37,73)->(37,82))"} -{"repo": "https://:@github.com/clemsciences/comparison_sigurdr_siegfried.git", "hash": "1d6a62eda93744950d2959abd1c2389b12d70d97", "diff": "@@ -57,7 +57,7 @@ def read_txt(main_link: str) -> List:\n \"\"\"\n retrieved_texts = []\n directory = \"extracted_\" + main_link.split(\"/\")[-1].split(\".\")[0][:-3]\n- if os.path.exists(directory):\n+ if not os.path.exists(directory):\n nib_scripts.extract_tei_from_html()\n for i in range(1, len(os.listdir(directory))):\n filename = os.path.join(directory, str(i) + \".txt\")\n", "old_path": "sigurd/nib_augsburg/nib_reader.py", "rewrite": "ReplaceText(target='not ' @(60,7)->(60,7))"} -{"repo": "https://:@github.com/cfhamlet/os-3m-engine.git", "hash": "b6a8890df08b38e6201e3b8cc18e870a7f61fda4", "diff": "@@ -89,7 +89,7 @@ def create(frontend_cls='os_m3_engine.ootb.StdinFrontend',\n default_engine_transport_config = ENGINE_TRANSPORT_BRIDGE_CONFIG \\\n if backend_cls is not None else ENGINE_TRANSPORT_CONFIG\n \n- e_transport_config = engine_backend_config\n+ e_transport_config = engine_transport_config\n if engine_transport_config in (ENGINE_TRANSPORT_CONFIG, ENGINE_TRANSPORT_BRIDGE_CONFIG):\n e_transport_config = None\n \n", "old_path": "src/os_m3_engine/launcher.py", "rewrite": "ReplaceText(target='engine_transport_config' @(92,25)->(92,46))"} -{"repo": "https://:@github.com/dstegelman/python-usps.git", "hash": "88e04fab6f7c4b8024558de10796513b6b355333", "diff": "@@ -57,7 +57,7 @@ class USPSAddressService(object):\n if root.tag == 'Error':\n raise USPSXMLError(root)\n error = root.find('.//Error')\n- if error is None:\n+ if error is not None:\n raise USPSXMLError(error)\n return root\n \n", "old_path": "usps/addressinformation/base.py", "rewrite": "ReplaceText(target=' is not ' @(60,16)->(60,20))"} -{"repo": "https://:@github.com/NiklasRosenstein/upython.git", "hash": "9ccceff81d433a6220665e53a1938522df4fdf0c", "diff": "@@ -120,7 +120,7 @@ def _check_include_file(filename, include_patterns, exclude_patterns):\n \n \n def is_virtualenv():\n- return hasattr(sys, 'real_prefix') or (sys.prefix == sys.base_prefix)\n+ return hasattr(sys, 'real_prefix') or (sys.prefix != sys.base_prefix)\n \n \n class PackageNotFound(Exception):\n", "old_path": "lib/install.py", "rewrite": "ReplaceText(target='!=' @(123,52)->(123,54))"} -{"repo": "https://:@github.com/NYTimes/kaichu.git", "hash": "357040e9a665e2eb1cf99654a220741c625b347e", "diff": "@@ -53,7 +53,7 @@ class KaichuManager(object):\n else:\n return True\n else:\n- return True\n+ return False\n \n def __init__(self, tissue, options, noseconfig):\n \n", "old_path": "kaichu/kaichu/interface.py", "rewrite": "ReplaceText(target='False' @(56,19)->(56,23))"} -{"repo": "https://:@github.com/jflaherty/phishnet_api_v3.git", "hash": "738aa8a756f8f816459af12dc10d8763dfb1136c", "diff": "@@ -24,7 +24,7 @@ def check_apikey(f):\n \n def check_authkey(f):\n def wrapper(*args, **kwargs):\n- if not args[0].authkey and not args[0].uid == args[1]:\n+ if not args[0].authkey or not args[0].uid == args[1]:\n args[0].authorize(args[1])\n return f(*args, **kwargs)\n return wrapper\n", "old_path": "phishnet_api_v3/decorators.py", "rewrite": "ReplaceText(target='or' @(27,31)->(27,34))"} -{"repo": "https://:@github.com/gxx/pathresolver.git", "hash": "9ff96ef6ac8c6fe324fb2007cc769016b9a0f085", "diff": "@@ -10,7 +10,7 @@ MATCH_ALL = '*'\n \n # ---- Basic Resolvers ---- #\n # Resolve by Attribute\n-attribute_resolver = KeyResolver(lambda k, v: getattr(k, v), (AttributeError, TypeError))\n+attribute_resolver = KeyResolver(lambda k, v: getattr(v, k), (AttributeError, TypeError))\n \n # Resolve by Key (i.e. dictionary)\n key_lookup_resolver = KeyResolver(lambda k, v: v[k], (KeyError, TypeError))\n", "old_path": "pathresolver/resolver/resolvers.py", "rewrite": "ArgSwap(idxs=0<->1 @(13,46)->(13,53))"} -{"repo": "https://:@github.com/frank2/schizophrenia.git", "hash": "443bfd84c89aa270ba30bdeb303a616354959d34", "diff": "@@ -305,7 +305,7 @@ class Manager(object):\n def launch_task(self, task_obj, *args, **kwargs):\n tid_obj = self.register_task(task_obj)\n task_obj.run(*args, **kwargs)\n- return tid_obj\n+ return task_obj\n \n def spawn_task(self, task_name, *args, **kwargs):\n return self.launch_task(self.create_task(task_name), *args, **kwargs)\n", "old_path": "schizophrenia/manager.py", "rewrite": "ReplaceText(target='task_obj' @(308,15)->(308,22))"} -{"repo": "https://:@github.com/hibtc/madqt.git", "hash": "f832813972a0b40d95237d0c645157c550772e0d", "diff": "@@ -410,7 +410,7 @@ class Model:\n \n # shortcut for thin elements:\n if float(self.elements[ix].length) == 0:\n- return y[x]\n+ return y[ix]\n \n lo = x.start-1 if x.start > 0 else x.start\n hi = x.stop+1\n", "old_path": "src/madgui/model/madx.py", "rewrite": "ReplaceText(target='ix' @(413,21)->(413,22))"} -{"repo": "https://:@github.com/soulhave/woven-gutter-gae.git", "hash": "33b93fde1ae059d1ad2911ef221eb0131ffebcff", "diff": "@@ -100,7 +100,7 @@ class SwitchManager(ModelDict):\n conditions = self.get(key)\n if not conditions:\n # XXX: option to have default return value?\n- return False\n+ return True\n \n conditions = conditions.value\n if conditions.get('global'):\n", "old_path": "gargoyle/models.py", "rewrite": "ReplaceText(target='True' @(103,19)->(103,24))"} -{"repo": "https://:@github.com/soulhave/woven-gutter-gae.git", "hash": "a2b6a601ae849f4c610967c28fe469b02fd8f730", "diff": "@@ -6,4 +6,4 @@ class SwitchAdmin(admin.ModelAdmin):\n list_filter = ('status',)\n search_fields = ('label', 'key', 'value')\n \n-admin.site.register(SwitchAdmin, Switch)\n\\ No newline at end of file\n+admin.site.register(Switch, SwitchAdmin)\n\\ No newline at end of file\n", "old_path": "gargoyle/admin.py", "rewrite": "ArgSwap(idxs=0<->1 @(9,0)->(9,19))"} -{"repo": "https://:@github.com/combatopera/aridity.git", "hash": "46f2e7adf7dace0001676c27a9811a55183e53f1", "diff": "@@ -72,7 +72,7 @@ class AbstractContext(Resolvable): # TODO LATER: Some methods should probably be\n c = self\n for name in path[:-1]:\n that = self.resolvables.get(name)\n- that = Context(c) if that is None else that.resolve(c)\n+ c = Context(c) if that is None else that.resolve(c)\n \n del c\n \n", "old_path": "aridimpl/context.py", "rewrite": "ReplaceText(target='c' @(75,12)->(75,16))"} -{"repo": "https://:@github.com/hudora/huDjango.git", "hash": "874df198c5508223ff55fd96539fda603f660a81", "diff": "@@ -50,7 +50,7 @@ class ClientTrackMiddleware(object):\n request.clienttrack_last_visit = request.clienttrack_first_visit = None\n \n def process_response(self, request, response):\n- if (not getattr('clienttrack_prohibit', request, False)) or not request.clienttrack_first_visit:\n+ if (not getattr(request, 'clienttrack_prohibit', False)) or not request.clienttrack_first_visit:\n # even if clienttrack_prohibit is True, we we set the cookie for first time visitors. \n if not request.clienttrack_first_visit:\n request.clienttrack_first_visit = time.time()\n", "old_path": "hudjango/middleware/clienttrack.py", "rewrite": "ArgSwap(idxs=0<->1 @(53,16)->(53,23))"} -{"repo": "https://:@gitlab.com/cossartlab/cicada.git", "hash": "f25250e95ffb716ac3e8bc60be839b9b1e10497d", "diff": "@@ -453,7 +453,7 @@ class CicadaTransientAmplitudeAnalysis(CicadaAnalysis):\n ax1.set_facecolor(background_color)\n fig.patch.set_facecolor(background_color)\n \n- svm = sns.catplot(x=x_axis_name, y=\"MeanProminence\", hue=hue, data=gobal_amplitude_data_table,\n+ svm = sns.catplot(x=x_axis_name, y=\"MeanProminence\", hue=hue, data=data_table,\n hue_order=None,\n kind=kind, orient=None, color=fig_facecolor, palette=palette, ax=ax1)\n \n", "old_path": "src/cicada/analysis/cicada_transient_amplitude_analysis.py", "rewrite": "ReplaceText(target='data_table' @(456,75)->(456,101))"} -{"repo": "https://:@github.com/gtoonstra/sqlineage.git", "hash": "cb395147b4f4c81248642228da9739995db2bb71", "diff": "@@ -15,7 +15,7 @@ class TestSimpleInsert(unittest.TestCase):\n self.result = []\n \n def verify_result(self, expected):\n- self.assertEqual(self.result, expected)\n+ self.assertEqual(expected, self.result)\n \n def run_test(self, filename, expected):\n self.clear_result()\n", "old_path": "tests/test_simple_insert.py", "rewrite": "ArgSwap(idxs=0<->1 @(18,8)->(18,24))"} -{"repo": "https://:@github.com/iamjli/keggx.git", "hash": "c311827d187f2f04dbe6389ed3f274c8b978d703", "diff": "@@ -386,6 +386,6 @@ def output_DiGraph_as_graphml(graph, path):\n \tfor source,target in list(graph_out.edges): \n \t\tif graph_out.has_edge(target, source): graph_out.remove_edge(source, target)\n \n-\tnx.write_graphml(graph, path)\n+\tnx.write_graphml(graph_out, path)\n \n \treturn path\n", "old_path": "src/KEGGX.py", "rewrite": "ReplaceText(target='graph_out' @(389,18)->(389,23))"} -{"repo": "https://:@github.com/sgammon/canteen.git", "hash": "a08718c0c160e698968f8cbebb367ba22df0370a", "diff": "@@ -569,7 +569,7 @@ class RedisAdapter(DirectedGraphAdapter):\n elif cls.EngineConfig.mode == RedisMode.hashkey_blob:\n \n # build key and extract group\n- desired_key = model.Key.from_raw(flattened)\n+ desired_key = model.Key.from_raw(joined)\n root = (ancestor for ancestor in desired_key.ancestry).next()\n tail = (\n desired_key.flatten(True)[0].replace(root.flatten(True)[0], '') or (\n", "old_path": "canteen/model/adapter/redis.py", "rewrite": "ReplaceText(target='joined' @(572,41)->(572,50))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "5b5665a3859f663e8709e16e5e8207344716ecfd", "diff": "@@ -50,7 +50,7 @@ def plot_corr(dcorr, xnames=None, ynames=None, title=None, normcolor=False,\n if ax is None:\n create_colorbar = True\n else:\n- create_colorbar = True\n+ create_colorbar = False\n \n fig, ax = utils.create_mpl_ax(ax)\n from matplotlib import cm\n", "old_path": "scikits/statsmodels/graphics/correlation.py", "rewrite": "ReplaceText(target='False' @(53,26)->(53,30))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "e2e40c4c53e8e87c98423da5c648c25d1ed24799", "diff": "@@ -69,5 +69,5 @@ def bkfilter(X, low=6, high=32, K=12):\n bweights -= bweights.mean() # make sure weights sum to zero\n if X.ndim == 2:\n bweights = bweights[:,None]\n- return fftconvolve(bweights, X, mode='valid') # get a centered moving avg/\n+ return fftconvolve(X, bweights, mode='valid') # get a centered moving avg/\n # convolution\n", "old_path": "statsmodels/tsa/filters/bk_filter.py", "rewrite": "ArgSwap(idxs=0<->1 @(72,11)->(72,22))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "38a7e8ec399169b49185265450c1a6dbdf423c2f", "diff": "@@ -99,7 +99,7 @@ class QuantReg(RegressionModel):\n beta = np.ones(rank) # TODO: better start\n diff = 10\n \n- while itrat < 1000 or diff > 1e-6:\n+ while itrat < 1000 and diff > 1e-6:\n itrat += 1\n beta0 = beta\n beta = dot(pinv(dot(xstar.T, exog)), xstar.T, endog)\n", "old_path": "statsmodels/regression/quantreg.py", "rewrite": "ReplaceText(target='and' @(102,27)->(102,29))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "d9b699a35e1c148891fe77831cb840c3a8410c35", "diff": "@@ -158,7 +158,7 @@ def lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, is_sorted=False,\n \n if not is_sorted:\n # Sort both inputs according to the ascending order of x values\n- sort_index = np.argsort(exog)\n+ sort_index = np.argsort(x)\n x = np.array(x[sort_index])\n y = np.array(y[sort_index])\n \n", "old_path": "statsmodels/nonparametric/smoothers_lowess.py", "rewrite": "ReplaceText(target='x' @(161,32)->(161,36))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "7b29fa27d738c9c60f2a79df77b3b523a2d78028", "diff": "@@ -171,7 +171,7 @@ def lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, is_sorted=False,\n # rebuild yfitted with original indices\n # a bit messy: y might have been selected twice\n if not is_sorted:\n- yfitted_ = np.empty_like(endog)\n+ yfitted_ = np.empty_like(y)\n yfitted_.fill(np.nan)\n yfitted_[sort_index] = yfitted\n yfitted = yfitted_\n", "old_path": "statsmodels/nonparametric/smoothers_lowess.py", "rewrite": "ReplaceText(target='y' @(174,37)->(174,42))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "d1ed308fa17c86b94a41ee568e896751a4ca6f26", "diff": "@@ -433,7 +433,7 @@ class VARMAX(MLEModel):\n if self.measurement_error:\n # Force these to be positive\n constrained[self._params_obs_cov] = (\n- constrained[self._params_obs_cov]**2)\n+ unconstrained[self._params_obs_cov]**2)\n \n return constrained\n \n", "old_path": "statsmodels/tsa/statespace/varmax.py", "rewrite": "ReplaceText(target='unconstrained' @(436,16)->(436,27))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "8a0a1a18dcbb5701937c4466a7724813cc870b60", "diff": "@@ -815,7 +815,7 @@ class GLM(base.LikelihoodModel):\n \"\"\"\n \n if (max_start_irls > 0) and (start_params is None):\n- irls_rslt = self._fit_irls(start_params=start_params, maxiter=maxiter,\n+ irls_rslt = self._fit_irls(start_params=start_params, maxiter=max_start_irls,\n tol=tol, scale=scale, cov_type=cov_type,\n cov_kwds=cov_kwds, use_t=use_t, **kwargs)\n start_params = irls_rslt.params\n", "old_path": "statsmodels/genmod/generalized_linear_model.py", "rewrite": "ReplaceText(target='max_start_irls' @(818,74)->(818,81))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "6882e53d5cfd5d2b3dc2d08f480f6529ac0883d7", "diff": "@@ -158,7 +158,7 @@ class Model(object):\n if len(cols) < len(exog.columns):\n exog = exog[cols]\n cols = list(design_info.term_names)\n- for col in cols:\n+ for col in drop_cols:\n try:\n cols.remove(col)\n except ValueError:\n", "old_path": "statsmodels/base/model.py", "rewrite": "ReplaceText(target='drop_cols' @(161,27)->(161,31))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "2f20e7e54fc4afcc367a8b858f107eacd5ff607f", "diff": "@@ -1998,7 +1998,7 @@ class MixedLM(base.LikelihoodModel):\n for meth in method:\n if meth.lower() in [\"newton\", \"ncg\"]:\n raise ValueError(\n- \"method %s not available for MixedLM\" % method)\n+ \"method %s not available for MixedLM\" % meth)\n \n self.reml = reml\n self.cov_pen = cov_pen\n", "old_path": "statsmodels/regression/mixed_linear_model.py", "rewrite": "ReplaceText(target='meth' @(2001,60)->(2001,66))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "b35f775ec7358aae763f23c6dc7a9f158680b234", "diff": "@@ -1869,7 +1869,7 @@ class GLMResults(base.LikelihoodModelResults):\n ]\n \n if hasattr(self, 'cov_type'):\n- top_right.append(('Covariance Type:', [self.cov_type]))\n+ top_left.append(('Covariance Type:', [self.cov_type]))\n \n if title is None:\n title = \"Generalized Linear Model Regression Results\"\n", "old_path": "statsmodels/genmod/generalized_linear_model.py", "rewrite": "ReplaceText(target='top_left' @(1872,12)->(1872,21))"} -{"repo": "https://:@github.com/prateek3211/statsmodels.git", "hash": "fa6a59297eda1a12e834a621ba34df48ccfca314", "diff": "@@ -32,7 +32,7 @@ def _check_wts(weights, wts):\n warnings.warn('`wts` method is deprecated. Use `weights` instead',\n DeprecationWarning)\n weights = weights if weights is not None else wts\n- return wts\n+ return weights\n \n \n class Penalty(object):\n", "old_path": "statsmodels/base/_penalties.py", "rewrite": "ReplaceText(target='weights' @(35,11)->(35,14))"} -{"repo": "https://:@github.com/chiffa/BioFlow.git", "hash": "b5cb03eaa3f4c00494581e4b1583b5189a40b387", "diff": "@@ -63,5 +63,5 @@ def wipe_dir(path):\n \n else:\n logger.debug('performing a rmtree')\n- rmtree(path)\n+ rmtree(directory_name)\n return True\n", "old_path": "BioFlow/utils/general_utils/high_level_os_io.py", "rewrite": "ReplaceText(target='directory_name' @(66,15)->(66,19))"} -{"repo": "https://:@github.com/scottstanie/apertools.git", "hash": "e3c2d04bf6e3d5469c1d4e799bcec8ca85bccf1d", "diff": "@@ -117,6 +117,6 @@ def combine_complex(img_list):\n img_out += next_img\n # Now only on overlap, take the previous's pixels\n overlap_idxs = (img_out != 0) & (next_img != 0)\n- img_out[overlap_idxs] = img_out[overlap_idxs]\n+ img_out[overlap_idxs] = next_img[overlap_idxs]\n \n return img_out\n", "old_path": "apertools/stitching.py", "rewrite": "ReplaceText(target='next_img' @(120,32)->(120,39))"} -{"repo": "https://:@github.com/ihfazhillah/qaamus-python.git", "hash": "fb2343f4524f9b5817e794936444edfbad66da67", "diff": "@@ -37,7 +37,7 @@ class IndAraParser(object):\n dengan arti utama dengan **kata-kunci**\n *ind* adalah indonesia\n *ara* adalah arti arabnya.\"\"\"\n- if soup is not None:\n+ if soup is None:\n soup = self.soup\n \n ind = [x.text for x in soup.select(\"td > a\")]\n", "old_path": "qaamus/ind_ara_parser.py", "rewrite": "ReplaceText(target=' is ' @(40,15)->(40,23))"} -{"repo": "https://:@github.com/thautwarm/Linq.py.git", "hash": "c58d2c116f1addfb74225139011eda70b5313883", "diff": "@@ -23,7 +23,7 @@ def Extend(self: Flow, *others):\n \n @extension_class(list)\n def Sort(self: Flow, by):\n- if not is_to_destruct(by):\n+ if is_to_destruct(by):\n by = destruct_func(by)\n self.stream.sort(key=by)\n return self\n", "old_path": "linq/standard/list.py", "rewrite": "ReplaceText(target='' @(26,7)->(26,11))"} -{"repo": "https://:@github.com/jlevy44/PathFlowAI.git", "hash": "7ff099037b829dd952bc9148248639ffeaf25300", "diff": "@@ -277,7 +277,7 @@ def save_dataset(arr, masks, out_zarr, out_pkl, no_zarr):\n \tout_pkl:str\n \t\tPickle output file.\n \t\"\"\"\n-\tif no_zarr:\n+\tif not no_zarr:\n \t\tarr.astype('uint8').to_zarr(out_zarr, overwrite=True)\n \tpickle.dump(masks,open(out_pkl,'wb'))\n \n", "old_path": "pathflowai/utils.py", "rewrite": "ReplaceText(target='not ' @(280,4)->(280,4))"} -{"repo": "https://:@github.com/jlevy44/PathFlowAI.git", "hash": "2076c33a19501c7b2fd778d86da7f66558e5b1de", "diff": "@@ -694,7 +694,7 @@ def modify_patch_info(input_info_db='patch_info.db', slide_labels=pd.DataFrame()\n \t\t\t\tincluded_annotations = copy.deepcopy(pos_annotation_class)\n \t\t\tincluded_annotations.extend(other_annotations)\n \t\t\tprint(df.shape,included_annotations)\n-\t\t\tif not modify_patches:\n+\t\t\tif modify_patches:\n \t\t\t\tdf=df[np.isin(df['annotation'],included_annotations)]\n \t\t\tfor target in targets:\n \t\t\t\tdf[target]=0.\n", "old_path": "pathflowai/utils.py", "rewrite": "ReplaceText(target='' @(697,6)->(697,10))"} -{"repo": "https://:@github.com/roma-guru/ricksay.git", "hash": "d2c761b3274df3d042f0f94a559f4c7dc4f3f5be", "diff": "@@ -782,7 +782,7 @@ class Setup():\n targets = target.split('/')\n dests = dest.split('/')\n \n- while (len(targets) > 1) and (len(target) > 1) and (targets[0] == dests[0]):\n+ while (len(targets) > 1) and (len(dests) > 1) and (targets[0] == dests[0]):\n targets = targets[1:]\n dests = dests[1:]\n \n", "old_path": "setup.py", "rewrite": "ReplaceText(target='dests' @(785,46)->(785,52))"} -{"repo": "https://:@github.com/roma-guru/ricksay.git", "hash": "c38b34a000395d8e5082d2b0b3dfc5e0e594f227", "diff": "@@ -375,7 +375,7 @@ class Backend():\n \n self.output = self.output.replace(AUTO_PUSH, '').replace(AUTO_POP, '')\n \n- if self.balloon is not None:\n+ if self.balloon is None:\n if (self.balloontop > 0) or (self.balloonbottom > 0):\n self.output = self.output.split('\\n')\n self.output = self.output[self.balloontop : ~(self.balloonbottom)]\n", "old_path": "src/backend.py", "rewrite": "ReplaceText(target=' is ' @(378,23)->(378,31))"} -{"repo": "https://:@github.com/roma-guru/ricksay.git", "hash": "de5f9c9d5a30aa94131d0af7d659cb4aeb330521", "diff": "@@ -509,7 +509,7 @@ class Ponysay():\n ponies = {}\n for ponydir in ponydirs:\n for pony in Metadata.restrictedPonies(ponydir, logic):\n- if (pony in ponies) and not (pony in ponies): # XXX and (pony not in passed)\n+ if (pony in oldponies) and not (pony in ponies): # XXX and (pony not in passed)\n ponies[pony] = ponydir + pony + '.pony'\n if len(ponies) > 0:\n oldponies = ponies\n", "old_path": "src/ponysay.py", "rewrite": "ReplaceText(target='oldponies' @(512,36)->(512,42))"} -{"repo": "https://:@github.com/roma-guru/ricksay.git", "hash": "d234ee6c6cbefbd31ef763692c9f8bc39aeff832", "diff": "@@ -826,7 +826,7 @@ class Ponysay():\n for (opt, ponies, quotes) in [('-f', standard, False), ('+f', extra, False), ('-F', both, False), ('-q', standard, True)]:\n if args.opts[opt] is not None:\n for pony in args.opts[opt]:\n- selection.append((opt, ponies, quotes))\n+ selection.append((pony, ponies, quotes))\n ## TODO +q -Q\n (pony, quote) = self.__getPony(selection, args)\n \n", "old_path": "src/ponysay.py", "rewrite": "ReplaceText(target='pony' @(829,38)->(829,41))"} -{"repo": "https://:@github.com/roma-guru/ricksay.git", "hash": "5125dd6400ca89a64f536be824a1de905f8a0920", "diff": "@@ -140,7 +140,7 @@ def linklist(ponydirs = None, quoters = [], ucsiser = None):\n \n for ponydir in ponydirs: # Loop ponydirs\n ## Get all pony files in the directory\n- ponies = _get_file_list(ponydirs, '.pony')\n+ ponies = _get_file_list(ponydir, '.pony')\n \n ## If there are no ponies in the directory skip to next directory, otherwise, print the directories name\n if len(ponies) == 0:\n", "old_path": "src/lists.py", "rewrite": "ReplaceText(target='ponydir' @(143,32)->(143,40))"} -{"repo": "https://:@github.com/CMakerA/WiSync.git", "hash": "2a61dc7bcac9acd62f122e90ec78a41297b045b3", "diff": "@@ -19,7 +19,7 @@ class Button(InteractableUIElement):\n else:\n self.size = size\n \n- super().__init__(self.size, self.__idle, self.__hover, self.__click, position, on_click, on_hover, on_leave)\n+ super().__init__(position, self.__idle, self.__hover, self.__click, self.size, on_click, on_hover, on_leave)\n \n self.id = Iders.btnIdler.add(self)\n \n", "old_path": "elements/Button.py", "rewrite": "ArgSwap(idxs=0<->4 @(22,8)->(22,24))"} -{"repo": "https://:@github.com/cmayes/md_utils.git", "hash": "ea173c3c2052fc62697ae5af0cc4cbc2e7f25eb7", "diff": "@@ -93,7 +93,7 @@ def calc_pka(file_data, kbt, coord_ts):\n logger.info(\"Found local max '%f' at coordinate '%f'\", cur_corr, cur_coord)\n return -math.log10(inv_C_0 / sum_for_pka), cur_corr, cur_coord\n else:\n- if cur_corr >= coord_ts:\n+ if cur_coord >= coord_ts:\n logger.info(\"Integrating to input TS coordinate '%f' with value , '%f'\", cur_coord, cur_corr)\n return -math.log10(inv_C_0 / sum_for_pka), cur_corr, cur_coord\n \n", "old_path": "md_utils/calc_pka.py", "rewrite": "ReplaceText(target='cur_coord' @(96,15)->(96,23))"} -{"repo": "https://:@github.com/pozytywnie/django-facebook-auth.git", "hash": "54f877d7cd262204abc1bf41a95e043a58431f44", "diff": "@@ -34,7 +34,7 @@ class UserFactory(object):\n copy_field('email', True)\n copy_field('first_name')\n copy_field('last_name')\n- if access_token is None:\n+ if access_token is not None:\n user.access_token = access_token\n \n user.save()\n", "old_path": "facebook_auth/backends.py", "rewrite": "ReplaceText(target=' is not ' @(37,23)->(37,27))"} -{"repo": "https://:@github.com/pozytywnie/django-facebook-auth.git", "hash": "5301679f7ff26baab5b635204d309e89e907a47f", "diff": "@@ -254,5 +254,5 @@ def debug_all_tokens_for_user(user_id):\n logger.info('Deleting user tokens except best one.')\n tokens_to_delete = sorted(processed_user_tokens)\n tokens_to_delete.remove(best_token.id)\n- for token_id in processed_user_tokens:\n+ for token_id in tokens_to_delete:\n UserToken.objects.filter(id=token_id).update(deleted=True)\n", "old_path": "facebook_auth/models.py", "rewrite": "ReplaceText(target='tokens_to_delete' @(257,28)->(257,49))"} -{"repo": "https://:@github.com/mc3/DSKM.git", "hash": "dfe280d538e627d15b6058a7806290a8d09dbd4b", "diff": "@@ -620,7 +620,7 @@ def nsAliveTest(theZone): # query all authoritative NS for SOA of zone\n nameservers = misc.authNS(theZone)\n for nameserver in nameservers[:]:\n try:\n- l.logDebug('Querying {} for SOA of {} via TCP'.format(theZone, nameserver))\n+ l.logDebug('Querying {} for SOA of {} via TCP'.format(nameserver, theZone))\n response = dns.query.tcp(request, nameserver, 10)\n rcode = response.rcode()\n if rcode == 0: continue\n", "old_path": "DSKM/zone.py", "rewrite": "ArgSwap(idxs=0<->1 @(623,23)->(623,65))"} -{"repo": "https://:@github.com/AppImageCrafters/AppImageBuilder.git", "hash": "dc91ba9d15ad0a470ae3a5c0e677d1616ced3fd0", "diff": "@@ -61,7 +61,7 @@ class IconBundler:\n return os.path.join(root, svg_icon_name)\n \n if png_icon_name in files:\n- new_path = os.path.join(root, svg_icon_name)\n+ new_path = os.path.join(root, png_icon_name)\n new_size = self._extract_icon_size_from_path(new_path)\n \n if new_size > size:\n", "old_path": "AppImageBuilder/app_dir/metadata/icon_bundler.py", "rewrite": "ReplaceText(target='png_icon_name' @(64,46)->(64,59))"} -{"repo": "https://:@github.com/jeticg/datatool.git", "hash": "5fa4adc2522957fb89ef2d22974602ce4ed5047b", "diff": "@@ -58,7 +58,7 @@ class DataLoader():\n for filePattern in file:\n files += matchPattern(filePattern)\n elif isinstance(file, str):\n- files = matchPattern(filePattern)\n+ files = matchPattern(file)\n else:\n raise RuntimeError(\"natlang.dataLoader.load [ERROR]: parameter \" +\n \"type\")\n", "old_path": "natlang/loader.py", "rewrite": "ReplaceText(target='file' @(61,33)->(61,44))"} -{"repo": "https://:@github.com/robinandeer/cosmid.git", "hash": "77c83d4f1a1835ca7d52d6b20272d126b5d3fb47", "diff": "@@ -123,7 +123,7 @@ class Registry(object):\n options = resource.versions()\n version = self.matchOne(target, options)\n \n- if resource is None:\n+ if version is None:\n message = (\"Couldn't match version '{v}' to '{id}'; options: {vers}\"\n .format(v=target, id=resource.id, vers=\", \".join(options)))\n \n", "old_path": "cosmid/core.py", "rewrite": "ReplaceText(target='version' @(126,7)->(126,15))"} -{"repo": "https://:@github.com/haata/pycapnp-async.git", "hash": "11543b7abfb898e84c9412a7b5563e4481ffcf9b", "diff": "@@ -22,7 +22,7 @@ def example_simple_rpc():\n write_stream = capnp.FdAsyncIoStream(write.fileno())\n \n restorer = capnp.Restorer(capability.TestSturdyRefObjectId, _restore)\n- server = capnp.RpcServer(loop, restorer, write_stream)\n+ server = capnp.RpcServer(loop, write_stream, restorer)\n client = capnp.RpcClient(loop, read_stream)\n \n ref = capability.TestSturdyRefObjectId.new_message()\n", "old_path": "examples/example_capability.py", "rewrite": "ArgSwap(idxs=1<->2 @(25,13)->(25,28))"} -{"repo": "https://:@github.com/bwhmather/flask-libsass.git", "hash": "c6f0e9cfdad73cc77a364c95d2070d723d2c89e8", "diff": "@@ -55,7 +55,7 @@ class Sass(object):\n \n rebuild = current_app.config.get('SASS_REBUILD', False)\n \n- if rebuild:\n+ if not rebuild:\n if not hasattr(stack.top, 'sass_cache'):\n stack.top.sass_cache = {}\n cache = stack.top.sass_cache\n", "old_path": "flask_libsass.py", "rewrite": "ReplaceText(target='not ' @(58,11)->(58,11))"} -{"repo": "https://:@github.com/yunojuno/django-s3-upload.git", "hash": "65e49f3277f987c47d189105c6d979d666bb3004", "diff": "@@ -45,7 +45,7 @@ def create_upload_data(content_type, source_filename, upload_to):\n bucket_url = \"https://%s/%s\" % (endpoint, bucket)\n \n return {\n- \"policy\": policy,\n+ \"policy\": encoded,\n \"signature\": signature_b64,\n \"key\": key,\n \"AWSAccessKeyId\": access_key,\n", "old_path": "s3direct/utils.py", "rewrite": "ReplaceText(target='encoded' @(48,18)->(48,24))"} -{"repo": "https://:@github.com/Manticore-attic/pyfft.git", "hash": "01cdc24797472eec5114b68f02ce8c68fa348853", "diff": "@@ -53,7 +53,7 @@ def clFFT_ExecuteInterleaved(plan, batchSize, dir, data_in, data_out):\n \t\t\tcurrWrite = 1 if numKernelsOdd else 2\n \n \t\tfor kInfo in kernelInfo:\n-\t\t\tif isInPlace and numKernelsOdd and not inPlaceDone and kernelInfo.in_place_possible:\n+\t\t\tif isInPlace and numKernelsOdd and not inPlaceDone and kInfo.in_place_possible:\n \t\t\t\tcurrWrite = currRead\n \t\t\t\tinPlaceDone = True\n \n", "old_path": "pycudafft/fft_execute.py", "rewrite": "ReplaceText(target='kInfo' @(56,58)->(56,68))"} -{"repo": "https://:@github.com/sepandhaghighi/pyshutdown.git", "hash": "8b1b84e10d5acc1b1ec07ae271fdd3f61a414c87", "diff": "@@ -12,7 +12,7 @@ def get_method():\n get_method=input(\"Please Enter Method , Shutdown[1] , Hibernate[2] , Restart[3]\")\n if get_method==\"2\":\n flag=\"-h\"\n- elif flag==\"3\":\n+ elif get_method==\"3\":\n flag=\"-r\"\n else:\n flag=\"-s\"\n", "old_path": "main.py", "rewrite": "ReplaceText(target='get_method' @(15,9)->(15,13))"} -{"repo": "https://:@github.com/cfhamlet/os-m3-engine.git", "hash": "b6a8890df08b38e6201e3b8cc18e870a7f61fda4", "diff": "@@ -89,7 +89,7 @@ def create(frontend_cls='os_m3_engine.ootb.StdinFrontend',\n default_engine_transport_config = ENGINE_TRANSPORT_BRIDGE_CONFIG \\\n if backend_cls is not None else ENGINE_TRANSPORT_CONFIG\n \n- e_transport_config = engine_backend_config\n+ e_transport_config = engine_transport_config\n if engine_transport_config in (ENGINE_TRANSPORT_CONFIG, ENGINE_TRANSPORT_BRIDGE_CONFIG):\n e_transport_config = None\n \n", "old_path": "src/os_m3_engine/launcher.py", "rewrite": "ReplaceText(target='engine_transport_config' @(92,25)->(92,46))"} -{"repo": "https://:@github.com/ssi-dk/bifrost.git", "hash": "d05050feff39d057a8db6b64d31645efbf741200", "diff": "@@ -143,7 +143,7 @@ def query_ncbi_species(species_entry):\n if result is not None:\n return result[\"ncbi_species\"]\n elif group_result is not None:\n- return result[\"ncbi_species\"]\n+ return group_result[\"ncbi_species\"]\n else:\n return None\n except Exception as e:\n", "old_path": "lib/bifrostlib/bifrostlib/mongo_interface.py", "rewrite": "ReplaceText(target='group_result' @(146,23)->(146,29))"} -{"repo": "https://:@github.com/ssi-dk/bifrost.git", "hash": "6f801b0adf5cf2209dec1052337b3eff413d65b0", "diff": "@@ -268,7 +268,7 @@ def update_run_report(run, n_intervals):\n )\n def update_rerun_form(run_name):\n run_name = run_name.split(\"/\")[0]\n- if run_name == \"\" or hasattr(keys, \"rerun\"):\n+ if run_name == \"\" or not hasattr(keys, \"rerun\"):\n return None\n \n run_data = import_data.get_run(run_name)\n", "old_path": "reporter/run_checker.py", "rewrite": "ReplaceText(target='not ' @(271,25)->(271,25))"} -{"repo": "https://:@github.com/ayharano/pppipam.git", "hash": "13ee95b04c1ccf5febedcd9568e15543b8c66365", "diff": "@@ -190,7 +190,7 @@ class AddressSpace_description_TestCase(unittest.TestCase):\n description_str = \"address 0 for ipv4\"\n self.address_space.describe(\n description=description_str,\n- ip_parameter=network,\n+ ip_parameter=zero_ipv4,\n )\n self.assertEqual(\n self.address_space.description(\n", "old_path": "tests/test_description.py", "rewrite": "ReplaceText(target='zero_ipv4' @(193,25)->(193,32))"} -{"repo": "https://:@github.com/ayharano/pppipam.git", "hash": "6d57637be02e5d8597a63ba7fc3fd8525a5c2952", "diff": "@@ -263,7 +263,7 @@ class AddressSpace:\n self.__parent_supernet[child] = as_network\n children_of_as_network.add(child)\n children_of_supernet.remove(child)\n- children_of_supernet.add(as_address)\n+ children_of_supernet.add(as_network)\n else:\n raise TypeError(\"ip_parameter must be a valid IP parameter\")\n \n", "old_path": "pppipam/pppipam.py", "rewrite": "ReplaceText(target='as_network' @(266,37)->(266,47))"} -{"repo": "https://:@github.com/ayharano/pppipam.git", "hash": "12fedde026bcd8de6562f0d3c6e3224e529c557e", "diff": "@@ -289,7 +289,7 @@ class AddressSpace:\n self.__description[as_network] = description\n described = True\n \n- self.__parent_supernet[as_address] = supernet\n+ self.__parent_supernet[as_network] = supernet\n children_of_as_network = (\n self.__children_ip_object.setdefault(as_network, set())\n )\n", "old_path": "pppipam/pppipam.py", "rewrite": "ReplaceText(target='as_network' @(292,35)->(292,45))"} -{"repo": "https://:@github.com/alx-k/flask-jerify.git", "hash": "cf3942ac578dbcb0deb358bf7bfb7c230a5d1f34", "diff": "@@ -23,7 +23,7 @@ def jerror_handler(e):\n \"\"\"http://jsonapi.org/format/#errors\n \"\"\"\n \n- if not hasattr('name', e):\n+ if not hasattr(e, 'name'):\n raise InternalServerError(e.description)\n \n app.logger.error(e.description)\n", "old_path": "flask_jerify/flask_jerify.py", "rewrite": "ArgSwap(idxs=0<->1 @(26,11)->(26,18))"} -{"repo": "https://:@github.com/chenliangomc/RTFMaker.git", "hash": "f82b42a9366a5ed2cbc83ebbe25dc6f0668f75c6", "diff": "@@ -139,7 +139,7 @@ class RTable(object):\n self._table_elements['body'].append(new_row)\n html_foot = getattr(obj, 'tfoot')\n if html_foot:\n- for a_foot in html_body.find_all('td'):\n+ for a_foot in html_foot.find_all('td'):\n foot_cell = {\n 'value': a_foot.get_text(strip=True),\n }\n", "old_path": "RTFMaker/utils.py", "rewrite": "ReplaceText(target='html_foot' @(142,30)->(142,39))"} -{"repo": "https://:@github.com/jianlins/PyFastNER.git", "hash": "442227d122a7feee9766e2676cee1702c7ba645b", "diff": "@@ -324,7 +324,7 @@ class FastCNER:\n self.logger.debug(\n 'try add matched rule ({}-{})\\t{}'.format(match_begin, match_end, str(self.rule_store[rule_id])))\n current_span.rule_id = rule_id\n- if key in matches:\n+ if key in overlap_checkers:\n current_spans_list = matches[key]\n overlap_checker = overlap_checkers[key]\n overlapped_pos = overlap_checker.search(current_span.begin, current_span.end)\n", "old_path": "PyFastNER/FastCNER.py", "rewrite": "ReplaceText(target='overlap_checkers' @(327,22)->(327,29))"} -{"repo": "https://:@github.com/groupe-conseil-nutshimit-nippour/django-geoprisma.git", "hash": "a3a4dc9a0142e237dfac5961107b7338e9ef6298", "diff": "@@ -142,7 +142,7 @@ class FeatureServerProxyFactory(object):\n \r\n def isCreate(self):\r\n data_id = self.featureServerProxy.getID()\r\n- return data_id is not None and self.request.body != \"\" and self.request.method == \"POST\"\r\n+ return data_id is None and self.request.body != \"\" and self.request.method == \"POST\"\r\n \r\n def isUpdate(self):\r\n data_id = self.featureServerProxy.getID()\r\n", "old_path": "geoprisma/core/proxies/featureserverproxy.py", "rewrite": "ReplaceText(target=' is ' @(145,22)->(145,30))"} -{"repo": "https://:@github.com/collective/mr.poe.git", "hash": "dedca8e5c98124f6a43a18986e142e8cb7ecc3cf", "diff": "@@ -59,7 +59,7 @@ def setup_logging(handler, exclude=['raven', 'sentry.errors']):\n Returns a boolean based on if logging was configured or not.\n \"\"\"\n logger = logging.getLogger()\n- if handler.__class__ not in map(type, logger.handlers):\n+ if handler.__class__ in map(type, logger.handlers):\n return False\n \n logger.addHandler(handler)\n", "old_path": "raven/conf/__init__.py", "rewrite": "ReplaceText(target=' in ' @(62,24)->(62,32))"} -{"repo": "https://:@github.com/espenmn/medialog.mobilethemeTwo.git", "hash": "21b37308d028659d0a540289ba2e1f30340a9481", "diff": "@@ -39,7 +39,7 @@ class Scrape(BrowserView):\n parts = url.split('//', 1)\n this_base_url = parts[0]+'//'+parts[1].split('/', 1)[0]\n \n- if url not in scrape_whitelist:\n+ if this_base_url not in scrape_whitelist:\n return \"URL domain is not in whitelist\"\n \n #get html from the requested url\n", "old_path": "medialog/mobilethemeTwo/views.py", "rewrite": "ReplaceText(target='this_base_url' @(42,11)->(42,14))"} -{"repo": "https://:@github.com/pyrated/vinyl.git", "hash": "dec097819ed4e5635c3d8f64754fa6f3531278cc", "diff": "@@ -18,7 +18,7 @@ import os\n import sphinx_rtd_theme\n \n # We cannot install llvmlite on READTHEDOCS\n-if os.environ.get('READTHEDOCS') != 'True':\n+if os.environ.get('READTHEDOCS') == 'True':\n from unittest.mock import MagicMock\n class MockModule(MagicMock):\n @classmethod\n", "old_path": "docs/source/conf.py", "rewrite": "ReplaceText(target='==' @(21,33)->(21,35))"} -{"repo": "https://:@github.com/marcofinalist/weathervane.git", "hash": "4ddc4538762f2bb439b55019f2fea94480654988", "diff": "@@ -169,6 +169,6 @@ class WeatherVaneInterface(object):\n bits = self.spi.read_pin(self.station_bits)\n result = 0\n for index, value in enumerate(bits):\n- result = value * 2**index\n+ result += value * 2**index\n \n return self.STATIONS[result]\n\\ No newline at end of file\n", "old_path": "weathervane/weathervaneinterface.py", "rewrite": "ReplaceText(target='+=' @(172,19)->(172,20))"} -{"repo": "https://:@github.com/ofgulban/compoda.git", "hash": "610dfad6de73410b4b99e8e9260b06dbe4ab91b7", "diff": "@@ -49,7 +49,7 @@ def closure(data, k=1.0):\n out = np.copy(data)\n for i in range(data.shape[1]):\n out[:, i] = np.divide(out[:, i], data_sum)\n- out = data * k\n+ out = out * k\n return out\n \n \n", "old_path": "compoda/core.py", "rewrite": "ReplaceText(target='out' @(52,10)->(52,14))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "bf8c927f1d0f7c4af2175ddec836c6ffea5a3858", "diff": "@@ -88,7 +88,7 @@ class XNATSource(ArchiveSource, XNATMixin):\n proj_summ_sess_name) = XNATArchive.project_summary_name(\n project.id)\n try:\n- proc_session = xnat_login.experiments[\n+ proc_session = subject.experiments[\n self.session_id + XNATArchive.PROCESSED_SUFFIX]\n proc_datasets = dict(\n (s.type, s) for s in proc_session.scans.itervalues())\n", "old_path": "nianalysis/archive/xnat.py", "rewrite": "ReplaceText(target='subject' @(91,31)->(91,41))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "31946410e68317edea4ee76c6c24441065fc93ae", "diff": "@@ -417,7 +417,7 @@ class TestProjectInfo(BaseMultiSubjectTestCase):\n proj_dir, subject.id, SUMMARY_NAME,\n dataset.filename)\n for session in subject.sessions:\n- for dataset in subject.datasets:\n+ for dataset in session.datasets:\n dataset.path = os.path.join(\n proj_dir, session.subject_id,\n session.visit_id, dataset.filename)\n", "old_path": "test/unittests/archive/test_local.py", "rewrite": "ReplaceText(target='session' @(420,35)->(420,42))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "6bf29a9a339f7985d310d567a66cfca085cc4708", "diff": "@@ -268,7 +268,7 @@ class BaseArchiveSink(BaseArchiveNode):\n PATH_TRAIT)\n # Add input fields\n for field in fields:\n- assert isinstance(dataset, FieldSpec)\n+ assert isinstance(field, FieldSpec)\n self._add_trait(self.inputs, field.name + FIELD_SUFFIX,\n field.dtype)\n \n", "old_path": "nianalysis/archive/base.py", "rewrite": "ReplaceText(target='field' @(271,30)->(271,37))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "8bf472a77f50efc4d28d38d4aca46200c35e87e2", "diff": "@@ -353,7 +353,7 @@ class LocalArchive(Archive):\n Dataset.from_path(\n os.path.join(session_path, dname),\n multiplicity=multiplicity))\n- if FIELDS_FNAME in dname:\n+ if FIELDS_FNAME in dnames:\n fields = self.fields_from_json(os.path.join(\n session_path, FIELDS_FNAME),\n multiplicity=multiplicity)\n", "old_path": "nianalysis/archive/local.py", "rewrite": "ReplaceText(target='dnames' @(356,31)->(356,36))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "b3a6e4ec34cbfc92ef62dde78f995c4075feaa46", "diff": "@@ -424,7 +424,7 @@ class Study(object):\n \"is not a valid option ('{}')\".format(\n \"', '\".join(unrecognised_values), name,\n self._param_error_location,\n- \"', '\".join(switch.choices)))\n+ \"', '\".join(spec.choices)))\n if self._referenced_switches is not None:\n self._referenced_switches.add(name)\n return switch.value in values\n", "old_path": "arcana/study/base.py", "rewrite": "ReplaceText(target='spec' @(427,32)->(427,38))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "be154e732593c6c8dd36391db9048315ad74fabc", "diff": "@@ -214,7 +214,7 @@ class Study(object):\n \"to\\n{}.\".format(e, bound_inpt, spec))\n raise e\n else:\n- if inpt.format not in spec.valid_formats:\n+ if bound_inpt.format not in spec.valid_formats:\n raise ArcanaUsageError(\n \"Cannot pass {} as an input to {} as it is\"\n \" not in one of the valid formats ('{}')\"\n", "old_path": "arcana/study/base.py", "rewrite": "ReplaceText(target='bound_inpt' @(217,31)->(217,35))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "21199db4a62a164140eef9c7a45966056c069541", "diff": "@@ -116,7 +116,7 @@ class ModulesEnvironment(BaseEnvironment):\n .format(req.name, local_name))\n avail_versions = []\n for local_ver_name in version_names:\n- ver_name = self.map_version(req_range, local_ver_name)\n+ ver_name = self.map_version(req, local_ver_name)\n try:\n avail_versions.append(\n req.v(ver_name, local_name=local_name,\n", "old_path": "arcana/environment/modules.py", "rewrite": "ReplaceText(target='req' @(119,44)->(119,53))"} -{"repo": "https://:@github.com/monashbiomedicalimaging/arcana.git", "hash": "35edaede784a97ddf4c0f961a4d6aac1cf3fb878", "diff": "@@ -683,7 +683,7 @@ class Study(object):\n in_branch = switch.value in values\n if not in_branch:\n try:\n- in_branch = switch.fallbacks[switch.value] in values\n+ in_branch = spec.fallbacks[switch.value] in values\n except KeyError:\n pass\n return in_branch\n", "old_path": "arcana/study/base.py", "rewrite": "ReplaceText(target='spec' @(686,32)->(686,38))"} -{"repo": "https://:@github.com/agartland/metadataVis.git", "hash": "469bf0c8e514d09c966c73d21b9ff0c335d12255", "diff": "@@ -39,7 +39,7 @@ def _generateWideform(longform_df, rx=None):\n for entry in rowmeta_columns:\n rowmeta_dict[entry] = longform_df[entry]\n \n- if (rx is None):\n+ if (rx is not None):\n ptid_md = pd.DataFrame(data=rowmeta_dict,\n columns=rowmeta_dict.keys())\n ptid_md = ptid_md.drop_duplicates()\n", "old_path": "LongformReader.py", "rewrite": "ReplaceText(target=' is not ' @(42,10)->(42,14))"} -{"repo": "https://:@github.com/combatopera/pyven.git", "hash": "2deb919498af4943aa18a7281037468809bda2d0", "diff": "@@ -22,7 +22,7 @@ class BinMix(Node):\n self.blockbuf.copybuf(self.tone(self.block))\n if not noiseflag:\n self.blockbuf.orbuf(self.noise(self.block))\n- elif noiseflag:\n+ elif not noiseflag:\n self.blockbuf.copybuf(self.noise(self.block))\n else:\n self.blockbuf.fill(0)\n", "old_path": "pym2149/mix.py", "rewrite": "ReplaceText(target='not ' @(25,9)->(25,9))"} -{"repo": "https://:@github.com/rolurq/flask-gulp.git", "hash": "615013477dcfcf53b64e5cba0858f3b01e66b8fb", "diff": "@@ -61,7 +61,7 @@ def cjsx(filename, data):\n \n command = \"%s -c -s\" % (executable or 'cjsx')\n if bare:\n- command = ' '.join((executable, '-b'))\n+ command = ' '.join((command, '-b'))\n \n return runner(command, filename, data, '.js')\n \n", "old_path": "flask_static/extensions.py", "rewrite": "ReplaceText(target='command' @(64,28)->(64,38))"} -{"repo": "https://:@github.com/jiep/unicode.git", "hash": "fe2f6fe46f14778cfcb74852d817d1876d171352", "diff": "@@ -92,7 +92,7 @@ def main():\n print('Similar domains to {}'.format(dom))\n domains.difference_update(set(dom))\n for d in domains:\n- print_diff(d, args.domain)\n+ print_diff(args.domain, d)\n if write:\n f.write(d + \"\\n\")\n if (args.check):\n", "old_path": "v2d/main.py", "rewrite": "ArgSwap(idxs=0<->1 @(95,16)->(95,26))"} -{"repo": "https://:@gitlab.com/admintotal/django-cfdi.git", "hash": "9f131df38460abaafb00566867ce47b522fce7fd", "diff": "@@ -882,7 +882,7 @@ def get_xml_object(xml_text):\n nominas.append(nomina_object)\n \n \n- if nomina_object:\n+ if nominas:\n xml.complemento.nominas = nominas\n xml.complemento.nomina = nominas[0]\n else:\n", "old_path": "cfdi/utils.py", "rewrite": "ReplaceText(target='nominas' @(885,15)->(885,28))"} -{"repo": "https://:@github.com/ludeeus/addonupdater.git", "hash": "fe325d28af7bcade5a806009c943fc0afbca63b1", "diff": "@@ -378,7 +378,7 @@ class AddonUpdater():\n remote_buildfile = self.get_file_obj(buildfile)\n buildfile_content = self.get_file_content(remote_buildfile)\n \n- used_file = remote_dockerfile.split('BUILD_FROM=hassioaddons/')[1]\n+ used_file = dockerfile_content.split('BUILD_FROM=hassioaddons/')[1]\n used_file = used_file.split('\\n')[0]\n \n base = used_file.split(':')[1]\n", "old_path": "addonupdater/updater.py", "rewrite": "ReplaceText(target='dockerfile_content' @(381,20)->(381,37))"} -{"repo": "https://:@github.com/VictorPavlushin/netbox-netdev-inventory.git", "hash": "00111f3155731e4bf1b380744519a89576a96a49", "diff": "@@ -161,7 +161,7 @@ class DeviceImporter(ContextDecorator):\n self._search_key_case_insensitive(interfaces, lag)\n )\n except KeyError:\n- logger.error(\"%s not exist in polled interfaces\", ifname)\n+ logger.error(\"%s not exist in polled interfaces\", lag)\n continue\n \n interfaces[ifname][\"lag\"] = real_lag_name\n", "old_path": "netbox_netprod_importer/importer.py", "rewrite": "ReplaceText(target='lag' @(164,66)->(164,72))"} -{"repo": "https://:@github.com/tswicegood/cbv_utils.git", "hash": "25d2e1ce328e485ec26f4debd8f7aebc1ee6a623", "diff": "@@ -96,7 +96,7 @@ class ProcessInlineFormsetView(ProcessFormView):\n obj = form.save(commit=False)\n inline_formset = self.get_inline_formset()\n if inline_formset.is_valid():\n- form.save()\n+ obj.save()\n inline_formset.save()\n return self.form_valid(form, inline_formset)\n return self.form_invalid(form=form, inline_formset=inline_formset)\n", "old_path": "cbv_utils/views.py", "rewrite": "ReplaceText(target='obj' @(99,16)->(99,20))"} -{"repo": "https://:@github.com/romeric/florence.git", "hash": "aa75d1bb83ec9de5e8ee60d9a87d2a86d7293aeb", "diff": "@@ -6010,7 +6010,7 @@ class Mesh(object):\n else:\n quality_func = lambda mesh: mesh.Lengths()\n elif quality_assessor == \"aspect_ratio\":\n- quality_assessor = lambda mesh: mesh.AspectRatios()\n+ quality_func = lambda mesh: mesh.AspectRatios()\n elif quality_assessor == \"angle\":\n quality_func = lambda mesh: mesh.Angles()\n else:\n", "old_path": "Florence/MeshGeneration/Mesh.py", "rewrite": "ReplaceText(target='quality_func' @(6013,16)->(6013,32))"} -{"repo": "https://:@github.com/DomainGroupOSS/ml-recsys-tools.git", "hash": "467f8e1d859af1109bb830b3c35a752baeddbb67", "diff": "@@ -81,7 +81,7 @@ class FactorizationRecommender(BaseDFSparseRecommender):\n all_metrics.plot()\n self.early_stop_metrics_df = all_metrics\n \n- self._set_epochs(epochs=epochs_max)\n+ self._set_epochs(epochs=max_epoch)\n if not refit_on_all:\n simple_logger.info('Loading best model from checkpoint at %d epochs' % max_epoch)\n self.model, self.model_checkpoint = self.model_checkpoint, None\n", "old_path": "ml_recsys_tools/recommenders/factorization_base.py", "rewrite": "ReplaceText(target='max_epoch' @(84,32)->(84,42))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "6ca2ac668b486924816ed461e8f40a87d82136da", "diff": "@@ -25,7 +25,7 @@ class Filesystem(object):\n if head and not os.path.exists(head):\n cls.mkdir(head)\n \n- if os.path.exists(path): # handles case of trailing /\n+ if not os.path.exists(path): # handles case of trailing /\n os.mkdir(path)\n \n \n", "old_path": "src/scs_core/sys/filesystem.py", "rewrite": "ReplaceText(target='not ' @(28,11)->(28,11))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "653bf53c4d76b1b422d8aa11174c9a5351bbd1f6", "diff": "@@ -81,7 +81,7 @@ class ExegeteRenderingTRhRow(JSONable):\n \n @classmethod\n def construct(cls, gas, rh, t_min, t_max, t_delta, exegete: Exegete):\n- cells = [ExegeteRenderingTRhCell(t, exegete.error(gas, t, rh))\n+ cells = [ExegeteRenderingTRhCell(t, exegete.error(gas, rh, t))\n for t in range(t_min, t_max + 1, t_delta)]\n \n return ExegeteRenderingTRhRow(rh, cells)\n", "old_path": "src/scs_core/gas/exegesis/exegete_rendering_t_rh.py", "rewrite": "ArgSwap(idxs=1<->2 @(84,44)->(84,57))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "653bf53c4d76b1b422d8aa11174c9a5351bbd1f6", "diff": "@@ -43,7 +43,7 @@ print(\"-\")\n \n for rh in range(10, 91, 5):\n for t in range(0, 46, 5):\n- interpretation = exegete.interpretation('NO2', text, t, rh)\n+ interpretation = exegete.interpretation('NO2', text, rh, t)\n print(\"rh: %2d t: %2d text: %3.1f interpretation: %3.1f\" % (rh, t, text, interpretation))\n \n print(\"-\")\n", "old_path": "tests/gas/exegesis/sbl1/sbl1_no2_v1_test.py", "rewrite": "ArgSwap(idxs=2<->3 @(46,25)->(46,47))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "73c3c80fcc88fce844e0e387499753667dac811e", "diff": "@@ -68,7 +68,7 @@ class S3Manager(object):\n bucket_list.append(str(inters), bucket[\"Name\"])\n inters += 1\n \n- return bucket_list\n+ return response\n \n \n def retrieve_from_bucket(self, bucket_name, resource_name):\n", "old_path": "src/scs_core/aws/manager/s3_manager.py", "rewrite": "ReplaceText(target='response' @(71,15)->(71,26))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "ac11b0e941914f83f984d183811a83bb0a5df544", "diff": "@@ -59,7 +59,7 @@ class AccessKey(PersistentJSONable):\n \n @classmethod\n def persistence_location(cls, host):\n- return host.aws_dir(), cls.__FILENAME\n+ return cls.aws_dir(), cls.__FILENAME\n \n \n @classmethod\n", "old_path": "src/scs_core/aws/client/access_key.py", "rewrite": "ReplaceText(target='cls' @(62,15)->(62,19))"} -{"repo": "https://:@github.com/south-coast-science/scs_core.git", "hash": "e6293b84e0b7594738b85db5a7365fdbb5770461", "diff": "@@ -53,7 +53,7 @@ class DeviceTester(object):\n delta = now - latest_pub\n elapsed_minutes = delta.total_seconds() / 60\n \n- return elapsed_minutes > self.__config.unresponsive_minutes_allowed\n+ return elapsed_minutes < self.__config.unresponsive_minutes_allowed\n \n \n def has_status_changed(self, s3_device_status_list):\n", "old_path": "src/scs_core/aws/monitor/device_tester.py", "rewrite": "ReplaceText(target='<' @(56,35)->(56,36))"} -{"repo": "https://:@github.com/davidfstr/notifymail.git", "hash": "585ae19eba35db57e969941ea2c340bd3be499d8", "diff": "@@ -8,7 +8,7 @@ def is_older_than(file1, file2):\n return os.path.getmtime(file1) < os.path.getmtime(file2)\n \n # Generate README.rst if missing or out of date\n-if not os.path.exists('README.rst') and is_older_than('README.rst', 'README.md'):\n+if not os.path.exists('README.rst') or is_older_than('README.rst', 'README.md'):\n os.system('pandoc --from=markdown --to=rst --output=README.rst README.md')\n with open('README.rst') as file:\n long_description = file.read()\n", "old_path": "setup.py", "rewrite": "ReplaceText(target='or' @(11,36)->(11,39))"} -{"repo": "https://:@github.com/hile/oodi.git", "hash": "169b7db094c64a5c2ca695bf93782fce0b50945f", "diff": "@@ -26,7 +26,7 @@ class Command(ScriptCommand):\n iterators = []\n for path in paths:\n try:\n- iterators.append(IterableTrackPaths(self.script.configuration, path))\n+ iterators.append(IterableTrackPaths(path, self.script.configuration))\n except LibraryError as e:\n self.error(e)\n return iterators\n", "old_path": "oodi/bin/commands/base.py", "rewrite": "ArgSwap(idxs=0<->1 @(29,33)->(29,51))"} -{"repo": "https://:@github.com/tpm2-software/tpm2-pytss.git", "hash": "675d845e04810a4129e9e5b21889a0258fcad7b2", "diff": "@@ -141,7 +141,7 @@ class BaseContextMetaClass(type):\n and \"uint8_t\" in docstring.split()\n ):\n return_value.append(\n- to_bytearray(value.value, args[i + 1].value)\n+ to_bytearray(args[i + 1].value, value.value)\n )\n skip = True\n continue\n", "old_path": "tpm2_pytss/context.py", "rewrite": "ArgSwap(idxs=0<->1 @(144,36)->(144,48))"} -{"repo": "https://:@github.com/josesho/bootstrap_contrast.git", "hash": "1d55129dee9130374774bb1234b577e061974d93", "diff": "@@ -1089,7 +1089,7 @@ def pairedcontrast(data, x, y, idcol, hue = None,\n linestyle = 'dotted') \n \n # Set xlimit to appropriate limits..\n- newxlim = (ax_left.get_xlim()[0], xpos + 0.25)\n+ newxlim = (ax_left.get_xlim()[0], xposPlusViolin + 0.25)\n ax_left.set_xlim(newxlim)\n \n # Remove left axes x-axis title.\n", "old_path": "bootstrapContrast/bootstrapContrast.py", "rewrite": "ReplaceText(target='xposPlusViolin' @(1092,38)->(1092,42))"} -{"repo": "https://:@github.com/josesho/bootstrap_contrast.git", "hash": "5875648efb0994fdac3eae216fe36d51cc0f629c", "diff": "@@ -88,7 +88,7 @@ def plotbootstrap_hubspoke(bslist, ax, violinWidth, violinOffset,\n for i in range(0, len(bslist)):\n bsi=bslist[i]\n # array=list(bsi.items())[7][1] # Pull out the bootstrapped array.\n- array=bslist['diffarray']\n+ array=bsi['diffarray']\n ylims.append(array)\n \n # Then plot as violinplot.\n", "old_path": "bootstrapContrast/plot_bootstrap_tools.py", "rewrite": "ReplaceText(target='bsi' @(91,14)->(91,20))"} -{"repo": "https://:@gitlab.com/harry.sky.vortex/melodiam.git", "hash": "bbc45aeb762242382c68cfe6fa9a32e600eb3630", "diff": "@@ -106,7 +106,7 @@ class SpotifyAPI(object):\n # Update ETag if song's playback was manipulated\n if song[\"progress_ms\"] < self.current_song[\"progress\"] or song[\"progress_ms\"] - 10000 > self.current_song[\"progress\"]:\n self.current_song_json_updated = str(time())\n- LISTEN_ALONG_API.set_current_playing_song(song_uri=song[\"uri\"], position_ms=song[\"progress_ms\"])\n+ LISTEN_ALONG_API.set_current_playing_song(song_uri=item[\"uri\"], position_ms=song[\"progress_ms\"])\n \n self.current_song[\"progress\"] = song[\"progress_ms\"]\n self.current_song_json = json.dumps(self.current_song)\n", "old_path": "backend/spotify.py", "rewrite": "ReplaceText(target='item' @(109,71)->(109,75))"} -{"repo": "https://:@gitlab.com/harry.sky.vortex/melodiam.git", "hash": "db126e963e784dee9d11f2331622ef9eca5baf9d", "diff": "@@ -32,7 +32,7 @@ async def get_listen_along_users_endpoint(request: StarletteRequest) -> PlainTex\n for user in ListenAlong.users:\n users_json += user.public_json + \",\"\n \n- users_json = ']'\n+ users_json += ']'\n return PlainTextResponse(content=users_json, media_type=\"application/json\")\n \n @SERVER.route('/get_current_song', methods=['GET'])\n", "old_path": "backend/music/main.py", "rewrite": "ReplaceText(target='+=' @(35,15)->(35,16))"} -{"repo": "https://:@gitlab.com/harry.sky.vortex/melodiam.git", "hash": "9850cc42634b01312cc8754a03df8abccd2054ce", "diff": "@@ -21,7 +21,7 @@ class ListenAlong():\n @staticmethod\n def _set_song(user: ListenAlongUser, song_json: str) -> None:\n if user.tokens:\n- status = SpotifyWebAPI.set_current_playing_song(song_json, user.tokens.access)\n+ status = SpotifyWebAPI.set_current_playing_song(user.tokens.access, song_json)\n if user.public.status != status:\n user.public.status = status\n user.public_json = json.dumps(asdict(user.public))\n", "old_path": "backend/music/features/listen_along.py", "rewrite": "ArgSwap(idxs=0<->1 @(24,21)->(24,59))"} -{"repo": "https://:@github.com/ladybug-tools/honeybee-radiance-command.git", "hash": "fe62562a0b228b8e46309aa88c116882247c89b9", "diff": "@@ -18,7 +18,7 @@ def run_command(input_command, env=None, cwd=None):\n if platform.system() == 'Windows':\n command = input_command.replace('\\'', '\"')\n else:\n- command = command.replace('\"', '\\'')\n+ command = input_command.replace('\"', '\\'')\n \n # change cwd - Popen cwd input simply doesn't work.\n cur_dir = os.getcwd()\n", "old_path": "honeybee_radiance_command/_command_util.py", "rewrite": "ReplaceText(target='input_command' @(21,18)->(21,25))"} -{"repo": "https://:@bitbucket.org/bertrandboichon/pi.hifi.git", "hash": "bf0316f181d6e6597722b0f3023f70a592c49d04", "diff": "@@ -11,7 +11,7 @@ class post_install(install):\n install.run(self)\n print(\"*** Executing post install actions:\")\n # update mpd configuration if necessary\n- if '/tmp/mpd.fifo' in open('/etc/mpd.conf').read():\n+ if '/tmp/mpd.fifo' not in open('/etc/mpd.conf').read():\n os.system(\"sudo cat /etc/fifo-mpd.conf >> /etc/mpd.conf\") \n os.system(\"sudo service mpd restart\") \n # update music display init script\n", "old_path": "setup.py", "rewrite": "ReplaceText(target=' not in ' @(14,26)->(14,30))"} -{"repo": "https://:@github.com/hotoffthehamster/dob.git", "hash": "9615cad9da920842a23b9a124b1d39356ebe7d2e", "diff": "@@ -43,7 +43,7 @@ def echo_copyright():\n cur_year = str(datetime.now().year)\n year_range = '2018'\n if cur_year != year_range:\n- year_range = '2018-{}'.format(year_range)\n+ year_range = '2018-{}'.format(cur_year)\n gpl3_notice_2018 = [\n '{app_name} {version}'.format(\n app_name=__BigName__,\n", "old_path": "dob/copyright.py", "rewrite": "ReplaceText(target='cur_year' @(46,38)->(46,48))"} -{"repo": "https://:@github.com/superadm1n/CiscoAutomationFramework.git", "hash": "2ffcf5da63e3479f7bcae3d552f04695b36d9466", "diff": "@@ -594,7 +594,7 @@ class IOS(TerminalCommands, CommandGetMethods):\n )\n #mac_table_list.append(line.split())\n \n- if len(line.split()) >= 1:\n+ if len(line.split()) > 1:\n if '--' in line.split()[0]:\n flag = 1\n \n", "old_path": "CiscoAutomationFramework/CiscoIOS.py", "rewrite": "ReplaceText(target='>' @(597,33)->(597,35))"} -{"repo": "https://:@github.com/bruth/ipipe.git", "hash": "dc24d06d645ab03e988a066267787aff98baee32", "diff": "@@ -20,7 +20,7 @@ class Parser(object):\n output.extend(parsed)\n else:\n output.append(parsed)\n- return parsed\n+ return output\n \n \n class FileParser(Parser):\n", "old_path": "pipes/parser.py", "rewrite": "ReplaceText(target='output' @(23,15)->(23,21))"} -{"repo": "https://:@github.com/la-mar/permian-frac-exchange.git", "hash": "3d0d86bfbb6871abdded1c5357dac5ca1c3ed756", "diff": "@@ -249,7 +249,7 @@ class Parser(object):\n ) -> pd.Series:\n try:\n apply_to = apply_to or apply_on\n- self.df[apply_on] = self.df[apply_on].apply(func)\n+ self.df[apply_to] = self.df[apply_on].apply(func)\n except KeyError as ke:\n logger.debug(\n MSG_PARSER_CHECK.format(op_name=self.operator.name, col_name=apply_on)\n", "old_path": "src/fsec/parser.py", "rewrite": "ReplaceText(target='apply_to' @(252,20)->(252,28))"} -{"repo": "https://:@bitbucket.org/sambowers/biota.git", "hash": "b9c2b1b28e5a5fb57b30e7c474ecf2e6f729edeb", "diff": "@@ -304,9 +304,9 @@ def calculateTWC(tile, patch_size = 'auto', output = False, show = False):\n \n # Extract the data\n WC = woody_cover[ymin:ymax, xmin:xmax]\n- \n+ \n # If at least 50 % of data is present...\n- if TWC.mask.sum() <= ((patch_size ** 2) * 0.5):\n+ if WC.mask.sum() <= ((patch_size ** 2) * 0.5):\n \n # Calculate proportion of woody cover in patch\n TWC.data[n, m] = int(round((float(WC.sum()) / ((patch_size ** 2) - WC.mask.sum())) * 100))\n", "old_path": "biota/indices.py", "rewrite": "ReplaceText(target='WC' @(309,11)->(309,14))"} -{"repo": "https://:@github.com/yedhrab/YInstabot.git", "hash": "c9d3f3b18656d7b19eb7b179fc7adb171bb6efe8", "diff": "@@ -106,7 +106,7 @@ def main():\n DEBUG, WAIT, NO_REFRESH, PATHS = not args.quite, args.wait, args.noRefresh, args.paths\n \n for PATH in PATHS:\n- if not os.path.isfile(PATHS):\n+ if not os.path.isfile(PATH):\n print(f\"`{PATH}` dosyaya ait de\u011fil.\")\n continue\n \n", "old_path": "yinstabot/workspace.py", "rewrite": "ReplaceText(target='PATH' @(109,30)->(109,35))"} -{"repo": "https://:@github.com/fladi/pyrc522.git", "hash": "83bd4bd1c169259a8e4c3e7736e2aa610f3a8691", "diff": "@@ -48,7 +48,7 @@ class RFID(object):\n self.spi.max_speed_hz = speed\n \n GPIO.setmode(pin_mode)\n- if pin_rst is None:\n+ if pin_rst is not None:\n GPIO.setup(pin_rst, GPIO.OUT)\n GPIO.output(pin_rst, 1)\n GPIO.setup(pin_irq, GPIO.IN, pull_up_down=GPIO.PUD_UP)\n", "old_path": "pirc522/rfid.py", "rewrite": "ReplaceText(target=' is not ' @(51,18)->(51,22))"} -{"repo": "https://:@github.com/ac-tuwien/pymhlib.git", "hash": "07e69d451d8e2f665c23f31c780cfa58f583cf4f", "diff": "@@ -63,7 +63,7 @@ def run_optimization(problem_name: str, instance_class, solution_class, default_\n :param iter_cb: optional callback function that is called each iteration by some of the algorithms\n :param seed: optional seed value for the random number generators; 0: random initialization\n \"\"\"\n- if embedded:\n+ if not embedded:\n add_general_arguments_and_parse_settings(default_inst_file, seed)\n \n init_logger()\n", "old_path": "pymhlib/demos/common.py", "rewrite": "ReplaceText(target='not ' @(66,7)->(66,7))"} -{"repo": "https://:@github.com/trevorparker/vane.git", "hash": "8b9eb3a87c10bce414017216fbd7ef333e124597", "diff": "@@ -140,7 +140,7 @@ def _fetch_weather_json(\n if (with_forecast):\n forecast_url = forecast_urls[provider]\n r = requests.get(\n- forecast_url.format(location, units, api_key))\n+ forecast_url.format(loc_parsed, units, api_key))\n f = json.loads(r.text)\n if (c['response']['features']['forecast'] != 1):\n return {'e': 'Unable to load forecast'}\n", "old_path": "vane/utils.py", "rewrite": "ReplaceText(target='loc_parsed' @(143,44)->(143,52))"} -{"repo": "https://:@github.com/juancgvazquez/MODApy.git", "hash": "7c64bc5452715160f8767c891f04d7a0a4848ebc", "diff": "@@ -227,7 +227,7 @@ class Pipeline(object):\n \n logger2.info(step.name)\n args = step.args.replace(\n- 'patientname', tmpdir + patientname).replace('reference', ref).replace('samplename', samplename)\n+ 'patientname', tmpdir + patientname).replace('reference', ref).replace('samplename', patientname)\n cmdver = step.version.replace('.', '_')\n javacmds = ['GATK', 'picard', 'SnpSift', 'snpEff']\n if any(javacmd in step.command for javacmd in javacmds):\n", "old_path": "MODApy/pipeline.py", "rewrite": "ReplaceText(target='patientname' @(230,101)->(230,111))"} -{"repo": "https://:@github.com/linhd-postdata/averell.git", "hash": "538e7f13b3b57170d94241111b416c31deb75d5c", "diff": "@@ -99,7 +99,7 @@ def download_corpora(corpus_indices=None,\n else:\n url = CORPORA_SOURCES[index][\"properties\"][\"url\"]\n filename = download_corpus(url, f\"{folder_name}.zip\")\n- folder_list.append(uncompress_corpus(filename, output_folder))\n+ folder_list.append(uncompress_corpus(filename, folder_path))\n else:\n logging.error(\"No corpus selected. Nothing will be downloaded\")\n return folder_list\n", "old_path": "src/averell/utils.py", "rewrite": "ReplaceText(target='folder_path' @(102,63)->(102,76))"} -{"repo": "https://:@github.com/poqweur/ctec-utils.git", "hash": "28470709205c35754325af5e817fded28921a389", "diff": "@@ -122,7 +122,7 @@ class OraclePool(object):\n result_db = cursor.execute(sql, param)\n if commit:\n conn.commit()\n- result = result_db.rowcount\n+ result = cursor.rowcount\n else:\n result = result_db.fetchall()\n except Exception as e:\n", "old_path": "ctec_utils/Database.py", "rewrite": "ReplaceText(target='cursor' @(125,25)->(125,34))"} -{"repo": "https://:@github.com/fsepy/sfeprapy.git", "hash": "ffdf8d512d6ca26a685f58fceac853d9ac9241b6", "diff": "@@ -137,7 +137,7 @@ def dict_flatten(dict_in: dict):\n else:\n dict_out[k] = dict_in[k]\n \n- return dict_in\n+ return dict_out\n \n \n def main(x: dict, num_samples: int):\n", "old_path": "sfeprapy/func/mcs_gen.py", "rewrite": "ReplaceText(target='dict_out' @(140,11)->(140,18))"} -{"repo": "https://:@github.com/galias11/nlp_model_gen.git", "hash": "7854eb5aac80b1f6d24bbdd7d319bb9ebb4e429a", "diff": "@@ -173,7 +173,7 @@ class ModelManagerController:\n try:\n Logger.log('L-0021')\n custom_model = self.__initialize_custom_model()\n- new_model = Model(model_id, model_name, description, author, model_name, analyzer_rule_set)\n+ new_model = Model(model_id, model_name, description, author, model_id, analyzer_rule_set)\n new_model.set_reference(custom_model)\n Logger.log('L-0022')\n self.__apply_tokenizer_exceptions(new_model, tokenizer_exceptions_path)\n", "old_path": "nlp_model_gen/packages/modelManager/ModelManagerController.py", "rewrite": "ReplaceText(target='model_id' @(176,73)->(176,83))"} -{"repo": "https://:@github.com/galias11/nlp_model_gen.git", "hash": "f03a84b2eaa77db12a4d7698bb982a2be062566b", "diff": "@@ -104,7 +104,7 @@ class Model:\n token_analyzer = Analyzer(self.__analyzer_rules_set)\n for sent in doc.sents:\n for token in sent:\n- generated_token = Token(token.lemma_, token.is_oov, token.pos_, token.sent, token.sentiment, token.tag_, sent.text)\n+ generated_token = Token(token.lemma_, token.is_oov, token.pos_, token.sent, token.sentiment, token.tag_, token.text)\n token_analyzer.analyze_token(generated_token)\n if not only_positives or generated_token.is_positive():\n results.append(generated_token)\n", "old_path": "nlp_model_gen/packages/modelManager/model/Model.py", "rewrite": "ReplaceText(target='token' @(107,121)->(107,125))"} -{"repo": "https://:@github.com/axelfahy/bff.git", "hash": "0023bab225d0c2571fb47e12a1edf19d61396a5d", "diff": "@@ -602,7 +602,7 @@ def plot_series(df: pd.DataFrame, column: str, groupby: str = '1S',\n .mean()\n .resample(groupby)\n .apply(sem)\n- if groupby == 'S' and groupby != '1S' else\n+ if groupby != 'S' and groupby != '1S' else\n df[column].groupby('datetime').apply(sem))\n \n ax.fill_between(x, df_plot - df_sem, df_plot + df_sem,\n", "old_path": "bff/fancy.py", "rewrite": "ReplaceText(target='!=' @(605,33)->(605,35))"} -{"repo": "https://:@github.com/GearPlug/mercadolibre-python.git", "hash": "3b0fa8eb47a81093e884a5699c2d25a1c700b1d0", "diff": "@@ -401,7 +401,7 @@ class Client(object):\n _params = {'access_token': self.access_token}\n if params:\n _params.update(params)\n- response = requests.request(method, self.BASE_URL + endpoint, params=params, **kwargs)\n+ response = requests.request(method, self.BASE_URL + endpoint, params=_params, **kwargs)\n return self._parse(response)\n \n def _parse(self, response):\n", "old_path": "mercadolibre/client.py", "rewrite": "ReplaceText(target='_params' @(404,77)->(404,83))"} -{"repo": "https://:@bitbucket.org/jairhul/pytransport.git", "hash": "1b8a3ebc993ea9e74429198fa3607e1bfe537601", "diff": "@@ -270,7 +270,7 @@ def RemoveIllegals(line):\n \"\"\"\n illegal = ['\"', '', '(', ')']\n \n- linelist = [element for element in line if element in illegal]\n+ linelist = [element for element in line if element not in illegal]\n line = _np.array(linelist)\n return line\n \n", "old_path": "pytransport/_General.py", "rewrite": "ReplaceText(target=' not in ' @(273,54)->(273,58))"} -{"repo": "https://:@github.com/lsst-sqre/jupyterlabdemo.git", "hash": "f6240ef0aeebdfe6e62c3f1bcf79a0fb085febd6", "diff": "@@ -480,7 +480,7 @@ class LSSTSpawner(namespacedkubespawner.NamespacedKubeSpawner):\n for vol in vollist:\n volname = self._get_volume_name_for_mountpoint(vol[\"mountpoint\"])\n shortname = vol[\"mountpoint\"][1:].replace(\"/\", \"-\")\n- if volname in already_vols:\n+ if shortname in already_vols:\n self.log.info(\n \"Volume '{}' already exists for pod.\".format(volname))\n continue\n", "old_path": "jupyterhub/sample_configs/20-spawner.py", "rewrite": "ReplaceText(target='shortname' @(483,15)->(483,22))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-core.git", "hash": "66dacd9725338a5f49d12ccee0e0ec8f9e5f8068", "diff": "@@ -68,7 +68,7 @@ class Task(TaskModel):\n def __init__(self, job, frame, parent_task=None, state=None,\n priority=None, attempts=None, agent=None):\n # build parent job id\n- if not modelfor(job, TABLE_JOB):\n+ if modelfor(job, TABLE_JOB):\n jobid = job.jobid\n if jobid is None:\n raise ValueError(\"`job` with null id provided\")\n", "old_path": "models/task.py", "rewrite": "ReplaceText(target='' @(71,11)->(71,15))"} -{"repo": "https://:@github.com/pyfarm/pyfarm-core.git", "hash": "47a4cc9232a09974dea7f246b96d0338a4a4339b", "diff": "@@ -116,5 +116,5 @@ class Task(TaskModel):\n if priority is not None:\n self.priority = priority\n \n- if attempts is None:\n+ if attempts is not None:\n self.attempts = attempts\n", "old_path": "models/task.py", "rewrite": "ReplaceText(target=' is not ' @(119,19)->(119,23))"} -{"repo": "https://:@github.com/amarouane-ABDLHAK/cumulus-process-py.git", "hash": "3955f6f5628f0b5233ad19cf54303bd164f981f1", "diff": "@@ -85,7 +85,7 @@ class Granule(object):\n m = re.match(self.inputs[f], os.path.basename(filename))\n if m is not None:\n # does the file exist locally\n- if os.path.exists(f):\n+ if os.path.exists(filename):\n self.local_in[f] = filename\n else:\n self.remote_in[f] = filename\n", "old_path": "cumulus/granule.py", "rewrite": "ReplaceText(target='filename' @(88,34)->(88,35))"} -{"repo": "https://:@github.com/CodeClubLux/TopCompiler.git", "hash": "ec1cbd020e522f8e478000d7d898003972e11490", "diff": "@@ -14,7 +14,7 @@ class Enum(Node):\n args = self.const[name]\n names = [codegen.getName() for _ in args]\n codegen.inFunction()\n- if len(args) > 0:\n+ if len(names) > 0:\n codegen.append(\"function \"+self.package+\"_\"+name+\"(\")\n codegen.append(\",\".join(names))\n codegen.append(\"){return [\"+str(count)+\",\"+\",\".join(names)+\"]}\")\n", "old_path": "AST/Enum.py", "rewrite": "ReplaceText(target='names' @(17,19)->(17,23))"} -{"repo": "https://:@github.com/GIScience/openpoiservice.git", "hash": "5a686db7a201b52f836e824910d9218bd2ff790b", "diff": "@@ -171,7 +171,7 @@ class QueryBuilder(object):\n \n if tag in filters:\n \n- filters.append(query.c.key == tag.lower())\n+ filters_list.append(query.c.key == tag.lower())\n \n if settings['filterable'] == 'like':\n filters_list.append(query.c.value.like('%' + filters[tag].lower() + '%'))\n", "old_path": "openpoiservice/server/api/query_builder.py", "rewrite": "ReplaceText(target='filters_list' @(174,16)->(174,23))"} -{"repo": "https://:@github.com/theblackcat102/jieba-tw.git", "hash": "5270ed66ff64b2001c1bf5c4ba927fec09189e33", "diff": "@@ -366,7 +366,7 @@ class Tokenizer(object):\n f = open(f, 'rb')\n for lineno, ln in enumerate(f, 1):\n line = ln.strip()\n- if not isinstance(f, text_type):\n+ if not isinstance(line, text_type):\n try:\n line = line.decode('utf-8').lstrip('\\ufeff')\n except UnicodeDecodeError:\n", "old_path": "jieba/__init__.py", "rewrite": "ReplaceText(target='line' @(369,30)->(369,31))"} -{"repo": "https://:@github.com/mozilla/measure-noise.git", "hash": "b100399b2d650a794f50c897dfb2ec3462ad814f", "diff": "@@ -103,7 +103,7 @@ def process(\n # EG https://treeherder.mozilla.org/perf.html#/graphs?highlightAlerts=1&series=mozilla-central,fee739b45f7960e4a520d8e0bd781dd9d0a3bec4,1,10&timerange=31536000\n url = \"https://treeherder.mozilla.org/perf.html#/graphs?\" + value2url_param({\n \"highlightAlerts\": 1,\n- \"series\": [sig.repository, sig.id, 1, coalesce(sig.framework, sig.framework_id)],\n+ \"series\": [sig.repository, sig.id, 1, coalesce(sig.framework_id, sig.framework)],\n \"timerange\": 31536000,\n })\n \n", "old_path": "measure_noise/analysis.py", "rewrite": "ArgSwap(idxs=0<->1 @(106,46)->(106,54))"} -{"repo": "https://:@github.com/USGS-WiM/WIMLib.git", "hash": "f9f74b29ed1dfc901b31e3df81f9f2459918dc4e", "diff": "@@ -93,7 +93,7 @@ class MapLayer(object):\n raise Exception(datasetPath +\" doesn't exist\")\n #test for schema lock, before continue\n trys=0\n- while arcpy.TestSchemaLock(datasetPath) or trys>6:\n+ while arcpy.TestSchemaLock(datasetPath) or trys<6:\n time.sleep(10)\n trys+=1\n #next\n", "old_path": "WIMLib/MapLayer.py", "rewrite": "ReplaceText(target='<' @(96,59)->(96,60))"} -{"repo": "https://:@github.com/xiawu/newchain-web3.py.git", "hash": "b253f8a8d55a087800e8e5b0947e7972a1f8258d", "diff": "@@ -31,7 +31,7 @@ def pad_right(string, chars, filler=\"0\"):\n \n def is_prefixed(value, prefix):\n return value.startswith(\n- force_bytes(prefix) if is_bytes(prefix) else force_text(prefix)\n+ force_bytes(prefix) if is_bytes(value) else force_text(prefix)\n )\n \n \n", "old_path": "web3/utils/formatting.py", "rewrite": "ReplaceText(target='value' @(34,40)->(34,46))"} -{"repo": "https://:@github.com/xiawu/newchain-web3.py.git", "hash": "6c2e459fbb1c3e9cf665b8138744510f2f797149", "diff": "@@ -143,7 +143,7 @@ def outputBlockFormatter(block):\n \n if is_array(block.get(\"transactions\")):\n for item in block[\"transactions\"]:\n- if is_string(item):\n+ if not is_string(item):\n item = outputTransactionFormatter(item)\n \n return block\n", "old_path": "web3/formatters.py", "rewrite": "ReplaceText(target='not ' @(146,15)->(146,15))"} -{"repo": "https://:@github.com/xiawu/newchain-web3.py.git", "hash": "9f8282b202f17f1e98a305b49657b7ff2387b85a", "diff": "@@ -611,7 +611,7 @@ def call_contract_function(contract=None,\n if transaction is None:\n call_transaction = {}\n else:\n- call_transaction = dict(**call_transaction)\n+ call_transaction = dict(**transaction)\n \n if not arguments:\n arguments = []\n", "old_path": "web3/contract.py", "rewrite": "ReplaceText(target='transaction' @(614,34)->(614,50))"} -{"repo": "https://:@github.com/Elizafox/taillight.git", "hash": "731c28874dd7aa29f59a862e6b01f4ea8010978e", "diff": "@@ -131,7 +131,7 @@ class Signal:\n with self._slots_lock:\n for slot in self.slots:\n if slot.function is function:\n- ret.append(function)\n+ ret.append(slot)\n \n if ret:\n return ret\n", "old_path": "taillight/signal.py", "rewrite": "ReplaceText(target='slot' @(134,31)->(134,39))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "659ab9846e81d95bb75dbb3c00147324bf0d6541", "diff": "@@ -22,7 +22,7 @@ def login(request):\n else:\n errors = {}\n response = HttpResponse()\n- response.session.set_test_cookie()\n+ request.session.set_test_cookie()\n t = template_loader.get_template('registration/login')\n c = Context(request, {\n 'form': formfields.FormWrapper(manipulator, request.POST, errors),\n", "old_path": "django/views/auth/login.py", "rewrite": "ReplaceText(target='request' @(25,4)->(25,12))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "34655a3e7816d6a8e5da6b3fd613b49b454a4691", "diff": "@@ -227,7 +227,7 @@ class DateFormat(TimeFormat):\n week_number = 1\n else:\n j = day_of_year + (7 - weekday) + (jan1_weekday - 1)\n- week_number = j / 7\n+ week_number = j // 7\n if jan1_weekday > 4:\n week_number -= 1\n return week_number\n", "old_path": "django/utils/dateformat.py", "rewrite": "ReplaceText(target='//' @(230,32)->(230,33))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "a97648a7e03fb95b09e888e5d59d82d57fb289b7", "diff": "@@ -105,7 +105,7 @@ class DecoratorsTest(TestCase):\n \"\"\"\n def my_view(request):\n return \"response\"\n- my_view_cached = cache_page(123, my_view)\n+ my_view_cached = cache_page(my_view, 123)\n self.assertEqual(my_view_cached(HttpRequest()), \"response\")\n \n class MethodDecoratorAdapterTests(TestCase):\n", "old_path": "tests/regressiontests/decorators/tests.py", "rewrite": "ArgSwap(idxs=0<->1 @(108,25)->(108,35))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "b2050ff546da4164f90a795e55d7d8c55981783d", "diff": "@@ -169,7 +169,7 @@ class SQLCompiler(object):\n if isinstance(col, (list, tuple)):\n alias, column = col\n table = self.query.alias_map[alias][TABLE_NAME]\n- if table in only_load and col not in only_load[table]:\n+ if table in only_load and column not in only_load[table]:\n continue\n r = '%s.%s' % (qn(alias), qn(column))\n if with_aliases:\n", "old_path": "django/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='column' @(172,46)->(172,49))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "cfba2460370a6d1808b78e2ba0709ea5c8b7e773", "diff": "@@ -42,7 +42,7 @@ def check_settings(base_url=None):\n Checks if the staticfiles settings have sane values.\n \n \"\"\"\n- if base_url is not None:\n+ if base_url is None:\n base_url = settings.STATIC_URL\n if not base_url:\n raise ImproperlyConfigured(\n", "old_path": "django/contrib/staticfiles/utils.py", "rewrite": "ReplaceText(target=' is ' @(45,15)->(45,23))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "d72d5ce8274992ce01e39f866a7a250bc459eefe", "diff": "@@ -37,7 +37,7 @@ class GeoSQLCompiler(compiler.SQLCompiler):\n if isinstance(col, (list, tuple)):\n alias, column = col\n table = self.query.alias_map[alias][TABLE_NAME]\n- if table in only_load and col not in only_load[table]:\n+ if table in only_load and column not in only_load[table]:\n continue\n r = self.get_field_select(field, alias, column)\n if with_aliases:\n", "old_path": "django/contrib/gis/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='column' @(40,46)->(40,49))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "6ecbac21a9017a53fe18ac81c9c1d2f28185a292", "diff": "@@ -111,5 +111,5 @@ class OSMWidget(BaseGeometryWidget):\n return 900913\n \n def render(self, name, value, attrs=None):\n- return super(self, OSMWidget).render(name, value,\n+ return super(OSMWidget, self).render(name, value,\n {'default_lon': self.default_lon, 'default_lat': self.default_lat})\n", "old_path": "django/contrib/gis/forms/widgets.py", "rewrite": "ArgSwap(idxs=0<->1 @(114,15)->(114,20))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "86c248aa646183ef4a1cb407bb3e4cb597272f63", "diff": "@@ -575,7 +575,7 @@ class SQLCompiler(object):\n for order, order_params in ordering_group_by:\n # Even if we have seen the same SQL string, it might have\n # different params, so, we add same SQL in \"has params\" case.\n- if order not in seen or params:\n+ if order not in seen or order_params:\n result.append(order)\n params.extend(order_params)\n seen.add(order)\n", "old_path": "django/db/models/sql/compiler.py", "rewrite": "ReplaceText(target='order_params' @(578,44)->(578,50))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "fddb0131d37109c809ec391e1a134ef1d9e442a7", "diff": "@@ -57,7 +57,7 @@ def check_password(password, encoded, setter=None, preferred='default'):\n \n must_update = hasher.algorithm != preferred.algorithm\n if not must_update:\n- must_update = hasher.must_update(encoded)\n+ must_update = preferred.must_update(encoded)\n is_correct = hasher.verify(password, encoded)\n if setter and is_correct and must_update:\n setter(password)\n", "old_path": "django/contrib/auth/hashers.py", "rewrite": "ReplaceText(target='preferred' @(60,22)->(60,28))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "e8223b889aab3b5ac0c2312eb9ee2307ea635c97", "diff": "@@ -228,7 +228,7 @@ class GenericRelationTests(TestCase):\n # then wrong results are produced here as the link to b will also match\n # (b and hs1 have equal pks).\n self.assertEqual(qs.count(), 1)\n- self.assertEqual(qs[0].links__sum, l.id)\n+ self.assertEqual(qs[0].links__sum, hs1.id)\n l.delete()\n # Now if we don't have proper left join, we will not produce any\n # results at all here.\n", "old_path": "tests/generic_relations_regress/tests.py", "rewrite": "ReplaceText(target='hs1' @(231,43)->(231,44))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "3074c5b19e2da5f7a5359c3cf3c5308eb194cdf9", "diff": "@@ -112,7 +112,7 @@ class ClassDecoratedTestCase(ClassDecoratedTestCaseSuper):\n \n @classmethod\n def setUpClass(cls):\n- super(cls, ClassDecoratedTestCase).setUpClass()\n+ super(ClassDecoratedTestCase, cls).setUpClass()\n cls.foo = getattr(settings, 'TEST', 'BUG')\n \n def test_override(self):\n", "old_path": "tests/settings_tests/tests.py", "rewrite": "ArgSwap(idxs=0<->1 @(115,8)->(115,13))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "c2b4967e76fd671e6199e4dd54d2a2c1f096b8eb", "diff": "@@ -23,7 +23,7 @@ def import_string(dotted_path):\n return getattr(module, class_name)\n except AttributeError:\n msg = 'Module \"%s\" does not define a \"%s\" attribute/class' % (\n- dotted_path, class_name)\n+ module_path, class_name)\n six.reraise(ImportError, ImportError(msg), sys.exc_info()[2])\n \n \n", "old_path": "django/utils/module_loading.py", "rewrite": "ReplaceText(target='module_path' @(26,12)->(26,23))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "abcdb237bb313d116ce2ac8e90f79f61429afc70", "diff": "@@ -31,7 +31,7 @@ class DatabaseCreation(BaseDatabaseCreation):\n try:\n if verbosity >= 1:\n print(\"Destroying old test database for alias %s...\" % (\n- self._get_database_display_str(target_database_name, verbosity),\n+ self._get_database_display_str(verbosity, target_database_name),\n ))\n cursor.execute(\"DROP DATABASE %s\" % qn(target_database_name))\n cursor.execute(\"CREATE DATABASE %s\" % qn(target_database_name))\n", "old_path": "django/db/backends/mysql/creation.py", "rewrite": "ArgSwap(idxs=0<->1 @(34,28)->(34,58))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "542b7f6c50df18f2aa201cf1de81577c1bee643c", "diff": "@@ -50,7 +50,7 @@ class SeparateDatabaseAndState(Operation):\n to_state = base_state.clone()\n for dbop in self.database_operations[:-(pos + 1)]:\n dbop.state_forwards(app_label, to_state)\n- from_state = base_state.clone()\n+ from_state = to_state.clone()\n database_operation.state_forwards(app_label, from_state)\n database_operation.database_backwards(app_label, schema_editor, from_state, to_state)\n \n", "old_path": "django/db/migrations/operations/special.py", "rewrite": "ReplaceText(target='to_state' @(53,25)->(53,35))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "d5088f838d837fc9e3109c828f18511055f20bea", "diff": "@@ -383,7 +383,7 @@ class CombinedExpression(Expression):\n return DurationExpression(self.lhs, self.connector, self.rhs).as_sql(compiler, connection)\n if (lhs_output and rhs_output and self.connector == self.SUB and\n lhs_output.get_internal_type() in {'DateField', 'DateTimeField', 'TimeField'} and\n- lhs_output.get_internal_type() == lhs_output.get_internal_type()):\n+ lhs_output.get_internal_type() == rhs_output.get_internal_type()):\n return TemporalSubtraction(self.lhs, self.rhs).as_sql(compiler, connection)\n expressions = []\n expression_params = []\n", "old_path": "django/db/models/expressions.py", "rewrite": "ReplaceText(target='rhs_output' @(386,50)->(386,60))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "67a6ba391bbcf1a4c6bb0c42cb17e4fc0530f6d2", "diff": "@@ -42,7 +42,7 @@ class PasswordResetTokenGenerator:\n return False\n \n # Check the timestamp is within limit\n- if (self._num_days(self._today()) - ts) >= settings.PASSWORD_RESET_TIMEOUT_DAYS:\n+ if (self._num_days(self._today()) - ts) > settings.PASSWORD_RESET_TIMEOUT_DAYS:\n return False\n \n return True\n", "old_path": "django/contrib/auth/tokens.py", "rewrite": "ReplaceText(target='>' @(45,48)->(45,50))"} -{"repo": "https://:@github.com/Fak3/minidjango.git", "hash": "acc8dd4142ec81def9a73507120c0262ba6b1264", "diff": "@@ -60,7 +60,7 @@ class RWLock:\n def writer_enters(self):\n with self.mutex:\n if self.active_writers == 0 and self.waiting_writers == 0 and self.active_readers == 0:\n- self.active_writers += 1\n+ self.active_writers = 1\n self.can_write.release()\n else:\n self.waiting_writers += 1\n", "old_path": "django/utils/synch.py", "rewrite": "ReplaceText(target='=' @(63,36)->(63,38))"} -{"repo": "https://:@github.com/benemery/filewatch.git", "hash": "3fbf9780eb51d3efe869bfbeb85e7e6bb25f152e", "diff": "@@ -58,4 +58,4 @@ class Watcher(object):\n def _get_key(self, full_path):\n \"\"\"Build a checksum used to identify this filepath\"\"\"\n full_path_checksum = hashlib.sha1(full_path).digest()\n- return full_path\n+ return full_path_checksum\n", "old_path": "filewatch/watcher.py", "rewrite": "ReplaceText(target='full_path_checksum' @(61,15)->(61,24))"} -{"repo": "https://:@github.com/akrzos/collectd-swift-stat.git", "hash": "59c358b8b3b5c90fe62fa2157ece5fc2be480535", "diff": "@@ -47,7 +47,7 @@ def read(data=None):\n metric.plugin = 'swift_stat'\n metric.interval = INTERVAL\n metric.type = 'gauge'\n- metric.type_instance = m_instance\n+ metric.type_instance = name\n metric.values = [stats[m_instance]]\n metric.dispatch()\n else:\n", "old_path": "collectd_swift_stat/__init__.py", "rewrite": "ReplaceText(target='name' @(50,35)->(50,45))"} -{"repo": "https://:@github.com/luidale/starpa.git", "hash": "5abc255ec0b0e4a08b2df4ce43687bd8725c840f", "diff": "@@ -260,7 +260,7 @@ class identify():\n #index bam\n samtools_index_command = (\n settings[\"samtools_call\"], \"index\",\n- length_split_bam\n+ strand_split_bam\n )\n \n os.system(\" \".join(samtools_index_command))\n", "old_path": "src/starpa/identify.py", "rewrite": "ReplaceText(target='strand_split_bam' @(263,16)->(263,32))"} -{"repo": "https://:@github.com/luidale/starpa.git", "hash": "1b6ffa79af68393e10d9bfb610f5a8e4427d4247", "diff": "@@ -693,7 +693,7 @@ class identify():\n input_bam\n # input_bam, \"2>\", featurecounts_info\n )\n- with open(output_SAF) as f_out:\n+ with open(input_SAF) as f_out:\n for line in f_out:\n print(line)\n \n", "old_path": "src/starpa/identify.py", "rewrite": "ReplaceText(target='input_SAF' @(696,18)->(696,28))"} -{"repo": "https://:@github.com/luidale/starpa.git", "hash": "9d0b06a03151b6790c58e244b1dc9b420b1e5480", "diff": "@@ -850,7 +850,7 @@ class quantify():\n for j,pos in enumerate(genomic_seq):\n if pos == \"*\":\n genomic_seq_conv.append(\"*\")\n- elif pos == consensus_seq[i]:\n+ elif pos == consensus_seq[j]:\n genomic_seq_conv.append(\".\")\n else:\n genomic_seq_conv.append(pos)\n", "old_path": "src/starpa/quantify.py", "rewrite": "ReplaceText(target='j' @(853,42)->(853,43))"} -{"repo": "https://:@github.com/chris17453/python-vipaccess.git", "hash": "91818b4487f75b3de8758e5634b9f1661cab720e", "diff": "@@ -120,7 +120,7 @@ def main():\n help=\"Specify the token secret on the command line (base32 encoded)\")\n m.add_argument('-f', '--dotfile', type=PathType(exists=True), default=os.path.expanduser('~/.vipaccess'),\n help=\"File in which the credential is stored (default ~/.vipaccess\")\n- m.add_argument('-v', '--verbose', action='store_true')\n+ pshow.add_argument('-v', '--verbose', action='store_true')\n pshow.set_defaults(func=show)\n \n p.set_default_subparser('show')\n", "old_path": "vipaccess/cli.py", "rewrite": "ReplaceText(target='pshow' @(123,4)->(123,5))"} -{"repo": "https://:@github.com/thrau/pymq.git", "hash": "3b7c4e61b1e5a9387085ac91448070df0a8b6f73", "diff": "@@ -233,7 +233,7 @@ class AbstractEventBus(EventBus, abc.ABC):\n \n callbacks = self._subscribers.get((channel, pattern))\n \n- if callback:\n+ if callbacks:\n callbacks.remove(callback)\n if len(callbacks) == 0:\n del self._subscribers[(channel, pattern)]\n", "old_path": "pymq/provider/base.py", "rewrite": "ReplaceText(target='callbacks' @(236,11)->(236,19))"} -{"repo": "https://:@github.com/DFE/MONK.git", "hash": "3b791f19cdc3176fa917ec66fec8d31d1fc05141", "diff": "@@ -89,7 +89,7 @@ class Device(object):\n \"awk '{print $1}'\",]))\n ips = out.split(\"\\n\")\n if out and not out.startswith(\"127.0.0.1\"):\n- self._logger.debug(\"found IP addresses:\" + str(out))\n+ self._logger.debug(\"found IP addresses:\" + str(ips))\n return out.split('\\n')\n else:\n raise NoIPException(\"couldn't receive any IP address:'{}'\".format(\n", "old_path": "monk_tf/dev.py", "rewrite": "ReplaceText(target='ips' @(92,59)->(92,62))"} -{"repo": "https://:@github.com/mush42/oy-cms.git", "hash": "9ca054ae384ec1ab1efee4aead448b647662176f", "diff": "@@ -79,7 +79,7 @@ class Page(StarlitModule):\n return rv\n \n def set_page_and_response_if_appropriate(self):\n- if isinstance(request.routing_exception, NotFound) and current_page:\n+ if not isinstance(request.routing_exception, NotFound) and current_page:\n return self.page_view()\n \n def _add_contenttype_handler(\n", "old_path": "starlit/contrib/page/__init__.py", "rewrite": "ReplaceText(target='not ' @(82,11)->(82,11))"} -{"repo": "https://:@github.com/Brian-Williams/robotframework-testlink.git", "hash": "1a86edf13d65fc36c268b4f600f937303ccd778b", "diff": "@@ -29,7 +29,7 @@ class RobotTestLinkHelper(TestLinkHelper):\n \n def _get_missing_params_from_robot_variables(self, param_dict):\n for testlink_param, robot_variable in robot_report_params.items():\n- setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(testlink_param))\n+ setdefault_if_not_none(param_dict, testlink_param, self._get_param_from_robot(robot_variable))\n \n def _setParamsFromRobot(self):\n \"\"\"\n", "old_path": "robottestlink/robottestlinkhelper.py", "rewrite": "ReplaceText(target='robot_variable' @(32,90)->(32,104))"} -{"repo": "https://:@github.com/FRESNA/atlite.git", "hash": "923bbb453e31e43220f786e48a89266f976d787b", "diff": "@@ -160,7 +160,7 @@ def compute_indicatormatrix(orig, dest, orig_proj='latlong', dest_proj='latlong'\n def maybe_swap_spatial_dims(ds, namex='x', namey='y'):\n swaps = {}\n lx, rx = ds.indexes[namex][[0, -1]]\n- uy, ly = ds.indexes[namex][[0, -1]]\n+ uy, ly = ds.indexes[namey][[0, -1]]\n \n if lx > rx:\n swaps[namex] = slice(None, None, -1)\n", "old_path": "atlite/gis.py", "rewrite": "ReplaceText(target='namey' @(163,24)->(163,29))"} -{"repo": "https://:@github.com/bpeschier/django-compressor-requirejs.git", "hash": "cdd6170db7941d8cdc584a832098a2964a4ba2ff", "diff": "@@ -96,7 +96,7 @@ class RequireJSCompiler(FilterBase):\n output = compressor.filter_output(filtered)\n path = compressor.get_filepath(output, basename=basename)\n # Write it\n- compressor.storage.save(path, ContentFile(content.encode(compressor.charset)))\n+ compressor.storage.save(path, ContentFile(output.encode(compressor.charset)))\n return mark_safe(compressor.storage.url(path))\n \n #\n", "old_path": "requirejs/filter.py", "rewrite": "ReplaceText(target='output' @(99,50)->(99,57))"} -{"repo": "https://:@github.com/kemerelab/jagular.git", "hash": "a192f4fe9b90d49acd6d67d51ae6e08e71fae165", "diff": "@@ -385,7 +385,7 @@ class JagularFileMap(object):\n timestamps = timestamps + timestamps_ # list concatenation\n channel_data = np.hstack((channel_data, channel_data_))\n if timestamps:\n- yield timestamps, channel_data_\n+ yield timestamps, channel_data\n else:\n ii+=1\n except IndexError:\n", "old_path": "jagular/io.py", "rewrite": "ReplaceText(target='channel_data' @(388,42)->(388,55))"} -{"repo": "https://:@github.com/lucis-fluxum/matisse-controller.git", "hash": "3f8ad49e02ea4d6cab798a5828e228242093d3e2", "diff": "@@ -54,7 +54,7 @@ class StatusUpdateThread(QThread):\n slow_pz_pos_text = f\"Slow Pz:{slow_pz_pos:.3f}\"\n refcell_pos_text = f\"RefCell:{refcell_pos:.3f}\"\n stabilizing_text = f\"Stabilize:{green_text('ON') if is_stabilizing else red_text('OFF')}\"\n- scanning_text = f\"Scanning:{green_text('ON') if is_stabilizing else red_text('OFF')}\"\n+ scanning_text = f\"Scanning:{green_text('ON') if is_scanning else red_text('OFF')}\"\n locked_text = f\"{green_text('LOCKED') if is_locked else red_text('NO LOCK')}\"\n wavemeter_text = f\"Wavemeter:{wavemeter_value}\"\n \n", "old_path": "matisse_controller/gui/threads/status_update_thread.py", "rewrite": "ReplaceText(target='is_scanning' @(57,68)->(57,82))"} -{"repo": "https://:@github.com/pozytywnie/raven-python.git", "hash": "dedca8e5c98124f6a43a18986e142e8cb7ecc3cf", "diff": "@@ -59,7 +59,7 @@ def setup_logging(handler, exclude=['raven', 'sentry.errors']):\n Returns a boolean based on if logging was configured or not.\n \"\"\"\n logger = logging.getLogger()\n- if handler.__class__ not in map(type, logger.handlers):\n+ if handler.__class__ in map(type, logger.handlers):\n return False\n \n logger.addHandler(handler)\n", "old_path": "raven/conf/__init__.py", "rewrite": "ReplaceText(target=' in ' @(62,24)->(62,32))"} -{"repo": "https://:@github.com/pozytywnie/raven-python.git", "hash": "f0ad0ca6a9de44128982de50c30157b779b69d71", "diff": "@@ -16,7 +16,7 @@ class TransportRegistry(object):\n self.register_transport(transport)\n \n def register_transport(self, transport):\n- if not hasattr(transport, 'scheme') and not hasattr(transport.scheme, '__iter__'):\n+ if not hasattr(transport, 'scheme') or not hasattr(transport.scheme, '__iter__'):\n raise AttributeError('Transport %s must have a scheme list', transport.__class__.__name__)\n \n for scheme in transport.scheme:\n", "old_path": "raven/transport/registry.py", "rewrite": "ReplaceText(target='or' @(19,44)->(19,47))"} -{"repo": "https://:@github.com/drakantas/Ryoken.git", "hash": "fb88049c62556d929525509f5e9c192ae2fc6f3b", "diff": "@@ -29,4 +29,4 @@ class StrLengthDict(dict):\n if key in self:\n raise KeyError('Key already exists')\n \n- super().__setitem__(key, (len(key), value))\n+ super().__setitem__(key, (len(value), value))\n", "old_path": "ryoken/collections.py", "rewrite": "ReplaceText(target='value' @(32,38)->(32,41))"} -{"repo": "https://:@gitlab.com/aaron235/gemini-python.git", "hash": "78c0df38e2193875c19167cd4dd42028e973352a", "diff": "@@ -30,7 +30,7 @@ class Gemini( object ):\n \t\targStringb64 = b64encode( bytes( argString, \"utf-8\" ) ).decode( \"utf-8\" )\n \t\tsignature = hmac.new(\n \t\t\t\tbytes( self.__private, 'utf-8' ),\n-\t\t\t\tbytes( argString, 'utf-8' ),\n+\t\t\t\tbytes( argStringb64, 'utf-8' ),\n \t\t\t\tsha384 )\n \t\theaderPayload = {\n \t\t\t'X-GEMINI-APIKEY': self.__public,\n", "old_path": "gemini/gemini.py", "rewrite": "ReplaceText(target='argStringb64' @(33,11)->(33,20))"} -{"repo": "https://:@github.com/Haufe-Lexware/hl.plone.boardnotifications.git", "hash": "fe26e02ea6c31a95c8ab89e41a136d1ac4519ad5", "diff": "@@ -316,7 +316,7 @@ class Notifier(Persistent):\n di['commenttext'] = safe_unicode(comment.getText())\n subscriptions = getUtility(ISubscriptions)\n subscribers = set(subscriptions.subscribers_for(thread)) | set(subscriptions.subscribers_for(forum))\n- mdtool = getToolByName(comment, 'portal_memberdata')\n+ mdtool = getToolByName(thread, 'portal_memberdata')\n keys = mdtool.propertyIds()\n for mdata in subscribers:\n if (comment is not None) and (mdata.getId() == comment.Creator()):\n", "old_path": "hl/plone/boardnotifications/notify.py", "rewrite": "ReplaceText(target='thread' @(319,31)->(319,38))"} -{"repo": "https://:@github.com/agorinenko/drf-toolkit.git", "hash": "537a2f9d0a9c740e706c377dd7aa07121b77ca74", "diff": "@@ -10,7 +10,7 @@ def validate_request(schema):\n context = DrfUtils.get_request_parameters(request)\n context = SchemaValidator.validate(context, schema)\n kwargs['context'] = context\n- return view_func(request, *args, **kwargs)\n+ return view_func(view, *args, **kwargs)\n \n return _wrapped_view\n \n", "old_path": "drf_toolkit/decorators.py", "rewrite": "ReplaceText(target='view' @(13,29)->(13,36))"} -{"repo": "https://:@gitlab.com/sehnem/pynmet.git", "hash": "256a7fdab2287ba0f65440766ea6ecf825b058b4", "diff": "@@ -51,7 +51,7 @@ class inmet:\n self.lat = inmet.sites.loc[code].lat\n self.lon = inmet.sites.loc[code].lon\n self.alt = inmet.sites.loc[code].alt\n- self.dados = get_from_ldb(code, db, local)\n+ self.dados = get_from_ldb(code, local, db)\n \n def resample(self, periodo):\n metodos = {'Temperatura': np.mean, 'Temperatura_max': np.max,\n", "old_path": "pynmet/inmet.py", "rewrite": "ArgSwap(idxs=1<->2 @(54,21)->(54,33))"} -{"repo": "https://:@github.com/noobermin/lspplot.git", "hash": "b384a18d8f70361e1a92ce11e76213b00f396be5", "diff": "@@ -86,7 +86,7 @@ trajdefaults = dict(\n );\n \n def trajectories(ret,trajs,**kw):\n- getkw=mk_getkw(trajdefaults, kw);\n+ getkw=mk_getkw(kw, trajdefaults);\n x,y = getkw(\"coords\");\n if not test(kw, \"no_resize\"):\n xlim, ylim = ret['axes'].get_xlim(), ret['axes'].get_ylim();\n", "old_path": "lspplot/pc.py", "rewrite": "ArgSwap(idxs=0<->1 @(89,10)->(89,18))"} -{"repo": "https://:@github.com/plures/xnd.git", "hash": "5af6cf49bfa52ba6381de63c836ca0dcbcd20fe1", "diff": "@@ -25,7 +25,7 @@ class xnd(_xnd):\n \"the 'type' and 'levels' arguments are mutually exclusive\")\n elif isinstance(type, str):\n type = ndt(type)\n- return _xnd(value, type)\n+ return _xnd(type, value)\n \n @classmethod\n def empty(cls, t):\n", "old_path": "python/xnd/__init__.py", "rewrite": "ArgSwap(idxs=0<->1 @(28,15)->(28,19))"} -{"repo": "https://:@github.com/OCA/wms.git", "hash": "c1c96372dd2ecbe990cc33eb630d243bd748804b", "diff": "@@ -243,7 +243,7 @@ class SinglePackPutaway(Component):\n if not pack_transfer.is_dest_location_valid(move, scanned_location):\n return self._response_for_forbidden_location()\n \n- if not pack_transfer.is_dest_location_to_confirm(move, scanned_location):\n+ if pack_transfer.is_dest_location_to_confirm(move, scanned_location):\n if confirmation:\n # keep the move in sync otherwise we would have a move line outside\n # the dest location of the move\n", "old_path": "shopfloor/services/single_pack_putaway.py", "rewrite": "ReplaceText(target='' @(246,11)->(246,15))"} -{"repo": "https://:@github.com/OCA/wms.git", "hash": "47a835c99aa0b8c1c4db3fd8b73fa04b8eca6d95", "diff": "@@ -40,7 +40,7 @@ class PackTransferValidateAction(Component):\n zone_locations = self.env[\"stock.location\"].search(\n [(\"id\", \"child_of\", move_dest_location.id)]\n )\n- return scanned_location in zone_locations\n+ return scanned_location not in zone_locations\n \n def set_destination_and_done(self, move, scanned_location):\n \n", "old_path": "shopfloor/actions/pack_transfer_validate.py", "rewrite": "ReplaceText(target=' not in ' @(43,31)->(43,35))"} -{"repo": "https://:@github.com/OCA/wms.git", "hash": "47a835c99aa0b8c1c4db3fd8b73fa04b8eca6d95", "diff": "@@ -245,7 +245,7 @@ class SinglePackTransfer(Component):\n if not pack_transfer.is_dest_location_valid(move, scanned_location):\n return self._response_for_forbidden_location()\n \n- if not pack_transfer.is_dest_location_to_confirm(move, scanned_location):\n+ if pack_transfer.is_dest_location_to_confirm(move, scanned_location):\n if confirmation:\n # keep the move in sync otherwise we would have a move line outside\n # the dest location of the move\n", "old_path": "shopfloor/services/single_pack_transfer.py", "rewrite": "ReplaceText(target='' @(248,11)->(248,15))"} -{"repo": "https://:@github.com/OCA/wms.git", "hash": "0355f73436ee7b90b46f3e740313a8a7bdc5dd8a", "diff": "@@ -19,7 +19,7 @@ class SelectDestPackageMixin:\n \"partner\": {\"id\": self.customer.id, \"name\": self.customer.name},\n },\n \"packages\": [\n- self._package_data(picking, package) for package in packages\n+ self._package_data(package, picking) for package in packages\n ],\n \"selected_move_lines\": [\n self._move_line_data(ml) for ml in selected_lines.sorted()\n", "old_path": "shopfloor/tests/test_checkout_list_package.py", "rewrite": "ArgSwap(idxs=0<->1 @(22,20)->(22,38))"} -{"repo": "https://:@github.com/OCA/wms.git", "hash": "6901f38959994d8c64f55a8ab3aad53896f34655", "diff": "@@ -193,7 +193,7 @@ class StockMove(models.Model):\n new_move_per_location[routing_location.id].append(new_move_id)\n \n new_moves = self.browse(chain.from_iterable(new_move_per_location.values()))\n- return self + new_moves\n+ return self | new_moves\n \n def _apply_routing_rule_pull(self):\n \"\"\"Apply routing operations\n", "old_path": "stock_routing_operation/models/stock_move.py", "rewrite": "ReplaceText(target='|' @(196,20)->(196,21))"} -{"repo": "https://:@github.com/yassersouri/fandak.git", "hash": "c75c70e67f2839cbb16b79fded8694c085d7fb24", "diff": "@@ -77,7 +77,7 @@ class ScalarMetricCollection:\n else:\n value = attr\n self.writer.add_scalar(tag_name, scalar_value=value, global_step=step)\n- self.values[attr_name].append(dc_value)\n+ self.values[attr_name].append(value)\n \n def epoch_finished(self, epoch_num: int):\n if self.report_average:\n", "old_path": "fandak/utils/metrics.py", "rewrite": "ReplaceText(target='value' @(80,42)->(80,50))"} -{"repo": "https://:@gitlab.com/pelops/alcathous.git", "hash": "df1f1b67170560bac0eb6273711f3f8787965e24", "diff": "@@ -86,7 +86,7 @@ class DataPointManager(AbstractMicroservice):\n _config_methods[key] = m\r\n \r\n for config_data_point in self._config[\"datapoints\"]:\r\n- dp = DataPoint(config_data_point, _config_methods, self._logger, self._mqtt_client,\r\n+ dp = DataPoint(config_data_point, _config_methods, self._mqtt_client, self._logger,\r\n self._no_data_behavior)\r\n self._purges.append(dp.purge_old_values)\r\n for method in dp.methods:\r\n", "old_path": "alcathous/datapointmanager.py", "rewrite": "ArgSwap(idxs=2<->3 @(89,17)->(89,26))"} -{"repo": "https://:@github.com/miracle2k/docker-deploy.git", "hash": "f91f61ec18461b9f88802f2c01ed463565b66f19", "diff": "@@ -61,7 +61,7 @@ class DomainPlugin(Plugin):\n strowger = StrowgerClient(api_ip)\n \n for domain, data in domains.items():\n- service_name = domain.get('http')\n+ service_name = data.get('http')\n if not service_name:\n continue\n strowger.set_http_route(domain, service_name)\n", "old_path": "deploylib/plugins/domains.py", "rewrite": "ReplaceText(target='data' @(64,27)->(64,33))"} -{"repo": "https://:@github.com/ttm/participation.git", "hash": "205208b5b8f477ae40de7453c98fba77d7faf6ef", "diff": "@@ -43,7 +43,7 @@ def connectMongo():\n client=pymongo.MongoClient(aa.mongouri)\n shouts=client.aaserver.shouts.find({})\n shouts_=[shout for shout in shouts]\n- return shouts\n+ return shouts_\n \n def accessIrcLog():\n with codecs.open(\"../../social/data/irc/labmacambira_lalenia3.txt\",\"rb\",\"iso-8859-1\") as f:\n", "old_path": "participation/aa/access.py", "rewrite": "ReplaceText(target='shouts_' @(46,11)->(46,17))"} -{"repo": "https://:@github.com/malicialab/avclass.git", "hash": "4850b49eb120c39ebcdb4c1b77a3717b00b9666c", "diff": "@@ -399,7 +399,7 @@ class Update:\n tagging.expand_all_destinations()\n tagging.to_file(tag_filepath)\n log.info('[-] Output %d tagging rules to %s' % (\n- len(tagging), tax_filepath))\n+ len(tagging), tag_filepath))\n expansion.to_file(exp_filepath)\n log.info('[-] Output %d expansion rules to %s' % (\n len(expansion), exp_filepath))\n", "old_path": "avclass2/avclass2_update_module.py", "rewrite": "ReplaceText(target='tag_filepath' @(402,38)->(402,50))"} -{"repo": "https://:@gitlab.com/crem-repository/dhd.git", "hash": "ffbb2435ba6d85b4ad2008e8268fbbe66781a4be", "diff": "@@ -288,7 +288,7 @@ def test_get_best_terminal_steiner_tree(load_pkl_evolve):\n \n evolution = evolve.run_evolution(vertices, terminals, 5, n=16, n1=2, n2=8)\n genes = evolve.get_best_individual(evolution)\n- tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, genes)\n+ tst = evolve.get_best_terminal_steiner_tree(vertices, terminals, evolution)\n w1 = tst['weight'].sum()\n w2 = evolution.at[len(evolution)-1,'weight']\n \n", "old_path": "tests/test_evolve.py", "rewrite": "ReplaceText(target='evolution' @(291,69)->(291,74))"} -{"repo": "https://:@github.com/xia2/xia2.git", "hash": "904123ce19ff3a06c124ad2ca3ee8ca905e7ffa8", "diff": "@@ -102,7 +102,7 @@ def reconstruct_rogues(params):\n for j, rogue in enumerate(rogues):\n reflections['id'][ann.nn[j]] = 1701\n \n- rogues = reflections.select(reflections['id'] == 1701)\n+ reflections = reflections.select(reflections['id'] == 1701)\n \n if params.extract:\n reflections[\"shoebox\"] = flex.shoebox(\n", "old_path": "command_line/rogues_gallery.py", "rewrite": "ReplaceText(target='reflections' @(105,4)->(105,10))"} -{"repo": "https://:@github.com/xia2/xia2.git", "hash": "849c882a900c44d75c5d4112ca2dc279398b17a6", "diff": "@@ -330,7 +330,7 @@ class DialsScaler(Scaler):\n Debug.write('X1698: %s: %s' % (pointgroup, reindex_op))\n \n if ntr:\n- integrater.integrater_reset_reindex_operator()\n+ intgr.integrater_reset_reindex_operator()\n need_to_return = True\n \n if pt and not probably_twinned:\n", "old_path": "Modules/Scaler/DialsScaler.py", "rewrite": "ReplaceText(target='intgr' @(333,12)->(333,22))"}
Statistics for the last 500 blocks
Kilobytes transferred: {}
Kilobytes transferred: {}
Transactions: {}
Transactions per block: {}
Total BIS transferred {}Kindergartenblock - Verbinden, vergleichen, Fehler finden ab 4 Jahre / Linda Bayerl