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
e908792a8a47b4afc478a89f479ab836d7acea5e
set 2to3 False
setup.py
setup.py
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import absolute_import, division, print_function # # Standard imports # import glob import os import sys from setuptools import setup, find_packages # # desiutil needs to import some of its own code. # sys.path.insert(int(sys.path[0] == ''),os.path.abspath('./py')) from desiutil.setup import DesiModule, DesiTest, DesiVersion, get_version # # Begin setup # setup_keywords = dict() # # THESE SETTINGS NEED TO BE CHANGED FOR EVERY PRODUCT. # setup_keywords['name'] = 'desiutil' setup_keywords['description'] = 'DESI utilities package' setup_keywords['author'] = 'DESI Collaboration' setup_keywords['author_email'] = 'desi-data@desi.lbl.gov' setup_keywords['license'] = 'BSD' setup_keywords['url'] = 'https://github.com/desihub/desiutil' # # END OF SETTINGS THAT NEED TO BE CHANGED. # setup_keywords['version'] = get_version(setup_keywords['name']) # # Use README.rst as long_description. # setup_keywords['long_description'] = '' if os.path.exists('README.rst'): with open('README.rst') as readme: setup_keywords['long_description'] = readme.read() # # Set other keywords for the setup function. These are automated, & should # be left alone unless you are an expert. # # Treat everything in bin/ except *.rst as a script to be installed. # if os.path.isdir('bin'): setup_keywords['scripts'] = [fname for fname in glob.glob(os.path.join('bin', '*')) if not os.path.basename(fname).endswith('.rst')] setup_keywords['provides'] = [setup_keywords['name']] setup_keywords['requires'] = ['Python (>2.7.0)'] # setup_keywords['install_requires'] = ['Python (>2.7.0)'] setup_keywords['zip_safe'] = False setup_keywords['use_2to3'] = True setup_keywords['packages'] = find_packages('py') setup_keywords['package_dir'] = {'':'py'} setup_keywords['cmdclass'] = {'module_file': DesiModule, 'version': DesiVersion, 'test': DesiTest} setup_keywords['test_suite']='{name}.test.{name}_test_suite.{name}_test_suite'.format(**setup_keywords) # # Autogenerate command-line scripts. # # setup_keywords['entry_points'] = {'console_scripts':['desiInstall = desiutil.install.desi_install:main']} # # Add internal data directories. # setup_keywords['package_data'] = {'desiutil.test': ['t/*']} # # Run setup command. # setup(**setup_keywords)
Python
0.999999
@@ -1748,11 +1748,12 @@ %5D = -Tru +Fals e%0Ase
012230b2693a1922cae4bbf163de1b4d23d00b40
Fix beta sample
tensorforce/core/distributions/beta.py
tensorforce/core/distributions/beta.py
# Copyright 2017 reinforce.io. 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 by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """ Beta distribution. """ import tensorflow as tf from tensorforce import util from tensorforce.core.networks import layers from tensorforce.core.distributions import Distribution # TODO Michael: integrate to model, rescale min max class Beta(Distribution): def __init__(self, shape, min_value, max_value, alpha, beta): """ Beta distribution used for continuous actions. In particular, the Beta distribution allows to bound action values with min and max values. Args: shape: Shape of actions min_value: Min value of all actions for the given shape max_value: Max value of all actions for the given shape alpha: Concentration parameter of the Beta distribution beta: Concentration parameter of the Beta distribution """ self.shape = shape self.min_value = min_value self.h = (max_value - min_value) / 2 self.alpha = alpha self.beta = beta def kl_divergence(self, other): assert isinstance(other, Beta) return other.log_norm - self.log_norm - tf.digamma(other.beta) * (other.beta - self.beta) - \ tf.digamma(other.alpha) * (other.alpha - self.alpha) + tf.digamma(other.sum) * (other.sum - self.sum) def entropy(self): return self.log_norm - (self.beta - 1.0) * tf.digamma(self.beta) - \ (self.alpha - 1.0) * tf.digamma(self.alpha) + ((self.sum - 2.0) * tf.digamma(self.sum)) @classmethod def from_tensors(cls, parameters, deterministic): self = cls(shape=None, min_value=None, max_value=None) self.distribution = (self.alpha, self.beta) = parameters self.deterministic = deterministic return self def create_tf_operations(self, x, deterministic): # Flat mean and log standard deviation flat_size = util.prod(self.shape) self.alpha = layers['dense'](x=x, size=flat_size, bias=self.alpha, activation='softplus') self.beta = layers['dense'](x=x, size=flat_size, bias=self.beta, activation='softplus') self.sum = self.alpha + self.beta self.mean = self.alpha / self.sum self.log_norm = tf.lgamma(self.alpha) + tf.lgamma(self.beta) - tf.lgamma(self.sum) self.distribution = (self.alpha, self.beta) self.deterministic = deterministic def log_probability(self, action): return (self.alpha - 1.0) * tf.log(action) + (self.alpha - 1.0) * tf.log1p(-action) - self.log_norm def sample(self): deterministic = self.mean alpha_sample = tf.random_gamma(shape=tf.shape(input=self.alpha), alpha=self.alpha) beta_sample = tf.random_gamma(shape=tf.shape(input=self.beta), alpha=self.beta) sample = alpha_sample / (alpha_sample + beta_sample) return self.min_value + tf.where(condition=self.deterministic, x=deterministic, y=sample)
Python
0.000011
@@ -3237,16 +3237,17 @@ lf.mean%0A +%0A @@ -3413,25 +3413,24 @@ =self.beta)%0A -%0A samp
32fe6ea4fa2aa710d2627b6c19c0e25013b72a1d
Test fixture update.
awx/main/tests/functional/test_rbac_workflow.py
awx/main/tests/functional/test_rbac_workflow.py
import pytest from awx.main.access import ( WorkflowJobTemplateAccess, WorkflowJobTemplateNodeAccess, WorkflowJobAccess, # WorkflowJobNodeAccess ) @pytest.fixture def wfjt(workflow_job_template_factory, organization): objects = workflow_job_template_factory('test_workflow', organization=organization, persisted=True) return objects.workflow_job_template @pytest.fixture def wfjt_with_nodes(workflow_job_template_factory, organization, job_template): objects = workflow_job_template_factory( 'test_workflow', organization=organization, workflow_job_template_nodes=[{'unified_job_template': job_template}], persisted=True) return objects.workflow_job_template @pytest.fixture def wfjt_node(wfjt_with_nodes): return wfjt_with_nodes.workflow_job_template_nodes.all()[0] @pytest.fixture def workflow_job(wfjt): return wfjt.jobs.create(name='test_workflow') @pytest.mark.django_db class TestWorkflowJobTemplateAccess: def test_random_user_no_edit(self, wfjt, rando): access = WorkflowJobTemplateAccess(rando) assert not access.can_change(wfjt, {'name': 'new name'}) def test_org_admin_edit(self, wfjt, org_admin): access = WorkflowJobTemplateAccess(org_admin) assert access.can_change(wfjt, {'name': 'new name'}) def test_org_admin_role_inheritance(self, wfjt, org_admin): assert org_admin in wfjt.admin_role assert org_admin in wfjt.execute_role assert org_admin in wfjt.read_role def test_jt_blocks_copy(self, wfjt_with_nodes, org_admin): """I want to copy a workflow JT in my organization, but someone included a job template that I don't have access to, so I can not copy the WFJT as-is""" access = WorkflowJobTemplateAccess(org_admin) assert not access.can_add({'reference_obj': wfjt_with_nodes}) @pytest.mark.django_db class TestWorkflowJobTemplateNodeAccess: def test_jt_access_to_edit(self, wfjt_node, org_admin): access = WorkflowJobTemplateNodeAccess(org_admin) assert not access.can_change(wfjt_node, {'job_type': 'scan'}) @pytest.mark.django_db class TestWorkflowJobAccess: def test_wfjt_admin_delete(self, wfjt, workflow_job, rando): wfjt.admin_role.members.add(rando) access = WorkflowJobAccess(rando) assert access.can_delete(workflow_job) def test_cancel_your_own_job(self, wfjt, workflow_job, rando): wfjt.execute_role.members.add(rando) workflow_job.created_by = rando workflow_job.save() access = WorkflowJobAccess(rando) assert access.can_cancel(workflow_job)
Python
0
@@ -865,16 +865,25 @@ rn wfjt. +workflow_ jobs.cre
25ff2bcd545c7429dda5f3cd48ff8272c28d8965
Complete recur sort w/ iter merge sol
lc0148_sort_list.py
lc0148_sort_list.py
"""Leetcode 148. Sort List Medium URL: https://leetcode.com/problems/sort-list/ Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Input: -1->5->3->4->0 Output: -1->0->3->4->5 """ # Definition for singly-linked list. class ListNode(object): def __init__(self, val): self.val = val self.next = None class Solution(object): def sortList(self, head): """ :type head: ListNode :rtype: ListNode """ pass def main(): pass if __name__ == '__main__': main()
Python
0
@@ -411,16 +411,21 @@ Solution +Recur (object) @@ -438,144 +438,1902 @@ def -sortList(self, head):%0A %22%22%22%0A :type head: ListNode%0A :rtype: ListNode%0A %22%22%22%0A pass%0A%0A%0Adef main():%0A pass%0A +_merge_sorted_lists(self, l1, l2):%0A if not l1 and not l2:%0A return None%0A%0A if not l1 or not l2:%0A return l1 or l2%0A%0A prev = ListNode(None)%0A current = prev%0A%0A while l1 and l2:%0A if l1.val %3C= l2.val:%0A current.next = l1%0A l1 = l1.next%0A else:%0A current.next = l2%0A l2 = l2.next%0A%0A current = current.next%0A%0A # Link the remaining non-empty list.%0A current.next = l1 or l2%0A%0A return prev.next%0A%0A%0A def sortList(self, head):%0A %22%22%22%0A :type head: ListNode%0A :rtype: ListNode%0A%0A Time complexity: O(n*logn).%0A Space complexity: O(logn), for stake call.%0A %22%22%22%0A # Apply recursive sort list with iterative merge sorted lists.%0A # Create base condition: no or just one node.%0A if not head or not head.next:%0A return head%0A%0A # Use prev, slow & fast pointers to get middle node prev.%0A prev, slow, fast = None, head, head%0A%0A while fast and fast.next:%0A prev = slow%0A slow = slow.next%0A fast = fast.next.next%0A%0A # Split list into two by cutting the link of the 1st to the 2nd.%0A prev.next = None%0A%0A # Recursively sort 1st and 2nd lists.%0A l1 = self.sortList(head)%0A l2 = self.sortList(slow)%0A%0A # Merge two sorted lists into the one.%0A return self._merge_sorted_lists(l1, l2)%0A%0A%0Adef main():%0A # Input: 4-%3E2-%3E1-%3E3%0A # Output: 1-%3E2-%3E3-%3E4%0A head = ListNode(4)%0A head.next = ListNode(2)%0A head.next.next = ListNode(1)%0A head.next.next.next = ListNode(3)%0A%0A sorted_head = SolutionRecur().sortList(head)%0A print (sorted_head.val, sorted_head.next.val,%0A sorted_head.next.next.val, %0A sorted_head.next.next.next.val)%0A%0A # Input: -1-%3E5-%3E3-%3E4-%3E0%0A # Output: -1-%3E0-%3E3-%3E4-%3E5 %0A%0Aif
d3d8267588b60f77b6c55ffd8461ddfa163501da
add dependency for protobuf
setup.py
setup.py
#!/usr/bin/env python # Copyright 2011 The fast-python-pb Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Setup script for fast python protocol buffers.""" try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='fastpb', version='0.1', description='Fast Python Protocol Buffers', license='Apache', author='Greplin, Inc.', author_email='opensource@greplin.com', url='https://www.github.com/Cue/fast-python-pb', package_dir={'': 'src'}, packages=['fastpb'], package_data = { 'fastpb': ['template/*'], }, entry_points = { 'console_scripts': [ 'protoc-gen-fastpython = fastpb.generator:main' ] }, install_requires=['protobuf >= 2.3.0', 'jinja2 >= 2.0'], )
Python
0
@@ -1077,19 +1077,17 @@ age_data - = += %7B%0A @@ -1141,19 +1141,17 @@ y_points - = += %7B%0A @@ -1274,16 +1274,33 @@ quires=%5B +'ez-setup==0.9', 'protobu
4025fc66078478fe56822f31a0706422cb178e8e
Fix a warning on Python 3.x
allauth/socialaccount/providers/openid/utils.py
allauth/socialaccount/providers/openid/utils.py
import base64 import pickle from openid.association import Association as OIDAssociation from openid.extensions.ax import FetchResponse from openid.extensions.sreg import SRegResponse from openid.store.interface import OpenIDStore as OIDStore from allauth.compat import UserDict from allauth.utils import valid_email_or_none from .models import OpenIDNonce, OpenIDStore class JSONSafeSession(UserDict): """ openid puts e.g. class OpenIDServiceEndpoint in the session. Django 1.6 no longer pickles stuff, so we'll need to do some hacking here... """ def __init__(self, session): UserDict.__init__(self) self.data = session def __setitem__(self, key, value): data = base64.b64encode(pickle.dumps(value)).decode('ascii') return UserDict.__setitem__(self, key, data) def __getitem__(self, key): data = UserDict.__getitem__(self, key) return pickle.loads(base64.b64decode(data.encode('ascii'))) class OldAXAttribute: PERSON_NAME = 'http://openid.net/schema/namePerson' PERSON_FIRST_NAME = 'http://openid.net/schema/namePerson/first' PERSON_LAST_NAME = 'http://openid.net/schema/namePerson/last' class AXAttribute: CONTACT_EMAIL = 'http://axschema.org/contact/email' PERSON_NAME = 'http://axschema.org/namePerson' PERSON_FIRST_NAME = 'http://axschema.org/namePerson/first' PERSON_LAST_NAME = 'http://axschema.org/namePerson/last' AXAttributes = [ AXAttribute.CONTACT_EMAIL, AXAttribute.PERSON_NAME, AXAttribute.PERSON_FIRST_NAME, AXAttribute.PERSON_LAST_NAME, OldAXAttribute.PERSON_NAME, OldAXAttribute.PERSON_FIRST_NAME, OldAXAttribute.PERSON_LAST_NAME, ] class SRegField: EMAIL = 'email' NAME = 'fullname' SRegFields = [ SRegField.EMAIL, SRegField.NAME, ] class DBOpenIDStore(OIDStore): max_nonce_age = 6 * 60 * 60 def storeAssociation(self, server_url, assoc=None): OpenIDStore.objects.create( server_url=server_url, handle=assoc.handle, secret=base64.encodestring(assoc.secret), issued=assoc.issued, lifetime=assoc.lifetime, assoc_type=assoc.assoc_type ) def getAssociation(self, server_url, handle=None): stored_assocs = OpenIDStore.objects.filter( server_url=server_url ) if handle: stored_assocs = stored_assocs.filter(handle=handle) stored_assocs.order_by('-issued') if stored_assocs.count() == 0: return None return_val = None for stored_assoc in stored_assocs: assoc = OIDAssociation( stored_assoc.handle, base64.decodestring(stored_assoc.secret.encode('utf-8')), stored_assoc.issued, stored_assoc.lifetime, stored_assoc.assoc_type ) # See: # necaris/python3-openid@1abb155c8fc7b508241cbe9d2cae24f18e4a379b if hasattr(assoc, 'getExpiresIn'): expires_in = assoc.getExpiresIn() else: expires_in = assoc.expiresIn if expires_in == 0: stored_assoc.delete() else: if return_val is None: return_val = assoc return return_val def removeAssociation(self, server_url, handle): stored_assocs = OpenIDStore.objects.filter( server_url=server_url ) if handle: stored_assocs = stored_assocs.filter(handle=handle) stored_assocs.delete() def useNonce(self, server_url, timestamp, salt): try: OpenIDNonce.objects.get( server_url=server_url, timestamp=timestamp, salt=salt ) except OpenIDNonce.DoesNotExist: OpenIDNonce.objects.create( server_url=server_url, timestamp=timestamp, salt=salt ) return True return False def get_email_from_response(response): email = None sreg = SRegResponse.fromSuccessResponse(response) if sreg: email = valid_email_or_none(sreg.get(SRegField.EMAIL)) if not email: ax = FetchResponse.fromSuccessResponse(response) if ax: try: values = ax.get(AXAttribute.CONTACT_EMAIL) if values: email = valid_email_or_none(values[0]) except KeyError: pass return email def get_value_from_response(response, sreg_names=None, ax_names=None): value = None if sreg_names: sreg = SRegResponse.fromSuccessResponse(response) if sreg: for name in sreg_names: value = sreg.get(name) if value: break if not value and ax_names: ax = FetchResponse.fromSuccessResponse(response) if ax: for name in ax_names: try: values = ax.get(name) if values: value = values[0] except KeyError: pass if value: break return value
Python
0.000116
@@ -1928,32 +1928,217 @@ l, assoc=None):%0A + try:%0A secret = base64.encodebytes(assoc.secret)%0A except AttributeError:%0A # Python 2.x compat%0A secret = base64.encodestring(assoc.secret)%0A OpenIDSt @@ -2149,32 +2149,32 @@ objects.create(%0A - serv @@ -2248,41 +2248,14 @@ ret= -base64.encodestring(assoc. secret -) ,%0A
a17d425cb7b1490927fdd1d5bc013fe60adf5f60
Update ParticleSwarm.py
Solid/ParticleSwarm.py
Solid/ParticleSwarm.py
from abc import ABCMeta, abstractmethod from random import random from numpy import apply_along_axis, argmin, array, copy, diag_indices_from, dot, zeros from numpy.random import uniform class ParticleSwarm: """ Conducts particle swarm optimization """ __metaclass__ = ABCMeta swarm_size = None member_size = None lower_bound = None upper_bound = None pos = None vel = None scores = None best = None global_best = None c1 = None c2 = None c3 = None cur_steps = None max_steps = None min_objective = None def __init__(self, swarm_size, member_size, lower_bound, upper_bound, c1, c2, c3, max_steps, min_objective=None): """ :param swarm_size: number of members in swarm :param member_size: number of components per member vector :param lower_bound: list of lower bounds, where ith element is ith lower bound :param upper_bound: list of upper bounds, where ith element is ith upper bound :param c1: constant for 1st term in velocity calculation :param c2: contsant for 2nd term in velocity calculation :param c3: constant for 3rd term in velocity calculation :param max_steps: maximum steps to run algorithm for :param min_objective: objective function value to stop algorithm once reached """ if isinstance(swarm_size, int) and swarm_size > 0: self.swarm_size = swarm_size else: raise ValueError('Swarm size must be a positive integer') if isinstance(member_size, int) and member_size > 0: self.member_size = member_size else: raise ValueError('Member size must be a positive integer') if all([isinstance(x, (int, float)) for x in lower_bound]): self.lower_bound = array([float(x) for x in lower_bound]) else: raise ValueError('Lower bounds must be numeric types') if all([isinstance(x, (int, float)) for x in upper_bound]): self.upper_bound = array([float(x) for x in upper_bound]) else: raise ValueError('Upper bounds must be numeric types') self.pos = uniform(self.lower_bound, self.upper_bound, size=(swarm_size, member_size)) self.vel = uniform(self.lower_bound - self.upper_bound, self.upper_bound - self.lower_bound, size=(swarm_size, member_size)) self.best = copy(self.pos) if isinstance(c1, (int, float)) and isinstance(c2, (int, float)) and isinstance(c3, (int, float)): self.c1 = float(c1) self.c2 = float(c2) self.c3 = float(c3) else: raise ValueError() if isinstance(max_steps, int): self.max_steps = max_steps else: raise ValueError() if min_objective is not None: if isinstance(min_objective, (int, float)): self.min_objective = float(min_objective) else: raise ValueError() def __str__(self): return ('PARTICLE SWARM: \n' + 'CURRENT STEPS: %d \n' + 'BEST FITNESS: %f \n' + 'BEST MEMBER: %s \n\n') % \ (self.cur_steps, self._objective(self.global_best[0]), str(self.global_best[0])) def __repr__(self): return self.__str__() def _clear(self): """ Resets the variables that are altered on a per-run basis of the algorithm :return: None """ self.pos = uniform(self.lower_bound, self.upper_bound, size=(self.swarm_size, self.member_size)) self.vel = uniform(self.lower_bound - self.upper_bound, self.upper_bound - self.lower_bound, size=(self.swarm_size, self.member_size)) self.scores = self._score(self.pos) self.best = copy(self.pos) self.cur_steps = 0 self._global_best() @abstractmethod def _objective(self, member): """ Returns objective function value for a member of swarm - operates on 1D numpy array :param member: a member :return: objective function value of member """ pass def _score(self, pos): """ Applies objective function to all members of swarm :param pos: position matrix :return: score vector """ return apply_along_axis(self._objective, 1, pos) def _best(self, old, new): """ Finds the best objective function values for each member of swarm :param old: old values :param new: new values :return: None """ old_scores = self._score(old) new_scores = self._score(new) best = [] for i in range(len(old_scores)): if old_scores[i] < new_scores[i]: best.append(old[i]) else: best.append(new[i]) self.best = array(best) def _global_best(self): """ Finds the global best across swarm :return: None """ if self.global_best is None or min(self.scores) < self._objective(self.global_best[0]): self.global_best = array([self.pos[argmin(self.scores)]] * self.swarm_size) def run(self, verbose=True): """ Conducts particle swarm optimization :param verbose: indicates whether or not to print progress regularly :return: best member of swarm and objective function value of best member of swarm """ self._clear() for i in range(self.max_steps): self.cur_steps += 1 if ((i + 1) % 100 == 0) and verbose: print(self) u1 = zeros((self.swarm_size, self.swarm_size)) u1[diag_indices_from(u1)] = [random() for x in range(self.swarm_size)] u2 = zeros((self.swarm_size, self.swarm_size)) u2[diag_indices_from(u2)] = [random() for x in range(self.swarm_size)] vel_new = (self.c1 * self.vel) + \ (self.c2 * dot(u1, (self.best - self.pos))) + \ (self.c3 * dot(u2, (self.global_best - self.pos))) pos_new = self.pos + vel_new self._best(self.pos, pos_new) self.pos = pos_new self.scores = self._score(self.pos) self._global_best() if self.min_objective is not None and self._objective(self.global_best[0]) < self.min_objective: print("TERMINATING - REACHED MINIMUM OBJECTIVE") return self.global_best[0], self._objective(self.global_best[0]) print("TERMINATING - REACHED MAXIMUM STEPS") return self.global_best[0], self._objective(self.global_best[0])
Python
0
@@ -6431,43 +6431,8 @@ if -self.min_objective is not None and self @@ -6462,24 +6462,25 @@ _best%5B0%5D) %3C +( self.min_obj @@ -6485,16 +6485,22 @@ bjective + or 0) :%0A
2035099fd78b1d0906403ec836a4b7e7144a6bbc
bump to 0.0.6
swingtix/bookkeeper/__init__.py
swingtix/bookkeeper/__init__.py
__VERSION__='0.0.5'
Python
0.000005
@@ -14,7 +14,7 @@ 0.0. -5 +6 '%0A
8dc258dafad833ff5681e2bc0c436d2f8e7b23ae
Fix inventory's click_window()
spock/plugins/helpers/inventory.py
spock/plugins/helpers/inventory.py
""" Inventory plugin is a helper plugin for dealing with interaction with inventories """ from collections import deque from spock.utils import pl_announce from spock.mcp import mcdata, mcpacket import logging logger = logging.getLogger('spock') INV_MAIN = "minecraft:main" #not ever sent by the server but a nice way to define player inventory INV_CHEST = "minecraft:chest" INV_WORKBENCH = "minecraft:crafting_table" INV_FURNACE = "minecraft:furnace" INV_DISPENSER = "minecraft:dispenser" INV_ENCHANTMENT = "minecraft:enchanting_table" INV_BREWING = "minecraft:brewing_stand" INV_VILLAGER = "minecraft:villager" INV_BEACON = "minecraft:beacon" INV_ANVIL = "minecraft:anvil" INV_HOPPER = "minecraft:hopper" INV_DROPPER = "minecraft:dropper" INV_HORSE = "EntityHorse" class ExtraInv: inv_type = None slot_count = 0 def __init__(self, slots): pass class MainExtraInv(ExtraInv): inv_type = INV_MAIN slot_count = 9 def __init__(self, slots): self.head = slots[5] self.chest = slots[6] self.legs = slots[7] self.feet = slots[8] self.crafting = slots[1:4] self.crafting_out = slots[0] class ChestExtraInv(ExtraInv): inv_type = INV_CHEST slot_count = 54 def __init__(self, slots): self.slots = slots class WorkbenchExtraInv(ExtraInv): inv_type = INV_WORKBENCH slot_count = 10 def __init__(self, slots): self.crafting = slots[1:9] self.crafting_out = slots[0] class FurnaceExtraInv(ExtraInv): inv_type = INV_FURNACE slot_count = 3 def __init__(self, slots): self.fuel = slots[2] self.smelt = slots[1] self.output = slots[0] class DispenserExtraInv(ExtraInv): inv_type = INV_DISPENSER slot_count = 9 def __init__(self, slots): self.slots = slots class EnchantmentExtraInv(ExtraInv): inv_type = INV_ENCHANTMENT slot_count = 0 def __init__(self, slots): self.slots = slots class BrewingExtraInv(ExtraInv): inv_type = INV_BREWING slot_count = 0 def __init__(self, slots): self.slots = slots class VillagerExtraInv(ExtraInv): inv_type = INV_VILLAGER slot_count = 0 def __init__(self, slots): self.slots = slots class BeaconExtraInv(ExtraInv): inv_type = INV_BEACON slot_count = 0 def __init__(self, slots): self.slots = slots class AnvilExtraInv(ExtraInv): inv_type = INV_ANVIL slot_count = 0 def __init__(self, slots): self.slots = slots class HopperExtraInv(ExtraInv): inv_type = INV_HOPPER slot_count = 0 def __init__(self, slots): self.slots = slots class DropperExtraInv(ExtraInv): inv_type = INV_DROPPER slot_count = 0 def __init__(self, slots): self.slots = slots class HorseExtraInv(ExtraInv): inv_type = INV_HORSE slot_count = 0 def __init__(self, slots): self.slots = slots class InventoryCore: def __init__(self, net): self.net = net #window clicky stuff self.action = 0 self.clickque = deque() #window storage stuff self.window = 0 self.hotbar = [{'id':-1} for i in range(9)] self.main = [{'id':-1} for i in range(27)] self.extra = MainExtraInv([{'id':-1} for i in range(9)]) def click_window(slot, button, mode): self.clickque.append({ 'window_id': 0, 'slot': slot, 'button': button, 'mode': mode, 'clicked_item': self.clinfo.inventory.slots[slot], }) def test_inventory(self): for i in range(9,43): self.action += 1 data = { 'window_id': 0, 'slot': i, 'button': 0, 'mode': 0, 'action': self.action, 'clicked_item': self.clinfo.inventory.slots[i], } self.net.push_packet( 'PLAY>Click Window', data ) self.action += 1 data = { 'window_id': 0, 'slot': i+1, 'button': 0, 'mode': 0, 'action': self.action, 'clicked_item': self.clinfo.inventory.slots[i+1], } self.net.push_packet( 'PLAY>Click Window', data ) @pl_announce('Inventory') class InventoryPlugin: def __init__(self, ploader, settings): self.clinfo = ploader.requires('ClientInfo') self.net = ploader.requires('Net') self.inventory = InventoryCore(self.net) ploader.provides('Inventory', self.inventory) ploader.reg_event_handler('event_tick', self.tick) #Inventory Events ploader.reg_event_handler( 'PLAY<Open Window', self.handle_open_window ) ploader.reg_event_handler( 'PLAY<Close Window', self.handle_close_window ) ploader.reg_event_handler( 'PLAY<Set Slot', self.handle_set_slot ) ploader.reg_event_handler( 'PLAY<Window Items', self.handle_window_items ) ploader.reg_event_handler( 'PLAY<Window Property', self.handle_window_prop ) ploader.reg_event_handler( 'PLAY<Confirm Transaction', self.handle_confirm_transact ) def tick(self, event, data): pass def handle_open_window(self, event, packet): logger.debug("%s %s", event, packet.data) def handle_close_window(self, event, packet): logger.debug("%s %s", event, packet.data) def handle_set_slot(self, event, packet): #logger.debug("%s %s", event, packet.data) pass def handle_window_items(self, event, packet): #logger.debug("%s %s", event, packet.data) pass def handle_window_prop(self, event, packet): logger.debug("%s %s", event, packet.data) def handle_confirm_transact(self, event, packet): logger.debug("%s %s", event, packet.data)
Python
0
@@ -3064,16 +3064,22 @@ _window( +self, slot, bu
448d1fc24dd92e6d9f063a1b679db2d5be2f7106
Simplify n - 1
lc0293_flip_game.py
lc0293_flip_game.py
"""Leetcode 293. Flip Game (Premium) Easy URL: https://leetcode.com/problems/flip-game You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take turns to flip two consecutive "++" into "--". The game ends when a person can no longer make a move and therefore the other person will be the winner. Write a function to compute all possible states of the string after one valid move. Example: Input: s = "++++" Output: [ "--++", "+--+", "++--" ] Note: If there is no valid move, return an empty list []. """ class SolutionIter(object): def generatePossibleNextMoves(self, s): """ :type s: str :rtype: List[str] Time complexity: O(n^2). Space complexity: O(n). """ # Edge cases. if len(s) <= 1: return [] n_minus_1 = len(s) - 1 possible_states = [] # Iterate through string to check if char and its next are '++'. i = 0 while i < n_minus_1: if s[i] == '+': while i < n_minus_1 and s[i + 1] == '+': possible_states.append(s[:i] + '--' + s[i+2:]) i += 1 i += 1 return possible_states def main(): # Input: s = "++++" # Output: # [ # "--++", # "+--+", # "++--" # ] s = '++++' print SolutionIter().generatePossibleNextMoves(s) if __name__ == '__main__': main()
Python
0.999999
@@ -609,24 +609,44 @@ ass Solution +CheckCharAndNeighbor Iter(object) @@ -906,24 +906,16 @@ n -_minus_1 = len(s @@ -919,12 +919,8 @@ n(s) - - 1 %0A @@ -1052,23 +1052,19 @@ le i %3C n -_minus_ + - 1:%0A @@ -1117,15 +1117,11 @@ %3C n -_minus_ + - 1 an @@ -1434,16 +1434,36 @@ Solution +CheckCharAndNeighbor Iter().g
4e9444f76ba36ed58b13843017cb2d67a6ebd2a7
create version 2.4.8
setup.py
setup.py
from setuptools import setup setup(name='DukeDSClient', version='2.4.7', description='Command line tool(ddsclient) to upload/manage projects on the duke-data-service.', url='https://github.com/Duke-GCB/DukeDSClient', keywords='duke dds dukedataservice', author='John Bradley', license='MIT', packages=['ddsc', 'ddsc.core', 'ddsc.sdk', 'DukeDS'], install_requires=[ 'requests>=2.20.0', 'PyYAML>=5.1', 'pytz', 'future', 'six', 'tenacity==5.0.4', ], test_suite='nose.collector', tests_require=['nose', 'mock'], entry_points={ 'console_scripts': [ 'ddsclient = ddsc.__main__:main' ] }, classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Topic :: Utilities', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], )
Python
0.000001
@@ -72,17 +72,17 @@ on='2.4. -7 +8 ',%0A
01f3774d7fdf9369eabb322fd2c53a1f16747e49
Fix notificatiosn
autostew_back/plugins/chat_notifications.py
autostew_back/plugins/chat_notifications.py
""" Show a message when a player logs in (and other messages, too) """ from autostew_back.gameserver.event import EventType, BaseEvent, LapEvent, MemberEvent from autostew_back.gameserver.server import Server from autostew_back.gameserver.session import SessionStage, SessionState, SessionFlags from autostew_web_users.models import SteamUser name = 'chat_notifications' welcome_message = [ "", "Welcome {player_name}, current setup is {setup_name}", "{safety_class_message}", "{elo_rating_message}", "See more information at autostew.selfhost.eu", "", ] new_session_starts = [ "", "This server is connected to autostew.selfhost.eu" "", ] race_starts = [ "", "", " ### RACE IS STARTING ###", "Keep the race safe and fair! Good luck!", "Be EXTRA CAREFUL on the first turn.", "Remind that players who crash too much will be kicked.", ] leader_in_last_lap = [ "", "The leader {leader_name} just entered their last lap!" ] first_player_finished = [ "", "", "Congratulations to {winner_name} for winning this race!", "See this race results and more at autostew.selfhost.eu" ] def event(server: Server, event: BaseEvent): if event.type == EventType.authenticated: send_welcome_message(event, server) if ( event.type == EventType.lap and event.lap == server.session.race1_length.get() and event.race_position == 1 and server.session.session_stage.get_nice() == SessionStage.race1 and SessionFlags.timed_race not in server.session.flags.get_flags() ): send_winner_message(event, server) if ( event.type == EventType.lap and event.lap == server.session.race1_length.get() - 1 and event.race_position == 1 and server.session.session_stage.get_nice() == SessionStage.race1 and SessionFlags.timed_race not in server.session.flags.get_flags() ): send_leader_in_last_lap_message(event, server) if event.type == EventType.state_changed and event.new_state == SessionState.lobby: send_new_session_message(server) if event.type == EventType.stage_changed and event.new_stage == SessionStage.race1: send_race_start_message(server) def send_race_start_message(server: Server): for message in race_starts: server.api.send_chat(message) def send_new_session_message(server: Server): for message in new_session_starts: server.api.send_chat(message) def send_leader_in_last_lap_message(event: LapEvent, server: Server): for message in leader_in_last_lap: server.api.send_chat(message.format(winner_name=event.participant.name.get())) def send_winner_message(event: LapEvent, server: Server): for message in first_player_finished: server.api.send_chat(message.format(leader_name=event.participant.name.get())) def send_welcome_message(event: MemberEvent, server: Server): if not event.member: return try: steam_user = SteamUser.objects.get(steam_id=event.member.steam_id.get()) if not steam_user.safety_class: safety_class_message = "You will be assigned a safety class" elif steam_user.safety_class.kick_on_impact_threshold: safety_class_message = "Your current safety class is {}. Drive carefully or you will be kicked!".format( steam_user.safety_class.name ) else: safety_class_message = "Your current safety class is {}.".format( steam_user.safety_class.name ) if not steam_user.elo_rating: rating_message = "You are currently unrated" else: rating_message = "Your current rating is {}".format(steam_user.elo_rating) for message in welcome_message: event.member.send_chat( message.format( setup_name=server.get_current_setup_name(), player_name=event.member.name.get(), safety_class_message=safety_class_message, elo_rating_message=rating_message ) ) except SteamUser.DoesNotExist: pass
Python
0.001748
@@ -2644,20 +2644,20 @@ .format( -winn +lead er_name= @@ -2825,36 +2825,36 @@ (message.format( -lead +winn er_name=event.pa
c1396fdfea3f3393cf44b74cf62c623df1e5af75
Improve user message in lightweight crash handler.
IPython/core/crashhandler.py
IPython/core/crashhandler.py
# encoding: utf-8 """sys.excepthook for IPython itself, leaves a detailed report on disk. Authors: * Fernando Perez * Brian E. Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2001-2007 Fernando Perez. <fperez@colorado.edu> # Copyright (C) 2008-2010 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- import os import sys import traceback from pprint import pformat from IPython.core import ultratb from IPython.core.release import author_email from IPython.utils.sysinfo import sys_info #----------------------------------------------------------------------------- # Code #----------------------------------------------------------------------------- # Template for the user message. _default_message_template = """\ Oops, {app_name} crashed. We do our best to make it stable, but... A crash report was automatically generated with the following information: - A verbatim copy of the crash traceback. - A copy of your input history during this session. - Data on your current {app_name} configuration. It was left in the file named: \t'{crash_report_fname}' If you can email this file to the developers, the information in it will help them in understanding and correcting the problem. You can mail it to: {contact_name} at {contact_email} with the subject '{app_name} Crash Report'. If you want to do it now, the following command will work (under Unix): mail -s '{app_name} Crash Report' {contact_email} < {crash_report_fname} To ensure accurate tracking of this issue, please file a report about it at: {bug_tracker} """ _lite_message_template = """ If you suspect this is an IPython bug, please report it at: https://github.com/ipython/ipython/issues or send an email to the mailing list at {email} You can enable a much more verbose traceback with: {config}Application.verbose_crash=True """ class CrashHandler(object): """Customizable crash handlers for IPython applications. Instances of this class provide a :meth:`__call__` method which can be used as a ``sys.excepthook``. The :meth:`__call__` signature is:: def __call__(self, etype, evalue, etb) """ message_template = _default_message_template section_sep = '\n\n'+'*'*75+'\n\n' def __init__(self, app, contact_name=None, contact_email=None, bug_tracker=None, show_crash_traceback=True, call_pdb=False): """Create a new crash handler Parameters ---------- app : Application A running :class:`Application` instance, which will be queried at crash time for internal information. contact_name : str A string with the name of the person to contact. contact_email : str A string with the email address of the contact. bug_tracker : str A string with the URL for your project's bug tracker. show_crash_traceback : bool If false, don't print the crash traceback on stderr, only generate the on-disk report Non-argument instance attributes: These instances contain some non-argument attributes which allow for further customization of the crash handler's behavior. Please see the source for further details. """ self.crash_report_fname = "Crash_report_%s.txt" % app.name self.app = app self.call_pdb = call_pdb #self.call_pdb = True # dbg self.show_crash_traceback = show_crash_traceback self.info = dict(app_name = app.name, contact_name = contact_name, contact_email = contact_email, bug_tracker = bug_tracker, crash_report_fname = self.crash_report_fname) def __call__(self, etype, evalue, etb): """Handle an exception, call for compatible with sys.excepthook""" # do not allow the crash handler to be called twice without reinstalling it # this prevents unlikely errors in the crash handling from entering an # infinite loop. sys.excepthook = sys.__excepthook__ # Report tracebacks shouldn't use color in general (safer for users) color_scheme = 'NoColor' # Use this ONLY for developer debugging (keep commented out for release) #color_scheme = 'Linux' # dbg try: rptdir = self.app.ipython_dir except: rptdir = os.getcwdu() if rptdir is None or not os.path.isdir(rptdir): rptdir = os.getcwdu() report_name = os.path.join(rptdir,self.crash_report_fname) # write the report filename into the instance dict so it can get # properly expanded out in the user message template self.crash_report_fname = report_name self.info['crash_report_fname'] = report_name TBhandler = ultratb.VerboseTB( color_scheme=color_scheme, long_header=1, call_pdb=self.call_pdb, ) if self.call_pdb: TBhandler(etype,evalue,etb) return else: traceback = TBhandler.text(etype,evalue,etb,context=31) # print traceback to screen if self.show_crash_traceback: print >> sys.stderr, traceback # and generate a complete report on disk try: report = open(report_name,'w') except: print >> sys.stderr, 'Could not create crash report on disk.' return # Inform user on stderr of what happened print >> sys.stderr, '\n'+'*'*70+'\n' print >> sys.stderr, self.message_template.format(**self.info) # Construct report on disk report.write(self.make_report(traceback)) report.close() raw_input("Hit <Enter> to quit (your terminal may close):") def make_report(self,traceback): """Return a string containing a crash report.""" sec_sep = self.section_sep report = ['*'*75+'\n\n'+'IPython post-mortem report\n\n'] rpt_add = report.append rpt_add(sys_info()) try: config = pformat(self.app.config) rpt_add(sec_sep) rpt_add('Application name: %s\n\n' % self.app_name) rpt_add('Current user configuration structure:\n\n') rpt_add(config) except: pass rpt_add(sec_sep+'Crash traceback:\n\n' + traceback) return ''.join(report) def crash_handler_lite(etype, evalue, tb): """a light excepthook, adding a small message to the usual traceback""" traceback.print_exception(etype, evalue, tb) from IPython.core.interactiveshell import InteractiveShell if InteractiveShell.initialized(): # we are in a Shell environment, give %magic example config = "%config " else: # we are not in a shell, show generic config config = "c." print >> sys.stderr, _lite_message_template.format(email=author_email, config=config)
Python
0
@@ -2157,49 +2157,177 @@ can -enable a much more verbose traceback with +print a more detailed traceback right now with %22%25tb%22, or use %22%25debug%22%0Ato interactively debug it.%0A%0AExtra-detailed tracebacks for bug-reporting purposes can be enabled via :%0A
ac85d822f1c2656ee2c83550e613b52d97b8f2da
update message for image check gate when base id is out of date Fixes #50
anchore/anchore-modules/gates/11_check_image.py
anchore/anchore-modules/gates/11_check_image.py
#!/usr/bin/env python import sys import os import json import re import anchore from anchore import anchore_utils gate_name = "IMAGECHECK" triggers = { 'BASEOUTOFDATE': { 'description':'triggers if the image\'s base image has been updated since the image was built/analyzed', 'params':'None' } } try: config = anchore.anchore_utils.init_gate_cmdline(sys.argv, gate_name, gate_help=triggers) except Exception as err: print str(err) sys.exit(1) if not config: print "ERROR: could not set up environment for gate" sys.exit(1) imageId = config['imgid'] try: params = config['params'] except: params = None outlist = list() # do somthing try: idata = anchore.anchore_utils.load_image_report(imageId) humanname = idata['meta']['humanname'] dockerfile_mode = idata['dockerfile_mode'] if dockerfile_mode == 'Actual': realbaseid = None if idata and 'familytree' in idata and len(idata['familytree']) > 0: realbaseid = idata['familytree'][0] (thefrom, thefromid) = anchore.anchore_utils.discover_from_info(idata['dockerfile_contents']) if realbaseid != thefromid: outlist.append("BASEOUTOFDATE Image base image ("+str(thefrom)+") ID is ("+str(realbaseid)[0:12]+"), but the latest ID for ("+str(thefrom)+") is ("+str(thefromid)[0:12]+")") except Exception as err: import traceback traceback.print_exc() print "ERROR: Exception: " + str(err) sys.exit(1) # write output anchore.anchore_utils.save_gate_output(imageId, gate_name, outlist) sys.exit(0)
Python
0
@@ -1221,16 +1221,23 @@ E Image +stored base ima @@ -1308,16 +1308,30 @@ latest +detected base ID for (
511747b4233ce0d25034675a61955db4fcc3a13d
Add time/space complexity
lc0542_01_matrix.py
lc0542_01_matrix.py
"""Leetcode 542. 01 Matrix Medium URL: https://leetcode.com/problems/01-matrix/ Given a matrix consists of 0 and 1, find the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: [[0,0,0], [0,1,0], [0,0,0]] Output: [[0,0,0], [0,1,0], [0,0,0]] Example 2: Input: [[0,0,0], [0,1,0], [1,1,1]] Output: [[0,0,0], [0,1,0], [1,2,1]] Note: - The number of elements of the given matrix will not exceed 10,000. - There are at least one 0 in the given matrix. - The cells are adjacent in only four directions: up, down, left and right. """ class SolutionBFS(object): def updateMatrix(self, matrix): """ :type matrix: List[List[int]] :rtype: List[List[int]] Time complexity: O(mn), where - m: number of rows - n: number of columns Space complexity: O(1). """ if not matrix or not matrix[0]: return matrix n_rows, n_cols = len(matrix), len(matrix[0]) # Use queue for BFS. queue = [] for r in range(n_rows): for c in range(n_cols): if matrix[r][c] == 0: # Just explore from cells with value 0. queue.append((r, c)) else: # For cell with value != 0, update its distance to inf. matrix[r][c] = float('inf') # Visiting directions. dirs = [(1, 0), (-1, 0), (0, 1), (0, -1)] # BFS explore from cells with value 0. while queue: r, c = queue.pop() for r_dir, c_dir in dirs: r_visit, c_visit = r + r_dir, c + c_dir # If visiting is out of boundary or does not shorten distance. if (r_visit < 0 or r_visit >= n_rows or c_visit < 0 or c_visit >= n_cols or matrix[r_visit][c_visit] < matrix[r][c] + 1): continue matrix[r_visit][c_visit] = matrix[r][c] + 1 queue.insert(0, (r_visit, c_visit)) return matrix class SolutionDP(object): def updateMatrix(self, matrix): """ :type matrix: List[List[int]] :rtype: List[List[int]] """ if not matrix or not matrix[0]: return matrix n_rows, n_cols = len(matrix), len(matrix[0]) # Iterate through all cells from upper left. for r in range(n_rows): for c in range(n_cols): if matrix[r][c] == 0: continue # Check its up & left. if r > 0: up = matrix[r - 1][c] else: up = float('inf') if c > 0: left = matrix[r][c - 1] else: left = float('inf') # Update cell by min(up & left). matrix[r][c] = min(up, left) + 1 # Iterate through all cells from bottom right, check its down & right. for r in range(n_rows - 1, -1, -1): for c in range(n_cols -1, -1, -1): if matrix[r][c] == 0: continue # Check its down & right. if r < n_rows - 1: down = matrix[r + 1][c] else: down = float('inf') if c < n_cols - 1: right = matrix[r][c + 1] else: right = float('inf') # Update cell by min(previous result, min(down & right)). matrix[r][c] = min(matrix[r][c], min(down, right) + 1) return matrix def main(): # Output: # [[0,0,0], # [0,1,0], # [0,0,0]] matrix = [[0,0,0], [0,1,0], [0,0,0]] print SolutionBFS().updateMatrix(matrix) matrix = [[0,0,0], [0,1,0], [0,0,0]] print SolutionDP().updateMatrix(matrix) # Output: # [[0,0,0], # [0,1,0], # [1,2,1]] matrix = [[0,0,0], [0,1,0], [1,1,1]] print SolutionBFS().updateMatrix(matrix) matrix = [[0,0,0], [0,1,0], [1,1,1]] print SolutionDP().updateMatrix(matrix) if __name__ == '__main__': main()
Python
0.002369
@@ -2243,32 +2243,166 @@ List%5BList%5Bint%5D%5D +%0A%0A Time complexity: O(mn), where%0A - m: number of rows%0A - n: number of columns%0A Space complexity: O(1). %0A %22%22%22%0A
7f03e3ee668f272a68fd326d642966eb876609d7
Fix a debug email error.
satchmo/apps/satchmo_store/mail.py
satchmo/apps/satchmo_store/mail.py
from django.conf import settings from django.template import loader, Context from satchmo_store.shop.models import Config from socket import error as SocketError import logging log = logging.getLogger('satchmo_store.mail') if "mailer" in settings.INSTALLED_APPS: from mailer import send_mail else: from django.core.mail import send_mail class NoRecipientsException(StandardError): pass def send_store_mail(subject, context, template, recipients_list=None, format_subject=False, send_to_store=False, fail_silently=False): """ :parameter: subject: A string. :parameter: format_subject: Determines whether the *subject* parameter is formatted. Only the %(shop_name)s specifier is supported now. :parameter: context: A dictionary to use when rendering the message body. This dictionary overwrites an internal dictionary which provides the key `shop_name`. :parameter: template: The path of the template to use when rendering the message body. """ shop_config = Config.objects.get_current() shop_email = shop_config.store_email shop_name = shop_config.store_name if not shop_email: log.warn('No email address configured for the shop. Using admin settings.') shop_email = settings.ADMINS[0][1] c_dict = {'shop_name': shop_name} if format_subject: subject = subject % c_dict c_dict.update(context) c = Context(c_dict) t = loader.get_template(template) body = t.render(c) recipients = recipients_list or [] if send_to_store: recipients.append(shop_email) if not recipients: raise NoRecipientsException try: send_mail(subject, body, shop_email, recipients, fail_silently=fail_silently) except SocketError, e: if settings.DEBUG: log.error('Error sending mail: %s' % e) log.warn('Ignoring email error, since you are running in DEBUG mode. Email was:\nTo:%s\nSubject: %s\n---\n%s', ",".join(recipients), subject, message) else: log.fatal('Error sending mail: %s' % e) raise IOError('Could not send email. Please make sure your email settings are correct and that you are not being blocked by your ISP.')
Python
0.000085
@@ -2069,23 +2069,20 @@ ubject, -message +body )%0A
f3c61475ff06c42f4a2a23c9113e3bd3c73937f5
Reorganize socket timeout configuration
plugins/telnet_plugin.py
plugins/telnet_plugin.py
from sqlalchemy import Column, Integer, String, DateTime from base import Base from string import join import GeoIP import geojson import socket import json import datetime import logging class Plugin: def __init__(self): logging.basicConfig(format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p') # print "Module Loaded and waiting on run() command" self.geo_ip = None self.PORT = 23 self.geoIp_feature_json_string = None self.giDB = GeoIP.open("./GeoLiteCity.dat", GeoIP.GEOIP_INDEX_CACHE | GeoIP.GEOIP_CHECK_CACHE) self.info = ("This plugin uses the telnet port to listen for attackers. " "It allows a user to login and then record upto 5 commands from the user" " and stores the information in a sql database.") self.ORM = json.dumps({ "table": { "table_name": "telnet", "column": [ {"name": "username", "type": "TEXT"}, {"name": "password", "type": "TEXT"}, {"name": "commands", "type": "TEXT"}, {"name": "feature", "type": "TEXT"}, {"name": "ip_address", "type": "TEXT"}, {"name": "time_stamp", "type": "TEXT"} ] } }) self.time_stamp = '' self.value = "telnet" self.display = "Telnet" class Telnet(Base): __tablename__ = "telnet" id = Column(Integer, primary_key=True) username = Column(String) password = Column(String) commands = Column(String) feature = Column(String) ip_address = Column(String) time_stamp = Column(DateTime) def get_display(self): return self.display def run(self, passed_socket, address, session): self.time_stamp = datetime.datetime.now() logging.info(self.time_stamp) passed_socket.settimeout(35) if socket: self.negotiate(passed_socket) passed_socket.sendall("login as: ") try: username = passed_socket.recv(4096) username.strip() logging.info('Login information obtained') except socket.timeout: print 'timeout error' passed_socket.sendall('timeout error') username = 'invalid input' logging.error('invalid input error') passed_socket.sendall("\n") # login string as shell script style login_string = username + "@73.78.8.177's " + "password: " passed_socket.sendall(login_string) try: password = passed_socket.recv(64) password.strip() except socket.timeout: print 'timeout error' password = 'timeout error' passed_socket.sendall("\n") commands = [] for _ in range(5): command_string = username + "@73.78.8.177's" + ": " # command prompt -> 'username@host:path $ ' passed_socket.sendall(command_string) try: command = passed_socket.recv(64) command.strip() commands.append(command) except socket.timeout: print 'timeout error' commands.append('timeout error') passed_socket.sendall("\n") passed_socket.close() logging.info('socket closed ') geo_ip_record = self.get_record_from_geoip(address[0]) if geo_ip_record is not None: self.geoIp_feature_json_string = self.convert_to_geojson_feature(geo_ip_record) record = self.Telnet(username=username, password=password, commands=join(commands, ', '), feature=self.geoIp_feature_json_string, ip_address=address[0], time_stamp=self.time_stamp) session.add(record) session.commit() session.close() else: print "socket error" logging.error('socket error occurred') def negotiate(self, passed_socket): # read in a initial negotiation byte make sure it's the start # read next byte, etc. Send corresponding negotiations in loop # once negotiations end, begin to read information # while loop for negotiations # 252 is 'will not' passed_socket.settimeout(4) try: while True: # may need to create a flag raw_input = passed_socket.recv(1) byte = ord(raw_input) if byte != 255: continue else: verb = passed_socket.recv(1) if verb != 251 & verb != 253: continue else: option = passed_socket.recv(1) passed_socket.sendall(255, 252, option) except socket.timeout: passed_socket.sendall("\n") passed_socket.settimeout(35) return def get_port(self): return self.PORT def get_orm(self): return self.ORM def get_record_from_geoip(self, ip_address): # print "ip_address", ip_address # the IP Address is hard coded for testing. Need to add # TODO record = self.giDB.record_by_name(ip_address) # print "record", record return record def convert_to_geojson_point(self, ip_record): return geojson.Point((ip_record["latitude"], ip_record["longitude"])) def convert_to_geojson_feature(self, ip_record): feature_string = "" try: feature = geojson.Feature(geometry=self.convert_to_geojson_point(ip_record)) feature["properties"] = { "city": ip_record["city"], "region_name": ip_record["region_name"], "reg@on": ip_record["region"], "area_code": ip_record["area_code"], "time_zone": ip_record["time_zone"], "metro_code": ip_record["metro_code"], "country_code3": ip_record["country_code3"], "postal_code": ip_record["postal_code"], "dma_code": ip_record["dma_code"], "country_code": ip_record["country_code"], "country_name": ip_record["country_name"], "time_stamp": ('Timestamp: {:%Y-%m-%d %H:%M:%S}'.format(self.time_stamp)) } logging.info('sent information') feature_string = json.dumps(feature) except RuntimeError: feature = " " return feature print "Error creating feature" return feature_string def get_description(self): return self.info def get_value(self): return self.value
Python
0
@@ -1956,32 +1956,35 @@ _stamp)%0A +if passed_socket.se @@ -1984,83 +1984,131 @@ cket -.settimeout(35)%0A if socket:%0A self.negotiate(passed_socket +:%0A passed_socket.settimeout(4)%0A self.negotiate(passed_socket)%0A passed_socket.settimeout(35 )%0A @@ -4618,44 +4618,8 @@ ot'%0A - passed_socket.settimeout(4)%0A @@ -5203,49 +5203,8 @@ n%22)%0A - passed_socket.settimeout(35)%0A
602fb71ac76ad921e780490ec806915cd5206d0a
handle exceptions better and fix Turkey URL
leaguewinners/dl.py
leaguewinners/dl.py
import re, requests, csv, time from bs4 import BeautifulSoup teams = [] for country, urlpart in [('Germany', 'germany/bundesliga/german-bundesliga'), ('Spain', 'spain/la-liga-primera/spanish-la-liga-primera'), ('England', 'english/premier-league'), ('France', 'france/ligue-1/french-ligue-1'), ('Italy', 'italy/serie-a/italy-serie-a'), ('Scotland', 'scottish/premiership'), ('Holland', 'other/netherlands/eredivisie/holland-eredivisie'), ('Portugal', 'other/portugal/primeira-liga/portuguese-super-liga'), ('Turkey', 'other/turkey/super-lig/turkish-super-league')]: url = "http://www.oddschecker.com/football/%s/winner" % urlpart print "getting %s" % url r = requests.get(url, cookies={"odds_type":"decimal"}) soup = BeautifulSoup(r.text) table = soup.find(attrs={"class":"eventTable"}) sitesrow = table.find_all("tr", {"class": "eventTableHeader"}) sitelinks = sitesrow[0].find_all(lambda t: t.has_attr("title")) sites = [t["title"] for t in sitelinks] teamrows = table.find_all(attrs={"class": "eventTableRow"}) for row in teamrows: cols = [t.text for t in row.find_all("td")] name = cols[1] if 'any other' in name.lower(): continue odds = [] isanodd = lambda t: (t.name=="td" and t.has_attr("class") and ('o' in t.attrs["class"] or 'oi' in t.attrs["class"] or 'oo' in t.attrs["class"])) rawodds = [t.text for t in row.find_all(isanodd)] for o in rawodds: if not o or '-' in o: odds.append(None) else: odds.append(float(o)) assert len(odds) == len(sites), "{} {}".format(odds, sites) teams.append([name, country] + odds) t = str(time.time()).split(".")[0] with file("raw/odds%s.csv" % t, 'w') as outfile: w = csv.writer(outfile) w.writerow(['name', 'country'] + sites) for row in teams: w.writerow(row)
Python
0
@@ -4,31 +4,78 @@ ort -re, requests, csv, time +csv%0Aimport re%0Aimport sys%0Aimport time%0Aimport traceback%0A%0Aimport requests %0Afro @@ -785,34 +785,26 @@ -lig -/turkish-super-league')%5D:%0A +')%5D:%0A try:%0A @@ -867,16 +867,20 @@ urlpart%0A + prin @@ -904,16 +904,20 @@ url%0A + + r = requ @@ -964,16 +964,20 @@ mal%22%7D)%0A%0A + soup @@ -1005,16 +1005,20 @@ xt)%0A + + table = @@ -1057,24 +1057,28 @@ able%22%7D)%0A + + sitesrow = t @@ -1128,24 +1128,28 @@ ader%22%7D)%0A + + sitelinks = @@ -1200,24 +1200,28 @@ itle%22))%0A + + sites = %5Bt%5B%22 @@ -1249,16 +1249,20 @@ links%5D%0A%0A + team @@ -1317,24 +1317,28 @@ eRow%22%7D)%0A + + for row in t @@ -1346,16 +1346,20 @@ amrows:%0A + @@ -1410,16 +1410,20 @@ + name = c @@ -1438,16 +1438,20 @@ + + if 'any @@ -1488,24 +1488,28 @@ ue%0A%0A + odds = %5B%5D%0A @@ -1514,16 +1514,20 @@ + + isanodd @@ -1609,16 +1609,20 @@ + + ('o' in @@ -1633,32 +1633,36 @@ trs%5B%22class%22%5D or%0A + @@ -1733,16 +1733,20 @@ + 'oo' in @@ -1764,16 +1764,20 @@ ass%22%5D))%0A + @@ -1830,24 +1830,28 @@ d)%5D%0A + for o in raw @@ -1868,16 +1868,20 @@ + + if not o @@ -1912,16 +1912,20 @@ d(None)%0A + @@ -1980,16 +1980,20 @@ + + assert l @@ -2048,24 +2048,28 @@ es)%0A + teams.append @@ -2092,16 +2092,101 @@ + odds) +%0A except:%0A print %22Unexpected error. skipping%22%0A traceback.print_exc() %0A%0At = st
d146e397b0240d1a22e2f53d3c538a90180a122d
remove wxPython from install_requires, as setuptools can't find/install it
setup.py
setup.py
from setuptools import setup, find_packages import os kws = {} if not int(os.getenv( 'DISABLE_INSTALL_REQUIRES','0' )): kws['install_requires'] = [ 'numpy>=1.0.4', 'PIL>=1.1.6', 'motmot.imops', 'wxPython>=2.8' ] setup(name='motmot.wxvideo', description='wx viewer of image sequences', long_description = \ """Allows for display and resizing/rotation of images. This is a subpackage of the motmot family of digital image utilities. """, packages = find_packages(), namespace_packages = ['motmot'], url='http://code.astraw.com/projects/motmot', version='0.5.3', author='Andrew Straw', author_email='strawman@astraw.com', license='BSD', **kws)
Python
0
@@ -220,32 +220,8 @@ s',%0A - 'wxPython%3E=2.8'%0A
51de92a1402739e4a6a703ce1fc7e2f2ade308f3
add information to pypi page (#21)
setup.py
setup.py
"""Setup for vt_graph_api module.""" import re import sys import setuptools with open("./vt_graph_api/version.py") as f: version = ( re.search(r"__version__ = \'([0-9]{1,}.[0-9]{1,}.[0-9]{1,})\'", f.read()).groups()[0]) # check python version >2.7.x and >=3.2.x installable = True if sys.version_info.major == 3: if sys.version_info.minor < 2: installable = False else: if sys.version_info.minor < 7: installable = False if not installable: sys.exit("Sorry, this python version is not supported") with open("README.md", "r") as fh: long_description = fh.read() install_requires = [ "requests", "six", "futures" ] setuptools.setup( name="vt_graph_api", version=version, author="VirusTotal", author_email="vt_graph_api@virustotal.com", description="VirusTotal Graph API", license="Apache 2", long_description_content_type="text/markdown", url="https://github.com/virustotal/vt_graph_api", packages=setuptools.find_packages(), install_requires=install_requires, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], )
Python
0
@@ -820,16 +820,55 @@ iption=%22 +The official Python client library for VirusTot @@ -906,16 +906,55 @@ che 2%22,%0A + long_description=long_description,%0A long @@ -1037,23 +1037,23 @@ total/vt -_ +- graph -_ +- api%22,%0A
d36e17e3823af74b5a6f75191f141ec98fdf281f
Fix failing reconnects; add quit IRC command
plugins/irc/irc.py
plugins/irc/irc.py
from p1tr.helpers import clean_string from p1tr.plugin import * @meta_plugin class Irc(Plugin): """Provides commands for basic IRC operations.""" @command @require_master def nick(self, server, channel, nick, params): """Usage: nick NEW_NICKNAME - changes the bot's nickname.""" if len(params) < 1: return clean_string(self.nick.__doc__) self.bot.client.send('NICK', params[0]) @command @require_master def join(self, server, channel, nick, params): """ Usage: join #CHANNEL [PASSWORD] - the bot will enter the specified channel. A password may be provided optionally, if it is required. """ if len(params) < 1: return clean_string(self.join.__doc__) password = '' if len(params) > 1: password = params[0] self.bot.client.send('JOIN', params[0], password) @command @require_op def part(self, server, channel, nick, params): """ Usage: part [#CHANNEL] - asks the bot to leave the current channel. Optionally, a channel may be specified if it should be left instead of the current one. """ if len(params) > 0: channel = params[0] self.bot.client.send('PART', channel) @command @require_master def quit(self, server, channel, nick, params): self.blot.intended_disconnect = True
Python
0.000001
@@ -1299,13 +1299,9 @@ el)%0A - %0A + @@ -1392,15 +1392,104 @@ +%22%22%22%0A Usage: quit - Tell the bot to disconnect from the server.%0A %22%22%22%0A self.b -l ot.i @@ -1514,8 +1514,32 @@ = True%0A + self.bot.exit()%0A
823d6a22622ad1f854c5241ccc5458cd0e8ea6e1
call to the configure logging function ... :P
scout/app.py
scout/app.py
# -*- coding: utf-8 -*- """The app module, containing the app factory function.""" from __future__ import absolute_import, unicode_literals import os import arrow from flask import Flask, render_template from jinja2 import is_undefined from path import path as ipath from werkzeug.utils import import_string from .settings import DevelopmentConfig class NoContextProcessorException(Exception): """Raise if context processor wasn't found.""" pass class NoBlueprintException(Exception): """Raise if blueprint wasn't found.""" pass class NoExtensionException(Exception): """Raise if extension wasn't found.""" pass def get_imported_stuff_by_path(path): """Helper method to import modules from a string path.""" module_name, object_name = path.rsplit('.', 1) module = import_string(module_name) return module, object_name class AppFactory(object): """Create a Flask app (Flask Application Factory).""" def __init__(self): super(AppFactory, self).__init__() self.app_config = None self.app = None def __call__(self, app_name=None, config=None, config_obj=None, **kwargs): # initialize the application self.app_config = config self.app = Flask(app_name or DevelopmentConfig.PROJECT, instance_relative_config=True, **kwargs) self._configure_app(config_obj=config_obj) self._bind_extensions() self._register_blueprints() self._configure_template_filters() self._configure_error_handlers() return self.app def _configure_app(self, config_obj=None): """Configure the app in different ways.""" # http://flask.pocoo.org/docs/api/#configuration self.app.config.from_object(config_obj or DevelopmentConfig) # user custom config # http://flask.pocoo.org/docs/config/#instance-folders default_config = os.path.join(self.app.instance_path, "{}.cfg".format(self.app.name)) self.app.config.from_pyfile(self.app_config or default_config, silent=True) def _bind_extensions(self): """Bind extensions to the app dynamically.""" for ext_path in self.app.config.get('EXTENSIONS', []): module, object_name = get_imported_stuff_by_path(ext_path) if not hasattr(module, object_name): raise NoExtensionException("No {} extension found".format(object_name)) extension = getattr(module, object_name) if getattr(extension, 'init_app', False): extension.init_app(self.app) else: extension(self.app) def _register_blueprints(self): """Configure blueprints in views.""" for blueprint_path, url_prefix in self.app.config.get('BLUEPRINTS', []): module, object_name = get_imported_stuff_by_path(blueprint_path) if hasattr(module, object_name): self.app.register_blueprint(getattr(module, object_name), url_prefix=url_prefix) else: raise NoBlueprintException("No {} blueprint found".format(object_name)) def _register_context_processors(self): """Register extra contexts for Jinja templates.""" for processor_path in self.app.config.get('CONTEXT_PROCESSORS', []): module, object_name = get_imported_stuff_by_path(processor_path) if hasattr(module, object_name): self.app.context_processor(getattr(module, object_name)) else: raise NoContextProcessorException("No {} context processor found" .format(object_name)) def _configure_logging(self): """Configure file(info) and email(error) logging""" if self.app.debug or self.app.testing: # Skip debug and test mode; just check standard output return log_folder = self.app.config.get('LOG_FOLDER') if log_folder is None: default_log_folder = os.path.join(self.app.instance_path, 'logs') self.app.config['LOG_FOLDER'] = default_log_folder # make sure that all folders are in place ipath(self.app.config['LOG_FOLDER']).makedirs_p() import logging from logging.handlers import SMTPHandler # Set info level on logger which might be overwritten by handlers # Suppress DEBUG messages self.app.logger.setLevel(logging.INFO) log_file_name = "{}.log".format(self.app.config['PROJECT']) log_file = os.path.join(self.app.config['LOG_FOLDER'], log_file_name) info_file_handler = logging.handlers.RotatingFileHandler( log_file, maxBytes=100000, backupCount=10) info_file_handler.setLevel(logging.INFO) info_file_handler.setFormatter(logging.Formatter( '%(asctime)s %(levelname)s: %(message)s ' '[in %(pathname)s:%(lineno)d]') ) self.app.logger.addHandler(info_file_handler) mail_handler = SMTPHandler( self.app.config['MAIL_SERVER'], self.app.config['MAIL_USERNAME'], self.app.config['ADMINS'], 'O_ops... %s failed!' % self.app.config['PROJECT'], (self.app.config['MAIL_USERNAME'], self.app.config['MAIL_PASSWORD']) ) mail_handler.setLevel(logging.ERROR) mail_handler.setFormatter(logging.Formatter( '%(asctime)s %(levelname)s: %(message)s ' '[in %(pathname)s:%(lineno)d]') ) self.app.logger.addHandler(mail_handler) def _configure_error_handlers(self): """Configure error handlers to the corresponding error pages.""" @self.app.errorhandler(403) def forbidden_page(error): """Render the forbidden error page on 403 errors.""" return render_template('errors/forbidden_page.html', error=error), 403 @self.app.errorhandler(404) def page_not_found(error): """Render the page not found page on 404 errors.""" return render_template('errors/page_not_found.html', error=error), 404 @self.app.errorhandler(500) def server_error_page(error): """Render the server error page on 500 errors.""" return render_template('errors/server_error.html', error=error), 500 def _configure_template_filters(self): """Configure custom Jinja2 template filters.""" @self.app.template_filter() def human_date(value): return arrow.get(value).humanize() @self.app.template_filter() def format_date(value, format="%Y-%m-%d"): return value.strftime(format) @self.app.template_filter() def initials(value): parts = value.split(' ') letters = (part[0] for part in parts) return ''.join(letters) @self.app.template_filter() def client_filter(value): """Pass through variable in Jinja2 to client side template. The filter tells Jinja2 that a variable is for a client side template engine. If the variable is undefined, its name will be used in the client side template, otherwise, its content will be used. """ if is_undefined(value): return '{{{{{}}}}}'.format(value._undefined_name) if type(value) is bool: value = repr(value).lower() return '{{{{{}}}}}'.format(value)
Python
0
@@ -1402,24 +1402,54 @@ lueprints()%0A + self._configure_logging()%0A self._co
8396d59c6dd8a07889dce472dec23b7eff4cc4fb
version 0.9.5
setup.py
setup.py
from distutils.core import setup setup( name='pySunScene', version='0.9.4', py_modules=['raytrace'], url='', license='MIT', author='Gabriel Cardona, Ramon Pujol', author_email='gabriel.cardona@uib.es, ramon.pujol@uib.es', description='', install_requires=[ 'numpy>=1', ] )
Python
0.000002
@@ -78,9 +78,9 @@ 0.9. -4 +5 ',%0A
65aa46e11fc815490d5c76b803645e3d8f6c49c4
bump version to 0.1.0
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import io import sys from shutil import rmtree from setuptools import setup, Command readme_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') with io.open(readme_file, encoding='utf-8') as f: long_description = '\n' + f.read() class TestUploadCommand(Command): """Allow testing setup.py upload to testpypi.""" description = 'Build and publish the package to the test pypi server.' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: import twine except ImportError: print('Twine is required for testing uploads') sys.exit() assert twine try: print('Removing previous builds…') rmtree(os.path.join( os.path.abspath(os.path.dirname(__file__)), 'dist')) except OSError: pass print('Building Source and Wheel (universal) distribution…') os.system('{} setup.py sdist bdist_wheel --universal'.format(sys.executable)) print('Uploading the package to PyPi via Twine…') os.system('twine upload --repository-url https://test.pypi.org/legacy/ dist/*') sys.exit() class UploadCommand(Command): """Allow uploading to pypi with setup.py""" description = 'Build and publish the package to pypi.' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): try: import twine except ImportError: print('Twine is required for testing uploads') sys.exit() assert twine try: print('Removing previous builds…') rmtree(os.path.join( os.path.abspath(os.path.dirname(__file__)), 'dist')) except OSError: pass print('Building Source and Wheel (universal) distribution…') os.system('{} setup.py sdist bdist_wheel --universal'.format(sys.executable)) print('Uploading the package to PyPi via Twine…') os.system('twine upload dist/*') sys.exit() setup( name="PyTumblr", version="0.0.8", description="A Python API v2 wrapper for Tumblr", long_description=long_description, author="Tumblr", author_email="accounts@tumblr.com", url="https://github.com/tumblr/pytumblr", download_url="https://github.com/tumblr/pytumblr/archive/0.0.8.tar.gz", packages=['pytumblr'], license="Apache Software License 2.0", zip_safe=False, keywords='pytumblr', python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], test_suite='nose.collector', install_requires=[ 'future', 'requests-oauthlib', ], tests_require=[ 'nose', 'nose-cov', 'mock' ], cmdclass={ 'testupload': TestUploadCommand, 'upload': UploadCommand, }, )
Python
0.000001
@@ -2338,19 +2338,19 @@ sion=%220. -0.8 +1.0 %22,%0A d @@ -2611,11 +2611,11 @@ e/0. -0.8 +1.0 .tar
c643fa5f69d09cbb1512624c4c173d9bea34348c
Fix rdflib version
setup.py
setup.py
import os from setuptools import setup readme_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md') with open(readme_path, 'r', encoding='utf-8') as fh: long_description = fh.read() def main(): install_list = ['pysb>=1.3.0,<=1.9.1', 'objectpath', 'rdflib', 'requests>=2.11', 'lxml', 'ipython', 'future', 'networkx>=2', 'pandas', 'ndex2==2.0.1', 'jinja2', 'protmapper>=0.0.16', 'obonet'] extras_require = { # Inputs and outputs 'biopax': ['cython', 'pyjnius==1.1.4'], 'trips_offline': ['pykqml'], 'reach_offline': ['cython', 'pyjnius==1.1.4'], 'eidos_offline': ['pyyaml>=5.1.0', 'cython', 'pyjnius==1.1.4'], 'hypothesis': ['gilda'], 'geneways': ['stemming', 'nltk'], 'sofia': ['openpyxl'], 'bel': ['pybel>=0.14.2,<0.15.0'], 'sbml': ['python-libsbml'], # Tools and analysis 'machine': ['pytz', 'tzlocal', 'tweepy', 'pyyaml>=5.1.0', 'click'], 'explanation': ['kappy==4.0.0rc1', 'paths-graph'], 'grounding': ['adeft', 'gilda'], # AWS interface and database 'aws': ['boto3', 'reportlab'], # Utilities 'graph': ['pygraphviz'], 'plot': ['matplotlib'], 'isi': ['nltk', 'unidecode'], 'api': ['flask'] } extras_require['all'] = list({dep for deps in extras_require.values() for dep in deps}) setup(name='indra', version='1.16.0', description='Integrated Network and Dynamical Reasoning Assembler', long_description=long_description, long_description_content_type='text/markdown', author='Benjamin Gyori', author_email='benjamin_gyori@hms.harvard.edu', url='http://github.com/sorgerlab/indra', packages=['indra', 'indra.assemblers', 'indra.assemblers.cag', 'indra.assemblers.cx', 'indra.assemblers.cyjs', 'indra.assemblers.english', 'indra.assemblers.figaro', 'indra.assemblers.graph', 'indra.assemblers.html', 'indra.assemblers.index_card', 'indra.assemblers.indranet', 'indra.assemblers.kami', 'indra.assemblers.pybel', 'indra.assemblers.pysb', 'indra.assemblers.sbgn', 'indra.assemblers.sif', 'indra.assemblers.tsv', 'indra.belief', 'indra.benchmarks', 'indra.databases', 'indra.explanation', 'indra.explanation.model_checker', 'indra.literature', 'indra.mechlinker', 'indra.preassembler', 'indra.preassembler.grounding_mapper', 'indra.sources', 'indra.sources.bel', 'indra.sources.biopax', 'indra.sources.cwms', 'indra.sources.eidos', 'indra.sources.geneways', 'indra.sources.hprd', 'indra.sources.hume', 'indra.sources.hypothesis', 'indra.sources.index_cards', 'indra.sources.indra_db_rest', 'indra.sources.isi', 'indra.sources.lincs_drug', 'indra.sources.ndex_cx', 'indra.sources.phosphoelm', 'indra.sources.reach', 'indra.sources.rlimsp', 'indra.sources.sofia', 'indra.sources.sparser', 'indra.sources.tas', 'indra.sources.tees', 'indra.sources.trips', 'indra.sources.trrust', 'indra.sources.virhostnet', 'indra.resources', 'indra.statements', 'indra.tests', 'indra.tests.test_obo_clients', 'indra.tools', 'indra.tools.live_curation', 'indra.tools.machine', 'indra.util'], install_requires=install_list, extras_require=extras_require, include_package_data=True, keywords=['systems', 'biology', 'model', 'pathway', 'assembler', 'nlp', 'mechanism', 'biochemistry', 'network'], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Bio-Informatics', 'Topic :: Scientific/Engineering :: Chemistry', 'Topic :: Scientific/Engineering :: Mathematics', ], entry_points={'console_scripts': ['indra-machine = indra.tools.machine.cli:main']} ) if __name__ == '__main__': main()
Python
0
@@ -309,16 +309,23 @@ 'rdflib +==4.2.2 ',%0A
c831f6bee344b67171900ca7e50bf6fc85ea9345
Remove outdated qualifier in setup.py
setup.py
setup.py
import os from setuptools import setup from explorer import __version__ # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="django-sql-explorer", version=__version__, author="Chris Clark", author_email="chris@untrod.com", description=("A pluggable app that allows users (admins) to execute SQL," " view, and export the results."), license="MIT", keywords="django sql explorer reports reporting csv database query", url="https://github.com/groveco/django-sql-explorer", packages=['explorer'], long_description=read('README.rst'), classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Topic :: Utilities', 'Framework :: Django :: 1.7', 'Framework :: Django :: 1.8', 'Framework :: Django :: 1.9', 'Framework :: Django :: 1.10', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ], install_requires=[ 'Django>=1.8.0', 'sqlparse>=0.1.18', 'unicodecsv>=0.14.1', 'six>=1.10.0', ], include_package_data=True, zip_safe=False, )
Python
0.000002
@@ -1056,46 +1056,8 @@ s',%0A - 'Framework :: Django :: 1.7',%0A
d8e0109e4c697f4a920ff4993c491eb5b0d38d55
Update pylint dependency to 1.9.1
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2010-2018 OneLogin, Inc. # MIT License from setuptools import setup setup( name='python-saml', version='2.4.1', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', ], author='OneLogin', author_email='support@onelogin.com', license='MIT', url='https://github.com/onelogin/python-saml', packages=['onelogin', 'onelogin/saml2'], include_package_data=True, package_data={ 'onelogin/saml2/schemas': ['*.xsd'], }, package_dir={ '': 'src', }, test_suite='tests', install_requires=[ 'dm.xmlsec.binding==1.3.3', 'isodate>=0.5.0', 'defusedxml>=0.4.1', ], extras_require={ 'test': ( 'coverage>=3.6', 'freezegun==0.3.5', 'pylint==1.3.1', 'pep8==1.5.7', 'pyflakes==0.8.1', 'coveralls==1.1', ), }, keywords='saml saml2 xmlsec django flask', )
Python
0
@@ -1153,17 +1153,17 @@ lint==1. -3 +9 .1',%0A
c0566fabd434b2f9722ac37538fd74b4959fedbc
Add click as dependency
setup.py
setup.py
from setuptools import setup, find_packages from jarvis_cli import __version__ setup( name = "jarvis-cli", version = __version__, packages = find_packages(), author = "Michael Hwang", author_email = "hirehwang@gmail.com", description = ("Jarvis command-line tool"), # Adopted the method of creating bins through setuptools # http://click.pocoo.org/5/setuptools/#setuptools-integration # The webpage lists benefits of doing this. entry_points=""" [console_scripts] jarvis=jarvis_cli.commands:cli """, install_requires=['requests', 'tabulate', 'dateparser<1.0.0'], zip_safe = False )
Python
0.000001
@@ -666,16 +666,29 @@ r%3C1.0.0' +, 'click%3C7.0' %5D,%0A
cf16c64e378f64d2267f75444c568aed895f940c
Add csblog to installed scripts.
setup.py
setup.py
import platform, sys from distutils.core import setup from distextend import * packages, package_data = findPackages("countershape") setup( name = "countershape", version = "0.1", description = "A framework for rendering static documentation.", author = "Nullcube Pty Ltd", author_email = "aldo@nullcube.com", url = "http://dev.nullcube.com", packages = packages, package_data = package_data, scripts = ["cshape"], )
Python
0
@@ -478,13 +478,23 @@ %22cshape%22 +, %22csblog%22 %5D,%0A)%0A
496abc7854985c6f1bfd8463330f2f07a0f3048c
remove unused dependency libcst (#39)
setup.py
setup.py
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import io import os import setuptools # type: ignore version = "0.2.1" package_root = os.path.abspath(os.path.dirname(__file__)) readme_filename = os.path.join(package_root, "README.rst") with io.open(readme_filename, encoding="utf-8") as readme_file: readme = readme_file.read() setuptools.setup( name="google-cloud-bigquery-migration", version=version, long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", license="Apache 2.0", url="https://github.com/googleapis/python-bigquery-migration", packages=setuptools.PEP420PackageFinder.find(), namespace_packages=("google", "google.cloud"), platforms="Posix; MacOS X; Windows", include_package_data=True, install_requires=( "google-api-core[grpc] >= 1.28.0, < 3.0.0dev", "libcst >= 0.2.5", "proto-plus >= 1.15.0", ), python_requires=">=3.6", classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules", ], zip_safe=False, )
Python
0
@@ -1420,35 +1420,8 @@ v%22,%0A - %22libcst %3E= 0.2.5%22,%0A
a339b96b33fd7f2ef8e2d18c64e997173309a459
Prepare for more development.
setup.py
setup.py
from distutils.core import setup setup( name='udiskie', version='0.2.0', description='Removable disk automounter for udisks', author='Byron Clark', author_email='byron@theclarkfamily.name', url='http://bitbucket.org/byronclark/udiskie', packages=[ 'udiskie', ], scripts=[ 'bin/udiskie', 'bin/udiskie-umount', ], )
Python
0
@@ -71,17 +71,17 @@ on='0.2. -0 +1 ',%0A d
118c079b2065f1b624f2ed54722483f1dca46eac
fix typo in setup.py
setup.py
setup.py
from distutils.core import setup setup( name='htmlr', version='0.1.0', author='Scott Hamilton', author_email='mcleopold@gmail.com', packages=['htmlr', 'skills.testsuite' ], url='http://github.com/McLeopold/PythonHtmlr/', license="BSD", description='DSL to generate HTML with Python', long_description=open('README.rst').read(), classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Development Status :: 3 - Alpha', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'Topic :: Internet', 'Topic :: Internet :: WWW/HTTP', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
Python
0.000015
@@ -184,14 +184,13 @@ ' -skills +htmlr .tes
6bd7a61272ca5fe3d916488e24a1dab5e022f61b
Fix installing PIP issues
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup(name='hypchat', version='0.4', description="Package for HipChat's v2 API", long_description=open('README.rst').read(), author='James Bliss', author_email='james@ridersdiscount.com', url='https://github.com/RidersDiscountCom/HypChat', packages=['hypchat'], requires=['requests', 'dateutil'], provides=['hypchat'], classifiers=[ # https://pypi.python.org/pypi?%3Aaction=list_classifiers 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2 :: Only', 'Topic :: Communications :: Chat', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', ] )
Python
0
@@ -50,16 +50,208 @@ setup%0A%0A +def read_file(name):%0A %22%22%22%0A Read file content%0A %22%22%22%0A f = open(name)%0A try:%0A return f.read()%0A except IOError:%0A print(%22could not read %25r%22 %25 name)%0A f.close()%0A%0A setup(na @@ -358,20 +358,25 @@ ription= -open +read_file ('README @@ -381,23 +381,16 @@ ME.rst') -.read() ,%0A @@ -1189,8 +1189,10 @@ %5D%0A ) +%0A%0A
91746b5a3352ffc56baf770d6b35f0130b2e4128
update version
setup.py
setup.py
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() with open('requirements.txt') as f: required = f.read().splitlines() version = '0.0.2' setuptools.setup( name="rt-utils", version=version, author="Asim Shrestha", author_email="asim.shrestha@hotmail.com", description="A small library for handling masks and RT-Structs", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/qurit/rtutils", packages=setuptools.find_packages(), keywords=["RTStruct", "Dicom", "Pydicom"], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.6', install_requires=required, )
Python
0
@@ -190,9 +190,9 @@ 0.0. -2 +3 '%0A%0As
c754e7fd020ff3bdada2e724087c82ce72ee061b
Bump version to 0.2.19
setup.py
setup.py
"""sfdclib package setup""" import textwrap from setuptools import setup setup( name='sfdclib', version='0.2.18', author='Andrey Shevtsov', author_email='ashevtsov@rbauction.com', packages=['sfdclib'], url='https://github.com/rbauction/sfdclib', license='MIT', description=("SFDClib is a Salesforce.com Metadata API and Tooling " "API client built for Python 2.7, 3.3 and 3.4."), long_description=textwrap.dedent(open('README.rst', 'r').read()), package_data={'': ['LICENSE']}, package_dir={'sfdclib': 'sfdclib'}, install_requires=[ 'requests[security]' ], keywords="python salesforce salesforce.com metadata tooling api", classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4' ] )
Python
0
@@ -117,9 +117,9 @@ .2.1 -8 +9 ',%0A
ec070a097ead0370cf7b1ac9c21e6c4a68f9477c
Send file before changes
bin/py/watch.py
bin/py/watch.py
#!/usr/bin/env python from __future__ import print_function import os from sys import argv from time import sleep import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler import liblo logger = logging.getLogger("watcher.py") logger.setLevel(logging.INFO) logger.addHandler(logging.StreamHandler()) def watch_file(file_name, action, *args, **kwargs): "Return a watchdog observer, it will call the action callback" def on_modified(event): "File-changed event" if not os.path.exists(event.src_path): return logger.info("Changed %s" % event.src_path) if os.path.samefile(event.src_path, file_name): action(*args, **kwargs) logger.info("Started watcher") handler = FileSystemEventHandler() handler.on_modified = on_modified observer = Observer() base_path = os.path.split(file_name)[0] if not base_path: base_path = "." observer.schedule(handler, path=base_path) observer.start() return observer def check_address(addr): "If only port is specified send to localhost" splitted = str(addr).split(":") if splitted[1:]: return addr else: return ":".join(["localhost", splitted[0]]) def send(addr, path, *msg): """address path message Send message on a given path""" addr = check_address(addr) target = liblo.Address("osc.udp://" + addr + "/") liblo.send(target, path, *msg) def main(): "Main function" if len(argv) != 4: print("Watch a file for changes and send it via OSC") print("Usage:", argv[0], "file_to_watch [ip:]port /path") return file_name, addr, path = argv[1:] def callback(): with open(file_name) as f: logger.info("Sending content") send(addr, path, f.read()) watcher = watch_file(file_name, callback) try: while True: sleep(0.1) except KeyboardInterrupt: watcher.stop() watcher.join() if __name__ == "__main__": main()
Python
0
@@ -1904,16 +1904,31 @@ llback)%0A + callback()%0A try:
54620b2be022c66d384ec0553838c463ed1a0d61
fix problem with file writing messages not being strings
tiFile.py
tiFile.py
""" file: ti_file.py language: python3 author: Nate Levesque <public@thenaterhood.com> description: Reads and writes TI-Basic .8Xp files and returns structures relevant to the file if appropriate. TODO: add additional validation to the validate function add an empty structure or otherwise change the construction of a tiFile object figure out why when reading the file, the first byte goes missing """ import dictionaries class tiFile(): """ Defines a data object to hold sections of a TI-Basic program file """ __slots__=('metadata', 'prgmdata', 'footer') def __init__(self): """ Initializes the fields of the struct to empty fields """ self.metadata='null' self.prgmdata='null' self.footer='null' def __str__(self): string = "TI File Data Object" if (self.metadata != 'null'): string += "\n Contains metadata" if (self.prgmdata != 'null'): string += "\n Contains program data" if (self.footer != 'null'): string += "\n Contains footer data" return string def read(filename): """ Reads a TI-Basic .8xp file byte by byte and populates the fields of the data object that represents it Arguments: filename (str): the filename of a .8xp file to open, inc extension Returns: fileData (tiFile): a tiFile object """ # Reads the file into an array of bytes fileData = tiFile() fileContents = [] with open(filename, "rb") as inStream: byte = inStream.read(1) while byte: byte = inStream.read(1) fileContents.append(byte) # Attempts to extract the metadata and raises an error # if the array is too short to contain any try: fileData.metadata = fileContents[:73] except: raise RuntimeError("File is too short to be a .8xp file.") # raises a warning if the array is too short to contain program # data and a footer if (len(fileContents) < 74): print("WARNING: File is only long enough to contain metadata. Will continue, but it might not be pretty") fileData.prgmdata = 'null' fileData.footer = 'null' return fileData else: fileData.prgmdata = fileContents[73:len(fileContents)-3] fileData.footer = fileContents[len(fileContents)-3:len(fileContents)] return fileData def writeBytes(openFile, data): """ Iterates through a list of bytes and writes them to a file. Arguments: openFile (file): an open file data (list): a list of bytes to write """ for byte in data: if (isinstance(byte, bytes)): openFile.write(byte) else: print("Error writing byte to file. Was '"+byte+"'. Continuing, but compiled file might have problems.") def write(filename, tiData): """ Writes a .8xp TI-Basic file to disk as bytes Arguments: filename (str): the name of the file to write tiData (tiFile): a tiFile object to write the data for Returns: fileWritten (boolean): a boolean value of whether or not the file has been written """ # Add the .8xp extension to the filename filename = (filename.split('.')[0] + ".8Xp") # Opens the file to write binary outFile = open(filename, "wb") # Writes the program file to disk writeBytes(outFile, tiData.metadata) writeBytes(outFile, tiData.prgmdata) writeBytes(outFile, tiData.footer) # Returns true for now, will later possibly perform some check to # make sure it wrote what it intended. For now needs to just # write the whole thing or fail, makes it easier to debug the encode # function if a big problem pops up return True def validate(tiData): """ Validates that a .8Xp file is actually a .8Xp file. Currently only checks sections of the metadata. For now is primarily so the decode program doesn't try decoding things that are not TI-Basic files. Arguments: tiData (tiFile): a tiFile object containing the ti-basic file to validate Returns: valid (boolean): a boolean value indicating if the file is valid """ fileType = tiData.metadata[:9] # Validating against bytes 1-9 of the mimetype. # for some reason the first byte of the file doesn't get read # which will need to be looked into if (fileType != dictionaries.mimetype()[1:]): return False return True
Python
0.000086
@@ -2928,20 +2928,25 @@ Was '%22+ +str( byte +) +%22'. Co
633110a0967f75f590bc24dd9d5d3400cb9efb0a
Remove unused classmethod from setup.py
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): # long option, short option, description user_options = [ ('flakes', None, 'Use pyflakes'), ('coverage', 'C', 'Show coverage statistics'), ('jenkins', None, 'Test setup for jenkins'), ] @classmethod def add_project_specific_options(self): """ Function for subclasses to add additional test args eg. location of tests These options are likely to be specific to the project and are therefore not added to user_options above """ pass def initialize_options(self): TestCommand.initialize_options(self) self.flakes = False self.coverage = False self.jenkins = False def finalize_options(self): TestCommand.finalize_options(self) self.test_args = ["quintet/tests"] if self.flakes: self.test_args.append('--flakes') if self.coverage: self.test_args += [ '--cov', 'quintet', '--cov-report', 'term-missing'] if self.jenkins: self.test_args += [ '--cov', 'quintet', '--cov-report', 'xml'] self.test_suite = True def run_tests(self): import pytest errno = pytest.main(self.test_args) sys.exit(errno) setup(name='Quintet', version='0.1', description='Quintet Framework', author='Moses E. Miles III', author_email='vamem9z@gmail.com', packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), license = 'MIT', classifiers=[ "Development Status :: 2 - Pre-Alpha", ], install_requires=['docker-py==0.2.3'], tests_require=['pytest==2.5.2', 'pytest-flakes', 'pytest-cov==1.6'], cmdclass = {'test':PyTest}, )
Python
0.000001
@@ -419,310 +419,8 @@ %5D%0A - @classmethod%0A def add_project_specific_options(self):%0A %22%22%22%0A Function for subclasses to add additional test args eg. location of tests%0A%0A These options are likely to be specific to the project and are therefore not added to user_options above%0A %22%22%22%0A pass%0A
effe6edab431c133aed40c72698f6a1b976b6a67
add dependencies to setup.py
setup.py
setup.py
from setuptools import setup, find_packages from ckanext.qa import __version__ setup( name='ckanext-qa', version=__version__, description="Quality Assurance plugin for CKAN", long_description=""" """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='', author='Open Knowledge Foundation', author_email='info@okfn.org', url='http://ckan.org/wiki/Extensions', license='mit', packages=find_packages(exclude=['tests']), namespace_packages=['ckanext', 'ckanext.qa'], include_package_data=True, zip_safe=False, install_requires=[ # ], tests_require=[ 'nose', 'mock', ], entry_points=\ """ [paste.paster_command] qa=ckanext.qa.commands:QACommand [ckan.plugins] qa=ckanext.qa.plugin:QAPlugin """, )
Python
0.000001
@@ -641,17 +641,123 @@ -# +'celery%3E=2.3.3',%0A 'kombu-sqlalchemy%3E=1.1.0',%0A 'SQLAlchemy%3E=0.6.6',%0A 'requests==0.6.4', %0A %5D,%0A
6076ceb869a604eb460a19b11b8c17043f21362f
bump version to 0.11.2
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup README = open('README.rst', 'rt').read() setup( name='vncdotool', version='0.11.1', description='Command line VNC client', install_requires=[ 'Twisted', "Pillow", ], tests_require=[ 'nose', 'pexpect', ], url='http://github.com/sibson/vncdotool', author='Marc Sibson', author_email='sibson+vncdotool@gmail.com', download_url='', entry_points={ "console_scripts": [ 'vncdo=vncdotool.command:vncdo', 'vncdotool=vncdotool.command:vncdo', 'vnclog=vncdotool.command:vnclog', ], }, packages=['vncdotool'], classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Framework :: Twisted', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Topic :: Multimedia :: Graphics :: Viewers', 'Topic :: Software Development :: Testing', ], long_description=open('README.rst').read(), )
Python
0
@@ -135,17 +135,17 @@ n='0.11. -1 +2 ',%0A d
875b7111a273cacb9b768d2cc6f9fa72fdd73180
Let it be 1.0.0
setup.py
setup.py
#!/usr/bin/env python2.7 from setuptools import setup import sys, os __version__ = '0.6' setup(name='gglsbl', version=__version__, description="Client library for Google Safe Browsing API", classifiers=[ "Operating System :: POSIX", "Environment :: Console", "Programming Language :: Python", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules", ], keywords='safe browsing api client', author='Aleh Filipovich', author_email='aleh@vaolix.com', url='https://github.com/afilipovich/gglsbl', license='Apache2', packages=['gglsbl'], install_requires=['argparse', 'pysqlite', 'protobuf'], scripts=['bin/gglsbl_client.py'], )
Python
0.99994
@@ -84,11 +84,13 @@ = ' +1. 0. -6 +0 '%0A%0As
67677c102fad318a9d64b1e65b125570ac1f1700
bump versions.
setup.py
setup.py
import os from setuptools import setup, find_packages from openspending.version import __version__ PKG_ROOT = '.' def files_in_pkgdir(pkg, dirname): pkgdir = os.path.join(PKG_ROOT, *pkg.split('.')) walkdir = os.path.join(pkgdir, dirname) walkfiles = [] for dirpath, _, files in os.walk(walkdir): fpaths = (os.path.relpath(os.path.join(dirpath, f), pkgdir) for f in files) walkfiles += fpaths return walkfiles def package_filter(pkg): if pkg in ['openspending.test', 'openspending.test.helpers']: return True elif (pkg.startswith('openspending.test') or pkg.startswith('openspending.ui.test')): return False else: return True setup( name='openspending', version=__version__, description='OpenSpending', author='Open Knowledge Foundation', author_email='okfn-help at lists okfn org', url='http://github.com/okfn/openspending', install_requires=[ "WebOb==1.0.8", # Explicitly specify WebOb 1.0.8, as with 1.1 # integration with Pylons is broken: # see https://gist.github.com/1214075 "Pylons==1.0", "Genshi==0.6", "SQLAlchemy==0.7.2", "sqlalchemy-migrate==0.7.1", "repoze.who==2.0", "repoze.who-friendlyform==1.0.8", "Unidecode==0.04.9", "solrpy==0.9.4", "pyutilib.component.core==4.3.1", "Babel==0.9.6", "colander==0.9.3", "distribute>=0.6.10", "mock==0.7.2", "sphinx==1.0.7", "argparse==1.2.1", "celery==2.1.4", "messytables==0.1.3", "osvalidate==2011-11-25.02" ], setup_requires=[ "PasteScript==1.7.5", "nose==1.1.2" ], packages=filter(package_filter, find_packages()), namespace_packages=['openspending', 'openspending.plugins'], package_data={ 'openspending.ui': ( files_in_pkgdir('openspending.ui', 'public') + files_in_pkgdir('openspending.ui', 'templates') ) }, test_suite='nose.collector', zip_safe=False, paster_plugins=['PasteScript', 'Pylons'], entry_points={ 'paste.app_factory': [ 'main = openspending.ui.config.middleware:make_app' ], 'paste.app_install': [ 'main = pylons.util:PylonsInstaller' ], 'console_scripts': [ 'ostool = openspending.command:main' ], 'paste.global_paster_command': [ 'celeryd=openspending.command.celery:CeleryDaemonCommand', ] }, message_extractors = {'openspending': [ ('**.py', 'python', None), ('ui/templates/docs/**.html', 'ignore', None), ('ui/templates/**.html', 'genshi', { 'ignore_tags': 'script' }), ('ui/public/**', 'ignore', None), ]}, )
Python
0
@@ -1647,17 +1647,17 @@ es==0.1. -3 +4 %22,%0A @@ -1685,12 +1685,12 @@ 11-2 -5.02 +8.03 %22%0A
921ef5f43e8f6f0c3274ca3ed48b856c50b0ead9
Fix build with Python 3
setup.py
setup.py
# -*- coding: utf-8 -*- # from setuptools import setup, find_packages import os import codecs # https://packaging.python.org/single_source_version/ base_dir = os.path.abspath(os.path.dirname(__file__)) about = {} with open(os.path.join(base_dir, 'voropy', '__about__.py')) as f: exec(f.read(), about) def read(fname): try: content = codecs.open( os.path.join(os.path.dirname(__file__), fname), encoding='utf-8' ).read() except Exception: content = '' return content setup( name='voropy', version=about['__version__'], author=about['__author__'], author_email=about['__author_email__'], packages=find_packages(), description=( 'Voronoi regions and more for triangular and tetrehedral meshes' ), long_description=read('README.rst'), url='https://github.com/nschloe/voropy', download_url='https://github.com/nschloe/voropy/releases', license=about['__license__'], platforms='any', install_requires=[ 'matplotlib', 'meshio', 'meshzoo', # only required by tests 'numpy >= 1.9', # unique return_counts 'scipy', ], classifiers=[ about['__status__'], about['__license__'], 'Intended Audience :: Science/Research', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Topic :: Scientific/Engineering :: Mathematics' ], scripts=[ 'tools/mesh_smoothing' ] )
Python
0.000001
@@ -265,16 +265,22 @@ t__.py') +, 'rb' ) as f:%0A
1de80ec1d74c2cf074d8f90a9c7da3c6e0380b05
Fix setup.py (really)
setup.py
setup.py
import os from setuptools import setup ROOT = os.path.dirname(os.path.realpath(__file__)) with open("README.md", encoding="utf-8") as inp: README_CONTENT = inp.read() setup( # Meta data name="grab", version="0.6.41", author="Gregory Petukhov", author_email="lorien@lorien.name", maintainer="Gregory Petukhov", maintainer_email="lorien@lorien.name", url="http://grablib.org", description="Web Scraping Framework", long_description=README_CONTENT, long_description_content_type="text/markdown", download_url="https://pypi.python.org/pypi/grab", keywords="network parsing grabbing scraping lxml xpath data mining", license="MIT License", # Package files packages=[ "grab", "grab.spider", "grab.spider.queue_backend", "grab.service", "grab.util", ], include_package_data=True, # Dependencies install_requires=[ "weblib>=0.1.28", "six", "user_agent", "selection", "lxml", "defusedxml", ], extras_require={ "full": ["urllib3", "certifi"], }, # Topics classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: CPython", "License :: OSI Approved :: MIT License", "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Internet :: WWW/HTTP", ], )
Python
0
@@ -817,16 +817,23 @@ %22grab. +spider. service%22
c9a21b84a4fd719fc0cf50cf96e642d7c494ea5d
use setup from distribution.py
setup.py
setup.py
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # setup.py - Setup script for kaa.base # ----------------------------------------------------------------------------- # $Id$ # # ----------------------------------------------------------------------------- # Copyright (C) 2005, 2006 Dirk Meyer, Jason Tackaberry # # First Edition: Dirk Meyer <dmeyer@tzi.de> # Maintainer: Dirk Meyer <dmeyer@tzi.de> # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version # 2.1 as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA # # ----------------------------------------------------------------------------- # python imports from distutils.core import setup import sys # We have some extensions but kaa.distribution isn't installed yet. So import # it directly from the source tree. First add src/ to the modules patch ... sys.path.insert(0, "src") # ... and now import it. from distribution import Extension ext = Extension('kaa.shmmodule', ['src/extensions/shmmodule.c']).convert() extensions = [ ext ] objectrow = Extension('kaa._objectrow', ['src/extensions/objectrow.c']) if objectrow.check_library("glib-2.0", "2.4.0"): extensions.append(objectrow.convert()) else: print "glib >= 2.4.0 not found; kaa.db will be unavailable" inotify_ext = Extension("kaa.inotify._inotify", ["src/extensions/inotify/inotify.c"], config='src/extensions/inotify/config.h') if not inotify_ext.check_cc(["<sys/inotify.h>"], "inotify_init();"): if not inotify_ext.check_cc(["<sys/syscall.h>"], "syscall(0);"): print "inotify not enabled: doesn't look like a Linux system." else: print "inotify not supported in glibc; using built-in support instead." inotify_ext.config("#define USE_FALLBACK") extensions.append(inotify_ext.convert()) else: print "inotify supported by glibc; good." extensions.append(inotify_ext.convert()) # call setup setup( name = 'kaa-base', version = '0.1', maintainer = 'The Freevo Project', maintainer_email = 'developer@freevo.org', url = 'http://www.freevo.org/kaa', package_dir = { 'kaa': 'src', 'kaa.notifier': 'src/notifier', 'kaa.notifier.pynotifier': 'src/notifier/pynotifier', 'kaa.input': 'src/input', 'kaa.inotify': 'src/extensions/inotify' }, packages = [ 'kaa', 'kaa.notifier', 'kaa.notifier.pynotifier', 'kaa.input', 'kaa.inotify' ], ext_modules = extensions)
Python
0.000001
@@ -1226,41 +1226,8 @@ rts%0A -from distutils.core import setup%0A impo @@ -1475,16 +1475,23 @@ xtension +, setup %0A%0Aext = @@ -1548,26 +1548,16 @@ ule.c'%5D) -.convert() %0Aextensi @@ -1723,26 +1723,16 @@ bjectrow -.convert() )%0Aelse:%0A @@ -2360,26 +2360,16 @@ tify_ext -.convert() )%0A%0Aelse: @@ -2452,18 +2452,8 @@ _ext -.convert() )%0A%0A%0A @@ -2480,14 +2480,14 @@ -name +module @@ -2500,12 +2500,8 @@ = ' -kaa- base @@ -2537,576 +2537,8 @@ 1',%0A - maintainer = 'The Freevo Project',%0A maintainer_email = 'developer@freevo.org',%0A url = 'http://www.freevo.org/kaa',%0A package_dir = %7B 'kaa': 'src',%0A 'kaa.notifier': 'src/notifier',%0A 'kaa.notifier.pynotifier': 'src/notifier/pynotifier',%0A 'kaa.input': 'src/input',%0A 'kaa.inotify': 'src/extensions/inotify' %7D,%0A packages = %5B 'kaa', 'kaa.notifier', 'kaa.notifier.pynotifier',%0A 'kaa.input', 'kaa.inotify' %5D,%0A
07bb5d08e639e634df30c0b0feaf13423945d2bd
Update version
setup.py
setup.py
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK from collections import OrderedDict from setuptools import find_packages, setup __version__ = '3.6.1' with open('README.md', 'r') as f: __long_description__ = f.read() def github(name, tag, org='NaturalHistoryMuseum'): return name, f'git+https://github.com/{org}/{name}@{tag}#egg={name}' ckan_extensions = OrderedDict([ github('ckanext-dcat', 'v1.1.1', org='ckan'), github('ckanext-ckanpackager', 'v2.1.3'), github('ckanext-contact', 'v2.0.1'), github('ckanext-doi', 'v3.0.7'), github('ckanext-gallery', 'v2.1.0'), github('ckanext-gbif', 'v2.0.0'), github('ckanext-graph', 'v2.0.1'), github('ckanext-ldap', 'v3.1.2'), github('ckanext-query-dois', 'v2.1.1'), github('ckanext-statistics', 'v2.0.15'), github('ckanext-versioned-datastore', 'v3.6.2'), ]) setup( name='ckanext-nhm', version=__version__, description='A CKAN extension for the Natural History Museum\'s Data Portal.', long_description=__long_description__, classifiers=[ 'Development Status :: 5 - Production/Stable', 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Programming Language :: Python', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], keywords='CKAN data nhm', author='Natural History Museum', author_email='data@nhm.ac.uk', url='https://github.com/NaturalHistoryMuseum/ckanext-nhm', license='GNU GPLv3', packages=find_packages(exclude=['tests']), namespace_packages=['ckanext', 'ckanext.nhm'], include_package_data=True, zip_safe=False, install_requires=[ 'lxml>=4.4.2', 'elasticsearch-dsl>=6.0.0,<7.0.0', 'cachetools>=4.2.4', # extensions we need to be installed too ] + [f'{name} @ {repo}' for (name, repo) in ckan_extensions.items()], dependency_links=list(ckan_extensions.values()), entry_points=''' [ckan.plugins] nhm=ckanext.nhm.plugin:NHMPlugin [ckan.rdf.profiles] nhm_dcat=ckanext.nhm.dcat.profiles:NHMDCATProfile ''', )
Python
0
@@ -226,16 +226,18 @@ = '3.6.1 +.1 '%0A%0Awith
b1742f04c0d3c39e5fa7faa2606f46561a82fad7
Add requirements to setup.py
setup.py
setup.py
#!/usr/bin/env python2 from distutils.core import setup setup(name='visram', version='0.1.0', description='Graphical RAM/CPU Visualizer', license='MIT', author='Matthew Pfeiffer', author_email='spferical@gmail.com', url='http://github.com/Spferical/visram', packages=['visram', 'visram.test'], scripts=['bin/visram'], platforms=['any'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: X11 Applications', 'Environment :: MacOS X :: Cocoa', 'Environment :: Win32 (MS Windows)', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: MIT License', 'Operating System :: POSIX', 'Operating System :: MacOS :: MacOS X', 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python :: 2 :: Only', 'Topic :: System :: Monitoring', ], )
Python
0
@@ -327,24 +327,85 @@ ram.test'%5D,%0A + install_requires=%5B'wxPython', 'matplotlib', 'psutil'%5D,%0A script
9c5b61c7ac246db59436e0faf667e20d945244e9
Update Development Status
setup.py
setup.py
from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() setup( name='singleurlcrud', description='Django CRUD, implemented using a single view and consequently a single URL.', long_description=readme, version='0.13', author='Hari Mahadevan', author_email='hari@hari.xyz', url='https://www.github.com/harikvpy/crud/tarball/0.13', packages=find_packages(), include_package_data=True, install_requires=['django-pure-pagination', 'django-bootstrap3'], license='BSD-3', keywords=['django', 'crud'], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Framework :: Django', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2.7', ], )
Python
0
@@ -649,16 +649,15 @@ :: -3 - Alph +4 - Bet a',%0A
aeb487b3d93618eeff11935a1df88340646207af
Set setup.py version to latest dev release (1.7dev4)
setup.py
setup.py
#!/usr/bin/env python import sys, os try: from setuptools import setup except ImportError: from distutils.core import setup setup_args = {} install_requires = ['param>=1.3.2', 'numpy>=1.0'] extras_require={} # Notebook dependencies of IPython 3 extras_require['notebook-dependencies'] = ['ipython', 'pyzmq', 'jinja2', 'tornado', 'jsonschema', 'notebook', 'pygments'] # IPython Notebook + matplotlib + Lancet extras_require['recommended'] = (extras_require['notebook-dependencies'] + ['matplotlib', 'lancet-ioam']) # Additional, useful third-party packages extras_require['extras'] = (['pandas', 'seaborn', 'mpld3', 'bokeh'] + extras_require['recommended']) # Everything including cyordereddict (optimization) and nosetests extras_require['all'] = (extras_require['recommended'] + extras_require['extras'] + ['cyordereddict', 'nose']) setup_args.update(dict( name='holoviews', version="1.6.2", install_requires = install_requires, extras_require = extras_require, description='Stop plotting your data - annotate your data and let it visualize itself.', long_description=open('README.rst').read() if os.path.isfile('README.rst') else 'Consult README.rst', author= "Jean-Luc Stevens and Philipp Rudiger", author_email= "holoviews@gmail.com", maintainer= "IOAM", maintainer_email= "holoviews@gmail.com", platforms=['Windows', 'Mac OS X', 'Linux'], license='BSD', url='http://ioam.github.com/holoviews/', packages = ["holoviews", "holoviews.core", "holoviews.core.data", "holoviews.element", "holoviews.interface", "holoviews.ipython", "holoviews.operation", "holoviews.plotting", "holoviews.plotting.mpl", "holoviews.plotting.bokeh", "holoviews.plotting.plotly", "holoviews.plotting.widgets"], package_data={'holoviews.ipython': ['*.html'], 'holoviews.plotting.mpl': ['*.mplstyle', '*.jinja', '*.js'], 'holoviews.plotting.bokeh': ['*.js', '*.css'], 'holoviews.plotting.plotly': ['*.js'], 'holoviews.plotting.widgets': ['*.jinja', '*.js', '*.css']}, classifiers = [ "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Operating System :: OS Independent", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Natural Language :: English", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries"] )) def check_pseudo_package(path): """ Verifies that a fake subpackage path for assets (notebooks, svgs, pngs etc) both exists and is populated with files. """ if not os.path.isdir(path): raise Exception("Please make sure pseudo-package %s exists." % path) else: assets = os.listdir(path) if len(assets) == 0: raise Exception("Please make sure pseudo-package %s is populated." % path) if __name__=="__main__": if 'HOLOVIEWS_RELEASE' in os.environ: # Make sure to create these directories and populate them before upload setup_args['packages'] += ["holoviews.assets", 'holoviews.notebooks'] # Add unit tests setup_args['packages'].append('holoviews.tests') setup_args['package_data']['holoviews.assets'] = ['*.png', '*.svg', '*.rst'] setup_args['package_data']['holoviews.notebooks'] = ['*.ipynb', '*.npy'] if ('upload' in sys.argv) or ('sdist' in sys.argv): check_pseudo_package(os.path.join('.', 'holoviews', 'tests')) check_pseudo_package(os.path.join('.', 'holoviews', 'assets')) check_pseudo_package(os.path.join('.', 'holoviews', 'notebooks')) import holoviews holoviews.__version__.verify(setup_args['version']) if 'install' in sys.argv: header = "HOLOVIEWS INSTALLATION INFORMATION" bars = "="*len(header) extras = '\n'.join('holoviews[%s]' % e for e in setup_args['extras_require']) print("%s\n%s\n%s" % (bars, header, bars)) print("\nHoloViews supports the following installation types:\n") print("%s\n" % extras) print("Users should consider using one of these options.\n") print("By default only a core installation is performed and ") print("only the minimal set of dependencies are fetched.\n\n") print("For more information please visit http://holoviews.org/install.html\n") print(bars+'\n') setup(**setup_args)
Python
0
@@ -1060,11 +1060,13 @@ =%221. -6.2 +7dev4 %22,%0A
8ddea9ae48467c830693e3b47b4faa1022c10b5f
fix csv write unicode bug (#199)
Lagerregal/utils.py
Lagerregal/utils.py
from __future__ import unicode_literals import csv, codecs, cStringIO import uuid from datetime import date, timedelta from django.conf import settings from django.test.runner import DiscoverRunner class PaginationMixin(): def get_paginate_by(self, queryset): if self.request.user.pagelength == None: return self.request.user.pagelength else: return 30 class UnicodeWriter: """ A CSV writer which will write rows to CSV file "f", which is encoded in the given encoding. """ def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): # Redirect output to a queue self.queue = cStringIO.StringIO() self.writer = csv.writer(self.queue, dialect=dialect, **kwds) self.stream = f self.encoder = codecs.getincrementalencoder(encoding)() def writerow(self, row): self.writer.writerow([unicode(s).encode("utf-8") for s in row]) # Fetch UTF-8 output from the queue ... data = self.queue.getvalue() data = data.decode("utf-8") # ... and reencode it into the target encoding data = self.encoder.encode(data) # write to the target stream self.stream.write(data) # empty queue self.queue.truncate(0) def writerows(self, rows): for row in rows: self.writerow(row) class DotDict(dict): __getattr__ = dict.get __setattr__ = dict.__setitem__ __delattr__ = dict.__delitem__ def get_file_location(instance=None, filename=""): destination = "" if instance: destination += instance.__class__.__name__.lower() destination += "/" ext = filename.split(".")[-1] destination += "{0}.{1}".format(uuid.uuid4(), ext) return destination def convert_ad_accountexpires(timestamp): """ returns a datetime.date object returns None when timestamp is 0, larger than date.max or on another error """ if timestamp is None or timestamp == 0: return None epoch_start = date(year=1601, month=1,day=1) seconds_since_epoch = timestamp/10**7 try: # ad timestamp can be > than date.max, return None (==never expires) new_date = epoch_start + timedelta(seconds=seconds_since_epoch) return new_date except OverflowError: return None except StandardError: print('Cannot convert expiration_date "{0}", falling back to None'.format(self.expiration_date)) class DetectableTestRunner(DiscoverRunner): def __init__(self, *args, **kwargs): settings.TEST_MODE = True super(DetectableTestRunner, self).__init__(*args, **kwargs)
Python
0
@@ -681,16 +681,186 @@ ingIO()%0A + if %22delimiter%22 in kwds:%0A kwds%5B%22delimiter%22%5D=str(kwds%5B%22delimiter%22%5D)%0A if %22quotechar%22 in kwds:%0A kwds%5B%22quotechar%22%5D=str(kwds%5B%22quotechar%22%5D)%0A @@ -919,16 +919,17 @@ , **kwds + )%0A
6267967a01875b9d600346b0f5cc18de0b9603d6
Version 0.2.
setup.py
setup.py
from setuptools import setup, find_packages setup( name='django-urldecorators', version='0.1', description='Django-urldecorators is a reusable Django application which allows apply ' 'view decorators and middleware components depending on requested url.', author='Miloslav Pojman', author_email='miloslav.pojman@gmail.com', url='http://github.com/mila/django-urldecorators/tree/master', packages=find_packages('src'), package_dir = {'': 'src'}, classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Framework :: Django', ], )
Python
0
@@ -36,16 +36,76 @@ packages +%0A%0AVERSION = (0, 2)%0AVERSION_STR = %22.%22.join(map(str, VERSION)) %0A %0Asetup @@ -155,13 +155,19 @@ ion= -'0.1' +VERSION_STR ,%0A
b96a5f4bb4c61a272dfd9d7a090b10245535ebbe
Fix find_packages() for python3
setup.py
setup.py
from setuptools import find_packages, setup setup( name = 'garage', description = 'My personal python modules', license = 'MIT', packages = find_packages(include=['garage', 'garage.*']), install_requires = [ 'lxml', 'requests', 'startup', ], )
Python
0.998001
@@ -169,38 +169,8 @@ ges( -include=%5B'garage', 'garage.*'%5D ),%0A
646adedf91ed4b939f95418e5d362f6ad0906d7d
Add setup_requires
setup.py
setup.py
import ast import sys from setuptools import find_packages, setup def readme(): try: with open('README.rst') as f: return f.read() except (IOError, OSError): return def get_version(): filename = 'nirum/__init__.py' version = None with open(filename, 'r') as f: tree = ast.parse(f.read(), filename) for node in tree.body: if (isinstance(node, ast.Assign) and node.targets[0].id == '__version_info__'): version = ast.literal_eval(node.value) return '.'.join([str(x) for x in version]) service_requires = [ # FIXME Test Werkzeug 0.9, 0.10, 0.11 as well 'Werkzeug >= 0.11, < 0.12', ] install_requires = [ 'setuptools >= 25.2.0', 'iso8601', ] + service_requires tests_require = [ 'pytest >= 2.9.0', 'import-order', 'flake8', ] docs_require = [ 'Sphinx', ] below35_requires = [ 'typing', ] if 'bdist_wheel' not in sys.argv and sys.version_info < (3, 5): install_requires.extend(below35_requires) setup( name='nirum', version=get_version(), description='', long_description=readme(), url='https://github.com/spoqa/nirum-python', author='Kang Hyojun', author_email='iam.kanghyojun' '@' 'gmail.com', license='MIT license', packages=find_packages(exclude=['tests']), install_requires=install_requires, extras_require={ ":python_version<'3.5'": below35_requires, 'service': service_requires, 'tests': tests_require, 'docs': docs_require, }, classifiers=[] )
Python
0.000001
@@ -603,16 +603,56 @@ ion%5D)%0A%0A%0A +setup_requires = %5B'setuptools %3E= 17.1'%5D%0A service_ @@ -773,36 +773,8 @@ = %5B%0A - 'setuptools %3E= 25.2.0',%0A @@ -1402,24 +1402,59 @@ l_requires,%0A + setup_requires=setup_requires,%0A extras_r
d5a559c0771b21cea96ecabd6db2bcd8d3936a98
Bump pytest from 6.2.3 to 6.2.4
setup.py
setup.py
import re from setuptools import setup, find_packages # take the version with open("indexdigest/__init__.py", "r") as fh: # e.g. VERSION = '1.5.0' last_line = fh.readlines()[-1] VERSION = re.search(r'[\d.]+', last_line).group(0) # @see https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py with open("README.md", "r") as fh: long_description = fh.read() # @see https://github.com/pypa/sampleproject/blob/master/setup.py setup( name='indexdigest', version=VERSION, author='Maciej Brencz', author_email='maciej.brencz@gmail.com', license='MIT', description='Analyses your database queries and schema and suggests indices and schema improvements', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/macbre/index-digest', # https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ # How mature is this project? Common values are # 3 - Alpha # 4 - Beta # 5 - Production/Stable 'Development Status :: 5 - Production/Stable', # Indicate who your project is intended for 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Topic :: Database', # Pick your license as you wish 'License :: OSI Approved :: MIT License', # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', ], packages=find_packages(), extras_require={ 'dev': [ 'coverage==5.5', 'pylint==2.8.2', 'pytest==6.2.3', 'twine==3.4.1', ] }, install_requires=[ 'docopt==0.6.2', 'PyYAML==5.4.1', 'mysqlclient==2.0.3', 'sql_metadata==1.12.0', 'termcolor==1.1.0', 'yamlordereddictloader==0.4.0' ], entry_points={ 'console_scripts': [ 'add_linter=indexdigest.cli.add_linter:main', # creates a new linter from a template 'index_digest=indexdigest.cli.script:main', ], } )
Python
0.000011
@@ -1938,17 +1938,17 @@ st==6.2. -3 +4 ',%0A
c7a90821c186c28e808cc38bfaa9bee908dd20f2
Set version 0.1.2 to push latest updates to PYPI
setup.py
setup.py
# Copyright (c) 2015. Librato, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of Librato, Inc. nor the names of project contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL LIBRATO, INC. BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from setuptools import setup, find_packages setup( name="librato-python-web", version="0.1.1", description=("Librato Python Agent. Copyright (c) 2015 Librato, Inc " "All Rights Reserved"), # The project's main homepage url="https://github.com/librato/librato-python-web", # Author details author="Librato, Inc", author_email="support@librato.com", # Licensing license='https://github.com/librato/librato-python-web/blob/master/LICENSE', # Classifiers classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python' ], packages=find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests", "test.*", "test"]), install_requires=[ 'six', 'requests', 'librato-metrics', ], dependency_links=[ ], include_package_data=True, package_data={ }, data_files=[ ('lib/python2.7/dist-packages', ['conf/librato_python_web.pth']), ('lib/python2.7/site-packages', ['conf/librato_python_web.pth']), ], scripts=[ ], entry_points={ 'console_scripts': [ 'librato-config=librato_python_web.tools.configure:execute', 'librato-launch=librato_python_web.tools.launch:main', 'librato-statsd-server=librato_python_web.statsd.server.statsd_server:run_server'], } )
Python
0
@@ -1635,17 +1635,17 @@ on=%220.1. -1 +2 %22,%0A d
12695de726b1d1c81257a50ec8e3896ee4c9a737
bump version; bump requests
setup.py
setup.py
from setuptools import setup, find_packages setup( name="xcloud", version="0.0.3", install_requires=[ 'PyYaml', 'jinja2', 'glob2', 'python-keystoneclient==3.10.0', 'python-neutronclient==6.2.0', 'python-novaclient==7.1.0', 'requests==2.14.2', 'babel==2.3.4' ], author="Dan Clayton", author_email="dan@azwebmaster.com", description="Used to provision servers in openstack.", license="MIT", keywords="cloud openstack", url="https://github.com/azweb76/x-cloud", packages=find_packages(exclude=('tests', 'docs')), entry_points={ 'console_scripts': [ 'xcloud=xcloud.cli:main', ], }, )
Python
0.000001
@@ -81,17 +81,17 @@ on=%220.0. -3 +4 %22,%0A i @@ -298,16 +298,16 @@ ests -= +%3E =2.1 -4.2 +9.1 ',%0A
370f882b7df1112c09de39ac218396d9d88bab0d
version 0.2.1 updated to PyPI.repo version changed to 0.2.2
setup.py
setup.py
import sys from setuptools import setup, find_packages def readme(): try: with open('README.rst') as f: return f.read() except BaseException: pass setup( name='termicoder', version='0.2.1', url='https://github.com/diveshuttam/termicoder', author='Divesh Uttamchandani', author_email='diveshuttamchandani@gmail.com', license='MIT', description='a CLI to view, code and submit problems directly from terminal', long_description=readme(), keywords='competetive iarcs codechef oj', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Education', 'Topic :: Education', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], packages=find_packages(), include_package_data=True, install_requires=[ 'Click', 'requests', 'beautifulsoup4' ] + (["colorama==0.3.3"] if "win" in sys.platform else []), entry_points=''' [console_scripts] termicoder=termicoder.cli:main ''' # can use this nose for tests later # test_suite='nose.collector', # tests_require=['nose'] )
Python
0
@@ -231,9 +231,9 @@ 0.2. -1 +2 ',%0A
e165a146805e01fbe4a9f91686c27939bb6abdf0
update dependency
setup.py
setup.py
from setuptools import setup install_requires = [ 'jsonschema>=3.0.1', 'networkx>=2.3', 'jsonpath-rw>=1.4.0', 'requests>=2.21.0', 'grequests>=0.4.0', 'graphviz>=0.11.1' ] setup( name="biothings_explorer", version="0.0.1", author="Jiwen Xin, Chunlei Wu", author_email="cwu@scripps.edu", description="Python Client for BioThings Explorer", license="BSD", keywords="schema biothings", url="https://github.com/biothings/biothings_explorer", packages=['biothings_explorer'], classifiers=[ "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "License :: OSI Approved :: BSD License", "Operating System :: POSIX", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Intended Audience :: Science/Research", "Intended Audience :: Developers", "Topic :: Utilities", "Topic :: Scientific/Engineering :: Bio-Informatics", ], install_requires=install_requires, )
Python
0.000001
@@ -152,46 +152,44 @@ 'gr -equests%3E=0.4.0',%0A 'graphviz%3E=0.11.1 +aphviz%3E=0.11.1',%0A 'aiohttp%3E=3.5.4 '%0A%5D%0A
c8ea59db22758eca775756810c0a39bc690d67a1
Bump version
setup.py
setup.py
#!/usr/bin/env python import os from setuptools import setup, find_packages # ---------------------------------------------------------------------------- # Building # # Create source distribution: # ./setup.py sdist # # # Create binary distribution (non-univeral, python 3 only): # ./setup.py bdist_wheel --python-tag=py3 # # Register on PyPI: # twine register dist/mypkg.whl # # # Upload to PyPI: # twine upload dist/* # # ---------------------------------------------------------------------------- # project version version='0.3.2' # development status # dev_status = '1 - Planning' # dev_status = '2 - Pre-Alpha' dev_status = '3 - Alpha' # dev_status = '4 - Beta' # dev_status = '5 - Production/Stable' # dev_status = '6 - Mature' # dev_status = '7 - Inactive' # github repository url repo = 'https://github.com/projectshift/shift-boiler' license_type = 'MIT License' # monkey patch os for vagrant hardlinks del os.link # run setup setup(**dict( # author author='Dmitry Belyakov', author_email='dmitrybelyakov@gmail.com', # project meta name='shiftboiler', version=version, url=repo, download_url=repo + '/archive/v' + version + '.tar.gz', description='Boilerplate setup for webapps, apis and cli applications with flask', keywords=[ 'python3', 'flask', 'click', 'orm', 'sqlalchemy', 'webapp', 'api', 'oauth', 'babel', ], # classifiers # see: https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ # maturity 'Development Status :: ' + dev_status, # license 'License :: OSI Approved :: ' + license_type, # audience 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', # pythons 'Programming Language :: Python :: 3', # categories 'Environment :: Console', 'Environment :: Web Environment', 'Framework :: Flask', 'Framework :: IPython', 'Topic :: Internet :: WWW/HTTP :: Site Management', 'Topic :: Software Development :: Libraries :: Application Frameworks', 'Topic :: Utilities' ], # project packages packages=find_packages(exclude=['tests*', 'migrations*']), # include none-code data files from manifest.in (http://goo.gl/Uf0Yxc) include_package_data=True, # project dependencies install_requires=[ 'click==6.6', 'shiftschema==0.0.11' ], # entry points entry_points=dict( console_scripts=[ 'boiler = boiler.cli.boiler:cli' ] ), # project license license=license_type ))
Python
0
@@ -528,17 +528,17 @@ on='0.3. -2 +3 '%0A%0A# dev
bc88bbd68d531b89bf692c5e7736c0022a7158c5
use regex to extract package name
setup.py
setup.py
import os import runpy from itertools import chain from setuptools import find_packages, setup BASE_DIR = os.path.dirname(os.path.abspath(__file__)) OPTIONAL_DEPENDENCIES = ("autograd", "tensorflow", "theano") def parse_requirements_file(filename): with open(filename) as f: return f.read().splitlines() if __name__ == "__main__": requirements = parse_requirements_file("requirements/base.txt") install_requires = [] optional_dependencies = {} for requirement in requirements: # We manually separate out hard from optional dependencies. if any((d in requirement for d in OPTIONAL_DEPENDENCIES)): package = requirement.split(">")[0].split("=")[0] optional_dependencies[package] = [requirement] else: install_requires.append(requirement) dev_requirements = parse_requirements_file("requirements/dev.txt") extras_require = { "test": dev_requirements, **optional_dependencies } extras_require["all"] = list(chain(*extras_require.values())) pymanopt = runpy.run_path( os.path.join(BASE_DIR, "pymanopt", "__init__.py")) with open(os.path.join(BASE_DIR, "README.md")) as f: long_description = f.read() setup( name="pymanopt", version=pymanopt["__version__"], description=("Toolbox for optimization on manifolds with support for " "automatic differentiation"), url="https://pymanopt.org", author="Jamie Townsend, Niklas Koep and Sebastian Weichwald", license="BSD", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Scientific/Engineering :: Mathematics", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", ], keywords=("optimization,manifold optimization," "automatic differentiation,machine learning,numpy,scipy," "theano,autograd,tensorflow"), packages=find_packages(exclude=["tests"]), install_requires=install_requires, extras_require=extras_require, long_description=long_description, long_description_content_type="text/markdown", data_files=[ "CONTRIBUTING.md", "CONTRIBUTORS", "LICENSE", "MAINTAINERS", "README.md" ] )
Python
0
@@ -3,16 +3,26 @@ port os%0A +import re%0A import r @@ -26,16 +26,16 @@ t runpy%0A - from ite @@ -302,16 +302,42 @@ return +%5Bline.strip() for line in f.read() @@ -349,16 +349,17 @@ tlines() +%5D %0A%0A%0Aif __ @@ -578,12 +578,8 @@ ate -out hard @@ -626,14 +626,8 @@ any( -(d in requ @@ -637,14 +637,79 @@ ment - for d +.startswith(optional_dependency)%0A for optional_dependency in @@ -730,17 +730,16 @@ DENCIES) -) :%0A @@ -760,45 +760,60 @@ = re -quirement.split(%22%3E%22)%5B0%5D.split(%22=%22)%5B0%5D +.match(r%22(%5BA-Za-z0-9%5C-_%5D+).*%22, requirement).group(1) %0A
7a840f58ee083aa5e23ac324beace4b4ad2335ca
bump to v30.0.1 so we can use semver on pypi
setup.py
setup.py
import os from setuptools import setup files = ["*.css", os.path.join("templates", "*.html")] setup( name="junit2html", version="2.0.1", description="Generate HTML reports from Junit results", author="Ian Norton", author_email="inorton@gmail.com", url="https://gitlab.com/inorton/junit2html", install_requires=["jinja2>=2.11.2"], packages=["junit2htmlreport"], package_data={"junit2htmlreport": files}, entry_points={'console_scripts': ['junit2html=junit2htmlreport.runner:start']}, platforms=["any"], license="License :: OSI Approved :: MIT License", long_description="Genearate a single file HTML report from a Junit or XUnit XML results file" )
Python
0
@@ -143,17 +143,18 @@ ersion=%22 -2 +30 .0.1%22,%0A
6a16baa99d7a23271367b233b514e02721e63e1c
Add requests to dependencies
setup.py
setup.py
from setuptools import setup, find_packages setup(name='rnaseq-lib', version='1.0a6', description='', url='http://github.com/jvivian/rnaseq-lib', author='John Vivian', author_email='jtvivian@gmail.com', license='MIT', package_dir={'': 'src'}, packages=find_packages('src'), package_data={'rnaseq_lib.utils': ['samples.pickle']}, install_requires=['pandas', 'numpy', 'seaborn'])
Python
0.000001
@@ -477,11 +477,47 @@ seaborn' +,%0A 'requests' %5D)%0A
5cac38046b708ce83f8dfe7081941c47afed453d
Add gmuffin entry point
setup.py
setup.py
#!/usr/bin/env python import re from os import path as op from setuptools import setup, find_packages def _read(fname): try: return open(op.join(op.dirname(__file__), fname)).read() except IOError: return '' _meta = _read('muffin/__init__.py') _license = re.search(r'^__license__\s*=\s*"(.*)"', _meta, re.M).group(1) _project = re.search(r'^__project__\s*=\s*"(.*)"', _meta, re.M).group(1) _version = re.search(r'^__version__\s*=\s*"(.*)"', _meta, re.M).group(1) install_requires = [ l for l in _read('requirements.txt').split('\n') if l and not l.startswith('#')] setup( name=_project, version=_version, license=_license, description='web framework based on Asyncio stack', long_description=_read('README.rst'), platforms=('Any'), keywords = "django flask sqlalchemy testing mock stub mongoengine data".split(), # noqa author='Kirill Klenov', author_email='horneds@gmail.com', url='https://github.com/klen/muffin', classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Natural Language :: Russian', 'Operating System :: OS Independent', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Testing', 'Topic :: Utilities', ], packages=find_packages(), include_package_data=True, install_requires=install_requires, entry_points = { 'pytest11': [ 'muffin_pytest = muffin.pytest', ] }, )
Python
0
@@ -1710,21 +1710,8 @@ ': %5B -%0A 'muf @@ -1737,16 +1737,17 @@ .pytest' +%5D ,%0A @@ -1748,17 +1748,64 @@ -%5D +'console_scripts': %5B'gmuffin = muffin.app:run'%5D, %0A %7D,%0A
023501d5b6c3355672d7227a7dc30e7decd5688f
Bump version
setup.py
setup.py
from distutils.core import setup setup(name='adyen', version='0.1', description='Python library for the Adyen payment provider', license="MIT", author='Markus Bertheau', author_email='mbertheau@gmail.com', long_description=open('README.md').read(), packages=['adyen', 'django_adyen', 'django_adyen.templatetags', 'oscar_adyen'], install_requires=['pytz', 'zope.dottedname'])
Python
0
@@ -65,16 +65,18 @@ ion='0.1 +.1 ',%0A
73114498b9c54739812827c89f639828333ad723
Fix cross-platform install bug.
setup.py
setup.py
import os from setuptools import setup, find_packages def file_read(filename): filepath = os.path.join(os.path.dirname(__file__), filename) with open(filepath) as flo: return flo.read() __version__ = file_read('staticmodel/VERSION.txt').strip() setup( name="staticmodel", version=__version__, packages=find_packages(exclude=['tests', 'docs']), include_package_data=True, install_requires=['six'], author="Warren A. Smith", author_email="warren@wandrsmith.net", description="Static Models.", long_description=file_read("README.rst"), license="MIT", keywords="static constant model enum django", url="https://github.com/wsmith323/staticmodel", test_suite="tests", classifiers=[ # How mature is this project? Common values are # 3 - Alpha # 4 - Beta # 5 - Production/Stable 'Development Status :: 4 - Beta', # Indicate who your project is intended for 'Intended Audience :: Developers', # Pick your license as you wish (should match "license" above) 'License :: OSI Approved :: MIT License', # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], )
Python
0
@@ -224,16 +224,29 @@ le_read( +os.path.join( 'staticm @@ -249,17 +249,20 @@ ticmodel -/ +', ' VERSION. @@ -266,16 +266,17 @@ ON.txt') +) .strip()
461049fa94b965e1cf54cb86434a45f77f696918
update setup.py
setup.py
setup.py
# -*- coding: utf-8 -*- import sys import os from distutils.core import setup from setuptools import find_packages ######### # settings ######### project_var_name = "pysqllike" sversion = "0.1" versionPython = "%s.%s" % (sys.version_info.major, sys.version_info.minor) path = "Lib/site-packages/" + project_var_name readme = 'README.rst' requirements = None KEYWORDS = project_var_name + ', SQL, Map Reduce, Xavier, Dupré' DESCRIPTION = """An intent to write SQL like programs and to translate them in Python, SQL, Hive, PIG.""" CLASSIFIERS = [ 'Programming Language :: Python :: %d' % sys.version_info[0], 'Intended Audience :: Developers', 'Topic :: Scientific/Engineering', 'Topic :: Education', 'License :: OSI Approved :: MIT License', 'Development Status :: 5 - Production/Stable' ] ####### # data ####### packages = find_packages('src', exclude='src') package_dir = {k: "src/" + k.replace(".", "/") for k in packages} package_data = {} ############ # functions ############ def is_local(): file = os.path.abspath(__file__).replace("\\", "/").lower() if "/temp/" in file and "pip-" in file: return False if \ "bdist_msi" in sys.argv or \ "build27" in sys.argv or \ "build_script" in sys.argv or \ "build_sphinx" in sys.argv or \ "bdist_wheel" in sys.argv or \ "bdist_wininst" in sys.argv or \ "clean_pyd" in sys.argv or \ "clean_space" in sys.argv or \ "copy27" in sys.argv or \ "copy_dist" in sys.argv or \ "local_pypi" in sys.argv or \ "notebook" in sys.argv or \ "publish" in sys.argv or \ "publish_doc" in sys.argv or \ "register" in sys.argv or \ "unittests" in sys.argv or \ "unittests_LONG" in sys.argv or \ "unittests_SKIP" in sys.argv or \ "unittests_GUI" in sys.argv or \ "run27" in sys.argv or \ "sdist" in sys.argv or \ "setupdep" in sys.argv or \ "test_local_pypi" in sys.argv or \ "upload_docs" in sys.argv or \ "setup_hook" in sys.argv or \ "copy_sphinx" in sys.argv or \ "write_version" in sys.argv: try: import_pyquickhelper() except ImportError: return False return True else: return False def import_pyquickhelper(): try: import pyquickhelper except ImportError: sys.path.append( os.path.normpath( os.path.abspath( os.path.join( os.path.dirname(__file__), "..", "pyquickhelper" if sys.version_info[ 0] >= 3 else "py27_pyquickhelper_27", "src")))) try: import pyquickhelper except ImportError as e: message = "module pyquickhelper is needed to build the documentation ({0}), not found in path {1}".format( sys.executable, sys.path[ -1]) raise ImportError(message) from e return pyquickhelper def verbose(): print("---------------------------------") print("package_dir =", package_dir) print("packages =", packages) print("package_data=", package_data) print("current =", os.path.abspath(os.getcwd())) print("---------------------------------") ########## # version ########## if is_local() and "--help" not in sys.argv and "--help-commands" not in sys.argv: def write_version(): pyquickhelper = import_pyquickhelper() from pyquickhelper.pycode import write_version_for_setup return write_version_for_setup(__file__) if sys.version_info[0] != 2: write_version() versiontxt = os.path.join(os.path.dirname(__file__), "version.txt") if os.path.exists(versiontxt): with open(versiontxt, "r") as f: lines = f.readlines() subversion = "." + lines[0].strip("\r\n ") if subversion == ".0": raise Exception("Subversion is wrong: '{0}'.".format(subversion)) else: raise FileNotFoundError(versiontxt) else: # when the module is installed, no commit number is displayed subversion = "" if "upload" in sys.argv and not subversion: # avoid uploading with a wrong subversion number try: import pyquickhelper pyq = True except ImportError: pyq = False raise Exception( "subversion is empty, cannot upload, is_local()={0}, pyquickhelper={1}".format(is_local(), pyq)) ############## # common part ############## if os.path.exists(readme): if sys.version_info[0] == 2: from codecs import open with open(readme, "r", encoding='utf-8-sig') as f: long_description = f.read() else: long_description = "" if "--verbose" in sys.argv: verbose() if is_local(): pyquickhelper = import_pyquickhelper() logging_function = pyquickhelper.get_fLOG() from pyquickhelper.pycode import process_standard_options_for_setup logging_function(OutputPrint=True) r = process_standard_options_for_setup( sys.argv, __file__, project_var_name, requirements=["pyquickhelper"], additional_notebook_path=["pyquickhelper"], unittest_modules=["pyquickhelper"], fLOG=logging_function, covtoken=("48330d77-e22b-41b7-83f4-8dbc39abd93b", "'_UT_36_std' in outfile")) if not r and not ({"bdist_msi", "sdist", "bdist_wheel", "publish", "publish_doc", "register", "upload_docs", "bdist_wininst"} & set(sys.argv)): raise Exception("unable to interpret command line: " + str(sys.argv)) else: r = False if not r: if len(sys.argv) in (1, 2) and sys.argv[-1] in ("--help-commands",): pyquickhelper = import_pyquickhelper() from pyquickhelper.pycode import process_standard_options_for_setup_help process_standard_options_for_setup_help(sys.argv) setup( name=project_var_name, version='%s%s' % (sversion, subversion), author='Xavier Dupré', author_email='xavier.dupre@gmail.com', url="http://www.xavierdupre.fr/app/pysqllike/helpsphinx/index.html", download_url="https://github.com/sdpython/pysqllike/", description=DESCRIPTION, long_description=long_description, keywords=KEYWORDS, classifiers=CLASSIFIERS, packages=packages, package_dir=package_dir, package_data=package_data, )
Python
0.000001
@@ -1303,32 +1303,68 @@ n sys.argv or %5C%0A + %22build_ext%22 in sys.argv or %5C%0A %22bdist_wh
b1ee098ed3f205923efcae2189ebfb53d3f7b3e0
check status codes instead of error message
plugins/weather.py
plugins/weather.py
import logging log = logging.getLogger(__name__) import urllib import json import ircbot.plugin import socket def make_http_request(url): return urllib.request.urlopen(url, timeout=2).read().decode('utf-8') class WeatherPlugin(ircbot.plugin.Plugin): @ircbot.plugin.command('weather') def weather(self, cmd): if len(cmd.args) < 1: return 'Usage: !weather city' city = '-'.join(cmd.args) url = 'http://api.openweathermap.org/data/2.5/weather?q={}&units=metric'.format( city) try: response = make_http_request(url) except (urllib.error.URLError, socket.timeout): return 'An HTTP error occured, try again later!' data = json.loads(response) if int(data['cod']) != 200: if 'Error: Not found city' in data['message']: return 'Error: City not found' return data['message'] location = '{}, {}'.format(data['name'], data['sys']['country']) weather = data['weather'][0]['main'] temperature = data['main']['temp'] return 'Weather in {}: {} - the temperature is {}°C'.format( location, weather, temperature)
Python
0
@@ -665,21 +665,26 @@ sponse)%0A -%0A %09%09 -if +status = int(dat @@ -696,71 +696,33 @@ d'%5D) - != 200:%0A%09%09%09if 'Error: Not found city' in data%5B'message'%5D +%0A%0A%09%09if status == 404 :%0A%09%09%09 -%09 retu @@ -748,16 +748,37 @@ found'%0A +%09%09elif status != 200%0A %09%09%09retur
8c8e3553008e864c6587098a0007064aba00ffab
Update version
setup.py
setup.py
"""This file is part of DING0, the DIstribution Network GeneratOr. DING0 is a tool to generate synthetic medium and low voltage power distribution grids based on open data. It is developed in the project open_eGo: https://openegoproject.wordpress.com DING0 lives at github: https://github.com/openego/ding0/ The documentation is available on RTD: http://ding0.readthedocs.io""" __copyright__ = "Reiner Lemoine Institut gGmbH" __license__ = "GNU Affero General Public License Version 3 (AGPL-3.0)" __url__ = "https://github.com/openego/ding0/blob/master/LICENSE" __author__ = "nesnoj, gplssm" from setuptools import find_packages, setup import os setup(name='ding0', version='v0.1.5', author='Reiner Lemoine Institut, openego development group', author_email='jonathan.amme@rl-institut.de', description='DIstribution Network GeneratOr', url='https://github.com/openego/ding0', license='GNU GPLv3', packages=find_packages(), install_requires=['networkx >= 1.11, <= 1.11', 'geopy >= 1.11.0, <= 1.11.0', 'pandas >= 0.20.3, <= 0.20.3', 'pyomo >= 5.0.1, <= 5.1.1', 'pyproj >= 1.9.5.1, <= 1.9.5.1', 'sqlalchemy >= 1.0.11, <= 1.2.0', 'geoalchemy2 >= 0.2.6, <= 0.4.1', 'matplotlib >= 1.5.3, <= 1.5.3', 'egoio==0.4.0', 'shapely >= 1.5.12, <= 1.6.3', 'pypsa >= 0.11.0, <= 0.11.0', 'seaborn', 'unittest2', 'scipy < 1.0', 'oedialect' ], package_data={ 'ding0': [ os.path.join('config', '*.cfg'), os.path.join('data', '*.csv'), os.path.join('grid', 'mv_grid', 'tests', 'testcases', '*.vrp'), os.path.join('grid', 'mv_grid', 'tests', 'testcases', 'Augerat', '*.vrp'), os.path.join('grid', 'mv_grid', 'tests', 'testcases', 'Augerat-tcc', '*.vrp'), os.path.join('grid', 'mv_grid', 'tests', 'testcases', 'Takes-tcc', '*.vrp'), os.path.join('grid', 'mv_grid', 'tests', 'testcases', 'Vigo', '*.vrp'), ]}, classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Affero General Public License v3", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering"], )
Python
0
@@ -701,17 +701,20 @@ n='v0.1. -5 +6dev ',%0A
a6dc2ce5dea3d216dab1c94138904762290495d9
Remove extraneous entry points
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup import os import sys # Add /usr/local/include to the path for macs, fixes easy_install for several packages (like gevent and pyyaml) if sys.platform == 'darwin': os.environ['C_INCLUDE_PATH'] = '/usr/local/include' version = '0.1' setup( name = 'coi-services', version = version, description = 'OOI ION COI Services', url = 'https://github.com/ooici/coi-services', download_url = 'http://ooici.net/releases', license = 'Apache 2.0', author = 'Michael Meisinger', author_email = 'mmeisinger@ucsd.edu', keywords = ['ooici','ioncore', 'pyon', 'coi'], packages = find_packages(), entry_points = { 'console_scripts' : [ 'pycc=scripts.pycc:entry', 'control_cc=scripts.control_cc:main', 'generate_interfaces=scripts.generate_interfaces:main' ] }, dependency_links = [ 'http://ooici.net/releases' ], test_suite = 'pyon', install_requires = [ 'pyon', ], )
Python
0.000016
@@ -786,268 +786,8 @@ (),%0A - entry_points = %7B%0A 'console_scripts' : %5B%0A 'pycc=scripts.pycc:entry',%0A 'control_cc=scripts.control_cc:main',%0A 'generate_interfaces=scripts.generate_interfaces:main'%0A %5D%0A %7D,%0A
d34b28c3d5067f26c86d588a3a80304e7fcb8992
Remove the lib/index.js js target for now
setup.py
setup.py
import os import setuptools from jupyter_packaging import combine_commands from jupyter_packaging import create_cmdclass from jupyter_packaging import ensure_targets from jupyter_packaging import install_npm from jupyter_packaging import skip_if_exists # The directory containing this file HERE = os.path.abspath(os.path.dirname(__file__)) # The name of the project NAME = "jupyter-resource-usage" PACKAGE_NAME = NAME.replace("-", "_") src_path = os.path.join(HERE, "packages", "labextension") lab_path = os.path.join(HERE, PACKAGE_NAME, "labextension") nb_path = os.path.join(HERE, PACKAGE_NAME, "static") # Representative files that should exist after a successful build jstargets = [ os.path.join(src_path, "lib", "index.js"), os.path.join(lab_path, "package.json"), ] package_data_spec = {PACKAGE_NAME: ["*"]} labext_name = "@jupyter-server/resource-usage" nbext_name = "jupyter_resource_usage" data_files_spec = [ ("share/jupyter/nbextensions/%s" % nbext_name, nb_path, "**"), ("share/jupyter/labextensions/%s" % labext_name, lab_path, "**"), ("share/jupyter/labextensions/%s" % labext_name, HERE, "install.json"), ( "etc/jupyter/jupyter_server_config.d", "jupyter-config/jupyter_server_config.d", "jupyter_resource_usage.json", ), ( "etc/jupyter/jupyter_notebook_config.d", "jupyter-config/jupyter_notebook_config.d", "jupyter_resource_usage.json", ), ( "etc/jupyter/nbconfig/notebook.d", "jupyter-config/nbconfig/notebook.d", "jupyter_resource_usage.json", ), ] cmdclass = create_cmdclass( "jsdeps", package_data_spec=package_data_spec, data_files_spec=data_files_spec ) js_command = combine_commands( install_npm(src_path, build_cmd="build:prod", npm=["jlpm"]), ensure_targets(jstargets), ) is_repo = os.path.exists(os.path.join(HERE, ".git")) if is_repo: cmdclass["jsdeps"] = js_command else: cmdclass["jsdeps"] = skip_if_exists(jstargets, js_command) with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name=NAME, version="0.5.0", url="https://github.com/jupyter-server/jupyter-resource-usage", author="Jupyter Development Team", description="Simple Jupyter extension to show how much resources (RAM) your notebook is using", long_description=long_description, long_description_content_type="text/markdown", cmdclass=cmdclass, packages=setuptools.find_packages(), install_requires=["notebook>=5.6.0", "prometheus_client", "psutil>=5.6.0"], extras_require={ "dev": ["autopep8", "black", "pytest", "flake8", "pytest-cov>=2.6.1", "mock"] }, zip_safe=False, include_package_data=True, license="BSD", classifiers=[ "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", ], )
Python
0
@@ -688,60 +688,8 @@ = %5B -%0A os.path.join(src_path, %22lib%22, %22index.js%22),%0A os.p @@ -722,18 +722,16 @@ e.json%22) -,%0A %5D%0A%0Apacka
965af6bf85f8a65831fd6729deecf1cb7bd7322f
Version bump 3.7.0
setup.py
setup.py
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'DESCRIPTION.md'), encoding='utf-8') as f: long_description = f.read() setup( name='mangopaysdk', version='3.6.0', description='A client library written in python to work with mangopay v2 api', long_description='This SDK is a client library for interacting with the Mangopay API.', url='https://github.com/Mangopay/mangopay2-python-sdk', author='Mangopay (www.mangopay.com)', author_email='support@mangopay.com', license='MIT', classifiers=[ 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', ], keywords='mangopay api development emoney sdk', packages=find_packages(exclude=['contrib', 'docs', 'tests*']), install_requires=['requests', 'simplejson', 'blinker', 'six', 'pytz' ], extras_require={ 'dev': ['responses', 'nose', 'coverage', 'httplib2', 'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'], 'test': ['responses', 'nose', 'coverage', 'httplib2', 'pyopenssl', 'ndg-httpsclient', 'pyasn1', 'exam'], }, entry_points={ 'console_scripts': [ 'sample=sample:main', ], }, )
Python
0
@@ -279,9 +279,10 @@ ='3. -6 +7V .0',
230162033388f64e7b2c27b7df8ade4f72b743c4
Bump version
setup.py
setup.py
import sys from setuptools import setup from setuptools.command.test import test as TestCommand # ref: https://tox.readthedocs.org/en/latest/example/basic.html#integration-with-setuptools-distribute-test-commands class Tox(TestCommand): user_options = [('tox-args=', 'a', "Arguments to pass to tox")] def initialize_options(self): TestCommand.initialize_options(self) self.tox_args = '' def finalize_options(self): TestCommand.finalize_options(self) self.test_args = [] self.test_suite = True def run_tests(self): # import here, cause outside the eggs aren't loaded import tox import shlex errno = tox.cmdline(args=shlex.split(self.tox_args)) sys.exit(errno) class ToxWithRecreate(Tox): description = ('Run tests, but recreate the testing environments first. ' '(Useful if the test dependencies change.)') def initialize_options(self): TestCommand.initialize_options(self) self.tox_args = '-r' setup( name='fixtureupper', version='0.0.2', packages=['fixtureupper'], url='https://github.com/Rhathe/fixtureupper', license='MIT', author='Ramon Sandoval', description='SqlAlchemy Fixture Generator', long_description='SqlAlchemy Fixture Generator', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Utilities', ], install_requires=[ 'future >= 0.14.3, < 0.16', 'SQLAlchemy', ], # tox is responsible for setting up the test runner and its dependencies # (e.g., code coverage tools) -- see the tox.ini file tests_require=[ 'tox >= 1.9, < 3', ], cmdclass={ 'test': Tox, 'clean_test': ToxWithRecreate, }, )
Python
0
@@ -1086,17 +1086,17 @@ on='0.0. -2 +3 ',%0A p
0891664b3d23b31e855eb48d4fea1ac436190e82
Read long description from README.rst
setup.py
setup.py
#!/usr/bin/env python3 import sys try: from setuptools import setup, Command except ImportError: from distutils.core import setup, Command from markups import __version__ as version long_description = \ """This module provides a wrapper around the various text markup languages, such as Markdown_ and reStructuredText_ (these two are supported by default). Usage example: >>> markup = markups.get_markup_for_file_name("myfile.rst") >>> markup.name 'reStructuredText' >>> markup.attributes[markups.SYNTAX_DOCUMENTATION] 'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html' >>> text = "Hello, world!\\n=============\\n\\nThis is an example **reStructuredText** document." >>> markup.get_document_title(text) 'Hello, world!' >>> markup.get_document_body(text) '<p>This is an example <strong>reStructuredText</strong> document.</p>\\n' .. _Markdown: http://daringfireball.net/projects/markdown/ .. _reStructuredText: http://docutils.sourceforge.net/rst.html """ classifiers = ['Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Topic :: Text Processing :: Markup', 'Topic :: Text Processing :: General', 'Topic :: Software Development :: Libraries :: Python Modules' ] class run_tests(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): from unittest.main import main testprogram = main(module=None, argv=sys.argv[:1], verbosity=2, exit=False) if not testprogram.result.wasSuccessful(): sys.exit(1) cmdclass = {} if sys.version_info[0] >= 3: cmdclass['test'] = run_tests setup_args = { 'name': 'Markups', 'version': version, 'description': 'A wrapper around various text markups', 'long_description': long_description, 'author': 'Dmitry Shachnev', 'author_email': 'mitya57@gmail.com', 'url': 'https://github.com/retext-project/pymarkups', 'packages': ['markups'], 'license': 'BSD', 'cmdclass': cmdclass, 'classifiers': classifiers } setup(**setup_args)
Python
0
@@ -182,803 +182,153 @@ ion%0A -%0Along_description = %5C%0A%22%22%22This module provides a wrapper around the various text markup languages,%0Asuch as Markdown_ and reStructuredText_ (these two are supported by default).%0A%0AUsage example:%0A%0A%3E%3E%3E markup = markups.get_markup_for_file_ +from os.path import dirname, join%0A%0Awith open(join(dir name( -%22my +__ file -.rst%22)%0A%3E%3E%3E markup.name%0A'reStructuredText'%0A%3E%3E%3E markup.attributes%5Bmarkups.SYNTAX_DOCUMENTATION%5D%0A'http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html'%0A%3E%3E%3E text = %22Hello, world!%5C%5Cn=============%5C%5Cn%5C%5CnThis is an example **reStructuredText** document.%22%0A%3E%3E%3E markup.get_document_title(text)%0A'Hello, world!'%0A%3E%3E%3E markup.get_document_body(text)%0A'%3Cp%3EThis is an example %3Cstrong%3EreStructuredText%3C/strong%3E document.%3C/p%3E%5C%5Cn'%0A%0A.. _Markdown: http://daringfireball.net/projects/markdown/%0A.. _reStructuredText: http://docutils.sourceforge.net/rst.html%0A%22%22%22 +__), 'README.rst')) as readme_file:%0A%09long_description = '%5Cn' + readme_file.read() %0A%0Acl
d46d526f4212cfdd06c398a4bdcffa0c7611a666
Version bump
setup.py
setup.py
#!/usr/bin/env python3 from setuptools import setup # Work around mbcs bug in distutils. # http://bugs.python.org/issue10945 import codecs try: codecs.lookup('mbcs') except LookupError: ascii = codecs.lookup('ascii') codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs')) VERSION = '0.1.11' setup( name='bitshares', version=VERSION, description='Python library for bitshares', long_description=open('README.md').read(), download_url='https://github.com/xeroc/python-bitshares/tarball/' + VERSION, author='Fabian Schuh', author_email='Fabian@chainsquad.com', maintainer='Fabian Schuh', maintainer_email='Fabian@chainsquad.com', url='http://www.github.com/xeroc/python-bitshares', keywords=['bitshares', 'library', 'api', 'rpc'], packages=[ "bitshares", "bitsharesapi", "bitsharesbase" ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3', 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Intended Audience :: Financial and Insurance Industry', 'Topic :: Office/Business :: Financial', ], install_requires=[ "graphenelib>=0.5.9", "websockets", "appdirs", "Events", "scrypt", "pycryptodome", # for AES, installed through graphenelib already ], setup_requires=['pytest-runner'], tests_require=['pytest'], include_package_data=True, )
Python
0.000001
@@ -315,16 +315,21 @@ '0.1.11 +.beta '%0A%0Asetup
5a70307744d6f33384d4184ebb08f928766247e7
Increment version to 3.1
setup.py
setup.py
from setuptools import setup description = """ Full featured redis cache backend for Django. """ setup( name = "django-redis", url = "https://github.com/niwibe/django-redis", author = "Andrei Antoukh", author_email = "niwi@niwi.be", version='3.0', packages = [ "redis_cache", "redis_cache.stats" ], description = description.strip(), install_requires=[ 'redis>=2.7.0', ], zip_safe=False, include_package_data = True, package_data = { '': ['*.html'], }, classifiers = [ "Development Status :: 5 - Production/Stable", "Operating System :: OS Independent", "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: BSD License", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries", "Topic :: Utilities", ], )
Python
0.999974
@@ -259,17 +259,17 @@ sion='3. -0 +1 ',%0A p
357a54f6358dc440ad61ff5c507981d9a79f953c
Add hook for installing image package.
setup.py
setup.py
import sys import os from setuptools import setup long_description = open('README.rst').read() classifiers = [ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', ] setup_kwargs = dict( name='powershift-cli', version='1.2.1', description='Pluggable command line client for OpenShift.', long_description=long_description, url='https://github.com/getwarped/powershift-cli', author='Graham Dumpleton', author_email='Graham.Dumpleton@gmail.com', license='BSD', classifiers=classifiers, keywords='openshift kubernetes', packages=['powershift', 'powershift.cli'], package_dir={'powershift': 'src/powershift'}, package_data={'powershift.cli': ['completion-bash.sh']}, entry_points = {'console_scripts':['powershift = powershift.cli:main']}, install_requires=['click'], extras_require={'all':['powershift-cluster>=2.2.0'], 'cluster':['powershift-cluster>=2.2.0']}, ) setup(**setup_kwargs)
Python
0
@@ -1278,16 +1278,73 @@ =2.2.0'%5D +,%0A 'image':%5B'powershift-image%3E=1.0.3'%5D %7D,%0A)%0A%0Ase
c42be2c82a07b42127f51e2579b595b09e1cacc4
Version bump
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from os.path import join, dirname from setuptools import setup, find_packages setup( name='django-ripple_api', version='0.0.42', packages=find_packages(), requires=['python (>= 2.7)', 'requests', 'django_model_utils'], install_requires=['requests<2.3.0', 'django-model-utils'], tests_require=['mock'], description='Python wrapper for the Ripple API', long_description=open(join(dirname(__file__), 'README.rst')).read(), author='42 Coffee Cups', author_email='contact@42cc.co', url='https://github.com/42cc/ripple_api', download_url='https://github.com/42cc/ripple_api/archive/master.zip', license='BSD License', keywords=['ripple', 'api'], classifiers=[ 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', ], )
Python
0.000001
@@ -174,17 +174,17 @@ n='0.0.4 -2 +3 ',%0A p
8cdafd66bb59895d24681a79765d7d60006bc4b4
remove pip session from setup (#493)
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """This is the setup file for the project.""" # yapf: disable from __future__ import unicode_literals import sys from setuptools import find_packages from setuptools import setup try: # for pip >= 10 from pip._internal.download import PipSession from pip._internal.req import parse_requirements except ImportError: # for pip <= 9.0.3 from pip.download import PipSession from pip.req import parse_requirements # make sure turbinia is in path sys.path.insert(0, '.') import turbinia # pylint: disable=wrong-import-position turbinia_description = ( 'Turbinia is an open-source framework for deploying, managing, and running' 'forensic workloads on cloud platforms. It is intended to automate running ' 'of common forensic processing tools (i.e. Plaso, TSK, strings, etc) to ' 'help with processing evidence in the Cloud, scaling the processing of ' 'large amounts of evidence, and decreasing response time by parallelizing' 'processing where possible.') setup( name='turbinia', version=turbinia.__version__, description='Automation and Scaling of Digital Forensics Tools', long_description=turbinia_description, license='Apache License, Version 2.0', url='http://turbinia.plumbing/', maintainer='Turbinia development team', maintainer_email='turbinia-dev@googlegroups.com', classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Operating System :: OS Independent', 'Programming Language :: Python', ], packages=find_packages(), include_package_data=True, zip_safe=False, entry_points={'console_scripts': ['turbiniactl=turbinia.turbiniactl:main']}, install_requires=[str(req.req) for req in parse_requirements( 'requirements.txt', session=PipSession()) ], extras_require={ 'dev': ['mock', 'nose', 'yapf', 'celery~=4.1', 'coverage'], 'local': ['celery~=4.1', 'kombu~=4.1', 'redis~=3.0'], 'worker': ['plaso>=20171118', 'pyhindsight>=2.2.0'] } )
Python
0
@@ -827,56 +827,8 @@ 10%0A - from pip._internal.download import PipSession%0A fr @@ -918,46 +918,8 @@ 0.3%0A - from pip.download import PipSession%0A fr @@ -2336,20 +2336,13 @@ ion= -PipSession() +False )%0A
6f7003f39acb80d375010acebeb2840e1d83a7d7
bump to version 0.7.3
setup.py
setup.py
from setuptools import setup setup( name='slothauth', packages=['slothauth'], install_requires=['djangorestframework>=3.3.3', ], version='0.7.2', description='A Python Django package for user accounts and authentication.', author='Chris Del Guercio', author_email='cdelguercio@gmail.com', url='https://github.com/cdelguercio/slothauth', download_url='https://github.com/cdelguercio/slothauth/tarball/0.7.2', keywords=['slothauth', 'sloth', 'auth', 'accounts', 'users', 'django', 'python'], classifiers=[], test_suite='nose.collector', tests_require=['nose', 'nose-cover3'], include_package_data=True, )
Python
0
@@ -139,25 +139,25 @@ ersion='0.7. -2 +3 ',%0A descrip @@ -419,9 +419,9 @@ 0.7. -2 +3 ',%0A
79c1f49f5451141192b366aaf62a27c62c9f17b9
bump setup.py
setup.py
setup.py
from setuptools import setup setup(name='peercoin_rpc', version='0.50', description='Library to communicate with peercoin daemon via JSON-RPC protocol.', url='https://github.com/peerchemist/peercoin_rpc', author='Peerchemist', author_email='peerchemist@protonmail.ch', license='MIT', packages=['peercoin_rpc'], install_requires=['requests'], keywords=['peercoin', 'json-rpc', 'cryptocurrency'], classifiers=[ 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5' ], zip_safe=False, platforms="any")
Python
0.000001
@@ -68,17 +68,17 @@ ion='0.5 -0 +5 ',%0A @@ -762,38 +762,67 @@ 3.5' +, %0A -%5D,%0A - zip_safe=False +'Programming Language :: Python :: 3.6'%0A %5D ,%0A
033ee858b07ae7a66b59c4fcc73079cf8376ea8a
version bump
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup from distutils.command.install import INSTALL_SCHEMES import os for scheme in INSTALL_SCHEMES.values(): scheme['data'] = scheme['purelib'] template_files = [] for (path, dirs, files) in os.walk('templates'): template_files.extend([os.path.join('..', path, f) for f in files]) setup( name='Toto', version='0.12.7', author='JeremyOT', author_email='', download_url='https://github.com/JeremyOT/Toto/zipball/master', license='MIT License', platforms=['OS X', 'Linux'], url='http://toto.li', packages=['toto','toto.methods','toto.methods.account'], requires=['tornado(>=3.2, <4.0)',], install_requires=['tornado==3.2.2',], provides=['toto',], scripts=['scripts/toto-create',], description='A Tornado based framework designed to accelerate web service development', long_description='Documentation is available at http://toto.li/docs/', classifiers=['License :: OSI Approved :: MIT License', 'Operating System :: POSIX'], package_data={'toto': template_files} ) print """ ***************************************************************************** By default, Toto will not connect to a database. Connect to a database with the --database option. Database functionality requires the following modules: pbkdf2>=1.3 MySQL: MySQL-python>=1.2.3, torndb>=0.1 Redis: redis>=2.4.12, hiredis>=0.1.1 (optional) Postres: psycopg2>=2.4.5 MongoDB: pymongo>=2.1 Toto's event and worker frameworks require pyzmq>=2.2.0 ***************************************************************************** """
Python
0.000001
@@ -374,9 +374,9 @@ .12. -7 +8 ',%0A
c021ca2b2faec465c70b89f774c29c58b6312112
bump version to 0.6.1
setup.py
setup.py
#!/usr/bin/evn python2 from setuptools import setup, find_packages setup(name='pprof', version='0.6', packages= find_packages(), author = "Andreas Simbuerger", author_email = "simbuerg@fim.uni-passau.de", description = "This is the experiment driver for the pprof study", license = "MIT", entry_points={ 'console_scripts': [ 'pprof=pprof.driver:main' ] } )
Python
0.000004
@@ -99,16 +99,18 @@ ion='0.6 +.1 ',%0A
c967bea5399c87b006ae5f057f8b78175e574de5
Add 'install_requires'
setup.py
setup.py
from setuptools import setup # Package metadata metadata = {} with open('plasmapy/_metadata.py', 'r') as metadata_file: exec(metadata_file.read(), metadata) # Requirements with open('requirements/base.txt', 'r') as req_file: requirements = req_file.read().splitlines() setup(name=metadata['name'], version=metadata['version'], description="Python package for plasma physics", requires=requirements, provides=[metadata['name']], author="The PlasmaPy Community", author_email="namurphy@cfa.harvard.edu", # until we get an email address license="BSD", url="https://github.com/PlasmaPy/PlasmaPy", # until we make a webpage long_description=metadata['description'], keywords=['plasma', 'plasma physics', 'science'], classifiers=[ 'Intended Audience :: Science/Research', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Scientific/Engineering :: Astronomy', 'Development Status :: 2 - Pre-Alpha', ], packages=["plasmapy"], zip_safe=False, use_2to3=False, python_requires='>=3.6', )
Python
0.000004
@@ -422,16 +422,53 @@ ements,%0A + install_requires=requirements,%0A pr
19752f793b82ce4af07d798cdbd781629fa7d887
fix development status value
setup.py
setup.py
from setuptools import setup setup( zip_safe=True, name='desafe', version='0.0.4', author='pjon', py_modules=['desafe'], description='An utility to decrypt Safe in Cloud password files', license='LICENSE', install_requires=[ "pycrypto", "xmltodict", "passlib", "docopt" ], entry_points={ 'console_scripts': [ 'desafe = desafe:main' ] }, classifiers=[ 'Development Status :: 4 - Alpha', 'Environment :: Console', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Intended Audience :: End Users/Desktop', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Topic :: Security :: Cryptography', 'Topic :: Utilities', 'License :: OSI Approved :: Apache Software License', 'Operating System :: POSIX :: Linux', 'Operating System :: MacOS' ] )
Python
0
@@ -484,17 +484,17 @@ atus :: -4 +3 - Alpha
31aa81628e8161f41fe487f43ea45aa5364b7fd9
fix spelling error in setup.py
setup.py
setup.py
# # to build the distrubution in dist/cloudfeaster-*.*.*.tar.gz # and cloudfeaster-*.*.*-py2-none-any.whl # # >git clone https://github.com/simonsdave/cloudfeaster.git # >cd cloudfeaster # >source cfg4dev # >python setup.py bdist_wheel sdist --formats=gztar # # update pypitest with both meta data and source distribution (FYI ... # use of pandoc is as per https://github.com/pypa/pypi-legacy/issues/148#issuecomment-226939424 # since PyPI requires long description in RST but the repo's readme is in # markdown) # # >./.prep-for-release-release-branch-changes.sh # >pandoc README.md -o README.rst # >twine upload dist/* -r testpypi # # you will be able to find the package at # # https://test.pypi.org/project/cloudfeaster/ # # use the uploaded package # # >pip install -i https://test.pypi.org/pypi cloudfeaster # import re from setuptools import setup # # this approach used below to determine ```version``` was inspired by # https://github.com/kennethreitz/requests/blob/master/setup.py#L31 # # why this complexity? wanted version number to be available in the # a runtime. # # the code below assumes the distribution is being built with the # current directory being the directory in which setup.py is stored # which should be totally fine 99.9% of the time. not going to add # the coode complexity to deal with other scenarios # reg_ex_pattern = r"__version__\s*=\s*['\"](?P<version>[^'\"]*)['\"]" reg_ex = re.compile(reg_ex_pattern) version = "" with open("cloudfeaster/__init__.py", "r") as fd: for line in fd: match = reg_ex.match(line) if match: version = match.group("version") break if not version: raise Exception("Can't locate cloudfeaster's version number") _author = "Dave Simons" _author_email = "simonsdave@gmail.com" def _long_description(): try: with open('README.rst', 'r') as f: return f.read() except IOError: # simple fix for avoid failure on "source cfg4dev" return "a long description" setup( name="cloudfeaster", packages=[ "cloudfeaster", "cloudfeaster.samples", ], scripts=[ "bin/spiderhost.py", "bin/spiders.py", ], install_requires=[ "colorama>=0.3.5", "jsonschema>=2.3.0", "python-dateutil==2.7.2", "selenium==3.11.0", ], include_package_data=True, version=version, description="Cloudfeaster", long_description=_long_description(), author=_author, author_email=_author_email, maintainer=_author, maintainer_email=_author_email, license="MIT", url="https://github.com/simonsdave/cloudfeaster", download_url="https://github.com/simonsdave/cloudfeaster/tarball/v%s" % version, keywords=[ 'selenium', ], classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules", ], )
Python
0.000034
@@ -15,17 +15,17 @@ he distr -u +i bution i
075488b6f2b33c211b734dc08414d45cb35c4e68
Bump version to prepare for next release.
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages # Match releases to redis-py versions __version__ = '2.9.0.11' # Jenkins will replace __build__ with a unique value. __build__ = '' setup(name='mockredispy', version=__version__ + __build__, description='Mock for redis-py', url='http://www.github.com/locationlabs/mockredis', license='Apache2', packages=find_packages(exclude=['*.tests']), setup_requires=[ 'nose' ], extras_require={ 'lua': ['lunatic-python-bugfix==1.1.1'], }, tests_require=[ 'redis>=2.9.0' ], test_suite='mockredis.tests', entry_points={ 'nose.plugins.0.10': [ 'with_redis = mockredis.noseplugin:WithRedis' ] })
Python
0
@@ -121,17 +121,17 @@ '2.9.0.1 -1 +2 '%0A%0A# Jen
4bacbaeb899207115c9b2f4655051ac5121c8ad0
Version bump
setup.py
setup.py
from setuptools import setup setup(name='html_telegraph_poster', version='0.0.19', description='Posts your html to telegra.ph blogging service', keywords='telegra.ph post html telegram', url='https://github.com/mercuree/html-telegraph-poster', author='Garry G', author_email='mercuree.lab@gmail.com', license='MIT', packages=['html_telegraph_poster'], install_requires=['lxml', 'requests', 'requests_toolbelt'], zip_safe=False)
Python
0.000001
@@ -82,10 +82,10 @@ 0.0. -19 +20 ',%0A
cea141e94259e6ffdff63570b77541c5d7623056
bump minor version
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='paddingoracle', author='Marcin Wielgoszewski', author_email='marcin.wielgoszewski@gmail.com', version='0.2', url='https://github.com/mwielgoszewski/python-paddingoracle', py_modules=['paddingoracle'], description='A portable, padding oracle exploit API', zip_safe=False, classifiers=[ 'License :: OSI Approved :: BSD License', 'Programming Language :: Python' ] )
Python
0
@@ -225,16 +225,18 @@ ion='0.2 +.1 ',%0A u
b2a95d7f08b6eaf0f544f50170a6213c01908369
version 1.0.0
setup.py
setup.py
# -*- coding: utf8 -*- from setuptools import setup import os README = os.path.join(os.path.dirname(__file__), 'README.md') setup( name='python-brasileirao', version='0.0.2', description='', long_description=open(README).read(), author='Anderson Lima', author_email='anderson.sl93@hotmail.com', license="MIT", py_modules=['brasileirao', 'utils'], platforms='any', url='https://github.com/TheKiller666/python-brasileirao', install_requires=[ 'requests', 'inflection' ] )
Python
0.000002
@@ -176,13 +176,13 @@ on=' +1. 0.0 -.2 ',%0A
6452a600b29dd191695b91d5402fdffbcc3c755e
Bump version to 0.1.0b7
setup.py
setup.py
from distutils.core import setup setup( name='schemavalidator', packages=['schemavalidator'], version='0.1.0b6', description='A local JSON schema validator based on jsonschema', author='Daan Porru (Wend)', author_email='daan@wend.nl', license='MIT', url='https://github.com/wendbv/schemavalidator', keywords=['json schema', 'validator'], classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python :: 3.5', ], install_requires=['jsonschema', 'requests'], extras_require={ 'test': ['pytest', 'pytest-cov', 'coverage', 'coveralls', 'pytest-mock'], } )
Python
0.000001
@@ -120,9 +120,9 @@ 1.0b -6 +7 ',%0A
76f254582243dc927ca25eebf2b47702ef43167b
Fix install-time dependency on pymongo.
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from setuptools import setup from mongorm import VERSION def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() version = '.'.join(map(str, VERSION)) if __name__ == '__main__': setup( name='mongorm', version=version, author='Rahul AG', author_email='r@hul.ag', description=('An extremely thin ORM-ish wrapper over pymongo.'), long_description=read('README.rst'), license = 'BSD', keywords = ['mongodb', 'mongo', 'orm', 'odm'], url = 'https://github.com/rahulg/mongorm', packages=['mongorm', 'tests'], classifiers=[ 'Development Status :: 3 - Alpha', 'Topic :: Database :: Front-Ends', 'License :: OSI Approved :: BSD License', 'Intended Audience :: Developers', 'Operating System :: OS Independent' ], test_suite='tests', install_requires=[ 'pymongo', 'inflection', 'simplejson' ], )
Python
0
@@ -84,35 +84,27 @@ up%0A%0A -from mongorm import VERSION +VERSION = (0, 6, 5) %0A%0A%0Ad
e7ad292b2d38e33dc466fa2114018a2e04076965
Bump version to 0.7.3
setup.py
setup.py
#!/usr/bin/env python # -*- test-case-name: twistedchecker -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from setuptools import find_packages, setup with open('README.rst') as f: longDescription = f.read() setup( name='twistedchecker', description='A Twisted coding standard compliance checker.', version='0.7.2', author='Twisted Matrix Laboratories', author_email='twisted-python@twistedmatrix.com', url='https://github.com/twisted/twistedchecker', packages=find_packages(), include_package_data=True, # use MANIFEST.in during install entry_points={ "console_scripts": [ "twistedchecker = twistedchecker.core.runner:main" ] }, license='MIT', classifiers=[ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Quality Assurance" ], keywords=[ "twisted", "checker", "compliance", "pep8" ], install_requires=[ "pylint == 1.5.6", "logilab-common == 1.2.1", 'twisted>=15.0.0', ], extras_require = { 'dev': [ 'pyflakes', 'coverage' ], }, long_description=longDescription )
Python
0
@@ -352,17 +352,17 @@ on='0.7. -2 +3 ',%0A a
98f60aeb3cbcf1ae241620ecfca5884483717347
Update setup.py classifiers
setup.py
setup.py
''' explicit setup ''' import versioneer from setuptools import setup, find_packages install_requires = ['versioneer', ] setup( name='explicit', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), author='Levi Noecker', author_email='levi.noecker@gmail.com', url='https://github.com/levi-rs/explicit', packages=find_packages(), description='Easy explicit wait helpers for Selenium', install_requires=install_requires, tests_require=[ 'mock', 'pytest', ], classifiers=[ 'Operating System :: MacOS :: MacOS X', 'Operating System :: POSIX :: Linux', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], test_suite="tests", )
Python
0.000001
@@ -335,24 +335,83 @@ /explicit',%0A + keywords=%5B'selenium', 'explicit', 'wait', 'implicit'%5D,%0A packages @@ -618,44 +618,174 @@ ' -Operating System :: MacOS :: MacOS X +Development Status :: 1 - Planning',%0A 'Intended Audience :: Developers',%0A 'Natural Language :: English',%0A 'License :: OSI Approved :: MIT License ',%0A @@ -816,22 +816,193 @@ :: -P OS -IX :: Linux + Independent',%0A 'Topic :: Software Development :: Libraries :: Python Modules',%0A 'Topic :: Software Development :: Testing',%0A 'Programming Language :: Python :: 2 ',%0A @@ -1043,17 +1043,17 @@ thon :: -3 +2 .6',%0A @@ -1096,11 +1096,11 @@ :: -3.5 +2.7 ',%0A @@ -1146,10 +1146,8 @@ :: 3 -.4 ',%0A @@ -1229,35 +1229,35 @@ ge :: Python :: -2.7 +3.4 ',%0A 'Prog @@ -1278,33 +1278,82 @@ ge :: Python :: -2 +3.5',%0A 'Programming Language :: Python :: 3 .6',%0A 'Pr
b7ec7f787a052c07af18d59990e44ed9fd3a58dd
add flask_featureflags.contrib sub package in install script
setup.py
setup.py
import os from setuptools import setup from sys import argv here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.md')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() except: README = '' CHANGES = '' install_requires = ["Flask"] if "develop" in argv: install_requires.append('Sphinx') install_requires.append('Sphinx-PyPI-upload') setup( name='Flask-FeatureFlags', version='0.6-dev', url='https://github.com/trustrachel/Flask-FeatureFlags', license='Apache', author='Rachel Sanders', author_email='rachel@trustrachel.com', maintainer='Rachel Sanders', maintainer_email='rachel@trustrachel.com', description='Enable or disable features in Flask apps based on configuration', long_description=README + '\n\n' + CHANGES, zip_safe=False, test_suite="tests", platforms='any', include_package_data=True, packages=['flask_featureflags'], install_requires=[ 'Flask', ], classifiers=[ 'Development Status :: 3 - Alpha', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ] )
Python
0.000001
@@ -907,16 +907,21 @@ ckages=%5B +%0A 'flask_f @@ -932,16 +932,140 @@ reflags' +,%0A 'flask_featureflags.contrib',%0A 'flask_featureflags.contrib.inline',%0A 'flask_featureflags.contrib.sqlalchemy',%0A %5D,%0A ins
d1b787a08c2430ca4a9063312455ab696b7caf5c
Version 0.2.1
setup.py
setup.py
"""setup.py file.""" import uuid from setuptools import setup, find_packages from pip.req import parse_requirements __author__ = 'David Barroso <dbarrosop@dravetech.com>' install_reqs = parse_requirements('requirements.txt', session=uuid.uuid1()) reqs = [str(ir.req) for ir in install_reqs] setup( name="napalm-junos", version="0.2.0", packages=find_packages(), author="David Barroso", author_email="dbarrosop@dravetech.com", description="Network Automation and Programmability Abstraction Layer with Multivendor support", classifiers=[ 'Topic :: Utilities', 'Programming Language :: Python', 'Operating System :: POSIX :: Linux', 'Operating System :: MacOS', ], url="https://github.com/napalm-automation/napalm-junos", include_package_data=True, install_requires=reqs, )
Python
0.000001
@@ -338,17 +338,17 @@ on=%220.2. -0 +1 %22,%0A p
b7d082b9b8efc441eb849fd6584ecb5e72d9c8fc
remove dependency on pyqt5
setup.py
setup.py
from setuptools import setup setup( name='broadbean', version='0.9', # We might as well require what we know will work # although older numpy and matplotlib version will probably work too install_requires=['numpy>=1.12.1', 'matplotlib>=2.0.1', 'PyQt5'], author='William H.P. Nielsen', author_email='whpn@mailbox.org', description=("Package for easily generating and manipulating signal " "pulses. Developed for use with qubits in the quantum " "computing labs of Copenhagen, Delft, and Sydney, but " "should be generally useable."), license='MIT', packages=['broadbean'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Science/Research', 'Programming Language :: Python :: 3.5' ], keywords='Pulsebuilding signal processing arbitrary waveforms', url='https://github.com/QCoDeS/broadbean' )
Python
0
@@ -283,39 +283,8 @@ 0.1' -,%0A 'PyQt5' %5D,%0A%0A
345fc7fcfea208d36c7e0647b6dccb6fe4fd160d
Bump Core dependency to v32
setup.py
setup.py
#! /usr/bin/env python # -*- coding: utf-8 -*- """Tunisia specific model for OpenFisca -- a versatile microsimulation free software""" from setuptools import setup, find_packages classifiers = """\ Development Status :: 2 - Pre-Alpha License :: OSI Approved :: GNU Affero General Public License v3 Operating System :: POSIX Programming Language :: Python Topic :: Scientific/Engineering :: Information Analysis """ doc_lines = __doc__.split('\n') setup( name = 'OpenFisca-Tunisia', version = '0.29.0', author = 'OpenFisca Team', author_email = 'contact@openfisca.org', classifiers = [classifier for classifier in classifiers.split('\n') if classifier], description = doc_lines[0], keywords = 'benefit microsimulation social tax tunisia', license = 'http://www.fsf.org/licensing/licenses/agpl-3.0.html', long_description = '\n'.join(doc_lines[2:]), url = 'https://github.com/openfisca/openfisca-tunisia', data_files = [ ('share/openfisca/openfisca-tunisia', ['CHANGELOG.md', 'LICENSE.AGPL.txt', 'README.md']), ], extras_require = dict( tests = [ 'pytest >= 4.0.0, < 5.0.0', ], notebook = [ 'ipykernel >= 4.8', 'jupyter-client >= 5.2', 'matplotlib >= 2.2', 'nbconvert >= 5.3', 'nbformat >= 4.4', 'pandas >= 0.22.0', ], survey = [ 'OpenFisca-Survey-Manager >=0.9.5,<0.19', ] ), include_package_data = True, # Will read MANIFEST.in install_requires = [ 'OpenFisca-Core >=31, <32', 'PyYAML >= 3.10', 'scipy >= 0.12', ], message_extractors = {'openfisca_tunisia': [ ('**.py', 'python', None), ]}, packages = find_packages(exclude=['tests*']), )
Python
0
@@ -1620,14 +1620,14 @@ %3E=3 -1 +2 , %3C3 -2 +3 ',%0A
b1a3831de9c4d52f674cf1b1d4aed7cf74e8d4ba
Update setup.py
setup.py
setup.py
# Always prefer setuptools over distutils from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) setup( name='hmm', version='1.0.0', description='Implementation of the Linear Sparse Version Algorithms to Hidden Markov Model', long_description= This is an implementation of the memory sparse version of the Baum-welch and Viterbi algorithms to HMM., url='https://github.com/xiaozhouw/663', author='Hao Sheng, Xiaozhou Wang', author_email='hao.sheng@duke.edu,xiaozhou.wang@duke.edu', license='MIT', classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Education', 'Topic :: Software Development :: Build Tools', 'Topic :: Scientific/Engineering', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', ], keywords='hidden markov model', install_requires=['numpy','numba'], )
Python
0
@@ -1,8 +1,32 @@ +#! /usr/bin/env python%0A%0A # Always
142ef9b0c2a1d7307132a32cb0803fd047af3b14
Fix invalid variable name
pokediadb/utils.py
pokediadb/utils.py
import sqlite3 def max_sql_variables(): """Get the maximum number of arguments allowed in a query by the current sqlite3 implementation. Returns: int: SQLITE_MAX_VARIABLE_NUMBER """ db = sqlite3.connect(':memory:') cur = db.cursor() cur.execute('CREATE TABLE t (test)') low, high = 0, 100000 while (high - 1) > low: guess = (high + low) // 2 query = 'INSERT INTO t VALUES ' + ','.join(['(?)' for _ in range(guess)]) args = [str(i) for i in range(guess)] try: cur.execute(query, args) except sqlite3.OperationalError as e: if "too many SQL variables" in str(e): high = guess else: return 999 else: low = guess cur.close() db.close() return low
Python
0.999623
@@ -666,16 +666,18 @@ ror as e +rr :%0A @@ -718,16 +718,18 @@ in str(e +rr ):%0A
a33df7cb106e0eaf8498b60d3477269f85be891b
fix setup
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='family', version=version, description="Easy to create your microservice based on Falcon.", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='microservice,falcon', author='torpedoallen', author_email='torpedoallen@gmail.com', url='https://github.com/daixm/family', license='', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, zip_safe=False, install_requires=[ 'click', 'PasteScript', 'check-manifest', # -*- Extra requirements: -*- ], entry_points=""" [console_scripts] family-createapp=family.commands.createapp:create [paste.paster_create_template] falcon = family.templates.basic:FalconTemplate """, )
Python
0.000001
@@ -342,17 +342,17 @@ oservice -, + falcon', @@ -486,16 +486,19 @@ icense=' +MIT ',%0A @@ -721,48 +721,8 @@ t',%0A - # -*- Extra requirements: -*-%0A