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
6f726570e35980b8de24e20a0d494e31353aba43
fix bugs
kenshohara/3D-ResNets
utils/n_frames_kinetics.py
utils/n_frames_kinetics.py
from __future__ import print_function, division import os import sys import subprocess def class_process(dir_path, class_name): class_path = os.path.join(dir_path, class_name) if not os.path.isdir(class_path): return for file_name in os.listdir(class_path): video_dir_path = os.path.join(class_path, file...
from __future__ import print_function, division import os import sys import subprocess def class_process(dir_path, class_name): class_path = os.path.join(dir_path, class_name) if not os.path.isdir(class_path): continue for file_name in os.listdir(class_path): video_dir_path = os.path.join(class_path, fi...
mit
Python
2277fe3e6952a6b09acf9c2dbba76f23308805f6
Bump version number.
pyrapt/rapt
rapt/__init__.py
rapt/__init__.py
import logging from .rapt import Rapt __version__ = '0.0.2' # To add logging to a python file insert `log = logging.getLogger(__name__)` # near the top at the module level. logging.getLogger(__name__).addHandler(logging.NullHandler()) # Turn logging on. logging.basicConfig(level=logging.DEBUG) def main(): # "...
import logging from .rapt import Rapt __version__ = '0.0.1' # To add logging to a python file insert `log = logging.getLogger(__name__)` # near the top at the module level. logging.getLogger(__name__).addHandler(logging.NullHandler()) # Turn logging on. logging.basicConfig(level=logging.DEBUG) def main(): # "...
mit
Python
11a71b7fbb3cf9e5623851f05c3cac89792d71e8
Bump version to 5.0.5b3
platformio/platformio-core,platformio/platformio,platformio/platformio-core
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
Python
091ba4346dbe928887fb5eec4ce3a2e48f946c07
Bump version to 4.4.0b6
platformio/platformio,platformio/platformio-core,platformio/platformio-core
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
Python
eb09af06edcfc0b53e4fb5fd84966170d76e8925
Bump version to 5.0.2a2
platformio/platformio,platformio/platformio-core,platformio/platformio-core
platformio/__init__.py
platformio/__init__.py
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
Python
e32825713fee1c6e27537b7f4bea557848e5c659
Remove useless metod in sendgrid substitution
eicher31/compassion-modules,philippe89/compassion-modules,CompassionCH/compassion-modules,CompassionCH/compassion-modules,MickSandoz/compassion-modules,emgirardin/compassion-modules,MickSandoz/compassion-modules,maxime-beck/compassion-modules,ecino/compassion-modules,ecino/compassion-modules,maxime-beck/compassion-modu...
mail_sendgrid/models/substitution.py
mail_sendgrid/models/substitution.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Roman Zoller, Emanuel Cino # # The licence is in the file __openerp__.py # ####...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Roman Zoller, Emanuel Cino # # The licence is in the file __openerp__.py # ####...
agpl-3.0
Python
200e5d883896843b15ea51cdc270e8ec88e320f4
Prepare 1.13.0 release
antechrestos/cf-python-client
main/cloudfoundry_client/__init__.py
main/cloudfoundry_client/__init__.py
""" This module provides a client library for cloudfoundry_client v2/v3. """ __version__ = "1.13.0"
""" This module provides a client library for cloudfoundry_client v2/v3. """ __version__ = "1.12.5"
apache-2.0
Python
18b83a0160f44cd123b79f1c1d8cef32b52c65c2
Clean up decode-trestle-tile-position
openslide/openslide,openslide/openslide,openslide/openslide,openslide/openslide
misc/decode-trestle-tile-position.py
misc/decode-trestle-tile-position.py
#!/usr/bin/python import struct, sys, os f = open(sys.argv[1]) i = 0 while True: data = f.read(32) if not data: break unpacked = struct.unpack("<2i8B2i8B", data) a0 = unpacked[0] a1 = unpacked[1] b0 = unpacked[10] b1 = unpacked[11] d0 = unpacked[2:10] d1 = unpacked[12:...
#!/usr/bin/python import struct, sys, os f = open(sys.argv[1]) i = 0 def printX(bb): print ("%5.02x" * 32) % bb def printB(bb): print ("%5d" * 32) % bb def printH(hh): print ("%10d" * 16) % hh def printI(ii): print ("%20d" * 8) % ii def printF(ff): print ("%20g" * 8) % ff def printD(dd): ...
lgpl-2.1
Python
ba85d1c78fb326b7bdb8c4401098185a1537eb0c
Add custom exception for SmifDataInput
nismod/smif,willu47/smif,nismod/smif,nismod/smif,willu47/smif,tomalrussell/smif,tomalrussell/smif,tomalrussell/smif,tomalrussell/smif,nismod/smif,willu47/smif,willu47/smif
src/smif/exception.py
src/smif/exception.py
"""Holds custom smif exception hierarchy Exception +-- SmifException +-- SmifDataError +-- SmifDataNotFoundError +-- SmifDataExistsError +-- SmifDataMismatchError +-- SmifDataReadError +-- SmifDataInputError +-- SmifModelRunError ...
"""Holds custom smif exception hierarchy Exception +-- SmifException +-- SmifDataError +-- SmifDataNotFoundError +-- SmifDataExistsError +-- SmifDataMismatchError +-- SmifDataReadError +-- SmifModelRunError +-- SmifValidationError """ ...
mit
Python
f8a42dc715c55d1f3faf3dd87d168e0687f87e5b
Add common in import statement
BT-ojossen/l10n-switzerland,cgaspoz/l10n-switzerland,CompassionCH/l10n-switzerland,BT-csanchez/l10n-switzerland,CompassionCH/l10n-switzerland,BT-fgarbely/l10n-switzerland,BT-ojossen/l10n-switzerland,BT-fgarbely/l10n-switzerland,cyp-opennet/ons_cyp_github,open-net-sarl/l10n-switzerland,open-net-sarl/l10n-switzerland,cyp...
l10n_ch_payment_slip/report/__init__.py
l10n_ch_payment_slip/report/__init__.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who ...
agpl-3.0
Python
3902905aad551f32223f2e49e2f959d5603a66a7
Add udf default for bioswale perennial plants
recklessromeo/otm-core,maurizi/otm-core,maurizi/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,maurizi/otm-core,RickMohr/otm-core,recklessromeo/otm-core,recklessromeo/otm-core,RickMohr/otm-core,RickMohr/otm-core,maurizi/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/o...
opentreemap/stormwater/models.py
opentreemap/stormwater/models.py
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.contrib.gis.db import models from django.utils.translation import ugettext_lazy as _ from treemap.decorators import classproperty from treemap.models import MapFeature, Geo...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.contrib.gis.db import models from django.utils.translation import ugettext_lazy as _ from treemap.decorators import classproperty from treemap.models import MapFeature, Geo...
agpl-3.0
Python
6cf2874cf2cdd60d559f472afcb1449e72eae2e1
Clean up reverse tests
jtiai/django-rest-framework,xiaotangyuan/django-rest-framework,dmwyatt/django-rest-framework,hunter007/django-rest-framework,rhblind/django-rest-framework,delinhabit/django-rest-framework,arpheno/django-rest-framework,wzbozon/django-rest-framework,sheppard/django-rest-framework,hnakamur/django-rest-framework,rubendura/...
rest_framework/tests/reverse.py
rest_framework/tests/reverse.py
from django.conf.urls.defaults import patterns, url from django.test import TestCase from django.test.client import RequestFactory from rest_framework.reverse import reverse factory = RequestFactory() def null_view(request): pass urlpatterns = patterns('', url(r'^view$', null_view, name='view'), ) class R...
from django.conf.urls.defaults import patterns, url from django.test import TestCase from django.utils import simplejson as json from rest_framework.renderers import JSONRenderer from rest_framework.reverse import reverse from rest_framework.views import APIView from rest_framework.response import Response class MyV...
bsd-2-clause
Python
694a3e1aa5eec02e81cfde517ca126f00b21bd2f
Use Django's module loading rather than __import__
manosim/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,ekonstantinidis/django-rest-framework-docs,manosim/django-rest-framework-docs,manosim/django-rest-framework-docs
rest_framework_docs/api_docs.py
rest_framework_docs/api_docs.py
from django.conf import settings from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from django.utils.module_loading import import_string from rest_framework.views import APIView from rest_framework_docs.api_endpoint import ApiEndpoint class ApiDocumentation(object): def __init__(self): ...
from django.conf import settings from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from rest_framework.views import APIView from rest_framework_docs.api_endpoint import ApiEndpoint class ApiDocumentation(object): def __init__(self): self.endpoints = [] root_urlconf = __import...
bsd-2-clause
Python
b52ef3d7d812da0e0405765c4d44f19b462157aa
Adjust handling of dependency tags to be able to adapt them to handling scl list better.
mbooth101/spec2scl,sclorg/spec2scl
rpm2scl/transformers/generic.py
rpm2scl/transformers/generic.py
import re from rpm2scl.decorators import matches from rpm2scl.transformers.transformer import Transformer class GenericTransformer(Transformer): def __init__(self, spec, options = None): super(GenericTransformer, self).__init__(spec, options) @matches(r'^', one_line = False) def insert_scl_init(s...
import re from rpm2scl.decorators import matches from rpm2scl.transformers.transformer import Transformer class GenericTransformer(Transformer): def __init__(self, spec, options = None): super(GenericTransformer, self).__init__(spec, options) @matches(r'^', one_line = False) def insert_scl_init(s...
mit
Python
b7981e7d0a897af1ba03eede891d09367590001f
Fix for non-english localizations
mkuron/PredicateInstaller
predicate_installer.py
predicate_installer.py
#!/usr/bin/python import objc from Cocoa import NSPredicate, NSObject import time import os import sys from threading import Thread from PyObjCTools import AppHelper def installlog(): f = open('/var/log/install.log', 'r') f.seek(0, os.SEEK_END) while installlog_stop == False: line = f.readline() if len(line) =...
#!/usr/bin/python import objc from Cocoa import NSPredicate, NSObject import time import os import sys from threading import Thread from PyObjCTools import AppHelper def installlog(): f = open('/var/log/install.log', 'r') f.seek(0, os.SEEK_END) while installlog_stop == False: line = f.readline() if len(line) =...
mit
Python
3a8ad2faea9bdb51ad7333bd3495104eaf775553
Add LIS by recusion
bowen0701/algorithms_data_structures
lc300_longest_increasing_subsequence.py
lc300_longest_increasing_subsequence.py
"""LC300. Longest Increasing Subsequence Medium URL: https://leetcode.com/problems/longest-increasing-subsequence/ Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], ...
"""LC300. Longest Increasing Subsequence Medium URL: https://leetcode.com/problems/longest-increasing-subsequence/ Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest increasing subsequence is [2,3,7,101], ...
bsd-2-clause
Python
0cbfed855e6dccf1a590cdfa82cc77222678a8bd
Fix typo in comment.
ipython/ipython,ipython/ipython
IPython/html/__init__.py
IPython/html/__init__.py
"""The IPython HTML Notebook""" import os # Packagers: modify this line if you store the notebook static files elsewhere DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") # Packagers: modify the next line if you store the notebook template files # elsewhere # Include both IPython/html/ an...
"""The IPython HTML Notebook""" import os # Packagers: modify this line if you store the notebook static files elsewhere DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") # Packagers: modify the next line if you store the notebook template files # elsewhere # Include both IPython/html/ an...
bsd-3-clause
Python
29809470c868aefaca3945a03ef896904a267e4f
replace two dots with one
spaam/svtplay-dl,spaam/svtplay-dl
lib/svtplay_dl/utils/text.py
lib/svtplay_dl/utils/text.py
import html import re import unicodedata def ensure_unicode(s): """ Ensure string is a unicode string. If it isn't it assumed it is utf-8 and decodes it to a unicode string. """ if isinstance(s, bytes): s = s.decode("utf-8", "replace") return s def decode_html_entities(s): """ ...
import html import re import unicodedata def ensure_unicode(s): """ Ensure string is a unicode string. If it isn't it assumed it is utf-8 and decodes it to a unicode string. """ if isinstance(s, bytes): s = s.decode("utf-8", "replace") return s def decode_html_entities(s): """ ...
mit
Python
08a3a75e12968d10a1863c29b208c0a5a4f27582
Use numpy's random state
toslunar/chainerrl,toslunar/chainerrl
doom_env.py
doom_env.py
import os import sys import time import numpy as np class DoomEnv(object): def __init__(self, vizdoom_dir=os.path.expanduser('~/ViZDoom'), window_visible=True, scenario='basic', skipcount=10, resolution_width=640, sleep=0.0, seed=None): self.skipcount = skipcount ...
import os import sys import time class DoomEnv(object): def __init__(self, vizdoom_dir=os.path.expanduser('~/ViZDoom'), window_visible=True, scenario='basic', skipcount=10, resolution_width=640, sleep=0.0): self.skipcount = skipcount self.sleep = sleep ...
mit
Python
bb9333da44d59970358fd9abb7b40745fe3aa3e0
fix infinite recursion (taken from https://github.com/elijahr/django-orderable-inlines/pull/2/files)
frx0119/django-orderable-inlines,frx0119/django-orderable-inlines
orderable_inlines/inlines.py
orderable_inlines/inlines.py
from django.contrib.admin import StackedInline, TabularInline from django.template.defaultfilters import slugify class OrderableInlineMixin(object): class Media: js = ( 'js/jquery.browser.min.js', 'js/orderable-inline-jquery-ui.js', 'js/orderable-inline.js', ) ...
from django.contrib.admin import StackedInline, TabularInline from django.template.defaultfilters import slugify class OrderableInlineMixin(object): class Media: js = ( 'js/jquery.browser.min.js', 'js/orderable-inline-jquery-ui.js', 'js/orderable-inline.js', ) ...
bsd-2-clause
Python
9fd84ac14b5801530c18d94b7f579daa83cec021
update language_by_size for vikivoyage
pywikibot/core-migration-example
pywikibot/families/wikivoyage_family.py
pywikibot/families/wikivoyage_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'en',...
# -*- coding: utf-8 -*- __version__ = '$Id$' # The new wikivoyage family that is hosted at wikimedia from pywikibot import family class Family(family.WikimediaFamily): def __init__(self): super(Family, self).__init__() self.name = 'wikivoyage' self.languages_by_size = [ 'de',...
mit
Python
6ece85c530d9856a7db650729e57a9f2a92dfa4b
Fix queryset filtering for active offers
sasha0/django-oscar,thechampanurag/django-oscar,ka7eh/django-oscar,elliotthill/django-oscar,eddiep1101/django-oscar,john-parton/django-oscar,adamend/django-oscar,nfletton/django-oscar,jmt4/django-oscar,pdonadeo/django-oscar,bschuon/django-oscar,sonofatailor/django-oscar,QLGu/django-oscar,monikasulik/django-oscar,Willis...
oscar/apps/offer/managers.py
oscar/apps/offer/managers.py
import datetime from django.db import models class ActiveOfferManager(models.Manager): """ For searching/creating offers within their date range """ def get_query_set(self): today = datetime.date.today() return super(ActiveOfferManager, self).get_query_set().filter( start_...
import datetime from django.db import models class ActiveOfferManager(models.Manager): """ For searching/creating ACTIVE offers only. """ def get_query_set(self): today = datetime.date.today() return super(ActiveOfferManager, self).get_query_set().filter( start_date__lte=t...
bsd-3-clause
Python
aa21662484a99efc24dda639b7057651f1bca98e
Update chainer/training/extensions/variable_unchain.py
hvy/chainer,tkerola/chainer,niboshi/chainer,wkentaro/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,chainer/chainer,chainer/chainer,keisuke-umezawa/chainer,pfnet/chainer,hvy/chainer,okuta/chainer,niboshi/chainer,chainer/chainer,wkentaro/chainer,okuta/chainer,hvy/chainer,wkentaro/chainer,hvy/chainer,okuta/chainer...
chainer/training/extensions/variable_unchain.py
chainer/training/extensions/variable_unchain.py
from chainer import configuration from chainer.training import extension from chainer import variable import six class unchain_variables(extension.Extension): """Trainer extension to unchain all comptational graphs. This extenstion unchains all comptational graphs after all extensions are run to avoid an...
from chainer import configuration from chainer.training import extension from chainer import variable import six class unchain_variables(extension.Extension): """Trainer extension to unchain all comptational graphs. This extenstion unchains all comptational graphs after all extensions are run to avoid an...
mit
Python
6161a4d010ee38bf2e3b2bb437d57bf8da905912
Fix adhocracy.customize_footer option
DanielNeugebauer/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy,alkadis/vcv,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/ad...
src/adhocracy/lib/helpers/staticpage_helper.py
src/adhocracy/lib/helpers/staticpage_helper.py
import babel.core from adhocracy import config from adhocracy.lib import cache, staticpage from adhocracy.lib.helpers import url as _url @cache.memoize('staticpage_url') def url(staticpage, **kwargs): pid = staticpage.key + '_' + staticpage.lang return _url.build(None, 'static', pid, **kwargs) def get_lang...
import babel.core from adhocracy import config from adhocracy.lib import cache, staticpage from adhocracy.lib.helpers import url as _url @cache.memoize('staticpage_url') def url(staticpage, **kwargs): pid = staticpage.key + '_' + staticpage.lang return _url.build(None, 'static', pid, **kwargs) def get_lang...
agpl-3.0
Python
5e10d60b806fdcad677250362c14111ab0babeae
Add test for issue #872
jriehl/numba,numba/numba,numba/numba,IntelLabs/numba,pombredanne/numba,jriehl/numba,gmarkall/numba,gmarkall/numba,jriehl/numba,seibert/numba,sklam/numba,ssarangi/numba,GaZ3ll3/numba,stonebig/numba,stefanseefeld/numba,GaZ3ll3/numba,numba/numba,numba/numba,stefanseefeld/numba,stuartarchibald/numba,pitrou/numba,seibert/nu...
numba/cuda/tests/cudapy/test_lang.py
numba/cuda/tests/cudapy/test_lang.py
""" Test basic language features """ from __future__ import print_function, absolute_import, division import numpy as np from numba import cuda, float64 from numba.cuda.testing import unittest class TestLang(unittest.TestCase): def test_enumerate(self): tup = (1., 2.5, 3.) @cuda.jit("void(float...
""" Test basic language features """ from __future__ import print_function, absolute_import, division import numpy as np from numba import cuda from numba.cuda.testing import unittest class TestLang(unittest.TestCase): def test_enumerate(self): tup = (1., 2.5, 3.) @cuda.jit("void(float64[:])") ...
bsd-2-clause
Python
72702260e00a332a7bb19c4b9d29511b2abab870
Add docstring for application views
Knotis/django-oauth-toolkit,trbs/django-oauth-toolkit,CloudNcodeInc/django-oauth-toolkit,jensadne/django-oauth-toolkit,cheif/django-oauth-toolkit,DeskConnect/django-oauth-toolkit,svetlyak40wt/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,Natgeoed/django-oauth-toolkit,lzen/django-oauth-toolkit,mjrulesamrat/dja...
oauth2_provider/views/application.py
oauth2_provider/views/application.py
from django.core.urlresolvers import reverse_lazy from django.views.generic import CreateView, DetailView, DeleteView, ListView, UpdateView from braces.views import LoginRequiredMixin from ..forms import RegistrationForm from ..models import Application class ApplicationOwnerIsUserMixin(LoginRequiredMixin): """...
from django.core.urlresolvers import reverse_lazy from django.views.generic import CreateView, DetailView, DeleteView, ListView, UpdateView from braces.views import LoginRequiredMixin from ..forms import RegistrationForm from ..models import Application class ApplicationOwnerIsUserMixin(LoginRequiredMixin): """...
bsd-2-clause
Python
f177a2eebd665ef4b67c4a6c5ba4c123b04b081d
test class exceptions
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_opcodes.py
Lib/test/test_opcodes.py
# Python test set -- part 2, opcodes from test_support import * print '2. Opcodes' print 'XXX Not yet fully implemented' print '2.1 try inside for loop' n = 0 for i in range(10): n = n+i try: 1/0 except NameError: pass except ZeroDivisionError: pass except TypeError: pass try: pass except: pass try: pass f...
# Python test set -- part 2, opcodes from test_support import * print '2. Opcodes' print 'XXX Not yet fully implemented' print '2.1 try inside for loop' n = 0 for i in range(10): n = n+i try: 1/0 except NameError: pass except ZeroDivisionError: pass except TypeError: pass try: pass except: pass try: pass f...
mit
Python
a748b564f3fb086636213d8dd964ced4aba16e3c
Fix host
GoogleCloudPlatform/continuous-deployment-circle
e2e_test.py
e2e_test.py
# Copyright 2015, 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 d...
# Copyright 2015, 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 d...
apache-2.0
Python
080f47b9bdcb245ffab7e3fba65dfab945c841aa
Remove unused imports in omnipath processor
sorgerlab/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/indra,johnbachman/belpy,bgyori/indra
indra/tests/test_omnipath.py
indra/tests/test_omnipath.py
import requests from indra.sources.omnipath import OmniPathProcessor from indra.sources.omnipath.api import op_url from indra.statements import Agent from indra.preassembler.grounding_mapper import GroundingMapper BRAF_UPID = 'P15056' JAK2_UPID = 'O60674' CALM1_UPID = 'P0DP23' TRPC3_UPID = 'Q13507' BRAF_AG = Agent(No...
import requests from indra.sources.omnipath import OmniPathProcessor from indra.sources.omnipath.api import op_url from indra.statements import Agent, Phosphorylation, Complex from indra.preassembler.grounding_mapper import GroundingMapper BRAF_UPID = 'P15056' JAK2_UPID = 'O60674' CALM1_UPID = 'P0DP23' TRPC3_UPID = 'Q...
bsd-2-clause
Python
86c93f2b50d900528be1e13a9f3da7ab22622956
Bump version.
concordusapps/alchemist
src/alchemist/meta.py
src/alchemist/meta.py
# -*- coding: utf-8 -*- version = '0.2.11' description = ('A server architecture built on top of a solid foundation ' 'provided by flask, sqlalchemy, and various extensions.')
# -*- coding: utf-8 -*- version = '0.2.10' description = ('A server architecture built on top of a solid foundation ' 'provided by flask, sqlalchemy, and various extensions.')
mit
Python
6f93242653ccf9a9563dd75e752279131863ae69
Bump version (0.6.0)
damianignacio/anima,damianignacio/anima,damianignacio/anima
src/anima/__init__.py
src/anima/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.6.0' from django.apps import AppConfig class Config(AppConfig): label = 'anima' verbose_name = 'Anima' name = 'anima' models_module = 'anima.models'
# -*- coding: utf-8 -*- __version__ = '0.5.1' from django.apps import AppConfig class Config(AppConfig): label = 'anima' verbose_name = 'Anima' name = 'anima' models_module = 'anima.models'
mit
Python
66abe861f120d7c4994a592df950520f7ac1642f
Bump version (0.3.7)
damianignacio/anima,damianignacio/anima,damianignacio/anima
src/anima/__init__.py
src/anima/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.3.7' from django.apps import AppConfig class Config(AppConfig): label = 'anima' verbose_name = 'Anima' name = 'anima' models_module = 'anima.models'
# -*- coding: utf-8 -*- __version__ = '0.3.6' from django.apps import AppConfig class Config(AppConfig): label = 'anima' verbose_name = 'Anima' name = 'anima' models_module = 'anima.models'
mit
Python
27f4ba4c171a9c4247c4ea010063a9e7997c0701
edit test
FederatedAI/FATE,FederatedAI/FATE,FederatedAI/FATE
pipeline/test/test_upload.py
pipeline/test/test_upload.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE Authors. 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/lice...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE Authors. 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/lice...
apache-2.0
Python
1396218ded1eac2f596eff74248659448f0698fb
Add more meme.
kaze/paasmaker,paasmaker/paasmaker,paasmaker/paasmaker,kaze/paasmaker,kaze/paasmaker,kaze/paasmaker,paasmaker/paasmaker,paasmaker/paasmaker,paasmaker/paasmaker,kaze/paasmaker
paasmaker/common/api/noderegister.py
paasmaker/common/api/noderegister.py
import paasmaker import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class NodeRegisterAPIRequest(paasmaker.util.APIRequest): def build_payload(self): # Build our payload. payload = {} # So here's my number... call me maybe? payload['name'] = self.configuration.get...
import paasmaker import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class NodeRegisterAPIRequest(paasmaker.util.APIRequest): def build_payload(self): # Build our payload. payload = {} payload['name'] = self.configuration.get_flat('my_name') payload['route'] = self....
mpl-2.0
Python
3999a6572495bafa860ba022fcabdf53ec6f9f98
Rename script file to match project name
bdesham/py-chrome-bookmarks,bdesham/py-chrome-bookmarks,bdesham/py-chrome-bookmarks
py-chrome-bookmarks.py
py-chrome-bookmarks.py
#!/usr/bin/python import json, sys, os, re # html escaping code from http://wiki.python.org/moin/EscapingHtml html_escape_table = { "&": "&amp;", '"': "&quot;", "'": "&apos;", ">": "&gt;", "<": "&lt;", } def html_escape(text): """Produce entities within text.""" return ''.join(html_e...
#!/usr/bin/python import json, sys, os, re # html escaping code from http://wiki.python.org/moin/EscapingHtml html_escape_table = { "&": "&amp;", '"': "&quot;", "'": "&apos;", ">": "&gt;", "<": "&lt;", } def html_escape(text): """Produce entities within text.""" return ''.join(html_e...
isc
Python
82138337da4340fd22720a89f909c5e6ba374b4b
Set version to 1.9.18
karstenw/nodebox-pyobjc,karstenw/nodebox-pyobjc
nodebox/__init__.py
nodebox/__init__.py
__version__='1.9.18' # import geo # import graphics # import gui # import util def get_version(): return __version__
__version__='1.9.17' # import geo # import graphics # import gui # import util def get_version(): return __version__
mit
Python
c8dde3699b2cc9e7d64833f018f1e85840aed7f6
Make UrlconfIncludePages linkable
j00bar/django-widgy,j00bar/django-widgy,j00bar/django-widgy
widgy/contrib/urlconf_include/models.py
widgy/contrib/urlconf_include/models.py
from django.db import models from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from django.conf import settings from mezzanine.pages.models import Page from widgy.models import links URLCONF_INCLUDE_CHOICES = getattr(settings, 'URLCONF_INCLUDE_CHOICES', N...
from django.db import models from django.core.exceptions import ImproperlyConfigured from django.utils.translation import ugettext_lazy as _ from django.conf import settings from mezzanine.pages.models import Page URLCONF_INCLUDE_CHOICES = getattr(settings, 'URLCONF_INCLUDE_CHOICES', None) # Application developers us...
apache-2.0
Python
6e1337f7079ba48aafcde59e4d5806caabb0bc29
Stop hard-coding the navigation level in the extension
matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz,matthiask/zivinetz
navigation_extensions.py
navigation_extensions.py
from django.utils.text import capfirst from django.utils.translation import ugettext_lazy as _ from feincms.module.page.extensions.navigation import NavigationExtension, PagePretender class ZivinetzNavigationExtension(NavigationExtension): name = _('Zivinetz navigation extension') def children(self, page, *...
from django.utils.text import capfirst from django.utils.translation import ugettext_lazy as _ from feincms.module.page.extensions.navigation import NavigationExtension, PagePretender class ZivinetzNavigationExtension(NavigationExtension): name = _('Zivinetz navigation extension') def children(self, page, *...
mit
Python
af2d1b1ae6c51965ca89b57a71b300f47f2c8668
Add feature vectors and predictors to the admin page
crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp,crcollins/chemtools-webapp
data/admin.py
data/admin.py
from django.contrib import admin from models import DataPoint, FeatureVector, Predictor class DataPointAdmin(admin.ModelAdmin): list_display = ("name", "exact_name", "options", "band_gap") class FeatureVectorAdmin(admin.ModelAdmin): list_display = ("datapoint", "type") class PredictorAdmin(admin.ModelAdm...
from django.contrib import admin from models import DataPoint class DataPointAdmin(admin.ModelAdmin): list_display = ("name", "exact_name", "options", "band_gap") admin.site.register(DataPoint, DataPointAdmin)
mit
Python
16dad15fe28d6d2f3ffe1d9d7a37ff395add2cd2
add 'html 5' to linter syntax
SublimeLinter/SublimeLinter-phpcs,ikappas/SublimeLinter-phpcs
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Dmitry Tsoy # Copyright (c) 2013 Dmitry Tsoy # # License: MIT # """This module exports the Phpcs plugin class.""" from SublimeLinter.lint import Linter class Phpcs(Linter): """Provides an interface to phpcs."...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Dmitry Tsoy # Copyright (c) 2013 Dmitry Tsoy # # License: MIT # """This module exports the Phpcs plugin class.""" from SublimeLinter.lint import Linter class Phpcs(Linter): """Provides an interface to phpcs."...
mit
Python
6ee907c87f15ac1236655e65140a42b7df25652b
add the --linelength argument
SublimeLinter/SublimeLinter-cpplint
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cpplint plugin class.""" from SublimeLinter.lint import Linter, util class Cpplint(Linter): """Provides an interface to cppli...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by NotSqrt # Copyright (c) 2013 NotSqrt # # License: MIT # """This module exports the Cpplint plugin class.""" from SublimeLinter.lint import Linter, util class Cpplint(Linter): """Provides an interface to cppli...
mit
Python
4738364d7137c817cc7d2d1927d2afba94bfcf8b
fix print statement
kostyll/plyer,cleett/plyer,kostyll/plyer,johnbolia/plyer,kivy/plyer,KeyWeeUsr/plyer,kived/plyer,cleett/plyer,KeyWeeUsr/plyer,KeyWeeUsr/plyer,kivy/plyer,kived/plyer,johnbolia/plyer,kivy/plyer
plyer/platforms/win/email.py
plyer/platforms/win/email.py
import os try: from urllib.parse import quote except ImportError: from urllib import quote from plyer.facades import Email class WindowsEmail(Email): def _send(self, **kwargs): recipient = kwargs.get('recipient') subject = kwargs.get('subject') text = kwargs.get('text') cre...
import os try: from urllib.parse import quote except ImportError: from urllib import quote from plyer.facades import Email class WindowsEmail(Email): def _send(self, **kwargs): recipient = kwargs.get('recipient') subject = kwargs.get('subject') text = kwargs.get('text') cre...
mit
Python
c1860c5b27f8952ee53c8c799e0f548ceafbcfc5
Add testing code from testing server
chengdujin/newsman,chengdujin/newsman,chengdujin/newsman
newsman/test/test_rss.py
newsman/test/test_rss.py
#!/usr/bin/env python #-*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('UTF-8') sys.path.append('..') from spider import scraper #entries = scraper.update(feed_link='http://news.yahoo.com/rss/world', feed_id='520b7da3680ccf3c10e93d55', language='en') entries = scraper.update(feed_link='5296e329f5...
#!/usr/bin/env python #-*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('UTF-8') sys.path.append('..') from spider import scraper #entries = scraper.update(feed_link='http://news.yahoo.com/rss/world', feed_id='520b7da3680ccf3c10e93d55', language='en') entries = scraper.update(feed_link='http://www...
agpl-3.0
Python
00a5baa6293d2a46d840f7e065b38fe923a9b64b
Change from verilog to systemverilog.
likewise/SublimeLinter-contrib-xsvlog
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Modified from VHDL to Verilog to SystemVerilog by Leon Woestenberg # Original: # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Xsvlog plugin class.""" from SublimeLinter.lint...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Modified from VHDL to Verilog by Leon Woestenberg # Original: # Written by Bruno JJE # Copyright (c) 2015 Bruno JJE # # License: MIT # """This module exports the Xvlog plugin class.""" from SublimeLinter.lint import Linter c...
mit
Python
2460d340fdf839a5215f258c74c73b2be78ee27c
bump version to 0.2.1
freeman-lab/dask,mikegraham/dask,mraspaud/dask,PhE/dask,chrisbarber/dask,blaze/dask,simudream/dask,pombredanne/dask,gameduell/dask,vikhyat/dask,marianotepper/dask,minrk/dask,jcrist/dask,dask/dask,hainm/dask,esc/dask,jayhetee/dask,jcrist/dask,mrocklin/dask,PeterDSteinberg/dask,jayhetee/dask,dask/dask,pombredanne/dask,mr...
dask/__init__.py
dask/__init__.py
from __future__ import absolute_import, division, print_function from .core import istask, get __version__ = '0.2.1'
from __future__ import absolute_import, division, print_function from .core import istask, get __version__ = '0.2.0'
bsd-3-clause
Python
1206fc91e2397e490498148ecc4daf50addb20ab
fix #18, #30 always run on real files
SublimeLinter/SublimeLinter-phplint
linter.py
linter.py
from SublimeLinter.lint import Linter class PHPLint(Linter): cmd = 'phpl --print-path relative --print-column-number --no-overall ${args}' regex = ( r'(?i)^(?:' r'\t.*?\r?\n)?' r'==== (?P<line>\d+):(?P<col>.*): ' r'(?:(?P<error>error)|(?P<warning>warning|notice)): ' r'(...
from SublimeLinter.lint import Linter class PHPLint(Linter): cmd = 'phpl --print-path relative --print-column-number --no-overall ${args}' regex = ( r'(?i)^(?:' r'\t.*?\r?\n)?' r'==== (?P<line>\d+):(?P<col>.*): ' r'(?:(?P<error>error)|(?P<warning>warning|notice)): ' r'(...
mit
Python
e3d01e9406dfdcebe958ecd7f7a44d007bf29718
Remove unused var assignment
PyBossa/pybossa,Scifabric/pybossa,geotagx/pybossa,Scifabric/pybossa,PyBossa/pybossa,geotagx/pybossa
pybossa/view/amazon.py
pybossa/view/amazon.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2015 SciFabric LTD. # # 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 your op...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2015 SciFabric LTD. # # 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 your op...
agpl-3.0
Python
c1e8cebd19c2d9b5e0d9928b74097bf376b975cf
Allow multi-file module structures for non-cargo lints
gfreezy/SublimeLinter-contrib-rustc,oschwald/SublimeLinter-contrib-rustc
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gregory Oschwald # Copyright (c) 2014 Gregory Oschwald # # License: MIT # """This module exports the Rustc plugin class.""" import os from SublimeLinter.lint import Linter, util class Rust(Linter): """Provide...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gregory Oschwald # Copyright (c) 2014 Gregory Oschwald # # License: MIT # """This module exports the Rustc plugin class.""" import os from SublimeLinter.lint import Linter, util class Rust(Linter): """Provide...
mit
Python
39a000894260c1a5a14c0ef4d359d2954d524cd9
implement BramPortSimMemSpaceMaster._read
Nic30/hwtLib,Nic30/hwtLib
hwtLib/mem/bramPortSimMemSpaceMaster.py
hwtLib/mem/bramPortSimMemSpaceMaster.py
from hwt.hdlObjects.constants import WRITE, READ from hwtLib.sim.abstractMemSpaceMaster import AbstractMemSpaceMaster class BramPortSimMemSpaceMaster(AbstractMemSpaceMaster): def _writeAddr(self, addrChannel, addr, size): addrChannel.data.append(addr) def _write(self, addr, size, data, mask, thenFn=N...
from hwt.hdlObjects.constants import WRITE from hwtLib.sim.abstractMemSpaceMaster import AbstractMemSpaceMaster class BramPortSimMemSpaceMaster(AbstractMemSpaceMaster): def _writeAddr(self, addrChannel, addr, size): addrChannel.data.append(addr) def _write(self, addr, size, data, mask, thenFn=None): ...
mit
Python
7b469cf5bb2256b0290b0c8c4afbf12c0f7dac88
Fix the test-utils build.
ericholscher/pony_barn,ericholscher/pony_barn
pony_barn/build-testutils.py
pony_barn/build-testutils.py
import sys from base import BaseBuild from pony_build import client as pony class PonyBuild(BaseBuild): def __init__(self): super(PonyBuild, self).__init__() self.repo_url = "git://github.com/ericholscher/django-test-utils" self.name = "django-test-utils" self.required = ['django',...
import sys from base_django import DjangoBuild from pony_build import client as pony class TestUtilsBuild(DjangoBuild): def __init__(self): super(TestUtilsBuild, self).__init__() self.repo_url = "git://github.com/ericholscher/django-test-utils" self.name = "django-test-utils" self....
mit
Python
1606dfcb1db856a2e8f23bcb137c9a5b99310d06
Add submodule extending method, improve existing
gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim,gfxprim/gfxprim
pylib/gfxprim/utils.py
pylib/gfxprim/utils.py
""" Utility methods for polishing SWIGified gfxprim. """ def extend(cls, name=None): "Decorator extending a class with a function" def decf(method): funname = name if not funname: funname = method.__name__ type.__setattr__(cls, funname, method) return method return decf def extend_direct(...
""" Utility methods for polishing SWIGified gfxprim. """ def extend(cls, name=None): "Decorator extending a class with a function" def decf(method): funname = name if not funname: funname = method.__name__ type.__setattr__(cls, funname, method) return method return decf def extend_direct(...
lgpl-2.1
Python
d25c91acd45d9234c49cb1ac9f5142104c474a8a
Rename "data" to "special_cases" to more clearly indicate what they are
pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity
localtv/tiers.py
localtv/tiers.py
## These "CHOICES" are used in the SiteLocation model. ## They describe the different account types. CHOICES = [ ('free', 'Free account'), ('plus', 'Plus account'), ('premium', 'Premium account'), ('executive', 'Executive account')] class Tier(object): def __init__(self, tier_name): self.ti...
## These "CHOICES" are used in the SiteLocation model. ## They describe the different account types. CHOICES = [ ('free', 'Free account'), ('plus', 'Plus account'), ('premium', 'Premium account'), ('executive', 'Executive account')] class Tier(object): def __init__(self, tier_name): self.ti...
agpl-3.0
Python
ced2fecc6ba94c1254df5c9234dc71ee203d7c97
prepare release
spinus/pytest-bdd,pytest-dev/pytest-bdd
pytest_bdd/__init__.py
pytest_bdd/__init__.py
"""pytest-bdd public API.""" __version__ = '2.11.2' try: from pytest_bdd.steps import given, when, then from pytest_bdd.scenario import scenario, scenarios __all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__] except ImportError: # avoid import errors when on...
"""pytest-bdd public API.""" __version__ = '2.11.1' try: from pytest_bdd.steps import given, when, then from pytest_bdd.scenario import scenario, scenarios __all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__] except ImportError: # avoid import errors when on...
mit
Python
2941cf20b164f0320bcd4a98ac2ce2a90f54f473
Add non-US option to payment form.
sunlightlabs/tcamp,sunlightlabs/tcamp,sunlightlabs/tcamp,sunlightlabs/tcamp
tcamp/reg/forms.py
tcamp/reg/forms.py
from django import forms from localflavor.us.us_states import STATE_CHOICES from bootstrap_toolkit.widgets import BootstrapTextInput from reg.models import Sale, Ticket, AMBASSADOR_PROGRAM_CHOICES class SaleForm(forms.ModelForm): class Meta: model = Sale class TicketForm(forms.ModelForm): ambassador_...
from django import forms from localflavor.us import forms as us_forms from bootstrap_toolkit.widgets import BootstrapTextInput from reg.models import Sale, Ticket, AMBASSADOR_PROGRAM_CHOICES class SaleForm(forms.ModelForm): class Meta: model = Sale class TicketForm(forms.ModelForm): ambassador_progra...
bsd-3-clause
Python
8c1679617f70434db9aea329f41809ec79173d5d
Exclude flow webhook events from retries
pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web
temba/api/tasks.py
temba/api/tasks.py
from __future__ import print_function, unicode_literals from celery.task import task from datetime import timedelta from django.utils import timezone from django_redis import get_redis_connection from .models import WebHookEvent, WebHookResult, COMPLETE, FAILED, ERRORED, PENDING, FLOW @task(track_started=True, name=...
from __future__ import print_function, unicode_literals from celery.task import task from datetime import timedelta from django.utils import timezone from django_redis import get_redis_connection from .models import WebHookEvent, WebHookResult, COMPLETE, FAILED, ERRORED, PENDING @task(track_started=True, name='deliv...
agpl-3.0
Python
eac5ad448273ff5edb5dc491abc4f0a21f51c195
Rename this field so it makes more sense
texastribune/tx_salaries,texastribune/tx_salaries
tx_salaries/models.py
tx_salaries/models.py
from django.db import models from tx_people import fields from tx_people import mixins from tx_people.models import Membership class CompensationType(models.Model): name = models.CharField(max_length=250) description = models.TextField() # TODO # calculator = models.CharField(choices=constants.AVAILAB...
from django.db import models from tx_people import fields from tx_people import mixins from tx_people.models import Membership class CompensationType(models.Model): name = models.CharField(max_length=250) description = models.TextField() # TODO # calculator = models.CharField(choices=constants.AVAILAB...
apache-2.0
Python
3b4011bdcb6610a8fbb24194040812c4987bbc09
fix old automl tests [(#3089)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/3089)
googleapis/python-language,googleapis/python-language
samples/snippets/automl/dataset_test.py
samples/snippets/automl/dataset_test.py
#!/usr/bin/env python # Copyright 2018 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 ...
#!/usr/bin/env python # Copyright 2018 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 ...
apache-2.0
Python
ef92b15a0b27eeba6435bf3b8ebadbaa58261f58
Revert "Revert "adding territory_free_state flag to loader""
fedspendingtransparency/data-act-broker-backend,fedspendingtransparency/data-act-broker-backend
dataactvalidator/scripts/load_country_codes.py
dataactvalidator/scripts/load_country_codes.py
import os import logging import pandas as pd import numpy as np import boto3 from dataactcore.config import CONFIG_BROKER from dataactcore.interfaces.db import GlobalDB from dataactcore.models.domainModels import CountryCode from dataactvalidator.health_check import create_app from dataactvalidator.scripts.loader_uti...
import os import logging import pandas as pd import boto3 from dataactcore.config import CONFIG_BROKER from dataactcore.interfaces.db import GlobalDB from dataactcore.models.domainModels import CountryCode from dataactvalidator.health_check import create_app from dataactvalidator.scripts.loader_utils import clean_dat...
cc0-1.0
Python
b75b1e17c339f0c2e4d6d4d8cf21ae8c685cf461
Support GoSublime syntax
sirreal/SublimeLinter-contrib-govet
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon Surrell # Copyright (c) 2014 Jon Surrell # # License: MIT # """This module exports the Govet plugin class.""" from SublimeLinter.lint import Linter, util class Govet(Linter): """Provides an interface to g...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jon Surrell # Copyright (c) 2014 Jon Surrell # # License: MIT # """This module exports the Govet plugin class.""" from SublimeLinter.lint import Linter, util class Govet(Linter): """Provides an interface to g...
mit
Python
27e44fecf4d429da6bd6c386d0182f4de2fdfc96
Fix over-indent error.
petrjasek/superdesk-ntb,ioanpocol/superdesk-ntb,ioanpocol/superdesk-ntb,petrjasek/superdesk-ntb,superdesk/superdesk-ntb,superdesk/superdesk-ntb,superdesk/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk-ntb,ioanpocol/superdesk-ntb,petrjasek/superdesk-ntb
server/apps/keywords/alchemy.py
server/apps/keywords/alchemy.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
agpl-3.0
Python
8608283592338960c80113ff4d68f42936ddb969
Clean up include dir code
oschwald/SublimeLinter-perl
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gregory Oschwald # Copyright (c) 2013 Gregory Oschwald # # License: MIT # """This module exports the Perl plugin class.""" import shlex from SublimeLinter.lint import Linter, util class Perl(Linter): """Provi...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gregory Oschwald # Copyright (c) 2013 Gregory Oschwald # # License: MIT # """This module exports the Perl plugin class.""" import shlex from SublimeLinter.lint import Linter, util class Perl(Linter): """Provi...
mit
Python
137b9fc828b4f93139f590d594e60b7136edf9b8
ADD function to compute bounding box coords
RootAccessHackerspace/k40-laser-scripts,RootAccessHackerspace/k40-laser-scripts
GcodeParser.py
GcodeParser.py
#!/usr/bin/env python # coding=UTF-8 """Module containing Gcode parsing functions""" __author__ = "Dylan Armitage" __email__ = "d.armitage89@gmail.com" ####---- Imports ----#### from pygcode import Line, GCodeLinearMove def bounding_box(gcode_file): """Take in file of gcode, return tuples of min/max bounding va...
#!/usr/bin/env python # coding=UTF-8 """Module containing Gcode parsing functions""" __author__ = "Dylan Armitage" __email__ = "d.armitage89@gmail.com" ####---- Imports ----#### from pygcode import Line, GCodeLinearMove def bounding_box(gcode_file): """Take in file of gcode, return dict of max and min bounding ...
mit
Python
4429a43c37d1c05683eb51798c3348878cba648c
Update Python Image test for division by zero
SimpleITK/SimpleITK,InsightSoftwareConsortium/SimpleITK,kaspermarstal/SimpleElastix,SimpleITK/SimpleITK,blowekamp/SimpleITK,blowekamp/SimpleITK,richardbeare/SimpleITK,kaspermarstal/SimpleElastix,kaspermarstal/SimpleElastix,richardbeare/SimpleITK,blowekamp/SimpleITK,SimpleITK/SimpleITK,blowekamp/SimpleITK,kaspermarstal/...
Testing/Unit/sitkImageTests.py
Testing/Unit/sitkImageTests.py
#========================================================================== # # Copyright Insight Software Consortium # # 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...
#========================================================================== # # Copyright Insight Software Consortium # # 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...
apache-2.0
Python
09a06d9a813cb9edf9b128b7e50f12cc53ec140c
Use fits.info directly instead of opening the file
stargaser/astropy,mhvk/astropy,MSeifert04/astropy,lpsinger/astropy,joergdietrich/astropy,mhvk/astropy,astropy/astropy,dhomeier/astropy,funbaker/astropy,bsipocz/astropy,lpsinger/astropy,kelle/astropy,aleksandr-bakanov/astropy,funbaker/astropy,stargaser/astropy,larrybradley/astropy,AustereCuriosity/astropy,astropy/astrop...
astropy/io/fits/scripts/fitsinfo.py
astropy/io/fits/scripts/fitsinfo.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ``fitsinfo`` is a command-line script based on astropy.io.fits for printing a summary of the HDUs in one or more FITS files(s) to the standard output. Example usage of ``fitsinfo``: 1. Print a summary of the HDUs in a FITS file:: $ fitsinfo file...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ ``fitsinfo`` is a command-line script based on astropy.io.fits for printing a summary of the HDUs in one or more FITS files(s) to the standard output. Example usage of ``fitsinfo``: 1. Print a summary of the HDUs in a FITS file:: $ fitsinfo file...
bsd-3-clause
Python
ef2a8b1b59b144c52aa611d90fac4681fe40fb7b
Fix param when calling create new thread.
weijia/django-git,weijia/django-git
django_git/management/commands/git_pull_all.py
django_git/management/commands/git_pull_all.py
from UserDict import UserDict import time import thread from tagging.models import Tag from tagging.models import TaggedItem from iconizer.iconizer_consts import ICONIZER_SERVICE_NAME from iconizer.msg_service.msg_def.file_url_list_msg import FileUrlListMsg from obj_sys.obj_tagging import get_or_create_objects_from_...
from UserDict import UserDict import time import thread from tagging.models import Tag from tagging.models import TaggedItem from iconizer.iconizer_consts import ICONIZER_SERVICE_NAME from iconizer.msg_service.msg_def.file_url_list_msg import FileUrlListMsg from obj_sys.obj_tagging import get_or_create_objects_from_...
bsd-3-clause
Python
605debeec2168351595d7949ec94b328ab63c189
Remove deprecated NullBooleanField
dj-stripe/dj-stripe,dj-stripe/dj-stripe,pydanny/dj-stripe,pydanny/dj-stripe
djstripe/contrib/rest_framework/serializers.py
djstripe/contrib/rest_framework/serializers.py
""" .. module:: dj-stripe.contrib.rest_framework.serializers. :synopsis: dj-stripe - Serializers to be used with the dj-stripe REST API. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from rest_framework import serializers from rest_framework.serializers import ModelSerializer from djstripe.models imp...
""" .. module:: dj-stripe.contrib.rest_framework.serializers. :synopsis: dj-stripe - Serializers to be used with the dj-stripe REST API. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from rest_framework import serializers from rest_framework.serializers import ModelSerializer from djstripe.models imp...
mit
Python
f9db49af506b0b3813e01c8956d03cb826597d01
Add files via upload
Bhare8972/LOFAR-LIM,Bhare8972/LOFAR-LIM
LIM_scripts/examples/run_findRFI.py
LIM_scripts/examples/run_findRFI.py
#!/usr/bin/env python3 """this is a short script that runs findRFI and saves the results to a python pickle file""" import sys import numpy as np import matplotlib.pyplot as plt from LoLIM.utilities import processed_data_dir, logger from LoLIM.IO.raw_tbb_IO import MultiFile_Dal1, filePaths_by_stationName #from LoLI...
#!/usr/bin/env python3 """this is a short script that runs findRFI and saves the results to a python pickle file""" import sys import numpy as np import matplotlib.pyplot as plt from LoLIM.utilities import processed_data_dir, log from LoLIM.IO.raw_tbb_IO import MultiFile_Dal1, filePaths_by_stationName from LoLIM.fi...
mit
Python
6d91ed53a15672b1e70d74691158e9afb7162e74
Add optional support for SSL SNI
dmonroy/python-etcd,ocadotechnology/python-etcd,thepwagner/python-etcd,dmonroy/python-etcd,jlamillan/python-etcd,ocadotechnology/python-etcd,aziontech/python-etcd,jplana/python-etcd,sentinelleader/python-etcd,vodik/python-etcd,projectcalico/python-etcd,j-mcnally/python-etcd,j-mcnally/python-etcd,mbrukman/python-etcd,az...
src/etcd/__init__.py
src/etcd/__init__.py
import collections from client import Client class EtcdResult(collections.namedtuple( 'EtcdResult', [ 'action', 'index', 'key', 'prevValue', 'value', 'expiration', 'ttl', 'newKey'])): def __new__( cls, action=None, ...
import collections from client import Client class EtcdResult(collections.namedtuple( 'EtcdResult', [ 'action', 'index', 'key', 'prevValue', 'value', 'expiration', 'ttl', 'newKey'])): def __new__( cls, action=None, ...
mit
Python
2c4f80df0e7d205aaf701d49f9e6aac89ae315fc
Add test proving we gzip API endpoints
eviljeff/olympia,diox/olympia,kumar303/addons-server,diox/olympia,bqbn/addons-server,atiqueahmedziad/addons-server,aviarypl/mozilla-l10n-addons-server,wagnerand/addons-server,wagnerand/addons-server,diox/olympia,lavish205/olympia,mozilla/olympia,harry-7/addons-server,psiinon/addons-server,kumar303/addons-server,mozilla...
src/olympia/api/tests/test_middleware.py
src/olympia/api/tests/test_middleware.py
from gzip import GzipFile import mock from StringIO import StringIO from django.conf import settings from olympia.amo.tests import addon_factory, TestCase from olympia.amo.urlresolvers import reverse from olympia.api.middleware import GZipMiddlewareForAPIOnly class TestGzipMiddleware(TestCase): @mock.patch('dja...
import mock from django.conf import settings from olympia.amo.tests import TestCase from olympia.api.middleware import GZipMiddlewareForAPIOnly class TestGzipMiddleware(TestCase): @mock.patch('django.middleware.gzip.GZipMiddleware.process_response') def test_enabled_for_api(self, django_gzip_middleware): ...
bsd-3-clause
Python
3c7dab35677614a2bedb4c05d52ab59df68c9892
Fix missing backport of import fix for bdist_rpm building non-source rpms.
pypa/setuptools,pypa/setuptools,pypa/setuptools
setuptools/command/bdist_rpm.py
setuptools/command/bdist_rpm.py
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs, and # finally, a kludge to track .rpm files for uploading when run on Python <2.5. from distutils.comma...
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs, and # finally, a kludge to track .rpm files for uploading when run on Python <2.5. from distutils.comma...
mit
Python
c1f2d1d04e7b1f1ff0bb264d435f6822a87f9872
Add some mail destinations for when things go wrong.
starshipfactory/sfblog,starshipfactory/sfblog,starshipfactory/sfblog,starshipfactory/sfblog
sfblog_project/settings/prod.py
sfblog_project/settings/prod.py
from .base import * # NOQA from os import environ environ.setdefault('SFBLOG_CONFIG_PATH', '/etc/sfblog') ALLOWED_HOSTS = [ "blog.starship-factory.ch", "blog.starship-factory.com", "blog.starship-factory.de", "blog.starship-factory.eu", "blog.starship-factory.org", "blog.starshipfactory.ch", "blog.star...
from .base import * # NOQA from os import environ environ.setdefault('SFBLOG_CONFIG_PATH', '/etc/sfblog') ALLOWED_HOSTS = [ "blog.starship-factory.ch", "blog.starship-factory.com", "blog.starship-factory.de", "blog.starship-factory.eu", "blog.starship-factory.org", "blog.starshipfactory.ch", "blog.star...
bsd-3-clause
Python
bf4c96267ace6efcc20637f5580e55881089da4f
Add command line options to control pbs_watch target.
Clyde-fare/pbs_util,Clyde-fare/pbs_util,Clyde-fare/pbs_util
pbs_watch.py
pbs_watch.py
#!/usr/bin/env python import sys import time import socket import urllib import json import argparse import pbs def trim_digits(s): return ''.join(c for c in s if not c.isdigit()) def get_hostname(): full_hostname = socket.gethostname() hostname=full_hostname.split('.')[-3] hostname = trim_digit...
#!/usr/bin/env python import time import socket import urllib import json import pbs def trim_digits(s): return ''.join(c for c in s if not c.isdigit()) def get_hostname(): full_hostname = socket.gethostname() hostname=full_hostname.split('.')[-3] hostname = trim_digits(hostname) return hostnam...
bsd-3-clause
Python
c820699cd85a17de608e6518c8e13cd6d880a663
Remove unnecessary class
bennlich/scikit-image,Britefury/scikit-image,warmspringwinds/scikit-image,SamHames/scikit-image,chintak/scikit-image,paalge/scikit-image,michaelpacer/scikit-image,juliusbierk/scikit-image,warmspringwinds/scikit-image,chintak/scikit-image,robintw/scikit-image,Hiyorimi/scikit-image,SamHames/scikit-image,WarrenWeckesser/s...
skimage/io/tests/test_plugin.py
skimage/io/tests/test_plugin.py
from numpy.testing import assert_equal, raises from skimage import io from skimage.io._plugins import plugin from numpy.testing.decorators import skipif try: io.use_plugin('pil') PIL_available = True priority_plugin = 'pil' except ImportError: PIL_available = False try: io.use_plugin('freeimage')...
from numpy.testing import assert_equal, raises from skimage import io from skimage.io._plugins import plugin from numpy.testing.decorators import skipif try: io.use_plugin('pil') PIL_available = True priority_plugin = 'pil' except ImportError: PIL_available = False try: io.use_plugin('freeimage')...
bsd-3-clause
Python
11eff670d731b6eee99d19fc38c2c06129a2011f
Update Email.py
Ezpy/GoogleAppEngine_Flask
Email.py
Email.py
''' [Google Mail Api] https://cloud.google.com/appengine/docs/python/mail/sendingmail - what is different ? :To show that you don't need to use google user authentication to send email. - Local google app engine browser won't work, however, once you deploy, it will work fine :) ''' from flask import Flask from g...
''' [Google Mail Api] https://cloud.google.com/appengine/docs/python/mail/sendingmail - what is different ? :To show that you don't need to use google user authentication to send email. - Local google app engine browser won't work, however, once you deploy, it will work fine :) ''' from flask import Flask from...
mit
Python
9ee027fa66d7123b671d5d84a815f253ea3ab36b
print a dot so that we know it is working
camswords/raspberry-pi-instagram-printer,camswords/raspberry-pi-instagram-printer
src/instagram-fun.py
src/instagram-fun.py
from instagram.client import InstagramAPI import os import time import cups from xhtml2pdf import pisa import sys # Note this is heavily inspired from https://nicshackle.wordpress.com/2014/04/09/hashtag-activated-instagram-printer/ def addToPrintQueue(url): html = '<h1 style="text-align:center">Your image:</h1>\n...
from instagram.client import InstagramAPI import os import time import cups from xhtml2pdf import pisa # Note this is heavily inspired from https://nicshackle.wordpress.com/2014/04/09/hashtag-activated-instagram-printer/ def addToPrintQueue(url): html = '<h1 style="text-align:center">Your image:</h1>\n' html ...
mit
Python
3e0ab8c53a0575286e4102d4953ce42ca6075333
Remove unused variables
ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms,ZeitOnline/zeit.cms
src/zeit/cms/repository/copypastemove.py
src/zeit/cms/repository/copypastemove.py
# Copyright (c) 2010-2011 gocept gmbh & co. kg # See also LICENSE.txt import zeit.cms.repository.interfaces import zope.component import zope.container.interfaces import zope.copypastemove import zope.lifecycleevent class CMSObjectMover(zope.copypastemove.ObjectMover): """Objectmover for ICMSContent.""" zop...
# Copyright (c) 2010-2011 gocept gmbh & co. kg # See also LICENSE.txt import zeit.cms.repository.interfaces import zope.component import zope.container.interfaces import zope.copypastemove import zope.lifecycleevent class CMSObjectMover(zope.copypastemove.ObjectMover): """Objectmover for ICMSContent.""" zo...
bsd-3-clause
Python
84deb31cc2bdbf30d8b6f30725a3eaaccd1dd903
Use newer interface for filtering
ade25/ade25.assetmanager
ade25/assetmanager/browser/repository.py
ade25/assetmanager/browser/repository.py
# -*- coding: utf-8 -*- """Module providing views for asset storage folder""" from Products.Five.browser import BrowserView from plone import api from plone.app.contenttypes.interfaces import IImage class AssetRepositoryView(BrowserView): """ Folderish content page default view """ def contained_items(self, u...
# -*- coding: utf-8 -*- """Module providing views for asset storage folder""" from Products.Five.browser import BrowserView from plone import api from plone.app.blob.interfaces import IATBlobImage class AssetRepositoryView(BrowserView): """ Folderish content page default view """ def contained_items(self, ui...
mit
Python
fcc053b67054e3be28fa8203270813e64b5b820d
Replace windows newline chars with unix-style newlines
badsyntax/SassBeautify,badsyntax/SassBeautify
SassBeautify.py
SassBeautify.py
# SassBeautify :: Beautify your Sass! (or Scss!) # Author: Richard Willis (willis.rh@gmail.com) # https://github.com/badsyntax/SassBeautify # Depends on the `sass-convert` utility import os, commands, subprocess import sublime, sublime_plugin class SassBeautifyCommand(sublime_plugin.TextCommand): def run...
# SassBeautify :: Beautify your Sass! (or Scss!) # Author: Richard Willis (willis.rh@gmail.com) # https://github.com/badsyntax/SassBeautify # Depends on the `sass-convert` utility import os, commands, subprocess import sublime, sublime_plugin class SassBeautifyCommand(sublime_plugin.TextCommand): def run...
mit
Python
1dd257b157cfcb13a13a9c97ff6580045026118c
Change the order when loading xml data
xcgd/account_streamline
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { "name": "Account Streamline", "version": "0.1", "author": "XCG Consulting", "category": 'Accounting', "description...
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { "name": "Account Streamline", "version": "0.1", "author": "XCG Consulting", "category": 'Accounting', "description...
agpl-3.0
Python
861da6561f10dc2a3acfde50083f6b3faef7145a
Use smart_text
car3oon/saleor,itbabu/saleor,UITools/saleor,tfroehlich82/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,tfroehlich82/saleor,UITools/saleor,car3oon/saleor,itbabu/saleor,HyperManTT/ECommerceSaleor,mociepka/saleor,mociepka/saleor,car3oon/saleor,UITools/saleor,...
saleor/product/models/utils.py
saleor/product/models/utils.py
from django.utils.encoding import smart_text def get_attributes_display_map(variant, attributes): display = {} for attribute in attributes: value = variant.attributes.get(smart_text(attribute.pk)) if value: choices = {smart_text(a.pk): a for a in attribute.values.all()} ...
from django.utils.encoding import smart_text def get_attributes_display_map(variant, attributes): display = {} for attribute in attributes: value = variant.attributes.get(str(attribute.pk)) if value: choices = {smart_text(a.pk): a for a in attribute.values.all()} attr =...
bsd-3-clause
Python
fd4897c0df6ea1bb9831f6e3dabd436fb422ca8f
Rename company lucro presumido
akretion/l10n-brazil,OCA/l10n-brazil,akretion/l10n-brazil,akretion/l10n-brazil,OCA/l10n-brazil,OCA/l10n-brazil
l10n_br_fiscal/tests/test_fiscal_tax.py
l10n_br_fiscal/tests/test_fiscal_tax.py
# Copyright 2020 Akretion - Renato Lima <renato.lima@akretion.com.br> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests import common class TestFiscalTax(common.TransactionCase): def setUp(self): super().setUp() self.company_lucro_presumido = self.env.ref('empresa_...
# Copyright 2020 Akretion - Renato Lima <renato.lima@akretion.com.br> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo.tests import common class TestFiscalTax(common.TransactionCase): def setUp(self): super().setUp() self.company_normal = self.env.ref('empresa_lucro_pre...
agpl-3.0
Python
9b136f0925a3f72158b96540591b6b8238fe59d4
remove bare form_valid from UserUpdateView
Uran198/med,Uran198/med,Uran198/med,Uran198/med
med/users/views.py
med/users/views.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from braces.views import LoginRequiredMixin from .models import User class UserDetailView(LoginRequiredMixin,...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from braces.views import LoginRequiredMixin from .models import User class UserDetailView(LoginRequiredMixin,...
bsd-3-clause
Python
cae29796e8d185da4c56c6758446f969f03f1962
Fix search index field.
django-leonardo/django-leonardo,django-leonardo/django-leonardo,django-leonardo/django-leonardo,django-leonardo/django-leonardo
leonardo/module/media/search_indexes.py
leonardo/module/media/search_indexes.py
from haystack import indexes, fields from .models import File, Image, Document, Video, Vector class FileIndex(indexes.SearchIndex, indexes.Indexable): """ Index for File objects """ text = fields.CharField(document=True, use_template=True) url = fields.CharField(model_attr="url") title = f...
from haystack import indexes, fields from .models import File, Image, Document, Video, Vector class FileIndex(indexes.SearchIndex, indexes.Indexable): """ Index for File objects """ text = fields.CharField(document=True, use_template=True) url = fields.CharField(model_attr="url") title = f...
bsd-3-clause
Python
17753bb95116ae5e48b4914d48df7c0f520b6c9d
use cm.gray
amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning,amitsaha/learning
recipes/imshow_demo.py
recipes/imshow_demo.py
''' Demo script for demonstrating the imshow() function ''' import matplotlib.pyplot as plt import matplotlib.cm as cm x = [[0, 0, 0], [0, 0, 0], [0, 0, 1]] plt.imshow(x, cmap=cm.gray) plt.show()
''' Demo script for demonstrating the imshow() function ''' import matplotlib.pyplot as plt import matplotlib.cm as cm x = [[0, 0, 0], [0, 0, 0], [0, 0, 1]] plt.imshow(x, cmap=cm.Greys_r) plt.show()
unlicense
Python
719360f9c017c01b4ea7fa2b884484239cb880d2
add a secutiry remainder
Uran198/med,Uran198/med,Uran198/med,Uran198/med
med/api/views.py
med/api/views.py
from django.views.generic import View from django.core.files.storage import get_storage_class from django.http import JsonResponse from braces.views import LoginRequiredMixin from med.questions.forms import UploadImageForm class UploadImage(LoginRequiredMixin, View): def post(self, request): response = {...
from django.views.generic import View from django.core.files.storage import get_storage_class from django.http import JsonResponse from braces.views import LoginRequiredMixin from med.questions.forms import UploadImageForm class UploadImage(LoginRequiredMixin, View): def post(self, request): response = {...
bsd-3-clause
Python
767710e8524a0773728ddc1afdcdee2566e854e9
Fix another issue with services
satish-avninetworks/murano,satish-avninetworks/murano,Bloomie/murano-agent,openstack/python-muranoclient,NeCTAR-RC/murano,Bloomie/murano-agent,sergmelikyan/murano,olivierlemasle/murano,ativelkov/murano-api,NeCTAR-RC/murano,NeCTAR-RC/murano,telefonicaid/murano-agent,openstack/murano-agent,openstack/murano,satish-avninet...
portas/portas/api/v1/__init__.py
portas/portas/api/v1/__init__.py
from portas.db.models import Session, Environment, Status from portas.db.session import get_session def get_draft(environment_id=None, session_id=None): unit = get_session() #TODO: When session is deployed should be returned env.description if session_id: session = unit.query(Session).get(session_...
from portas.db.models import Session, Environment, Status from portas.db.session import get_session def get_draft(environment_id=None, session_id=None): unit = get_session() #TODO: When session is deployed should be returned env.description if session_id: session = unit.query(Session).get(session_...
apache-2.0
Python
dc097daef377e21823a1c7f143b66f911e7cadd7
remove ipdb from scratch
amwelch-oss/RedditStats
redditstats/scratch.py
redditstats/scratch.py
#!/usr/bin/env python import argparse import praw import connect import subreddit import stats import pandas as pd import numpy as np import matplotlib.pyplot as plt def parse_args(): p = argparse.ArgumentParser(description=''' ''', formatter_class=argparse.RawTextHelpFormatter) args = p.parse_args...
#!/usr/bin/env python import argparse import praw import connect import subreddit import stats import pandas as pd import numpy as np import matplotlib.pyplot as plt def parse_args(): p = argparse.ArgumentParser(description=''' ''', formatter_class=argparse.RawTextHelpFormatter) args = p.parse_args...
mit
Python
15a9d42db743df06823e01873aa3b35bc407486c
Expand the docstring of DotProduct, and add doctests
postvakje/sympy,yashsharan/sympy,skidzo/sympy,chaffra/sympy,madan96/sympy,yashsharan/sympy,drufat/sympy,kaushik94/sympy,jaimahajan1997/sympy,madan96/sympy,rahuldan/sympy,jaimahajan1997/sympy,skidzo/sympy,aktech/sympy,souravsingh/sympy,jaimahajan1997/sympy,postvakje/sympy,souravsingh/sympy,postvakje/sympy,kaushik94/symp...
sympy/matrices/expressions/dotproduct.py
sympy/matrices/expressions/dotproduct.py
from __future__ import print_function, division from sympy.core import Basic from sympy.core.sympify import _sympify from sympy.matrices.expressions.transpose import transpose from sympy.matrices.expressions.matexpr import MatrixExpr class DotProduct(MatrixExpr): """ Dot product of vector matrices The i...
from __future__ import print_function, division from sympy.core import Basic from sympy.core.sympify import _sympify from sympy.matrices.expressions.transpose import transpose from sympy.matrices.expressions.matexpr import MatrixExpr class DotProduct(MatrixExpr): """ Dot Product of vector matrices ""...
bsd-3-clause
Python
a04a6a6e2b1d5c02358472b42031bc64e71feaf6
Add listing method to users controller.
arc64/datawi.re,arc64/datawi.re,arc64/datawi.re
datawire/views/users.py
datawire/views/users.py
from flask import Blueprint, request, url_for #from datawire.auth import require from datawire.model import User from datawire.views.util import jsonify, obj_or_404 from datawire.views.util import query_pager users = Blueprint('users', __name__) @users.route('/users') def index(): q = User.all() return quer...
from flask import Blueprint, request, url_for #from datawire.auth import require from datawire.model import User from datawire.views.util import jsonify, obj_or_404 from datawire.views.util import query_pager users = Blueprint('users', __name__) @users.route('/users') def index(): q = User.all() return quer...
mit
Python
f1c6b7dc0010f6aff38520103d04e513a3c34807
Make user posts manageable through administration interface.
pure-python/brainmate
fb/admin.py
fb/admin.py
from django.contrib import admin from fb.models import UserPost admin.site.register(UserPost)
from django.contrib import admin # Register your models here.
apache-2.0
Python
eba00989fd6b6d59db7401503ec929082fdce956
fix jsonify
jhgdike/Squares,jhgdike/Squares,jhgdike/Squares
squares/views/api/play/table.py
squares/views/api/play/table.py
import json from flask import jsonify, request, render_template from squares.views.api import create_blueprint from squares.controllers.table import TableController, Table from squares.views.schema.table import table_schema bp = create_blueprint('play', 'table', __name__) @bp.route('/home') def home(): """all ...
import json from flask import jsonify, request, render_template from squares.views.api import create_blueprint from squares.controllers.table import TableController, Table from squares.views.schema.table import table_schema bp = create_blueprint('play', 'table', __name__) @bp.route('/home') def home(): """all ...
mit
Python
55834614bcc8000345bbed563dd23fd8a46acfc6
Update wsgi.py for production
ahampt/Pref,ahampt/Pref,ahampt/Pref,ahampt/Pref
pref/wsgi.py
pref/wsgi.py
import os import sys from django.core.handlers.wsgi import WSGIHandler os.environ['DJANGO_SETTINGS_MODULE'] = 'pref.settings' application = WSGIHandler()
import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pref.settings") # This application object is used by the development server # as well as any WSGI server configured to use this file. from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
mit
Python
0d222e81b6e7165fe46d1eb39687296e2c39657c
fix whitespace
edpark13/euler
problem11.py
problem11.py
def largest_grid_product(grid): max = float("-inf") for i in xrange(0, len(grid)): for j in xrange(0, len(grid[i]) - 3): productx = grid[i][j] * grid[i][j+1] * grid[i][j+2] * grid[i][j+3] producty = grid[j][i] * grid[j+1][i] * grid[j+2][i] * grid[j+3][i] if productx > max: max = produc...
def largest_grid_product(grid): max = float("-inf") for i in xrange(0, len(grid)): for j in xrange(0, len(grid[i]) - 3): productx = grid[i][j] * grid[i][j+1] * grid[i][j+2] * grid[i][j+3] producty = grid[j][i] * grid[j+1][i] * grid[j+2][i] * grid[j+3][i] if productx > max: max = produc...
mit
Python
141195f85690ed144a9d0f34ab0413ba1ec2d89d
Change manage.py so that it may work again.
ocadotechnology/django-forge,ocadotechnology/django-forge,jbronn/django-forge,jbronn/django-forge
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'forge.settings.dev') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "forge.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
apache-2.0
Python
d79f97a2a5aa7cd17a83f64f41b8c359f655fb79
Add usrbinenvpython
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
manage.py
manage.py
#!/usr/bin/env python import os from flask_admin import Admin from flask_admin.menu import MenuLink from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Shell from labsys.app import create_app from labsys.extensions import db from labsys.auth.models import User, Role, PreAllowedUser fro...
import os from flask_admin import Admin from flask_admin.menu import MenuLink from flask_migrate import Migrate, MigrateCommand from flask_script import Manager, Shell from labsys.app import create_app from labsys.extensions import db from labsys.auth.models import User, Role, PreAllowedUser from labsys.auth.views im...
mit
Python
f9ea5d140c497a38ff68c74166de3f5448745a01
fix flake8 issue
mozilla/relman-auto-nag,mozilla/bztools,mozilla/relman-auto-nag,mozilla/relman-auto-nag
auto_nag/scripts/one_two_word_summary.py
auto_nag/scripts/one_two_word_summary.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from auto_nag.bzcleaner import BzCleaner class OneTwoWordSummary(BzCleaner): def __init__(self): super(On...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from auto_nag.bzcleaner import BzCleaner class OneTwoWordSummary(BzCleaner): def __init__(self): super(On...
bsd-3-clause
Python
ed491860864c363be36d99c09ff0131a5fe00aaf
Fix tests for file timestamps to drop the LLVM epoch offset.
aschwaighofer/swift,tinysun212/swift-windows,arvedviehweger/swift,xwu/swift,airspeedswift/swift,parkera/swift,tinysun212/swift-windows,JGiola/swift,JaSpa/swift,JGiola/swift,parkera/swift,zisko/swift,hughbe/swift,codestergit/swift,CodaFi/swift,rudkx/swift,huonw/swift,tkremenek/swift,jtbandes/swift,codestergit/swift,prac...
test/Driver/Dependencies/Inputs/touch.py
test/Driver/Dependencies/Inputs/touch.py
#!/usr/bin/env python # touch.py - /bin/touch that writes the LLVM epoch -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LI...
#!/usr/bin/env python # touch.py - /bin/touch that writes the LLVM epoch -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LI...
apache-2.0
Python
2da44025051e6a0c0bffe4dba25ed7084e7ae277
Test case test_connect_remote() has been passing consistently for some times. Let's remove the @expectedFailure marker from it.
apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb
test/connect_remote/TestConnectRemote.py
test/connect_remote/TestConnectRemote.py
""" Test lldb 'process connect' command. """ import os import unittest2 import lldb import pexpect from lldbtest import * class ConnectRemoteTestCase(TestBase): mydir = "connect_remote" def test_connect_remote(self): """Test "process connect connect:://localhost:12345".""" # First, we'll st...
""" Test lldb 'process connect' command. """ import os import unittest2 import lldb import pexpect from lldbtest import * class ConnectRemoteTestCase(TestBase): mydir = "connect_remote" @unittest2.expectedFailure def test_connect_remote(self): """Test "process connect connect:://localhost:12345"...
apache-2.0
Python
454d32b2a670e35ab64672a5eeb9400c42bde01a
add __init__.py for compreffor module
googlei18n/compreffor,behdad/compreffor,googlefonts/compreffor,anthrotype/compreffor,behdad/compreffor,googlefonts/compreffor,wskplho/compreffor,wskplho/compreffor,anthrotype/compreffor,behdad/compreffor,googlei18n/compreffor,googlei18n/compreffor,moyogo/compreffor,bitforks/compreffor,moyogo/compreffor,anthrotype/compr...
compreffor/__init__.py
compreffor/__init__.py
""" TTX/FontTools Compreffor """ import os import pyCompressor import cxxCompressor class Methods: NoPref, Py, CxxExecutable, CxxLib = range(4) class Compreffor(object): def __init__(self, font, method=Methods.NoPref, **options): self.font = font self.method = method self.options = o...
apache-2.0
Python
a2d383a5a6beb9639a44331a33dc4f6025464ff3
Add properties to get handle attributes
detrout/telepathy-python,detrout/telepathy-python,max-posedon/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python,max-posedon/telepathy-python,freedesktop-unofficial-mirror/telepathy__telepathy-python
src/server/handle.py
src/server/handle.py
# telepathy-python - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006,2009,2010 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Licens...
# telepathy-python - Base classes defining the interfaces of the Telepathy framework # # Copyright (C) 2005,2006,2009,2010 Collabora Limited # Copyright (C) 2005,2006 Nokia Corporation # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Licens...
lgpl-2.1
Python