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 |
|---|---|---|---|---|---|---|---|
e778bf0bb5a90e6d5d6f4fcaf1cf56ca96e4d291 | Write clustering result in sorted log line | pygraphc/clustering/ClusterUtility.py | pygraphc/clustering/ClusterUtility.py | from itertools import combinations
from operator import itemgetter
class ClusterUtility(object):
@staticmethod
def get_geometric_mean(weights):
multiplication = 1
for weight in weights:
multiplication = multiplication * weight
gmean = 0.0
if multiplication > 0.0:
... | Python | 0.000057 | @@ -4585,21 +4585,40 @@
#
-write
+get sorted log line id -
cluster
ing
@@ -4617,243 +4617,445 @@
ster
-ing
+ id
result
- to file (clustering result for all members in a node)%0A fopen = open(analysis_dir, 'w')%0A for key, value in new_cluster_member_label.iteritems():%0A cluster_memb... |
c8069fff1941d0739bca8716a5e26f5c02ccffe3 | Add South field tuple. | django_enumfield/fields.py | django_enumfield/fields.py | from django.db import models
class EnumField(models.Field):
__metaclass__ = models.SubfieldBase
def __init__(self, enumeration, *args, **kwargs):
self.enumeration = enumeration
kwargs.setdefault('choices', enumeration.get_choices())
super(EnumField, self).__init__(*args, **kwargs)
... | Python | 0.000001 | @@ -1111,8 +1111,210 @@
p_type)%0A
+%0A def south_field_triple(self):%0A from south.modelsinspector import introspector%0A args, kwargs = introspector(self)%0A return ('django.db.models.fields.Integerfield', args, kwargs)%0A
|
ad3c5fe06cf6c28b0e9b5d68e2459889c1ade434 | Version bump to 0.2 | django_shotgun/__init__.py | django_shotgun/__init__.py |
__version__ = "0.1"
| Python | 0 | @@ -15,7 +15,7 @@
%220.
-1
+2
%22%0A
|
2c73fee5b0a3a527d0ee3c51291c7b4c01c9f688 | Revert "Создание скрипта изменения группы" | fixture/group.py | fixture/group.py | class GroupHelper:
def __init__(self, app):
self.app = app
def open_groups_page(self):
wd = self.app.wd
wd.find_element_by_link_text("groups").click()
def create(self, group):
wd = self.app.wd
self.open_groups_page()
# создание новой группы
wd.find_... | Python | 0 | @@ -1681,801 +1681,6 @@
.wd%0A
- self.open_groups_page()%0A wd.find_element_by_name(%22selected%5B%5D%22).click() # select 1 group%0A wd.find_element_by_name(%22edit%22).click() #delete group%0A wd.find_element_by_name(%22group_name%22).click()%0A wd.find_element_by_name(%22group_na... |
4e8177bca4335c34950adb54c0bca4bca59ef0c0 | fix error: has no attribute __subclass__ | app/auth/oauth.py | app/auth/oauth.py | from rauth import OAuth2Service
from flask import current_app, url_for, redirect, request, session
class OAuthSignIn(object):
providers = None
def __init__(self, provider_name):
self.provider_name = provider_name
credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name]
self.consumer_id = credenti... | Python | 0.000033 | @@ -686,16 +686,18 @@
subclass
+es
__():%0A%09%09
|
65d91fe8857ab63827f1b85935d8a6647bd57543 | test refactoring | plenum/test/view_change/test_client_req_during_view_change.py | plenum/test/view_change/test_client_req_during_view_change.py | import functools
import pytest
from plenum.common.constants import NODE, TXN_TYPE, GET_TXN
from plenum.common.exceptions import RequestNackedException
from plenum.test.helper import sdk_send_random_and_check, \
sdk_send_random_requests, sdk_get_and_check_replies, sdk_gen_request, \
checkDiscardMsg
from plenum... | Python | 0 | @@ -1,22 +1,4 @@
-import functools%0A%0A
impo
|
fb50596afa08aded35a5c49cd9d4f8a23ae15348 | Add base_duration property setter. | structure/note.py | structure/note.py | """
File: note.py
Purpose: Defines the basic Note class that holds a pitch, duration, dots, tie information.
"""
from structure.abstract_note import AbstractNote
from timemodel.duration import Duration
class Note(AbstractNote):
"""
Class representation for a musical note.
"""
STANDARD_NOTES = {'... | Python | 0 | @@ -1987,32 +1987,219 @@
.__base_duration
+%0A%0A @base_duration.setter%0A def base_duration(self, base_duration):%0A self.__base_duration = base_duration%0A self.__duration = self.base_duration.apply_dots(self.num_dots)
%0A %0A @prope
|
e8056e4e2c5ef55b46a99afaf7664a734b401443 | add pending as a "sent" state | tests/postman.py | tests/postman.py | import os
from notifications_python_client.errors import HTTPError
from config import config
from tests.test_utils import create_temp_csv, RetryException
def send_notification_via_api(client, template_id, to, message_type):
jenkins_build_id = os.getenv('BUILD_ID', 'No build id')
personalisation = {'build_id... | Python | 0.000001 | @@ -2184,16 +2184,27 @@
sending'
+, 'pending'
%7D%0A%0A%0Adef
|
b951c30a856611ba37bba4cc0e6ef294b55650c9 | allow code to be defined as an array of string | web/Language.py | web/Language.py | import json
import os
class Language:
def __init__(self, key):
"""
Initialize the Language object, which will contain concepts for a given structure
:param key: ID of the language in the meta_info.json file
"""
# Add an empty string to convert SafeString to str
sel... | Python | 0.000028 | @@ -3158,38 +3158,39 @@
%22%22%22%0A
-return
+code =
self.concept(co
@@ -3211,16 +3211,106 @@
(%22code%22)
+%0A if isinstance(code, list):%0A code = %22%5Cn%22.join(code)%0A return code
%0A%0A de
|
f97288b74696efe5b06548b776e08a6586e05eae | Add countdown. | LSLBroadcaster.py | LSLBroadcaster.py | # Import modules
from pylsl.pylsl import StreamInfo, StreamOutlet, local_clock
import xdf.xdf as xdf
import collections
import time
import sys
# Python sender example
'''
# first create a new stream info (here we set the name to BioSemi,
# the content-type to EEG, 8 channels, 100 Hz, and float-valued data) The
# last ... | Python | 0.000002 | @@ -5540,16 +5540,92 @@
G ---%22)%0A
+for i in range(10, 0, -1):%0A %0A # Wait one second%0A print(str(i))%0A
sys.stdo
@@ -5635,16 +5635,20 @@
flush()%0A
+
time.sle
@@ -5651,17 +5651,16 @@
.sleep(1
-0
)%0A%0A# Do
|
0781b47512cbab5fc1a090ff68b5f9d434a864af | Update examples/API_v2/lookup_users_using_user_ids.py | examples/API_v2/lookup_users_using_user_ids.py | examples/API_v2/lookup_users_using_user_ids.py | import tweepy
# Replace bearer token value with your own
bearer_token = ""
# Initializing the Tweepy client
client = tweepy.Client(bearer_token)
# Replace User IDs
ids = [2244994945, 6253282]
# By default the user ID, name and username are returned. user_fields can be
# used to specify the additional user data th... | Python | 0 | @@ -401,16 +401,20 @@
sers(ids
+=ids
, user_f
|
54c81494cbbe9a20db50596e68c57e1caa624043 | Add a User post_save hook for creating user profiles | src-django/authentication/signals/user_post_save.py | src-django/authentication/signals/user_post_save.py | from django.contrib.auth.models import User, Group
from django.dispatch import receiver
from django.db.models.signals import post_save
from django.conf import settings
from rest_framework.authtoken.models import Token
@receiver(post_save, sender=User)
def on_user_post_save(sender, instance=None, created=False, **kwar... | Python | 0.000001 | @@ -1,20 +1,66 @@
+from authentication.models import UserProfile%0A
from django.contrib.
@@ -770,16 +770,136 @@
reated:%0A
+ user_profile = UserProfile.objects.create(user=instance, is_email_confirmed=False)%0A user_profile.save()%0A%0A
|
9b678e184a568baea857ca68fcacb5070db6792d | update modulation.py | examples/modulation.py | examples/modulation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import initExample
from lase.core import KClient
# Driver to use
from lase.drivers import Oscillo
# Modules to import
import numpy as np
import matplotlib.pyplot as plt
import time
# Connect to Lase
host = '192.168.1.4' # Lase IP address
client = KClient(host)
drive... | Python | 0.000001 | @@ -59,17 +59,16 @@
Example%0A
-%0A
from las
@@ -225,17 +225,16 @@
t time%0A%0A
-%0A
# Connec
@@ -263,16 +263,17 @@
168.1.4'
+
# Lase
@@ -331,16 +331,17 @@
(client)
+
# Repla
@@ -438,17 +438,19 @@
nt = 15
-#
+ #
mA%0Adrive
@@ -541,16 +541,17 @@
r.dac%5B1,
+
:%5D = amp
@@ -567,23 +567,27 @@
in(2
-*
... |
1014c809638157da85794223c4990b5ae20512fa | Add crawled_at field back | hackernews_scrapy/items.py | hackernews_scrapy/items.py | # -*- coding: utf-8 -*-
import scrapy
class HackernewsScrapyItem(scrapy.Item):
title = scrapy.Field()
url = scrapy.Field()
| Python | 0 | @@ -110,24 +110,70 @@
url = scrapy.Field()%0A
+ crawled_at = scrapy.Field(serializer=str)%0A
|
d8cb4384f32f4d0e20f3212a36cc01915260f7a8 | Support custom actions in search router | tests/routers.py | tests/routers.py | """Search router."""
from rest_framework.routers import DefaultRouter, Route
class SearchRouter(DefaultRouter):
"""Custom router for search endpoints.
Search endpoints don't follow REST principles and thus don't need
routes that default router provides.
"""
routes = [
Route(
... | Python | 0 | @@ -63,16 +63,30 @@
tRouter,
+ DynamicRoute,
Route%0A%0A
@@ -518,15 +518,1030 @@
)
+,%0A # Dynamically generated list routes. Generated using%0A # @action(detail=False) decorator on methods of the viewset.%0A DynamicRoute(%0A url=r'%5E%7Bprefix%7D/%7Burl_path%7D%7Btrailing_sla... |
43922bb7cf5015cbf3538195d3d4f93ff8c9ec18 | Bump version | tomb_cli/__about__.py | tomb_cli/__about__.py | __title__ = 'tomb_cli'
__summary__ = 'Top level CLI command for tomb'
__uri__ = 'http://github.com/tomborine/tomb_cli'
__version__ = '0.0.1'
__author__ = 'John Anderson'
__email__ = 'sontek@gmail.com'
__license__ = 'MIT'
__copyright__ = '2015 John Anderson (sontek)'
| Python | 0 | @@ -131,17 +131,17 @@
= '0.0.
-1
+2
'%0A__auth
|
14d5a55a129546585fad6f9ff8c0db9de791ab72 | Reset default_n_iters to 10 | python/examples/conv/conv_1d_bench.py | python/examples/conv/conv_1d_bench.py | # RUN: %PYTHON %s 2>&1 | FileCheck %s
# This file contains simple test cases that combine various codegen options.
from ..core.experts import *
from ..core.harness import *
from ..core.transforms import *
from .definitions import *
import typing as tp
fun_name = 'conv_1d_nwc_wcf_main'
op_name = 'linalg.conv_1d_nwc... | Python | 0.000016 | @@ -2872,16 +2872,17 @@
iters=10
+0
,%0A
|
18f373ffc1e49b33708ae2303b61ccf76ffa686e | Use pylab.load to read in data. | examples/ortho_demo.py | examples/ortho_demo.py | from matplotlib import rcParams, use
rcParams['numerix'] = 'Numeric' # make sure Numeric is used (to read pickle)
from matplotlib.toolkits.basemap import Basemap
import cPickle
from pylab import *
# read in topo data from pickle (on a regular lat/lon grid)
topodict = cPickle.load(open('etopo20.pickle','rb'))
etopo = t... | Python | 0.000094 | @@ -1,119 +1,4 @@
-from matplotlib import rcParams, use%0ArcParams%5B'numerix'%5D = 'Numeric' # make sure Numeric is used (to read pickle)%0A
from
@@ -45,23 +45,8 @@
map%0A
-import cPickle%0A
from
@@ -125,135 +125,131 @@
id)%0A
+e
topo
-dict = cPickle.load(open('etopo20.pickle','rb'))%0Aetopo = topodict%5B'data'%... |
f41e620de3eedd38fc7444696bd384cf6ed0dfa4 | Rename blocks => structure and add display_full_screen and exit_url fields. | studies/models.py | studies/models.py | import uuid
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.utils.text import slugify
from guardian.shortcuts import assign_perm
from transitions.extensions import GraphMachine as Machine
from accounts.models import DemographicData, Organiza... | Python | 0 | @@ -1054,14 +1054,17 @@
-blocks
+structure
= D
@@ -1099,16 +1099,142 @@
t=dict)%0A
+ display_full_screen = models.BooleanField(default=True)%0A exit_url = models.URLField(default=%22https://lookit.mit.edu/%22)%0A
stat
|
35d0ce026741c65cdb834f5828ef4000f6d06150 | fix for runtest path handling from Marek | tests/runtest.py | tests/runtest.py | #! /usr/bin/env python
"""
Test runner for main pygr tests.
Collects all files ending in _test.py and executes them with
unittest.TextTestRunner.
"""
import os, sys, re, unittest, shutil, re, shutil
from testlib import testutil, testoptions
from pygr import logger
def all_tests():
"Returns all file names that en... | Python | 0 | @@ -392,15 +392,47 @@
(os.
-getcwd(
+path.normpath(os.path.dirname(__file__)
))%0A
|
6d4c5618db43725c0af2b37661911a960bfa0aa2 | Allow an already deleted watch to not fail the stack.delete(). | heat/engine/cloud_watch.py | heat/engine/cloud_watch.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicab... | Python | 0 | @@ -3297,32 +3297,49 @@
e.delete(self)%0A%0A
+ try:%0A
db_api.w
@@ -3381,24 +3381,73 @@
, self.name)
+%0A except Exception as ex:%0A pass
%0A%0A se
|
2ab2927b2ee4f821fd75050da19a7f1f81aaeca8 | FIX divide mnist features by 255 in mlp example (#11961) | examples/neural_networks/plot_mnist_filters.py | examples/neural_networks/plot_mnist_filters.py | """
=====================================
Visualization of MLP weights on MNIST
=====================================
Sometimes looking at the learned coefficients of a neural network can provide
insight into the learning behavior. For example if weights look unstructured,
maybe some were not used at all, or if very l... | Python | 0 | @@ -1221,16 +1221,29 @@
_y=True)
+%0AX = X / 255.
%0A%0A# resc
|
45c67e0b9bc168549fdd1eb2cde3599aae921567 | Update base.py | webhook/base.py | webhook/base.py | """
Base webhook implementation
"""
import json
from django.http import HttpResponse
from django.views.generic import View
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
class WebhookBase(View):
"""
Simple Webhook base class to handle the most stand... | Python | 0.000001 | @@ -709,13 +709,8 @@
data
-=None
):%0A
|
1abd5833ef8936185f4c8870d300b3793da4ce00 | Fix regex for parsing Solr dates. The solr documentation suggests it will always use 4-digit years. In practice, though, it returns < 4 digits for years before 1000 AD. This fixes the date-parsing regex to account for the discrepancy. | sunburnt/dates.py | sunburnt/dates.py | from __future__ import absolute_import
import datetime
import re
import warnings
try:
import mx.DateTime
except ImportError:
warnings.warn(
"mx.DateTime not found, retricted to Python datetime objects",
ImportWarning)
mx = None
year = r'[+/-]?\d*\d\d\d\d'
tzd = r'Z|((?P<tzd_sign>[-+])(?P... | Python | 0 | @@ -274,17 +274,9 @@
%5D?%5Cd
-*%5Cd%5Cd%5Cd%5Cd
++
'%0Atz
|
4c085d301c3c70c9e8f2299cb9f5dbd0fedd5954 | Fix add_converter. | sunpy/net/attr.py | sunpy/net/attr.py | from itertools import chain, repeat
from sunpy.util.multimethod import MultiMethod
class Attr(object):
def __and__(self, other):
if isinstance(other, AttrOr):
return AttrOr([elem & self for elem in other.attrs])
if self.collides(other):
return NotImplemented
return ... | Python | 0 | @@ -4735,44 +4735,59 @@
-nargs, nkw
+args = list(args)%0A
args
+%5B1%5D
= fun(
-*
args
-, **kwargs
+%5B1%5D
)%0A
@@ -4813,27 +4813,28 @@
lf.apply
+mm
(*
-n
args, **
nkwargs)
@@ -4817,33 +4817,32 @@
pplymm(*args, **
-n
kwargs)%0A
@@ -4939,44 +4939,59 @@
-nargs, nkw
+args = li... |
a751e7f51412581e14cc822f1e443ed97746055a | Update structures example | examples/structures.py | examples/structures.py | from numba import struct, jit, double
import numpy as np
record_type = struct([('x', double), ('y', double)])
record_dtype = record_type.get_dtype()
a = np.array([(1.0, 2.0), (3.0, 4.0)], dtype=record_dtype)
@jit(argtypes=[record_type[:]])
def hypot(data):
# return types of numpy functions are inferred
result... | Python | 0 | @@ -430,16 +430,123 @@
access%0A
+ # You can also index by field name or field index:%0A # data%5Bi%5D.x == data%5Bi%5D%5B'x'%5D == data%5Bi%5D%5B0%5D%0A
for
|
f6045517b27bf6f878ab2906aa6b793cfd640786 | upgrade anymail | toucan_conf/settings/prod/__init__.py | toucan_conf/settings/prod/__init__.py | import os
from .. import *
try:
from ..secrets import ALLOWED_HOSTS
except ImportError:
raise ImportError('Please set ALLOWED_HOSTS in the secrets file when using production config.')
try:
from ..secrets import ANYMAIL
except ImportError:
raise ImportError('Please set ANYMAIL settings in the secrets ... | Python | 0 | @@ -545,15 +545,13 @@
gun.
-M
+Em
ail
-gun
Back
|
7efa7bc0d0d2c97c8064e2a8f292c040528346e7 | Test radio widget | tests/widgets.py | tests/widgets.py | from __future__ import unicode_literals
from unittest import TestCase
from wtforms.widgets import html_params, Input
from wtforms.widgets import *
from wtforms.widgets import html5
class DummyField(object):
def __init__(self, data, name='f', label='', id='', type='TextField'):
self.data = data
se... | Python | 0 | @@ -2089,24 +2089,54 @@
pes%22%22%22%0A%0A
+def setUp(self):%0A self.
field = Dumm
@@ -3376,20 +3376,295 @@
-pass # TODO
+self.field.checked = True%0A expected = '%3Cinput checked id=%22id%22 name=%22bar%22 type=%22radio%22 value=%22foo%22%3E'%0A self.assertEqual(RadioInput()(self.fiel... |
cf18c2cf2516dfe0e06df336f90d9f0a730d5a23 | remove pprint output for ClientException | hp3parclient/exceptions.py | hp3parclient/exceptions.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 Hewlett Packard Development Company, L.P.
# 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
#
# ... | Python | 0.000001 | @@ -1254,37 +1254,8 @@
e):%0A
- pprint.pprint(error)%0A
|
193d911536799751c9ec29571cb8091bcd187087 | fix uraseuranta py | pdi_integrations/arvo/python_scripts/get_arvo_uraseuranta.py | pdi_integrations/arvo/python_scripts/get_arvo_uraseuranta.py | #import json
import requests
#import os
from pandas.io.json import json_normalize
#import datetime
import os
try:
api_key = os.environ['AUTH_API_KEY']
except KeyError:
print("API-key missing")
result = []
good_result=[]
filtered_result=[]
urls = []
url = 'https://arvo.csc.fi/api/vipunen/uraseuranta'
reqhe... | Python | 0.000001 | @@ -92,17 +92,30 @@
atetime%0A
+import base64
%0A
-
import o
@@ -199,16 +199,19 @@
API-key
+is
missing%22
@@ -212,17 +212,113 @@
ssing%22)%0A
-%0A
+try:%0A api_user = os.environ%5B'AUTH_API_USER'%5D%0Aexcept KeyError:%0A print(%22API-user is missing%22)
%0A%0Aresult
@@ -487,32 +487,226 @@
s%5B'A
-uthori... |
a0f7ca32edd5c924366738e0e6d6b8ab4e483cc8 | Undo last commit. | foliant/utils.py | foliant/utils.py | '''Various utilities used here and there in the Foliant code.'''
from contextlib import contextmanager
from pkgutil import iter_modules
from importlib import import_module
from shutil import rmtree
from pathlib import Path
from logging import Logger
from typing import Dict, Tuple, Type, Set
from halo import Halo
de... | Python | 0 | @@ -2008,60 +2008,8 @@
_):%0A
- if modname == 'base':%0A continue%0A%0A
|
8c631a450a804c1e0ba2c4d22329e4bc2967d5aa | Deal with the differences between different versions of libxml | tickets/tests.py | tickets/tests.py | ##
# Copyright (C) 2014 Jessica Tallon & Matt Molyneaux
#
# This file is part of Inboxen.
#
# Inboxen 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
#... | Python | 0 | @@ -5541,24 +5541,378 @@
ody(), %22%22)%0A%0A
+ def assertHtmlEqual(self, first, second, *args):%0A %22%22%22Normalise HTML and compare%0A%0A LXML seems to deal with whitespace differently on different systems, so%0A we strip it out before comparing%0A %22%22%22%0A first = %22%22.... |
77859dbc019a19222ada36ebccc849ba77649a86 | add to unicode functions to all forum models | forums/models.py | forums/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
class Category(models.Model):
name = models.CharField(_("Name"), max_length=255, unique=True)
position = models.IntegerField(_("Position"), default=0)
class Meta:
orde... | Python | 0 | @@ -330,24 +330,77 @@
position'%5D%0A%0A
+ def __unicode__(self):%0A return self.name%0A%0A
%0Aclass Forum
@@ -708,24 +708,77 @@
position'%5D%0A%0A
+ def __unicode__(self):%0A return self.name%0A%0A
%0Aclass Topic
@@ -1095,16 +1095,69 @@
ated'%5D%0A%0A
+ def __unicode__(self):%0A retu... |
f22ad01d72b8ab2a12bf68a23b79c9a1b2e6f237 | Standardizing all to uppercase for compare | tms/tms_utils.py | tms/tms_utils.py |
# Local modules
from common import telegram_utils
from tms import tms_data
class Verse():
def __init__(self, ref, title, pack, pos):
self.reference = ref
self.title = title
self.pack = pack
self.position = pos
def get_reference(self):
return self.reference
de... | Python | 0.99991 | @@ -620,12 +620,13 @@
def
-find
+query
_pac
@@ -657,16 +657,24 @@
= query.
+upper().
strip().
@@ -983,934 +983,968 @@
def
-get_all_pack_keys():%0A return tms_data.get_tms().keys()%0A%0Adef get_verse_by_pack(pack, pos):%0A select_pack = get_pack(pack)%0A%0A if select_pack is not None:%0A select_ve... |
694df5ba69e4e7123009605e59c2b5417a3b52c5 | Remove print statement about number of bins | tools/fitsevt.py | tools/fitsevt.py | #! /usr/bin/python3
import sys
import os
import math
from astropy.io import fits
inputFolder = sys.argv[1]
outputFolder = sys.argv[2]
eLo = int(sys.argv[3])
eHi = int(sys.argv[4])
binSize = int(sys.argv[5])
fnames = os.listdir(inputFolder)
for fname in fnames:
print(fname)
hdulist = fits.open(inputFolder+"/"+fna... | Python | 0.003864 | @@ -475,23 +475,8 @@
ins%0A
-%09%09print(nBins)%0A
%09%09%0A%09
|
cbe5c11a151cc93bed9702289b40c61203e6cca4 | Fix original file path in mkdiffs tool | tools/mkdiffs.py | tools/mkdiffs.py | #!/usr/bin/env python
#
# Copyright 2016, IBM US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | Python | 0.00003 | @@ -3853,16 +3853,25 @@
it_dir +
+ os.sep +
project
|
22a4644bd510a8b786d181c01c20f3dc522dac8d | Update corehq/apps/auditcare/migrations/0004_add_couch_id.py | corehq/apps/auditcare/migrations/0004_add_couch_id.py | corehq/apps/auditcare/migrations/0004_add_couch_id.py | # Generated by Django 2.2.20 on 2021-05-21 17:32
from django.db import migrations, models
ACCESS_INDEX = "audit_access_couch_10d1b_idx"
ACCESS_TABLE = "auditcare_accessaudit"
NAVIGATION_EVENT_INDEX = "audit_nav_couch_875bc_idx"
NAVIGATION_EVENT_TABLE = "auditcare_navigationeventaudit"
def _create_index_sql(table_n... | Python | 0 | @@ -1214,21 +1214,32 @@
=models.
-Index
+UniqueConstraint
(fields=
@@ -1251,16 +1251,60 @@
ch_id'%5D,
+ condition=models.Q(couch_id__isnull=False),
name=AC
|
11405d9ee340cdae33eaaa98469f9e9a43de26dc | Enable Etherbone by default also defaults to Crossover UART when kwargs is empty. | litex_boards/targets/sds1104xe.py | litex_boards/targets/sds1104xe.py | #!/usr/bin/env python3
#
# This file is part of LiteX-Boards.
#
# Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
# Build/Use ----------------------------------------------------------------------------------------
# Build/Load bitstream:
# ./sds1104xe.py --with... | Python | 0 | @@ -2258,12 +2258,11 @@
one=
-Fals
+Tru
e, e
@@ -2449,25 +2449,29 @@
if kwargs
-%5B
+.get(
%22uart_name%22%5D
@@ -2469,17 +2469,27 @@
rt_name%22
-%5D
+, %22serial%22)
== %22ser
|
0c816aaa82ee9fee1ee244c6b96c1a2718ec836e | use default python command from the environment | testrunner.py | testrunner.py | #!/usr/bin/python
import os
import sys
import unittest
USAGE = """%prog SDK_PATH TEST_PATH
Run unit tests for App Engine apps."""
SDK_PATH_manual = '/usr/local/google_appengine'
TEST_PATH_manual = '../unittests'
def main(sdk_path, test_path):
os.chdir('backend')
sys.path.extend([sdk_path, '.', '../lib', '../test... | Python | 0.000001 | @@ -4,16 +4,20 @@
usr/bin/
+env
python%0Ai
|
ec2aaf86f2002b060f6e5b4d040961a37f89d06a | Update rearrange-string-k-distance-apart.py | Python/rearrange-string-k-distance-apart.py | Python/rearrange-string-k-distance-apart.py | # Time: O(nlogc), c is the count of unique characters.
# Space: O(c)
from collections import defaultdict
from heapq import heappush, heappop
class Solution(object):
def rearrangeString(self, str, k):
"""
:type str: str
:type k: int
:rtype: str
"""
if k == 0:
... | Python | 0.000046 | @@ -1,8 +1,854 @@
+# Time: O(n)%0A# Space: O(n)%0A%0Aclass Solution(object):%0A def rearrangeString(self, str, k):%0A %22%22%22%0A :type str: str%0A :type k: int%0A :rtype: str%0A %22%22%22%0A cnts = %5B0%5D * 26;%0A for c in str:%0A cnts%5Bord(c) - ord('a... |
392cf8f05b6c23600e7a61a51494771ab08f2274 | add exceptions to should_curry | toolz/curried.py | toolz/curried.py | """
Alternate namespece for toolz such that all functions are curried
Currying provides implicit partial evaluation of all functions
Example:
Get usually requires two arguments, an index and a collection
>>> from toolz.curried import get
>>> get(0, ('a', 'b'))
'a'
When we use it in higher order ... | Python | 0.000011 | @@ -812,16 +812,60 @@
n None%0A%0A
+exceptions = set((toolz.map, toolz.filter))%0A
%0Adef sho
@@ -889,16 +889,17 @@
return
+(
callable
@@ -932,16 +932,48 @@
(f) %3E 1%0A
+ or f in exceptions)%0A
%0A%0Ad = di
|
6c3d1a36f542e7162d962beccd40245fca026521 | Fix bug with one-liner hashlib | tptapi/client.py | tptapi/client.py | import requests
import six
import hashlib
from . import errors
def md5(data):
return hashlib.md5().update(bytes(data)).hexdigest()
class Client(object):
def __init__(self):
self.base_url = "http://powdertoy.co.uk"
def _get(self, url, params=None):
headers = {
"X-Auth-User-Id":... | Python | 0.000001 | @@ -99,17 +99,8 @@
md5(
-).update(
byte
|
f5810cb764e81ba2acf3253891fb66197c5f3105 | Bump version number | VMEncryption/main/Common.py | VMEncryption/main/Common.py | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2015 Microsoft 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
#
# ... | Python | 0.000002 | @@ -731,20 +731,16 @@
ForLinux
-Test
'%0A ex
@@ -769,17 +769,17 @@
.0.99923
-3
+4
'%0A ex
|
bd3559a51eebaeb409e203c738aaa81e0071deec | update code in compute.py resource to match other resource pattern | xos/tosca/resources/compute.py | xos/tosca/resources/compute.py | import os
import pdb
import sys
import tempfile
sys.path.append("/opt/tosca")
from translator.toscalib.tosca_template import ToscaTemplate
from core.models import Slice,Sliver,User,Flavor,Node,Image
from nodeselect import XOSNodeSelector
from imageselect import XOSImageSelector
from flavorselect import XOSFlavorSelect... | Python | 0 | @@ -1494,16 +1494,47 @@
e.name%0A%0A
+ args = %7B%22name%22: name%7D%0A%0A
@@ -2807,61 +2807,29 @@
-return %7B%22name%22: name,%0A
+args%5B
%22image%22
-:
+%5D =
image
-,
%0A
@@ -2837,31 +2837,29 @@
-
+args%5B
%22slice%22
-:
+%5D =
slice
-,
%0A
@@ -286... |
778bab1b4f57eb03137c00203d7b5f32c018ca83 | fix error | ImagePaste.py | ImagePaste.py | # import sublime
import sublime_plugin
import os
package_file = os.path.normpath(os.path.abspath(__file__))
package_path = os.path.dirname(package_file)
lib_path = os.path.join(package_path, "lib")
if lib_path not in sys.path:
sys.path.append(lib_path)
print(sys.path)
from PIL import ImageGrab
from PIL import... | Python | 0.000002 | @@ -41,16 +41,27 @@
mport os
+%0Aimport sys
%0A%0Apackag
|
734457ed995a3dfcacf8556ed4e98e7536e63a66 | Fix typos | nodeconductor/openstack/management/commands/initsecuritygroups.py | nodeconductor/openstack/management/commands/initsecuritygroups.py | from __future__ import unicode_literals
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from nodeconductor.openstack import models, executors, handlers
class Command(BaseCommand):
help_text = "Add default security groups with given names to all tenants to tenan... | Python | 0.999537 | @@ -301,19 +301,8 @@
all
-tenants to
tena
@@ -1237,18 +1237,17 @@
ready ha
-ve
+s
securit
|
b5b38d5ba76e61bc14e25a45394424436e323c5d | fix reduction2 index dict | utils/speedyvec/vectorizers/subject_verb_agreement.py | utils/speedyvec/vectorizers/subject_verb_agreement.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Generate a model capable of detecting subject-verb agreement errors"""
from pattern.en import lexeme, tenses
from pattern.en import pluralize, singularize
from textstat.textstat import textstat
from time import sleep
import hashlib... | Python | 0 | @@ -1128,29 +1128,16 @@
thrice%0A
-reductions =
cur.exec
@@ -1402,16 +1402,19 @@
idx = %7Bn
+%5B0%5D
: i for
@@ -1421,11 +1421,8 @@
i, n
-%5B1%5D
in
@@ -1431,26 +1431,19 @@
umerate(
-reductions
+cur
)%7D %0Anum_
|
b14133db8127fd4584de3399893c3f7fcbc7f0ba | Optimise get_most_common_from_counter func | matasano-crypto-solutions/set1.py | matasano-crypto-solutions/set1.py | from base64 import b64encode
from binascii import hexlify
from collections import Counter, defaultdict
from string import ascii_letters
from typing import Dict
from pathlib import Path
import os
current_dir = str(Path(__file__).parent)
def get_most_common_from_counter(counter: Counter, n: int):
"""Like counter.m... | Python | 0.998997 | @@ -1161,16 +1161,19 @@
+last_
num
-s
=
-%5B
elem
@@ -1179,21 +1179,40 @@
ms%5B0%5D%5B1%5D
-%5D
%0A
+ total_nums_so_far =
i = 1%0A
@@ -1257,17 +1257,25 @@
if
-len(nums)
+total_nums_so_far
%3E=
@@ -1290,16 +1290,16 @@
m %3C
-nums%5B-1%5D
+last_num
:%0A
@@ -1401,16 +1401,27 @@
#
+ el... |
8463c22898210990e911580d217559efdbbfe5d7 | Make disk space test optional | earth_enterprise/src/fusion/portableglobe/cutter/cgi-bin/geecheck_tests/user_tests/disk_space_test.py | earth_enterprise/src/fusion/portableglobe/cutter/cgi-bin/geecheck_tests/user_tests/disk_space_test.py | #!/usr/bin/env python
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | Python | 0.000007 | @@ -639,16 +639,50 @@
ee as ET
+%0Afrom geecheck_tests import common
%0A%0A# Need
@@ -2010,16 +2010,96 @@
Case):%0A%0A
+ @unittest.skipUnless(common.IsFusionInstalled(), 'Fusion is not installed')%0A
def
|
88db3ab0e09639d07a0374f9e1877ae3a3669fd4 | Use more unittest.TestCase.assertIn instead of *.assertTrue(foo in bar). | utils/swift_build_support/tests/products/test_llvm.py | utils/swift_build_support/tests/products/test_llvm.py | # tests/products/test_llvm.py -----------------------------------*- python -*-
#
# This source file is part of the LLVM.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the LLVM project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt f... | Python | 0 | @@ -2550,20 +2550,18 @@
f.assert
-True
+In
(expecte
@@ -2565,19 +2565,17 @@
cted_arg
- in
+,
llvm.cm
@@ -2849,36 +2849,34 @@
self.assert
-True
+In
('-DLLVM_ENABLE_
@@ -2895,35 +2895,9 @@
RUE'
- in%0A
+,
llv
@@ -3141,20 +3141,18 @@
f.assert
-True
+In
('-DLLVM
@@ -3180,35 +3180,9 @... |
a602ed873d71253723f07dfa043d959cd247d734 | Add latest version of py-typing (#13287) | var/spack/repos/builtin/packages/py-typing/package.py | var/spack/repos/builtin/packages/py-typing/package.py | # Copyright 2013-2019 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 PyTyping(PythonPackage):
"""This is a backport of the standard library typing module to Py... | Python | 0 | @@ -480,17 +480,19 @@
yping-3.
-6
+7.4
.1.tar.g
@@ -528,16 +528,114 @@
ping'%5D%0A%0A
+ version('3.7.4.1', sha256='91dfe6f3f706ee8cc32d38edbbf304e9b7583fb37108fef38229617f8b3eba23')%0A
vers
@@ -823,72 +823,8 @@
')%0A%0A
- # You need Python 2.7 or 3.3+ to install the typing package%0A
@@ -852,17 +85... |
efc5d0a3b49d193910b426198d24a3440483f71f | version update + fix for compilers newer than gcc5 (#28243) | var/spack/repos/builtin/packages/snap-korf/package.py | var/spack/repos/builtin/packages/snap-korf/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)
class SnapKorf(MakefilePackage):
"""SNAP is a general purpose gene finding program suitable for both
eukaryoti... | Python | 0 | @@ -478,16 +478,146 @@
tar.gz%22%0A
+ git = %22https://github.com/KorfLab/SNAP.git%22%0A%0A version('2021-11-04', commit='62ff3120fceccb03b5eea9d21afec3167dedfa94')
%0A ver
@@ -761,129 +761,682 @@
'))%0A
+%0A
de
-pends_on('boost')%0A depends_on('sqlite')%0A depends_on('sparsehash')%0A%0A ... |
d3af10b713056b68220a58571a2d06bd426342a2 | Correct terrible, stupid omission | types_builtin.py | types_builtin.py | from base import *
def prim_equal(p1, p2):
return match((p1, p2),
("(PInt(), PInt())", lambda: True),
("(PStr(), PStr())", lambda: True),
("(PChar(), PChar())", lambda: True),
("(PBool(), PBool())", lambda: True),
("_", lambda: False))
def _type_tuple_equal(ts1, ts2):
i... | Python | 0.999965 | @@ -2984,16 +2984,140 @@
)%22, f),%0A
+ (%22TData(dt, ts)%22, lambda dt, ts:%0A TData(dt, %5Bmap_type_vars(f, t) for t in ts%5D)),%0A
|
d4adaaf52a81c0d471657672fee5b5ed2ad4e306 | update export agency stats | export_agency_stats.py | export_agency_stats.py | #!/usr/bin/env python2
import requests
import unicodecsv
from utils import get_api_key
token = get_api_key()
url = 'https://www.muckrock.com/api_v1/'
headers = {'Authorization': 'Token %s' % token, 'content-type': 'application/json'}
next_ = url + 'agency'
fields = (
"id",
"name",
"slug",
... | Python | 0 | @@ -17,16 +17,40 @@
ython2%0A%0A
+from time import sleep%0A%0A
import r
@@ -1217,16 +1217,102 @@
ge = 1%0A%0A
+# make this true while exporting data to not crash on errors%0ASUPRESS_ERRORS = False %0A%0A
# This a
@@ -1588,16 +1588,46 @@
tion_id%0A
+ sleep(1) # rate limit%0A
@@ -2832,22 +2832,8 @@
... |
70249d061e92f6d1e7254a9c9899c40f3c2083c8 | Add Route.from_environ. | webstar/core.py | webstar/core.py | """Module containing tools to assist in building of WSGI routers.
This routing system works by tracking the UNrouted part of the request, and
watching how it changes as it passes through various routers.
"""
import collections
import logging
import posixpath
log = logging.getLogger(__name__)
HISTORY_ENVIRON_KE... | Python | 0 | @@ -685,32 +685,134 @@
ute(list):%0A %0A
+ @staticmethod%0A def from_environ(environ):%0A return environ.get(HISTORY_ENVIRON_KEY)%0A %0A
def __init__
|
24f485f256279e2fc86c12cdf383c93850f7f328 | Add utility method to check if message sender is admin | IrcMessage.py | IrcMessage.py | import time
import Constants
class IrcMessage(object):
"""Parses incoming messages into usable parts like the command trigger"""
def __init__(self, messageType, bot, user=None, source=None, rawText=""):
self.createdAt = time.time()
#MessageType is what kind of message it is. A 'say', 'action' or 'quit', for i... | Python | 0.000005 | @@ -2866,8 +2866,210 @@
getype)%0A
+%0A%09def isSenderAdmin(self):%0A%09%09%22%22%22%0A%09%09:return: True if the person that sent this message is a bot admin, False otherwise%0A%09%09%22%22%22%0A%09%09return self.bot.isUserAdmin(self.user, self.userNickname, self.userAddress)%0A
|
cfb5f0692bc381507691e8bcaa85a61ec37f8c12 | change validator to test for valid source case insensitive | anyway/backend_constants.py | anyway/backend_constants.py | from enum import Enum
from typing import List
class BackEndConstants(object):
MARKER_TYPE_ACCIDENT = 1
MARKER_TYPE_DISCUSSION = 2
CBS_ACCIDENT_TYPE_1_CODE = 1
UNITED_HATZALA_CODE = 2
CBS_ACCIDENT_TYPE_3_CODE = 3
RSA_PROVIDER_CODE = 4
BIKE_ACCIDENTS = 21
AGE_GROUPS_NUMBER = 18
... | Python | 0.000001 | @@ -3295,32 +3295,203 @@
s Source(Enum):%0A
+ @classmethod%0A def _missing_(cls, value):%0A for member in cls:%0A if member.value == value.lower():%0A return member%0A
YNET = %22
|
6641fd1275c27dfb27787ed25b80af3b6ba14b9f | debug by further reduction | apdflash/scarecrowDreams.py | apdflash/scarecrowDreams.py | import sys,os
sys.path.insert(0, '../helpers')
from mpi4py import MPI
| Python | 0 | @@ -1,72 +1,22 @@
-import sys,os%0Asys.path.insert(0, '../helpers')%0A%0Afrom mpi4py import MPI
+print %22hellow world%22
%0A%0A
|
14b1f9bde45b66f8752778469f1daae77b49f4e0 | Add comment | bluebottle/bb_orders/signals.py | bluebottle/bb_orders/signals.py | from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from django.dispatch.dispatcher import Signal
from django_fsm.signals import post_transition
from bluebottle.donations.models import Donation
from bluebottle.payments.models import OrderPayment
from bluebottle.payments.se... | Python | 0 | @@ -919,16 +919,64 @@
r total.
+%0A%0A # Import it here to avoid circular imports
%0A fro
|
5e371a6aea1c3c0eb126849ef4c5855202b05cfa | Use standard name for output files | packages/cardpay-reward-programs/cardpay_reward_programs/utils.py | packages/cardpay-reward-programs/cardpay_reward_programs/utils.py | import tempfile
from pathlib import PosixPath
import pyarrow.parquet as pq
import yaml
from cloudpathlib import AnyPath, CloudPath
from cachetools import cached, TTLCache
def get_local_file(file_location):
if isinstance(file_location, PosixPath):
return file_location.as_posix()
elif isinstance(file_... | Python | 0.000009 | @@ -3638,31 +3638,27 @@
emp_dir)
-.joinpath(%22data
+ / %22results
.parquet
@@ -3658,17 +3658,16 @@
parquet%22
-)
%0A
@@ -3747,20 +3747,23 @@
inpath(%22
-data
+results
.parquet
|
e1b9bcccbc3d4f29a7f7c66623f695bd062cb8e1 | clean up usage of query file in collector | synt/collector.py | synt/collector.py | # -*- coding: utf-8 -*-
import time, datetime
import os
import bz2
import urllib2
from sqlite3 import IntegrityError
from cStringIO import StringIO
from synt.utils.db import db_init
from synt import config
from kral import stream
def collect(db_name='', commit_every=1000, max_collect=400000, queries_file=''):
"""
... | Python | 0.000001 | @@ -287,27 +287,25 @@
400000, quer
-ies
+y
_file=''):%0A
@@ -619,27 +619,25 @@
er.%0A quer
-ies
+y
_file (str)
@@ -646,19 +646,17 @@
If quer
-ies
+y
file is
@@ -676,16 +676,23 @@
uld be a
+bsolute
path to
@@ -692,18 +692,16 @@
path to
-a
text fil
@@ -705,172 +705,9 @@
file
-%0A ... |
cd0123b2cce81c063f42ff5a9f80665b602bdefd | use the wright product | addons/hr_timesheet_project/wizard/timesheet_hour_encode.py | addons/hr_timesheet_project/wizard/timesheet_hour_encode.py | ##############################################################################
#
# Copyright (c) 2004 TINY SPRL. (http://tiny.be) All Rights Reserved.
# Fabien Pinckaers <fp@tiny.Be>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsabili... | Python | 0.000214 | @@ -1923,35 +1923,38 @@
ts._getEmployee
-Uni
+Produc
t(cr, uid, conte
|
5a9358147c9930faf5b6d153344fb012c4a8f304 | Add MSISDN in the phone_number provider | faker/providers/phone_number/pt_BR/__init__.py | faker/providers/phone_number/pt_BR/__init__.py | from __future__ import unicode_literals
from .. import Provider as PhoneNumberProvider
class Provider(PhoneNumberProvider):
formats = (
'+55 (011) #### ####',
'+55 (021) #### ####',
'+55 (031) #### ####',
'+55 (041) #### ####',
'+55 (051) #### ####',
'+55 (061) ####... | Python | 0.000001 | @@ -1938,8 +1938,398 @@
',%0A )
+%0A msisdn_formats = (%0A '5511#########',%0A '5521#########',%0A '5531#########',%0A '5541#########',%0A '5551#########',%0A '5561#########',%0A '5571#########',%0A '5581#########',%0A )%0A%0A @classmethod%0A def m... |
d8778ac6f6f0b99cacf5f08c28422b7ffe88d420 | Refactor test list credential | tests/test.py | tests/test.py | import os
import shutil
import sys
import unittest
import gnupg
TEST_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import pysswords.db
import pysswords.crypt
from pysswords.utils import touch
class PysswordsTests(unittes... | Python | 0.000001 | @@ -2577,134 +2577,8 @@
il%22%0A
- credential_login = %22email@example.com%22%0A credential_password = %22p4ssw0rd%22%0A credential_comments = %22email%22%0A
@@ -2690,33 +2690,29 @@
th)%0A
-with open
+touch
(credential_
@@ -2730,688 +2730,245 @@
gin%22
-, %22w%22) as f:%0A ... |
faf3c4fe474733965ab301465f695e3cc311169c | Fix PostgresToGCSOperat bool dtype (#25475) | airflow/providers/google/cloud/transfers/postgres_to_gcs.py | airflow/providers/google/cloud/transfers/postgres_to_gcs.py | #
# 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
# "License"); you may not... | Python | 0 | @@ -2961,11 +2961,8 @@
BOOL
-EAN
',%0A
|
ff6e8cc14112b2248c7f68701e288b28ff49c0c2 | return code in get_submission | backend/service/submission.py | backend/service/submission.py | from req import Service
from service.base import BaseService
import config
import os
import re
class Submission(BaseService):
def get_submission_list_admin(self, data={}):
required_args = [{
'name': '+count',
'type': int,
}, {
'name': '+page',
'type'... | Python | 0.00003 | @@ -2433,32 +2433,152 @@
res.fetchone()%0A
+ res%5B'code'%5D = open(os.path.join(config.DATA_ROOT, 'data/submissions', str(res%5B'id'%5D), res%5B'file_name'%5D)).read()%0A
return (
|
374ef731e658097f9b2d2d7593ed1126ec52d282 | Fix issues with `skip_unknown` | ycml/transformers/sequences.py | ycml/transformers/sequences.py | import logging
from .base import PureTransformer
from .text import ListCountVectorizer
__all__ = ['TokensToIndexTransformer']
logger = logging.getLogger(__name__)
class TokensToIndexTransformer(PureTransformer):
def __init__(self, ignore_unknown=False, pad_sequences=None, count_vectorizer_args={}, pad_sequence... | Python | 0 | @@ -233,22 +233,20 @@
_(self,
-ignore
+skip
_unknown
@@ -408,30 +408,28 @@
self.
-ignore
+skip
_unknown = i
@@ -427,22 +427,20 @@
known =
-ignore
+skip
_unknown
@@ -1186,69 +1186,8 @@
ary_
-%0A unknown_index = 1 if self.ignore_unknown else len(V)
%0A%0A
@@ -1347,23 +1347,8 @@
(tok
-, unknown_... |
de6babf92252ea5828a9c17d76766357cff3e440 | Extend _VALID_URL (Closes #10812) | youtube_dl/extractor/tvland.py | youtube_dl/extractor/tvland.py | # coding: utf-8
from __future__ import unicode_literals
from .mtv import MTVServicesInfoExtractor
class TVLandIE(MTVServicesInfoExtractor):
IE_NAME = 'tvland.com'
_VALID_URL = r'https?://(?:www\.)?tvland\.com/(?:video-clips|episodes)/(?P<id>[^/?#.]+)'
_FEED_URL = 'http://www.tvland.com/feeds/mrss/'
_... | Python | 0 | @@ -228,16 +228,26 @@
o-clips%7C
+(?:full-)?
episodes
@@ -1246,19 +1246,166 @@
%0A %7D,%0A
+ %7D, %7B%0A 'url': 'http://www.tvland.com/full-episodes/iu0hz6/younger-a-kiss-is-just-a-kiss-season-3-ep-301',%0A 'only_matching': True,%0A
%7D%5D%0A
|
59d4678e8319320b9b5ccd304b1034188c02ae61 | insert pth eggs at index of site-packages they come from | pkgs/development/python-modules/site/site.py | pkgs/development/python-modules/site/site.py | def __boot():
import sys, imp, os, os.path
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys,'path_importer_cache',{})
stdpath = sys.pat... | Python | 0 | @@ -1620,16 +1620,80 @@
ONPATH:%0A
+ sys.__egginsert = sys.path.index(os.path.abspath(item))%0A
|
fcc5ae524736bffed0a394afe4be31777e74c6b8 | Fix regression w/email vs. delivery_email. | zerver/lib/email_validation.py | zerver/lib/email_validation.py | from typing import Callable, Dict, Optional, Set, Tuple
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from zerver.lib.name_restrictions import is_disposable_domain
# TODO: Move DisposableEmailError, etc. into here.
from zerver.... | Python | 0.00001 | @@ -3929,16 +3929,25 @@
'
+delivery_
email',%0A
@@ -4334,16 +4334,25 @@
= %7Buser.
+delivery_
email.lo
|
a34d08cec2cdcf259070ca51c69dcd425a04c5be | move use_container into execkwargs | tests/util.py | tests/util.py | from __future__ import absolute_import
import os
import functools
from pkg_resources import (Requirement, ResolutionError, # type: ignore
resource_filename)
import distutils.spawn
import pytest
from cwltool.utils import onWindows, windows_default_container_id
from cwltool.factory import Fa... | Python | 0.000009 | @@ -388,27 +388,33 @@
():%0A
-opt
+makekwarg
s = %7B'find_d
@@ -535,16 +535,22 @@
+
'use_con
@@ -562,17 +562,17 @@
r': True
-,
+%7D
%0A
@@ -572,24 +572,27 @@
-
+execkwargs%5B
'default
@@ -632,17 +632,17 @@
ainer_id
-%7D
+%5D
%0A els
@@ -692,19 +692,25 @@
ekwa... |
b06863b3bd9b12c47380362b3d4182167a6d2eaa | Update openssl.py | wigs/openssl.py | wigs/openssl.py | class openssl(Wig):
tarball_uri = 'https://github.com/openssl/openssl/archive/OpenSSL_$RELEASE_VERSION$.tar.gz'
git_uri = 'https://github.com/openssl/openssl'
last_release_version = 'v1_0_2d'
def setup(self):
self.configure_flags += [S.FPIC_FLAG]
def gen_configure_snippet(self):
return './config %s' % ' '.jo... | Python | 0.000002 | @@ -186,13 +186,15 @@
'v1_
-0_2d'
+1_0e'%0A%09
%0A%0A%09d
|
e23ef45a125a3bee8df274a90f48ffd94c632451 | update docstring | buncuts/utils.py | buncuts/utils.py | # coding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import io
import re
default_delimeter = list("。!?▲")
default_quote_dict = {"「": "」", "『": "』"}
class QuoteChecker:
"""Quote ch... | Python | 0 | @@ -661,24 +661,100 @@
elf, char):%0A
+ %22%22%22Return True if the char is outside a quotation, False if not.%22%22%22%0A
if c
|
170aa86b851e34525e150c9cd26c33577438ac87 | interpolate scratch string | polyjit/buildbot/builders/slurm.py | polyjit/buildbot/builders/slurm.py | import sys
from polyjit.buildbot.builders import register
from polyjit.buildbot import slaves
from polyjit.buildbot.utils import (builder, define, git, cmd, ucmd, ucompile,
upload_file, trigger, ip, mkdir,
rmdir, s_sbranch, s_force, s_trigger,
... | Python | 0.000064 | @@ -1332,16 +1332,19 @@
ratch%22,
+ip(
%22/scratc
@@ -1374,16 +1374,17 @@
mber)s%22)
+)
%0A %5D%0A
|
07a77f02ed3d7bd31c0a315c2f4fa76491e0f915 | Use MySQL default port when not set explicitly | tooz/drivers/mysql.py | tooz/drivers/mysql.py | # -*- coding: utf-8 -*-
#
# Copyright © 2014 eNovance
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | Python | 0.000222 | @@ -843,24 +843,55 @@
d lock.%22%22%22%0A%0A
+ MYSQL_DEFAULT_PORT = 3306%0A%0A
def __in
@@ -4593,16 +4593,48 @@
url.port
+ or MySQLLock.MYSQL_DEFAULT_PORT
%0A
|
66c4b93ae78c98928946f0ceeee3a2c16be7655d | Add coding line | app/tests/integration/test_database.py | app/tests/integration/test_database.py | """
Database tests.
"""
from __future__ import unicode_literals
from __future__ import absolute_import
from unittest import TestCase
from lib import database
from models.trends import Trend
class TestDatabaseSetup(TestCase):
"""
Test the database library module.
"""
def tearDown(self):
datab... | Python | 0.000878 | @@ -1,12 +1,36 @@
+# -*- coding: utf-8 -*-%0A
%22%22%22%0ADatabase
|
005eea5e467c3a0aa6b942ce377a5c72b9177e21 | Fix build_lines() - s/bw/image | textinator.py | textinator.py | import click
from PIL import Image
@click.command()
@click.argument('image', type=click.File('rb'))
@click.argument('out', type=click.File('wt'), default='-',
required=False)
@click.option('-p', '--palette', default='█▓▒░ ',
help="A custom palette for rendering images. Goes from dark to b... | Python | 0 | @@ -2069,18 +2069,21 @@
pixel =
-bw
+image
.getpixe
|
1f130a8577f16809008bd301ab8c47aab4677750 | Add build_lines function, move image generation there. | textinator.py | textinator.py | import click
from PIL import Image
def scale(val, src, dst):
"""
Scale the given value from the scale of src to the scale of dst.
"""
return ((val - src[0]) / (src[1]-src[0])) * (dst[1]-dst[0]) + dst[0]
def value_to_char(value, palette, value_range=(0, 256)):
palette_range = (0, len(palette))
... | Python | 0 | @@ -2217,23 +2217,129 @@
L%22)%0A
+%0A
-o_
+for line in build_lines(bw, newlines):%0A click.echo(line)%0A%0A%0Adef build_lines(image, newlines=True):%0A
width,
-o_
heig
@@ -2343,18 +2343,21 @@
eight =
-bw
+image
.size%0A%0A
@@ -2374,18 +2374,16 @@
n range(
-o_
height):
@@ -2401,16 +2401,17 @@... |
bf7fd4e606901fae6a434e4a375ac72bcbc66e00 | Fix plugin | tgp/plugin.py | tgp/plugin.py | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | Python | 0.000001 | @@ -533,24 +533,8 @@
ient
-, format_payload
%0A%0Afr
@@ -1270,96 +1270,13 @@
-try:%0A conf_fp = environ%5B'QP_TARGET_GENE_CONFIG_FP'%5D%0A except KeyError:%0A
+dflt_
conf
@@ -1354,16 +1354,17 @@
+
'config_
@@ -1374,16 +1374,83 @@
e.cfg')%0A
+ conf_fp = environ.get('QP_TARGET_G... |
fe81916434e6aa04d9672589cb75fde3c676e19f | Fix revision chain | src/ggrc/migrations/versions/20151216132037_5410607088f9_delete_background_tasks.py | src/ggrc/migrations/versions/20151216132037_5410607088f9_delete_background_tasks.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: miha@reciprocitylabs.com
# Maintained By: miha@reciprocitylabs.com
"""Delete background tasks
Revision ID: 5410607088f9
Revises: 504f541411a5
Crea... | Python | 0.000003 | @@ -296,28 +296,28 @@
evises:
-504f541411a5
+1ef8f4f504ae
%0ACreate
@@ -498,20 +498,20 @@
= '
-504f541411a5
+1ef8f4f504ae
'%0A%0A%0A
|
701aee990300c777417777ca963f068840532e03 | Add function to delete docker containers for a project | api/library/dockerhelper.py | api/library/dockerhelper.py | import logging
# config
from config import shared_config
from docker import Client
logger = logging.getLogger(shared_config.api_log_root_name + __name__)
"""
Call get_client first, and then pass it to the other functions
"""
def get_client(host_url):
""" Returns a docker api client """
c = Client(base_url=hos... | Python | 0.000001 | @@ -5033,8 +5033,555 @@
rn True%0A
+%0Adef delete_all_containers_from_proj(docker_client, project_name):%0A %22%22%22 Looks for any vms that begin with the prefix of the project name. TODO: Do something else. %22%22%22%0A containers = docker_client.containers(all=True)%0A prefix = project_name.strip().repl... |
0ce840cf43b06fc810bbe45d2aed5fcc591be87c | Add ShortenedUrl class | url_shortener.py | url_shortener.py | # -*- coding: utf-8 -*-
import os
from bisect import bisect_left
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import types
class SlugValueError(ValueError):
'''The value of slug is incorrect '''
class Slug(object):
''' An identifier for shortened url
In has two valu... | Python | 0 | @@ -3617,16 +3617,745 @@
(app)%0A%0A%0A
+class ShortenedUrl(db.Model):%0A ''' Represents a url for which a short alias has been created%0A%0A :var slug: a value representing a registered url in short urls and%0A in database%0A '''%0A slug = db.Column(IntegerSlug, primary_key=True)%0A target = db.Colu... |
07bda8adbeb798dfd100b63a784e14a00cf33927 | add new views to urls | urlsaver/urls.py | urlsaver/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.main_view, name='main'),
]
| Python | 0 | @@ -110,10 +110,181 @@
main'),%0A
+ url(r'%5Eregister/', views.register_view, name='register'),%0A url(r'%5Elogin/', views.login_view, name='login'),%0A url(r'%5Elogout/', views.logout_view, name='logout'),%0A
%5D%0A
|
c8fd797319b7ce79a420942535e08fd291e36491 | Fix Python 2 issue in "fill" image operation | wagtail/wagtailimages/image_operations.py | wagtail/wagtailimages/image_operations.py | from __future__ import division
import inspect
import math
from wagtail.wagtailimages.exceptions import InvalidFilterSpecError
class Operation(object):
def __init__(self, method, *args):
self.method = method
self.args = args
# Check arguments
try:
inspect.getcallargs... | Python | 0.00004 | @@ -5090,61 +5090,129 @@
op((
-math.floor(left), math.floor(top), math.ceil(right),
+%0A int(math.floor(left)),%0A int(math.floor(top)),%0A int(math.ceil(right)),%0A int(
math
@@ -5225,16 +5225,26 @@
bottom))
+%0A )
)%0A%0A
|
38d47061b6c1ea3250b99f7376d7479e970974a5 | define cheakInradius | MonteCarlo.py | MonteCarlo.py | from math import *
N = int(raw_input('Insert your N (random) :: '))
print N
| Python | 0.99981 | @@ -13,16 +13,123 @@
port *%0A%0A
+def checkInradius(x, y):%0A%09z = x**2 + y**2%0A%09z = sqrt(z)%0A%0A%09if z %3C 1.0:%0A%09%09return True%0A%09else:%0A%09%09return False%0A%0A%0A
N = int(
@@ -173,13 +173,4 @@
'))%0A
-%0Aprint N%0A
|
2ff82cd1e34472173cd8631b8e353515d2c38a41 | Rename get_update_db() into get_wrapupdater() | wrapweb/hook.py | wrapweb/hook.py | # Copyright 2015 The Meson development team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | Python | 0.004751 | @@ -830,25 +830,27 @@
def get_
+wrap
update
-_db
+r
():%0A
@@ -873,31 +873,27 @@
sk.g, %22_
+wrap
update
-_database
+r
%22, None)
@@ -981,23 +981,19 @@
.g._
+wrap
update
-_database
+r
= w
@@ -2569,25 +2569,27 @@
r = get_
+wrap
update
-_db
+r
()%0A
|
e97755dffbc834853f3f46a8233a295671b53f5d | Disable pylint broad-except in wrapweb.hook | wrapweb/hook.py | wrapweb/hook.py | # Copyright 2015 The Meson development team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | Python | 0 | @@ -1417,16 +1417,48 @@
on as e:
+ # pylint: disable=broad-except
%0A
|
7b717c778f02e642c564e9afaf406b0cc4f399ac | Move EE Initialize | geebam/geebam.py | geebam/geebam.py | #! /usr/bin/env python
import argparse
import json
import logging
import logging.config
import os
import sys
import ee
import batch_uploader
def setup_logging(path):
with open(path, 'rt') as f:
config = json.load(f)
logging.config.dictConfig(config)
def delete_collection(id):
logging.info('At... | Python | 0.000001 | @@ -1672,28 +1672,8 @@
'))%0A
- ee.Initialize()%0A
@@ -1762,34 +1762,8 @@
ger'
-, prog='GEE asset manager'
)%0A%0A
@@ -3111,24 +3111,44 @@
arse_args()%0A
+ ee.Initialize()%0A
args.fun
|
33c1db03e6b52d73ee6571f3f645f1b8d01e9a25 | Comment to clarify the use of a custom field source | snippets/serializers.py | snippets/serializers.py | from django.forms import widgets
from rest_framework import serializers
from snippets.models import Snippet, LANGUAGE_CHOICES, STYLE_CHOICES
from django.contrib.auth.models import User
class UserSerializer(serializers.ModelSerializer):
# Add a filed to diplsay a list of related snippets.
snippets = serializer... | Python | 0 | @@ -1938,24 +1938,146 @@
erializer):%0A
+ # To make it more user-friendly, let's use the username instead of the default pk. This is%0A # optional, obviously.%0A
owner =
|
dd9e53cbe02c0652cca35cde6d859512de4f9e44 | fix user_detail pipeline issue | social/pipeline/user.py | social/pipeline/user.py | from uuid import uuid4
from social.utils import slugify, module_member
USER_FIELDS = ['username', 'email']
def get_username(strategy, details, user=None, *args, **kwargs):
if 'username' not in strategy.setting('USER_FIELDS', USER_FIELDS):
return
storage = strategy.storage
if not user:
... | Python | 0 | @@ -3195,16 +3195,20 @@
if
+not
current_
@@ -3217,16 +3217,8 @@
lue
-is None
or n
|
e8542d56aa8d81198351c7354fdbbba2ab7ca455 | Fix portability warning with recent versions of bs4 | cabin-porn-it.py | cabin-porn-it.py | #!/usr/bin/env python
'''
Sets the current screen to a cabin from CabinPorn.com.
Default is set to the most recent picture, which it downloads and puts into a
folder in the current directory.
Optional arguments:
1. '-r', choose a random image from the current page
2. '-i', choose a specific image by the page id
... | Python | 0 | @@ -2214,16 +2214,31 @@
oup(data
+, %22html.parser%22
)%0A%0A # G
|
2b553e23791adaa9e333d6f8feded8e95fd348c9 | Bump version to 0.2.0a0 | cachy/version.py | cachy/version.py | # -*- coding: utf-8 -*-
VERSION = '0.1.1'
| Python | 0.000001 | @@ -35,9 +35,11 @@
'0.
-1.1
+2.0a0
'%0A
|
91129eb86958590c2ec5c4fd5529b20fbc0cc8cf | Make overdue tasks have a red due date | todoman/ui.py | todoman/ui.py | from datetime import datetime
import urwid
import ansi.colour.fx
import ansi.sequence
from dateutil.tz import tzlocal
class TodoEditor:
"""
The UI for a single todo entry.
"""
def __init__(self, todo, databases, formatter):
"""
:param model.Todo todo: The todo object which will be ed... | Python | 0.999719 | @@ -59,16 +59,38 @@
lour.fx%0A
+import ansi.colour.fg%0A
import a
@@ -4042,103 +4042,167 @@
elf.
-empty_date = %22 %22 * len(self.format_date(datetime.now()))%0A self._localtimezone = tzlocal(
+_localtimezone = tzlocal()%0A self.now = datetime.now().replace(tzinfo=self._localtimezone)%0A self.em... |
a9240cd8bcfced47b402fdbff0162ad939eaa631 | Fix typo | Yank/multistate/__init__.py | Yank/multistate/__init__.py | #!/usr/local/bin/env python
# ==============================================================================
# MODULE DOCSTRING
# ==============================================================================
"""
MultiState
==========
Multistate Sampling simulation algorithms, specific variants, and analyzers
This ... | Python | 0.999999 | @@ -2347,16 +2347,17 @@
warning
+s
%0Awarning
|
4a18649367e6593724cdde6cf821eced595bb3cf | use list comprehension for auto-parse | genson/genson.py | genson/genson.py | import argparse
import sys
import re
import json
from .generator import SchemaNode
DESCRIPTION = """
Generate one, unified JSON Schema from one or more
JSON objects and/or JSON Schemas.
(uses Draft 4 - http://json-schema.org/draft-04/schema)
"""
def main():
args = parse_args()
s = SchemaNode()
for sche... | Python | 0.000002 | @@ -3467,61 +3467,8 @@
t)%0A%0A
- json_strings = %5B%5D%0A for string in strings:%0A
@@ -3501,20 +3501,16 @@
aracter%0A
-
json
@@ -3517,24 +3517,20 @@
_strings
-.append(
+ = %5B
string +
@@ -3533,17 +3533,44 @@
ng + '%7D'
-)
+ for string in strings%5B:-1%5D%5D
%0A%0A #
@@ -3630,15 +36... |
c3d454d5d7272620ab83b9e02cc8063d0e16da0f | Add an embedded favicon for error pages | edgedb/lang/common/markup/renderers/dhtml/__init__.py | edgedb/lang/common/markup/renderers/dhtml/__init__.py | ##
# Copyright (c) 2011 Sprymix Inc.
# All rights reserved.
#
# See LICENSE for details.
##
import os
from semantix.rendering.css import dumps as scss_dumps, reload as scss_reload
from .. import json
from ... import serialize
__all__ = 'render',
_HTML_TPL_START = '''<!DOCTYPE html>
<!--
Copyright (c) 2011 Sprymi... | Python | 0 | @@ -246,16 +246,460 @@
der',%0A%0A%0A
+_FAVICON = ('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb'%0A '2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABhQTFRF6+np2VZWmVVVqxUV1qioxhMTuzw8////'%0A 'fKlS/gAAAAh0Uk5T/////////wDeg71ZAAAAbElEQVR42lyOCwrAMAhD47f3v/ES3aAsBY0PteL... |
8f1d2f0e821724f010291d340f30d5842ad32c76 | add word2vec yahoo for shoes | extractVecMat_shoes.py | extractVecMat_shoes.py | #/datastore/zhenyang/bin/python
import sys
import os
import gensim, logging
import numpy as np
import scipy.io as sio
def main():
##############
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
#pretrained_model = './vectors.bin'
#pretrained_model = '../fr... | Python | 0.000238 | @@ -1101,16 +1101,26 @@
+ wordvec =
np.add(
|
57acc4cb74a9fa0747c628fa5abc30e19883febc | add hint to speed up the bounding box calculation | examples/addons/drawing/render_model_space_as_tiles.py | examples/addons/drawing/render_model_space_as_tiles.py | # Copyright (c) 2022, Manfred Moitzi
# License: MIT License
from typing import Iterator
from pathlib import Path
import random
import matplotlib.pyplot as plt
import ezdxf
from ezdxf.addons.drawing import RenderContext, Frontend
from ezdxf.addons.drawing.matplotlib import MatplotlibBackend
from ezdxf import bbox
fro... | Python | 0 | @@ -398,27 +398,30 @@
res
-newer
ezdxf v
-ersion
+0.18b0 or newer
%22%0A%0A#
@@ -2013,12 +2013,10 @@
#
-Reus
+Th
e bo
@@ -2028,25 +2028,33 @@
g box ca
-lculation
+che can be reused
for ent
@@ -2093,24 +2093,25 @@
Cache()%0A
+%0A
# Th
is can t
@@ -2102,18 +2102,42 @@
# Th
-is
+e bounding box cal... |
24f5be6e6a409b7447ccd6fede81b8c55662def4 | add return data | util/strategy.py | util/strategy.py |
import numpy as np
from trendy import segtrends
import pandas as pd
import tradingWithPython as twp
from filter import movingaverage
def orders_from_trends(x, segments=2, charts=True, window=7, momentum=False):
''' generate orders from segtrends '''
x_maxima, maxima, x_minima, minima = segtrends(x, segments, ... | Python | 0.025135 | @@ -3096,10 +3096,29 @@
y data')
+%0A return bt.data
%0A%0A
|
efc26d1e3065f18a80b601e8416abe0a19c83103 | Simplify a test case, NFC | packages/Python/lldbsuite/test/lang/swift/variables/bridged_string/TestSwiftBridgedStringVariables.py | packages/Python/lldbsuite/test/lang/swift/variables/bridged_string/TestSwiftBridgedStringVariables.py | # coding=utf-8
# TestSwiftBridgedStringVariables.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
... | Python | 0.000002 | @@ -1235,818 +1235,129 @@
-exe_name = %22a.out%22%0A exe = self.getBuildArtifact(exe_name)%0A%0A # Create the target%0A target = self.dbg.CreateTarget(exe)%0A self.assertTrue(target, VALID_TARGET)%0A%0A # Set the breakpoints%0A breakpoint = target.BreakpointCreateBySource... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.