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 |
|---|---|---|---|---|---|---|---|
e7ca0b6bb748a15e3ae0943fcd008f2ab3c54567 | Change migrations remove field | blanc_events/migrations/0001_initial.py | blanc_events/migrations/0001_initial.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import blanc_basic_assets.fields
class Migration(migrations.Migration):
dependencies = [
('assets', '0001_initial'),
('glitter', '0001_initial'),
]
operations = [
migrations.... | Python | 0.000001 | @@ -1579,104 +1579,8 @@
)),%0A
- ('final_date', models.DateTimeField(null=True, editable=False, db_index=True)),%0A
|
edf45b30b8314ab19ce32a4127481a968e3a7a79 | Add debug | poloniex/api/sync.py | poloniex/api/sync.py | from datetime import datetime
from datetime import timedelta
import requests
from poloniex.api.base import command_operator, BasePublicApi, BaseTradingApi
__author__ = 'andrew.shvv@gmail.com'
class PublicApi(BasePublicApi):
url = "https://poloniex.com/public?"
def api_call(self, *args, **kwargs):
... | Python | 0.000003 | @@ -2583,32 +2583,49 @@
args, **kwargs)%0A
+ try:%0A
return r
@@ -2630,32 +2630,180 @@
response.json()
+%0A except Exception as e:%0A print(e)%0A print(response.status_code)%0A print(response.content)%0A raise e
%0A%0A @command_o
|
c455c68661af2e14cdfa44bbd2fbde81dd065c8e | improve multidownload header | multidownload.py | multidownload.py | #!/usr/bin/python
"""
Script to download Palomar Transient Factory light curves for a list of targets
for visualization with PTFViewer: https://github.com/keatonb/PTFViewer
input csv file should have format:
targetname,rad,decd
where rad and decd are the RA and Dec in decimal degrees.
WARNING: Downloads data for near... | Python | 0 | @@ -679,20 +679,21 @@
hon
-PTF_
+multi
download
list
@@ -688,20 +688,16 @@
download
-list
input_f
|
149c14291562792f1eb36087b3de977a37701cee | Fix small logic error where directories weren't being checked properly. | mvmv/mvmv-cli.py | mvmv/mvmv-cli.py | #!/usr/bin/env python
from os import path
import sys
import sqlite3
import random
import argparse
import re
import urllib.request
import gzip
import mvmv
import mvmvd
import parse
class DownloadDB(argparse.Action):
def __init__(self, option_strings, dest, nargs=None, **kwargs):
super(DownloadDB, self).__i... | Python | 0 | @@ -4614,28 +4614,30 @@
r d in args.
-file
+srcdir
s if path.is
@@ -4640,32 +4640,17 @@
h.isdir(
-f, args.excludes
+d
)%5D%0A%0A
|
e424a285eb7d326bae8b2a7948778c323d0c29e2 | Add BondViewSet | bond_analytics_project/bondapi/views.py | bond_analytics_project/bondapi/views.py | from django.shortcuts import render
# Create your views here.
| Python | 0 | @@ -33,31 +33,224 @@
der%0A
-%0A# Create your views here.
+from rest_framework.viewsets import ModelViewSet%0A%0Afrom models import Bond%0Afrom serializers import BondSerializer%0A%0A%0Aclass BondViewSet(ModelViewSet):%0A serializer_class = BondSerializer%0A queryset = Bond.objects.all()
%0A
|
ec71948a3f1789d374b6f477ff50ad3ae3405285 | Make string check python 2 and 3 compatible. | post_office/admin.py | post_office/admin.py | from django.contrib import admin
from django.forms.widgets import TextInput
from django.utils.text import Truncator
from .fields import CommaSeparatedEmailField
from .models import Email, Log, EmailTemplate, STATUS
def get_message_preview(instance):
return (u'{0}...'.format(instance.message[:25]) if len(instance... | Python | 0.000036 | @@ -108,16 +108,45 @@
runcator
+%0Afrom six import string_types
%0A%0Afrom .
@@ -875,18 +875,20 @@
ue,
-base
string
+_types
):%0A
|
7ef0bc5a84223bc3eea9dc23ded4a044e708a8b3 | fix bug: loop | spider/mydm/pipelines/content.py | spider/mydm/pipelines/content.py | # -*- coding: utf-8 -*-
import logging
import re
from lxml.html import fromstring, HTMLParser, defs
from lxml.html.clean import Cleaner
from lxml.etree import XPathEvalError
logger = logging.getLogger(__name__)
class ContentPipeline(object):
DEFAULT_ALLOW_CLASSES_NAME = 'allow_classes'
DEFAULT_REMOVED_CL... | Python | 0.000122 | @@ -4503,16 +4503,64 @@
break
+%0A else:%0A break
%0A%0A
|
40c16f7acbbbe68e7a038b6eebb81a84bdc7b729 | Relocate pipelines. | logshipper/cmd.py | logshipper/cmd.py | # Copyright 2014 Koert van der Veer
# All Rights Reserved.
#
# 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 requir... | Python | 0 | @@ -968,18 +968,8 @@
per/
-pipelines/
%22,%0A
|
c159f9986dfd45a864561cb1ff7936e6b4a272de | bump version 2.0.3 | predicthq/version.py | predicthq/version.py | __version__ = "2.0.2"
| Python | 0.000001 | @@ -12,11 +12,11 @@
= %222.0.
-2
+3
%22%0A
|
c8fcc0aa50555ff81d3d8ba6339c016e884ff54e | Use tuples instead of lists for autogen contrasts | lyman/frontend.py | lyman/frontend.py | """Forward facing lyman tools with information about ecosystem."""
import os
import re
import sys
import imp
import os.path as op
import numpy as np
def gather_project_info():
"""Import project information based on environment settings."""
lyman_dir = os.environ["LYMAN_DIR"]
proj_file = op.join(lyman_dir... | Python | 0 | @@ -2487,17 +2487,17 @@
cs = %5B
-%5B
+(
name, %5Bn
@@ -2505,17 +2505,17 @@
me%5D, %5B1%5D
-%5D
+)
for nam
|
812d1faaecf17169649417186fbe84dc937a4c4d | fix root fs display color | preferences_color.py | preferences_color.py | import backend
from colors import colors
# convenience functions
def get_unique_tag_value(graph, target, tag):
'''
get a tag corresponding to a target, if it's clear the target "owns" the tag.
this makes sure, if you're looking at cpu graphs with group by server,
each cpu type (user, idle, etc) has ... | Python | 0 | @@ -2765,17 +2765,16 @@
'
-_
root': c
|
dd802539bbec61ae16ef8a3848bf5bd32ea84908 | fix tests | corehq/apps/dump_reload/couch/dump.py | corehq/apps/dump_reload/couch/dump.py | from __future__ import absolute_import
from __future__ import unicode_literals
import itertools
import json
from collections import Counter
from couchdbkit import ResourceNotFound
from corehq.apps.dump_reload.couch.id_providers import DocTypeIDProvider, ViewIDProvider, UserIDProvider, \
SyncLogIDProvider, DomainK... | Python | 0.000001 | @@ -2916,24 +2916,25 @@
tream.write(
+b
'%5Cn')%0A
@@ -3544,32 +3544,33 @@
ut_stream.write(
+b
'%5Cn')%0A%0A s
|
0a11f6dc48d2ac28e540cf75cfc1957abd41ada8 | apply filters | corehq/apps/smsbillables/interface.py | corehq/apps/smsbillables/interface.py | from corehq.apps.accounting.dispatcher import (
AccountingAdminInterfaceDispatcher
)
from corehq.apps.accounting.filters import DateCreatedFilter
from corehq.apps.reports.datatables import (
DataTablesColumn,
DataTablesHeader,
)
from corehq.apps.reports.generic import GenericTabularReport
from corehq.apps.s... | Python | 0.000001 | @@ -5290,87 +5290,896 @@
ects
-%0A selected_criteria = selected_criteria.filter() # TODO - apply filters
+.filter()%0A gateway_type = GatewayTypeFilter.get_value(self.request, self.domain)%0A if gateway_type:%0A selected_criteria = selected_criteria.filter(%0A backend_ap... |
d12a832cda60fb5f42014a22e2c29641f6afa498 | Use more readable non-operator version of set union | byceps/services/shop/article/service.py | byceps/services/shop/article/service.py | """
byceps.services.shop.article.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from datetime import datetime
from decimal import Decimal
from typing import Dict, Optional, Sequence, Set
from flask_sqlalchemy import Paginat... | Python | 0.000001 | @@ -6949,11 +6949,15 @@
cle%7D
- %7C
+.union(
atta
@@ -6969,16 +6969,17 @@
articles
+)
%0A%0A un
|
d41642f6d03fc624bd7359aaed3ded735f8541e4 | Fix #17 TOCTOU issue when extracting files. | client/bush/api.py | client/bush/api.py | import os
import cgi
import json
import tarfile
import tempfile
import urllib.parse
import requests
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
INFO = 0
LOW = 1
MODERATE = 2
HIGH = 3
EXTREME = 4
class BushAPI():
def __init__(self, base, token=None):
self.base = base
... | Python | 0 | @@ -1260,36 +1260,10 @@
-ok = True%0A%0A if ok and
+if
fde
@@ -1318,36 +1318,38 @@
p):%0A
-ok =
+if not
self.confirmati
@@ -1351,33 +1351,16 @@
rmation(
-%0A
%22Attempt
@@ -1379,16 +1379,56 @@
to %25r,
+%22%0A %22
outside
@@ -1457,... |
e2d55d86e4b33aea02d7abec4b8fb278e4203b9d | Move call to filter_exit out of command execution block to prevent setting 'changed' on a command list that is completely filtered (empty). | lib/ansible/modules/network/eos/eos_template.py | lib/ansible/modules/network/eos/eos_template.py | #!/usr/bin/python
#
# 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 later version.
#
# Ansible is distribut... | Python | 0 | @@ -6449,29 +6449,8 @@
')%0A%0A
- if commands:%0A
@@ -6482,16 +6482,33 @@
mmands)%0A
+ if commands:%0A
|
f184a6a1bce617d16546f4612713a5627669fa4c | Fix Feedretriver plugin after bot encoding changes | plugins/feedretriever/feedretriever.py | plugins/feedretriever/feedretriever.py | import json
import sys
import feedparser
from twisted.python import log
import plugin
from utils import str_utils
FAIL_MESSAGE = ("Unable to download or parse feed. Remove unused feeds using "
"the !listfeed and !removefeed commands.")
HELP_MESSAGE = ("!addfeed url [fetch time [custom title]] where... | Python | 0 | @@ -672,16 +672,17 @@
SSAGE =
+u
%22Removin
@@ -719,16 +719,17 @@
SSAGE =
+u
%22#%7B%7D: %7B%7D
|
65c62108e257c6e82ed6ff24ea9884cee900c1c6 | read users from a csv file | rfid_test.py | rfid_test.py | from keyboard_alike import reader
import datetime
from phant import Phant
tags = {'0009909662' : 'Philip Smith',
'0004406858' : 'Joshua Smith',
'0009909876' : 'Abigail Smith',
'0004304910' : 'Dad'}
p = Phant('yAYZ9aJ98Kiyz4XNm5NW', 'location', 'id', 'name', 'time', private_key='4Wqom46m9niK2k8p... | Python | 0 | @@ -202,23 +202,33 @@
'000
-4304910' : 'Dad
+3567797' : 'Linda Whipker
'%7D%0Ap
@@ -358,84 +358,180 @@
g):%0A
- try:%0A return tags%5Bcard%5D%0A except:%0A return 'Unknown: ' + idString
+%09with open('/home/pi/rfid/web/users.txt', 'r') as file:%0A%09%09for line in file:%0A%09%09%09row = line.split(', ');... |
f76bcb329f3a5c5fa99b0994f5fe7ff0b905744f | fix put json | mailjet/client.py | mailjet/client.py | #!/usr/bin/env python
# coding=utf-8
import json
import logging
import requests
from requests.compat import urljoin
requests.packages.urllib3.disable_warnings()
class Config(object):
API_URL = 'https://api.mailjet.com/v3/'
API_DOC = 'http://dev.mailjet.com/email-api/v3/'
def __getitem__(self, key):
... | Python | 0.000001 | @@ -1976,32 +1976,122 @@
one, **kwargs):%0A
+ if self.headers%5B'Content-type'%5D == 'application/json':%0A%09%09%09data = json.dumps(data)%0A
return a
@@ -3494,64 +3494,8 @@
lse)
-%0A%0A # return parse_response(response, debug=debug)
%0A
|
03b230b067d0af3cc02e6bb5f02c0071e06c549f | Use set_uri rather than exec for rewrites | nbserve/nginx.py | nbserve/nginx.py | #!/usr/bin/python
import os
CONFIG = """
# Let nginx automatically determine the number of worker processes
# to run. This defaults to number of cores on the host.
worker_processes auto;
# Do not daemonize - we'll either run this under a supervisor
# ourselves, or jupyterhub will manage the process, restarting
# it ... | Python | 0 | @@ -3087,16 +3087,195 @@
ublic %7B%0A
+ index index.html index.ipynb Index.ipynb;%0A fancyindex on;%0A%0A alias /data/project/paws/userhomes;%0A %7D%0A%0A location /paws-public/User: %7B%0A
@@ -4544,23 +4544,23 @@
-return ngx.exec
+ngx.req.set_uri
(%22/p
... |
18cd40db2dd18deb9db529ff7c28fc5e2d095658 | Add strict mode to schema | nbtlib/schema.py | nbtlib/schema.py |
"""This module defines tools for creating tag schemas.
Exported items:
schema -- Helper function to define compound schemas
CompoundSchema -- `Compound` subclass that enforces a tag schema
"""
__all__ = ['schema', 'CompoundSchema']
from itertools import chain
from .tag import Compou... | Python | 0.000004 | @@ -341,16 +341,33 @@
ame, dct
+, *, strict=False
):%0D%0A
@@ -714,16 +714,170 @@
chemas.%0D
+%0A%0D%0A If the %60strict%60 keyword only argument is set to True, interacting%0D%0A with keys that are not defined in the schema will raise a%0D%0A %60TypeError%60.%0D
%0A %22%22%22
@@ -950,16 +950,77 @@
... |
3e66d926499b91d13c84d155c2ed30a603a2b1b3 | fix for iodp_samples_magic | programs/__init__.py | programs/__init__.py | import sys
from os import path
command = path.split(sys.argv[0])[-1]
from program_envs import prog_env
mpl_env = prog_env.get(command[:-3])
import matplotlib
if mpl_env:
matplotlib.use(mpl_env)
else:
matplotlib.use("TKAgg")
import generic_magic
import sio_magic
import cit_magic
import _2g_bin_magic
import hu... | Python | 0.000001 | @@ -1,16 +1,40 @@
+#!/usr/bin/env pythonw%0A%0A
import sys%0Afrom
@@ -427,24 +427,50 @@
_dscr_magic%0A
+import iodp_samples_magic%0A
import pmd_m
@@ -771,10 +771,41 @@
gc_magic
+,%0A iodp_samples_magic
%5D%0A
|
b8ed116b160bf5532c9c57302a192ae868fa8f23 | Replace cells table with JSON in photos field. | manage_dataset.py | manage_dataset.py | #!/bin/python
from __future__ import print_function, division
import argparse
import hashlib
import os
import os.path
import string
import sqlite3
# *_truth: true if it's confirmed by human
# state: {"empty", "up", "down"}
# type: {"empty", "FU", ..., "OU"}
schema_photos = """
CREATE TABLE photos(
id integer prima... | Python | 0 | @@ -252,16 +252,125 @@
, %22OU%22%7D%0A
+#%0A# corners, config: JSON%0A#%0A# corners: 4 2D points as %5B%5Bdouble%5D%5D%0A# config: %7B'xy': %7Bstate: state, type: type%7D%0A
schema_p
@@ -524,180 +524,33 @@
bool
-);%0A%22%22%22%0A%0Aschema_cells = %22%22%22%0ACREATE TABLE cells(%0A id integer primary key,%0A p... |
90910ef1d596737d17f212b019206f7526b82d11 | remove print in test ouput helper | src/tests/test_helper/output_handler_file.py | src/tests/test_helper/output_handler_file.py | # -*- coding: utf-8 -*-
"""output file handler for files"""
import sys
from plasoscaffolder.common import base_file_handler
from plasoscaffolder.common import base_output_handler
class OutputHandlerFile(base_output_handler.BaseOutputHandler):
"""Class representing the output handler for a file."""
def __init__... | Python | 0.000042 | @@ -1489,32 +1489,16 @@
, text)%0A
- print(text)%0A
retu
@@ -1511,32 +1511,32 @@
f.__prompt_info%0A
+
%0A def PromptInf
@@ -1952,32 +1952,16 @@
, text)%0A
- print(text)%0A
retu
@@ -2249,32 +2249,16 @@
, text)%0A
- print(text)%0A
retu
@@ -2447,32 +2447,16 @@
%22%22%22%0A
- print(tex... |
df9d927f0da9a6d3591e08219ebeaf8f0a274376 | add feature for whether token contains at least one number #11 | usaddress/__init__.py | usaddress/__init__.py | import os
import string
import pycrfsuite
import re
TAGGER = pycrfsuite.Tagger()
TAGGER.open(os.path.split(os.path.abspath(__file__))[0]
+ '/usaddr.crfsuite')
def parse(address_string) :
re_tokens = re.compile(r"""
\b[^\s]+(?=\b) # 'F-H ' -> ['F-H']
|
[^\w\s](?=\s) # [', '] -> [... | Python | 0.000109 | @@ -784,21 +784,25 @@
token.is
+all
digit
+s
' : toke
@@ -806,32 +806,107 @@
oken.isdigit(),%0A
+ 'token.hasadigit' : any(char.isdigit() for char in token),%0A
|
eaf51e8054d5b3848fc30d3e132bcbb19866db65 | add more robust auth plugin | web/auth.py | web/auth.py | import base64
import web
class AuthMixIn:
scheme = 'None'
def authorized(self, auth):
return True
def authenticate(self):
auth_headers = web.HTTPHeaders()
auth_headers.set('WWW-Authenticate', self.scheme)
raise web.HTTPError(401, headers=auth_headers)
def respond(se... | Python | 0 | @@ -35,125 +35,292 @@
Auth
-MixIn:%0A scheme = 'None'%0A%0A def authorized(self, auth):%0A return True%0A%0A def authenticate(self):%0A
+Error(web.HTTPError):%0A def __init__(self, scheme, realm, code=401, message=None, headers=None, status_message=None):%0A super.__init__(code, message, head... |
250ea77fdc162f88028ac7c21749a765f04b617f | Set clustering random seed | cref/structure/clustering/__init__.py | cref/structure/clustering/__init__.py | import logging
from sklearn.cluster import KMeans
from sklearn.preprocessing import OneHotEncoder
from sklearn import preprocessing
import matplotlib.pyplot as plt
from pylab import cm
from scipy import sparse
import numpy as np
from cref.structure.clustering import selectors
from cref.structure.plot import ramach... | Python | 0.00001 | @@ -2701,24 +2701,40 @@
s=n_clusters
+, random_state=1
)%0A model.
|
e860f1adfcae859fcfbb56dd6cf2c90dcac8d968 | Fix resolution size | csunplugged/at_a_distance/settings.py | csunplugged/at_a_distance/settings.py | """Settings for the at a distance application."""
AT_A_DISTANCE_INTRODUCTION_FILENAME = 'introduction.md'
AT_A_DISTANCE_SLIDES_TEMPLATE_BASE_PATH = 'at_a_distance/lesson-slides'
AT_A_DISTANCE_SLIDE_RESOLUTION_HEIGHT = "1080"
AT_A_DISTANCE_SLIDE_RESOLUTION_WIDTH = "1920"
# Settings computed from above settings
AT_A_D... | Python | 0.000003 | @@ -374,22 +374,21 @@
OLUTION_
-HEIGHT
+WIDTH
%7Dx%7BAT_A_
@@ -413,16 +413,17 @@
OLUTION_
-WIDTH
+HEIGHT
%7D'%0A
|
411ff826c62d00c9d527f53842ef084731a2ddf9 | Fix how to construct the torrent file names | ftorrents.py | ftorrents.py | #!/usr/bin/python
import urllib2
from StringIO import StringIO
import gzip
import pickle
import pynotify
import feedparser
import distutils
import gtk
import os
import logging
import yaml
#Credenciales showrss
#ftorrents
#ftorrents
logger = logging.getLogger("ftorrents")
hand = logging.FileHandler("/tmp/ftorrents.log... | Python | 0.87275 | @@ -3949,32 +3949,45 @@
with open(
+os.path.join(
self.conf.downlo
@@ -3992,17 +3992,17 @@
load_dir
-+
+,
episode.
@@ -4017,16 +4017,17 @@
torrent%22
+)
,'w') as
|
e3aeb7522235ed740cf060f787a760053fb41bb9 | fix linting error | plugins/ldap/plugin_tests/ldap_test.py | plugins/ldap/plugin_tests/ldap_test.py | # -*- coding: utf-8 -*-
import unittest.mock
import ldap
from girder.exceptions import ValidationException
from girder.models.setting import Setting
from girder.models.user import User
from tests import base
from girder_ldap.settings import PluginSettings
def setUpModule():
base.enabledPlugins.append('ldap')
... | Python | 0.000005 | @@ -6007,16 +6007,17 @@
= None%0A
+%0A
|
dd5c4318a83c7bdab8a4ac4f0138d3da22eef191 | test for ga_context decorator | springboard/tests/test_events.py | springboard/tests/test_events.py | from datetime import datetime
import mock
from springboard.tests.base import SpringboardTestCase
class TestEvents(SpringboardTestCase):
def setUp(self):
self.workspace = self.mk_workspace()
self.app = self.mk_app(self.workspace, settings={
'ga.profile_id': 'UA-some-id',
})
... | Python | 0.000001 | @@ -316,117 +316,22 @@
%7D)%0A
-%0A
-@mock.patch('unicore.google.tasks.pageview.delay')%0A def test_ga_pageviews(self, mock_task):%0A
%5B
+self.
cate
@@ -391,16 +391,21 @@
%5B
+self.
page%5D =
@@ -474,16 +474,21 @@
+
+
primary_
@@ -496,16 +496,21 @@
ategory=
+self.
categ... |
44b84e2a082eab34aaac97ffa5ecfc449db7e3c7 | update secondary latency collector | cbagent/collectors/secondary_latency.py | cbagent/collectors/secondary_latency.py | from cbagent.collectors import Collector
import os.path
class SecondaryLatencyStats(Collector):
COLLECTOR = "secondaryscan_latency"
def _get_secondaryscan_latency(self):
stats = {}
if os.path.isfile(self.secondary_statsfile):
with open(self.secondary_statsfile, 'rb') as fh:
... | Python | 0 | @@ -374,17 +374,17 @@
h.seek(-
-2
+4
00, 2)%0A
@@ -527,14 +527,18 @@
-stats%5B
+latency =
dura
@@ -557,14 +557,76 @@
:')%5B
-0%5D%5D =
+1%5D%0A latency = latency.rstrip()%0A stats%5B
dura
@@ -633,34 +633,45 @@
tion.split(':')%5B
-1%5D
+0%5D%5D = latency
%0A return
|
c5689d081279ed9ffe1b53e2148b307367638c3e | Explicit test == True | cyhdfs3/tests/test_file_operations.py | cyhdfs3/tests/test_file_operations.py | import posixpath
from utils import *
def test_create_dir_remove_exists(hdfs, request):
testname = request.node.name
fname = posixpath.join(TEST_DIR, testname)
assert hdfs.exists(fname) == False
assert hdfs.create_dir(fname)
assert hdfs.exists(fname)
assert hdfs.delete(fname)
assert hdf... | Python | 0.99999 | @@ -229,32 +229,40 @@
reate_dir(fname)
+ == True
%0A assert hdfs
@@ -267,32 +267,40 @@
fs.exists(fname)
+ == True
%0A%0A assert hdf
@@ -310,24 +310,32 @@
elete(fname)
+ == True
%0A assert
|
4bff7a161fb5de20efef0f514c3bdf42cd37f857 | Fix error with starting server as a non-daemon | mcserver/start.py | mcserver/start.py | """
Utlities for starting the server
"""
import daemon
import lockfile.pidlockfile
import os
import os.path
import subprocess
from mcserver import base, reflection
def start_server(path, is_daemon = False, uid = None, gid = None):
"""
Start the server. Optionally start it as a daemon.
"""
base._validate_server_... | Python | 0.000009 | @@ -1394,16 +1394,174 @@
%0A%09else:%0A
+%09%09command = base._build_command(jvm, max_heap, max_stack, perm_gen, jar, extra_args)%0A%09%09base.LOGGER.debug('Starting server with command %7B0%7D'.format(command))%0A%0A
%09%09proces
|
deca2df30576b59450ac00a9800042d7cb97d6a9 | update capture/color workarounds | run-tests.py | run-tests.py | #!/usr/bin/env python
# run-tests.py
import sys
import platform
import pytest
ARGS = [
#'--exitfirst',
#'--pdb',
]
if 'idlelib' in sys.modules:
ARGS.append('--color=no')
if platform.system().lower() == 'windows':
ARGS.append('--capture=sys')
pytest.main(ARGS + sys.argv[1:])
| Python | 0 | @@ -45,24 +45,8 @@
sys
-%0Aimport platform
%0A%0Aim
@@ -116,16 +116,43 @@
idlelib'
+ in sys.modules or 'thonny'
in sys.
@@ -165,31 +165,49 @@
s:%0A ARGS.
-app
+ext
end(
+%5B'--capture=sys',
'--color=no'
@@ -210,52 +210,81 @@
=no'
+%5D
)%0A
-%0Aif platform.system().lower() == 'windows'
+elif sys.version_i... |
d46c0ea86c29a6c832f0bc92bc58b2b8f6ca0335 | Add some logging in notifier module | client/notifier.py | client/notifier.py | # -*- coding: utf-8-*-
import Queue
from modules import Gmail
from apscheduler.scheduler import Scheduler
import logging
logging.basicConfig()
class Notifier(object):
class NotificationClient(object):
def __init__(self, gather, timestamp):
self.gather = gather
self.timestamp = ti... | Python | 0 | @@ -432,24 +432,75 @@
, profile):%0A
+ self._logger = logging.getLogger(__name__)%0A
self
@@ -744,16 +744,150 @@
, None))
+%0A else:%0A self._logger.warning('gmail_address or gmail_password not set in profile, Gmail notifier will not be used')
%0A%0A
|
306d6808179bb3b8c7d1619291447502000f0947 | Standardize variable names on outermost app | py/app.py | py/app.py | import json
import functools
from flask import Flask, Response, request
from foxgami.red import Story
from foxgami.user import User, Session
app = Flask(__name__)
@app.after_request
def add_content_headers(response):
response.headers['Access-Control-Allow-Origin'] = '*'
return response
def return_as_json(in... | Python | 0.000006 | @@ -970,23 +970,23 @@
if
-u
se
-r_id
+ssion
:%0A
@@ -1184,19 +1184,16 @@
user
-_id
= User.
@@ -1347,25 +1347,12 @@
son(
-User.get(user_id)
+user
, wi
@@ -1491,21 +1491,16 @@
user
-_info
= User.
@@ -1599,32 +1599,32 @@
ord'%5D%0A )%0A
+
return User.
@@ -1639,21 +1639,16 @@
so... |
d81251f4b57e5f5db43f265b245a49c5c0046c18 | no pronouns | weighter.py | weighter.py | #!/usr/bin/python
def make_weighted_corpus(testmode = False):
"""
make newest weighted corpus
workflow:
1. iterate over dev_test/train
2. get function/lemma/token info
3. determine proper weighting from:
a) previous weighting
b) success of previous model
4. duplicate tokens ... | Python | 0.999995 | @@ -5820,17 +5820,16 @@
-s
co
-re = 0
+ntinue
%0A
@@ -5875,13 +5875,16 @@
-l = t
+continue
%0A
|
d994f10f10afa49f32626bf54dc31bf7779a1c48 | Create admin role with mirror permissions | upsrv/mirror_admin.py | upsrv/mirror_admin.py | #
# Copyright (c) SAS Institute 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 w... | Python | 0 | @@ -5096,36 +5096,35 @@
mirror =
-Fals
+Tru
e%0A ad
|
f12c471f5fc29b721e641e64ff1d2a2f68a8d8ab | Fix encoding in gliwice | poradnia/judgements/parsers/gliwice.py | poradnia/judgements/parsers/gliwice.py | from datetime import datetime
from time import strptime
import requests
from lxml import html
from pytz import timezone
from poradnia.judgements.models import SessionRow
from poradnia.judgements.parsers.base import BaseParser
from poradnia.judgements.registry import register_parser
@register_parser('WSA_Gliwice')
c... | Python | 0.999319 | @@ -1,12 +1,36 @@
+# -*- coding: utf-8 -*-%0A
from datetim
|
d99b9bba916ddb11625229fe4a77d5f07cb56bac | Update demo.py | demo/demo.py | demo/demo.py | import os
import sys
sys.path.append(os.getcwd() + '/../')
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.patches import Ellipse
from numpy.random import randint
from numpy.random import multivariate_normal as m_normal
from PLDA import PLDA
from scipy.stats import norm, ch... | Python | 0.000001 | @@ -4239,19 +4239,20 @@
stimate=
-Tru
+Fals
e)%0A p
|
868de1be48b28d05d9b67bf9ace9fdabedd23a82 | use hexversion to skip tests, since py26 has no named tuple version_info. | test/jpypetest/proxy.py | test/jpypetest/proxy.py | #*****************************************************************************
# Copyright 2004-2008 Steve Menard
#
# 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... | Python | 0 | @@ -847,20 +847,18 @@
ort
+hex
version
-_info
as
@@ -2167,102 +2167,18 @@
(ver
-.major == 2 and %0D%0A ver.minor == 7 and%0D%0A ver.micro %3E
+ %3E 0x02070
3, '
@@ -2466,102 +2466,18 @@
(ver
-.major == 2 and %0D%0A ver.minor == 7 and%0D%0A ... |
2a81e11fdaba3bc5aeed7f3352820942e151804e | Add manifest config file things | docs/conf.py | docs/conf.py | # -*- coding: utf-8 -*-
import os
import sys
import alagitpull
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
# package data
about = ... | Python | 0 | @@ -1365,16 +1365,158 @@
le__'%5D,%0A
+ 'project_url': about%5B'__docs__'%5D,%0A 'show_meta_manifest_tag': True,%0A 'show_meta_og_tags': True,%0A 'show_meta_app_icon_tags': True,%0A
%7D%0A%0Aalagi
|
6aab1e35227748b2cea0692a879d5f69cf3ec7c7 | use unicode startswith to compare url | menutia/models.py | menutia/models.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.db import models
from django.conf import settings as site_settings
from django.utils.translation import ugettext, ugettext_lazy as _
from menutia import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from ... | Python | 0 | @@ -2707,11 +2707,15 @@
urn
-str
+unicode
.sta
|
99bd55917e998b7f51c7fd41069cd62eb5e9749a | Fix typing for cred parameter. | zerver/views/zephyr.py | zerver/views/zephyr.py | from django.conf import settings
from django.http import HttpResponse, HttpRequest
from django.utils.translation import ugettext as _
from zerver.decorator import authenticated_json_view
from zerver.lib.ccache import make_ccache
from zerver.lib.request import has_request_variables, REQ
from zerver.lib.response import j... | Python | 0 | @@ -478,16 +478,45 @@
ujson%0A%0A
+from typing import Optional%0A%0A
%0A# Hack
@@ -859,11 +859,21 @@
ed:
+Optional%5B
str
+%5D
=REQ
|
b4721daecfeb4c415a9130e1330a66a08d496c1e | bump version | cupy/_version.py | cupy/_version.py | __version__ = '5.0.0b4'
| Python | 0 | @@ -17,8 +17,9 @@
.0.0
-b4
+rc1
'%0A
|
1580f0d269ebd7489ca98ff65997935f9c4ab40c | Allow Enum columns to be nullable | lib/python2.6/aquilon/aqdb/column_types/enum.py | lib/python2.6/aquilon/aqdb/column_types/enum.py | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2008,2009,2010 Contributor
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the EU DataGrid Software License. You should
# have received a copy of the li... | Python | 0.000361 | @@ -2745,24 +2745,75 @@
alue = None%0A
+ if value is None:%0A return value%0A
if v
@@ -2988,32 +2988,83 @@
alue, dialect):%0A
+ if value is None:%0A return value%0A
if self.
|
a3e1f55593889dc95c7702dabebafa8ecdb04103 | Remove namespace from django_messages | game/urls.py | game/urls.py | from __future__ import unicode_literals
from django.views.generic.base import TemplateView
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.auth.decorators import login_required
from mezzanine.core.views import dir... | Python | 0.000078 | @@ -1115,30 +1115,8 @@
rls'
-, namespace='messages'
)),%0A
|
12c02b41324c7679efdbe80c0b69c5e3c18fcfed | fix notifier to work on Python 3.6 | .pfnci/flexci_notify.py | .pfnci/flexci_notify.py | #!/usr/bin/env python
import sys
import os
def main(argv):
# Slack config: "HOOK_URL1,HOOK_URL2,HOOK_URL3,..."
slack_config = os.environ.get('CUPY_CI_SLACK_CONFIG', None)
# Gitter config: "TOKEN:ROOM1,ROOM2,ROOM3,..."
gitter_config = os.environ.get('CUPY_CI_GITTER_CONFIG', None)
desc = os.envir... | Python | 0.000005 | @@ -14,16 +14,90 @@
v python
+3%0A%0A# Note: keep this script runnable Python 3.6 until FlexCI Python update
%0A%0Aimport
@@ -575,42 +575,56 @@
y =
-f
'%7B
-desc%7D%5Cn%7Bsubdesc%7D%5Cn%7Bmsg%7D%5Cn%7Burl%7D'
+%7D%5Cn%7B%7D%5Cn%7B%7D%5Cn%7B%7D'.format(desc, subdesc, msg, url)
%0A%0A
|
4335c06fdd6fb8d60c7cee6215e7d1da9ab36d18 | remove debugging print | mfr_pdb/render.py | mfr_pdb/render.py | from mfr.core import RenderResult
from mako.lookup import TemplateLookup
template = TemplateLookup(
directories=['mfr_pdb/templates']
).get_template('pdb.mako')
def render_html(fp, **kwargs):
print kwargs
content = template.render(pdb_file=fp.read())
# assets must be loaded in this order
assets ... | Python | 0.000081 | @@ -196,25 +196,8 @@
s):%0A
- print kwargs%0A
|
8d68009093d382db4fa88393431be12b826bbc85 | add chrMT as preferred label | vcf2clinvar/common.py | vcf2clinvar/common.py | from __future__ import unicode_literals
import json
import re
CHROM_INDEX = {
'1': 1, '2': 2, '3': 3, '4': 4, '5': 5,
'6': 6, '7': 7, '8': 8, '9': 9, '10': 10,
'11': 11, '12': 12, '13': 13, '14': 14, '15': 15,
'16': 16, '17': 17, '18': 18, '19': 19, '20': 20,
'21': 21, '22': 22, 'X': 23, 'Y': 24, ... | Python | 0.000001 | @@ -655,16 +655,29 @@
rM': 25,
+ 'chrMT': 25,
%0A%7D%0A%0AREV_
@@ -1013,16 +1013,17 @@
5: 'chrM
+T
',%0A%7D%0A%0A%0Ac
|
7ef0db81ab71d79519ebd37aa6650d0544f015df | Add code documentation and author information. | data_analysis/generate_weekly_data.py | data_analysis/generate_weekly_data.py | import fileinput
import pandas as pd
# Set up a dictionary
all_data={}
number=0
# Read from standard input
for line in fileinput.input():
# Split the line given
result = str.split(line)
# Print the line number analyzed
print(number)
# Set up an empty list if the key
# is null
if all_d... | Python | 0 | @@ -1,12 +1,319 @@
+#!/usr/bin/env python%0A# Given a complete year files with data in the form (page, week, visits)%0A# this script will generate a convenient csv file which will store for%0A# each page and for each years's week the total number of visits.%0A#%0A# Written by Giovanni De Toni (2017)%0A# Email: giovanni... |
732be1ea3596929682dc757368e586c10a52e109 | revert only one migration by default | migrate/runner.py | migrate/runner.py | import time
import os
import json
import fnmatch
from importlib import util as import_util
migrations_dir_ = 'migrations/'
state_file_ = migrations_dir_ + '.state'
def create(name, migrations_dir=migrations_dir_, template_file=None):
if template_file is None:
template = """\
def up():
pass
def down... | Python | 0 | @@ -2270,32 +2270,98 @@
target is None:%0A
+ if direction == 'down':%0A return migrations%5B:1%5D%0A
return m
|
a3d7ca17e32457a8479a540b970baa101dcb1720 | Update version to next release | minio/__init__.py | minio/__init__.py | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
# (C) 2015, 2016, 2017 MinIO, 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.ap... | Python | 0 | @@ -1074,17 +1074,17 @@
= '5.0.
-5
+6
'%0A__lice
|
a8f7c30aa027fba7ea2074ce439ed68abb76701f | Fix crash when duplicating flow | mitmproxy/flow.py | mitmproxy/flow.py | import time
import uuid
from mitmproxy import controller # noqa
from mitmproxy import stateobject
from mitmproxy import connections
from mitmproxy import version
import typing # noqa
class Error(stateobject.StateObject):
"""
An Error.
This is distinct from an protocol error response (say, a ... | Python | 0.000003 | @@ -3114,9 +3114,8 @@
alse
-;
%0A
@@ -3133,18 +3133,22 @@
f.reply
-!=
+is not
None:%0A
|
f72da8ec96dfc4d3d31e628a35896c9044f9b438 | Update version | mixer/__init__.py | mixer/__init__.py | """ Mixer is a module that adds object generation tool for your application.
It's supported Django_ ORM, SQLAlchemy_ ORM, Pony_ ORM, Peewee_ ORM,
Mongoengine_ ODM and etc.
Mixer is very useful for testing and fixtures replacement.
:copyright: 2013 by Kirill Klenov.
:license: BSD, see LICENSE for more details.
"""
f... | Python | 0 | @@ -415,17 +415,17 @@
= %224.8.
-0
+1
%22%0A__proj
|
30e2684e36c6e13341dec9b27a798e36b24fe052 | Fix errors in `.ycm_extra_conf.py` | .vim/.ycm_extra_conf.py | .vim/.ycm_extra_conf.py | # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | Python | 0.000289 | @@ -2270,16 +2270,32 @@
%0A'c++',%0A
+'-nostdincc++',%0A
'-isyste
@@ -2309,16 +2309,119 @@
include'
+,%0A'-isystem',%0A'/nfs/research2/saezrodriguez/mike-software/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.8.2'
%0A%5D%0A%0A%0A# S
@@ -3206,24 +3206,168 @@
irectory ):%0A
+ def make_abs_path(path):%0A if path.start... |
38e80c2b433f608ce249231d471373f144b425c9 | Update dropbox-gelf.py | dropbox-gelf.py | dropbox-gelf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
A Dropbox-to-GELF audit logs injector
:copyright: (c) 2015 Rocket Internet SE
:license: MIT, see LICENSE for more details.
"""
__author__ = "Luca Bruno"
__email__ = "luca.bruno@rocket-internet.de"
import configparser
import json
import logging
import sys
import time... | Python | 0 | @@ -137,11 +137,14 @@
se:
-MIT
+GPLv3+
, se
|
0978ab3285b5a66ebe6166295f16b7668b99929c | Fix confusing error message | util/dvsim/CfgJson.py | util/dvsim/CfgJson.py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
'''A wrapper for loading hjson files as used by dvsim's FlowCfg'''
from utils import parse_hjson, subst_wildcards
# A set of fields that can be overridden on the command... | Python | 0.000178 | @@ -1412,18 +1412,28 @@
-if
+paths_seen =
set(new
@@ -1446,16 +1446,38 @@
) & seen
+%0A if paths_seen
:%0A
@@ -1506,22 +1506,16 @@
or('
-%7B!r%7D:
The file
%7B!r
@@ -1510,16 +1510,17 @@
The file
+s
%7B!r%7D ap
@@ -1597,17 +1597,30 @@
include
-s
+ %7B!r%7D for %7B!r%7D
.'%0A
@@... |
e9a0ec7398708a1ecea5c03405a143bf5101afe9 | make sure specs_path is protected by assertion | dusty/config.py | dusty/config.py | """Module for handling the daemon config file stored at CONFIG_PATH.
This file determines the bundles the user currently wants active, as well
as the location of the Dusty specifications on disk."""
import yaml
from . import constants
def _load(filepath):
with open(filepath, 'r') as f:
return yaml.load(f... | Python | 0 | @@ -460,39 +460,8 @@
%5B%5D,
- 'specs_path': '~/dusty-specs',
're
|
874a7c02c538bb17f9ef6f8a91f640b9dfaa78de | Make change desc function take a label. | generator.py | generator.py | from xml.dom import minidom
import symboltypes
def GenerateDocs(namespace_map):
for namespace, symbols in namespace_map.iteritems():
filepath = '%s.html' % namespace
doc = _GenerateDocument(namespace, symbols)
content = doc.documentElement.toprettyxml(indent=' ')
yield filepath, content
def _MakeT... | Python | 0.000003 | @@ -1488,32 +1488,38 @@
FunctionSummary(
+name,
function):%0A con
@@ -1548,94 +1548,8 @@
'p')
-%0A%0A name = function.identifier%0A if function.property:%0A name = function.property%0A
%0A c
@@ -2794,16 +2794,33 @@
Summary(
+method.property,
method))
@@ -2985,16 +2985,37 @@
Summary(
+function.identifi... |
5c711b4e5e13036d137d02ec7beae6a4c3bbdef7 | comment back things that should be commented | ntudownloader.py | ntudownloader.py | import os, requests
from bs4 import BeautifulSoup
from urllib.parse import urlparse, urljoin
from settings import NTULEARN_URL
# insert loginmethod here
def ntu_login(username, password):
values = {'username': username,
'password': password}
r = requests.post(NTULEARN_URL, data=values)
prin... | Python | 0 | @@ -328,16 +328,18 @@
tent)%0A%0A%0A
+#
scraper
|
24d635ed6923b4a9bd8644e7d23ebbcde4751824 | Version 0.0.6.1 | mochi/__init__.py | mochi/__init__.py | __author__ = 'Yasushi Itoh'
__version__ = '0.0.6'
__license__ = 'MIT License'
import sys
IS_PYTHON_34 = sys.version_info.major == 3 and sys.version_info.minor == 4
| Python | 0.000001 | @@ -41,16 +41,18 @@
= '0.0.6
+.1
'%0A__lice
|
b82c575d1d2f89d79ca39e4a3e6a82af1919f51f | update setup | common/lib/sandbox-packages/setup.py | common/lib/sandbox-packages/setup.py | from setuptools import setup
setup(
name="sandbox-packages",
version="0.2.68",
packages=[
"loncapa",
"verifiers",
"hint",
"hint.hint_class_helpers",
"hint.hint_class_helpers.expr_parser",
"hint.hint_class",
"hint.hint_class.first_Universal",
"... | Python | 0.000001 | @@ -77,17 +77,17 @@
n=%220.2.6
-8
+9
%22,%0A p
|
5562990bc4343ff93bdfe286fa02acdba01b08f5 | Support adding adjust time (for breaks) | workcalc.py | workcalc.py | #!/usr/bin/env python
import csv
import sys
from datetime import datetime, timedelta
import itertools
import operator
import os
use_colors = sys.stdout.isatty()
if use_colors:
try:
import colorama
if os.name == 'nt':
colorama.init(strip=True, convert=True)
else:
co... | Python | 0 | @@ -1601,16 +1601,46 @@
x, y))%0A%0A
+zerotime = parsetime('0:00')%0A%0A
with ope
@@ -1995,16 +1995,115 @@
== 'Yes'
+%0A adjust = gettimecol('Adjust')%0A adjust_delta = adjust - zerotime if adjust else None
%0A%0A
@@ -2303,16 +2303,16 @@
lunch:%0A
-
@@ -2337,16 +2337,78 @@
nchbonus
... |
6da5a808ff3412b37445cd2aa26ff3b17d0fa05c | Bump version | cob/__version__.py | cob/__version__.py | __version__ = "0.0.5"
| Python | 0 | @@ -16,7 +16,7 @@
0.0.
-5
+6
%22%0A
|
6d174ef004ebf731deb303da7d67fb64eb6542b3 | Remove trimmed relations from testxml | mint/django_rest/rbuilder/querysets/testsxml.py | mint/django_rest/rbuilder/querysets/testsxml.py | #!/usr/bin/python
#
# Copyright (c) 2011 rPath, Inc.
#
# All rights reserved.
#
queryset_post_xml = """
<query_set>
<filter_entries>
<filter_entry>
<field>system.name</field>
<operator>LIKE</operator>
<value>3</value>
</filter_entry>
</filter_entries>
<name>New Query Set</name>
<resou... | Python | 0 | @@ -3746,29 +3746,8 @@
me%3E%0A
- %3Cpermission_tags/%3E%0A
%3Cp
@@ -3842,23 +3842,8 @@
pe%3E%0A
- %3Crole_tags/%3E%0A
%3Ct
|
d5810d7595f8970aba1cb48ce705247188bb0f3a | Fix type_list | json_schema_helpers/helpers.py | json_schema_helpers/helpers.py |
# Simple types
type_string = dict(type="string")
type_null = dict(type="null")
type_integer = dict(type="integer")
type_number = dict(type="number")
type_object = dict(type="object")
type_list = dict(type="list")
type_boolean = dict(type="boolean")
# Simple type or null
type_string_or_null = dict(oneOf=[type_string, ... | Python | 0.000007 | @@ -204,13 +204,52 @@
pe=%22
-list%22
+array%22) # Python clashed with JavaScript :-
)%0Aty
|
613e7fb19411afe31071f2b203a2fc0ee587ff44 | Add 'type' parameter to compute image schema | tempest/api_schema/response/compute/v2/images.py | tempest/api_schema/response/compute/v2/images.py | # Copyright 2014 NEC Corporation. All rights reserved.
#
# 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 ... | Python | 0.00015 | @@ -624,16 +624,29 @@
cense.%0A%0A
+import copy%0A%0A
from tem
@@ -702,16 +702,140 @@
_types%0A%0A
+image_links = copy.deepcopy(parameter_types.links)%0Aimage_links%5B'items'%5D%5B'properties'%5D.update(%7B'type': %7B'type': 'string'%7D%7D)%0A%0A
common_i
@@ -1020,32 +1020,22 @@
links':
-parameter_types.
+image_
... |
3b6fdcd2a1471dbd8b459e320ee3e1e8d645ef9d | fix #500 - remove init .on_load() for Windows and Linux | xsupport.py | xsupport.py | import threading
import sublime
import sublime_plugin
from Vintageous import local_logger
from Vintageous.state import _init_vintageous
from Vintageous.state import State
from Vintageous.vi import utils
from Vintageous.vi.cmd_defs import cmd_defs
from Vintageous.vi.cmd_defs import cmds
from Vintageous.vi.dot_file imp... | Python | 0.000001 | @@ -1784,279 +1784,8 @@
r):%0A
- def on_load(self, view):%0A try:%0A _init_vintageous(view)%0A except AttributeError:%0A _logger().error(%0A '%5BVintageStateTracker%5D .settings() missing during .on_load() for %7B0%7D'%0A .format(view.file_name()... |
93aa6e3955c1d01e8978722769a5a7e6dc3f1be6 | Switch to using fingerprint of cert for knownhosts | confluent_client/confluent/client.py | confluent_client/confluent/client.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 IBM Corporation
#
# 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 req... | Python | 0 | @@ -652,16 +652,31 @@
t errno%0A
+import hashlib%0A
import o
@@ -921,28 +921,30 @@
port =
+'
4001
+'
%0A elif ':
@@ -1046,20 +1046,22 @@
port =
+'
4001
+'
%0A ret
@@ -4534,19 +4534,101 @@
-if certdata
+fingerprint = 'sha512$' + hashlib.sha512(certdata).hexdigest()%0A if finger... |
a966e5218cb30d93d3b21e329b0bfabed367053d | fix reference before assignment | vdist/buildmachine.py | vdist/buildmachine.py | import logging
import os
import docker
from docker.utils import kwargs_from_env
from vdist import defaults
class BuildMachine(object):
def __init__(self, machine_logs=True, image=None, insecure_registry=False,
docker_args=None):
self.logger = logging.getLogger('BuildMachine')
... | Python | 0 | @@ -416,32 +416,36 @@
_args)%0A%0A
+
self.dockerclien
@@ -476,16 +476,98 @@
kwargs)%0A
+ else:%0A self.dockerclient = docker.Client(**kwargs_from_env())%0A%0A
|
a22e652210852b3234af056e7dbc688a5f263f88 | Fix bug with insertOrganism() function call | codonpdx/insert.py | codonpdx/insert.py | #!/usr/bin/env python
import json
from db import dbManager
# insert an organism into a database table
def insert(args):
if hasattr(args, 'json'):
data = json.loads(args.json)
else:
data = json.load(args.infile)
with dbManager('config/db.cfg') as db:
for org in data:
db... | Python | 0.000001 | @@ -345,26 +345,16 @@
s.dbname
-, args.job
)%0A re
|
c1b1010daa6c8cee35230ce2f73b3f2c3bb7b10b | Include priority in properties only if it's not None. (#1038) | kombu/transport/librabbitmq.py | kombu/transport/librabbitmq.py | """`librabbitmq`_ transport.
.. _`librabbitmq`: https://pypi.org/project/librabbitmq/
"""
from __future__ import absolute_import, unicode_literals
import os
import socket
import warnings
import librabbitmq as amqp
from librabbitmq import ChannelError, ConnectionError
from kombu.five import items, values
from kombu.... | Python | 0 | @@ -1818,17 +1818,18 @@
headers
-,
+%7D)
%0A
@@ -1829,35 +1829,206 @@
-
+# Don't include priority if it's not an integer.%0A # If that's the case librabbitmq will fail%0A # and raise an exception.%0A if priority is not None:%0A properties%5B
'prior... |
5af1768da32b1b7f7539f1986a4abd653f9e2a6f | Smaller sequences | model/topology.py | model/topology.py | import numpy as np
import pandas
from keras import Input
from keras.backend import floatx
from keras.engine import Model
from keras.layers import LSTM, RepeatVector
from topoml_util.util import Tokenize
TOPOLOGY_TRAINING_CSV = '../files/topology-training.csv'
def main():
print('Reading data...')
training_data... | Python | 0.99924 | @@ -613,18 +613,17 @@
x_len =
-10
+5
00%0A b
@@ -896,16 +896,234 @@
ndex%5D)%0A%0A
+ # Truncate the array to the batch size%0A truncated_length = len(training_set) - len(training_set) %25 batch_size%0A training_set = training_set%5B0:truncated_length%5D%0A target_set = target_set%5B0:truncated_length... |
f3cc2de83c88f01f7ec554ae6223132c284b4ad4 | Fix import for Kotti > 0.8x. | kotti_site_gallery/__init__.py | kotti_site_gallery/__init__.py | from fanstatic import Library
from fanstatic import Resource
from kotti.resources import Image
import kotti.static as ks
lib_kotti_site_gallery = Library('kotti_site_gallery', 'static')
view_css = Resource(lib_kotti_site_gallery,
"kotti_site_gallery.css",
minified="kotti_site_g... | Python | 0 | @@ -1,28 +1,68 @@
+from __future__ import absolute_import%0A%0A
from fanstatic import Librar
@@ -132,33 +132,84 @@
age%0A
-import
+from kotti.fanstatic import view_css%0Afrom
kotti.
+fan
static
-as ks
+import view_needed
%0A%0A%0Al
@@ -272,16 +272,20 @@
tatic')%0A
+ksg_
view_css
@@ -454,19 +454,16 @@
epends=%... |
421c1802dd74d8c731caedaaacce1865c4aa4254 | remove reference to old getBucketSizes function. | A4/hashtabletemplate.py | A4/hashtabletemplate.py | from collections import Hashable
class Node (object):
def __init__(self, key, value):
self.key = key
self.value = value
self.nextNode = None
class LinkedList (object):
# insert your assignment 2 here
class Hashtable (object):
def __init__(self, hashFunction, size=500):
... | Python | 0 | @@ -990,114 +990,8 @@
s%0A%0A%0A
- def getBucketSizes(self):%0A %22%22%22 yield the sizes of each bucket as an iterator%22%22%22%0A%0A pass%0A%0A
|
a4c5782158e7d3fa696fc4532836355457f48cc0 | Add note about BibleGateway layout | versebot/webparser.py | versebot/webparser.py | """
VerseBot for reddit
By Matthieu Grieger
parser.py
Copyright (c) 2015 Matthieu Grieger (MIT License)
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
class Parser:
""" Parser class for BibleGateway parsing methods. """
def __init__(self):
""" Initializes translations attrib... | Python | 0 | @@ -37,16 +37,19 @@
Grieger%0A
+web
parser.p
@@ -50,16 +50,16 @@
rser.py%0A
-
Copyrigh
@@ -413,23 +413,11 @@
-self.translatio
+tra
ns =
@@ -451,16 +451,131 @@
ations()
+%0A if trans is None:%0A self.translations = None%0A else:%0A self.translations = trans
.sort(ke
@@ -9... |
37b12b0ebbd838f38128c3c627148d351219f465 | check right when accessing /kit and /stats | labonneboite/web/root/views.py | labonneboite/web/root/views.py | # coding: utf8
from flask import Blueprint, current_app
from flask import send_from_directory, redirect, render_template, request
from labonneboite.common import util
from labonneboite.conf import settings
from labonneboite.web.search.forms import CompanySearchForm
rootBlueprint = Blueprint('root', __name__)
@roo... | Python | 0 | @@ -67,16 +67,23 @@
k import
+ abort,
send_fr
@@ -600,24 +600,86 @@
%0Adef kit():%0A
+ if util.user_is_pro() and util.pro_version_enabled():%0A
return s
@@ -735,16 +735,31 @@
t.pdf')%0A
+ abort(404)%0A
%0A%0A@rootB
@@ -1616,24 +1616,86 @@
ef stats():%0A
+ if util.user_is_pro() and util.pro_vers... |
ea0053a8aa2d2f17cf23bd0c7b7367301d21e292 | Fix bug in recruitment logic | wallace/recruiters.py | wallace/recruiters.py | """Recruiters manage the flow of participants to the experiment."""
import os
from psiturk.psiturk_config import PsiturkConfig
from psiturk.models import Participant
from boto.mturk.connection import MTurkConnection
class Recruiter(object):
"""Define the base recruiter."""
def __init__(self):
super... | Python | 0.000002 | @@ -3823,12 +3823,8 @@
ert(
-not
part
|
47a05fc653014a225d3b3782696bc04bdce7b9c2 | Make weather less verbose | weather/bot_plugin.py | weather/bot_plugin.py | # test plugin
from bot.pluginDespatch import Plugin
import re
import datetime
import logging
import requests
from urllib import quote
import json
from logos.roomlib import get_global_option
from django.conf import settings
logger = logging.getLogger(__name__)
logging.config.dictConfig(settings.LOGGING)
def convert_f(... | Python | 0.999999 | @@ -353,24 +353,89 @@
5 + 32%0A%0Adef
+convert_c(fahrenheit):%0A return (fahrenheit - 32)*5/9%0A%0Adef get_
weather(loc)
@@ -710,18 +710,24 @@
rl)%0A
-j1
+results
= json.
@@ -768,17 +768,71 @@
-if not j1
+return results%0A%0Adef format_weather(results):%0A if not results
: re
@@ -866,10 +866,15 ... |
079f0a4500023ae9e2a760be8dc5291b8f8cc51d | Fix fahrenheit temperatures | weather/bot_plugin.py | weather/bot_plugin.py | # test plugin
from bot.pluginDespatch import Plugin
import re
import datetime
import logging
import pyowm
from logos.roomlib import get_global_option
from django.conf import settings
logger = logging.getLogger(__name__)
logging.config.dictConfig(settings.LOGGING)
class WeatherPlugin(Plugin):
plugin = ("w", "Weath... | Python | 0.999985 | @@ -304,16 +304,22 @@
in = (%22w
+eather
%22, %22Weat
@@ -479,17 +479,18 @@
P%3Carg%3E%5CS
-+
+.*
)$', sel
@@ -1186,24 +1186,210 @@
humidity())%0A
+ celsius = w.get_temperature('celsius')%5B'temp'%5D%0A fahrenheit = w.get_temperature('fahrenheit')%5B'temp'%5D%0A str1 += %22 Temperature %7B%7D ... |
9cec0fbd6099b6d403f263ec241ff6451c86412a | remove unused args | contrib/freq/script/get-haplotype.py | contrib/freq/script/get-haplotype.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import argparse
import shlex
import subprocess
from itertools import chain
from collections import Counter
import numpy as np
try:
import psycopg2cffi as psycopg2
except ImportError:
import psycopg2
BASE_DIR = os.path.dirname(os.path.abspath(... | Python | 0.000045 | @@ -482,168 +482,8 @@
ue)%0A
- parser.add_argument('--source-id', required=True, choices=%5B4%5D, type=int, help='Source ID. Currently, only 1000 Genomes Phase3 (CHB+JPT+CHS) is supported.')%0A
@@ -3139,30 +3139,16 @@
de NA1).
- source_id:%7B%7D,
chrom:%7B
@@ -3170,32 +3170,16 @@
.format(
-args.source_id,... |
6c1b84d2508a2c991115ad49a70e2f88a52e7d9f | Add clarified comments | lc0023_merge_k_sorted_lists.py | lc0023_merge_k_sorted_lists.py | """Leetcode 23. Merge k Sorted Lists
Hard
URL: https://leetcode.com/problems/merge-k-sorted-lists/
Merge k sorted linked lists and return it as one sorted list.
Analyze and describe its complexity.
Example:
Input:
[
1->4->5,
1->3->4,
2->6
]
Output: 1->1->2->3->4->4->5->6
"""
# Definition for singly-linked lis... | Python | 0 | @@ -3980,32 +3980,88 @@
return None%0A%0A
+ # Just add the head nodes in lists to min heap.%0A
minheap
|
0c1517a0e9ada833011ad435a9799ada0bbb7c89 | Use the Github API to compute changed files for PRs. (#8476) | test_utils/scripts/get_target_packages_kokoro.py | test_utils/scripts/get_target_packages_kokoro.py | # Copyright 2017 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | Python | 0 | @@ -679,16 +679,32 @@
_helper%0A
+import requests%0A
%0A%0Adef pr
@@ -1233,24 +1233,34 @@
hanged_files
+_from_base
(base):%0A
@@ -1414,24 +1414,398 @@
lit('%5Cn')%0A%0A%0A
+_URL_TEMPLATE = (%0A 'https://api.github.com/repos/googleapis/google-cloud-python/pulls/'%0A '%7B%7D/files'%0A)%0A%0A%0Adef get_chan... |
41b5a95a5c396c131d1426dd926e0a1a4beccc86 | Call method changed on v14 | mrp_workorder_sequence/models/mrp_production.py | mrp_workorder_sequence/models/mrp_production.py | # Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import models
class MrpProduction(models.Model):
_inherit = "mrp.production"
def _reset_work_order_sequence(self):
for rec in self:
current_seque... | Python | 0.000002 | @@ -461,21 +461,19 @@
def _
-gener
+cre
ate_work
@@ -481,29 +481,13 @@
rder
-s
(self
-, exploded_boms
):%0A
@@ -512,13 +512,11 @@
()._
-gener
+cre
ate_
@@ -528,23 +528,9 @@
rder
-s(exploded_boms
+(
)%0A
|
7b615eda1f37235fb7a727858a87cfec94563e6c | Migrate a test | myhdl/test/conversion/general/test_constants.py | myhdl/test/conversion/general/test_constants.py | from __future__ import absolute_import
from myhdl import *
def constants(v, u, x, y, z, a):
b = Signal(bool(0))
c = Signal(bool(1))
d = Signal(intbv(5)[8:])
e = Signal(intbv(4, min=-3, max=9))
@always_comb
def logic():
u.next = d
v.next = e
x.next = b
y.next = ... | Python | 0.000137 | @@ -53,16 +53,24 @@
port *%0A%0A
+@module%0A
def cons
@@ -535,18 +535,17 @@
onstants
-,
+(
v, u, x,
@@ -553,16 +553,17 @@
y, z, a)
+)
== 0 %0A
|
2b942d97b27eab9ef8f5fee263a5dbbd95b432f8 | Address review comments | letsencrypt/plugins/webroot.py | letsencrypt/plugins/webroot.py | """Webroot plugin."""
import errno
import logging
import os
import stat
import zope.interface
from acme import challenges
from letsencrypt import errors
from letsencrypt import interfaces
from letsencrypt.plugins import common
logger = logging.getLogger(__name__)
class Authenticator(common.Plugin):
"""Webroo... | Python | 0 | @@ -2005,37 +2005,17 @@
%5Bname%5D)%0A
- try:%0A
+%0A
@@ -2085,464 +2085,480 @@
- # We also set umask because
+# Umask is used instead of chmod to ensure the client can also%0A # run as non-root (GH #1795)%0A old_umask =
os.
+u
ma
-kedirs's mode parameter doe... |
24301f1670e8879c2e72f78f9288a7f8b8f32179 | Add relation to mongodb, store stuff that is posted. | py-backend/server.py | py-backend/server.py | #!/usr/bin/python
from flask import Flask, request, json, render_template
import deptCalculator
app = Flask(__name__)
@app.route('/calcDepts', methods=['POST'])
def depts():
if request.method == 'POST' and request.headers['Content-Type'] == ('application/json; charset=UTF-8'):
postedJson = json.dumps(req... | Python | 0 | @@ -52,30 +52,28 @@
, json,
-render_templat
+make_respons
e%0Aimport
@@ -92,30 +92,838 @@
tor%0A
-%0Aapp = Flask(__name__)
+from mongoengine import *%0Aimport datetime%0Afrom bson import json_util%0A%0A'''%0ADefine some mongo stuff, very rudimentary storing of posted data.%0A'''%0A%0Aconnect('localhost:27017')%0A%0... |
526aa7d5ae783f8fa9743ea2b9359c1033ad20a3 | Fix _run_hook test | letsencrypt/tests/hook_test.py | letsencrypt/tests/hook_test.py | """Tests for hooks.py"""
# pylint: disable=protected-access
import os
import unittest
import mock
from letsencrypt import errors
from letsencrypt import hooks
class HookTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
@mock.patch('letsencrypt.hooks._prog')
de... | Python | 0.000069 | @@ -3326,105 +3326,117 @@
oks.
-logger.error')%0A @mock.patch('letsencrypt.hooks.Popen')%0A def test_run_hook(self, mock_popen,
+Popen')%0A def test_run_hook(self, mock_popen):%0A with mock.patch('letsencrypt.hooks.logger.error') as
moc
@@ -3442,19 +3442,22 @@
ck_error
-)
:%0A
+
@@ -3... |
54b147e59d1dfd4b65643a3f8a56098eb5a99451 | Add more default args so tests pass in py3+ | tests/kafka_cluster_manager/decommission_test.py | tests/kafka_cluster_manager/decommission_test.py | from __future__ import unicode_literals
from argparse import Namespace
import mock
import pytest
from kafka_utils.kafka_cluster_manager.cluster_info \
.partition_count_balancer import PartitionCountBalancer
from kafka_utils.kafka_cluster_manager.cmds import decommission
from tests.kafka_cluster_manager.helper im... | Python | 0 | @@ -563,16 +563,95 @@
= True%0A
+ cmd.args.max_partition_movements = 10%0A cmd.args.max_leader_changes = 10%0A
retu
|
401c4c414eaaa80e9ed22b210f0b98e71ccfc970 | Fix mixed indentation in commented python test | python/test_diamond_incremental.py | python/test_diamond_incremental.py | """
These test cases can be used to test-drive a solution to the diamond kata, in an incremental manner.
to run the tests, use 'py.test' - see http://pytest.org
Instructions:
1. Make the first test case for Diamond A pass
2. change the 'ignore_' to 'test_' for the next test case. Make it pass.
3. Uncomment the next l... | Python | 0.000002 | @@ -553,17 +553,16 @@
ion.%0A%22%22%22
-
%0A%0Aimport
@@ -798,28 +798,25 @@
ce == %5B'A'%5D%0A
-
+%09
#assert diam
@@ -859,36 +859,33 @@
%5B'A', 'B', 'A'%5D%0A
-
+%09
#assert diamond.
@@ -942,20 +942,17 @@
', 'A'%5D%0A
-
+%09
#assert
|
d89ae0da2588ee50f6d5fdf929f694c1fe796253 | Correct errors in etree.to_etree | visitors/ext/etree.py | visitors/ext/etree.py | '''Tools for visiting html and xml etrees, and for converting tater graphs
to and from etrees.
'''
import re
import functools
import lxml.etree as et
from lxml.html import HtmlComment
from treebie import Node
from visitors import Visitor
class XmlEtreeVisitor(Visitor):
def get_children(self, el):
retu... | Python | 0.001324 | @@ -998,194 +998,495 @@
-root = et.Element(tag, **attrs)%0A self.root = root%0A else:%0A attrs = dict(node)%0A tag = attrs.pop('tag')%0A et.SubElement(root, tag, **attrs)
+text = attrs.pop('text', None)%0A tail = attrs.pop('tail', None)%0A r... |
f13d9ec4f953dc93a9add14cb36b4a2ae0891835 | remove unused action | crate_project/apps/packages/admin.py | crate_project/apps/packages/admin.py | from django.contrib import admin
from packages.models import Package, Release, ReleaseFile, TroveClassifier, PackageURI
from packages.models import ReleaseRequire, ReleaseProvide, ReleaseObsolete, ReleaseURI, ChangeLog
from packages.tasks import save_releases
def releases_save(modeladmin, request, queryset):
sav... | Python | 0.000001 | @@ -217,227 +217,8 @@
Log%0A
-from packages.tasks import save_releases%0A%0A%0Adef releases_save(modeladmin, request, queryset):%0A save_releases.delay(%5Bx.pk for x in queryset%5D)%0Areleases_save.short_description = %22Trigger a Save on the Selected Releases%22%0A
%0A%0Acl
@@ -1158,38 +1158,8 @@
ne%5D%0A
- a... |
4b08f00351e756278694ff0ce6e26e2257b6a7c0 | Use struc pack for convertion of buffer. | pySmartPlugSmpB16.py | pySmartPlugSmpB16.py | import binascii
from bluepy import btle
START_OF_MESSAGE = bytes([0x0f])
END_OF_MESSAGE = bytes([0xff, 0xff])
class SmartPlug(btle.Peripheral):
def __init__(self, addr):
btle.Peripheral.__init__(self, addr)
self.delegate = NotificationDelegate()
self.setDelegate(self.delegate)
self... | Python | 0 | @@ -9,16 +9,30 @@
inascii%0A
+import struct%0A
from blu
@@ -2534,108 +2534,131 @@
-self.state = bytes_data%5B4%5D == 1%0A self.power = int(binascii.hexlify(bytes_data%5B6:10%5D), 16)
+(state,dummy,power) = struct.unpack_from(%22%3E?hi%22,bytes_data,4)%0A self.state = state%0A se... |
6a04607082a386b41e3fb0c53bb7be7a2ba5c4b6 | simplify hammer-stroud for cube a bit | quadpy/hexahedron/hammer_stroud.py | quadpy/hexahedron/hammer_stroud.py | # -*- coding: utf-8 -*-
#
import numpy
from .helpers import fs_r00, pm_rrr, fs_rr0, z
from ..helpers import untangle
class HammerStroud(object):
'''
Preston C. Hammer and Arthur H. Stroud,
Numerical Evaluation of Multiple Integrals II,
Math. Comp. 12 (1958), 272-280,
<https://doi.org/10.1090/S00... | Python | 0.000002 | @@ -37,56 +37,8 @@
py%0A%0A
-from .helpers import fs_r00, pm_rrr, fs_rr0, z%0A%0A
from
@@ -63,16 +63,28 @@
untangle
+, fsd, pm, z
%0A%0A%0Aclass
@@ -444,21 +444,21 @@
61.0, fs
-_r00(
+d(3,
numpy.sq
@@ -470,16 +470,19 @@
.0/30.0)
+, 1
)),%0A
@@ -510,21 +510,20 @@
88.0, pm
-_rrr(
+(3,
numpy.sq
@@ -1145,16... |
d74ed8d2af812701241515aaa521acc444c8dbc1 | Remove comments | pybossa/view/home.py | pybossa/view/home.py | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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 License, or
# (at... | Python | 0 | @@ -741,1290 +741,253 @@
%3E.%0A%0A
-#import os%0A#import logging%0A#import json%0A#import os%0A#%0A#from flask import Response, request, g, render_template,%5C%0A# abort, flash, redirect, session, url_for%0A#from flask.ext.login import login_user, logout_user, current_user%0A#from flask.ext.babel import lazy_g... |
9cb8a22673d36ab8e5379065d2d71ea2805370c8 | Fix day calculation on history limit | radio/templatetags/radio_extras.py | radio/templatetags/radio_extras.py | import random
from django import template
from django.conf import settings
from django.contrib.auth.models import User
from radio.models import Profile
register = template.Library()
# anonymous time seting
@register.simple_tag()
def settings_anonymous_time():
return getattr(settings, 'ANONYMOUS_TIME', 0)
# Get... | Python | 0.000042 | @@ -1263,17 +1263,17 @@
s'%5D // 1
-1
+4
40))%0A
|
00454daf57f2d24ca6c8080b6c3bb57dfcf32be2 | change the new parser tests | test/test_new_parser.py | test/test_new_parser.py | import logging
from jedi.parser import pytree
from jedi.parser.pgen2 import Driver
def test_basic_parsing():
def compare(string):
"""Generates the AST object and then regenerates the code."""
assert d.parse_string(string).get_code() == string
#if self.options["print_function"]:
# pyth... | Python | 0.000001 | @@ -1,20 +1,4 @@
-import logging%0A%0A
from
@@ -21,49 +21,12 @@
ort
-pytree%0Afrom jedi.parser.pgen2 import Driv
+Pars
er%0A%0A
@@ -166,22 +166,14 @@
ert
-d.p
+P
arse
-_string
+r
(str
@@ -177,16 +177,23 @@
string).
+module.
get_code
@@ -208,471 +208,8 @@
ring
-%0A%0A #if self.options%5B%22print_function%2... |
f54db44daeb10718040bced6f388b0811b468867 | Version develop | conans/__init__.py | conans/__init__.py | # Allow conans to import ConanFile from here
# to allow refactors
from conans.model.conan_file import ConanFile
from conans.model.options import Options
from conans.model.settings import Settings
from conans.client.cmake import CMake
from conans.client.gcc import GCC
from conans.client.configure_environment import Conf... | Python | 0 | @@ -398,10 +398,12 @@
'0.1
-0.0
+1.dev
'%0A%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.