commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
dc56a80e80ea69aa633505f682bbf8a860a186f1
Allow check_oom_events to optionally make tickets. PAASTA-15879
paasta_tools/check_oom_events.py
paasta_tools/check_oom_events.py
#!/usr/bin/env python # Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
Python
0
@@ -5183,37 +5183,8 @@ se,%0A - %22ticket%22: False,%0A
17f58b0b269dcdbd4c092bbcf1d0fc993f5807d8
Use realpath for template name in dependency list
yasha/scripts/yasha.py
yasha/scripts/yasha.py
""" The MIT License (MIT) Copyright (c) 2015-2016 Kim Blomqvist Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ...
Python
0
@@ -7286,19 +7286,49 @@ ) + %22: %22 - + +%0A deps += os.path.relpath( template @@ -7328,24 +7328,25 @@ emplate.name +) + %22 %22%0A
40d59c44f8488ab6445b626637bfb3135cbbfd56
Clean up Firefox WebDriver constructor
py/selenium/webdriver/firefox/webdriver.py
py/selenium/webdriver/firefox/webdriver.py
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Python
0.000007
@@ -1778,111 +1778,73 @@ -self.profile = firefox_profile%0A self.binary = firefox_binary%0A if firefox_options is None: +capabilities = capabilities or DesiredCapabilities.FIREFOX.copy() %0A%0A @@ -1841,39 +1841,32 @@ copy()%0A%0A - if self.profile is @@ -1866,46 +1866,26 @@ ile ...
c33b23e1d5263321cc29e2fe1f9871e36d97c5e5
add method get on opps db redis
opps/db/_redis.py
opps/db/_redis.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from opps.db.conf import settings from redis import ConnectionPool from redis import Redis as RedisClient class Redis: def __init__(self, key_prefix, key_sufix): self.key_prefix = key_prefix self.key_sufix = key_sufix self.host = settings.OPPS...
Python
0
@@ -898,8 +898,61 @@ ument)%0A%0A + def get(self):%0A self.conn.get(self.key())%0A
b03b168cd752d50f1091106d3f4fcc0a79b22203
Fix tests
siyavula/latex2image/tests/latex2image_tests.py
siyavula/latex2image/tests/latex2image_tests.py
# coding=utf-8 from unittest import TestCase from lxml import etree from siyavula.latex2image.imageutils import replace_latex_with_images class TestBaseEquationToImageConversion(TestCase): """Test the equation to image conversion.""" def setUp(self): self.element_input = etree.Element('xml') ...
Python
0.000003
@@ -60,16 +60,22 @@ rt etree +, html %0A%0Afrom s @@ -799,24 +799,27 @@ -self.assertEqual +xml = html.tostring (rep @@ -886,12 +886,232 @@ '') -, None +)%0A self.assertEqual(xml, '%3Cxml%3E%3Cdiv class=%22latex-math%22%3E%3Ca href=%22/8996d7eee5c41cdf08aa8c0e9fe42e93.png%22%3E%3Cimg src=%22/8996d7eee5...
3fd74018c87ec598de173de7d13224523ee98ec5
update LATEX_SUBS table
IPython/nbconvert/filters/latex.py
IPython/nbconvert/filters/latex.py
"""Latex filters. Module of useful filters for processing Latex within Jinja latex templates. """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in th...
Python
0
@@ -966,16 +966,17 @@ mplates%0A +%0A LATEX_SU @@ -1015,17 +1015,16 @@ r'%5C%25', - %0A '$' @@ -1032,17 +1032,16 @@ r'%5C$', - %0A '#' @@ -1049,17 +1049,16 @@ r'%5C#', - %0A '_' @@ -1067,29 +1067,11 @@ r'%5C -letterunderscore%7B%7D +_ ', - %0A @@ -1084,28 +1084,11 @@ r'%5C -letterope...
e8836b134c47080edaf47532d7cb844b307dfb08
Add a guard against the task list changing when shutting down (#776)
zeroconf/_utils/aio.py
zeroconf/_utils/aio.py
""" Multicast DNS Service Discovery for Python, v0.14-wmcbrine Copyright 2003 Paul Scott-Murphy, 2014 William McBrine This module provides a framework for the use of DNS Service Discovery using IP multicast. This library is free software; you can redistribute it and/or modify it under the terms of...
Python
0.009597
@@ -1029,16 +1029,22 @@ g import + List, Optiona @@ -2241,18 +2241,19 @@ oop) -%3E -Se +Lis t%5Basynci @@ -2362,16 +2362,84 @@ eadsafe%0A + # Make a copy of the tasks in case they change during iteration%0A if h @@ -2487,32 +2487,13 @@ urn -ca +li st( -Set%5Basyncio.Task%5D, asyn @@ -2573,32 +2573,1...
3989abf6de879af6982a76ea3522f11f789c6569
Increment version for speedup release
MarkovNetwork/_version.py
MarkovNetwork/_version.py
# -*- coding: utf-8 -*- """ Copyright 2016 Randal S. Olson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
Python
0
@@ -1100,11 +1100,11 @@ __ = '1. -2 +3 '%0A
75e42bbc1d6d6c1692082f8567ac777eaf3b6616
use real timeouts
src/astroprint/printfiles/downloadmanager.py
src/astroprint/printfiles/downloadmanager.py
# coding=utf-8 __author__ = "AstroPrint Product Team <product@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2016-2019 3DaGoGo, Inc - Released under terms of the AGPLv3 License" import threading import logging import requests fro...
Python
0.000004
@@ -2149,17 +2149,16 @@ re%0A%09%09%09%09%09 -# r = requ @@ -2228,87 +2228,8 @@ 0))%0A -%09%09%09%09%09r = requests.get(item%5B'downloadUrl'%5D, stream= True, timeout= (10.0, 5.0))%0A %09%09%09%09
0a9bd97598bc63450bcf0956242d3b67e2a52d9b
Remove testing code
pysis/reqs/buildings/__init__.py
pysis/reqs/buildings/__init__.py
# -*- encoding: utf-8 -*- from pysis.reqs.base import Request from pysis.resources.buildings import Buildings from pysis.resources.outputs import Outputs from pysis.resources.blastcells import Blastcells from pysis.resources.metrics import Metrics class Get(Request): uri = 'buildings/{id}' resource = Building...
Python
0.000002
@@ -849,32 +849,8 @@ ics%0A - print vars(Request)%0A
dddb366dd56b85070d9ab51dab7a9ab7d317d1e5
Include working directory path from settings
src/tenyksafk/main.py
src/tenyksafk/main.py
import sqlite3 from os.path import join from tenyksservice import TenyksService, run_service class AFK(TenyksService): direct_only = False irc_message_filters = { 'depart': [r'^(?i)(xopa|away|afk|brb)'], 'return': [r'^(?i)(xoka|back)'], 'query': [r'(?P<nick>(.*))\?$'], 'list': [...
Python
0
@@ -85,16 +85,58 @@ _service +%0Afrom tenyksservice.config import settings %0A%0Aclass @@ -2339,16 +2339,43 @@ ect( +join(settings.WORKING_DIR, db_file) %0A @@ -2370,16 +2370,17 @@ db_file) +) %0A
d2ae65564c173789578c0119be7d1143d7c59641
Fix mistaken variable name.
pybtex/style/formatting/__init__.py
pybtex/style/formatting/__init__.py
# Copyright (C) 2006, 2007, 2008, 2009 Andrey Golovizin # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
Python
0.000063
@@ -1310,22 +1310,21 @@ label_ -format +style = find_
d71092864fd9693b2762b862212573ef2f0917cb
Add testcase for command chaining.
src/test/test_pipe.py
src/test/test_pipe.py
#!python import sys if '../' not in sys.path: sys.path.insert(0, '../') from cmdlet import * from cmdlet.cmd import * upper = pipe.map(string.upper) lower = pipe.map(string.lower) def test_pipe_ans(): import string register_default_types() test_num = 100 cmd_upper = format('fOo%d') | upper ...
Python
0
@@ -3172,16 +3172,433 @@ nput.'%0A%0A +%0Adef test_pipe_chain():%0A import string%0A register_default_types()%0A%0A @pipe.reduce%0A def count(accu, data):%0A return accu + 1%0A%0A @pipe.filter%0A def low_pass(data, threshold):%0A return data %3C= threshold%0A%0A count_low_pass = low_...
43294bc83d013d79d909cadfcf2508aca0c575f6
Fix for bad y param.
exp/sandbox/predictors/profile/DecisionTreeLearnerProfile.py
exp/sandbox/predictors/profile/DecisionTreeLearnerProfile.py
import numpy import logging import sys from apgl.util.ProfileUtils import ProfileUtils from exp.sandbox.predictors.DecisionTreeLearner import DecisionTreeLearner from apgl.data.ExamplesGenerator import ExamplesGenerator from sklearn.tree import DecisionTreeRegressor logging.basicConfig(stream=sys.stdout, level=lo...
Python
0
@@ -464,33 +464,33 @@ numFeatures = -2 +5 0%0A minSpl @@ -637,32 +637,72 @@ numFeatures) %0A + y = numpy.array(y, numpy.float)%0A %0A
cef60ed7b69b5aec75267ecfa609a5adab9045a8
fix pycodestyle issue.
accelerator/migrations/0005_legalcheck_userlegalcheck.py
accelerator/migrations/0005_legalcheck_userlegalcheck.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-05-14 09:25 from __future__ import unicode_literals import django.db.models.deletion import swapper from django.conf import settings from django.db import ( migrations, models, ) class Migration(migrations.Migration): dependencies = [ (...
Python
0
@@ -2972,9 +2972,8 @@ ,%0A %5D%0A -%0A
505d20b1f4de60bdb13810a989b5ea203553c850
Remove use of np.true_divide
skbio/maths/subsample.py
skbio/maths/subsample.py
#!/usr/bin/env python r""" Subsampling (:mod:`skbio.maths.subsample`) ========================================== .. currentmodule:: skbio.maths.subsample This module provides functionality for subsampling from vectors of counts. Functions --------- .. autosummary:: :toctree: generated/ subsample """ from __...
Python
0
@@ -2377,30 +2377,16 @@ s = -np.true_divide( counts -, + / cou @@ -2392,17 +2392,16 @@ unts_sum -) %0A
3de3e4bf2f0df0d602c2f69dd5a06016bf31eb9d
rebuild checkpoints when something breaks while updating group exports
couchexport/groupexports.py
couchexport/groupexports.py
from couchexport.models import GroupExportConfiguration, SavedBasicExport from couchdbkit.exceptions import ResourceNotFound from datetime import datetime import os import json from couchexport.tasks import Temp def export_for_group(export_id, output_dir): try: config = GroupExportConfiguration.get(export_...
Python
0
@@ -204,17 +204,139 @@ ort Temp +, rebuild_schemas%0Afrom couchexport.export import SchemaMismatchException%0Afrom dimagi.utils.logging import notify_exception %0A - %0Adef exp @@ -593,16 +593,33 @@ xports:%0A + try:%0A @@ -673,16 +673,561 @@ format)%0A + except SchemaMismatchException,...
1746dad3e5bb218aede86cdb38e458a3f7ce270c
Update Inputkey.py
python/inputkeyboard/Inputkey.py
python/inputkeyboard/Inputkey.py
import sys, tty, termios, time class _Getch: def __call__(self, a): return self._get_key(a) def _get_key(self, a): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) try: tty.setraw(sys.stdin.fileno()) ch = sys.stdin.read(a) finally: ...
Python
0.000002
@@ -21,15 +21,9 @@ mios -, time %0A + %0Acla @@ -377,205 +377,8 @@ ch%0A%0A -%0Adef get():%0A while True:%0A raw_key = _Getch() %0A while True:%0A input_key = raw_key(1)%0A if input_key != '':%0A break%0A%0A return input_key %0A%0Ade @@ -539,16 +5...
2c43cf3368742d7bb0acb91118ff07aeb1fe4183
Fix comment typo.
qipipe/staging/sarcoma_config.py
qipipe/staging/sarcoma_config.py
import os from six.moves.configparser import ConfigParser as Config from six.moves.configparser import NoOptionError CFG_FILE = os.path.abspath( os.path.join( os.path.dirname(__file__), '..', 'conf', 'sarcoma.cfg') ) """ The Sarcoma Tumor Location configuration file. This file contains properties that associat the...
Python
0
@@ -309,16 +309,17 @@ associat +e the sub @@ -352,20 +352,16 @@ e.g.::%0A - %0A Sar @@ -1132,20 +1132,16 @@ G_FILE)%0A - %0A ret
f52fd8f00a401c7b02fb437ece1fabb3d1289ee1
fix bug in sort_by_hw_count
cs251tk/toolkit/tabulate.py
cs251tk/toolkit/tabulate.py
"""Make a nice table from the student results""" import re from sys import stdout from termcolor import colored UNICODE = stdout.encoding == 'UTF-8' and stdout.isatty() # unicode = False COL = '│' if UNICODE else '|' ROW = '─' if UNICODE else '-' JOIN = '┼' if UNICODE else '-' MISSING = '─' if UNICODE else '-' HIGHLIG...
Python
0.000002
@@ -543,16 +543,17 @@ homework +s '%5D%5D)%0A%0A%0Ad
d623431bb078526366210285e9f6a35ef516e528
extract the sorting functions into top-level tabulate
cs251tk/toolkit/tabulate.py
cs251tk/toolkit/tabulate.py
"""Make a nice table from the student results""" import re from sys import stdout from termcolor import colored from logging import warning from cs251tk.common import flatten UNICODE = stdout.encoding == 'UTF-8' and stdout.isatty() # unicode = False COL = '│' if UNICODE else '|' ROW = '─' if UNICODE else '-' JOIN = '┼...
Python
0.999934
@@ -434,24 +434,299 @@ b%5B%5Em%5D*m')%0A%0A%0A +def sort_by_hw_count(user):%0A %22%22%22Sort students by the number of completed homeworks%22%22%22%0A return sum(%5B1 if hw%5B'status'%5D == 'complete' else 0 for hw in user%5B'homework'%5D%5D)%0A%0A%0Adef sort_by_username(user):%0A %22%22%22Sort students by t...
efc00476784fc5e456d156707d949d57334329c4
update c 2
redis_i_action/c2/token_redis.py
redis_i_action/c2/token_redis.py
import json import time from helper import * QUIT = False LIMIT = 10000000 def check_token(conn,token): return conn.hget('login:',token) def update_token(conn,token,user,item=None): timestamp = time.time() conn.hset('login:',token,user) conn.zadd('recent:',token,timestamp) if item: conn.zadd('viewed:' + toke...
Python
0.000001
@@ -155,269 +155,920 @@ oken -(conn,token,user,item=None):%0A%09timestamp = time.time()%0A%09conn.hset('login:',token,user)%0A%09conn.zadd('recent:',token,timestamp)%0A%09if item:%0A%09%09conn.zadd('viewed:' + token,item,timestamp)%0A%09%09conn.zremrangebyrank('viewed:' + token,0,-26)%0A%09%09conn.zincrby('viewed:',it...
f0e07f97fd43a0f54c8b0996944038a07e9a0e96
Add error handling for when the meter name does not match the NEM file
metering/loader.py
metering/loader.py
""" metering.loader ~~~~~~~~~ Define the meter data models """ from nemreader import read_nem_file from sqlalchemy.orm import sessionmaker from energy_shaper import split_into_daily_intervals from . import get_db_engine from . import save_energy_reading from . import refresh_daily_stats from . import refre...
Python
0.000001
@@ -69,16 +69,31 @@ ls%0A%22%22%22%0A%0A +import logging%0A from nem @@ -583,16 +583,29 @@ m_file)%0A + try:%0A chan @@ -626,16 +626,206 @@ ngs%5Bnmi%5D +%0A except KeyError:%0A first_nmi = list(m.readings.keys())%5B0%5D%0A logging.warning('NMI of %25s not found, using %25s instead', nm...
57a14c56305f3542e5383bb8189a298bb62f853a
remove qqq debug from wb_debug
Source/Common/wb_debug.py
Source/Common/wb_debug.py
''' ==================================================================== Copyright (c) 2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
Python
0.000622
@@ -2314,72 +2314,8 @@ ):%0A - print( 'qqq setDebug str_options %25r' %25 (str_options,) )%0A @@ -2485,62 +2485,8 @@ ),)%0A - print( 'qqq setDebug name %25r' %25 (name,) )%0A
36e656cc4e3271371053859be8817034dc73f7a2
fix config var
recruit_app/user/eve_api_manager.py
recruit_app/user/eve_api_manager.py
import evelink.api import evelink.char import evelink.eve from flask import config class EveApiManager(): def __init__(self): pass @staticmethod def get_characters_from_api(api_id, api_key): chars = [] try: api = evelink.api.API(api_key=(api_id, api_key)) # ...
Python
0.000002
@@ -70,21 +70,26 @@ import c -onfig +urrent_app %0A%0Aclass @@ -2297,23 +2297,36 @@ == +current_app. config -. +%5B' API_MASK %0A%0A @@ -2321,16 +2321,18 @@ API_MASK +'%5D %0A%0A
a5dc9603bddad1d1f19fa2e03003d469a9c647ae
add startup callbacks to ConsoleApp
src/python/director/consoleapp.py
src/python/director/consoleapp.py
import os import sys import traceback import argparse from director import applogic from director import objectmodel as om from director import viewbehaviors from director import visualization as vis from director.timercallback import TimerCallback import PythonQt from PythonQt import QtCore, QtGui def _consoleAppE...
Python
0.000001
@@ -520,24 +520,52 @@ p(object):%0A%0A + _startupCallbacks = %5B%5D%0A%0A def __in @@ -1382,16 +1382,208 @@ onHook%0A%0A + def onStartup():%0A for func in ConsoleApp._startupCallbacks:%0A func()%0A%0A startTimer = TimerCallback(callback=onStartup)%0A startTimer.s...
fbd02da826a46ae7be403b5338236e04aa1133bc
fix missing quote
crankycoin/models/transaction.py
crankycoin/models/transaction.py
import coincurve import hashlib import json import time from crankycoin.models.enums import TransactionType class Transaction(object): def __init__(self, source, destination, amount, fee, prev_hash='0', tx_type=TransactionType.STANDARD.value, timestamp=None, tx_hash=None, asset=None, data="", s...
Python
0.982782
@@ -3378,16 +3378,17 @@ ce, 'hex +' )).verif
6a1b5003547833ffb0cddea933594c0322ad1bf2
Add complete utils instead
frappe/social/doctype/energy_point_rule/energy_point_rule.py
frappe/social/doctype/energy_point_rule/energy_point_rule.py
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ import frappe.cache_manager from frappe.model.document import Document from frappe.social.doctype.energy_point_...
Python
0
@@ -754,23 +754,21 @@ = %7B%0A%09%09%09%22 -getdate +utils %22: frapp @@ -778,16 +778,8 @@ tils -.getdate %0A%09%09%7D
c906e675bb4c75286d98d78e4625d12a158652c7
Update accel.py
apps/accelerometer/accel.py
apps/accelerometer/accel.py
#!/usr/bin/python # Author : ipmstyle, https://github.com/ipmstyle # : jeonghoonkang, https://github.com/jeonghoonkang # for the detail of HW connection, see lcd_connect.py import sys from time import strftime, localtime # beware the dir location, it should exist sys.path.append("../lcd_berepi/lib") sys.path.ap...
Python
0.000001
@@ -640,398 +640,8 @@ 1%5D%0A%0A - str = wip_chk()%0A str = str%5B:-1%5D%0A lcd_string('%25s WL ' %25 (str),LCD_LINE_2,1)%0A str = wmac_chk()%0A str = str%5B:-1%5D%0A# lcd_string('%25s' %25 (str),LCD_LINE_2,1)%0A blueLCDon()%0A time.sleep(1.2) %0A %0A str = stalk_chk()%0A str = ...
1ed14e9231d295c6db83337f7cf2b586a39dc3dc
Add timestamp to payment log list display
apps/cowry_docdata/admin.py
apps/cowry_docdata/admin.py
from babel.numbers import format_currency from django.contrib import admin from django.core.urlresolvers import reverse from django.utils import translation from .models import DocDataPaymentOrder, DocDataPayment, DocDataPaymentLogEntry class DocDataPaymentLogEntryInine(admin.TabularInline): model = DocDataPaymen...
Python
0.000001
@@ -1381,16 +1381,29 @@ ayment', + 'timestamp', 'level'
2a813a0e4e32a5511c756fd8243c1cbee142d9f9
fix typo in price range query setting
oscar/defaults.py
oscar/defaults.py
from django.utils.translation import ugettext_lazy as _ OSCAR_SHOP_NAME = 'Oscar' OSCAR_SHOP_TAGLINE = '' # Basket settings OSCAR_BASKET_COOKIE_LIFETIME = 7 * 24 * 60 * 60 OSCAR_BASKET_COOKIE_OPEN = 'oscar_open_basket' OSCAR_BASKET_COOKIE_SAVED = 'oscar_saved_basket' OSCAR_MAX_BASKET_QUANTITY_THRESHOLD = 10000 # Rec...
Python
0.000074
@@ -6193,25 +6193,25 @@ (_('0 to -4 +2 0'), '%5B0 TO
e1c892cbec5091b6f1bf5065bfed00c7d7149b4f
change get_jd12 to instead manually catch the IERS error
astropy/coordinates/builtin_frames/utils.py
astropy/coordinates/builtin_frames/utils.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions/values used repeatedly in different modules of the ``builtin_frames`` package. """ from __future__ import (absolute_import, unicode_literals, division, print_function) impo...
Python
0
@@ -3452,16 +3452,333 @@ value%0A%0A%0A +def _warn_iers(ierserr):%0A %22%22%22%0A Generate a warning for an IERSRangeerror%0A%0A Parameters%0A ----------%0A ierserr : An %60~astropy.utils.iers.IERSRangeError%60%0A %22%22%22%0A msg = '%7B0%7D Assuming UT1-UTC=0 for coordinate transformations.%7B1%7...
8064be72de340fca963da2cade2b73aa969fbdbd
Add string representation for Activity model
csunplugged/activities/models.py
csunplugged/activities/models.py
from django.db import models class Activity(models.Model): name = models.CharField(max_length=200) description = models.TextField()
Python
0.000039
@@ -134,8 +134,57 @@ Field()%0A +%0A def __str__(self):%0A return self.name%0A
dd4e62667da94469a8bbb6dd0ccd881124e7665f
Fix return value of terraform.render
src/buildercore/terraform.py
src/buildercore/terraform.py
import json from buildercore.utils import ensure RESOURCE_TYPE_FASTLY = 'fastly_service_v1' RESOURCE_NAME_FASTLY = 'fastly-cdn' def render(context): if not context['fastly']: return None ensure(len(context['fastly']['subdomains']) == 1, "Only 1 subdomain for Fastly CDNs is supported") tf_file = ...
Python
0.000126
@@ -193,12 +193,12 @@ urn -None +'%7B%7D' %0A%0A
1472e4204e9a654a2296f690e8420c97ef98fb7c
Read device entity id from config file
senic_hub/nuimo_app/components/__init__.py
senic_hub/nuimo_app/components/__init__.py
import logging from pprint import pformat from threading import Thread from .. import matrices from ..hass import HomeAssistant logger = logging.getLogger(__name__) def clamp_value(value, range_): return min(max(value, range_.start), range_.stop) class BaseComponent: MATRIX = matrices.ERROR def __ini...
Python
0
@@ -1159,93 +1159,48 @@ -# TODO: Read +self._ha_ entity - id from +_id = config -%0A self._ha_entity_id = %22media_player.office%22 +%5B'entity_id'%5D %0A
09467d27c9891f3aa672c41273a5704f65a8ae86
undo naieve path hacking
replayswithfriends/settings/prod.py
replayswithfriends/settings/prod.py
"""Production settings and globals.""" from os import environ from sys import exc_info from urlparse import urlparse, uses_netloc from S3 import CallingFormat from common import * # Helper lambda for gracefully degrading environmental variables: env = lambda e, d: environ[e] if environ.has_key(e) else d EMAIL_BA...
Python
0.000001
@@ -3473,768 +3473,8 @@ %0A%7D%0A%0A -MEDIA_ROOT = normpath(join(DJANGO_ROOT, %22replayswithfriends%22, 'packaged', 'media'))%0AMEDIA_URL = '/media/'%0ASTATIC_ROOT = normpath(join(DJANGO_ROOT, %22replayswithfriends%22, 'packaged', 'static'))%0ASTATIC_URL = '/static/'%0AADMIN_MEDIA_PREFIX = '/static/admin/'%0ACOMPRESS_...
993c1a5e0d5576427fea6e4630ae94c21acf40ff
Repair switch on CLI.
hyhyhy.py
hyhyhy.py
# # Hyhyhy - https://github.com/MaciejCzyzewski/Hyhyhy # # The MIT License (MIT) # # Copyright (c) 2014 Maciej A. Czyzewski # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restric...
Python
0
@@ -1409,16 +1409,234 @@ 1.0.0'%0A%0A +__help__ = '''%0A Hyhyhy - Presentation nano-framework. %5Bv ''' + __version__ + '''%5D%0A hyhyhy.py build - Build project to file%0A hyhyhy.py status - Show project structure%0A '''%0A%0A def num( @@ -1919,68 +1919,8 @@ )%5D%0A%0A ...
a98e536334eb3d3376efe93c1bdc639ecdc4a2a0
remove unused code
approvaltests/reporters/generic_diff_reporter_factory.py
approvaltests/reporters/generic_diff_reporter_factory.py
import json from approvaltests.reporters.generic_diff_reporter import GenericDiffReporter from approvaltests.utils import get_adjacent_file class GenericDiffReporterFactory(object): reporters = [] def __init__(self): self.load(get_adjacent_file('reporters.json')) self.add_fallback_reporter_c...
Python
0.000017
@@ -402,101 +402,8 @@ %5D)%0A%0A - def add_default_reporter_config(self, config):%0A self.reporters.insert(0, config)%0A%0A
54fbb379300c04bed88776d5c4113671b32af1f1
use dtypes in dd.demo
dask/dataframe/demo.py
dask/dataframe/demo.py
from __future__ import absolute_import, division, print_function import pandas as pd import numpy as np from .core import tokenize, DataFrame from ..utils import different_seeds __all__ = ['make_timeseries'] def make_float(n, rstate): return rstate.rand(n) * 2 - 1 def make_int(n, rstate): return rstate.po...
Python
0.000001
@@ -3060,16 +3060,80 @@ ) - 1))%0A + head = make_timeseries_part('2000','2000', dtypes, '1H', 1)%0A retu @@ -3160,22 +3160,12 @@ me, -sorted(dtypes) +head , di
5ea90191ac4bf381b015bb9a82f26466e35ffe06
Create default ignore rules before creating ignore tree. Fixes an issue where we upload crazy stuff like node_modules when calling share_dir.
ignore.py
ignore.py
import os import errno import fnmatch import stat try: from . import msg, utils from .exc_fmt import str_e assert msg and str_e and utils except ImportError: import msg from exc_fmt import str_e IGNORE_FILES = ['.gitignore', '.hgignore', '.flooignore'] HIDDEN_WHITELIST = ['.floo'] + IGNORE_FILES B...
Python
0
@@ -1091,24 +1091,52 @@ tree(path):%0A + create_flooignore(path)%0A ig = Ign
c5422645773b43de8811c691dfe03c82eda0b935
put cflags into configure
robustus/detail/install_protobuf.py
robustus/detail/install_protobuf.py
# ============================================================================= # COPYRIGHT 2013 Brain Corporation. # License under MIT license (see LICENSE file) # ============================================================================= import logging import os from requirement import RequirementException from u...
Python
0.000001
@@ -753,37 +753,31 @@ ion%0A -subprocess.ca +run_she ll(%5B'wget', @@ -848,63 +848,183 @@ e,)%5D -)%0A subprocess.call(%5B'tar', 'zxvf', archive_name%5D +,%0A verbose=robustus.settings%5B'verbosity'%5D %3E= 1)%0A run_shell(%5B'tar', 'zxvf', archive_name%5D,%0A ...
ae2981b26fce2641a9bae5af68a3d5043fdd8b46
Fix disapear exception message (#31)
ovh/exceptions.py
ovh/exceptions.py
# -*- encoding: utf-8 -*- # # Copyright (c) 2013-2016, OVH SAS. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, t...
Python
0
@@ -1772,11 +1772,11 @@ rgs. -get +pop ('re @@ -1782,16 +1782,78 @@ esponse' +, None)%0A super(APIError, self).__init__(*args, **kwargs )%0A%0Aclass
63f6637228153b1f77ca860c297ff3554d802ce9
Fix order history sorting logic, #sort() should be called before #reverse().
model/orderbook.py
model/orderbook.py
# -*- encoding:utf8 -*- import os from model.oandapy import oandapy class OrderBook(object): def get_latest_orderbook(self, instrument, period, history): oanda_token = os.environ.get('OANDA_TOKEN') oanda = oandapy.API(environment="practice", access_token=oanda_token) orders = oanda.get_o...
Python
0.000019
@@ -394,16 +394,43 @@ .keys()%0A + timeset.sort()%0A
6741c59d726f1ceaf6edba82b6e97f501fc265ee
fix zero shape bug!
src/scripts/make_parts_dataset.py
src/scripts/make_parts_dataset.py
import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__))) import settings sys.path.append(settings.CAFFE_PYTHON_PATH) import skimage.io import caffe import numpy as np import click from glob import glob import utils from dataset import CUB_200_2011 from parts import Parts @click.command() @cli...
Python
0
@@ -1085,16 +1085,183 @@ _image)%0A + if 0 in part_image.shape:%0A print %22#parts:%25d %5CtID:%25d %5CtName:%25s + Shape:%25s%22 %25 (len(head_parts), int(image_id), rel_image_path, str(part_image.shape))%0A
2466a9b3e0c95c86bf3b2d220d7635a6061eeadd
Fix some moments in roots.py
module1-2/roots.py
module1-2/roots.py
# Кириллов Алексей, ИУ7-22 # Уточнение корней методом brenth from math import sin, cos, ceil, log from scipy.optimize import brenth from time import perf_counter as perfc from prettytable import PrettyTable from numpy import arange import matplotlib.pyplot as plt ''' def f(x): return sin(x) def fs(x)...
Python
0.004045
@@ -719,12 +719,15 @@ map( -in +floa t, + inpu @@ -3170,48 +3170,8 @@ g')%0D -%0A # %D0%A2%D0%BE%D1%87%D0%BA%D0%B8 %D0%BC%D0%B0%D0%BA%D1%81%D0%B8%D0%BC%D1%83%D0%BC%D0%B0 %D0%B8 %D0%BC%D0%B8%D0%BD%D0%B8%D0%BC%D1%83%D0%BC%D0%B0%0D%0A %0D %0A%0D%0Ai
4e57f73597f8d5dc3ccee9d815657a774dc52d62
Handle package dirs correctly
src/setuptools_epydoc/__init__.py
src/setuptools_epydoc/__init__.py
import os import sys import re from setuptools import Command class EpydocCommand(Command): ''' Setuptools command used to build an API documentation with epydoc. @author: jwienke ''' user_options = [('format=', 'f', 'the output format to use (html and pdf)'), ...
Python
0
@@ -1725,13 +1725,8 @@ = %5B -'foo' %5D%0A @@ -2054,16 +2054,35 @@ ld_py')%0A + names = %5B%5D%0A @@ -2206,30 +2206,127 @@ -cmdline.append(package +pdir = base.get_package_dir(package)%0A names.append(pdir)%0A cmdline = cmdline + list(set(names) )%0A
581dfd3190ccfabf43e6aebdedd1f022aa146b0e
Add default bedtools if not specified in the system file.
bcbio/variation/bedutils.py
bcbio/variation/bedutils.py
"""Utilities for manipulating BED files. """ import os import shutil import sys import subprocess import toolz as tz from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import config_utils from bcbio.provenance import do from bcbio.variation import vcfutils def get_...
Python
0
@@ -3247,32 +3247,60 @@ g them.%0A %22%22%22%0A + config = data%5B%22config%22%5D%0A if in_file:%0A @@ -3355,30 +3355,86 @@ tools%22, -data%5B%22config%22%5D +config,%0A default=%22bedtools%22 )%0A
48cd6af0e138dd28b18ca3a71f41976c71483445
Add --forceuninstall option
Python/brewcaskupgrade.py
Python/brewcaskupgrade.py
#! /usr/bin/env python3 # -*- coding: utf8 -*- import argparse import shutil from subprocess import check_output, run parser = argparse.ArgumentParser(description='Update every entries found in cask folder.') parser.add_argument('--pretend', dest='pretend', action='store_true', help='Pretend to t...
Python
0
@@ -338,28 +338,194 @@ ser. -set_defaults(pretend +add_argument('--forceuninstall', dest='forceuninstall', action='store_true',%0A help='Force uninstall before install.')%0Aparser.set_defaults(pretend=False, forceuninstall =Fal @@ -1242,41 +1242,8 @@ 1%5D)%0A - is_version_installed = False%0A ...
1e0f2f61976c61aace85a05dc21181fe06065560
version bump; delta-mag fitting now available for BinaryStarModel
isochrones/__init__.py
isochrones/__init__.py
__version__ = '0.8.1' try: __ISOCHRONES_SETUP__ except NameError: __ISOCHRONES_SETUP__ = False if not __ISOCHRONES_SETUP__: __all__ = ['dartmouth','basti','padova', 'Isochrone', 'StarModel', 'BinaryStarModel', 'TripleStarModel'] from .isochrone import Isochrone from ....
Python
0
@@ -16,9 +16,9 @@ 0.8. -1 +2 '%0A%0At
a4bc6c0c4d13629dbdfef30edcba262efce0eaff
fix up config for heroku
colorsearchtest/settings.py
colorsearchtest/settings.py
# -*- coding: utf-8 -*- import os os_env = os.environ class Config(object): SECRET_KEY = os_env.get('COLORSEARCHTEST_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) SQLALC...
Python
0.000001
@@ -337,20 +337,173 @@ I = -os_env.get(%0A +((os.environ.get('HEROKU') is not None)%0A and os_env.get(%0A 'DATABASE_URL',%0A 'postgresql://localhost/example')%0A or os_env.get(%0A @@ -538,16 +538,20 @@ E_URI',%0A + @@ -583,17 +583,17 @@ xample') - +) # ...
ef1c1bb39a99555428df014c7ad5035c2746c35a
Version 1.3.2
moirai/__init__.py
moirai/__init__.py
# -*- coding: utf-8; -*- # # Copyright (c) 2016 Álan Crístoffer # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
Python
0
@@ -1269,17 +1269,17 @@ = '1.3. -1 +2 '%0A__main
f20eb91dcf04bc8e33fbb48ebfbef1b56acbf02d
Make functions that pull a number of tweets and pics
web.py
web.py
""" Heroku/Python Quickstart: https://blog.heroku.com/archives/2011/9/28/python_and_django""" import os from flask import Flask app = Flask(__name__) @app.route('/') def home_page(): return 'Hello from the SPARK learn-a-thon!' if __name__ == '__main__': port = int(os.environ.get("PORT", 5000)) app.run(h...
Python
0.000002
@@ -102,31 +102,94 @@ os%0A -from flask import Flask +import random%0Aimport requests%0Afrom flask import Flask%0A%0Aimport tweepy%0A%0Aimport settings%0A %0A%0Aap @@ -209,16 +209,17 @@ ame__)%0A%0A +%0A @app.rou @@ -292,16 +292,1020 @@ thon!'%0A%0A +%0Adef get_instagram_image():%0A instagram_api_url = 'https:...
2a87ed1772a530b07c69e1d2086cd54160dd440a
fix sample test
samples/snippets/speech_adaptation_beta.py
samples/snippets/speech_adaptation_beta.py
# -*- coding: utf-8 -*- # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
Python
0.000729
@@ -3068,16 +3068,36 @@ n_beta%5D%0A + return response%0A %0A%0Adef ma
149d1ba75bfda348afb150ab0aa6d8785f850884
Remove wavefront sampler
demosys/loaders/scene/wavefront.py
demosys/loaders/scene/wavefront.py
import numpy import pywavefront from pywavefront import cache from pywavefront.obj import ObjParser import moderngl from demosys.loaders.scene.base import SceneLoader from demosys.opengl import VAO from demosys.resources import textures from demosys.resources.meta import SceneDescription, TextureDescription from demos...
Python
0.000001
@@ -4186,18 +4186,16 @@ - # sampler @@ -4199,196 +4199,13 @@ ler= -samplers.create(%0A # wrap_s=GL.GL_CLAMP_TO_EDGE,%0A # wrap_t=GL.GL_CLAMP_TO_EDGE,%0A # anisotropy=8,%0A # ) +None, %0A
08539b462d6b875a754d1ec03fb86232e788754e
enable secure cookie
app/flask_loginmanager/__init__.py
app/flask_loginmanager/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from functools import wraps from flask import request, abort, g import time from .user_mixin import UserMixin class LoginManager(object): __SET = 'set' __CLEAR = 'clear' __user_loader_dict = {} __after_request_func_list = [] __hash_generators = {} ...
Python
0.000001
@@ -103,16 +103,29 @@ abort, g +, current_app %0Aimport @@ -1753,16 +1753,167 @@ (info)%0A%0A + httponly = current_app.config%5B'SESSION_COOKIE_HTTPONLY'%5D%0A secure = current_app.config%5B'SESSION_COOKIE_SECURE'%5D%0A%0A @@ -2001,19 +2001,38 @@ ttponly= -Tru +httpo...
74a5836d41386a847d2e69e2335e0825fb64972f
Add CPU_ONLY tag for sparse_feature_hash layer
caffe2/python/layers/sparse_feature_hash.py
caffe2/python/layers/sparse_feature_hash.py
# Copyright (c) 2016-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
Python
0.000001
@@ -1017,16 +1017,67 @@ eList,%0A) +%0Afrom caffe2.python.layers.tags import (%0A Tags%0A) %0A%0Aimport @@ -2953,16 +2953,288 @@ odulo)%0A%0A + # operators in this layer do not have CUDA implementation yet.%0A # In addition, since the sparse feature keys that we are hashing are%0A # typically...
0d58c2ffc8ec6afc353a242f942f668b0b7f362c
Correct shipping repository method calls
sandbox/apps/shipping/repository.py
sandbox/apps/shipping/repository.py
from decimal import Decimal as D from oscar.apps.shipping.methods import Free, FixedPrice from oscar.apps.shipping.repository import Repository as CoreRepository class Repository(CoreRepository): """ This class is included so that there is a choice of shipping methods. Oscar's default behaviour is to onl...
Python
0
@@ -354,16 +354,16 @@ test - the %0A + the shi @@ -576,21 +576,13 @@ elf. -add_basket_to +prime _met
edec18a82d6027c8a011fbef84c8aa3b80e18826
Update forward_device1.py
Server/forward_device1.py
Server/forward_device1.py
import zmq def main(): print "\nServer for ProBot is running..." try: context = zmq.Context(1) # Socket facing clients frontend = context.socket(zmq.SUB) frontend.bind("tcp://*:5559") frontend.setsockopt(zmq.SUBSCRIBE, "") # Socket facing services backe...
Python
0.000006
@@ -218,17 +218,16 @@ :5559%22)%0A -%0A @@ -651,10 +651,8 @@ main()%0A -%0A%0A
2100b512ffb188374e1d883cd2f359586182596b
ADD migration name
packages/grid/backend/alembic/versions/2021-09-20_916812f40fb4.py
packages/grid/backend/alembic/versions/2021-09-20_916812f40fb4.py
"""empty message Revision ID: 916812f40fb4 Revises: 5796f6ceb314 Create Date: 2021-09-20 01:07:37.239186 """ # third party from alembic import op # type: ignore import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "916812f40fb4" down_revision = "5796f6ceb314" branch_labels = None depends_on =...
Python
0.000003
@@ -1,19 +1,44 @@ %22%22%22 -empty messag +ADD daa_document column at setup tabl e%0A%0AR
80ede493f698395176d3c67dd1e4f3723b0d5859
Add initial pass at writing the git commit hook
mothermayi/hook.py
mothermayi/hook.py
import logging import os LOGGER = logging.getLogger(__name__) class NoRepoFoundError(Exception): pass def find_git_repo(): location = os.path.abspath('.') while location != '/': check = os.path.join(location, '.git') if os.path.exists(check) and os.path.isdir(check): return ch...
Python
0
@@ -102,16 +102,60 @@ pass%0A%0A +class PreCommitExists(Exception):%0A pass%0A%0A def find @@ -515,93 +515,515 @@ ))%0A%0A -def install():%0A repo = find_git_repo()%0A LOGGER.debug(%22Found git repo at %25s%22, repo +HOOK_CONTENT = %22%22%22%0Amothermayi run%0A%22%22%22%0A%0Adef write_hook(pre_commit):%0A...
5d5f73ac411873c0ec82e233b74ce70f4de4ab03
Optimize migration process
openprocurement/planning/api/migration.py
openprocurement/planning/api/migration.py
# -*- coding: utf-8 -*- import logging from openprocurement.planning.api.traversal import Root from openprocurement.planning.api.models import Plan LOGGER = logging.getLogger(__name__) SCHEMA_VERSION = 1 SCHEMA_DOC = 'openprocurement_plans_schema' def get_db_schema_version(db): schema_doc = db.get(SCHEMA_DOC, {"...
Python
0.000004
@@ -1626,16 +1626,87 @@ if +not all(%5Bi.get('url', '').startswith(registry.docservice_url) for i in doc.get( @@ -1716,16 +1716,22 @@ cuments' +, %5B%5D)%5D ):%0A @@ -1827,16 +1827,72 @@ itive()%0A + doc%5B'dateModified'%5D = get_now().isoformat()%0A
7d254f6b7cebf8883fa314afbf4aa3f2f8afaf14
Create hard links instead of copying
pw_docgen/py/pw_docgen/docgen.py
pw_docgen/py/pw_docgen/docgen.py
# Copyright 2019 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
Python
0
@@ -840,16 +840,41 @@ rt sys%0A%0A +from pathlib import Path%0A from typ @@ -3283,173 +3283,8 @@ )%0A%0A%0A -def copy(src: str, dst: str) -%3E None:%0A %22%22%22Wrapper around shutil.copy that prints the operation.%22%22%22%0A print(f'COPY %7Bsrc%7D -%3E %7Bdst%7D')%0A shutil.copy(src, dst)%0A%0A%0A def ...
47e2f60c8e10b6b2c87f2df40f362b70cb09fade
this should be a tuple
cyder/core/system/models.py
cyder/core/system/models.py
from django.db import models from cyder.base.mixins import ObjectUrlMixin from cyder.base.models import BaseModel from cyder.cydhcp.keyvalue.models import KeyValue class System(BaseModel, ObjectUrlMixin): name = models.CharField(max_length=255, unique=False) search_fields = ('name') display_fields = ('n...
Python
1
@@ -287,16 +287,17 @@ ('name' +, )%0A di
310f1d32bf4edcd3046d6648d5133c8ef7a4a8d6
Fix issue with system ctnr change not propagating correctly to its interfaces
cyder/core/system/models.py
cyder/core/system/models.py
from django.db import models from django.db.models import Q from django.db.models.loading import get_model from cyder.base.eav.constants import ATTRIBUTE_INVENTORY from cyder.base.eav.fields import EAVAttributeField from cyder.base.eav.models import Attribute, EAVBase from cyder.base.mixins import ObjectUrlMixin from ...
Python
0
@@ -2242,47 +2242,8 @@ rgs) -%0A%0A def clean(self, *args, **kwargs): %0A @@ -2454,59 +2454,8 @@ e()%0A - super(System, self).clean(*args, **kwargs)%0A %0A%0Acl
e09e7148a3b94fe883839257f8b972351466eb93
fix docstring
py/_plugin/pytest_monkeypatch.py
py/_plugin/pytest_monkeypatch.py
""" safely patch object attributes, dicts and environment variables. Usage ---------------- Use the `monkeypatch funcarg`_ to tweak your global test environment for running a particular test. You can safely set/del an attribute, dictionary item or environment variable by respective methods on the monkeypatch fun...
Python
0.000002
@@ -2608,38 +2608,9 @@ n. -For the %60%60del%60%60 %0A methods t +T he %60 @@ -2620,16 +2620,21 @@ ising%60%60 +%0A paramete @@ -2650,20 +2650,16 @@ nes if a -%0A KeyErro @@ -2678,16 +2678,21 @@ teError +%0A will be @@ -2708,17 +2708,27 @@ the -%0A dele + set/deletion opera tion
d0a9d10d0df25de670e8bf9a1e603ed1fbe5ca29
use helpers
py3status/modules/taskwarrior.py
py3status/modules/taskwarrior.py
# -*- coding: utf-8 -*- """ Display tasks currently running in taskwarrior. Configuration parameters: cache_timeout: how often we refresh this module in seconds (default 5) format: display format for taskwarrior (default '{task}') Format placeholders: {task} active tasks Requires task: https://taskwa...
Python
0.001805
@@ -119,28 +119,28 @@ ut: -how often we refresh +refresh interval for thi @@ -152,19 +152,8 @@ ule -in seconds (def @@ -192,26 +192,26 @@ at for t -askwarrior +his module (defaul @@ -390,99 +390,19 @@ %22%22%0A%0A -# import your useful libs here%0Afrom subprocess import check_output%0Aimport json%0Aimport s...
49acdec58b21ce23b5e20200249bbae7aaf4b49f
upgrade logging
src/main/python/pybuilder_aws_plugin/upload_zip_task.py
src/main/python/pybuilder_aws_plugin/upload_zip_task.py
import os import subprocess import zipfile from pybuilder.core import depends, task from pybuilder.plugins.python.install_dependencies_plugin import ( as_pip_argument) from .helpers import upload_helper, teamcity_helper def zip_recursive(archive, directory, folder=''): """Zip directories recursively""" ...
Python
0.000001
@@ -2936,17 +2936,17 @@ ('Lambda - +- zip is a @@ -3187,24 +3187,95 @@ le(project)%0A + logger.info('Found lambda-zip at: %22%7B0%7D%22.'.format(path_to_zipfile))%0A with ope
c9b7e886f9276079fc79fbe394f5b15595f04603
Test fixes
ownblock/ownblock/apps/messaging/tests.py
ownblock/ownblock/apps/messaging/tests.py
from unittest.mock import Mock from django.test import TestCase from rest_framework import serializers from apps.accounts.tests import ResidentFactory from apps.buildings.tests import ApartmentFactory from .serializers import MessageSerializer class SerializerTests(TestCase): def test_validate_recipient_if_s...
Python
0.000001
@@ -755,20 +755,408 @@ -pass +apt = ApartmentFactory.create()%0A req = Mock()%0A req.user = ResidentFactory.create(apartment=apt)%0A recipient = ResidentFactory.create()%0A serializer = MessageSerializer(context=%7B'request': req%7D)%0A attrs = %7B'recipient': recipient%7D%0...
5c7dcc4fbe5a80f1f53dd48ab19b557976ef64d8
Fix help string on override file
paasta_tools/monitoring/check_capacity.py
paasta_tools/monitoring/check_capacity.py
#!/usr/bin/env python # Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
Python
0.000002
@@ -1258,33 +1258,33 @@ =float, default= -9 +8 0,%0A help= @@ -1643,16 +1643,23 @@ %7Bvalue: + %7Bwarn: %7Bcpus: @@ -1683,16 +1683,68 @@ em: num%7D +, '%0A 'crit: %7Bcpus: num, disk: num, mem: num%7D%7D %7D%7D',%0A
5e9eda407832d9b97e7f78219f20236e04306a32
fix test, probably broken by a epydoc change this code is dead though so i don't much care
pydoctor/test/test_formatting.py
pydoctor/test/test_formatting.py
from pydoctor import html, model from py import test def test_signatures(): argspec = [['a', 'b', 'c'], None, None, (1,2)] assert html.getBetterThanArgspec(argspec) == (['a'], [('b', 1), ('c', 2)]) def test_strsig(): argspec = [['a', 'b', 'c'], None, None, (1,2)] assert html.signature(argspec) == "a, ...
Python
0
@@ -1368,16 +1368,19 @@ = '%3Cdiv%3E +%3Cp%3E Woot Yea @@ -1380,16 +1380,20 @@ oot Yeah +%3C/p%3E %5Cn%3C/div%3E
d9189f91370abd1e20e5010bb70d9c47efd58215
Change read_chrom_sizes to read from a FAIDX index if available
muver/reference.py
muver/reference.py
from wrappers import bowtie2, picard, samtools def create_reference_indices(ref_fn): ''' For a given reference FASTA file, generate several indices. ''' bowtie2.build(ref_fn) samtools.faidx_index(ref_fn) picard.create_sequence_dictionary(ref_fn) def read_chrom_sizes(reference_ass...
Python
0
@@ -1,12 +1,25 @@ +import os%0D%0A%0D%0A from wrapper @@ -422,45 +422,394 @@ ome. -%0D%0A '''%0D%0A chrom_sizes = dict()%0D%0A + If a%0D%0A FAIDX index is available, it will read the lengths from there.%0D%0A '''%0D%0A chrom_sizes = dict()%0D%0A%0D%0A if os.path.exists(reference_assembly_fn + '.fai'...
8e1610570a50282594a5516ee473cf13bec2ce71
fix typo
core/drivers/count/count.py
core/drivers/count/count.py
keywords = ['SET', 'INSERT', 'UPDATE', 'DELETE'] def count_query(queries): ret = {} for keyword in keywords: ret[keyword] = 0 for query in queries: for keyword in keywords: if query.startswith(keyword): ret[keyword] += 1 break return ret
Python
0.999991
@@ -8,16 +8,19 @@ s = %5B'SE +LEC T', 'INS
4b6911cbe2fefceda4e24f5c3092cfbb15a40982
Remove unused
jet/dashboard/views.py
jet/dashboard/views.py
from django.contrib import messages from django.core.urlresolvers import reverse from django.forms.formsets import formset_factory from django.shortcuts import redirect from django.views.decorators.http import require_POST, require_GET from jet.dashboard.forms import UpdateDashboardModulesForm, AddUserDashboardModuleFo...
Python
0.000349
@@ -128,46 +128,8 @@ ory%0A -from django.shortcuts import redirect%0A from
49ab63133924b4789751d3e2806ff1516c0ee167
Move commented import
cxroots/IterativeMethods.py
cxroots/IterativeMethods.py
from __future__ import division # import scipy.optimize def iterateToRoot(x0, f, df=None, steptol=1e-8, roottol=1e-12, maxIter=20): # iterate to a root using initial point x0 if df is not None: try: # uses Newton-Raphson method if f and df are given. # SciPy implementation # root = scipy.optimize.newton(...
Python
0
@@ -28,32 +28,8 @@ sion -%0A# import scipy.optimize %0A%0Ade @@ -255,16 +255,43 @@ ntation%0A +%09%09%09# import scipy.optimize%0A %09%09%09# roo
0e180dfc0c6c4716408f9d74819edfc1d3a638b6
Fix pep8 on views/page.py.
myuw/views/page.py
myuw/views/page.py
import re from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render_to_response from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.conf import settings import logging from userservice.user import UserSe...
Python
0
@@ -4235,16 +4235,17 @@ y_url)%0A%0A +%0A def logo @@ -4337,16 +4337,26 @@ t_url = +%22%25s%25s%22 %25 ( %22https:/ @@ -4380,16 +4380,47 @@ ton.edu/ +%22,%0A %22 ?logout_ @@ -4461,16 +4461,17 @@ ton.edu%22 +) %0A%0A # @@ -4543,12 +4543,13 @@ (logout_url) +%0A
d58bee9caa30f67e808a0a203fc88febacdc6186
Fix parentheses in Rectangle in plot_hull_distances.
stability/analysis.py
stability/analysis.py
import os from pymatgen.phasediagram.pdanalyzer import PDAnalyzer from pymatgen.phasediagram.pdmaker import PhaseDiagram from pymatgen.core.structure import Structure from pymatgen.io.vasp.outputs import Vasprun from pymatgen.entries.computed_entries import ComputedEntry from pymatgen.matproj.rest import MPRester fro...
Python
0.000385
@@ -4183,16 +4183,17 @@ ctangle( +( i, 0), h @@ -4300,16 +4300,17 @@ r_code)) +) %0A%0A ax
4657acf6408b2fb416e2c9577ac09d18d81f8a68
Remove unused NHS database mockup
nameless/config.py
nameless/config.py
import os _basedir = os.path.abspath(os.path.dirname(__file__)) # Plugin settings DATABASE_NAMES = ['atc', 'nhs', 'sms'] # Using sqlite for local development, will be SQL on production. SQLALCHEMY_BINDS = { 'atc': 'sqlite:///' + os.path.join(_basedir, 'db/atc.db'), 'nhs': 'sqlite:///' + os.path.join(_basedir, '...
Python
0
@@ -103,15 +103,8 @@ tc', - 'nhs', 'sm @@ -260,71 +260,8 @@ '),%0A - 'nhs': 'sqlite:///' + os.path.join(_basedir, 'db/nhs.db'),%0A
6da7171e1e7c3c46103a0d0310fae1f9cbe8c055
add MACHO LAZY_BINDINGS test to test-security-check.py
contrib/devtools/test-security-check.py
contrib/devtools/test-security-check.py
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Test script for security-check.py ''' import subprocess import unittest def write_testcode(filename):...
Python
0.000002
@@ -3362,16 +3362,30 @@ DEFS NX +LAZY_BINDINGS Canary') @@ -3598,16 +3598,30 @@ NDEFS NX + LAZY_BINDINGS '))%0A @@ -3798,16 +3798,30 @@ NOUNDEFS + LAZY_BINDINGS '))%0A @@ -3919,32 +3919,221 @@ otector-all'%5D),%0A + (1, executable+': failed PIE LAZY_BINDINGS'))%0A self.assertEqual(cal...
10801bca03c03d6b6bb7b6108733178dcf5a8b53
Revert 87dbc5eb9665b5a145a3c2a190f64e2ce4c09fd4^..HEAD
shop/views.py
shop/views.py
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.views.generic.simple import direct_to_template from shop.forms import OrderForm from shop.models import EmailEntry, Order from datetime import datetime import urllib from xml.dom import minidom def index(request): print request.META['H...
Python
0.000001
@@ -365,23 +365,22 @@ == ' -www.opkikker.nl +localhost:8000 ':%0A
c81f4d0659366e1512a4b64f0cce65d50de25927
update to 3.29.0
packages/dependencies/sqlite3.py
packages/dependencies/sqlite3.py
{ 'repo_type' : 'archive', 'custom_cflag' : '-O2', # make sure we build it without -ffast-math 'download_locations' : [ { 'url' : 'https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz', 'hashes' : [ { 'type' : 'sha256', 'sum' : 'd61b5286f062adfce5125eaf544d495300656908e61fca143517afcc0a89b7c3' }, ], }, { '...
Python
0
@@ -167,33 +167,33 @@ lite-autoconf-32 -8 +9 0000.tar.gz', 'h @@ -237,72 +237,72 @@ : ' -d61b5286f062adfce5125eaf544d495300656908e61fca143517afcc0a89b7c3 +8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b ' %7D, @@ -370,17 +370,17 @@ oconf-32 -8 +9 0000.tar @@ -432,72 +432,72 @@ : ' -d61b5286f06...
0fee973ea7a4ca7b79c84ed55fa1d327c754beee
Add tests and some fixes for class extension pattern
readthedocs/core/utils/extend.py
readthedocs/core/utils/extend.py
"""Patterns for extending Read the Docs""" from django.conf import settings from django.utils.module_loading import import_by_path from django.utils.functional import LazyObject class SettingsOverrideObject(LazyObject): """Base class for creating class that can be overridden This is used for extension poin...
Python
0
@@ -37,16 +37,32 @@ ocs%22%22%22%0A%0A +import inspect%0A%0A from dja @@ -1519,16 +1519,17 @@ et(self. +_ get_clas @@ -1560,16 +1560,55 @@ path is +None and self._override_setting is not None:%0A @@ -1791,16 +1791,17 @@ def +_ get_clas @@ -1915,17 +1915,72 @@ in(%5B -__name__, +inspect.getmodule(type(...
252da1473643916dd10e7a250d64c8bedb8ae5a9
Use username as id too; #35
judge/views/select2.py
judge/views/select2.py
from django.db.models import Q from django.http import JsonResponse from django.utils.encoding import smart_text from django.views.generic.list import BaseListView from judge.models import Profile, Organization, Problem, Comment, Contest from judge.templatetags.gravatar import get_gravatar_url class Select2View(Base...
Python
0.00001
@@ -3341,17 +3341,43 @@ ame, - 'id': pk +%0A 'id': username ,%0A
f1c49d33c829c56f0dff12a20563ca7a1b3fbc41
Print the other way around (makes more sense)
Toolkit/AimlessSurface.py
Toolkit/AimlessSurface.py
from __future__ import division def work(): from scitbx import math from scitbx.array_family import flex N=15 lfg = math.log_factorial_generator(N) nsssphe = math.nss_spherical_harmonics(6,50000,lfg) l = 2 m = 1 t = 1 p = 1 print nsssphe.spherical_harmonic(2, 1, 1, 1) def n_terms(): orders = ...
Python
0.000078
@@ -1063,18 +1063,18 @@ ((1+ -36 +18 0//1, 1+ 180/ @@ -1069,18 +1069,18 @@ 0//1, 1+ -18 +36 0//1), f @@ -1788,15 +1788,15 @@ or%5B( -t +p //1, -p +t //1)
f1e071957214e787521c7de887ca1fe369671bc7
Add constants
UI/resources/constants.py
UI/resources/constants.py
# -*- coding: utf-8 -*- SAVE_PASSWORD_HASHED = True MAX_RETRIES_DOWNLOAD_FROM_SAME_FARMER = 3 MAX_RETRIES_UPLOAD_TO_SAME_FARMER = 3 MAX_RETRIES_NEGOTIATE_CONTRACT = 1000 MAX_RETRIES_GET_FILE_POINTERS = 100 GET_DEFAULT_TMP_PATH_FROM_ENV_VARIABLES = True GET_HOME_PATH_FROM_ENV_VARIABLES = True FILE_POINTERS_REQUEST_DE...
Python
0.000228
@@ -1123,16 +1123,61 @@ torj.io' +%0ACONFIG_FILE_NAME = 'storj_client_config.xml' %0A%0A# DESI
f2a0bbee61a144bf0d1de77dd4b41393fe7428bf
fix Ntests in simuNtests
simuNtests.py
simuNtests.py
# lance simulations pour different nombre d'electeurs import multiprocessing import os, sys import shutil import time import numpy as np from randomSets import * def worker(((Ncandidats,q, Nwinners))): """worker function""" sys.stdout.write('\nSTART -- %i candidats -- \n' % Ncandidats) sys.stdout.flush() ...
Python
0.000006
@@ -941,25 +941,20 @@ range(N -candida te +st s):%0A @@ -1105,17 +1105,18 @@ ocesses= -1 +20 )%0A po
3bf9ab0da4b06b8b0383fb6db64947886742899c
Add newline in log of builds after successful rebuild of website.
site/build.py
site/build.py
#!/usr/bin/env python # -*- coding: ascii -*- """ This script can be used to build the website. It is also run on each commit to github. Example: ./build public_html """ import datetime import os import shutil import subprocess import sys import time BUILD_DIR = 'build' def get_build_dir(): try: bui...
Python
0
@@ -169,16 +169,55 @@ l%0A%0A%22%22%22%0A%0A +from __future__ import print_function%0A%0A import d @@ -1274,17 +1274,17 @@ print - +( %22Not eno @@ -1322,16 +1322,17 @@ build.%22 +) %0A @@ -1727,16 +1727,19 @@ rint - +( %22Done. -%22 +%5Cn%22) %0A%0Aif
50a6ac219a3ff9f9b6ed6614c8a54ab5e93b525a
set phid_valid to yes since received from phi [skip ci]
custom/icds/repeaters/generators/phi.py
custom/icds/repeaters/generators/phi.py
import json from django.core.serializers.json import DjangoJSONEncoder from corehq import toggles from corehq.apps.hqcase.utils import update_case from corehq.motech.repeaters.repeater_generators import ( CaseRepeaterJsonPayloadGenerator, ) class BasePayloadGenerator(CaseRepeaterJsonPayloadGenerator): @stat...
Python
0
@@ -2430,16 +2430,40 @@ case_id, +%0A %7B'phid_ @@ -2486,16 +2486,37 @@ : phi_id +, 'phid_valid': 'yes' %7D,%0A
a4d089ad89fea16c7d3fa4743355229d163c30c4
fix running info in screen module closes #783
kivy/modules/screen.py
kivy/modules/screen.py
''' Screen ====== This module change some environement and configuration to match the density / dpi / screensize of a specific devices. To see a list of the available screenid, just run:: python main.py -m screen Simulate a medium-density screen as Motolora Droid 2:: python main.py -m screen,droid2 Simula...
Python
0
@@ -294,25 +294,25 @@ py -m screen -, +: droid2%0A%0ASimu @@ -387,33 +387,33 @@ ain.py -m screen -, +: onex,portrait%0A%0AS @@ -465,25 +465,25 @@ py -m screen -, +: ipad%0A'''%0A%0Aim
c60a238f9d3d46500a823082d64de08a2c2f1ae4
Set args and filenames properly
kiwi/ui/test/runner.py
kiwi/ui/test/runner.py
# # Kiwi: a Framework and Enhanced Widgets for Python # # Copyright (C) 2006 Async Open Source # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (a...
Python
0.000001
@@ -5465,17 +5465,16 @@ pos+5:%5D%0A -%0A @@ -5510,17 +5510,16 @@ if ' - ' in re @@ -5574,16 +5574,46 @@ ' ', 1)%0A + args = %5Bargs%5D%0A
798f80c3efe06869194adf7073af574cc94481b9
add to init
km3modules/__init__.py
km3modules/__init__.py
# coding=utf-8 # Filename: __init__.py # pylint: disable=locally-disabled """ A collection of commonly used modules. """ from km3modules.common import (Dump, Delete, HitCounter, BlobIndexer, Keep, StatusBar, MemoryObserver, Wrap) from km3modules.reco import SvdFit as PrimFit from km3modu...
Python
0.000006
@@ -253,16 +253,21 @@ er, Wrap +, Cut )%0Afrom k
c3f3b20c24c7d928698ca4e6d6ca197a9d314965
Filter out Nones
corehq/ex-submodules/casexml/apps/phone/data_providers/case/stock.py
corehq/ex-submodules/casexml/apps/phone/data_providers/case/stock.py
from collections import defaultdict from casexml.apps.stock.consumption import compute_default_monthly_consumption, \ ConsumptionConfiguration from corehq.form_processor.exceptions import LedgerValueNotFound from corehq.form_processor.interfaces.dbaccessors import LedgerAccessors from dimagi.utils.decorators.memoiz...
Python
0.999635
@@ -3758,32 +3758,123 @@ )%0A%0A + consumption_entries = filter(lambda e: e is not None, consumption_entries)%0A
b5f8e3f8dd8d2d99494be83bdddbc1a6078c3161
Test cleanup connectivity test added.
package/tests/test_connectivity/test_cleanup_connectivity.py
package/tests/test_connectivity/test_cleanup_connectivity.py
from unittest import TestCase from mock import Mock from cloudshell.cp.azure.domain.services.network_service import NetworkService from cloudshell.cp.azure.domain.services.tags import TagService from cloudshell.cp.azure.domain.services.virtual_machine_service import VirtualMachineService from cloudshell.cp.azure.doma...
Python
0
@@ -1143,32 +1143,87 @@ _group = Mock()%0A + self.vm_service.delete_sandbox_subnet = Mock()%0A tested_g @@ -1284,108 +1284,733 @@ k()%0A -%0A # Act%0A self.delete_operation.delete_resource_group(resource_client=resource_client, + network_client = Mock()%0A cloud_provider_m...
e5ed0e4e6dea58a1412e3c596612e647bd22c619
Update __init__.py
krempelair/__init__.py
krempelair/__init__.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import jinja2 import flask import views class Krempelair(flask.Flask): jinja_options = { 'extensions': ['jinja2.ext.autoescape'], 'undefined': jinja2.StrictUndefined } def __init__(self): """(See `make_app` for parameter descripti...
Python
0.000072
@@ -1225,16 +1225,105 @@ peratur/ +sollTemp/%3Cint:temp%3E'),%0A ('air_set_tempNAK', '/lueftung/temperatur/sollTempNAK/ %3Cint:tem
3f725f25b0896237b71f68993d9ffa24329f47fe
Keep the same format with other usage: capitalize the head letter
kuryr/common/config.py
kuryr/common/config.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Python
0.999999
@@ -906,17 +906,17 @@ y where -k +K uryr pyt @@ -1061,17 +1061,17 @@ ory for -k +K uryr vif
0258b5a219a6c61c5b7cc526a0c9d5a7f9ebf78e
print() function for Python 3
src/cpu/scheduler_profile.py
src/cpu/scheduler_profile.py
#!/usr/bin/python import json import sys STATE_COLOURS = {'S': '#acff90', 'R': '#ffaeae', 'D': '#fce94f', 'K': '#c00', 'x': '#0c0', 'U': '#ccc'} STROKE_COLOURS = {'S': '#679657', 'R': '#b07979', 'D': '#b3a639', 'K': '#600', 'x': '#060', 'U': '#aaa'} STATE_DESCRIPTORS = {'S': 'Sleeping', 'R': 'Runnable', 'D': 'Blocked...
Python
0.999804
@@ -3374,17 +3374,17 @@ print - +( %22Wrote %7B @@ -3409,16 +3409,17 @@ ilename) +) %0A%0A%0Adef g @@ -3850,17 +3850,17 @@ print - +( %22Failed @@ -3891,16 +3891,17 @@ %22 + line +) %0A ret @@ -4789,17 +4789,17 @@ print - +( %22No samp @@ -4828,24 +4828,25 @@ (process_id) +) %0A else:%0A ...
f751f0bc4ea5466052fdd11a674ddb9a0a3303a4
Fix pylint
dataset/models/tf/layers/core.py
dataset/models/tf/layers/core.py
""" Contains common layers """ import numpy as np import tensorflow as tf def flatten2d(inputs, name=None): """ Flatten tensor to two dimensions (batch_size, item_vector_size) """ x = tf.convert_to_tensor(inputs) dims = tf.reduce_prod(tf.shape(x)[1:]) x = tf.reshape(x, [-1, dims], name=name) retur...
Python
0.000099
@@ -2331,16 +2331,17 @@ def +_ dropped_ @@ -2474,16 +2474,17 @@ aining, +_ dropped_ @@ -2518,9 +2518,21 @@ (inputs) -) +, name=name)%0A
130663a47fe3c497aedd39acd12de70bab230dec
make things login free
src/datahub/browser/views.py
src/datahub/browser/views.py
import json, sys, re, hashlib, smtplib, base64, urllib, os from auth import * from django.http import * from django.shortcuts import render_to_response from django.views.decorators.csrf import csrf_exempt from django.core.context_processors import csrf from django.core.validators import email_re from django.db.utils i...
Python
0
@@ -568,13 +568,22 @@ ect( +'/%25s' %25( user) +) %0A e
8712b50048b3fe42fbeb725f92f20bda08cfcc28
update output string formatting
sknano/structure_io/_xyz_structure_data.py
sknano/structure_io/_xyz_structure_data.py
# -*- coding: utf-8 -*- """ ============================================================================== XYZ format (:mod:`sknano.structure_io._xyz_structure_data`) ============================================================================== .. currentmodule:: sknano.structure_io._xyz_structure_data """ from __fu...
Python
0.000003
@@ -2379,34 +2379,32 @@ ('%7B: +%3E 3s%7D - %7B:1 -0 +5 .5f%7D - %7B:1 -0 +5 .5f%7D - %7B:1 -0 +5 .5f%7D
8758e8ba90e54c35778cd0e2fdbc04869752ee29
Revert "Add database and message queue config for prod"
stagecraft/settings/production.py
stagecraft/settings/production.py
# preview/staging/production all use the same config with the exception of the # environment-specific secrets # # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # import os import random from os.path import abspath, dirname, join as pjoin from .common import * from .environment_specific_setti...
Python
0
@@ -194,22 +194,8 @@ t os -%0Aimport random %0A%0Afr @@ -1237,686 +1237,8 @@ ))%0A%0A -DATABASES = %7B%0A 'default': %7B%0A 'ENGINE': 'django.db.backends.postgresql_psycopg2',%0A 'NAME': 'stagecraft',%0A 'USER': 'stagecraft',%0A 'PASSWORD': os.getenv('DATABASE_PASSWORD'),%0A 'HO...
29a5ec45e76681865c62163e2580c0bfd4a6e241
Enhance comments
lc0045_jump_game_ii.py
lc0045_jump_game_ii.py
"""Leetcode 45. Jump Game II Hard URL: https://leetcode.com/problems/jump-game-ii/ Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimu...
Python
0
@@ -836,14 +836,21 @@ # -Create +Apply DP with tab @@ -873,26 +873,16 @@ is min -number of jumps to @@ -943,30 +943,33 @@ # -For each index i, loop +Iterate through from left to @@ -1757,20 +1757,22 @@ Update -jump +result if prev @@ -1922,32 +1922,46 @@ date reach with +max jump from current...