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 |
|---|---|---|---|---|---|---|---|
47594f279d2fb0d0c8cc8f8d0c0bb86a43d0bf95 | implement update for PMS | yags.py | yags.py | #!/usr/local/bin/python3
from tkinter import *
from subprocess import call
import threading
import queue
import time, random
import serial
SISPMCTL = "/usr/local/bin/sispmctl"
class PMSController(threading.Thread):
def __init__(self, queue):
self.__queue = queue
threading.Thread.__init__(self)
... | Python | 0 | @@ -509,16 +509,249 @@
of queue
+%0A elif item is %22update%22:%0A print('Updating Variables')%0A process = Popen(%5BSISPMCTL, %22-g%22, %22all%22%5D, stdout=PIPE)%0A (output, err) = process.communicate()%0A print(output)
%0A%0A
|
9841256a1732663518bc7c4ec3d143023ed0ebe1 | Load backends conditionally (so we don't force users to install unneeded deps). | zeya.py | zeya.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Phil Sung, Samson Yeung
#
# This file is part of Zeya.
#
# Zeya is free software: you can redistribute it and/or modify it under the
# terms of the GNU Affero General Public License as published by the Free
# Software Foundation, either version 3 of the L... | Python | 0 | @@ -1008,88 +1008,8 @@
on%0A%0A
-from rhythmbox import RhythmboxBackend%0Afrom directory import SingleRecursedDir%0A%0A
DEFA
@@ -6206,16 +6206,200 @@
hmbox%22:%0A
+ # Import the backend modules conditionally, so users don't have to%0A # install dependencies unless they are actually used.%0A from... |
1aae9f83bb0117e5bb02ab6579ff6f6e767752a5 | Use safer .get to access dict | relative_import.py | relative_import.py | '''
Copyright (c) 2014 Joaquin Duo - File under MIT License
Import this module to enable explicit relative importing on a submodule or
sub-package running it as a main module. Doing so is useful for running smoke
tests or small scripts within the module.
If you are using this tool enabled on production, make sure yo... | Python | 0 | @@ -2088,33 +2088,37 @@
if main_globals
-%5B
+.get(
'__package__'%5D o
@@ -2114,17 +2114,17 @@
ckage__'
-%5D
+)
or main
@@ -2131,17 +2131,21 @@
_globals
-%5B
+.get(
'__name_
@@ -2146,17 +2146,17 @@
_name__'
-%5D
+)
!= '__m
|
64f539e388c67e35b0434ad0c3669a141f00e110 | Use pickle instead of json for revision generation | replipy/storage.py | replipy/storage.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Alexander Shorin
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
import hashlib
import json
import time
import uuid
from abc import ABCMeta, abstractmethod
from collect... | Python | 0 | @@ -232,20 +232,22 @@
%0Aimport
-json
+pickle
%0Aimport
@@ -2443,20 +2443,19 @@
-hash
+sig
= hashl
@@ -2465,12 +2465,14 @@
md5(
-json
+pickle
.dum
@@ -2482,24 +2482,8 @@
doc)
-.encode('utf-8')
).he
@@ -2529,20 +2529,19 @@
eq + 1,
-hash
+sig
)%0A
|
e1cb95db85ef7edb274a278e1e2c46c2e87d0cb1 | Update NLP thingie | api/controllers/nlp.py | api/controllers/nlp.py | from flask import Flask
from flask import session
from flask import Response
from flask import request
from flask import redirect, url_for
from flask import render_template
from api.core import app, db
from api.models.user import User
from api.models.page import Page
from gensim import corpora, models, similarities
i... | Python | 0 | @@ -2742,18 +2742,16 @@
si%5D%0A%0A
- #
return
@@ -2763,16 +2763,41 @@
nse(
-list(sims)
+sims, mimetype = 'application/json'
)%0A
|
425de26b5a7041905862519c727491dd8ec17173 | Add root tag. | api/gen_detail_file.py | api/gen_detail_file.py | import timeit
import gevent
import math
from gevent.queue import Queue
from detail import AnimeDetail
from gen_id_file import IDS_FILENAME
from gevent import monkey; monkey.patch_socket()
DETAILS_FILENAME = 'animes.xml'
BATCH_SIZE = 10
WORKER_NUM = 8
MAXIMUM_WORKER_NUM = 8
NAMES_FOR_WORKER = ['Joe', 'Adam', 'Matt',... | Python | 0 | @@ -501,16 +501,42 @@
) as f:%0A
+ f.write('%3Croot%3E')%0A
@@ -862,16 +862,43 @@
h_data)%0A
+ f.write('%3C/root%3E')%0A
%0A%0Adef bo
@@ -1642,24 +1642,8 @@
l()%0A
- detail = ''%0A
|
5a1cb6408397e3dd8eed227f0adcea924de7b0e1 | enable new checkin report | reporting/utils.py | reporting/utils.py | """
Utility functions for reports
"""
from .reports import FamilyTotalOverTimeReport, DependentsTotalOverTimeReport
from .reports import FamilyCheckoutsPerWeekReport, DependentCheckoutsPerWeekReport
from .reports import EmptyFamilyCheckoutsPerWeekReport
from .reports import ItemsPerCategoryPerMonthReport, IndividualsB... | Python | 0 | @@ -239,32 +239,61 @@
utsPerWeekReport
+, FamilyCheckInsPerWeekReport
%0Afrom .reports i
@@ -728,16 +728,66 @@
rts%5B5%5D =
+ FamilyCheckInsPerWeekReport%0AavailableReports%5B6%5D =
Depende
@@ -824,25 +824,25 @@
ableReports%5B
-6
+7
%5D = ItemsPer
@@ -877,25 +877,25 @@
ableReports%5B
-7
+8
%5D = Individu
@@ -9... |
8da28a564ae14986046b576f91c2690aa5c0ff09 | fix dict sintax | api/omnitransaction.py | api/omnitransaction.py | import urlparse
import os, sys, re, random, pybitcointools, bitcoinrpc, math
from decimal import Decimal
from msc_apps import *
from blockchain_utils import *
import config
class OmniTransaction:
confirm_target=6
HEXSPACE_SECOND='21'
mainnet_exodus_address='1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P'
testnet_e... | Python | 0.000027 | @@ -3741,13 +3741,16 @@
v_tx
-.
+%5B'
vout
+'%5D
:%0A
@@ -4151,13 +4151,16 @@
v_tx
-.
+%5B'
txid
+'%5D
, %22v
|
1f192121b0c769cf07af052327f503b3a47c77a0 | Remove join_args option in run_command() (#5272) | airflow/task/task_runner/base_task_runner.py | airflow/task/task_runner/base_task_runner.py | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | Python | 0 | @@ -4627,28 +4627,11 @@
None
-, join_args=False
):%0A
+
@@ -4795,178 +4795,8 @@
ist%0A
- :param join_args: whether to concatenate the list of command tokens e.g. %60%60%5B'airflow', 'run'%5D%60%60 vs%0A %60%60%5B'airflow run'%5D%60%60%0A :param join_args: bool%0A
@@ -4916,80 +491... |
0c1b0a7787bd6824815ae208edab8f208b53af09 | Add comment to override of status code | api/base/exceptions.py | api/base/exceptions.py |
def jsonapi_exception_handler(exc, context):
"""
Custom exception handler that returns errors object as an array with a 'detail' member
"""
from rest_framework.views import exception_handler
response = exception_handler(exc, context)
if response is not None:
if 'detail' in response.dat... | Python | 0 | @@ -455,16 +455,124 @@
ata%7D%5D%7D%0A%0A
+ # Returns 401 instead of 403 during unauthorized requests without having user to log in with Basic Auth%0A
if r
|
b225011d1892f285b96f67f0c0734c62b4e196b6 | Make transactions work again #nodebug | api/base/middleware.py | api/base/middleware.py | from pymongo.errors import OperationFailure
from raven.contrib.django.raven_compat.models import sentry_exception_handler
from framework.transactions import commands, messages, utils
from .api_globals import api_globals
# TODO: Verify that a transaction is being created for every
# individual request.
class TokuTra... | Python | 0.000001 | @@ -1667,31 +1667,8 @@
- pass%0A #
rai
|
32189cbdfcce0c4bf2d23214da529ab7f253e8f7 | Update NLP thingie | api/controllers/nlp.py | api/controllers/nlp.py | from flask import Flask
from flask import session
from flask import Response
from flask import request
from flask import redirect, url_for
from flask import render_template
from api.core import app, db
from api.models.user import User
from api.models.page import Page
from gensim import corpora, models, similarities
i... | Python | 0 | @@ -1504,16 +1504,18 @@
nize%0A
+ #
stoplis
@@ -1580,16 +1580,18 @@
t())%0A
+ #
texts =
@@ -1686,16 +1686,100 @@
estions%5D
+%0A texts = %5B%5Bword for word in question.lower().split()%5D for question in questions%5D
%0A%0A #
@@ -2901,17 +2901,16 @@
awesome
-.
',%0A
@@ -2997,17 +2997,16 @@
... |
c7cfbed48718c58753a3d36dfe017f1700956f45 | Update NLP thingie | api/controllers/nlp.py | api/controllers/nlp.py | from flask import Flask
from flask import session
from flask import Response
from flask import request
from flask import redirect, url_for
from flask import render_template
from api.core import app, db
from api.models.user import User
from api.models.page import Page
from gensim import corpora, models, similarities
i... | Python | 0 | @@ -2519,16 +2519,43 @@
eshold:%0A
+ print group_id%0A
|
f6d7283a04a146d73a3f873c507700202f023211 | Remove commented out code | raiden/tests/conftest.py | raiden/tests/conftest.py | # -*- coding: utf-8 -*-
# pylint: disable=wrong-import-position,redefined-outer-name,unused-wildcard-import,wildcard-import
import re
import gevent
import py
import sys
from gevent import monkey
monkey.patch_all()
import pytest
from ethereum.tools.keys import PBKDF2_CONSTANTS
from raiden.exceptions import RaidenShut... | Python | 0 | @@ -3070,516 +3070,8 @@
)%0A%0A%0A
-# Connect catchlog's handler to structlog's root logger%0A# @pytest.hookimpl(hookwrapper=True, trylast=True)%0A# def pytest_runtest_call(item):%0A# catchlog_handler = getattr(item, CATCH_LOG_HANDLER_NAME, None)%0A# if catchlog_handler and catchlog_handler not in structlog.root... |
47b9aeff1400beb723cd759109993003d9b0586b | Comment out alpha version of answer generation algorithm. | src/answer_processing/answer_processing.py | src/answer_processing/answer_processing.py | # LING 573 Question Answering System
# Code last updated 4/18/14 by Claire Jaja
# This code implements an Answer Processor for the question answering system.
from general_classes import AnswerTemplate, Passage
from operator import itemgetter, attrgetter
from collections import Counter, defaultdict
class AnswerProcess... | Python | 0 | @@ -1444,16 +1444,17 @@
tractor%0A
+#
@@ -1484,16 +1484,17 @@
ct(set)%0A
+#
@@ -1530,16 +1530,17 @@
mbda:0)%0A
+#
@@ -1561,32 +1561,33 @@
self.passages:%0A
+#
for
@@ -1675,16 +1675,17 @@
ng list%0A
+#
@@ -1731,16 +1731,17 @@
unigram%0A
+#
@@ -1783,1... |
0bd4224bfa737942930bfa1e1a67ecfdf25e70e7 | Apply WidgetAdapter to CheckboxSelectMultiple. | wagtail/core/widget_adapters.py | wagtail/core/widget_adapters.py | """
Register Telepath adapters for core Django form widgets, so that they can
have corresponding Javascript objects with the ability to render new instances
and extract field values.
"""
from django import forms
from django.utils.functional import cached_property
from wagtail.admin.staticfiles import versioned_static... | Python | 0 | @@ -1013,16 +1013,72 @@
Select)%0A
+register(WidgetAdapter(), forms.CheckboxSelectMultiple)%0A
%0A%0Aclass
|
8b38f24fbdee425fde52d33b2154812d10c9d3db | Bump version | wagtailaltgenerator/__init__.py | wagtailaltgenerator/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
wagtailaltgenerator
----------
Insert image description and tags with the help of computer vision
"""
__title__ = "wagtailaltgenerator"
__version__ = "4.1.0"
__build__ = 410
__author__ = "Martin Sandström"
__license__ = "MIT"
__copyright__ = "Copyright 2016-2018 Marti... | Python | 0 | @@ -200,17 +200,17 @@
= %224.1.
-0
+1
%22%0A__buil
@@ -217,17 +217,17 @@
d__ = 41
-0
+1
%0A__autho
@@ -306,17 +306,17 @@
2016-201
-8
+9
Martin
|
522aedce37a79dc8551c04592c637cde5528022e | Add compatibility with gevent 1.0 | wal_e/worker/pg/wal_transfer.py | wal_e/worker/pg/wal_transfer.py | import gevent
import os
import re
import traceback
from gevent import queue
from os import path
from wal_e.exception import UserCritical
from wal_e import storage
class WalSegment(object):
def __init__(self, seg_path, explicit=False):
self.path = seg_path
self.explicit = explicit
self.nam... | Python | 0 | @@ -4419,16 +4419,21 @@
killall(
+list(
self.gre
@@ -4438,16 +4438,17 @@
reenlets
+)
, block=
|
e704ddf988159f11fe579f2404b683756b6844ac | fix baidu crawler | icrawler/builtin/baidu.py | icrawler/builtin/baidu.py | # -*- coding: utf-8 -*-
import json
from icrawler import Crawler, Feeder, Parser, ImageDownloader
from icrawler.builtin.filter import Filter
class BaiduFeeder(Feeder):
def get_filter(self):
search_filter = Filter()
# type filter
type_code = {
'portrait': 's=3&lm=0&st=-1&fac... | Python | 0.000004 | @@ -3775,17 +3775,83 @@
-8',
- 'ignore'
+%0A 'ignore').replace(%22%5C%5C'%22, %22'%22
)%0A
@@ -4578,24 +4578,38 @@
mageCrawler,
+%0A
self).__ini
@@ -4612,29 +4612,16 @@
_init__(
-%0A
feeder_c
@@ -4658,16 +4658,45 @@
, *args,
+%0A ... |
a155e8654a95969abc2290d4198622991d6cb00e | Remove duplicate entry for vikidia and gutenberg in burundi boxes | ideascube/conf/idb_bdi.py | ideascube/conf/idb_bdi.py | """Generic config for Ideasbox of Burundi"""
from .idb import * # noqa
from django.utils.translation import ugettext_lazy as _
USER_FORM_FIELDS = (
('Ideasbox', ['serial', 'box_awareness']),
(_('Personal informations'), ['refugee_id', 'short_name', 'full_name', 'birth_year', 'gender', 'phone']), # noqa
(... | Python | 0 | @@ -820,86 +820,8 @@
%7B%0A
- 'id': 'vikidia',%0A %7D,%0A %7B%0A 'id': 'gutenberg',%0A %7D,%0A %7B%0A
|
05c68831cba1aa82c86fcf37fc1769f5ee017794 | Remove excluded from submission csv | web/portal/views/submissions.py | web/portal/views/submissions.py | import re
import datetime
import csv
import tempfile
import io
from flask import render_template, request, redirect, url_for, flash, make_response
from flask_security import login_required, current_user, roles_required
from sqlalchemy import func
from portal import app, db
from portal.models import *
from portal.forms ... | Python | 0 | @@ -3228,32 +3228,89 @@
invoice_quarter%0A
+ ).filter(%0A RecruitStatus.status != 'Excluded'%0A
)%0A%0A parti
|
923bcc555c6a039df649d1c2725cc67ad8c79660 | Make CMS errors JSON-able if requested via AJAX | cms/djangoapps/contentstore/views/error.py | cms/djangoapps/contentstore/views/error.py | from django.http import HttpResponseServerError, HttpResponseNotFound
from mitxmako.shortcuts import render_to_string, render_to_response
__all__ = ['not_found', 'server_error', 'render_404', 'render_500']
def not_found(request):
return render_to_response('error.html', {'error': '404'})
def server_error(reques... | Python | 0.000002 | @@ -16,16 +16,31 @@
p import
+ (HttpResponse,
HttpRes
@@ -56,16 +56,41 @@
erError,
+%0A
HttpRes
@@ -102,16 +102,17 @@
NotFound
+)
%0Afrom mi
@@ -171,16 +171,45 @@
response
+%0Aimport functools%0Aimport json
%0A%0A__all_
@@ -272,16 +272,692 @@
500'%5D%0A%0A%0A
+def jsonable_error(statu... |
521839eb8f9d81c55d9cdc851df8af65278c4f45 | scale output after vectorizer in segmenter | kraken/blla.py | kraken/blla.py | # -*- coding: utf-8 -*-
#
# Copyright 2019 Benjamin Kiessling
#
# 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 ... | Python | 0 | @@ -2779,16 +2779,33 @@
(model)%0A
+ model.eval()%0A
if m
@@ -3657,24 +3657,54 @@
rk output')%0A
+ o = o.squeeze(0).numpy()%0A#
o = F.in
@@ -3735,16 +3735,35 @@
e%5B::-1%5D)
+.squeeze(0).numpy()
%0A log
@@ -3850,16 +3850,177 @@
ines(o)%0A
+ logger.debug('Scaling vectorized lines')%0A scale... |
f164dd8141133cb78ceeab3ecccc5d756c36da3c | Add optional structured properties for og:image and og:video | lassie/filters/social.py | lassie/filters/social.py | # -*- coding: utf-8 -*-
"""
lassie.filters.social
~~~~~~~~~~~~~~~~~~~~~
This module contains data social related content to help Lassie filter for content.
"""
from ..compat import str
import re
SOCIAL_MAPS = {
'meta': {
'open_graph': { # http://ogp.me/
'pattern': re.compile(r"^og:", re.I... | Python | 0 | @@ -561,100 +561,325 @@
age:
-width': 'width',%0A 'og:image:height': 'height',%0A%0A 'og:video': '
+url': 'src',%0A 'og:image:secure_url': 'secure_src',%0A 'og:image:width': 'width',%0A 'og:image:height': 'height',%0A 'og:image:t... |
bc199a9eaa2416b35d1d691f580e6c9ca0b1a2ae | Remove node counts and update docstrings on new view for activity | website/discovery/views.py | website/discovery/views.py | from website import settings
from website.project import Node
from website.project import utils
from modularodm.query.querydialect import DefaultQueryDialect as Q
def activity():
node_data = utils.get_node_data()
if node_data:
hits = utils.hits(node_data)
else:
hits = {}
# New Proje... | Python | 0 | @@ -179,140 +179,346 @@
():%0A
-%0A node_data = utils.get_node_data()%0A if node_data:%0A hits = utils.hits(node_data)%0A else:%0A hits = %7B%7D%0A%0A # New
+ %22%22%22Reads node activity from pre-generated popular projects and registrations.%0A New and Noteworthy projects are set manua... |
daba688f4898bdca680ac1cd4b1e2efbc3ef1a1f | Deal with incorrect username. | lastscrape/lastscrape.py | lastscrape/lastscrape.py | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""usage: lastscrape.py USER [OUTPUT_FILE]"""
import sys
import time
import codecs
import urllib2
from BeautifulSoup import BeautifulSoup
sys.stdout = codecs.lookup('utf-8')[-1](sys.stdout)
def parse_page(page):
"""Parse a page of recently listened tracks and return a ... | Python | 0 | @@ -1314,16 +1314,149 @@
%25 user%0A
+ try:%0A f = urllib2.urlopen(url)%0A except urllib2.HTTPError:%0A raise Exception(%22Username probably does not exist.%22)%0A
soup
|
a9803a8a523b8603db93ae18eb7e75e63bb8c44b | Add `dpi` option into `plot_setup`; Fix an importing bug with `matplotlib.pyplot` (#4) | easypyplot/pdf.py | easypyplot/pdf.py | """ $lic$
Copyright (c) 2016-2021, Mingyu Gao
This program is free software: you can redistribute it and/or modify it under
the terms of the Modified BSD-3 License as published by the Open Source
Initiative.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the imp... | Python | 0.000001 | @@ -652,16 +652,41 @@
kend_pdf
+%0Aimport matplotlib.pyplot
%0A%0Afrom .
@@ -762,32 +762,42 @@
=9, font='paper'
+, dpi=None
):%0A %22%22%22 Setup
@@ -1160,32 +1160,67 @@
ustomizes font.%0A
+ dpi: resolution of the figure.%0A
%22%22%22%0A pape
@@ -1424,16 +1424,25 @@
=figsize
+, dpi=dpi
)%0A re
@... |
1147781292b32177e0733be134f8c83101f0abbf | add comment | weiss/flows/flowManager.py | weiss/flows/flowManager.py | """
Flow Mnager
NOTE: this class should be created by signleton factory in factory.py
this class is responsible for
1. user state factory.
2. loop up state by sid
3. make transit from one state based on a given action
Author: Ming Fang <mingf@cs.cmu.edu>
"""
import logging
logger = logging.getLogger(__... | Python | 0 | @@ -3,16 +3,17 @@
%22%0AFlow M
+a
nager%0A%0AN
@@ -55,10 +55,10 @@
y si
-g
n
+g
leto
@@ -123,114 +123,61 @@
1.
-user state factory.%0A 2. loop up state by sid%0A 3. make transit from one state based on a given action
+register a user's flow%0A 2. loop up flow by user id
%0A%0AAu
@@ -391,166 +391,456 @... |
1526e11509c5124cb80edeb5742b55dc75c31b67 | update avg->avg_sat | county_avg_sat.py | county_avg_sat.py | # Written by Jonathan Saewitz, released April 11th, 2016 for Statisti.ca
# Released under the MIT License (https://opensource.org/licenses/MIT)
from __future__ import division
import csv, requests, re, collections, plotly.plotly as plotly, plotly.graph_objs as go
from plotly.graph_objs import Scatter, Layout
schools... | Python | 0 | @@ -1902,16 +1902,20 @@
ty, 'avg
+_sat
': sum(s
@@ -2888,16 +2888,20 @@
d(c%5B'avg
+_sat
'%5D)%0A%09inc
@@ -2995,16 +2995,20 @@
, c%5B'avg
+_sat
'%5D, c%5B'p
|
c36b90db0f3e633f459afa3328e50b6f5e8b4e1b | Remove debug print. | redash/authentication.py | redash/authentication.py | import functools
import hashlib
import hmac
from flask import request, make_response
from flask.ext.googleauth import GoogleFederated
import time
from werkzeug.contrib.fixers import ProxyFix
import werkzeug.wrappers
from redash import data, settings
class HMACAuthentication(object):
def __init__(self, auth):
... | Python | 0.000001 | @@ -922,45 +922,8 @@
))%0A%0A
- print h.hexdigest()%0A%0A
@@ -1371,16 +1371,17 @@
orated%0A%0A
+%0A
def setu
|
0e2d058efd310c2060df2a86b1de989eca1e2ea5 | Modify cafetaria scraper | server/scraper/resto/cafetaria.py | server/scraper/resto/cafetaria.py | from backoff import retry_session
from bs4 import BeautifulSoup
from util import parse_money, stderr_print
import json
import sys
from requests.exceptions import ConnectionError, Timeout
HTML_PARSER = 'lxml'
OUTFILE = "resto/2.0/extrafood.json"
BASE_URL = 'https://www.ugent.be/student/nl/meer-dan-studeren/resto/ophet... | Python | 0.000001 | @@ -1,12 +1,39 @@
+import argparse%0Aimport os%0A%0A
from backoff
@@ -118,32 +118,26 @@
ey,
-stderr_print%0Aimport json
+write_json_to_file
%0Aimp
@@ -202,16 +202,16 @@
imeout%0A%0A
+
HTML_PAR
@@ -227,46 +227,8 @@
ml'%0A
-OUTFILE = %22resto/2.0/extrafood.json%22%0A%0A
BASE
@@ -1359,60 +1359,49 @@
a%0A%0A%0A
-i... |
bb35e83b7977e15cd7df9d1f2e810a730dbafa45 | update happy number | leetcode/happy_number.py | leetcode/happy_number.py | # Created by lujin at 6/3/2017
#
# 202. Happy Number
#
# Description:
#
# Write an algorithm to determine if a number is "happy".
#
# A happy number is a number defined by the following process: Starting with any positive integer,
# replace the number by the sum of the squares of its digits, and repeat the process unti... | Python | 0.000002 | @@ -1133,32 +1133,33 @@
%0A def isHappy
+2
(self, n):%0A
|
d516377d452d02554e9d0dc08f4cd1ea6e612492 | Remove duplicate copy() and small clean up in sampler.py | cpnest/sampler.py | cpnest/sampler.py | import sys
import os
import numpy as np
from math import log
from collections import deque
from random import random,randrange
from . import parameter
from . import proposal
class Sampler(object):
"""
Sampler class.
Initialisation arguments:
usermodel:
user defined model to sample
ma... | Python | 0 | @@ -3619,23 +3619,16 @@
gs(param
-.copy()
,logLmin
@@ -5508,48 +5508,23 @@
rn (
-float(accepted)/float(rejected+accepted)
+self.acceptance
,jum
|
d1bf3d9853125700e99a0fc1ae705e76a1127035 | Convert aes key to string. Crypto does not like unicode keys | bluebottle/token_auth/auth/booking.py | bluebottle/token_auth/auth/booking.py | import base64
import hashlib
import hmac
import logging
import re
import urllib
from datetime import timedelta
import string
from datetime import datetime
from django.utils.dateparse import parse_datetime
from django.utils import timezone
from Crypto import Random
from Crypto.Cipher import AES
from bluebottle.token_a... | Python | 0.999999 | @@ -4991,16 +4991,20 @@
AES.new(
+str(
self.set
@@ -5019,16 +5019,17 @@
es_key'%5D
+)
, AES.MO
|
c91dcf3a55bf12ae8e19b167bfd593cc6dbfc980 | Fixing whitespace | windmill/browser/chrome.py | windmill/browser/chrome.py | import commands
import tempfile
import logging
import signal
import subprocess
import sys, os
import urlparse
import windmill
logger = logging.getLogger(__name__)
import safari
class Chrome(safari.Safari):
def __init__(self):
self.chrome_binary = windmill.settings['CHROME_BINARY']
self.test_url = wind... | Python | 0.999999 | @@ -1922,20 +1922,17 @@
f'%5D))%0A%09%0A
-
+%09
def set_
@@ -1952,20 +1952,17 @@
(self):%0A
-
+%09
impo
@@ -1967,20 +1967,17 @@
port ie%0A
-
+%09
self
@@ -2008,20 +2008,17 @@
lorer()%0A
-
+%09
self
|
06e0499c5a83a15dafc8563579295b9a8b51f79f | Remove typing annotations for backwards compatibility | cppimport/find.py | cppimport/find.py | import os
import sys
import cppimport.config
def find_file_in_folders(filename, paths):
for d in paths:
if not os.path.exists(d):
continue
if os.path.isfile(d):
continue
for f in os.listdir(d):
if f == filename:
return os.path.join(d, f... | Python | 0.000001 | @@ -1229,21 +1229,16 @@
ule_name
-: str
, search
@@ -1246,28 +1246,14 @@
path
-: str = None) -%3E str
+=None)
:%0A
|
aa059d6f2fd45ec0d7de7bb2cd0477ff3552eb14 | Handle TLS errors in receivequeuethread | src/network/receivequeuethread.py | src/network/receivequeuethread.py | import Queue
import sys
import threading
import time
import addresses
from bmconfigparser import BMConfigParser
from debug import logger
from helper_threading import StoppableThread
from inventory import Inventory
from network.connectionpool import BMConnectionPool
from network.bmproto import BMProto
from queues impor... | Python | 0 | @@ -1,20 +1,47 @@
import
-Queue
+errno%0Aimport Queue%0Aimport socket
%0Aimport
@@ -1494,16 +1494,273 @@
pass%0A
+ except socket.error as err:%0A if err.errno == errno.EBADF:%0A BMConnectionPool().getConnectionByAddr(dest).set_state(%22close%22, 0)%0A ... |
e968983001cced5391a163ab282ef2f2ded492f6 | Remove link to private document. | eliot/__init__.py | eliot/__init__.py | """
Eliot: An Opinionated Logging Library
Suppose we turn from outside estimates of a man, to wonder, with keener
interest, what is the report of his own consciousness about his doings or
capacity: with what hindrances he is carrying on his daily labors; what
fading of hopes, or what deeper fixity of s... | Python | 0 | @@ -8,38 +8,31 @@
ot:
-An Opinionated Logging Library
+Logging as Storytelling
%0A%0A
@@ -554,100 +554,8 @@
rch%22
-%0A%0ASee http://wiki.hybrid-cluster.com/index.php?title=Logging_Design_Document for%0Amotivation.
%0A%22%22%22
|
6b2e24700a420c55aca7af214d8a16b79ff90fd4 | Fix single commit diff. | ellen/git/diff.py | ellen/git/diff.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pygit2 import GIT_OBJ_COMMIT
from pygit2 import GIT_DIFF_IGNORE_WHITESPACE
from ellen.utils import JagareError
from ellen.utils.git import _resolve_version
from ellen.utils.git import format_diff
def diff_wrapper(repository, *w, **kw):
''' Jagare's diff wrapper... | Python | 0.000001 | @@ -2809,9 +2809,9 @@
ts)
-%3E
+=
= 1:
@@ -2873,32 +2873,232 @@
s%5B0%5D, **kwargs)%0A
+ elif len(parents) == 2:%0A diff = diff_commits(repository, parents%5B0%5D, parents%5B-1%5D, **kwargs)%0A elif len(parents) %3E 2:%0A diff = diff_commits(repository, commit, parents%5B0%5D, **kwargs)%0A
... |
bf2f6a43271c5cd082c1d122937d7b84ec8885c7 | fix sprite __init__ | cocos/sprite.py | cocos/sprite.py | # ----------------------------------------------------------------------------
# cocos2d
# Copyright (c) 2008 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, Lucio Torre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follow... | Python | 0.000005 | @@ -3681,23 +3681,17 @@
-cocosnode.Cocos
+Batchable
Node
|
f1a84b0dc2d14b25b7d6e2e3f2f2d68002600d1a | Update routes | proptrunk/proptrunk.py | proptrunk/proptrunk.py | from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('templates/index.html'. title='Prop Trunk')
@app.route('/inventory')
def inventory():
return 'Inventory'
@app.route('/checkout')
def checkout():
return 'Checkout'
@app.route... | Python | 0.000001 | @@ -81,18 +81,35 @@
oute('/'
+, methods=%5B'GET'%5D
)%0A
-
def hell
@@ -214,22 +214,43 @@
ventory'
+, methods=%5B'GET'%5D
)%0Adef
+get_
inventor
@@ -278,16 +278,172 @@
ntory'%0A%0A
+@app.route('/inventory', methods=%5B'POST'%5D)%0Adef post_inventory():%0A # Process post body (JSON)%0A # Insert%0A # ret... |
f434e0b58f2040650f773dff65b667f6703948de | Version bump | proscatter/__init__.py | proscatter/__init__.py | __version__ = '0.0.1a'
| Python | 0.000001 | @@ -16,8 +16,7 @@
0.0.
-1a
+2
'%0A
|
cbe84c3220a3da4db36f10d84c63dc08231b3b9f | fix indentation | src/cirrus/plugins/uploaders/fabric_put.py | src/cirrus/plugins/uploaders/fabric_put.py | #!/usr/bin/env python
"""
_fabric_put_
Uploader plugin that uses fabric to do a remote put
"""
from fabric.operations import put
from cirrus.fabric_helpers import FabricHelper
from cirrus.logger import get_logger
from cirrus.upload_plugins import Uploader
from cirrus.configuration import get_pypi_auth
LOGGER = get_... | Python | 0.000358 | @@ -1025,77 +1025,28 @@
per(
-%0A pypi_url,%0A pypi_user,%0A
+pypi_url, pypi_user,
pyp
@@ -1065,17 +1065,16 @@
key'%5D):%0A
-%0A
|
a4b5ac03d693f438dc77b138f007083ec62cc189 | set on_delete on FKs to be Django>2 compliant | shop/models/defaults/commodity.py | shop/models/defaults/commodity.py | # -*- coding: utf-8 -*-
"""
In django-SHOP, a Commodity product-model is considered a very basic product without any attributes,
which can be used on a generic CMS page to describe anything.
"""
from __future__ import unicode_literals
from django.conf import settings
from django.core.validators import MinValueValidato... | Python | 0.000001 | @@ -2732,32 +2732,100 @@
null=True,%0A
+ default=None,%0A on_delete=models.SET_DEFAULT,%0A
help
@@ -4165,16 +4165,54 @@
tions',%0A
+ on_delete=models.CASCADE,%0A
@@ -5985,32 +5985,100 @@
null=True,%0A
+ default=None,%0A on_delete... |
e7b27982bbad6461db0e85c14df875815397f353 | fix test | proso_user/api_test.py | proso_user/api_test.py | from proso.django.test import TestCase
import json
class UserAPITest(TestCase):
def test_anonymous_profile(self):
response = self.client.get('/user/profile/')
self.assertEqual(response.status_code, 404, 'There is no profile for anonymous user.')
def test_signup_and_profile(self):
# s... | Python | 0.000004 | @@ -987,16 +987,49 @@
%22id%22: 1
+,%0A %22staff%22: False,
%0A
|
d332f6586a11d9bb122146155bbd5c981dbf8bd4 | Add error handling for missing parameters for codeModule image | endpoint/image.py | endpoint/image.py | import os
import magic
import falcon
from sqlalchemy.exc import SQLAlchemyError
from .profile import ALLOWED_MIME_TYPES
from db import session
import model
import util
class Image(object):
def on_get(self, req, resp, context, id):
if context == 'profile':
try:
user = session.... | Python | 0 | @@ -1358,32 +1358,92 @@
et_param('file')
+ or not req.get_param('module') or not req.get_param('user')
:%0A
|
3b053c1f1c490ee9426bf65c5032e24e9f184568 | Increase delay | broken_links/broken_links/settings.py | broken_links/broken_links/settings.py | # -*- coding: utf-8 -*-
# Scrapy settings for broken_links project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
BOT_NAME = 'broken_links'
SPIDER_MODULES = ['broken_links... | Python | 0.000002 | @@ -706,11 +706,9 @@
Y =
-10.
+2
0 #
@@ -750,11 +750,13 @@
= 1
-20.
+0 * 6
0 #
|
67a13cbfd66e1d7b023ff26d6160117680b8883e | Remove unneeded semi-colons. | src/pysws.py | src/pysws.py | #!/usr/bin/python2.7
'''
Written by Derek Steinmoeller, 2015.
'''
import numpy as np
from numpy.fft import fft, ifft, fftshift
import matplotlib.pyplot as plt
# Run-specific constants.
LX = 3.0e3
LY = 3.0e3
G = 9.81
F = 0.0
FINAL_TIME = 300.0
NX = 128
NY = 128
CFL = 0.45
CONST_DEPTH = 10.0
LOGGING_INTERVAL = 10
ONLI... | Python | 0.000138 | @@ -4259,17 +4259,16 @@
dt*rhs_q
-;
%0A%0A
@@ -4316,17 +4316,16 @@
k%5D*res_q
-;
%0A %0A
|
7ccd320aede6ad1674915cd8367206ee1ea3dff3 | Remove unused import | smoothtest/autotest/TestRunner.py | smoothtest/autotest/TestRunner.py | # -*- coding: utf-8 -*-
'''
Smoothtest
Copyright (c) 2014 Juju. Inc
Code Licensed under MIT License. See LICENSE file.
'''
import importlib
import unittest
import rel_imp; rel_imp.init()
from .base import ChildBase
from smoothtest.autotest.base import TestResult, TestException
class TestRunner(ChildBase):
'''
... | Python | 0.000001 | @@ -249,20 +249,8 @@
port
- TestResult,
Tes
|
3e1971b8b61a375db6f379f155437788ed524f81 | Use new Django's import_string() | snorky/backend/django/__init__.py | snorky/backend/django/__init__.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import
import json
from snorky.backend import SnorkyHTTPTransport, SnorkyBackend, Snorky... | Python | 0 | @@ -352,16 +352,25 @@
ettings%0A
+try:%0A
from dja
@@ -416,16 +416,94 @@
by_path%0A
+except ImportError:%0A from django.utils.module_loading import import_string%0A
from dja
|
e2d29e9260528c2ab055d204d0ab547acd8a9560 | Use correct section name. | zipline/pipeline/pipeline.py | zipline/pipeline/pipeline.py | from zipline.utils.preprocess import expect_types, optional
from .term import Term
from .filters import Filter
from .graph import TermGraph
class Pipeline(object):
"""
A Pipeline object represents a collection of named expressions to be
compiled and executed by a PipelineEngine.
A Pipeline has two i... | Python | 0 | @@ -3171,16 +3171,17 @@
arameter
+s
%0A
@@ -3182,32 +3182,33 @@
---------
+-
%0A filter
|
e4b4f808e984da8d98f9c6bd9f2816bed4d04a50 | Move steam splitting outside of exception "else" clause | yturl.py | yturl.py | #!/usr/bin/env python
try:
from urllib.request import urlopen
from urllib.parse import parse_qsl, urlparse
from itertools import chain, zip_longest
except ImportError: # Python 2 fallback
from urllib import urlopen
from urlparse import parse_qsl, urlparse
from itertools import chain, izip_long... | Python | 0.000003 | @@ -2961,22 +2961,9 @@
%22%5D)%0A
- else:%0A
+%0A
@@ -2995,20 +2995,16 @@
it(%22,%22)%0A
-
for
@@ -3022,20 +3022,16 @@
treams:%0A
-
@@ -3062,20 +3062,16 @@
tream))%0A
-
|
c906f44d905fd318d6ce018a6159212e82483513 | Use the ssh_connection section for scp_if_ssh | lib/ansible/constants.py | lib/ansible/constants.py | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 lat... | Python | 0.000007 | @@ -4017,32 +4017,40 @@
t_config(p,
-DEFAULTS
+'ssh_connection'
, 'scp_if_ss
|
51771a5a0365c4f70df77ecd5d76ed51b2be1fe2 | add some more messages for tests | csp/test/basic.py | csp/test/basic.py | from twisted.trial.unittest import TestCase
from twisted.internet.defer import Deferred
from csp.test_helpers import async
from csp import Channel, put, take, go, sleep, stop
from csp import put_then_callback, take_then_callback
class Putting(TestCase):
@async
def test_immediate_taken(self):
ch = Cha... | Python | 0 | @@ -1524,16 +1524,50 @@
unt%22%5D, 2
+, %22second (buffered) put succeeds%22
)%0A
@@ -1914,16 +1914,59 @@
), value
+, %22yielded value is bounced back untouched%22
)%0A%0A @
|
6f6bfa4601ecbba57b7dbce32f337141fb4c9add | long_description | src/setup.py | src/setup.py | # Copyright (c) 2015, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | Python | 0.999367 | @@ -1758,16 +1758,19 @@
n=open('
+../
README.m
|
27d5f63aa4b460aca54eb0b3f12c86e1733b1cf4 | version bump to 0.0.2 | src/setup.py | src/setup.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name = 'service-deployment-tools',
version = '0.0.1',
provides = ["service_deployment_tools"],
author = 'Kyle Anderson',
author_email = 'kwa@yelp.com',
description ... | Python | 0.000001 | @@ -168,9 +168,9 @@
0.0.
-1
+2
',%0A
|
794af1c9c3368af21eab23dcc39818edae53e022 | Simplify the trajectory in MacSmoother. | src/prpy/planning/mac_smoother.py | src/prpy/planning/mac_smoother.py | #!/usr/bin/env python
# Copyright (c) 2013, Carnegie Mellon University
# All rights reserved.
# Authors: Michael Koval <mkoval@cs.cmu.edu>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# - Redistributions of source... | Python | 0.000001 | @@ -1652,16 +1652,36 @@
ajectory
+, SimplifyTrajectory
%0Afrom ba
@@ -2926,16 +2926,77 @@
elf.env)
+%0A output_traj = SimplifyTrajectory(output_traj, robot)
%0A%0A
|
5bda2697254744dc42420751c1b49219f65be380 | add head 'animation' | src/snake.py | src/snake.py | #!/usr/bin/python
from lib_common import *
class Snake:
def __init__(self, x=0, y=0, size=0):
self.position = Vec2(x,y)
self.speed = Vec2(0,0)
self.body_parts = list()
self.body_parts.append(self.position)
self.turning_points = list()
self.turning_points.append(self.position)
for i in xrange(1, s... | Python | 0.003916 | @@ -547,16 +547,427 @@
parts)%0A%0A
+%0A%09def draw(self):%0A%09%09head_symbol = self.get_head_symbol()%0A%09%09draw_cur(self.getX(), self.getY(), head_symbol)%0A%09%09%0A%09%09for piece in self.body_parts%5B1:%5D:%0A%09%09%09draw_cur(piece.x, piece.y, %22=%22)%0A%0A%09def get_head_symbol(self):%0A%09%09speed_x = self... |
075877c728e2db439b53a894fc66dff7d35922ba | Add search in landing | cultures/views.py | cultures/views.py | from django.shortcuts import get_object_or_404
from django.views.generic import(
ListView,
DetailView,
TemplateView
)
from .models import (
Culture,
God,
Temple,
Museum,
CultureHasPeriod,
)
class LandingView(ListView):
template_name = 'prueba.html'
model = Culture
class Adv... | Python | 0.000001 | @@ -41,16 +41,48 @@
or_404%0A%0A
+from django.db.models import Q%0A%0A
from dja
@@ -335,16 +335,588 @@
ulture%0A%0A
+ def get_queryset(self):%0A queryset = self.queryset%0A q = self.request.GET.get('q', None)%0A if q is not None:%0A queryset = Culture.objects.filter(%0A ... |
c5a30d1a3c15c5c35c81c0e561dc2b700d309e13 | Make objgraph optional | src/mcedit2/util/objgraphwidget.py | src/mcedit2/util/objgraphwidget.py | """
objgraphwidget
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import contextlib
import inspect
import os
import tempfile
from PySide import QtGui
import logging
from PySide.QtCore import Qt
from PySide.QtGui import QWidget
import gc
from mcedit2.rendering import rendergra... | Python | 0.000017 | @@ -235,41 +235,8 @@
Qt%0A
-from PySide.QtGui import QWidget%0A
impo
@@ -366,16 +366,25 @@
ame__)%0A%0A
+try:%0A
import o
@@ -390,16 +390,56 @@
objgraph
+%0Aexcept ImportError:%0A objgraph = None
%0A%0Aclass
@@ -453,16 +453,22 @@
hWidget(
+QtGui.
QWidget)
@@ -555,24 +555,250 @@
(*a, **kw)%0A%0A
+ ... |
1d59da17f9b938805a37adcf5eeb39ef2545a9f4 | Store issue label with activity entry | src/sentry/plugins/bases/issue.py | src/sentry/plugins/bases/issue.py | """
sentry.plugins.bases.issue
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django import forms
from django.conf import settings
from django.utils.html import escape
f... | Python | 0 | @@ -6324,32 +6324,111 @@
oup, issue_id),%0A
+ 'label': self.get_issue_label(group=group, issue_id=issue_id),%0A
%7D%0A
|
944ba46e135aea3b58dad63550aeba6cb97bf05e | Set manual episode limit to FUNimation episode feed | src/services/stream/funimation.py | src/services/stream/funimation.py | # All shows: http://www.funimation.com/feeds/ps/shows?limit=100000
# Single show: http://www.funimation.com/feeds/ps/videos?ut=FunimationSubscriptionUser&show_id=7556914
from logging import debug, info, warning, error
from datetime import datetime
from .. import AbstractServiceHandler
from data.models import Episode
... | Python | 0 | @@ -162,16 +162,29 @@
=7556914
+&limit=100000
%0A%0Afrom l
@@ -515,24 +515,37 @@
show_id=%7Bid%7D
+&limit=100000
%22%0A%09_episode_
|
446fe02ce407e3d14c1dddd5e58c7b3f54b2ccf9 | delete functions | src/video.py | src/video.py | #
# video.py
# Created by pira on 2017/07/31.
#
#coding: utf-8
u"""For video processing."""
import numpy as np
import cv2
def showVideo(filename):
pass
def video2image(filename, n=0):
u"""Read mpeg video and divide into jpeg images.
@param filename:video filename
@param n :number of export images (if n... | Python | 0.000006 | @@ -122,40 +122,8 @@
v2%0A%0A
-def showVideo(filename):%0A%09pass%0A%0A
def
@@ -1018,34 +1018,8 @@
nt%0A%0A
-def image2video():%0A%09pass%0A%0A
#fil
|
f43450ac6ecff870693bf3fcb0d638fcf334d492 | Update template file. | src/project_euler/P000_Template.py | src/project_euler/P000_Template.py | # Description: Write Here
"""
Technique
- Write Here
Note
- Write Here
Instrumentation
- System Details: 8x Intel Core i7-3630QM CPU @ 2.40GHz, 16GB RAM, Ubuntu 14.04
- Input Details: Write Here
- Time for 100 runs: Minimum - NA sec, Average - NA sec, Maximum NA sec
- Write Here
"""
def function_name():
pass
# ... | Python | 0 | @@ -20,16 +20,32 @@
e Here%0A%0A
+import logging%0A%0A
%22%22%22%0ATech
@@ -406,16 +406,129 @@
n. %22%22%22%0A%0A
+ # Set logging level from DEBUG, INFO, WARNING. ERROR, CRITICAL%0A logging.basicConfig(level=logging.DEBUG)%0A%0A
resu
|
7c9abfc0e9c0187378c0d2f8be0af87c5dbd145a | Update mapplot.py | src/pyensae/graphhelper/mapplot.py | src/pyensae/graphhelper/mapplot.py | """
@file
@brief Plotting maps.
"""
def plot_map_france(ax=None, scale='50m'):
"""
Creates a map for France using :epkg:`cartopy`.
@param ax existing axes or None to create ones
@param scale scale in (`10m`, `50m`, `110m`)
@return ax
.. plot::
... | Python | 0.000001 | @@ -817,32 +817,34 @@
on3.9.1.%0A
+ #
ax.set_extent(%5B
|
8ae8329b9a143d3dc7d2ca6161ce7c3731997212 | add l2_product to discretization | src/pymor/discretizers/elliptic.py | src/pymor/discretizers/elliptic.py | # This file is part of the pyMor project (http://www.pymor.org).
# Copyright Holders: Felix Albrecht, Rene Milk, Stephan Rave
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
from pymor.analyticalproblems import EllipticPro... | Python | 0.000001 | @@ -454,16 +454,29 @@
tionalP1
+, L2ProductP1
%0Afrom py
@@ -4416,16 +4416,66 @@
product)
+%0A discretization.l2_product = L2ProductP1(grid)
%0A%0A if
|
0d04ec0a0298011740190faf1b110860ef85a668 | Change JVM defaults to use Temurin JDK distribution (#15009) | src/python/pants/jvm/subsystems.py | src/python/pants/jvm/subsystems.py | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from pants.option.option_types import DictOption, StrListOption, StrOption
from pants.option.subsystem import Subsystem
from pants.util.strutil import s... | Python | 0 | @@ -960,37 +960,39 @@
default=%22
-adopt
+temurin
:1.11%22,%0A
@@ -1302,13 +1302,15 @@
lt=%22
-adopt
+temurin
:1.1
|
1ae42227d9df745420c1a3db11893589d91ba83e | Add search and search_auto_paging_iter abstract methods (#873) | stripe/api_resources/abstract/searchable_api_resource.py | stripe/api_resources/abstract/searchable_api_resource.py | from __future__ import absolute_import, division, print_function
from stripe.api_resources.abstract.api_resource import APIResource
class SearchableAPIResource(APIResource):
@classmethod
def _search(
cls,
search_url,
api_key=None,
stripe_version=None,
stripe_account=No... | Python | 0 | @@ -572,8 +572,205 @@
)%0A
+%0A @classmethod%0A def search(cls, *args, **kwargs):%0A raise NotImplementedError%0A%0A @classmethod%0A def search_auto_paging_iter(cls, *args, **kwargs):%0A raise NotImplementedError%0A
|
96a567e8e2d7fe351e90d2b5408f9d1a4cd3a499 | Make sure that tracing is always cleaned up for v8_gc_times page_test | telemetry/telemetry/unittest_util/page_test_test_case.py | telemetry/telemetry/unittest_util/page_test_test_case.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Provide a TestCase base class for PageTest subclasses' unittests."""
import unittest
from telemetry import benchmark
from telemetry.core import exceptio... | Python | 0.000004 | @@ -3311,28 +3311,49 @@
browser.
-StartTracing
+platform.tracing_controller.Start
= FakeS
@@ -3863,34 +3863,28 @@
est.
-TestNotSupportedOnPlatform
+MultiTabTestAppCrash
Erro
|
5f7bf4f2e885c2343b89bc180b7aaad634b3a011 | Remove TestConnectRemote decorator for FreeBSD | test/functionalities/connect_remote/TestConnectRemote.py | test/functionalities/connect_remote/TestConnectRemote.py | """
Test lldb 'process connect' command.
"""
import os
import unittest2
import lldb
import pexpect
from lldbtest import *
class ConnectRemoteTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@expectedFailureFreeBSD('llvm.org/pr18313')
def test_connect_remote(self):
"""Test "process co... | Python | 0.000001 | @@ -207,56 +207,8 @@
_)%0A%0A
- @expectedFailureFreeBSD('llvm.org/pr18313')%0A
|
26398ad93df10949861a0611d3c4f10330553f8b | Fix crash if no instances returned | ssha/menu.py | ssha/menu.py | import collections
import curses
from curses import panel
from . import ec2
Item = collections.namedtuple('Item', field_names=('label', 'value'))
class Menu(object):
def __init__(self, title, items, stdscreen):
self.window = stdscreen.subwin(0, 0)
self.window.timeout(1000)
self.window... | Python | 0.000006 | @@ -5168,24 +5168,61 @@
dth(table):%0A
+ if not table:%0A return %5B%5D%0A%0A
columns_
|
2c967d42f141f744e0d84c552dd66ea8e3d75db1 | fix end timestep for flows | stockflow.py | stockflow.py | import numpy as np
class simulation:
def __init__(self, tstep):
self.stocks = {}
self.flows = {}
self.tstep = tstep
def __getattr__(self,key):
return self.stocks[key] if key in self.stocks else self.flows[key]['vals']
def validate_key(self,key):
if key in self.stocks or key in self.flows:... | Python | 0.000002 | @@ -11,16 +11,35 @@
py as np
+%0Aimport collections
%0A%0Aclass
@@ -113,26 +113,49 @@
elf.flows =
-%7B%7D
+collections.OrderedDict()
%0A self.ts
@@ -1285,28 +1285,167 @@
'%5D%5D%5Bt%5D += flow%5B'vals'%5D%5Bt-1%5D%0A
+%0A for flow in self.flows.itervalues(): # calculate flows at final timestep%0A fl... |
5746233789e87dec900ada1f1d4d1f4f35a50dd0 | fix hardcode forward slashes for file paths | Sound.py | Sound.py | import sublime, sublime_plugin
from subprocess import check_output, call
import threading, random
class EventSound(sublime_plugin.EventListener):
def __init__(self, *args, **kwargs):
super(EventSound, self).__init__(*args, **kwargs)
if sublime.platform() == "osx":
self.play = self.osx_... | Python | 0.000002 | @@ -90,16 +90,20 @@
, random
+, os
%0A%0Aclass
@@ -822,37 +822,67 @@
-call(%5B%22afplay%22, %22%7B0%7D/
+file_path = os.path.join(sublime.packages_path(), %22
Sublime-
@@ -890,66 +890,73 @@
ound
-/
+%22, %22
sounds
-/%7B1%7D.mp3%22.format(sublime.packages_path()
+%22, filename) + %22.mp3%22%0A ca... |
4791a4a97200a62c195931475c1ee3d7bb3731f8 | Add Table to reverb/__init__.py. | reverb/__init__.py | reverb/__init__.py | # Copyright 2019 DeepMind Technologies Limited.
#
# 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 agr... | Python | 0.000157 | @@ -1098,16 +1098,58 @@
rbError%0A
+# TODO(b/157210924): Rename TimeoutError.%0A
from rev
@@ -1178,16 +1178,53 @@
outError
+ # pylint: disable=redefined-builtin
%0A%0Afrom r
@@ -1380,16 +1380,48 @@
t Server
+%0Afrom reverb.server import Table
%0A%0Afrom r
|
f82f41e8c14d665eef6dedc94dfef84054970e9d | modify how we define trusted root basedir | geni/util/trustedroot.py | geni/util/trustedroot.py | import os
from gid import *
class TrustedRootList():
def __init__(self, dir="./trusted_roots"):
self.basedir = dir
# create the directory to hold the files
try:
os.makedirs(self.basedir)
# if the path already exists then pass
except OSError, (errno, strerr):
... | Python | 0 | @@ -21,16 +21,52 @@
import *
+%0Afrom geni.util.config import Config
%0A%0Aclass
@@ -115,28 +115,149 @@
dir=
-%22./trusted_roots%22):%0A
+None):%0A if not dir:%0A config = Config()%0A self.basedir = config.path + os.sep + 'trusted_roots'%0A else:%0A
@@ -279,17 +279,16 @... |
62f40f2121f15421cfcb5aef1cad75bce7208fb1 | Fix bug with HiddenImageCropWidget | image_cropping/widgets.py | image_cropping/widgets.py | import logging
import inspect
import warnings
from django.db.models import get_model, ObjectDoesNotExist
from django import forms
from django.contrib.admin.widgets import AdminFileWidget, ForeignKeyRawIdWidget
from django.conf import settings
from easy_thumbnails.files import get_thumbnailer
logger = logging.getLogg... | Python | 0 | @@ -103,33 +103,8 @@
ist%0A
-from django import forms%0A
from
@@ -1639,27 +1639,13 @@
get(
-forms.HiddenInput,
+Image
Crop
@@ -1957,75 +1957,8 @@
rue%0A
- if value:%0A attrs.update(get_attrs(value, name))%0A
|
dcc9c2cd5cd66797d4d6f5438bcf74089c667f3c | Modify to make category directory | imagenet/image_crawler.py | imagenet/image_crawler.py | import os
import time
import requests
IMAGE_URL_API = 'http://www.image-net.org/api/text/imagenet.synset.geturls?wnid='
OUTPUT_DIR = "images"
MAX_NUM_IMAGES_PER_CATEGORY = 1
def download_image(url, filename):
try:
r = requests.get(url)
except Exception:
return False
if not r.ok:
... | Python | 0 | @@ -15,16 +15,30 @@
rt time%0A
+import random%0A
import r
@@ -45,16 +45,16 @@
equests%0A
-
%0AIMAGE_U
@@ -182,16 +182,19 @@
GORY = 1
+00%0A
%0A%0Adef do
@@ -410,16 +410,133 @@
ntent)%0A%0A
+ # flickr error image%0A if os.path.getsize(filename) == 2051:%0A os.remove(filename)%0A return False%0... |
6168b224249f68170f4c41eaff83e9a9dd379bfb | remove add_bindings method | kaarmebot/dispatcher.py | kaarmebot/dispatcher.py | import collections
Message = collections.namedtuple('Message', ['source', 'target', 'contents'])
class MessageDispatcher:
def __init__(self):
self.routing_classes = {}
def add_binding(self, routing_class, predicate, handler):
rc = self.routing_classes.get(routing_class)
if rc:
... | Python | 0.000001 | @@ -444,120 +444,8 @@
)%5D%0A%0A
- def add_bindings(self, *bindings):%0A for binding in bindings:%0A self.add_binding(*binding)%0A%0A
|
51d435f5815b5e85e09a547b0dab5debb940aad5 | drop damaged data | xbaydns/tools/master/idcview.py | xbaydns/tools/master/idcview.py | #!/usr/bin/env python
# encoding: utf-8
"""
idcview.py
Created by QingFeng on 2008-03-17.
Copyright (c) 2007 xBayDNS Team. All rights reserved.
"""
from decimal import Decimal
from operator import itemgetter
import os, sys, time
from xbaydns.conf import sysconf
def convfiles(files):
agents = []
data = {}
... | Python | 0 | @@ -792,16 +792,37 @@
le_obj:%0A
+ try:%0A
@@ -867,32 +867,77 @@
line.split(',')%0A
+ except:%0A continue%0A
if p
|
ee51286fe1e0b77853d63ffcc9547a753eb78b0d | Reset login_failure var when login OK | t411/t411.py | t411/t411.py | # coding: utf8
from couchpotato.core.helpers.encoding import simplifyString, tryUrlencode
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentProvider
from couchpotato.core.media.movie.providers.base import MovieProvider
from datetime import datetime
import t... | Python | 0.000004 | @@ -3085,16 +3085,56 @@
p = now%0A
+ self.login_failures = 0%0A
|
1069a819043f12ed423ef461aacac479c52adc8d | make self.server an attribute which reads self.network.local | merc/application.py | merc/application.py | import asyncio
import datetime
import logging
import signal
import yaml
import passlib.context
from merc import config
from merc import config_format
from merc import channel
from merc import feature
from merc import protocol
from merc import server
from merc import user
from merc import util
logger = logging.getLo... | Python | 0.000465 | @@ -715,31 +715,8 @@
lf)%0A
- self.server = None%0A
@@ -871,16 +871,78 @@
lers()%0A%0A
+ @property%0A def server(self):%0A return self.network.local%0A
%0A def c
@@ -1917,45 +1917,8 @@
d%22%5D)
-%0A self.server = self.network.local
%0A%0A
|
98f33028451122b39c49a89d367a406dfd641dc0 | use PID class | src/boat_pid_control/src/boat_pid_control/rudderPID.py | src/boat_pid_control/src/boat_pid_control/rudderPID.py | """
PID control for the sailing robot
controling sail position
based on goal sail direction
Inputs:
- current heading
- goal heading
Output:
- Change in motor position/motor position
TODO:
consider tack and jibe
"""
import rospy
PROPORTIONAL_GAIN = 0.1
INTEGRAL_GAIN = 0
DERIVATIVE_GAIN = 0
currentHeading = 23
... | Python | 0.000001 | @@ -227,16 +227,52 @@
t rospy%0A
+from pid_controller_class import PID
%0A%0APROPOR
@@ -327,16 +327,136 @@
AIN = 0%0A
+INTEGRAL_LIMIT = 1%0A%0Acontroller = PID(PROPORTIONAL_GAIN, INTEGRAL_GAIN, DERIVATIVE_GAIN, INTEGRAL_LIMIT, -INTEGRAL_LIMIT)
%0A%0Acurren
@@ -588,16 +588,21 @@
g%0A%0A #
+ TODO
Error c
@@ -67... |
ce51f1c3829ac44e67c51a8fc97577f5f897d9e7 | bump version | require_i18n/__init__.py | require_i18n/__init__.py | # Copyright Collab 2015
# shortcuts
from .util import extract_tower_json
# version information
__version__ = (1, 0, 0, 'b1')
#: For example: `2.0.0`
short_version = '.'.join([str(x) for x in __version__[:3]])
#: For example: `2.0.0a1`
version = '{}{}'.format('.'.join([str(x) for x in __version__[:-1]]),
__versi... | Python | 0 | @@ -116,17 +116,17 @@
0, 0, 'b
-1
+2
')%0A%0A#: F
|
f8f9453569667fba4aabe7aaa1669cbfe9e6eb0a | Add a link to the password change page. | DjangoPlugin/tracdjangoplugin/__init__.py | DjangoPlugin/tracdjangoplugin/__init__.py | from trac.core import Component, implements
from trac.web.chrome import INavigationContributor
from trac.web.api import IRequestFilter, IRequestHandler
from trac.wiki.web_ui import WikiModule
from trac.util import Markup
class CustomWikiModule(WikiModule):
"""Works in combination with the CustomNavigationBar and ... | Python | 0 | @@ -2246,32 +2246,220 @@
ssword?%3C/a%3E')))%0A
+ else:%0A items.append(('metanav', 'change_password',%0A Markup('%3Ca href=%22https://www.djangoproject.com/accounts/password/change/%22%3EChange your password%3C/a%3E'))%0A
items.ap
|
3995a031b919705a721cfcd1362076ddf8ffa797 | Simplify TestingDumpedMockTask | buildlet/tests/test_dumpedmocktask.py | buildlet/tests/test_dumpedmocktask.py | """
Same as test_cachedtask but mock data is dumped in datastore.
This test module serves as functional test for datastore and
basis for parallel runner (such as `multiprocessing`) testing.
"""
from ..datastore.inmemory import (
DataStoreNestableInMemory, DataValuePickledInMemory)
# Avoid importing test case at... | Python | 0.000002 | @@ -448,16 +448,20 @@
def
+pre_
run(self
@@ -475,56 +475,112 @@
-super(TestingDumpedMockTask, self).run()%0A
+# Load mock always at the very first stage.%0A if 'mock' in self.datastore:%0A self.mock =
sel
@@ -618,113 +618,206 @@
k').
-set(self.mock)%0A%0A def load(self):%0A ... |
48e136cea0886fa00bc99d9b380bf3e8db7a25b6 | Move import of resource module | kolibri/utils/system.py | kolibri/utils/system.py | """
Utilities for local system calls, everything here is cross-platform.
become_daemon was originally taken from Django:
https://github.com/django/django/commit/5836a5771f2aefca83349b111f4191d6485af1d5#diff-f7d80be2ccf77f4f009d08dcac4b7736
We might want to refactor this into:
system/__init__.py
system/posix.py
syste... | Python | 0 | @@ -484,24 +484,8 @@
os%0A
-import resource%0A
impo
@@ -5171,24 +5171,45 @@
fd_limit():%0A
+ import resource%0A%0A
fd_soft_
|
4d46001296ad083df6827a9c97333f0f093f31bd | Document new evil magic, and add required var. | example/config.py | example/config.py | # Mnemosyne configuration
# =======================
#
# This file is a Python script. When run, the following variables will be
# defined for you; you may change or add to them as you see fit.
#
# ``entries_dir``: a Maildir containing all the blog entries.
# ``layout_dir``: the blog's layout, as a skeleton directory tr... | Python | 0 | @@ -189,16 +189,18 @@
fit.%0A#%0A#
+ *
%60%60entri
@@ -253,16 +253,18 @@
tries.%0A#
+ *
%60%60layou
@@ -322,16 +322,18 @@
tree.%0A#
+ *
%60%60style
@@ -388,16 +388,18 @@
lates.%0A#
+ *
%60%60outpu
@@ -543,13 +543,17 @@
#%0A#
-%60%60var
+* %60%60local
s%60%60:
@@ -700,573 +700,404 @@
#%0A#
-You may als... |
56506fa23fb6f3f705639cad2a816919ad9a9433 | add district cmp field to rankings | controllers/api/api_district_controller.py | controllers/api/api_district_controller.py | import json
import webapp2
from controllers.api.api_base_controller import ApiBaseController
from consts.district_type import DistrictType
from consts.event_type import EventType
from datetime import datetime
from google.appengine.ext import ndb
from helpers.district_helper import DistrictHelper
from helpers.event_... | Python | 0 | @@ -5288,68 +5288,321 @@
-point_detail%5B%22event_points%22%5D%5Bevent%5B0%5D.key_name%5D = event%5B1%5D %0A
+event_key = event%5B0%5D.key_name%0A point_detail%5B%22event_points%22%5D%5Bevent_key%5D = event%5B1%5D %0A event_details = Event.get_by_id(event_key)%0A point... |
f818b7b8e23bae7d9ceb359ff9a0a3264c8ba69f | Remove unused DATABASE_URL env variable | example_config.py | example_config.py | """
File to easily switch between configurations between production and
development, etc.
"""
import os
# You must set each of these in your heroku environment with the heroku
# config:set command. See README.md for more information.
HEROKU_ENV_REQUIREMENTS = ('HEROKU', 'SECRET_KEY', 'GITHUB_CLIENT_ID',
... | Python | 0.000001 | @@ -348,51 +348,8 @@
ET',
- 'DATABASE_URL',%0A
'RE
|
549190dc81bd4e666a8ca52eed8726a5717a8dde | fix syntax error | migrate/__init__.py | migrate/__init__.py | # -*- coding: utf-8 -*-
from .migration import Migration
from importlib import import_module
import os
class Migrator(object):
def __init__(self, count, runner_path, migrations_dir, direction, *args, **kwargs):
self.count = count
self.migrations_dir = migrations_dir
self.direction = directi... | Python | 0.000047 | @@ -1715,34 +1715,59 @@
)%0A el
-se
+if self.direction == 'down'
:%0A
|
68b6444eed6f3a748aa3a0126c20a52a5d56e6f9 | Comment added for missing code. | app/notifications/rest.py | app/notifications/rest.py | import uuid
from flask import (
Blueprint,
jsonify,
request
)
from app import (notify_alpha_client, api_user)
from app.aws_sqs import add_notification_to_queue
from app.dao import (templates_dao)
from app.schemas import (
email_notification_schema, sms_template_notification_schema)
notifications = Bl... | Python | 0 | @@ -955,33 +955,33 @@
jsonify(%7B%7D), 20
-0
+4
%0A%0A%0A@notification
@@ -1363,25 +1363,25 @@
nify(%7B%7D), 20
-0
+4
%0A%0A%0A@notifica
@@ -2293,14 +2293,14 @@
nify(%7B%7D), 20
-0
+4
%0A
|
a12e907f5548b1b571b547c1e9e059b0bcd36242 | Fix datetime when a benchmark is the only datum in a bar. | zipline/gens/tradesimulation.py | zipline/gens/tradesimulation.py | #
# Copyright 2013 Quantopian, 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 to in wr... | Python | 0 | @@ -4427,16 +4427,77 @@
CHMARK:%0A
+ self.algo.set_datetime(event.dt)%0A
|
99821667acf52b9348ff6b4d45476ae801034bef | Fix issues with non-str Lua arguments. | mockredis/script.py | mockredis/script.py | import sys
import threading
from mockredis.exceptions import ResponseError
LuaLock = threading.Lock()
class Script(object):
"""
An executable Lua script object returned by ``MockRedis.register_script``.
"""
def __init__(self, registered_client, script, load_dependencies=True):
self.registere... | Python | 0 | @@ -827,26 +827,70 @@
ute_lua(
+%5Bstr(key) for key in
keys
+%5D
,
+ %5Bstr(arg) for arg in
args
+%5D
, client
|
65e3dcb5f085a0c70c5ad4cc607e561b95b07a49 | Replace a verbose patch call with a function that does the same thing | corehq/apps/users/tests/test_middleware.py | corehq/apps/users/tests/test_middleware.py | from __future__ import absolute_import
from django.test import TestCase
from django.contrib.auth import get_user_model
from django.test.client import Client
from django_otp.middleware import OTPMiddleware
from corehq.util.test_utils import flag_enabled
from corehq.apps.users.models import CouchUser
from corehq.apps.use... | Python | 0.000178 | @@ -2271,364 +2271,91 @@
-with mock.patch('corehq.apps.users.models.CouchUser.two_factor_disabled',%0A new_callable=mock.PropertyMock,%0A return_value=False):%0A response = Enforce2FAMiddleware().process_view(request, %22test_view_func%22,%0A ... |
cf61408831d6c0a184076b2a0cbc3050c14aa241 | Fix tar content type check (#1398) | insights/core/archives.py | insights/core/archives.py | #!/usr/bin/env python
import logging
import os
import tempfile
from contextlib import contextmanager
from insights.util import content_type, fs, subproc
from insights.util.content_type import from_file
logger = logging.getLogger(__name__)
COMPRESSION_TYPES = ("zip", "tar", "gz", "bz2", "xz")
class InvalidArchive(... | Python | 0 | @@ -124,22 +124,8 @@
port
- content_type,
fs,
@@ -133,17 +133,16 @@
subproc%0A
-%0A
from ins
@@ -181,16 +181,43 @@
rom_file
+ as content_type_from_file%0A
%0Alogger
@@ -1552,121 +1552,122 @@
ef _
+t
ar
-chive_type(self, _input):%0A _type = content_type.from_file(_input)%0A if _type not in self.T... |
b480426bdc7f5a59523cc9e6250efedd311d0854 | fix other minor remark | lib/vsc/utils/testing.py | lib/vsc/utils/testing.py | #!/usr/bin/env python
##
#
# Copyright 2014-2014 Ghent University
#
# This file is part of vsc-base,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the H... | Python | 0.003494 | @@ -2387,16 +2387,54 @@
tr(err)%0A
+ regex = re.compile(regex)%0A
@@ -2459,16 +2459,19 @@
e(re
+gex
.search(
rege
@@ -2466,23 +2466,16 @@
.search(
-regex,
msg), %22P
@@ -2512,16 +2512,24 @@
%25 (regex
+.pattern
, msg))%0A
|
5c86a27f3ff324a8a7f74e161eeff4bda62fe0ab | add asynchronous dump | integration_tests/dump.py | integration_tests/dump.py | import os.path
import sys
import base64
from app import Application
def dump(request):
body = request.body
if body is not None:
body = base64.b64encode(body).decode('ascii')
result = {
"method": request.method,
"path": request.path,
"query_string": request.query_string,
... | Python | 0.000001 | @@ -33,16 +33,31 @@
base64%0A
+import asyncio%0A
%0A%0Afrom a
@@ -476,16 +476,149 @@
esult)%0A%0A
+%0Aasync def adump(request):%0A sleep = int(request.query.get('sleep', 0))%0A await asyncio.sleep(sleep)%0A%0A return dump(request)%0A%0A%0A
app = Ap
@@ -688,16 +688,55 @@
, dump)%0A
+r.add_route('/adump/%7... |
31c4cdf59c502cddd7770501a68457c7e9166216 | fix checksums of 2.2.0.1 and 2.2.1.1 (#24264) | var/spack/repos/builtin/packages/py-pyprecice/package.py | var/spack/repos/builtin/packages/py-pyprecice/package.py | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPyprecice(PythonPackage):
"""
This package provides python language bindings for the... | Python | 0.000002 | @@ -724,72 +724,72 @@
56='
-481715c9e90660d3d97e63ee590a3b74a17564cd5cac3bfceceb59788fd11b14
+d96674f1ff91761c29efce34f8e09e2ec29a4862227b7204439e865dbe755a86
')%0A
@@ -920,72 +920,72 @@
56='
-032fa58193cfa69e3be37557977056e8f507d89b40c490a351d17271269b25ad
+229625e2e6df03987ababce5abe2021b0974cbe5a588b936a9cba653f... |
de0c0edafb3e3a128c8ad54e9841c7a188cba328 | Format output (#85) | modules/src/time.py | modules/src/time.py | import requests
import config
import os
from templates.text import TextTemplate
from datetime import datetime
MAPQUEST_CONSUMER_KEY = os.environ.get('MAPQUEST_CONSUMER_KEY', config.MAPQUEST_CONSUMER_KEY)
TIME_ZONE_DB_API_KEY = os.environ.get('TIME_ZONE_DB_API_KEY', config.TIME_ZONE_DB_API_KEY)
def process(input, enti... | Python | 0.000877 | @@ -833,15 +833,18 @@
e('%25
-Y-%25m-%25d
+a %25b %25d %25Y
%25H:
|
38ba5ddbadd02df7d3781526350eb5b060f702fb | remove one of the two softmask items in the doc | librosa/util/__init__.py | librosa/util/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Utilities
=========
Array operations
----------------
.. autosummary::
:toctree: generated/
frame
pad_center
fix_length
fix_frames
index_to_slice
softmask
sync
softmask
axis_sort
normalize
roll_sparse
sparsify_rows
... | Python | 0 | @@ -236,29 +236,16 @@
sync
-%0A softmask
%0A%0A ax
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.