commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
3e280e64874d1a68b6bc5fc91a8b6b28968b74e3
Store project and module componentes separately
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
meinberlin/apps/dashboard2/contents.py
meinberlin/apps/dashboard2/contents.py
class DashboardContents: _registry = {'project': {}, 'module': {}} def __getitem__(self, identifier): component = self._registry['project'].get(identifier, None) if not component: component = self._registry['module'].get(identifier) return component def __contains__(sel...
class DashboardContents: _registry = {} content = DashboardContents()
agpl-3.0
Python
4af13edc87fee4083491fcc14197040300b4575f
Remove hardcoded url
almeidapaulopt/frappe,frappe/frappe,StrellaGroup/frappe,mhbu50/frappe,saurabh6790/frappe,almeidapaulopt/frappe,StrellaGroup/frappe,yashodhank/frappe,yashodhank/frappe,adityahase/frappe,adityahase/frappe,almeidapaulopt/frappe,mhbu50/frappe,adityahase/frappe,mhbu50/frappe,mhbu50/frappe,adityahase/frappe,frappe/frappe,alm...
frappe/integrations/frappe_providers/__init__.py
frappe/integrations/frappe_providers/__init__.py
# imports - module imports from frappe.integrations.frappe_providers.frappecloud import frappecloud_migrator def migrate_to(local_site, frappe_provider): if frappe_provider in ("frappe.cloud", "frappecloud.com"): return frappecloud_migrator(local_site, frappe_provider) else: print("{} is not supported yet".form...
# imports - module imports from frappe.integrations.frappe_providers.frappecloud import frappecloud_migrator def migrate_to(local_site, frappe_provider): if frappe_provider in ("frappe.cloud", "frappecloud.com"): frappe_provider = "staging.frappe.cloud" return frappecloud_migrator(local_site, frappe_provider) e...
mit
Python
46ee9dad4030c8628d951abb84a667c7398dd834
Fix error when multiple objects were returned for coordinators in admin
mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign,mrts/foodbank-campaign
src/coordinators/models.py
src/coordinators/models.py
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from locations.models import District class Coordinator(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) is_manage...
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from locations.models import District class Coordinator(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) is_manage...
mit
Python
199d0cdc681675d5e20b2167424becaef8391391
Fix typo
vuolter/pyload,vuolter/pyload,vuolter/pyload
module/plugins/hoster/ZippyshareCom.py
module/plugins/hoster/ZippyshareCom.py
# -*- coding: utf-8 -*- import re from os import path from urllib import unquote from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __version__ = "0.59" _...
# -*- coding: utf-8 -*- import re from os import path from urllib import unquote from urlparse import urljoin from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class ZippyshareCom(SimpleHoster): __name__ = "ZippyshareCom" __type__ = "hoster" __version__ = "0.58" _...
agpl-3.0
Python
21b53578b90896c358f43339fccdce6df722682d
Remove depractated login view
chirilo/remo,tsmrachel/remo,johngian/remo,chirilo/remo,Mte90/remo,johngian/remo,akatsoulas/remo,flamingspaz/remo,abdullah2891/remo,tsmrachel/remo,abdullah2891/remo,johngian/remo,chirilo/remo,tsmrachel/remo,Mte90/remo,flamingspaz/remo,akatsoulas/remo,chirilo/remo,tsmrachel/remo,Mte90/remo,Mte90/remo,akatsoulas/remo,mozi...
remo/profiles/views.py
remo/profiles/views.py
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.contrib.auth.views import login as django_login from django.views.generic.simple import direct_to_template from session_csrf import anonymous_csrf from django.contr...
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.contrib.auth.views import login as django_login from django.views.generic.simple import direct_to_template from session_csrf import anonymous_csrf from django.contr...
bsd-3-clause
Python
d2bff2f612c6d9b32a6a08f3c76f808e3d70d122
Fix a bug in MultipleDatabaseModelDocument
SlideAtlas/SlideAtlas-Server,SlideAtlas/SlideAtlas-Server,SlideAtlas/SlideAtlas-Server,SlideAtlas/SlideAtlas-Server
slideatlas/models/common/multiple_database_model_document.py
slideatlas/models/common/multiple_database_model_document.py
# coding=utf-8 from mongoengine.connection import get_db from .model_document import ModelDocument, ModelQuerySet ################################################################################ __all__ = ('MultipleDatabaseModelDocument',) ###########################################################################...
# coding=utf-8 from mongoengine.connection import get_db from .model_document import ModelDocument, ModelQuerySet ################################################################################ __all__ = ('MultipleDatabaseModelDocument',) ###########################################################################...
apache-2.0
Python
63c1a1553638aec8da380d41313d0d94b3244163
update import
csdev/datacheck,csdev/datacheck
datacheck/__init__.py
datacheck/__init__.py
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from datacheck.core import (validate, Validator, Type, List, Required, Optional, Dict) __all__ = [ 'validate', 'Validator', 'Type', 'List', ...
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from datacheck.core import validate, Type, List, Required, Optional, Dict __all__ = [ 'validate', 'Type', 'List', 'Required', 'Optional', 'Dict', ]
mit
Python
5a05c2fc0e5560463ade239492d5252db3f701be
set maturity to Beta
OCA/account-fiscal-rule,OCA/account-fiscal-rule
account_avatax/__manifest__.py
account_avatax/__manifest__.py
{ "name": "Taxes using Avalara Avatax API", "version": "13.0.1.0.0", "author": "Open Source Integrators, Fabrice Henrion, Odoo SA," " Odoo Community Association (OCA)", "summary": "Automatic Tax application using the Avalara Avatax Service", "license": "AGPL-3", "category": "Accounting", ...
{ "name": "Taxes using Avalara Avatax API", "version": "13.0.1.0.0", "author": "Open Source Integrators, Fabrice Henrion, Odoo SA," " Odoo Community Association (OCA)", "summary": "Automatic Tax application using the Avalara Avatax Service", "license": "AGPL-3", "category": "Accounting", ...
agpl-3.0
Python
19183dd5dd50b29ed0ee63f506904d6f693cad21
Allow the website to be accessed by any host on local server
tm-kn/farmers-api
farmers_api/config/settings/local.py
farmers_api/config/settings/local.py
from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] SECRET_KEY = 'local' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
from .base import * DEBUG = True SECRET_KEY = 'local' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } }
bsd-2-clause
Python
d5cfb00c7d70853fd6ba3c2f5091defce13afaa2
Fix ps_calcs hedu dependency
DataViva/dataviva-scripts,DataViva/dataviva-scripts
scripts/hedu/_calc_rca.py
scripts/hedu/_calc_rca.py
import sys, os import pandas as pd import numpy as np file_path = os.path.dirname(os.path.realpath(__file__)) ps_calcs_lib_path = os.path.abspath(os.path.join(file_path, "../../", "lib/ps_calcs")) sys.path.insert(0, ps_calcs_lib_path) import ps_calcs def calc_rca(ybuc, year): ybc = ybuc.groupby(level=["year", "b...
import sys, os import pandas as pd import numpy as np ps_calcs_lib_path = os.path.abspath(os.path.join(file_path, "../../", "lib/ps_calcs")) sys.path.insert(0, ps_calcs_lib_path) import ps_calcs def calc_rca(ybuc, year): ybc = ybuc.groupby(level=["year", "bra_id", "course_hedu_id"]).sum() ybc = ybc[["enrolle...
mit
Python
0282c7ffc43c5330da27515a42a3392dfa20c57e
Add Universe Test
duggym122/conference-room-manager
room_calendar/tests.py
room_calendar/tests.py
from django.test import TestCase # Create your tests here. def test_answer(): assert 1 == 1
from django.test import TestCase # Create your tests here.
agpl-3.0
Python
75b2a861f6585580f7244c4eb8d112a4548e32a5
Add force_tuple argument
kashif/chainer,hvy/chainer,wkentaro/chainer,okuta/chainer,rezoo/chainer,keisuke-umezawa/chainer,niboshi/chainer,ronekko/chainer,okuta/chainer,keisuke-umezawa/chainer,ktnyt/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,jnishi/chainer,aonotas/chainer,kiyukuta/chainer,ktnyt/chainer,anaruse/chainer,ktnyt/ch...
chainer/functions/array/transpose_sequence.py
chainer/functions/array/transpose_sequence.py
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check def _transpose(xs): xp = cuda.get_array_module(*xs) lengths = numpy.zeros(len(xs[0]), dtype='i') for i, x in enumerate(xs): lengths[0:len(x)] = i + 1 dtype = xs[0].dtype unit = xs[0].sh...
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check def _transpose(xs): xp = cuda.get_array_module(*xs) lengths = numpy.zeros(len(xs[0]), dtype='i') for i, x in enumerate(xs): lengths[0:len(x)] = i + 1 dtype = xs[0].dtype unit = xs[0].sh...
mit
Python
51134c8136bf799a5d6745a53f6f4b97d72d3e57
Update API_VERSION = '48.0'
django-salesforce/django-salesforce,hynekcer/django-salesforce,hynekcer/django-salesforce,django-salesforce/django-salesforce,hynekcer/django-salesforce,django-salesforce/django-salesforce
salesforce/__init__.py
salesforce/__init__.py
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ A database backend for the Django ORM. Allows access to all Salesforce objects accessible via the SOQL API. """ import logging from salesforce.dbapi.exceptions import ( ...
# django-salesforce # # by Phil Christensen # (c) 2012-2013 Freelancers Union (http://www.freelancersunion.org) # See LICENSE.md for details # """ A database backend for the Django ORM. Allows access to all Salesforce objects accessible via the SOQL API. """ import logging from salesforce.dbapi.exceptions import ( ...
mit
Python
932854849299b19264eb6ba47ac65e87a604a5eb
add import of missing AuthError
fredsod/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,garberg/NIPAP,garberg/NIPAP,garberg/NIPAP,fredsod/NIPAP,bbaja42/NIPAP,SoundGoof/NIPAP,SoundGoof/NIPAP,bbaja42/NIPAP,fredsod/NIPAP,SpriteLink/NIPAP,bbaja42/NIPAP,ettrig/NIPAP,SoundGoof/NIPAP,SpriteLink/NIPAP,SpriteLink/NIPAP,fredsod/NIPAP,Soun...
nipap-www/nipapwww/controllers/auth.py
nipap-www/nipapwww/controllers/auth.py
import logging from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from nipapwww.lib.base import BaseController, render from nipap.authlib import AuthFactory, AuthError from nipap.nipapconfig import NipapConfig from ConfigParser import NoOptionEr...
import logging from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from nipapwww.lib.base import BaseController, render from nipap.authlib import AuthFactory from nipap.nipapconfig import NipapConfig from ConfigParser import NoOptionError log = ...
mit
Python
346582df1eda50a7f120871c9b010971997480fe
Add full version number in nxdrive package
arameshkumar/nuxeo-drive,arameshkumar/base-nuxeo-drive,IsaacYangSLA/nuxeo-drive,arameshkumar/base-nuxeo-drive,rsoumyassdi/nuxeo-drive,DirkHoffmann/nuxeo-drive,ssdi-drive/nuxeo-drive,ssdi-drive/nuxeo-drive,IsaacYangSLA/nuxeo-drive,rsoumyassdi/nuxeo-drive,DirkHoffmann/nuxeo-drive,rsoumyassdi/nuxeo-drive,arameshkumar/nuxe...
nuxeo-drive-client/nxdrive/__init__.py
nuxeo-drive-client/nxdrive/__init__.py
__version__ = '1-dev' FULL_VERSION = '1.2.0-' + __version__
__version__ = '1-dev'
lgpl-2.1
Python
b04975af2e1f3fe1d21c18fac239da338cb85027
Improve __init__
Diaoul/subliminal,h3llrais3r/subliminal,ravselj/subliminal,t4lwh/subliminal,kbkailashbagaria/subliminal,hpsbranco/subliminal,juanmhidalgo/subliminal,ofir123/subliminal,goll/subliminal,fernandog/subliminal,nvbn/subliminal,Elettronik/subliminal,bogdal/subliminal,neo1691/subliminal,ratoaq2/subliminal,getzze/subliminal,oxa...
subliminal/__init__.py
subliminal/__init__.py
# -*- coding: utf-8 -*- # # Subliminal - Subtitles, faster than your thoughts # Copyright (c) 2011 Antoine Bertin <diaoulael@gmail.com> # # This file is part of Subliminal. # # Subliminal is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published b...
# -*- coding: utf-8 -*- # # Subliminal - Subtitles, faster than your thoughts # Copyright (c) 2011 Antoine Bertin <diaoulael@gmail.com> # # This file is part of Subliminal. # # Subliminal is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published b...
mit
Python
b3d9c38828f4929f30c7d71122910b8eca65aa6a
Add save roi to MultiKymographBuilder.py
hadim/fiji_tools,hadim/fiji_scripts,hadim/fiji_tools,hadim/fiji_scripts,hadim/fiji_scripts
plugins/Scripts/Plugins/MultiKymographBuilder.py
plugins/Scripts/Plugins/MultiKymographBuilder.py
# @Context context # @Dataset dataset # @ImageJ ij # @LogService log # @DatasetIOService io import os from ij.plugin.frame import RoiManager import fiji.plugin.kymographbuilder.KymographFactory as KFactory from java.io import File rm = RoiManager.getInstance() counter = 0 parent_folder = File(dataset.getSource()).g...
# @Context context # @Dataset dataset # @ImageJ ij # @LogService log # @DatasetIOService io import os from ij.plugin.frame import RoiManager import fiji.plugin.kymographbuilder.KymographFactory as KFactory from java.io import File rm = RoiManager.getInstance() counter = 0 parent_folder = File(dataset.getSource()).g...
bsd-3-clause
Python
71e68394322d34ab777007317f97d4663a7ee40f
Prepare for v0.3.1 release
harikvpy/django-popupcrud,harikvpy/django-popupcrud,harikvpy/django-popupcrud
popupcrud/__init__.py
popupcrud/__init__.py
__version__ = "0.3.1"
__version__ = "0.3.0"
bsd-3-clause
Python
27265c5c290a3ddb5148e71c292ba71a0deea461
Complete naive sol by nested loops
bowen0701/algorithms_data_structures
lc0121_best_time_to_buy_and_sell_stock.py
lc0121_best_time_to_buy_and_sell_stock.py
"""Leetcode 121. Best Time to Buy and Sell Stock Easy URL: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the sto...
"""Leetcode 121. Best Time to Buy and Sell Stock Easy URL: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the sto...
bsd-2-clause
Python
9ddb83788322facb4aa41de2f8997f416359581e
Refactor for improved clarity
Jitsusama/lets-do-dns
lets_do_dns/acme_dns_auth/authenticate.py
lets_do_dns/acme_dns_auth/authenticate.py
"""letsencrypt's certbot Authentication Logic.""" from lets_do_dns.acme_dns_auth.record import Record from lets_do_dns.acme_dns_auth.command import run from lets_do_dns.acme_dns_auth.time_delay import sleep class Authenticate(object): """Handle letsencrypt DNS certificate identity authentication.""" def __i...
"""letsencrypt's certbot Authentication Logic.""" from lets_do_dns.acme_dns_auth.record import Record from lets_do_dns.acme_dns_auth.command import run from lets_do_dns.acme_dns_auth.time_delay import sleep class Authenticate(object): """Handle letsencrypt DNS certificate identity authentication.""" def __i...
apache-2.0
Python
72796a97a24c512cf43fd9559d6e6b47d2f72e72
Allow address to be null
jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot,jamesturk/tot
preferences/models.py
preferences/models.py
import uuid from django.db import models from django.contrib.auth.models import User from opencivicdata.models.people_orgs import Person class Preferences(models.Model): user = models.OneToOneField(User, related_name='preferences') address = models.CharField(max_length=100, blank=True, null=True) lat = mo...
import uuid from django.db import models from django.contrib.auth.models import User from opencivicdata.models.people_orgs import Person from django.contrib.auth.models import User class Preferences(models.Model): user = models.OneToOneField(User, related_name='preferences') address = models.CharField(max_le...
mit
Python
58e838d2fed690a8e5929fc8f82a492fbb908030
Remove .stats command
Uname-a/knife_scraper,Uname-a/knife_scraper,Uname-a/knife_scraper
willie/modules/info.py
willie/modules/info.py
""" info.py - Willie Information Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://willie.dftba.net """ def doc(willie, trigger): """Shows a command's documentation, and possibly an example.""" name = trigger.group(2) name = name.lower() if willie.d...
""" info.py - Willie Information Module Copyright 2008, Sean B. Palmer, inamidst.com Licensed under the Eiffel Forum License 2. http://willie.dftba.net """ def doc(willie, trigger): """Shows a command's documentation, and possibly an example.""" name = trigger.group(2) name = name.lower() if willie.d...
mit
Python
5952c27619c340dd212cbf4023919441c5827765
Make HBox and VBox helper functions
ipython/ipython,ipython/ipython
IPython/html/widgets/widget_container.py
IPython/html/widgets/widget_container.py
"""Container class. Represents a container that can be used to group other widgets. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget from IPython.utils.traitlets import Unicode, Tuple, TraitError, Int, CaselessStrEnum from IPytho...
"""Container class. Represents a container that can be used to group other widgets. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget from IPython.utils.traitlets import Unicode, Tuple, TraitError, Int, CaselessStrEnum from IPytho...
bsd-3-clause
Python
269bf7eec9a8e5ea721bce08c29793f0a2999d15
Add unauthorized handler to flask
selahssea/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,josthkko/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,j0gurt/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/ggrc-core,...
src/ggrc/login/__init__.py
src/ggrc/login/__init__.py
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ggrc.login Provides basic login and session management using Flask-Login with various backends """ import json import re import flask_login from flask_login import login_url from flask import request fr...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ggrc.login Provides basic login and session management using Flask-Login with various backends """ import flask_login from ggrc.extensions import get_extension_module_for def get_login_module(): ret...
apache-2.0
Python
2f55210be8651a80f0c054e4f92cc3fcefaea12c
Add check for gaps in roll tables
whonut/Random-Table-Roller,whonut/Random-Table-Roller,whonut/Random-Table-Roller
table_loader.py
table_loader.py
import csv from itertools import chain def load_table(filepath, headers=False): '''Return a dict representing a roll table loaded from filepath. Loads a roll table from the CSV file at filepath into a dict whose keys are ranges containing the range of rolls (min, max) associated with the event specif...
import csv def load_table(filepath, headers=False): '''Return a dict representing a roll table loaded from filepath. Loads a roll table from the CSV file at filepath into a dict whose keys are ranges containing the range of rolls (min, max) associated with the event specified in that key's value (a s...
mit
Python
c8fcda66041f15278e09a77ad2f4674f876a2755
Update version file.
rubasov/opensub-utils,rubasov/opensub-utils
src/lib/opensub/version.py
src/lib/opensub/version.py
""" Version of the opensub-utils distribution. * Keep _one_ version number for the whole distribution. Don't start versioning the scripts, modules, etc separately. * Use Semantic Versioning v2 as a guide: http://semver.org/ * Don't repeat the version in the commit message. * Tag the commit changing this...
""" Version of the opensub-utils distribution. * Keep _one_ version number for the whole distribution. Don't start versioning the scripts, modules, etc separately. * Use Semantic Versioning v2 as a guide: http://semver.org/ * Don't repeat the version in the commit message. * Tag the commit changing this...
bsd-2-clause
Python
f873c1b54257d4d19ea05bc776de7147c8b3914d
Update django_cache_url.py
ghickman/django-cache-url
django_cache_url.py
django_cache_url.py
# -*- coding: utf-8 -*- import os import urlparse # Register cache schemes in URLs. urlparse.uses_netloc.append('db') urlparse.uses_netloc.append('dummy') urlparse.uses_netloc.append('file') urlparse.uses_netloc.append('locmem') urlparse.uses_netloc.append('memcache') DEFAULT_ENV = 'CACHE_URL' CACHE_TYPES = { '...
# -*- coding: utf-8 -*- import os import urlparse # Register cache schemes in URLs. urlparse.uses_netloc.append('db') urlparse.uses_netloc.append('dummy') urlparse.uses_netloc.append('file') urlparse.uses_netloc.append('locmem') urlparse.uses_netloc.append('memcache') DEFAULT_ENV = 'CACHE_URL' CACHE_TYPES = { '...
mit
Python
f2e0ffd246ef2f86407bdb9ed8dcc2a7182f532a
Update script to patch disassembly for CFU instructions.
google/CFU-Playground,google/CFU-Playground,google/CFU-Playground,google/CFU-Playground
scripts/fix_cfu_dis.py
scripts/fix_cfu_dis.py
#!/usr/bin/env python3 # Copyright 2021 The CFU-Playground 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 a...
#!/usr/bin/env python3 # Copyright 2021 The CFU-Playground 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 a...
apache-2.0
Python
394a760d6b507edd008459af6062683e684614ef
Update image.py
mapclient-plugins/hearttransform
mapclientplugins/hearttransformstep/utils/image.py
mapclientplugins/hearttransformstep/utils/image.py
''' Created on May 21, 2015 @author: hsorby ''' import pydicom import os import numpy as np def extractImageCorners(directory, filename): ''' Extract the image corners from an image that is assumed to be a DICOM image. Corners are returned as: [bl, br, tl, tr] ''' ds = pydicom.read_file...
''' Created on May 21, 2015 @author: hsorby ''' # import dicom import pydicom import os import numpy as np def extractImageCorners(directory, filename): ''' Extract the image corners from an image that is assumed to be a DICOM image. Corners are returned as: [bl, br, tl, tr] ''' # ds = ...
apache-2.0
Python
382fff28c025858a8b273898afebc5ce4ae60a1e
convert services.yaml to bytes before dumping to yaml (#924)
somic/paasta,somic/paasta,Yelp/paasta,Yelp/paasta
paasta_tools/generate_services_yaml.py
paasta_tools/generate_services_yaml.py
#!/usr/bin/env python # Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
#!/usr/bin/env python # Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Python
7346665052eac9dbf7578728b85e4cbd16727249
Add docstrings to core.mixins module (#23, #27)
a5kin/hecate,a5kin/hecate
xentica/core/mixins.py
xentica/core/mixins.py
""" The collection of mixins to be used in core classes. Would be interesting only if you are planning to hack into Xentica core functionality. """ import inspect import xentica.core.base from xentica.core.exceptions import XenticaException class BscaDetectorMixin: """ Add a functionlality to detect BSCA c...
import inspect import xentica.core.base from xentica.core.exceptions import XenticaException class BscaDetectorMixin: @property def _bsca(self): frame = inspect.currentframe() while frame is not None: for l in frame.f_locals.values(): if hasattr(l, "__get__"): ...
mit
Python
03764d38c381efdda2566589953c5430e2a4962d
Implement definition for dev env
beeedy/selfupdate
selfupdate/__init__.py
selfupdate/__init__.py
#!/usr/bin/env python3 import inspect import git import os __version__ = "0.1.0" __author__ = "Broderick Carlin (beeedy)" __email__= "broderick.carlin@gmail.com" __license__= "MIT" def __get_calling_file(): ''' This function will go through the python call stack and find the script that originally called into th...
#!/usr/bin/env python3 import inspect import git import os __version__ = "0.1.0" __author__ = "Broderick Carlin (beeedy)" __email__= "broderick.carlin@gmail.com" __license__= "MIT" def __get_calling_file(): ''' This function will go through the python call stack and find the script that originally called into th...
mit
Python
ed83bb7f5423aef20b7e8201c117bced12583365
Refactor zerver.views.upload.
isht3/zulip,aakash-cr7/zulip,AZtheAsian/zulip,andersk/zulip,dawran6/zulip,krtkmj/zulip,hackerkid/zulip,tommyip/zulip,tommyip/zulip,showell/zulip,samatdav/zulip,PhilSk/zulip,amanharitsh123/zulip,timabbott/zulip,SmartPeople/zulip,souravbadami/zulip,zulip/zulip,samatdav/zulip,samatdav/zulip,ryanbackman/zulip,arpith/zulip,...
zerver/views/upload.py
zerver/views/upload.py
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse, HttpResponseForbidden from django.shortcuts import redirect from django.utils.translation import ugettext as _ from zerver.decorator import authenticated_json_post_view, zulip_login_required from zerver.lib.request import has_re...
from __future__ import absolute_import from django.http import HttpRequest, HttpResponse, HttpResponseForbidden from django.shortcuts import redirect from django.utils.translation import ugettext as _ from zerver.decorator import authenticated_json_post_view, zulip_login_required from zerver.lib.request import has_re...
apache-2.0
Python
d7c41853277c1df53192b2f879f47f75f3c62fd5
Add redirect for / to collections
MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager
server/covmanager/urls.py
server/covmanager/urls.py
from django.conf.urls import patterns, include, url from rest_framework import routers from covmanager import views router = routers.DefaultRouter() router.register(r'collections', views.CollectionViewSet, base_name='collections') router.register(r'repositories', views.RepositoryViewSet, base_name='repositories') ur...
from django.conf.urls import patterns, include, url from rest_framework import routers from covmanager import views router = routers.DefaultRouter() router.register(r'collections', views.CollectionViewSet, base_name='collections') router.register(r'repositories', views.RepositoryViewSet, base_name='repositories') ur...
mpl-2.0
Python
91cbb2b79c565484389f659d436dc3a0813107a4
bump version
kaneawk/shadowsocksr,kaneawk/shadowsocksr
shadowsocks/version.py
shadowsocks/version.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 breakwa11 # # 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 b...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 breakwa11 # # 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 b...
apache-2.0
Python
ab442c822242ea34a752a154873f69c55801c121
Fix warnings during tests
TriOptima/tri.table,TriOptima/tri.table,TriOptima/tri.tables,TriOptima/tri.tables
tests/models.py
tests/models.py
from __future__ import unicode_literals from django.db import models from django.db.models import CASCADE from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Foo(models.Model): a = models.IntegerField() b = models.CharField(max_length=255) def __str__(self): ...
from __future__ import unicode_literals from django.db import models from django.db.models import CASCADE from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Foo(models.Model): a = models.IntegerField() b = models.CharField(max_length=255) def __str__(self): ...
bsd-3-clause
Python
376357185a7cff4c2dea663e87d334bd5e7daa27
Rename function name.
simphony/simphony-common
simphony/cuds/utils.py
simphony/cuds/utils.py
import warnings import importlib from functools import wraps from .meta import api _CUBA_CUDS_MAP = None def deprecated(func): @wraps(func) def _deprecated(*args, **kwargs): warnings.warn("Deprecation warning: {}".format(func.__name__)) return func(*args, **kwargs) return _deprecated d...
import warnings import importlib from functools import wraps _CUBA_CUDS_MAP = None def deprecated(func): @wraps(func) def _deprecated(*args, **kwargs): warnings.warn("Deprecation warning: {}".format(func.__name__)) return func(*args, **kwargs) return _deprecated def turn_cuba_into_cuds...
bsd-2-clause
Python
7c2904615e7c18e2a93900d6315b3489ad1296c4
Resolve Django 4.0 warning in urls config
sunscrapers/djoser,sunscrapers/djoser,sunscrapers/djoser
djoser/social/urls.py
djoser/social/urls.py
from django.urls import re_path from djoser.social import views urlpatterns = [ re_path( r"^o/(?P<provider>\S+)/$", views.ProviderAuthView.as_view(), name="provider-auth", ) ]
from django.conf.urls import url from djoser.social import views urlpatterns = [ url( r"^o/(?P<provider>\S+)/$", views.ProviderAuthView.as_view(), name="provider-auth", ) ]
mit
Python
18f0f07a5cacd82e930c022d877bf30de70181af
simplify with pipe
Javran/misc,Javran/misc,Javran/misc,Javran/misc,Javran/misc
py-subprocess/test.py
py-subprocess/test.py
#!/usr/bin/env python3 import subprocess import io import tempfile def main(): proc = subprocess.Popen( ['./out.sh'], shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) for line in proc.stdout: print(f'subproc stdout:{line}...
#!/usr/bin/env python3 import subprocess import io import tempfile def main(): with tempfile.NamedTemporaryFile(mode='w', buffering=1) as f_out, \ tempfile.NamedTemporaryFile(mode='w', buffering=1) as f_err: proc = subprocess.Popen( ['./out.sh'], shell=True, s...
mit
Python
9940a61cd7dbe9b66dcd4c7e07f967e53d2951d4
Change signature to match other resources auth functions
geotagx/pybossa,jean/pybossa,stefanhahmann/pybossa,harihpr/tweetclickers,Scifabric/pybossa,inteligencia-coletiva-lsd/pybossa,OpenNewsLabs/pybossa,PyBossa/pybossa,Scifabric/pybossa,geotagx/pybossa,jean/pybossa,harihpr/tweetclickers,stefanhahmann/pybossa,OpenNewsLabs/pybossa,inteligencia-coletiva-lsd/pybossa,PyBossa/pybo...
pybossa/auth/token.py
pybossa/auth/token.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
agpl-3.0
Python
9d1268fe44f4eab78cdb76f70a914fa3851db00d
Add names.name_part template node to simplify porting BibTeX name formatting patterns.
live-clones/pybtex
pybtex/style/names.py
pybtex/style/names.py
# Copyright (C) 2006, 2007, 2008 Andrey Golovizin # # This file is part of pybtex. # # pybtex is free software; you can redistribute it and/or modify # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later vers...
# Copyright (C) 2006, 2007, 2008 Andrey Golovizin # # This file is part of pybtex. # # pybtex is free software; you can redistribute it and/or modify # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later vers...
mit
Python
bfdf2b45baf6a57bf186ef6e710e081d1abb104f
Add error reports to admin.
magcius/sweettooth,GNOME/extensions-web,GNOME/extensions-web,GNOME/extensions-web,magcius/sweettooth,GNOME/extensions-web
sweettooth/extensions/admin.py
sweettooth/extensions/admin.py
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from extensions.models import Extension, ExtensionVersion, ErrorReport from review.models import CodeReview class CodeReviewAdmin(admin.TabularInline): model = CodeReview fields = 'reviewer', 'comments', class ExtensionVersion...
from django.contrib import admin from sorl.thumbnail.admin import AdminImageMixin from extensions.models import Extension, ExtensionVersion from review.models import CodeReview class CodeReviewAdmin(admin.TabularInline): model = CodeReview fields = 'reviewer', 'comments', class ExtensionVersionAdmin(admin.M...
agpl-3.0
Python
50b6a5a1aec88c2e3b12af8b7f673d7f3daf4dea
remove unnecessary vispy depencdency
QULab/sound_field_analysis-py
AE2_SampledPlaneWave.py
AE2_SampledPlaneWave.py
# SOFiA example 2: Sampled unity plane wave simulation for different kr # Generate a full audio spectrum plane wave using S/W/G # Additionally requires vispy, see http://vispy.org import numpy as np from sofia import gen, process, plot pi = np.pi r = 0.1 # Array radius ac = 0 # Rigid Sphere FS = 48000 # ...
# SOFiA example 2: Sampled unity plane wave simulation for different kr # Generate a full audio spectrum plane wave using S/W/G # Additionally requires vispy, see http://vispy.org import numpy as np from sofia import gen, process, plot from vispy import scene pi = np.pi r = 0.1 # Array radius ac = 0 # Rigi...
mit
Python
498b3e6fc1f2d0cb45b44904f0b4cf5fde78d31d
Add comments for the directory monitor.
phac-nml/irida-miseq-uploader,phac-nml/irida-miseq-uploader
API/directorymonitor.py
API/directorymonitor.py
import os import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler, FileCreatedEvent from API.pubsub import send_message from API.directoryscanner import find_runs_in_directory class DirectoryMonitorTopics(object): """Topics for monitoring directories for new runs...
import os import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler, FileCreatedEvent from API.pubsub import send_message from API.directoryscanner import find_runs_in_directory class DirectoryMonitorTopics(object): new_run_observed = "new_run_observed" finishe...
apache-2.0
Python
4ffaa730bde8fae1bc46b692ee7b5d1c6e922a0e
bump version 2.5
phfaist/pylatexenc
pylatexenc/version.py
pylatexenc/version.py
# # The MIT License (MIT) # # Copyright (c) 2019 Philippe Faist # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy...
# # The MIT License (MIT) # # Copyright (c) 2019 Philippe Faist # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy...
mit
Python
d3f9cfa4f59710dede0844f3f49ce0a1cc2cf1c3
Fix #2401: Github integration error
CMLL/taiga-back,bdang2012/taiga-back-casting,crr0004/taiga-back,taigaio/taiga-back,Rademade/taiga-back,jeffdwyatt/taiga-back,crr0004/taiga-back,dycodedev/taiga-back,WALR/taiga-back,CMLL/taiga-back,Tigerwhit4/taiga-back,coopsource/taiga-back,rajiteh/taiga-back,EvgeneOskin/taiga-back,xdevelsistemas/taiga-back-community,g...
taiga/hooks/github/services.py
taiga/hooks/github/services.py
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the F...
agpl-3.0
Python
6fe48fc7499327d27f69204b7f8ec927fc975177
Implement python lexer ZMQ service.
orezpraw/unnaturalcode,naturalness/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,naturalness/unnaturalcode,abramhindle/UnnaturalCodeFork,orezpraw/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,abramhindle/UnnaturalCodeFork,orezpraw/estimate-charm,naturalness/unnaturalcode,orezpraw/unnat...
python/lexPythonMQ.py
python/lexPythonMQ.py
#!/usr/bin/python import re, sys, tokenize, zmq; from StringIO import StringIO def err(msg): sys.err.write(str(msg) + '\n') class LexPyMQ(object): def __init__(self): self.zctx = zmq.Context() self.socket = self.zctx.socket(zmq.REP) def run(self): self.socket.bind("tcp://lo:32132") while True: msg ...
#!/usr/bin/python import tokenize; import zmq; context = zmq.Context() socket = context.socket(zmq.REP) socket.bind("tcp://lo:32132") while True: # Wait for next request from client message = socket.recv()
agpl-3.0
Python
45a48126246ee7d82d0a881923d1f78a4d807004
fix #168
roxma/nvim-completion-manager
pythonx/cm_default.py
pythonx/cm_default.py
# sane default for programming languages _patterns = {} _patterns['*'] = r'(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)' _patterns['css'] = r'(-?\d*\.\d[\w-]*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)' _patterns['css'] = _patterns['css'] _pat...
# sane default for programming languages _patterns = {} _patterns['*'] = r'(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)' _patterns['css'] = r'(-?\d*\.\d[\w-]*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)' _patterns['php'] = r'(-?\d*\.\d\w*)|([^\-\...
mit
Python
659d2262dcbe64d2415dfe9dbdd0e04ebeac79f0
Update utils.py
ParallelDots/WordEmbeddingAutoencoder
tyrion/utils.py
tyrion/utils.py
import heapq,random from compatibility import range, pickle import numpy as np from scipy.spatial.distance import cosine def gen_embedding(word): ''' Generates embedding of the word from the model trained. ''' try: with open('./embeddings.pickle', 'rb') as f: embeddings = pickle.loa...
import heapq,random from compatibility import range, pickle import numpy as np from scipy.spatial.distance import cosine def gen_embedding(word): ''' Generates embedding of the word from the model trained. ''' try: f = open('./embeddings.pickle') embeddings = pickle.load(f) retu...
mit
Python
778cb1a9f9fbb7e260d9a17f07d412d4fa12930a
Add "all" to the queryset in DepartmentForm
snahor/django-ubigeo
ubigeo/forms.py
ubigeo/forms.py
from django import forms from .models import Department, Province, District class DepartmentForm(forms.Form): department = forms.ModelChoiceField( queryset=Department.objects.all() ) class ProvinceForm(DepartmentForm): province = forms.ModelChoiceField( queryset=Province.objects.none() ...
from django import forms from .models import Department, Province, District class DepartmentForm(forms.Form): department = forms.ModelChoiceField( queryset=Department.objects ) class ProvinceForm(DepartmentForm): province = forms.ModelChoiceField( queryset=Province.objects.none() ) ...
mit
Python
3adc7f40553459aa7af1a444782d08c243a9d736
Tweak Marathon object __repr__
mattrobenolt/marathon-python,Carles-Figuerola/marathon-python,mattrobenolt/marathon-python,Carles-Figuerola/marathon-python,burakbostancioglu/marathon-python,drewrobb/marathon-python,Yelp/marathon-python,elyast/marathon-python,mesosphere/marathon-python,elyast/marathon-python,fengyehong/marathon-python,Yelp/marathon-py...
marathon/models/base.py
marathon/models/base.py
import json from marathon.util import to_camel_case, to_snake_case, MarathonJsonEncoder class MarathonObject(object): """Base Marathon object.""" def __repr__(self): return "{clazz}::{obj}".format(clazz=self.__class__.__name__, obj=self.to_json()) def json_repr(self): """Construct a JSO...
import json from marathon.util import to_camel_case, to_snake_case, MarathonJsonEncoder class MarathonObject(object): """Base Marathon object.""" def json_repr(self): """Construct a JSON-friendly representation of the object. :rtype: dict """ return {to_camel_case(k):v for k...
mit
Python
5a5f703c51fd46ca8a22acebcac78925d6d52984
Comment out some print statements that were making life hard to work with
sunil07t/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,yw374cornell/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,yw374cornell/e-mission-server,yw374cornell/e-mission-server,e-mission/e-miss...
CFC_WebApp/clients/commontrips/commontrips.py
CFC_WebApp/clients/commontrips/commontrips.py
from dao.user import User import json import sys, os, random # This is in here so the pygmaps associated functions can be imported # from the webapp # sys.path.append("%s/../../CFC_WebApp/" % os.getcwd()) from uuid import UUID def getUserTour(user_uuid): """ Gets a users "tour" """ # This is i...
from dao.user import User import json import sys, os, random # This is in here so the pygmaps associated functions can be imported # from the webapp # sys.path.append("%s/../../CFC_WebApp/" % os.getcwd()) from uuid import UUID def getUserTour(user_uuid): """ Gets a users "tour" """ # This is i...
bsd-3-clause
Python
22e6519f04c4d912dcec669b90009fbb6392145d
remove redundant parameter in migrate-episodes.py
gpodder/mygpo,gpodder/mygpo,gpodder/mygpo,gpodder/mygpo
mygpo/core/management/commands/migrate-episodes.py
mygpo/core/management/commands/migrate-episodes.py
from optparse import make_option from django.core.management.base import BaseCommand from mygpo import migrate from mygpo.utils import iterate_together, progress from mygpo.api import models as oldmodels from mygpo.core import models as newmodels class Command(BaseCommand): option_list = BaseCommand.option_li...
from optparse import make_option from django.core.management.base import BaseCommand from mygpo import migrate from mygpo.utils import iterate_together, progress from mygpo.api import models as oldmodels from mygpo.core import models as newmodels class Command(BaseCommand): option_list = BaseCommand.option_li...
agpl-3.0
Python
15de2fe886c52f0900deeb519f944d22bb5c6db4
Use the @view decorator to ensure that the project page gets user data.
onceuponatimeforever/oh-mainline,vipul-sharma20/oh-mainline,nirmeshk/oh-mainline,onceuponatimeforever/oh-mainline,ehashman/oh-mainline,waseem18/oh-mainline,ehashman/oh-mainline,mzdaniel/oh-mainline,campbe13/openhatch,vipul-sharma20/oh-mainline,eeshangarg/oh-mainline,sudheesh001/oh-mainline,jledbetter/openhatch,jledbett...
mysite/project/views.py
mysite/project/views.py
from mysite.search.models import Project import django.template import mysite.base.decorators from django.http import HttpResponse, HttpResponseRedirect, HttpResponseServerError from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 @mysite.base.decorators.view def project(request, projec...
from mysite.search.models import Project from django.http import HttpResponse, HttpResponseRedirect, HttpResponseServerError from django.shortcuts import render_to_response, get_object_or_404, get_list_or_404 def project(request, project__name = None): p = Project.objects.get(name=project__name) return render...
agpl-3.0
Python
dee8c17f78989c2f508eca5a2771a1d63a60d9c6
Bump version number to 0.1
Xion/recursely
recursely/__init__.py
recursely/__init__.py
""" recursely """ __version__ = "0.1" __description__ = "Recursive importer for Python submodules" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" import sys from recursely._compat import IS_PY3 from recursely.importer import RecursiveImporter from recursely.utils import SentinelList __all__ = ['ins...
""" recursely """ __version__ = "0.0.3" __description__ = "Recursive importer for Python submodules" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" import sys from recursely._compat import IS_PY3 from recursely.importer import RecursiveImporter from recursely.utils import SentinelList __all__ = ['i...
bsd-2-clause
Python
d2a040618a1e816b97f60aa66f5b4c9ab4a3e6b9
Add method to handle files args from cli
jrsmith3/refmanage
refmanage/fs_utils.py
refmanage/fs_utils.py
# -*- coding: utf-8 -*- import os import glob import pathlib2 as pathlib def handle_files_args(paths_args): """ Handle files arguments from command line This method takes a list of strings representing paths passed to the cli. It expands the path arguments and creates a list of pathlib.Path objects which...
# -*- coding: utf-8 -*-
mit
Python
85f471a63238815b3506f464f9261d2b96751aae
Use cog check for duelyst cog
Harmon758/Harmonbot,Harmon758/Harmonbot
Discord/cogs/duelyst.py
Discord/cogs/duelyst.py
from discord.ext import commands from utilities import checks def setup(bot): bot.add_cog(Duelyst(bot)) class Duelyst(commands.Cog): def __init__(self, bot): self.bot = bot def cog_check(self, ctx): return checks.not_forbidden_predicate(ctx) @commands.group(invoke_without_command = True, case_insensit...
from discord.ext import commands from utilities import checks def setup(bot): bot.add_cog(Duelyst(bot)) class Duelyst(commands.Cog): def __init__(self, bot): self.bot = bot @commands.group(invoke_without_command = True, case_insensitive = True) @checks.not_forbidden() async def duelyst(self, ctx): '''D...
mit
Python
abdfdfb6a28e6ce4700b50ebeed12f8b241b5123
Update example push command
ivoire/ReactOBus,ivoire/ReactOBus
share/examples/push.py
share/examples/push.py
import json import sys import uuid import zmq from zmq.utils.strtypes import b def main(): # Get the arguments if len(sys.argv) != 4: print("Usage: push.py url topic num_messages") sys.exit(1) url = sys.argv[1] topic = sys.argv[2] num_messages = int(sys.argv[3]) # Create the s...
import sys import zmq from zmq.utils.strtypes import b def main(): # Get the arguments if len(sys.argv) != 4: print("Usage: push.py url topic num_messages") sys.exit(1) url = sys.argv[1] topic = sys.argv[2] num_messages = int(sys.argv[3]) # Create the socket context = zmq....
agpl-3.0
Python
77dc0b3b7dcd7c03a9c23c0f2c95d8f7f7ae26c6
update init file
danforthcenter/plantcv,stiphyMT/plantcv,stiphyMT/plantcv,danforthcenter/plantcv,stiphyMT/plantcv,danforthcenter/plantcv
plantcv/plantcv/morphology/__init__.py
plantcv/plantcv/morphology/__init__.py
from plantcv.plantcv.morphology.find_branch_pts import find_branch_pts from plantcv.plantcv.morphology.find_tips import find_tips from plantcv.plantcv.morphology._iterative_prune import _iterative_prune from plantcv.plantcv.morphology.segment_skeleton import segment_skeleton from plantcv.plantcv.morphology.segment_sort...
from plantcv.plantcv.morphology.find_branch_pts import find_branch_pts from plantcv.plantcv.morphology.segment_skeleton import segment_skeleton from plantcv.plantcv.morphology.find_tips import find_tips from plantcv.plantcv.morphology.segment_sort import segment_sort from plantcv.plantcv.morphology.prune import prune f...
mit
Python
b6cae9dd657f79b84a9ac622b9a888d372ca9077
Build mono with -O2.
BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild,mono/bockbuild
packages/mono-master.py
packages/mono-master.py
import os class MonoMasterPackage(Package): def __init__(self): Package.__init__(self, 'mono', '3.0.7', sources = ['git://github.com/mono/mono'], revision = os.getenv('MONO_BUILD_REVISION'), configure_flags = [ '--enable-nls=no', '--prefix=' + Package.profile.prefix, '--with-ikvm=yes', '--...
import os class MonoMasterPackage(Package): def __init__(self): Package.__init__(self, 'mono', '3.0.7', sources = ['git://github.com/mono/mono'], revision = os.getenv('MONO_BUILD_REVISION'), configure_flags = [ '--enable-nls=no', '--prefix=' + Package.profile.prefix, '--with-ikvm=yes', '--...
mit
Python
ba0ceb3ffb2cd4b73b461afd57c197aefbb48949
Remove custom logging from dev
dbinetti/barberscore-django,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api
project/settings/dev.py
project/settings/dev.py
from .base import * ALLOWED_HOSTS = [ 'localhost', ] # Static Server Config STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') STATIC_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_URL = '/static/' # Media (aka File Upload) Server Config MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media') ...
from .base import * ALLOWED_HOSTS = [ 'localhost', ] # Static Server Config STATIC_ROOT = os.path.join(PROJECT_ROOT, 'static') STATIC_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_URL = '/static/' # Media (aka File Upload) Server Config MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media') ...
bsd-2-clause
Python
a028c7234a4fc74b725780014e3f840078e6fedb
Fix typo
deffi/protoplot
protoplot/model/axis.py
protoplot/model/axis.py
from protoplot.engine import Item class Axis(Item): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.options.register("log", False, False) self.options.register("logBase", False, 10) self.options.register("min", False, None) self.options.r...
from protoplot.engine import Item class Axis(Item): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.options.register("log", False, False) self.options.register("logBase", False, 10) self.options.register("min", False, None) self.options.r...
agpl-3.0
Python
2bd443655529527a64e46872cd1dbf8142be8dc3
change session name to identifier
opencivicdata/pupa,opencivicdata/pupa,influence-usa/pupa,datamade/pupa,influence-usa/pupa,mileswwatkins/pupa,datamade/pupa,mileswwatkins/pupa,rshorey/pupa,rshorey/pupa
pupa/importers/votes.py
pupa/importers/votes.py
from .base import BaseImporter from opencivicdata.models import VoteEvent, LegislativeSession class VoteImporter(BaseImporter): _type = 'vote' model_class = VoteEvent related_models = {'counts': {}, 'votes': {}, 'sources': {}} def __init__(self, jurisdiction_id, person_importer, org_...
from .base import BaseImporter from opencivicdata.models import VoteEvent, LegislativeSession class VoteImporter(BaseImporter): _type = 'vote' model_class = VoteEvent related_models = {'counts': {}, 'votes': {}, 'sources': {}} def __init__(self, jurisdiction_id, person_importer, org_...
bsd-3-clause
Python
46338d8ea16cbc801df1791b8467ec9268ad8d2e
convert do_spec to klk
tek/amino
unit/do_spec.py
unit/do_spec.py
from typing import Generator, Any from amino.test.spec_spec import Spec from kallikrein import kf, Expectation, k from kallikrein.matchers.maybe import be_just, be_nothing from amino import Just, Nothing, Maybe, do, Eval from amino.state import EvalState, StateT class DoSpec(Spec): '''do notation yield all ...
from typing import Generator from amino.test.spec_spec import Spec from amino import Just, Nothing, Maybe, do from amino.state import EvalState, StateT class DoSpec(Spec): def just(self) -> None: @do def run(i: int) -> Generator[Maybe[int], int, Maybe[int]]: a = yield Just(i) ...
mit
Python
e79949dbb639a4818fc7b509b03bc6f94db458e4
create test to load all passbands listed in pbzptmag file
gnarayan/source_synphot
source_synphot/main.py
source_synphot/main.py
# -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os import numpy as np from . import io from . import passband def main(inargs=None): pbzptfile = os.path.join('passbands','pbzptmag.txt') pbzptfile = io.get_pkgfil...
# -*- coding: UTF-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import numpy as np from . import io from . import passband import pysynphot as S def main(inargs=None): args = io.get_options(args=inargs) sourcepb, sourcepbzp = io.get_...
mit
Python
8714d136cea7fe54f3ae8cbf97da14a142b88db8
Handle IntegrityError when creating transactions
CorbanU/corban-shopify,CorbanU/corban-shopify
shopify/product/models.py
shopify/product/models.py
from __future__ import unicode_literals from decimal import Decimal from django.db import IntegrityError from django.db import models from django.db.models import Sum from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now @python_2_unicode_compatible class Product(models...
from __future__ import unicode_literals from decimal import Decimal from django.db import models from django.db.models import Sum from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now @python_2_unicode_compatible class Product(models.Model): # Unique Shopify product...
bsd-3-clause
Python
b57499cb00012ffb364ca0cb3095ec572ce85d4d
Use HTML5 output for Markdown.
xouillet/sigal,t-animal/sigal,jdn06/sigal,muggenhor/sigal,jasuarez/sigal,saimn/sigal,Ferada/sigal,kontza/sigal,saimn/sigal,jasuarez/sigal,Ferada/sigal,cbosdo/sigal,muggenhor/sigal,elaOnMars/sigal,Ferada/sigal,kontza/sigal,t-animal/sigal,franek/sigal,jasuarez/sigal,t-animal/sigal,elaOnMars/sigal,saimn/sigal,xouillet/sig...
sigal/utils.py
sigal/utils.py
# -*- coding: utf-8 -*- # Copyright (c) 2011-2014 - Simon Conseil # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy...
# -*- coding: utf-8 -*- # Copyright (c) 2011-2014 - Simon Conseil # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy...
mit
Python
8eaef068757b23361c4c71b5057ec13aa7e916d5
make generate_md5_signature work as standalone
byteweaver/django-skrill
skrill/tests/factories.py
skrill/tests/factories.py
from decimal import Decimal import hashlib import random from django.contrib.auth.models import User import factory from skrill.settings import get_secret_word_as_md5 from skrill.models import PaymentRequest, StatusReport from skrill.settings import * class UserFactory(factory.DjangoModelFactory): FACTORY_FOR ...
from decimal import Decimal import hashlib import random from django.contrib.auth.models import User import factory from skrill.settings import get_secret_word_as_md5 from skrill.models import PaymentRequest, StatusReport from skrill.settings import * class UserFactory(factory.DjangoModelFactory): FACTORY_FOR ...
bsd-3-clause
Python
7406975f2a0484c76bb2998c7f6ae064434ad4a3
Build function working!
timcolonel/wow,timcolonel/wow
wow/__main__.py
wow/__main__.py
""" Wow Usage: wow wow install <application>... wow uninstall <application>... wow unpack <file>... wow build [<config_file>] wow push wow compile wow (-h | --help) wow --version Action Options: -h --help Show this screen. --version Show version. """ from lib.wow impor...
""" Wow Usage: wow wow install <application>... wow uninstall <application>... wow build wow push wow compile wow (-h | --help) wow --version Action Options: -h --help Show this screen. --version Show version. """ from lib.wow import Wow from docopt import docopt if __na...
mit
Python
bb2926591dcab344c330c931286ab65d31336736
fix sklearn tests with the correct model_dir (#98)
kubeflow/kfserving-lts,kubeflow/kfserving-lts,kubeflow/kfserving-lts,kubeflow/kfserving-lts,kubeflow/kfserving-lts,kubeflow/kfserving-lts
python/sklearnserver/sklearnserver/test_model.py
python/sklearnserver/sklearnserver/test_model.py
from sklearn import svm from sklearn import datasets from sklearnserver import SKLearnModel import joblib import os model_dir = "../../docs/samples/sklearn" JOBLIB_FILE = "model.joblib" def test_model(): iris = datasets.load_iris() X, y = iris.data, iris.target sklearn_model = svm.SVC(gamma='scale') ...
from sklearn import svm from sklearn import datasets from sklearnserver import SKLearnModel import joblib import os model_dir = "/path/to/kfserving/docs/samples/sklearn" JOBLIB_FILE = "model.joblib" def test_model(): iris = datasets.load_iris() X, y = iris.data, iris.target sklearn_model = svm.SVC(gamm...
apache-2.0
Python
9c5bd69391ad1dad03b58371ee24fcea00b58220
use assemble_output in in-process kernel test
ipython/ipython,ipython/ipython
IPython/kernel/inprocess/tests/test_kernel.py
IPython/kernel/inprocess/tests/test_kernel.py
# Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import sys import unittest from IPython.kernel.inprocess.blocking import BlockingInProcessKernelClient from IPython.kernel.inprocess.manager import InProcessKernelManager from IP...
# Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import sys import unittest from IPython.kernel.inprocess.blocking import BlockingInProcessKernelClient from IPython.kernel.inprocess.manager import InProcessKernelManager from IP...
bsd-3-clause
Python
0eeaf0f6b49dcc39139e596a2237a31646b0b5ee
Add missing import, remove star import
spz-signup/spz-signup
src/spz/test/test_views.py
src/spz/test/test_views.py
# -*- coding: utf-8 -*- """Tests the application views. """ from . import login, logout, get_text from test.fixtures import client, user, superuser from spz import app from spz.models import Course, Origin, Degree, Graduation def test_startpage(client): response = client.get('/') response_text = get_text(re...
# -*- coding: utf-8 -*- """Tests the application views. """ from test.fixtures import * # noqa from . import login, logout, get_text from spz.models import Course, Origin, Degree, Graduation def test_startpage(client): response = client.get('/') response_text = get_text(response) assert 'Anmeldung' in r...
mit
Python
75138535e2975abfdf7ce39f9063a69ca6db51ad
change ellipsis to pass
PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild,PolyJIT/benchbuild
benchbuild/environments/service_layer/ensure.py
benchbuild/environments/service_layer/ensure.py
import sys from . import unit_of_work if sys.version_info <= (3, 8): from typing_extensions import Protocol else: from typing import Protocol class ImageNotFound(Exception): pass class NamedCommand(Protocol): @property def name(self) -> str: ... def image_exists( cmd: NamedComma...
import sys from . import unit_of_work if sys.version_info <= (3, 8): from typing_extensions import Protocol else: from typing import Protocol class ImageNotFound(Exception): ... class NamedCommand(Protocol): @property def name(self) -> str: ... def image_exists( cmd: NamedComman...
mit
Python
c3605b7d7c5076478764c536992d3dbcf26ac07d
Add @api.one warning
topecz/Odoo_Samples,Yenthe666/Odoo_Samples,topecz/Odoo_Samples,Yenthe666/Odoo_Samples,topecz/Odoo_Samples,Yenthe666/Odoo_Samples
button_action_demo/models/button_action_demo.py
button_action_demo/models/button_action_demo.py
# -*- coding: utf-8 -*- from openerp import models, fields, api #Non-odoo library import random from random import randint import string class button_action_demo(models.Model): _name = 'button.demo' name = fields.Char(required=True,default='Click on generate name!') password = fields.Char() # WAR...
# -*- coding: utf-8 -*- from openerp import models, fields, api #Non-odoo library import random from random import randint import string class button_action_demo(models.Model): _name = 'button.demo' name = fields.Char(required=True,default='Click on generate name!') password = fields.Char() @api.one ...
agpl-3.0
Python
a68f10eeff40591487ede5ac27c9dca488b1e494
Implement length parameter
AmosGarner/PyInventory
main.py
main.py
from createCollection import createCollection from ObjectFactories.ItemFactory import ItemFactory from DataObjects.Collection import Collection import datetime, json, os.path, argparse CONST_COLLECTIONS_NAME = 'collections' def generateArgumentsFromParser(): parser = parser = argparse.ArgumentParser(description="...
from createCollection import createCollection from ObjectFactories.ItemFactory import ItemFactory from DataObjects.Collection import Collection import datetime, json, os.path, argparse CONST_COLLECTIONS_NAME = 'collections' def generateArgumentsFromParser(): parser = parser = argparse.ArgumentParser(description="...
apache-2.0
Python
91294ee9601a0aae89a2d45123138e1db69ad289
remove the magic xpos numbers from shooter setup, and simplify
edunham/engr421
main.py
main.py
#! /usr/bin/env python import cv2 import sys from shooters import Shooter from arduino import Arduino, FakeArduino from camera import Camera def choose_center(centers): if centers == []: return centers nearesty = sorted(centers, key = lambda pair: pair[0]) # game tactics logic goes here retur...
#! /usr/bin/env python import cv2 import sys from shooters import Shooter from arduino import Arduino, FakeArduino from camera import Camera def choose_center(centers): if centers == []: return centers nearesty = sorted(centers, key = lambda pair: pair[0]) # game tactics logic goes here retur...
mit
Python
2e39d0c864680793b42234d2c686cae44ed7727c
Add some missing imports
datamade/yournextmp-popit,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,neavouli/yournextrepresentative,YoQuieroSaber/yournextrepresentative,datamade/yournextmp-popit,YoQuieroSaber/yournextrepresentative,mysociety/yournextrepresentative,mysociety/yournextrepresentative,mysociety/yournextrepresent...
elections/mixins.py
elections/mixins.py
from django.conf import settings from django.http import Http404 from django.utils.translation import ugettext as _ class ElectionMixin(object): '''A mixin to add election data from the URL to the context''' def dispatch(self, request, *args, **kwargs): self.election = election = self.kwargs['electio...
from django.conf import settings class ElectionMixin(object): '''A mixin to add election data from the URL to the context''' def dispatch(self, request, *args, **kwargs): self.election = election = self.kwargs['election'] if election not in settings.ELECTIONS: raise Http404(_("Unk...
agpl-3.0
Python
8124c8d9582e743cb52707a5e097198794f00cd0
fix license notice
cs-shadow/phabricator-tools,aevri/phabricator-tools,kjedruczyk/phabricator-tools,bloomberg/phabricator-tools,cs-shadow/phabricator-tools,aevri/phabricator-tools,kjedruczyk/phabricator-tools,kjedruczyk/phabricator-tools,aevri/phabricator-tools,cs-shadow/phabricator-tools,kjedruczyk/phabricator-tools,cs-shadow/phabricato...
testbed/threading/thread-subprocess-test.py
testbed/threading/thread-subprocess-test.py
"""Test that the 'subprocess' releases the GIL, allowing threading. If the GIL was not released for the duration of the calls to 'sleep' then we'd expect the running time to be over 9 seconds. In practice it's closer to the ideal of 3 in the single-processor Lubuntu 13.04 VM tested on. With this result we can see tha...
"""Test that the 'subprocess' releases the GIL, allowing threading. If the GIL was not released for the duration of the calls to 'sleep' then we'd expect the running time to be over 9 seconds. In practice it's closer to the ideal of 3 in the single-processor Lubuntu 13.04 VM tested on. With this result we can see tha...
apache-2.0
Python
fa14c040e6483087f5b2c78bc1a7aeee9ad2274a
Add time formatter for competitions
Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org
Instanssi/kompomaatti/misc/time_formatting.py
Instanssi/kompomaatti/misc/time_formatting.py
# -*- coding: utf-8 -*- import awesometime def compo_times_formatter(compo): compo.compo_time = awesometime.format_single(compo.compo_start) compo.adding_time = awesometime.format_single(compo.adding_end) compo.editing_time = awesometime.format_single(compo.editing_end) compo.voting_time = awesometime...
# -*- coding: utf-8 -*- import awesometime def compo_times_formatter(compo): compo.compo_time = awesometime.format_single(compo.compo_start) compo.adding_time = awesometime.format_single(compo.adding_end) compo.editing_time = awesometime.format_single(compo.editing_end) compo.voting_time = awesometime...
mit
Python
607c48b426c934dd56724e1966497d0742eb0a05
Update BinomialProbability_Calculator.py
StevenPeutz/myDataProjects
PYTHON/BinomialProbability_Calculator.py
PYTHON/BinomialProbability_Calculator.py
#This Python script calculates the probability for n choose k in a binomial probability distribution. #Functions are described in the docstrings. #!/usr/bin/env python3 print('-------------------') print("This will calculate the probability for n choose k in a binomial probability distribution.") p = float(input('Cho...
#This Python script calculates the probability for n choose k in a binomial probability distribution. #Functions are described in the docstrings. print('-------------------') print("This will calculate the probability for n choose k in a binomial probability distribution.") p = float(input('Choose the probability for...
cc0-1.0
Python
98f2b72768f005ca83af2d8cea02a542c60cbfcb
Bump version -> v0.0.3
alphagov/estools
estools/__init__.py
estools/__init__.py
__version__ = '0.0.3'
__version__ = '0.0.2'
mit
Python
5b0c092ab39087724d11960c76e9d2fb62888e1d
append str, not Path, to sys.path
Debian/debsources,Debian/debsources,Debian/debsources,Debian/debsources,Debian/debsources
etc/debsources.wsgi
etc/debsources.wsgi
# WSGI Python file to bridge apache2 / Flask application import sys from pathlib import Path DEBSOURCES_LIB = Path(__file__).resolve().parent.parent / "lib" sys.path.append(str(DEBSOURCES_LIB)) from debsources.app import app_wrapper app_wrapper.go() application = app_wrapper.app
# WSGI Python file to bridge apache2 / Flask application import sys from pathlib import Path DEBSOURCES_LIB = Path(__file__).resolve().parent.parent / "lib" sys.path.append(DEBSOURCES_LIB) from debsources.app import app_wrapper app_wrapper.go() application = app_wrapper.app
agpl-3.0
Python
a171bbe0cd36f23d994870453a6e35d9cf56a6fe
Fix to Hyperprecossor Test
keras-team/autokeras,keras-team/autokeras,keras-team/autokeras
tests/autokeras/hyper_preprocessors_test.py
tests/autokeras/hyper_preprocessors_test.py
# Copyright 2020 The AutoKeras 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 i...
# Copyright 2020 The AutoKeras 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 i...
apache-2.0
Python
26e7dc786d58dad94e9555fb20e6992c29533f0e
add pre-twisted-import stub to spyne.Address for _address_from_twisted_address
arskom/spyne,arskom/spyne,arskom/spyne
spyne/_base.py
spyne/_base.py
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
lgpl-2.1
Python
23fbbb1e164360287b775ab33da321a29136b2a4
Drop `six` module from coverage.
ebsaral/django-rest-framework,ezheidtmann/django-rest-framework,vstoykov/django-rest-framework,cheif/django-rest-framework,potpath/django-rest-framework,alacritythief/django-rest-framework,nryoung/django-rest-framework,akalipetis/django-rest-framework,hnakamur/django-rest-framework,davesque/django-rest-framework,rhblin...
rest_framework/runtests/runcoverage.py
rest_framework/runtests/runcoverage.py
#!/usr/bin/env python """ Useful tool to run the test suite for rest_framework and generate a coverage report. """ # http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/ # http://www.travisswicegood.com/2010/01/17/django-virtualenv-pip-and-fabric/ # http://code.djangoproject.com/svn/django/tr...
#!/usr/bin/env python """ Useful tool to run the test suite for rest_framework and generate a coverage report. """ # http://ericholscher.com/blog/2009/jun/29/enable-setuppy-test-your-django-apps/ # http://www.travisswicegood.com/2010/01/17/django-virtualenv-pip-and-fabric/ # http://code.djangoproject.com/svn/django/tr...
bsd-2-clause
Python
37b154952245a83c0645d0db180f16fe7dc1f29b
copy babel.messages.plural doctests as unit tests
felixonmars/babel,lepistone/babel,nickretallack/babel,skybon/babel,julen/babel,iamshubh22/babel,srisankethu/babel,masklinn/babel,st4lk/babel,moreati/babel,jespino/babel,iamshubh22/babel,nickretallack/babel,skybon/babel,xlevus/babel,st4lk/babel,gutsy/babel,jmagnusson/babel,yoloseem/babel,mgax/babel,xlevus/babel,upman/ba...
tests/messages/test_plurals.py
tests/messages/test_plurals.py
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
bsd-3-clause
Python
9f58f2ec2d3bf5a42e2d81e12d30d8bb37c4e04b
fix python 2.6 tests
cyberdelia/metrology,zenoss/metrology,zenoss/metrology
tests/reporter/test_librato.py
tests/reporter/test_librato.py
import requests import sys import pytest from mock import patch from unittest import TestCase from metrology import Metrology from metrology.reporter.librato import LibratoReporter @pytest.mark.skipif('"java" in sys.version.lower()') class LibratoReporterTest(TestCase): def setUp(self): self.reporter = ...
import requests import sys from mock import patch from unittest import TestCase, skipIf from metrology import Metrology from metrology.reporter.librato import LibratoReporter @skipIf("java" in sys.version.lower(), "doesn't support jython") class LibratoReporterTest(TestCase): def setUp(self): self.repor...
mit
Python
9397c176f6eb0a98ac901085465a9ef4377d2687
Add comment about matplotlib backend
ESSS/pytest-regressions
tests/test_image_regression.py
tests/test_image_regression.py
import io from functools import partial from pytest_regressions.common import Path from pytest_regressions.testing import check_regression_fixture_workflow def test_image_regression(image_regression, datadir): import matplotlib import matplotlib.pyplot as plt import numpy as np # this ensures matplo...
import io from functools import partial from pytest_regressions.common import Path from pytest_regressions.testing import check_regression_fixture_workflow def test_image_regression(image_regression, datadir): import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.use("Agg")...
mit
Python
3293783d0df47d864ecf2734869f8d23f0e83d0f
Integrate LLVM at llvm/llvm-project@81b51b61f849
gautam1858/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,karllessard/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/te...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "81b51b61f849fa91bdf5d0695918578abae846e3" LLVM_SHA256 = "4efa8c26189f4b9d1d137d04f48895bae716320246108cf05885293be5d5b6bc" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "deadda749aef22dba4727f5c4d76090ecca559ac" LLVM_SHA256 = "ae39878b45d0047fc11569409355938b0254d1080e9aa5cfc50d97b498a6812f" tf_http_archive( ...
apache-2.0
Python
941ec9e2eb31686ecf51c753034b0d36fcc77f47
Integrate LLVM at llvm/llvm-project@df7606a066b7
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "df7606a066b75ce55ae4a186c785f996e0985db1" LLVM_SHA256 = "29a2854dab1f8a8282630d6475be7d59a03b78bd30c30f96ae0afe672a81995c" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "fa79dff8bc8b2da923d4935f4b2035f7e1e11e0a" LLVM_SHA256 = "cf940b7e6f047fdbae94c8f01197400e81782685ff39736023bd07c249c6cf83" tfrt_http_archive( ...
apache-2.0
Python
184fe1b24a6f5936f8688b81a05aa97fce31757f
Integrate LLVM at llvm/llvm-project@1830ec94ac02
yongtang/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tenso...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "1830ec94ac022ae0b6d6876fc2251e6b91e5931e" LLVM_SHA256 = "a85d5c8dd40fe7a94a8eec5d5d4794cad018435899b68aac079812686779a858" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "6069a6a5049497a32a50a49661c2f4169078bdba" LLVM_SHA256 = "695c18f11fde8a2aebd2f4144c04878439a382b303e62a2da0d64553b9611efb" tf_http_archive( ...
apache-2.0
Python
2719fa58a5decb4f71a8f36d929117ec729231c3
Integrate LLVM at llvm/llvm-project@86cdb2929cce
tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,paolode...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "86cdb2929ccea1968cbbac6387380a6162e78d21" LLVM_SHA256 = "7ba716b33b48ba1da8cda299d1feb6a545aefdae67794a6da8a595473c6ed5ce" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "bf59cd72447facdb7b17fc00c502d18a02135abb" LLVM_SHA256 = "5321e1f1c16a7920f9e96c75bdf5bf112bf7bb5c086054b92e6f3008f4e787d5" tf_http_archive( ...
apache-2.0
Python
17fadbfa00cffddd6abb6c558b4ffa2099814de8
Integrate LLVM at llvm/llvm-project@0e92cbd6a652
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "0e92cbd6a652c4f86fa76a3af2820009d5b6c300" LLVM_SHA256 = "cac34f6de9b704259b26cfb4fa52ed9563330fc1dc01e1594266d4e00bafb91d" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "8e5f3d04f269dbe791076e775f1d1a098cbada01" LLVM_SHA256 = "51f4950108027260a6dfeac4781fdad85dfde1d8594f8d26faea504e923ebcf2" tfrt_http_archive( ...
apache-2.0
Python
a22a8dd23ade41fcefab17328d38a966afa41ec7
Integrate LLVM at llvm/llvm-project@42102bce98e5
yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gautam1858/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_librari...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "42102bce98e527f994a7bc68b2255d9e0462f6eb" LLVM_SHA256 = "946a0b227e7435531e5286d84cad60011e9613a3198e0e3c07d199babee0db5c" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "d56b171ee965eba9ba30f4a479a9f2e1703105cf" LLVM_SHA256 = "bce89fe2ac52b1d3165d8e85c3df02da1a222f4f61dced63bbfe2fc35ad97d4a" tf_http_archive( ...
apache-2.0
Python
639232e16a85c7146f13b54a94ee388322129b27
Integrate LLVM at llvm/llvm-project@03512ae9bf31
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "03512ae9bf31b725d8233c03094fd463b5f46285" LLVM_SHA256 = "7022aac9ace736042b9363fb8becb5bc17efd78c045592506d866d88b34ba271" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "131f7bac63b8cc1700bbae908bdac60f438e69d1" LLVM_SHA256 = "f3c917ddab6f8e629569ee59df37020098e718d7d7429e149d9df6e6aba211c4" tfrt_http_archive( ...
apache-2.0
Python
b8b0a570c1762364d904e0e2fd82cafe8bee9726
Integrate LLVM at llvm/llvm-project@54cc7de4bc01
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "54cc7de4bc01e6178213e4487d6ab49b809ba2b0" LLVM_SHA256 = "a939c493893b2d27ea87d0d28efc79f33cdee4c56ac5954bc19ca2222a29af9d" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "077f90315bec29443784a1bb2c55f3d7fc2eab64" LLVM_SHA256 = "b8204098753a27847e6084c95d7aa62083cc752ba29899b55058e38ea3f1c4f6" tfrt_http_archive( ...
apache-2.0
Python
fe8e227f3e9b98341effa1ea92c4391cdc955c31
Integrate LLVM at llvm/llvm-project@86bde99a9027
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "86bde99a9027f875383e38bfd3a863abae3d0e75" LLVM_SHA256 = "bdd4964d0e0d389cc3a73f04b4ebbd2da3618622a0f3774dd97223d00c7f13a8" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "5e90f384243f64265814828896168316c80aabc0" LLVM_SHA256 = "818a3264700fd07a24c6ff81fb64196638f17ab78de1afcfbdbd5138a087df77" tfrt_http_archive( ...
apache-2.0
Python
0905a345b5a13ceffc3081f3579d4c0a4c5fe2f4
Integrate LLVM at llvm/llvm-project@bf60a5af0a21
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "bf60a5af0a21323f257719a08d57b28a3389b283" LLVM_SHA256 = "88a9441686bc19d9b559b4342af76c4757878197940a6dafa85b5022be384105" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "81b51b61f849fa91bdf5d0695918578abae846e3" LLVM_SHA256 = "4efa8c26189f4b9d1d137d04f48895bae716320246108cf05885293be5d5b6bc" tfrt_http_archive( ...
apache-2.0
Python
57b178cd6c81727feb6fad6a49831ab60de46a01
Integrate LLVM at llvm/llvm-project@1fa4c188b5a4
tensorflow/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimiz...
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "1fa4c188b5a4187dba7e3809d8fd6d6eccff99f4" LLVM_SHA256 = "24155665d0537320a3b20c668c8cc3142106a0bc2e901d6c99d9ca807c1ef141" tf_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "57dfa12e4ca8d8f5642a3c3a1e80040fd5cba3c9" LLVM_SHA256 = "9f54c2946fa692c1fa699b782c240dd8a118c8acfd910624b208736c0024a35d" tf_http_archive( ...
apache-2.0
Python
9fb08850e9b44bb420a74050a4ecd338fc686141
Integrate LLVM at llvm/llvm-project@72136d8ba266
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "72136d8ba266eea6ce30fbc0e521c7b01a13b378" LLVM_SHA256 = "54d179116e7a79eb1fdf7819aad62b4d76bc0e15e8567871cae9b675f7dec5c1" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4b33ea052ab7fbceed4c62debf1145f80d66b0d7" LLVM_SHA256 = "b6c61a6c81b1910cc34ccd9800fd18afc2dc1b9d76c640dd767f9e550f94c8d6" tfrt_http_archive( ...
apache-2.0
Python